255){var P=p>>18&31;tr(e,f,E[P+257]),f+=b[P+257],P>7&&(K(e,f,p>>23&31),f+=lr[P]);var W=p&31;tr(e,f,z[W]),f+=F[W],W>3&&(tr(e,f,p>>5&8191),f+=sr[W])}else tr(e,f,E[p]),f+=b[p]}return tr(e,f,E[256]),f+b[256]},fe=new jr([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Hr=new T(0),ie=function(r,e,a,n,t,o){var v=o.z||r.length,l=new T(n+v+5*(1+Math.ceil(v/7e3))+t),h=l.subarray(n,l.length-t),c=o.l,f=(o.r||0)&7;if(e){f&&(h[0]=o.r>>3);for(var i=fe[e-1],u=i>>13,x=i&8191,S=(1<7e3||M>24576)&&(E>423||!c)){f=Fr(r,h,0,D,O,N,g,M,k,s-k,f),M=A=g=0,k=s;for(var b=0;b<286;++b)O[b]=0;for(var b=0;b<30;++b)N[b]=0}var z=2,F=0,er=x,B=U-_&32767;if(E>2&&L==j(s-B))for(var Y=Math.min(u,E)-1,H=Math.min(32767,s),P=Math.min(258,E);B<=H&&--er&&U!=_;){if(r[s+z]==r[s+z-B]){for(var p=0;pz){if(z=p,F=B,p>Y)break;for(var W=Math.min(B,p-2),X=0,b=0;bX&&(X=vr,_=Z)}}}U=_,_=w[U],B+=U-_&32767}if(F){D[M++]=268435456|mr[z]<<18|Mr[F];var ar=mr[z]&31,nr=Mr[F]&31;g+=lr[ar]+sr[nr],++O[257+ar],++N[nr],C=s+z,++A}else D[M++]=r[s],++O[r[s]]}}for(s=Math.max(s,C);s=v&&(h[f/8|0]=c,rr=v),f=Ur(h,f+1,r.subarray(s,rr))}o.i=v}return cr(l,0,n+Ar(f)+t)},Pr=function(){var r=1,e=0;return{p:function(a){for(var n=r,t=e,o=a.length|0,v=0;v!=o;){for(var l=Math.min(v+2655,o);v>16),t=(t&65535)+15*(t>>16)}r=n,e=t},d:function(){return r%=65521,e%=65521,(r&255)<<24|(r&65280)<<8|(e&255)<<8|e>>8}}},ve=function(r,e,a,n,t){if(!t&&(t={l:1},e.dictionary)){var o=e.dictionary.subarray(-32768),v=new T(o.length+r.length);v.set(o),v.set(r,o.length),r=v,t.w=o.length}return ie(r,e.level==null?6:e.level,e.mem==null?t.l?Math.ceil(Math.max(8,Math.min(13,Math.log(r.length)))*1.5):20:12+e.mem,a,n,t)},$r=function(r,e,a){for(;a;++e)r[e]=a,a>>>=8},le=function(r,e){var a=e.level,n=a==0?0:a<6?1:a==9?3:2;if(r[0]=120,r[1]=n<<6|(e.dictionary&&32),r[1]|=31-(r[0]<<8|r[1])%31,e.dictionary){var t=Pr();t.p(e.dictionary),$r(r,2,t.d())}},se=function(r,e){return((r[0]&15)!=8||r[0]>>4>7||(r[0]<<8|r[1])%31)&&G(6,"invalid zlib data"),(r[1]>>5&1)==1&&G(6,"invalid zlib data: "+(r[1]&32?"need":"unexpected")+" dictionary"),(r[1]>>3&4)+2};function ce(r,e){e||(e={});var a=Pr();a.p(r);var n=ve(r,e,e.dictionary?6:2,4);return le(n,e),$r(n,n.length-4,a.d()),n}function ue(r,e){return oe(r.subarray(se(r),-4),{i:2},e,e)}var Or=typeof TextEncoder<"u"&&new TextEncoder,dr=typeof TextDecoder<"u"&&new TextDecoder,he=0;try{dr.decode(Hr,{stream:!0}),he=1}catch{}var ge=function(r){for(var e="",a=0;;){var n=r[a++],t=(n>127)+(n>223)+(n>239);if(a+t>r.length)return{s:e,r:cr(r,a-1)};t?t==3?(n=((n&15)<<18|(r[a++]&63)<<12|(r[a++]&63)<<6|r[a++]&63)-65536,e+=String.fromCharCode(55296|n>>10,56320|n&1023)):t&1?e+=String.fromCharCode((n&31)<<6|r[a++]&63):e+=String.fromCharCode((n&15)<<12|(r[a++]&63)<<6|r[a++]&63):e+=String.fromCharCode(n)}};function kr(r,e){if(e){for(var a=new T(r.length),n=0;n>1)),v=0,l=function(f){o[v++]=f},n=0;no.length){var h=new T(v+8+(t-n<<1));h.set(o),o=h}var c=r.charCodeAt(n);c<128||e?l(c):c<2048?(l(192|c>>6),l(128|c&63)):c>55295&&c<57344?(c=65536+(c&1047552)|r.charCodeAt(++n)&1023,l(240|c>>18),l(128|c>>12&63),l(128|c>>6&63),l(128|c&63)):(l(224|c>>12),l(128|c>>6&63),l(128|c&63))}return cr(o,0,v)}function Ir(r,e){if(e){for(var a="",n=0;n`,br=`${Br}>`;function xe(r){if(typeof r!="object"||r===null)return!1;const e=r;return!(typeof e.history!="object"||"followupMessages"in e&&typeof e.followupMessages!="object"||"chatOptions"in e&&typeof e.chatOptions!="object"||"serverState"in e&&typeof e.serverState!="object"||"conversationId"in e&&typeof e.conversationId!="string"&&typeof e.conversationId!="object")}function be(){const{restore:r}=Gr(),{isOpen:e,onOpen:a,onClose:n}=Jr(),[t,o]=hr.useState(Dr),v=hr.useRef(null),{getCurrentConversation:l}=Wr(f=>f.primitives),h=()=>{const{chatOptions:f,history:i,serverState:u,conversationId:x,followupMessages:S}=l(),w=Vr({chatOptions:f,history:i,serverState:u,conversationId:x,followupMessages:S}),d=kr(`${Sr}${JSON.stringify(w)}${br}`),m=btoa(Ir(ce(d,{level:9}),!0));navigator.clipboard.writeText(m),o(we),n(),v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{o(Dr)},2e3)},c=()=>{n()};return hr.useEffect(()=>{const f=i=>{if(!i.clipboardData)return;const u=i.clipboardData.types;if(!u.includes("text/plain")&&!u.includes("text"))return;const x=i.clipboardData.getData("text/plain")??i.clipboardData.getData("text");try{const S=atob(x);if(!S.startsWith("xÚ"))return;const w=Ir(ue(kr(S,!0)));if(!w.startsWith(Sr)||!w.endsWith(br))return;i.preventDefault(),i.stopPropagation();const d=w.slice(Sr.length,-br.length),m=JSON.parse(d);if(!xe(m))return;r(m.history,m.followupMessages,m.chatOptions,m.serverState,m.conversationId)}catch(S){console.error("Couldn't parse pasted string as valid Ragbits state",S)}};return window.addEventListener("paste",f),()=>{window.removeEventListener("paste",f)}}),I.jsxs(I.Fragment,{children:[I.jsx(qr,{content:"Share conversation",placement:"bottom",children:I.jsx(gr,{isIconOnly:!0,variant:"ghost",className:"p-0","aria-label":"Share conversation",onPress:a,children:I.jsx(Yr,{icon:t})})}),I.jsx(Kr,{isOpen:e,onOpenChange:c,children:I.jsx(Lr,{children:f=>I.jsxs(I.Fragment,{children:[I.jsx(Xr,{className:"text-default-900 flex flex-col gap-1",children:"Share conversation"}),I.jsx(Qr,{children:I.jsxs("div",{className:"flex flex-col gap-4",children:[I.jsx("p",{className:"text-medium text-default-500",children:"You are about to copy a code that allows sharing and storing your current app state. Once copied, you can paste this code anywhere on the site to instantly return to this exact setup. It’s a quick way to save your progress or share it with others."}),I.jsxs("div",{className:"flex justify-end gap-4 py-4",children:[I.jsx(gr,{color:"danger",variant:"light",onPress:f,"aria-label":"Close share modal",children:"Cancel"}),I.jsx(gr,{color:"primary",onPress:h,"aria-label":"Copy to clipboard to share the conversation",children:"Copy to clipboard"})]})]})})]})})})]})}export{be as default};
diff --git a/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/UsageButton-Bu-ZOHWk.js b/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/UsageButton-DstwX8_2.js
similarity index 99%
rename from packages/ragbits-chat/src/ragbits/chat/ui-build/assets/UsageButton-Bu-ZOHWk.js
rename to packages/ragbits-chat/src/ragbits/chat/ui-build/assets/UsageButton-DstwX8_2.js
index 77e6cc270..0e907a926 100644
--- a/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/UsageButton-Bu-ZOHWk.js
+++ b/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/UsageButton-DstwX8_2.js
@@ -1 +1 @@
-import{r as B,aX as Ml,aY as ae,t as Ne,k as ie,aK as z,aZ as W,a_ as U,a$ as te,b0 as Tl,aT as _,b1 as Rl,b2 as Vl,A as ze,b3 as ue,b4 as Ol,K as pe,H as Hl,J,M as Ll,b5 as L,af as Ul,b6 as Y,b7 as Z,b8 as le,U as Wl,b9 as Gl,ba as Ce,bb as Yl,l as T,R as M,W as X,Z as K,j as h,v as I,a2 as w,ap as be,au as Fe,a3 as O,w as Zl,y as _l,x as ql,a5 as q,O as Jl,Q as Pe,a0 as Ke,X as Ie,u as Xl,as as De,D as Ql,d as eu,I as tu,m as lu,e as uu,f as nu,bc as ou}from"./index-aPw21Xcf.js";import{b as fe,$ as je}from"./useSelectableItem-BaL4tj6I.js";import{C as su,u as iu}from"./index-BMhtIjmr.js";import{m as ru}from"./chunk-IGSAU2ZA-CZpYjJJG.js";function Me(e,t){const l=B.useRef(!0),u=B.useRef(null);B.useEffect(()=>(l.current=!0,()=>{l.current=!1}),[]),B.useEffect(()=>{let o=u.current;l.current?l.current=!1:(!o||t.some((n,i)=>!Object.is(n,o[i])))&&e(),u.current=t},t)}function au(e,t){let l=t?.isDisabled,[u,o]=B.useState(!1);return Ml(()=>{if(e?.current&&!l){let n=()=>{if(e.current){let a=ae(e.current,{tabbable:!0});o(!!a.nextNode())}};n();let i=new MutationObserver(n);return i.observe(e.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{i.disconnect()}}}),l?!1:u}var Be=Ne({base:"w-px h-px inline-block",variants:{isInline:{true:"inline-block",false:"block"}},defaultVariants:{isInline:!1}}),ke=Ne({slots:{base:"flex flex-col relative gap-4",wrapper:["p-4","z-0","flex","flex-col","relative","justify-between","gap-4","shadow-small","bg-content1","overflow-auto"],table:"min-w-full h-auto",thead:"[&>tr]:first:rounded-lg",tbody:"after:block",tr:["group/tr","outline-hidden",...ie],th:["group/th","px-3","h-10","text-start","align-middle","bg-default-100","whitespace-nowrap","text-foreground-500","text-tiny","font-semibold","first:rounded-s-lg","last:rounded-e-lg","outline-hidden","data-[sortable=true]:cursor-pointer","data-[hover=true]:text-foreground-400",...ie],td:["py-2","px-3","relative","align-middle","whitespace-normal","text-small","font-normal","outline-hidden","[&>*]:z-1","[&>*]:relative",...ie,"before:pointer-events-none","before:content-['']","before:absolute","before:z-0","before:inset-0","before:opacity-0","data-[selected=true]:before:opacity-100","group-data-[disabled=true]/tr:text-foreground-300","group-data-[disabled=true]/tr:cursor-not-allowed"],tfoot:"",sortIcon:["ms-2","mb-px","opacity-0","text-inherit","inline-block","transition-transform-opacity","data-[visible=true]:opacity-100","group-data-[hover=true]/th:opacity-100","data-[direction=ascending]:rotate-180"],emptyWrapper:"text-foreground-400 align-middle text-center h-40",loadingWrapper:"absolute inset-0 flex items-center justify-center"},variants:{color:{default:{td:"before:bg-default/60 data-[selected=true]:text-default-foreground"},primary:{td:"before:bg-primary/20 data-[selected=true]:text-primary"},secondary:{td:"before:bg-secondary/20 data-[selected=true]:text-secondary"},success:{td:"before:bg-success/20 data-[selected=true]:text-success-600 dark:data-[selected=true]:text-success"},warning:{td:"before:bg-warning/20 data-[selected=true]:text-warning-600 dark:data-[selected=true]:text-warning"},danger:{td:"before:bg-danger/20 data-[selected=true]:text-danger dark:data-[selected=true]:text-danger-500"}},layout:{auto:{table:"table-auto"},fixed:{table:"table-fixed"}},shadow:{none:{wrapper:"shadow-none"},sm:{wrapper:"shadow-small"},md:{wrapper:"shadow-medium"},lg:{wrapper:"shadow-large"}},hideHeader:{true:{thead:"hidden"}},isStriped:{true:{td:["group-data-[odd=true]/tr:before:bg-default-100","group-data-[odd=true]/tr:before:opacity-100","group-data-[odd=true]/tr:before:-z-10"]}},isCompact:{true:{td:"py-1"},false:{}},isHeaderSticky:{true:{thead:"sticky top-0 z-20 [&>tr]:first:shadow-small"}},isSelectable:{true:{tr:"cursor-default",td:["group-aria-[selected=false]/tr:group-data-[hover=true]/tr:before:bg-default-100","group-aria-[selected=false]/tr:group-data-[hover=true]/tr:before:opacity-70"]}},isMultiSelectable:{true:{td:["group-data-[first=true]/tr:first:before:rounded-ss-lg","group-data-[first=true]/tr:last:before:rounded-se-lg","group-data-[middle=true]/tr:before:rounded-none","group-data-[last=true]/tr:first:before:rounded-es-lg","group-data-[last=true]/tr:last:before:rounded-ee-lg"]},false:{td:["first:before:rounded-s-lg","last:before:rounded-e-lg"]}},radius:{none:{wrapper:"rounded-none",th:["first:rounded-s-none","first:before:rounded-s-none","last:rounded-e-none","last:before:rounded-e-none"],td:["first:before:rounded-s-none","last:before:rounded-e-none","group-data-[first=true]/tr:first:before:rounded-ss-none","group-data-[first=true]/tr:last:before:rounded-se-none","group-data-[last=true]/tr:first:before:rounded-es-none","group-data-[last=true]/tr:last:before:rounded-ee-none"]},sm:{wrapper:"rounded-small"},md:{wrapper:"rounded-medium"},lg:{wrapper:"rounded-large"}},fullWidth:{true:{base:"w-full",wrapper:"w-full",table:"w-full"}},align:{start:{th:"text-start",td:"text-start"},center:{th:"text-center",td:"text-center"},end:{th:"text-end",td:"text-end"}}},defaultVariants:{layout:"auto",shadow:"sm",radius:"lg",color:"default",isCompact:!1,hideHeader:!1,isStriped:!1,fullWidth:!0,align:"start"},compoundVariants:[{isStriped:!0,color:"default",class:{td:"group-data-[odd=true]/tr:data-[selected=true]/tr:before:bg-default/60"}},{isStriped:!0,color:"primary",class:{td:"group-data-[odd=true]/tr:data-[selected=true]/tr:before:bg-primary/20"}},{isStriped:!0,color:"secondary",class:{td:"group-data-[odd=true]/tr:data-[selected=true]/tr:before:bg-secondary/20"}},{isStriped:!0,color:"success",class:{td:"group-data-[odd=true]/tr:data-[selected=true]/tr:before:bg-success/20"}},{isStriped:!0,color:"warning",class:{td:"group-data-[odd=true]/tr:data-[selected=true]/tr:before:bg-warning/20"}},{isStriped:!0,color:"danger",class:{td:"group-data-[odd=true]/tr:data-[selected=true]/tr:before:bg-danger/20"}}]});const he=new WeakMap;function ce(e){return typeof e=="string"?e.replace(/\s*/g,""):""+e}function cu(e,t){let l=he.get(e);if(!l)throw new Error("Unknown grid");return`${l}-${ce(t)}`}function Te(e,t,l){let u=he.get(e);if(!u)throw new Error("Unknown grid");return`${u}-${ce(t)}-${ce(l)}`}function Re(e,t){return[...e.collection.rowHeaderColumnKeys].map(l=>Te(e,t,l)).join(" ")}var Ve={};Ve={ascending:"تصاعدي",ascendingSort:e=>`ترتيب حسب العمود ${e.columnName} بترتيب تصاعدي`,columnSize:e=>`${e.value} بالبكسل`,descending:"تنازلي",descendingSort:e=>`ترتيب حسب العمود ${e.columnName} بترتيب تنازلي`,resizerDescription:"اضغط على مفتاح Enter لبدء تغيير الحجم",select:"تحديد",selectAll:"تحديد الكل",sortable:"عمود قابل للترتيب"};var Oe={};Oe={ascending:"възходящ",ascendingSort:e=>`сортирано по колона ${e.columnName} във възходящ ред`,columnSize:e=>`${e.value} пиксела`,descending:"низходящ",descendingSort:e=>`сортирано по колона ${e.columnName} в низходящ ред`,resizerDescription:"Натиснете „Enter“, за да започнете да преоразмерявате",select:"Изберете",selectAll:"Изберете всичко",sortable:"сортираща колона"};var He={};He={ascending:"vzestupně",ascendingSort:e=>`řazeno vzestupně podle sloupce ${e.columnName}`,columnSize:e=>`${e.value} pixelů`,descending:"sestupně",descendingSort:e=>`řazeno sestupně podle sloupce ${e.columnName}`,resizerDescription:"Stisknutím klávesy Enter začnete měnit velikost",select:"Vybrat",selectAll:"Vybrat vše",sortable:"sloupec s možností řazení"};var Le={};Le={ascending:"stigende",ascendingSort:e=>`sorteret efter kolonne ${e.columnName} i stigende rækkefølge`,columnSize:e=>`${e.value} pixels`,descending:"faldende",descendingSort:e=>`sorteret efter kolonne ${e.columnName} i faldende rækkefølge`,resizerDescription:"Tryk på Enter for at ændre størrelse",select:"Vælg",selectAll:"Vælg alle",sortable:"sorterbar kolonne"};var Ue={};Ue={ascending:"aufsteigend",ascendingSort:e=>`sortiert nach Spalte ${e.columnName} in aufsteigender Reihenfolge`,columnSize:e=>`${e.value} Pixel`,descending:"absteigend",descendingSort:e=>`sortiert nach Spalte ${e.columnName} in absteigender Reihenfolge`,resizerDescription:"Eingabetaste zum Starten der Größenänderung drücken",select:"Auswählen",selectAll:"Alles auswählen",sortable:"sortierbare Spalte"};var We={};We={ascending:"αύξουσα",ascendingSort:e=>`διαλογή ανά στήλη ${e.columnName} σε αύξουσα σειρά`,columnSize:e=>`${e.value} pixel`,descending:"φθίνουσα",descendingSort:e=>`διαλογή ανά στήλη ${e.columnName} σε φθίνουσα σειρά`,resizerDescription:"Πατήστε Enter για έναρξη της αλλαγής μεγέθους",select:"Επιλογή",selectAll:"Επιλογή όλων",sortable:"Στήλη διαλογής"};var Ge={};Ge={select:"Select",selectAll:"Select All",sortable:"sortable column",ascending:"ascending",descending:"descending",ascendingSort:e=>`sorted by column ${e.columnName} in ascending order`,descendingSort:e=>`sorted by column ${e.columnName} in descending order`,columnSize:e=>`${e.value} pixels`,resizerDescription:"Press Enter to start resizing"};var Ye={};Ye={ascending:"ascendente",ascendingSort:e=>`ordenado por columna ${e.columnName} en sentido ascendente`,columnSize:e=>`${e.value} píxeles`,descending:"descendente",descendingSort:e=>`ordenado por columna ${e.columnName} en orden descendente`,resizerDescription:"Pulse Intro para empezar a redimensionar",select:"Seleccionar",selectAll:"Seleccionar todos",sortable:"columna ordenable"};var Ze={};Ze={ascending:"tõusev järjestus",ascendingSort:e=>`sorditud veeru järgi ${e.columnName} tõusvas järjestuses`,columnSize:e=>`${e.value} pikslit`,descending:"laskuv järjestus",descendingSort:e=>`sorditud veeru järgi ${e.columnName} laskuvas järjestuses`,resizerDescription:"Suuruse muutmise alustamiseks vajutage klahvi Enter",select:"Vali",selectAll:"Vali kõik",sortable:"sorditav veerg"};var _e={};_e={ascending:"nouseva",ascendingSort:e=>`lajiteltu sarakkeen ${e.columnName} mukaan nousevassa järjestyksessä`,columnSize:e=>`${e.value} pikseliä`,descending:"laskeva",descendingSort:e=>`lajiteltu sarakkeen ${e.columnName} mukaan laskevassa järjestyksessä`,resizerDescription:"Aloita koon muutos painamalla Enter-näppäintä",select:"Valitse",selectAll:"Valitse kaikki",sortable:"lajiteltava sarake"};var qe={};qe={ascending:"croissant",ascendingSort:e=>`trié en fonction de la colonne ${e.columnName} par ordre croissant`,columnSize:e=>`${e.value} pixels`,descending:"décroissant",descendingSort:e=>`trié en fonction de la colonne ${e.columnName} par ordre décroissant`,resizerDescription:"Appuyez sur Entrée pour commencer le redimensionnement.",select:"Sélectionner",selectAll:"Sélectionner tout",sortable:"colonne triable"};var Je={};Je={ascending:"עולה",ascendingSort:e=>`מוין לפי עמודה ${e.columnName} בסדר עולה`,columnSize:e=>`${e.value} פיקסלים`,descending:"יורד",descendingSort:e=>`מוין לפי עמודה ${e.columnName} בסדר יורד`,resizerDescription:"הקש Enter כדי לשנות את הגודל",select:"בחר",selectAll:"בחר הכול",sortable:"עמודה שניתן למיין"};var Xe={};Xe={ascending:"rastući",ascendingSort:e=>`razvrstano po stupcima ${e.columnName} rastućem redoslijedom`,columnSize:e=>`${e.value} piksela`,descending:"padajući",descendingSort:e=>`razvrstano po stupcima ${e.columnName} padajućim redoslijedom`,resizerDescription:"Pritisnite Enter da biste započeli promenu veličine",select:"Odaberite",selectAll:"Odaberite sve",sortable:"stupac koji se može razvrstati"};var Qe={};Qe={ascending:"növekvő",ascendingSort:e=>`rendezve a(z) ${e.columnName} oszlop szerint, növekvő sorrendben`,columnSize:e=>`${e.value} képpont`,descending:"csökkenő",descendingSort:e=>`rendezve a(z) ${e.columnName} oszlop szerint, csökkenő sorrendben`,resizerDescription:"Nyomja le az Enter billentyűt az átméretezés megkezdéséhez",select:"Kijelölés",selectAll:"Összes kijelölése",sortable:"rendezendő oszlop"};var et={};et={ascending:"crescente",ascendingSort:e=>`in ordine crescente in base alla colonna ${e.columnName}`,columnSize:e=>`${e.value} pixel`,descending:"decrescente",descendingSort:e=>`in ordine decrescente in base alla colonna ${e.columnName}`,resizerDescription:"Premi Invio per iniziare a ridimensionare",select:"Seleziona",selectAll:"Seleziona tutto",sortable:"colonna ordinabile"};var tt={};tt={ascending:"昇順",ascendingSort:e=>`列 ${e.columnName} を昇順で並べ替え`,columnSize:e=>`${e.value} ピクセル`,descending:"降順",descendingSort:e=>`列 ${e.columnName} を降順で並べ替え`,resizerDescription:"Enter キーを押してサイズ変更を開始",select:"選択",selectAll:"すべて選択",sortable:"並べ替え可能な列"};var lt={};lt={ascending:"오름차순",ascendingSort:e=>`${e.columnName} 열을 기준으로 오름차순으로 정렬됨`,columnSize:e=>`${e.value} 픽셀`,descending:"내림차순",descendingSort:e=>`${e.columnName} 열을 기준으로 내림차순으로 정렬됨`,resizerDescription:"크기 조정을 시작하려면 Enter를 누르세요.",select:"선택",selectAll:"모두 선택",sortable:"정렬 가능한 열"};var ut={};ut={ascending:"didėjančia tvarka",ascendingSort:e=>`surikiuota pagal stulpelį ${e.columnName} didėjančia tvarka`,columnSize:e=>`${e.value} piks.`,descending:"mažėjančia tvarka",descendingSort:e=>`surikiuota pagal stulpelį ${e.columnName} mažėjančia tvarka`,resizerDescription:"Paspauskite „Enter“, kad pradėtumėte keisti dydį",select:"Pasirinkti",selectAll:"Pasirinkti viską",sortable:"rikiuojamas stulpelis"};var nt={};nt={ascending:"augošā secībā",ascendingSort:e=>`kārtots pēc kolonnas ${e.columnName} augošā secībā`,columnSize:e=>`${e.value} pikseļi`,descending:"dilstošā secībā",descendingSort:e=>`kārtots pēc kolonnas ${e.columnName} dilstošā secībā`,resizerDescription:"Nospiediet Enter, lai sāktu izmēru mainīšanu",select:"Atlasīt",selectAll:"Atlasīt visu",sortable:"kārtojamā kolonna"};var ot={};ot={ascending:"stigende",ascendingSort:e=>`sortert etter kolonne ${e.columnName} i stigende rekkefølge`,columnSize:e=>`${e.value} piksler`,descending:"synkende",descendingSort:e=>`sortert etter kolonne ${e.columnName} i synkende rekkefølge`,resizerDescription:"Trykk på Enter for å starte størrelsesendring",select:"Velg",selectAll:"Velg alle",sortable:"kolonne som kan sorteres"};var st={};st={ascending:"oplopend",ascendingSort:e=>`gesorteerd in oplopende volgorde in kolom ${e.columnName}`,columnSize:e=>`${e.value} pixels`,descending:"aflopend",descendingSort:e=>`gesorteerd in aflopende volgorde in kolom ${e.columnName}`,resizerDescription:"Druk op Enter om het formaat te wijzigen",select:"Selecteren",selectAll:"Alles selecteren",sortable:"sorteerbare kolom"};var it={};it={ascending:"rosnąco",ascendingSort:e=>`posortowano według kolumny ${e.columnName} w porządku rosnącym`,columnSize:e=>`Liczba pikseli: ${e.value}`,descending:"malejąco",descendingSort:e=>`posortowano według kolumny ${e.columnName} w porządku malejącym`,resizerDescription:"Naciśnij Enter, aby rozpocząć zmienianie rozmiaru",select:"Zaznacz",selectAll:"Zaznacz wszystko",sortable:"kolumna z możliwością sortowania"};var rt={};rt={ascending:"crescente",ascendingSort:e=>`classificado pela coluna ${e.columnName} em ordem crescente`,columnSize:e=>`${e.value} pixels`,descending:"decrescente",descendingSort:e=>`classificado pela coluna ${e.columnName} em ordem decrescente`,resizerDescription:"Pressione Enter para começar a redimensionar",select:"Selecionar",selectAll:"Selecionar tudo",sortable:"coluna classificável"};var at={};at={ascending:"ascendente",ascendingSort:e=>`Ordenar por coluna ${e.columnName} em ordem ascendente`,columnSize:e=>`${e.value} pixels`,descending:"descendente",descendingSort:e=>`Ordenar por coluna ${e.columnName} em ordem descendente`,resizerDescription:"Prima Enter para iniciar o redimensionamento",select:"Selecionar",selectAll:"Selecionar tudo",sortable:"Coluna ordenável"};var ct={};ct={ascending:"crescătoare",ascendingSort:e=>`sortate după coloana ${e.columnName} în ordine crescătoare`,columnSize:e=>`${e.value} pixeli`,descending:"descrescătoare",descendingSort:e=>`sortate după coloana ${e.columnName} în ordine descrescătoare`,resizerDescription:"Apăsați pe Enter pentru a începe redimensionarea",select:"Selectare",selectAll:"Selectare totală",sortable:"coloană sortabilă"};var dt={};dt={ascending:"возрастание",ascendingSort:e=>`сортировать столбец ${e.columnName} в порядке возрастания`,columnSize:e=>`${e.value} пикс.`,descending:"убывание",descendingSort:e=>`сортировать столбец ${e.columnName} в порядке убывания`,resizerDescription:"Нажмите клавишу Enter для начала изменения размеров",select:"Выбрать",selectAll:"Выбрать все",sortable:"сортируемый столбец"};var mt={};mt={ascending:"vzostupne",ascendingSort:e=>`zoradené zostupne podľa stĺpca ${e.columnName}`,columnSize:e=>`Počet pixelov: ${e.value}`,descending:"zostupne",descendingSort:e=>`zoradené zostupne podľa stĺpca ${e.columnName}`,resizerDescription:"Stlačením klávesu Enter začnete zmenu veľkosti",select:"Vybrať",selectAll:"Vybrať všetko",sortable:"zoraditeľný stĺpec"};var pt={};pt={ascending:"naraščajoče",ascendingSort:e=>`razvrščeno po stolpcu ${e.columnName} v naraščajočem vrstnem redu`,columnSize:e=>`${e.value} slikovnih pik`,descending:"padajoče",descendingSort:e=>`razvrščeno po stolpcu ${e.columnName} v padajočem vrstnem redu`,resizerDescription:"Pritisnite tipko Enter da začnete spreminjati velikost",select:"Izberite",selectAll:"Izberite vse",sortable:"razvrstljivi stolpec"};var bt={};bt={ascending:"rastući",ascendingSort:e=>`sortirano po kolonama ${e.columnName} rastućim redosledom`,columnSize:e=>`${e.value} piksela`,descending:"padajući",descendingSort:e=>`sortirano po kolonama ${e.columnName} padajućim redosledom`,resizerDescription:"Pritisnite Enter da biste započeli promenu veličine",select:"Izaberite",selectAll:"Izaberite sve",sortable:"kolona koja se može sortirati"};var ft={};ft={ascending:"stigande",ascendingSort:e=>`sorterat på kolumn ${e.columnName} i stigande ordning`,columnSize:e=>`${e.value} pixlar`,descending:"fallande",descendingSort:e=>`sorterat på kolumn ${e.columnName} i fallande ordning`,resizerDescription:"Tryck på Retur för att börja ändra storlek",select:"Markera",selectAll:"Markera allt",sortable:"sorterbar kolumn"};var ht={};ht={ascending:"artan sırada",ascendingSort:e=>`${e.columnName} sütuna göre artan düzende sırala`,columnSize:e=>`${e.value} piksel`,descending:"azalan sırada",descendingSort:e=>`${e.columnName} sütuna göre azalan düzende sırala`,resizerDescription:"Yeniden boyutlandırmak için Enter'a basın",select:"Seç",selectAll:"Tümünü Seç",sortable:"Sıralanabilir sütun"};var vt={};vt={ascending:"висхідний",ascendingSort:e=>`відсортовано за стовпцем ${e.columnName} у висхідному порядку`,columnSize:e=>`${e.value} пікс.`,descending:"низхідний",descendingSort:e=>`відсортовано за стовпцем ${e.columnName} у низхідному порядку`,resizerDescription:"Натисніть Enter, щоб почати зміну розміру",select:"Вибрати",selectAll:"Вибрати все",sortable:"сортувальний стовпець"};var gt={};gt={ascending:"升序",ascendingSort:e=>`按列 ${e.columnName} 升序排序`,columnSize:e=>`${e.value} 像素`,descending:"降序",descendingSort:e=>`按列 ${e.columnName} 降序排序`,resizerDescription:"按“输入”键开始调整大小。",select:"选择",selectAll:"全选",sortable:"可排序的列"};var $t={};$t={ascending:"遞增",ascendingSort:e=>`已依據「${e.columnName}」欄遞增排序`,columnSize:e=>`${e.value} 像素`,descending:"遞減",descendingSort:e=>`已依據「${e.columnName}」欄遞減排序`,resizerDescription:"按 Enter 鍵以開始調整大小",select:"選取",selectAll:"全選",sortable:"可排序的欄"};var ne={};ne={"ar-AE":Ve,"bg-BG":Oe,"cs-CZ":He,"da-DK":Le,"de-DE":Ue,"el-GR":We,"en-US":Ge,"es-ES":Ye,"et-EE":Ze,"fi-FI":_e,"fr-FR":qe,"he-IL":Je,"hr-HR":Xe,"hu-HU":Qe,"it-IT":et,"ja-JP":tt,"ko-KR":lt,"lt-LT":ut,"lv-LV":nt,"nb-NO":ot,"nl-NL":st,"pl-PL":it,"pt-BR":rt,"pt-PT":at,"ro-RO":ct,"ru-RU":dt,"sk-SK":mt,"sl-SI":pt,"sr-SP":bt,"sv-SE":ft,"tr-TR":ht,"uk-UA":vt,"zh-CN":gt,"zh-TW":$t};class yt{isCell(t){return t.type==="cell"}isRow(t){return t.type==="row"||t.type==="item"}isDisabled(t){var l;return this.disabledBehavior==="all"&&(((l=t.props)===null||l===void 0?void 0:l.isDisabled)||this.disabledKeys.has(t.key))}findPreviousKey(t,l){let u=t!=null?this.collection.getKeyBefore(t):this.collection.getLastKey();for(;u!=null;){let o=this.collection.getItem(u);if(!o)return null;if(!this.isDisabled(o)&&(!l||l(o)))return u;u=this.collection.getKeyBefore(u)}return null}findNextKey(t,l){let u=t!=null?this.collection.getKeyAfter(t):this.collection.getFirstKey();for(;u!=null;){let o=this.collection.getItem(u);if(!o)return null;if(!this.isDisabled(o)&&(!l||l(o)))return u;if(u=this.collection.getKeyAfter(u),u==null)return null}return null}getKeyForItemInRowByIndex(t,l=0){if(l<0)return null;let u=this.collection.getItem(t);if(!u)return null;let o=0;for(let a of z(u,this.collection)){var n;if(a.colSpan&&a.colSpan+o>l)return(n=a.key)!==null&&n!==void 0?n:null;a.colSpan&&(o=o+a.colSpan-1);var i;if(o===l)return(i=a.key)!==null&&i!==void 0?i:null;o++}return null}getKeyBelow(t){let l=t,u=this.collection.getItem(l);if(!u)return null;var o;if(this.isCell(u)&&(l=(o=u.parentKey)!==null&&o!==void 0?o:null),l==null)return null;if(l=this.findNextKey(l,n=>n.type==="item"),l!=null){if(this.isCell(u)){let n=u.colIndex?u.colIndex:u.index;return this.getKeyForItemInRowByIndex(l,n)}if(this.focusMode==="row")return l}return null}getKeyAbove(t){let l=t,u=this.collection.getItem(l);if(!u)return null;var o;if(this.isCell(u)&&(l=(o=u.parentKey)!==null&&o!==void 0?o:null),l==null)return null;if(l=this.findPreviousKey(l,n=>n.type==="item"),l!=null){if(this.isCell(u)){let n=u.colIndex?u.colIndex:u.index;return this.getKeyForItemInRowByIndex(l,n)}if(this.focusMode==="row")return l}return null}getKeyRightOf(t){let l=this.collection.getItem(t);if(!l)return null;if(this.isRow(l)){var u,o;let d=z(l,this.collection);var n;return(n=this.direction==="rtl"?(u=W(d))===null||u===void 0?void 0:u.key:(o=U(d))===null||o===void 0?void 0:o.key)!==null&&n!==void 0?n:null}if(this.isCell(l)&&l.parentKey!=null){let d=this.collection.getItem(l.parentKey);if(!d)return null;let r=z(d,this.collection);var i;let p=(i=this.direction==="rtl"?te(r,l.index-1):te(r,l.index+1))!==null&&i!==void 0?i:null;var a;if(p)return(a=p.key)!==null&&a!==void 0?a:null;var m;if(this.focusMode==="row")return(m=l.parentKey)!==null&&m!==void 0?m:null;var c;return(c=this.direction==="rtl"?this.getFirstKey(t):this.getLastKey(t))!==null&&c!==void 0?c:null}return null}getKeyLeftOf(t){let l=this.collection.getItem(t);if(!l)return null;if(this.isRow(l)){var u,o;let d=z(l,this.collection);var n;return(n=this.direction==="rtl"?(u=U(d))===null||u===void 0?void 0:u.key:(o=W(d))===null||o===void 0?void 0:o.key)!==null&&n!==void 0?n:null}if(this.isCell(l)&&l.parentKey!=null){let d=this.collection.getItem(l.parentKey);if(!d)return null;let r=z(d,this.collection);var i;let p=(i=this.direction==="rtl"?te(r,l.index+1):te(r,l.index-1))!==null&&i!==void 0?i:null;var a;if(p)return(a=p.key)!==null&&a!==void 0?a:null;var m;if(this.focusMode==="row")return(m=l.parentKey)!==null&&m!==void 0?m:null;var c;return(c=this.direction==="rtl"?this.getLastKey(t):this.getFirstKey(t))!==null&&c!==void 0?c:null}return null}getFirstKey(t,l){let u=t??null,o;if(u!=null){if(o=this.collection.getItem(u),!o)return null;if(this.isCell(o)&&!l&&o.parentKey!=null){var n;let c=this.collection.getItem(o.parentKey);if(!c)return null;var i;return(i=(n=U(z(c,this.collection)))===null||n===void 0?void 0:n.key)!==null&&i!==void 0?i:null}}if(u=this.findNextKey(void 0,c=>c.type==="item"),u!=null&&(o&&this.isCell(o)&&l||this.focusMode==="cell")){var a;let c=this.collection.getItem(u);if(!c)return null;var m;u=(m=(a=U(z(c,this.collection)))===null||a===void 0?void 0:a.key)!==null&&m!==void 0?m:null}return u}getLastKey(t,l){let u=t??null,o;if(u!=null){if(o=this.collection.getItem(u),!o)return null;if(this.isCell(o)&&!l&&o.parentKey!=null){var n;let c=this.collection.getItem(o.parentKey);if(!c)return null;let d=z(c,this.collection);var i;return(i=(n=W(d))===null||n===void 0?void 0:n.key)!==null&&i!==void 0?i:null}}if(u=this.findPreviousKey(void 0,c=>c.type==="item"),u!=null&&(o&&this.isCell(o)&&l||this.focusMode==="cell")){var a;let c=this.collection.getItem(u);if(!c)return null;let d=z(c,this.collection);var m;u=(m=(a=W(d))===null||a===void 0?void 0:a.key)!==null&&m!==void 0?m:null}return u}getKeyPageAbove(t){let l=t,u=this.layoutDelegate.getItemRect(l);if(!u)return null;let o=Math.max(0,u.y+u.height-this.layoutDelegate.getVisibleRect().height);for(;u&&u.y>o&&l!=null;){var n;if(l=(n=this.getKeyAbove(l))!==null&&n!==void 0?n:null,l==null)break;u=this.layoutDelegate.getItemRect(l)}return l}getKeyPageBelow(t){let l=t,u=this.layoutDelegate.getItemRect(l);if(!u)return null;let o=this.layoutDelegate.getVisibleRect().height,n=Math.min(this.layoutDelegate.getContentSize().height,u.y+o);for(;u&&u.y+u.heightr.type==="item"),u==null&&!a&&(u=this.getFirstKey(),a=!0)}return null}constructor(t){if(this.collection=t.collection,this.disabledKeys=t.disabledKeys,this.disabledBehavior=t.disabledBehavior||"all",this.direction=t.direction,this.collator=t.collator,!t.layout&&!t.ref)throw new Error("Either a layout or a ref must be specified.");this.layoutDelegate=t.layoutDelegate||(t.layout?new du(t.layout):new Tl(t.ref)),this.focusMode=t.focusMode||"row"}}class du{getContentSize(){return this.layout.getContentSize()}getItemRect(t){var l;return((l=this.layout.getLayoutInfo(t))===null||l===void 0?void 0:l.rect)||null}getVisibleRect(){return this.layout.virtualizer.visibleRect}constructor(t){this.layout=t}}const ve=new WeakMap;var xt={};xt={deselectedItem:e=>`${e.item} غير المحدد`,longPressToSelect:"اضغط مطولًا للدخول إلى وضع التحديد.",select:"تحديد",selectedAll:"جميع العناصر المحددة.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"لم يتم تحديد عناصر",one:()=>`${t.number(e.count)} عنصر محدد`,other:()=>`${t.number(e.count)} عنصر محدد`})}.`,selectedItem:e=>`${e.item} المحدد`};var Ct={};Ct={deselectedItem:e=>`${e.item} не е избран.`,longPressToSelect:"Натиснете и задръжте за да влезете в избирателен режим.",select:"Изберете",selectedAll:"Всички елементи са избрани.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Няма избрани елементи",one:()=>`${t.number(e.count)} избран елемент`,other:()=>`${t.number(e.count)} избрани елементи`})}.`,selectedItem:e=>`${e.item} избран.`};var Dt={};Dt={deselectedItem:e=>`Položka ${e.item} není vybrána.`,longPressToSelect:"Dlouhým stisknutím přejdete do režimu výběru.",select:"Vybrat",selectedAll:"Vybrány všechny položky.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nevybrány žádné položky",one:()=>`Vybrána ${t.number(e.count)} položka`,other:()=>`Vybráno ${t.number(e.count)} položek`})}.`,selectedItem:e=>`Vybrána položka ${e.item}.`};var Bt={};Bt={deselectedItem:e=>`${e.item} ikke valgt.`,longPressToSelect:"Lav et langt tryk for at aktivere valgtilstand.",select:"Vælg",selectedAll:"Alle elementer valgt.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Ingen elementer valgt",one:()=>`${t.number(e.count)} element valgt`,other:()=>`${t.number(e.count)} elementer valgt`})}.`,selectedItem:e=>`${e.item} valgt.`};var kt={};kt={deselectedItem:e=>`${e.item} nicht ausgewählt.`,longPressToSelect:"Gedrückt halten, um Auswahlmodus zu öffnen.",select:"Auswählen",selectedAll:"Alle Elemente ausgewählt.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Keine Elemente ausgewählt",one:()=>`${t.number(e.count)} Element ausgewählt`,other:()=>`${t.number(e.count)} Elemente ausgewählt`})}.`,selectedItem:e=>`${e.item} ausgewählt.`};var Et={};Et={deselectedItem:e=>`Δεν επιλέχθηκε το στοιχείο ${e.item}.`,longPressToSelect:"Πατήστε παρατεταμένα για να μπείτε σε λειτουργία επιλογής.",select:"Επιλογή",selectedAll:"Επιλέχθηκαν όλα τα στοιχεία.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Δεν επιλέχθηκαν στοιχεία",one:()=>`Επιλέχθηκε ${t.number(e.count)} στοιχείο`,other:()=>`Επιλέχθηκαν ${t.number(e.count)} στοιχεία`})}.`,selectedItem:e=>`Επιλέχθηκε το στοιχείο ${e.item}.`};var St={};St={deselectedItem:e=>`${e.item} not selected.`,select:"Select",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"No items selected",one:()=>`${t.number(e.count)} item selected`,other:()=>`${t.number(e.count)} items selected`})}.`,selectedAll:"All items selected.",selectedItem:e=>`${e.item} selected.`,longPressToSelect:"Long press to enter selection mode."};var At={};At={deselectedItem:e=>`${e.item} no seleccionado.`,longPressToSelect:"Mantenga pulsado para abrir el modo de selección.",select:"Seleccionar",selectedAll:"Todos los elementos seleccionados.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Ningún elemento seleccionado",one:()=>`${t.number(e.count)} elemento seleccionado`,other:()=>`${t.number(e.count)} elementos seleccionados`})}.`,selectedItem:e=>`${e.item} seleccionado.`};var wt={};wt={deselectedItem:e=>`${e.item} pole valitud.`,longPressToSelect:"Valikurežiimi sisenemiseks vajutage pikalt.",select:"Vali",selectedAll:"Kõik üksused valitud.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Üksusi pole valitud",one:()=>`${t.number(e.count)} üksus valitud`,other:()=>`${t.number(e.count)} üksust valitud`})}.`,selectedItem:e=>`${e.item} valitud.`};var Nt={};Nt={deselectedItem:e=>`Kohdetta ${e.item} ei valittu.`,longPressToSelect:"Siirry valintatilaan painamalla pitkään.",select:"Valitse",selectedAll:"Kaikki kohteet valittu.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Ei yhtään kohdetta valittu",one:()=>`${t.number(e.count)} kohde valittu`,other:()=>`${t.number(e.count)} kohdetta valittu`})}.`,selectedItem:e=>`${e.item} valittu.`};var zt={};zt={deselectedItem:e=>`${e.item} non sélectionné.`,longPressToSelect:"Appuyez de manière prolongée pour passer en mode de sélection.",select:"Sélectionner",selectedAll:"Tous les éléments sélectionnés.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Aucun élément sélectionné",one:()=>`${t.number(e.count)} élément sélectionné`,other:()=>`${t.number(e.count)} éléments sélectionnés`})}.`,selectedItem:e=>`${e.item} sélectionné.`};var Ft={};Ft={deselectedItem:e=>`${e.item} לא נבחר.`,longPressToSelect:"הקשה ארוכה לכניסה למצב בחירה.",select:"בחר",selectedAll:"כל הפריטים נבחרו.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"לא נבחרו פריטים",one:()=>`פריט ${t.number(e.count)} נבחר`,other:()=>`${t.number(e.count)} פריטים נבחרו`})}.`,selectedItem:e=>`${e.item} נבחר.`};var Pt={};Pt={deselectedItem:e=>`Stavka ${e.item} nije odabrana.`,longPressToSelect:"Dugo pritisnite za ulazak u način odabira.",select:"Odaberite",selectedAll:"Odabrane su sve stavke.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nije odabrana nijedna stavka",one:()=>`Odabrana je ${t.number(e.count)} stavka`,other:()=>`Odabrano je ${t.number(e.count)} stavki`})}.`,selectedItem:e=>`Stavka ${e.item} je odabrana.`};var Kt={};Kt={deselectedItem:e=>`${e.item} nincs kijelölve.`,longPressToSelect:"Nyomja hosszan a kijelöléshez.",select:"Kijelölés",selectedAll:"Az összes elem kijelölve.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Egy elem sincs kijelölve",one:()=>`${t.number(e.count)} elem kijelölve`,other:()=>`${t.number(e.count)} elem kijelölve`})}.`,selectedItem:e=>`${e.item} kijelölve.`};var It={};It={deselectedItem:e=>`${e.item} non selezionato.`,longPressToSelect:"Premi a lungo per passare alla modalità di selezione.",select:"Seleziona",selectedAll:"Tutti gli elementi selezionati.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nessun elemento selezionato",one:()=>`${t.number(e.count)} elemento selezionato`,other:()=>`${t.number(e.count)} elementi selezionati`})}.`,selectedItem:e=>`${e.item} selezionato.`};var jt={};jt={deselectedItem:e=>`${e.item} が選択されていません。`,longPressToSelect:"長押しして選択モードを開きます。",select:"選択",selectedAll:"すべての項目を選択しました。",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"項目が選択されていません",one:()=>`${t.number(e.count)} 項目を選択しました`,other:()=>`${t.number(e.count)} 項目を選択しました`})}。`,selectedItem:e=>`${e.item} を選択しました。`};var Mt={};Mt={deselectedItem:e=>`${e.item}이(가) 선택되지 않았습니다.`,longPressToSelect:"선택 모드로 들어가려면 길게 누르십시오.",select:"선택",selectedAll:"모든 항목이 선택되었습니다.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"선택된 항목이 없습니다",one:()=>`${t.number(e.count)}개 항목이 선택되었습니다`,other:()=>`${t.number(e.count)}개 항목이 선택되었습니다`})}.`,selectedItem:e=>`${e.item}이(가) 선택되었습니다.`};var Tt={};Tt={deselectedItem:e=>`${e.item} nepasirinkta.`,longPressToSelect:"Norėdami įjungti pasirinkimo režimą, paspauskite ir palaikykite.",select:"Pasirinkti",selectedAll:"Pasirinkti visi elementai.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nepasirinktas nė vienas elementas",one:()=>`Pasirinktas ${t.number(e.count)} elementas`,other:()=>`Pasirinkta elementų: ${t.number(e.count)}`})}.`,selectedItem:e=>`Pasirinkta: ${e.item}.`};var Rt={};Rt={deselectedItem:e=>`Vienums ${e.item} nav atlasīts.`,longPressToSelect:"Ilgi turiet nospiestu. lai ieslēgtu atlases režīmu.",select:"Atlasīt",selectedAll:"Atlasīti visi vienumi.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nav atlasīts neviens vienums",one:()=>`Atlasīto vienumu skaits: ${t.number(e.count)}`,other:()=>`Atlasīto vienumu skaits: ${t.number(e.count)}`})}.`,selectedItem:e=>`Atlasīts vienums ${e.item}.`};var Vt={};Vt={deselectedItem:e=>`${e.item} er ikke valgt.`,longPressToSelect:"Bruk et langt trykk for å gå inn i valgmodus.",select:"Velg",selectedAll:"Alle elementer er valgt.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Ingen elementer er valgt",one:()=>`${t.number(e.count)} element er valgt`,other:()=>`${t.number(e.count)} elementer er valgt`})}.`,selectedItem:e=>`${e.item} er valgt.`};var Ot={};Ot={deselectedItem:e=>`${e.item} niet geselecteerd.`,longPressToSelect:"Druk lang om de selectiemodus te openen.",select:"Selecteren",selectedAll:"Alle items geselecteerd.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Geen items geselecteerd",one:()=>`${t.number(e.count)} item geselecteerd`,other:()=>`${t.number(e.count)} items geselecteerd`})}.`,selectedItem:e=>`${e.item} geselecteerd.`};var Ht={};Ht={deselectedItem:e=>`Nie zaznaczono ${e.item}.`,longPressToSelect:"Naciśnij i przytrzymaj, aby wejść do trybu wyboru.",select:"Zaznacz",selectedAll:"Wszystkie zaznaczone elementy.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nie zaznaczono żadnych elementów",one:()=>`${t.number(e.count)} zaznaczony element`,other:()=>`${t.number(e.count)} zaznaczonych elementów`})}.`,selectedItem:e=>`Zaznaczono ${e.item}.`};var Lt={};Lt={deselectedItem:e=>`${e.item} não selecionado.`,longPressToSelect:"Mantenha pressionado para entrar no modo de seleção.",select:"Selecionar",selectedAll:"Todos os itens selecionados.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nenhum item selecionado",one:()=>`${t.number(e.count)} item selecionado`,other:()=>`${t.number(e.count)} itens selecionados`})}.`,selectedItem:e=>`${e.item} selecionado.`};var Ut={};Ut={deselectedItem:e=>`${e.item} não selecionado.`,longPressToSelect:"Prima continuamente para entrar no modo de seleção.",select:"Selecionar",selectedAll:"Todos os itens selecionados.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nenhum item selecionado",one:()=>`${t.number(e.count)} item selecionado`,other:()=>`${t.number(e.count)} itens selecionados`})}.`,selectedItem:e=>`${e.item} selecionado.`};var Wt={};Wt={deselectedItem:e=>`${e.item} neselectat.`,longPressToSelect:"Apăsați lung pentru a intra în modul de selectare.",select:"Selectare",selectedAll:"Toate elementele selectate.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Niciun element selectat",one:()=>`${t.number(e.count)} element selectat`,other:()=>`${t.number(e.count)} elemente selectate`})}.`,selectedItem:e=>`${e.item} selectat.`};var Gt={};Gt={deselectedItem:e=>`${e.item} не выбрано.`,longPressToSelect:"Нажмите и удерживайте для входа в режим выбора.",select:"Выбрать",selectedAll:"Выбраны все элементы.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Нет выбранных элементов",one:()=>`${t.number(e.count)} элемент выбран`,other:()=>`${t.number(e.count)} элементов выбрано`})}.`,selectedItem:e=>`${e.item} выбрано.`};var Yt={};Yt={deselectedItem:e=>`Nevybraté položky: ${e.item}.`,longPressToSelect:"Dlhším stlačením prejdite do režimu výberu.",select:"Vybrať",selectedAll:"Všetky vybraté položky.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Žiadne vybraté položky",one:()=>`${t.number(e.count)} vybratá položka`,other:()=>`Počet vybratých položiek:${t.number(e.count)}`})}.`,selectedItem:e=>`Vybraté položky: ${e.item}.`};var Zt={};Zt={deselectedItem:e=>`Element ${e.item} ni izbran.`,longPressToSelect:"Za izbirni način pritisnite in dlje časa držite.",select:"Izberite",selectedAll:"Vsi elementi so izbrani.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Noben element ni izbran",one:()=>`${t.number(e.count)} element je izbran`,other:()=>`${t.number(e.count)} elementov je izbranih`})}.`,selectedItem:e=>`Element ${e.item} je izbran.`};var _t={};_t={deselectedItem:e=>`${e.item} nije izabrano.`,longPressToSelect:"Dugo pritisnite za ulazak u režim biranja.",select:"Izaberite",selectedAll:"Izabrane su sve stavke.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nije izabrana nijedna stavka",one:()=>`Izabrana je ${t.number(e.count)} stavka`,other:()=>`Izabrano je ${t.number(e.count)} stavki`})}.`,selectedItem:e=>`${e.item} je izabrano.`};var qt={};qt={deselectedItem:e=>`${e.item} ej markerat.`,longPressToSelect:"Tryck länge när du vill öppna väljarläge.",select:"Markera",selectedAll:"Alla markerade objekt.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Inga markerade objekt",one:()=>`${t.number(e.count)} markerat objekt`,other:()=>`${t.number(e.count)} markerade objekt`})}.`,selectedItem:e=>`${e.item} markerat.`};var Jt={};Jt={deselectedItem:e=>`${e.item} seçilmedi.`,longPressToSelect:"Seçim moduna girmek için uzun basın.",select:"Seç",selectedAll:"Tüm ögeler seçildi.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Hiçbir öge seçilmedi",one:()=>`${t.number(e.count)} öge seçildi`,other:()=>`${t.number(e.count)} öge seçildi`})}.`,selectedItem:e=>`${e.item} seçildi.`};var Xt={};Xt={deselectedItem:e=>`${e.item} не вибрано.`,longPressToSelect:"Виконайте довге натиснення, щоб перейти в режим вибору.",select:"Вибрати",selectedAll:"Усі елементи вибрано.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Жодних елементів не вибрано",one:()=>`${t.number(e.count)} елемент вибрано`,other:()=>`Вибрано елементів: ${t.number(e.count)}`})}.`,selectedItem:e=>`${e.item} вибрано.`};var Qt={};Qt={deselectedItem:e=>`未选择 ${e.item}。`,longPressToSelect:"长按以进入选择模式。",select:"选择",selectedAll:"已选择所有项目。",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"未选择项目",one:()=>`已选择 ${t.number(e.count)} 个项目`,other:()=>`已选择 ${t.number(e.count)} 个项目`})}。`,selectedItem:e=>`已选择 ${e.item}。`};var el={};el={deselectedItem:e=>`未選取「${e.item}」。`,longPressToSelect:"長按以進入選擇模式。",select:"選取",selectedAll:"已選取所有項目。",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"未選取任何項目",one:()=>`已選取 ${t.number(e.count)} 個項目`,other:()=>`已選取 ${t.number(e.count)} 個項目`})}。`,selectedItem:e=>`已選取「${e.item}」。`};var oe={};oe={"ar-AE":xt,"bg-BG":Ct,"cs-CZ":Dt,"da-DK":Bt,"de-DE":kt,"el-GR":Et,"en-US":St,"es-ES":At,"et-EE":wt,"fi-FI":Nt,"fr-FR":zt,"he-IL":Ft,"hr-HR":Pt,"hu-HU":Kt,"it-IT":It,"ja-JP":jt,"ko-KR":Mt,"lt-LT":Tt,"lv-LV":Rt,"nb-NO":Vt,"nl-NL":Ot,"pl-PL":Ht,"pt-BR":Lt,"pt-PT":Ut,"ro-RO":Wt,"ru-RU":Gt,"sk-SK":Yt,"sl-SI":Zt,"sr-SP":_t,"sv-SE":qt,"tr-TR":Jt,"uk-UA":Xt,"zh-CN":Qt,"zh-TW":el};const tl=7e3;let V=null;function ll(e,t="assertive",l=tl){V?V.announce(e,t,l):(V=new mu,(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u")?V.announce(e,t,l):setTimeout(()=>{V?.isAttached()&&V?.announce(e,t,l)},100))}class mu{isAttached(){var t;return(t=this.node)===null||t===void 0?void 0:t.isConnected}createLog(t){let l=document.createElement("div");return l.setAttribute("role","log"),l.setAttribute("aria-live",t),l.setAttribute("aria-relevant","additions"),l}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(t,l="assertive",u=tl){var o,n;if(!this.node)return;let i=document.createElement("div");typeof t=="object"?(i.setAttribute("role","img"),i.setAttribute("aria-labelledby",t["aria-labelledby"])):i.textContent=t,l==="assertive"?(o=this.assertiveLog)===null||o===void 0||o.appendChild(i):(n=this.politeLog)===null||n===void 0||n.appendChild(i),t!==""&&setTimeout(()=>{i.remove()},u)}clear(t){this.node&&((!t||t==="assertive")&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!t||t==="polite")&&this.politeLog&&(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,typeof document<"u"&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}}function pu(e){return e&&e.__esModule?e.default:e}function bu(e,t){let{getRowText:l=a=>{var m,c,d,r;return(r=(m=(c=t.collection).getTextValue)===null||m===void 0?void 0:m.call(c,a))!==null&&r!==void 0?r:(d=t.collection.getItem(a))===null||d===void 0?void 0:d.textValue}}=e,u=_(pu(oe),"@react-aria/grid"),o=t.selectionManager.rawSelection,n=B.useRef(o),i=Rl(()=>{var a;if(!t.selectionManager.isFocused||o===n.current){n.current=o;return}let m=Ee(o,n.current),c=Ee(n.current,o),d=t.selectionManager.selectionBehavior==="replace",r=[];if(t.selectionManager.selectedKeys.size===1&&d){let p=t.selectionManager.selectedKeys.keys().next().value;if(p!=null&&t.collection.getItem(p)){let s=l(p);s&&r.push(u.format("selectedItem",{item:s}))}}else if(m.size===1&&c.size===0){let p=m.keys().next().value;if(p!=null){let s=l(p);s&&r.push(u.format("selectedItem",{item:s}))}}else if(c.size===1&&m.size===0){let p=c.keys().next().value;if(p!=null&&t.collection.getItem(p)){let s=l(p);s&&r.push(u.format("deselectedItem",{item:s}))}}t.selectionManager.selectionMode==="multiple"&&(r.length===0||o==="all"||o.size>1||n.current==="all"||((a=n.current)===null||a===void 0?void 0:a.size)>1)&&r.push(o==="all"?u.format("selectedAll"):u.format("selectedCount",{count:o.size})),r.length>0&&ll(r.join(" ")),n.current=o});Me(()=>{if(t.selectionManager.isFocused)i();else{let a=requestAnimationFrame(i);return()=>cancelAnimationFrame(a)}},[o,t.selectionManager.isFocused])}function Ee(e,t){let l=new Set;if(e==="all"||t==="all")return l;for(let u of e.keys())t.has(u)||l.add(u);return l}function fu(e){return e&&e.__esModule?e.default:e}function hu(e){let t=_(fu(oe),"@react-aria/grid"),l=Vl(),u=(l==="pointer"||l==="virtual"||l==null)&&typeof window<"u"&&"ontouchstart"in window,o=B.useMemo(()=>{let i=e.selectionManager.selectionMode,a=e.selectionManager.selectionBehavior,m;return u&&(m=t.format("longPressToSelect")),a==="replace"&&i!=="none"&&e.hasItemActions?m:void 0},[e.selectionManager.selectionMode,e.selectionManager.selectionBehavior,e.hasItemActions,t,u]);return fe(o)}function vu(e,t,l){let{isVirtualized:u,disallowTypeAhead:o,keyboardDelegate:n,focusMode:i,scrollRef:a,getRowText:m,onRowAction:c,onCellAction:d,escapeKeyBehavior:r="clearSelection",shouldSelectOnPressUp:p}=e,{selectionManager:s}=t;!e["aria-label"]&&!e["aria-labelledby"]&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let b=ze({usage:"search",sensitivity:"base"}),{direction:v}=ue(),g=t.selectionManager.disabledBehavior,x=B.useMemo(()=>n||new yt({collection:t.collection,disabledKeys:t.disabledKeys,disabledBehavior:g,ref:l,direction:v,collator:b,focusMode:i}),[n,t.collection,t.disabledKeys,g,l,v,b,i]),{collectionProps:D}=Ol({ref:l,selectionManager:s,keyboardDelegate:x,isVirtualized:u,scrollRef:a,disallowTypeAhead:o,escapeKeyBehavior:r}),y=pe(e.id);ve.set(t,{keyboardDelegate:x,actions:{onRowAction:c,onCellAction:d},shouldSelectOnPressUp:p});let $=hu({selectionManager:s,hasItemActions:!!(c||d)}),f=Hl(e,{labelable:!0}),E=B.useCallback(C=>{if(s.isFocused){C.currentTarget.contains(C.target)||s.setFocused(!1);return}C.currentTarget.contains(C.target)&&s.setFocused(!0)},[s]),S=B.useMemo(()=>({onBlur:D.onBlur,onFocus:E}),[E,D.onBlur]),A=au(l,{isDisabled:t.collection.size!==0}),k=J(f,{role:"grid",id:y,"aria-multiselectable":s.selectionMode==="multiple"?"true":void 0},t.isKeyboardNavigationDisabled?S:D,t.collection.size===0&&{tabIndex:A?-1:0}||void 0,$);return u&&(k["aria-rowcount"]=t.collection.size,k["aria-colcount"]=t.collection.columnCount),bu({getRowText:m},t),{gridProps:k}}function gu(){return{rowGroupProps:{role:"rowgroup"}}}function $u(e,t,l){var u,o;let{node:n,isVirtualized:i,shouldSelectOnPressUp:a,onAction:m}=e,{actions:c,shouldSelectOnPressUp:d}=ve.get(t),r=c.onRowAction?()=>{var g;return(g=c.onRowAction)===null||g===void 0?void 0:g.call(c,n.key)}:m,{itemProps:p,...s}=je({selectionManager:t.selectionManager,key:n.key,ref:l,isVirtualized:i,shouldSelectOnPressUp:d||a,onAction:r||!(n==null||(u=n.props)===null||u===void 0)&&u.onAction?Ll(n==null||(o=n.props)===null||o===void 0?void 0:o.onAction,r):void 0,isDisabled:t.collection.size===0}),b=t.selectionManager.isSelected(n.key),v={role:"row","aria-selected":t.selectionManager.selectionMode!=="none"?b:void 0,"aria-disabled":s.isDisabled||void 0,...p};return i&&(v["aria-rowindex"]=n.index+1),{rowProps:v,...s}}function ul(e,t,l){let{node:u,isVirtualized:o,focusMode:n="child",shouldSelectOnPressUp:i,onAction:a}=e,{direction:m}=ue(),{keyboardDelegate:c,actions:{onCellAction:d}}=ve.get(t),r=B.useRef(null),p=()=>{if(l.current){let y=ae(l.current);if(n==="child"){if(l.current.contains(document.activeElement)&&l.current!==document.activeElement)return;let $=t.selectionManager.childFocusStrategy==="last"?re(y):y.firstChild();if($){L($);return}}(r.current!=null&&u.key!==r.current||!l.current.contains(document.activeElement))&&L(l.current)}},{itemProps:s,isPressed:b}=je({selectionManager:t.selectionManager,key:u.key,ref:l,isVirtualized:o,focus:p,shouldSelectOnPressUp:i,onAction:d?()=>d(u.key):a,isDisabled:t.collection.size===0}),v=y=>{if(!y.currentTarget.contains(y.target)||t.isKeyboardNavigationDisabled||!l.current||!document.activeElement)return;let $=ae(l.current);switch($.currentNode=document.activeElement,y.key){case"ArrowLeft":{let C=m==="rtl"?$.nextNode():$.previousNode();if(n==="child"&&C===l.current&&(C=null),y.preventDefault(),y.stopPropagation(),C)L(C),Y(C,{containingElement:Z(l.current)});else{var f;if(((f=c.getKeyLeftOf)===null||f===void 0?void 0:f.call(c,u.key))!==u.key){var E;(E=l.current.parentElement)===null||E===void 0||E.dispatchEvent(new KeyboardEvent(y.nativeEvent.type,y.nativeEvent));break}n==="cell"&&m==="rtl"?(L(l.current),Y(l.current,{containingElement:Z(l.current)})):($.currentNode=l.current,C=m==="rtl"?$.firstChild():re($),C&&(L(C),Y(C,{containingElement:Z(l.current)})))}break}case"ArrowRight":{let C=m==="rtl"?$.previousNode():$.nextNode();if(n==="child"&&C===l.current&&(C=null),y.preventDefault(),y.stopPropagation(),C)L(C),Y(C,{containingElement:Z(l.current)});else{var S;if(((S=c.getKeyRightOf)===null||S===void 0?void 0:S.call(c,u.key))!==u.key){var A;(A=l.current.parentElement)===null||A===void 0||A.dispatchEvent(new KeyboardEvent(y.nativeEvent.type,y.nativeEvent));break}n==="cell"&&m==="ltr"?(L(l.current),Y(l.current,{containingElement:Z(l.current)})):($.currentNode=l.current,C=m==="rtl"?re($):$.firstChild(),C&&(L(C),Y(C,{containingElement:Z(l.current)})))}break}case"ArrowUp":case"ArrowDown":if(!y.altKey&&l.current.contains(y.target)){var k;y.stopPropagation(),y.preventDefault(),(k=l.current.parentElement)===null||k===void 0||k.dispatchEvent(new KeyboardEvent(y.nativeEvent.type,y.nativeEvent))}break}},g=y=>{if(r.current=u.key,y.target!==l.current){Ul()||t.selectionManager.setFocusedKey(u.key);return}requestAnimationFrame(()=>{n==="child"&&document.activeElement===l.current&&p()})},x=J(s,{role:"gridcell",onKeyDownCapture:v,"aria-colspan":u.colSpan,"aria-colindex":u.colIndex!=null?u.colIndex+1:void 0,colSpan:o?void 0:u.colSpan,onFocus:g});var D;return o&&(x["aria-colindex"]=((D=u.colIndex)!==null&&D!==void 0?D:u.index)+1),i&&x.tabIndex!=null&&x.onPointerDown==null&&(x.onPointerDown=y=>{let $=y.currentTarget,f=$.getAttribute("tabindex");$.removeAttribute("tabindex"),requestAnimationFrame(()=>{f!=null&&$.setAttribute("tabindex",f)})}),{gridCellProps:x,isPressed:b}}function re(e){let t=null,l=null;do l=e.lastChild(),l&&(t=l);while(l);return t}function yu(e){return e&&e.__esModule?e.default:e}function xu(e,t){let{key:l}=e,u=t.selectionManager,o=pe(),n=!t.selectionManager.canSelectItem(l),i=t.selectionManager.isSelected(l),a=()=>u.toggleSelection(l);const m=_(yu(oe),"@react-aria/grid");return{checkboxProps:{id:o,"aria-label":m.format("select"),isSelected:i,isDisabled:n,onChange:a}}}class Cu extends yt{isCell(t){return t.type==="cell"||t.type==="rowheader"||t.type==="column"}getKeyBelow(t){let l=this.collection.getItem(t);if(!l)return null;if(l.type==="column"){let u=U(z(l,this.collection));if(u)return u.key;let o=this.getFirstKey();return o==null||!this.collection.getItem(o)?null:super.getKeyForItemInRowByIndex(o,l.index)}return super.getKeyBelow(t)}getKeyAbove(t){let l=this.collection.getItem(t);if(!l)return null;if(l.type==="column"){let n=l.parentKey!=null?this.collection.getItem(l.parentKey):null;return n&&n.type==="column"?n.key:null}let u=super.getKeyAbove(t),o=u!=null?this.collection.getItem(u):null;return o&&o.type!=="headerrow"?u:this.isCell(l)?this.collection.columns[l.index].key:this.collection.columns[0].key}findNextColumnKey(t){let l=this.findNextKey(t.key,o=>o.type==="column");if(l!=null)return l;let u=this.collection.headerRows[t.level];for(let o of z(u,this.collection))if(o.type==="column")return o.key;return null}findPreviousColumnKey(t){let l=this.findPreviousKey(t.key,n=>n.type==="column");if(l!=null)return l;let u=this.collection.headerRows[t.level],o=[...z(u,this.collection)];for(let n=o.length-1;n>=0;n--){let i=o[n];if(i.type==="column")return i.key}return null}getKeyRightOf(t){let l=this.collection.getItem(t);return l?l.type==="column"?this.direction==="rtl"?this.findPreviousColumnKey(l):this.findNextColumnKey(l):super.getKeyRightOf(t):null}getKeyLeftOf(t){let l=this.collection.getItem(t);return l?l.type==="column"?this.direction==="rtl"?this.findNextColumnKey(l):this.findPreviousColumnKey(l):super.getKeyLeftOf(t):null}getKeyForSearch(t,l){if(!this.collator)return null;let u=this.collection,o=l??this.getFirstKey();if(o==null)return null;let n=u.getItem(o);var i;n?.type==="cell"&&(o=(i=n.parentKey)!==null&&i!==void 0?i:null);let a=!1;for(;o!=null;){let m=u.getItem(o);if(!m)return null;if(m.textValue){let c=m.textValue.slice(0,t.length);if(this.collator.compare(c,t)===0)return m.key}for(let c of z(m,this.collection)){let d=u.columns[c.index];if(u.rowHeaderColumnKeys.has(d.key)&&c.textValue){let r=c.textValue.slice(0,t.length);if(this.collator.compare(r,t)===0){let p=l!=null?u.getItem(l):n;return p?.type==="cell"?c.key:m.key}}}o=this.getKeyBelow(o),o==null&&!a&&(o=this.getFirstKey(),a=!0)}return null}}function Du(e){return e&&e.__esModule?e.default:e}function Bu(e,t,l){let{keyboardDelegate:u,isVirtualized:o,layoutDelegate:n,layout:i}=e,a=ze({usage:"search",sensitivity:"base"}),{direction:m}=ue(),c=t.selectionManager.disabledBehavior,d=B.useMemo(()=>u||new Cu({collection:t.collection,disabledKeys:t.disabledKeys,disabledBehavior:c,ref:l,direction:m,collator:a,layoutDelegate:n,layout:i}),[u,t.collection,t.disabledKeys,c,l,m,a,n,i]),r=pe(e.id);he.set(t,r);let{gridProps:p}=vu({...e,id:r,keyboardDelegate:d},t,l);o&&(p["aria-rowcount"]=t.collection.size+t.collection.headerRows.length),le()&&"expandedKeys"in t&&(p.role="treegrid");let{column:s,direction:b}=t.sortDescriptor||{},v=_(Du(ne),"@react-aria/table"),g=B.useMemo(()=>{var D,y;let $=(y=(D=t.collection.columns.find(f=>f.key===s))===null||D===void 0?void 0:D.textValue)!==null&&y!==void 0?y:"";return b&&s?v.format(`${b}Sort`,{columnName:$}):void 0},[b,s,t.collection.columns]),x=fe(g);return Me(()=>{g&&ll(g,"assertive",500)},[g]),{gridProps:J(p,x,{"aria-describedby":[x["aria-describedby"],p["aria-describedby"]].filter(Boolean).join(" ")})}}function ku(e){return e&&e.__esModule?e.default:e}function nl(e,t,l){var u,o;let{node:n}=e,i=n.props.allowsSorting,{gridCellProps:a}=ul({...e,focusMode:"child"},t,l),m=n.props.isSelectionCell&&t.selectionManager.selectionMode==="single",{pressProps:c}=Wl({isDisabled:!i||m,onPress(){t.sort(n.key)},ref:l}),{focusableProps:d}=Gl({},l),r,p=((u=t.sortDescriptor)===null||u===void 0?void 0:u.column)===n.key,s=(o=t.sortDescriptor)===null||o===void 0?void 0:o.direction;n.props.allowsSorting&&!Ce()&&(r=p?s:"none");let b=_(ku(ne),"@react-aria/table"),v;i&&(v=`${b.format("sortable")}`,p&&s&&Ce()&&(v=`${v}, ${b.format(s)}`));let g=fe(v),x=t.collection.size===0;return B.useEffect(()=>{x&&t.selectionManager.focusedKey===n.key&&t.selectionManager.setFocusedKey(null)},[x,t.selectionManager,n.key]),{columnHeaderProps:{...J(d,a,c,g,x?{tabIndex:-1}:null),role:"columnheader",id:cu(t,n.key),"aria-colspan":n.colSpan&&n.colSpan>1?n.colSpan:void 0,"aria-sort":r}}}const Se={expand:{ltr:"ArrowRight",rtl:"ArrowLeft"},collapse:{ltr:"ArrowLeft",rtl:"ArrowRight"}};function Eu(e,t,l){let{node:u,isVirtualized:o}=e,{rowProps:n,...i}=$u(e,t,l),{direction:a}=ue();o&&!(le()&&"expandedKeys"in t)?n["aria-rowindex"]=u.index+1+t.collection.headerRows.length:delete n["aria-rowindex"];let m={};if(le()&&"expandedKeys"in t){let f=t.keyMap.get(u.key);if(f!=null){var c,d,r,p,s,b;let E=((c=f.props)===null||c===void 0?void 0:c.UNSTABLE_childItems)||((r=f.props)===null||r===void 0||(d=r.children)===null||d===void 0?void 0:d.length)>t.userColumnCount;var v,g,x,D;m={onKeyDown:S=>{(S.key===Se.expand[a]&&t.selectionManager.focusedKey===f.key&&E&&t.expandedKeys!=="all"&&!t.expandedKeys.has(f.key)||S.key===Se.collapse[a]&&t.selectionManager.focusedKey===f.key&&E&&(t.expandedKeys==="all"||t.expandedKeys.has(f.key)))&&(t.toggleKey(f.key),S.stopPropagation())},"aria-expanded":E?t.expandedKeys==="all"||t.expandedKeys.has(u.key):void 0,"aria-level":f.level,"aria-posinset":((v=f.indexOfType)!==null&&v!==void 0?v:0)+1,"aria-setsize":f.level>1?((x=(p=W((g=(s=t.keyMap.get(f.parentKey))===null||s===void 0?void 0:s.childNodes)!==null&&g!==void 0?g:[]))===null||p===void 0?void 0:p.indexOfType)!==null&&x!==void 0?x:0)+1:((D=(b=W(t.collection.body.childNodes))===null||b===void 0?void 0:b.indexOfType)!==null&&D!==void 0?D:0)+1}}}let y=Yl(u.props),$=i.hasAction?y:{};return{rowProps:{...J(n,m,$),"aria-labelledby":Re(t,u.key)},...i}}function Su(e,t,l){let{node:u,isVirtualized:o}=e,n={role:"row"};return o&&!(le()&&"expandedKeys"in t)&&(n["aria-rowindex"]=u.index+1),{rowProps:n}}function ol(e,t,l){var u;let{gridCellProps:o,isPressed:n}=ul(e,t,l),i=(u=e.node.column)===null||u===void 0?void 0:u.key;return i!=null&&t.collection.rowHeaderColumnKeys.has(i)&&(o.role="rowheader",o.id=Te(t,e.node.parentKey,i)),{gridCellProps:o,isPressed:n}}function Au(e){return e&&e.__esModule?e.default:e}function wu(e,t){let{key:l}=e;const{checkboxProps:u}=xu(e,t);return{checkboxProps:{...u,"aria-labelledby":`${u.id} ${Re(t,l)}`}}}function Nu(e){let{isEmpty:t,isSelectAll:l,selectionMode:u}=e.selectionManager;return{checkboxProps:{"aria-label":_(Au(ne),"@react-aria/table").format(u==="single"?"select":"selectAll"),isSelected:l,isDisabled:u!=="multiple"||e.collection.size===0||e.collection.rows.length===1&&e.collection.rows[0].type==="loader",isIndeterminate:!t&&!l,onChange:()=>e.selectionManager.toggleSelectAll()}}}function ge(){return gu()}var sl=T((e,t)=>{var l,u;const{as:o,className:n,node:i,slots:a,state:m,selectionMode:c,color:d,checkboxesProps:r,disableAnimation:p,classNames:s,...b}=e,v=o||"th",g=typeof v=="string",x=M(t),{columnHeaderProps:D}=nl({node:i},m,x),{isFocusVisible:y,focusProps:$}=X(),{checkboxProps:f}=Nu(m),E=K(s?.th,n,(l=i.props)==null?void 0:l.className),S=c==="single",{onChange:A,...k}=f;return h.jsx(v,{ref:x,"data-focus-visible":w(y),...I(D,$,O(i.props,{enabled:g}),O(b,{enabled:g})),className:(u=a.th)==null?void 0:u.call(a,{class:E}),children:S?h.jsx(be,{children:f["aria-label"]}):h.jsx(Fe,{color:d,disableAnimation:p,onValueChange:A,...I(r,k)})})});sl.displayName="HeroUI.TableSelectAllCheckbox";var il=sl;function zu(e){let{collection:t,focusMode:l}=e,u=e.UNSAFE_selectionState||Zl(e),o=B.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),n=u.setFocusedKey;u.setFocusedKey=(m,c)=>{if(l==="cell"&&m!=null){let b=t.getItem(m);if(b?.type==="item"){var d,r;let v=z(b,t);var p,s;c==="last"?m=(p=(d=W(v))===null||d===void 0?void 0:d.key)!==null&&p!==void 0?p:null:m=(s=(r=U(v))===null||r===void 0?void 0:r.key)!==null&&s!==void 0?s:null}}n(m,c)};let i=B.useMemo(()=>new _l(t,u),[t,u]);const a=B.useRef(null);return B.useEffect(()=>{if(u.focusedKey!=null&&a.current&&!t.getItem(u.focusedKey)){const m=a.current.getItem(u.focusedKey),c=m?.parentKey!=null&&(m.type==="cell"||m.type==="rowheader"||m.type==="column")?a.current.getItem(m.parentKey):m;if(!c){u.setFocusedKey(null);return}const d=a.current.rows,r=t.rows,p=d.length-r.length;let s=Math.min(p>1?Math.max(c.index-p+1,0):c.index,r.length-1),b=null;for(;s>=0;){if(!i.isDisabled(r[s].key)&&r[s].type!=="headerrow"){b=r[s];break}sc.index&&(s=c.index),s--)}if(b){const v=b.hasChildNodes?[...z(b,t)]:[],g=b.hasChildNodes&&c!==m&&m&&m.index{let p=this.keyMap.get(r.key);t.visitNode&&(r=t.visitNode(r)),this.keyMap.set(r.key,r);let s=new Set,b=null,v=!1;if(r.type==="item"){var g;for(let f of r.childNodes)if(((g=f.props)===null||g===void 0?void 0:g.colSpan)!==void 0){v=!0;break}}for(let f of r.childNodes){if(f.type==="cell"&&v){var x,D;f.colspan=(x=f.props)===null||x===void 0?void 0:x.colSpan,f.colSpan=(D=f.props)===null||D===void 0?void 0:D.colSpan;var y,$;f.colIndex=b?((y=b.colIndex)!==null&&y!==void 0?y:b.index)+(($=b.colSpan)!==null&&$!==void 0?$:1):f.index}f.type==="cell"&&f.parentKey==null&&(f.parentKey=r.key),s.add(f.key),b?(b.nextKey=f.key,f.prevKey=b.key):f.prevKey=null,l(f),b=f}if(b&&(b.nextKey=null),p)for(let f of p.childNodes)s.has(f.key)||u(f)},u=r=>{this.keyMap.delete(r.key);for(let p of r.childNodes)this.keyMap.get(p.key)===p&&u(p)},o=null;for(let[r,p]of t.items.entries()){var n,i,a,m,c,d;let s={...p,level:(n=p.level)!==null&&n!==void 0?n:0,key:(i=p.key)!==null&&i!==void 0?i:"row-"+r,type:(a=p.type)!==null&&a!==void 0?a:"row",value:(m=p.value)!==null&&m!==void 0?m:null,hasChildNodes:!0,childNodes:[...p.childNodes],rendered:p.rendered,textValue:(c=p.textValue)!==null&&c!==void 0?c:"",index:(d=p.index)!==null&&d!==void 0?d:r};o?(o.nextKey=s.key,s.prevKey=o.key):s.prevKey=null,this.rows.push(s),l(s),o=s}o&&(o.nextKey=null)}}const rl="row-header-column-"+Math.random().toString(36).slice(2);let de="row-header-column-"+Math.random().toString(36).slice(2);for(;rl===de;)de="row-header-column-"+Math.random().toString(36).slice(2);function Pu(e,t){if(t.length===0)return[];let l=[],u=new Map;for(let d of t){let r=d.parentKey,p=[d];for(;r;){let s=e.get(r);if(!s)break;if(u.has(s)){var o,n;(n=(o=s).colSpan)!==null&&n!==void 0||(o.colSpan=0),s.colSpan++,s.colspan=s.colSpan;let{column:b,index:v}=u.get(s);if(v>p.length)break;for(let g=v;gd.length)),a=Array(i).fill(0).map(()=>[]),m=0;for(let d of l){let r=i-1;for(let p of d){if(p){let s=a[r],b=s.reduce((v,g)=>{var x;return v+((x=g.colSpan)!==null&&x!==void 0?x:1)},0);if(b0&&(s[s.length-1].nextKey=v.key,v.prevKey=s[s.length-1].key),s.push(v)}s.length>0&&(s[s.length-1].nextKey=p.key,p.prevKey=s[s.length-1].key),p.level=r,p.colIndex=m,s.push(p)}r--}m++}let c=0;for(let d of a){let r=d.reduce((p,s)=>{var b;return p+((b=s.colSpan)!==null&&b!==void 0?b:1)},0);if(r({type:"headerrow",key:"headerrow-"+r,index:r,value:null,rendered:null,level:0,hasChildNodes:!0,childNodes:d,textValue:""}))}class Ku extends Fu{*[Symbol.iterator](){yield*this.body.childNodes}get size(){return this._size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let l=this.keyMap.get(t);var u;return(u=l?.prevKey)!==null&&u!==void 0?u:null}getKeyAfter(t){let l=this.keyMap.get(t);var u;return(u=l?.nextKey)!==null&&u!==void 0?u:null}getFirstKey(){var t,l;return(l=(t=U(this.body.childNodes))===null||t===void 0?void 0:t.key)!==null&&l!==void 0?l:null}getLastKey(){var t,l;return(l=(t=W(this.body.childNodes))===null||t===void 0?void 0:t.key)!==null&&l!==void 0?l:null}getItem(t){var l;return(l=this.keyMap.get(t))!==null&&l!==void 0?l:null}at(t){const l=[...this.getKeys()];return this.getItem(l[t])}getChildren(t){return t===this.body.key?this.body.childNodes:super.getChildren(t)}getTextValue(t){let l=this.getItem(t);if(!l)return"";if(l.textValue)return l.textValue;let u=this.rowHeaderColumnKeys;if(u){let o=[];for(let n of l.childNodes){let i=this.columns[n.index];if(u.has(i.key)&&n.textValue&&o.push(n.textValue),o.length===u.size)break}return o.join(" ")}return""}constructor(t,l,u){let o=new Set,n=null,i=[];if(u?.showSelectionCheckboxes){let r={type:"column",key:rl,value:null,textValue:"",level:0,index:u?.showDragButtons?1:0,hasChildNodes:!1,rendered:null,childNodes:[],props:{isSelectionCell:!0}};i.unshift(r)}if(u?.showDragButtons){let r={type:"column",key:de,value:null,textValue:"",level:0,index:0,hasChildNodes:!1,rendered:null,childNodes:[],props:{isDragButtonCell:!0}};i.unshift(r)}let a=[],m=new Map,c=r=>{switch(r.type){case"body":n=r;break;case"column":m.set(r.key,r),r.hasChildNodes||(i.push(r),r.props.isRowHeader&&o.add(r.key));break;case"item":a.push(r);return}for(let p of r.childNodes)c(p)};for(let r of t)c(r);let d=Pu(m,i);if(d.forEach((r,p)=>a.splice(p,0,r)),super({columnCount:i.length,items:a,visitNode:r=>(r.column=i[r.index],r)}),this._size=0,this.columns=i,this.rowHeaderColumnKeys=o,this.body=n,this.headerRows=d,this._size=[...n.childNodes].length,this.rowHeaderColumnKeys.size===0){let r=this.columns.find(p=>{var s,b;return!(!((s=p.props)===null||s===void 0)&&s.isDragButtonCell)&&!(!((b=p.props)===null||b===void 0)&&b.isSelectionCell)});r&&this.rowHeaderColumnKeys.add(r.key)}}}const Iu={ascending:"descending",descending:"ascending"};function ju(e){let[t,l]=B.useState(!1),{selectionMode:u="none",showSelectionCheckboxes:o,showDragButtons:n}=e,i=B.useMemo(()=>({showSelectionCheckboxes:o&&u!=="none",showDragButtons:n,selectionMode:u,columns:[]}),[e.children,o,u,n]),a=ql(e,B.useCallback(r=>new Ku(r,null,i),[i]),i),{disabledKeys:m,selectionManager:c}=zu({...e,collection:a,disabledBehavior:e.disabledBehavior||"selection"});var d;return{collection:a,disabledKeys:m,selectionManager:c,showSelectionCheckboxes:e.showSelectionCheckboxes||!1,sortDescriptor:(d=e.sortDescriptor)!==null&&d!==void 0?d:null,isKeyboardNavigationDisabled:a.size===0||t,setKeyboardNavigationDisabled:l,sort(r,p){var s,b;(b=e.onSortChange)===null||b===void 0||b.call(e,{column:r,direction:p??(((s=e.sortDescriptor)===null||s===void 0?void 0:s.column)===r?Iu[e.sortDescriptor.direction]:"ascending")})}}}function al(e){return null}al.getCollectionNode=function*(t,l){let{children:u,columns:o}=t;if(l.columns=[],typeof u=="function"){if(!o)throw new Error("props.children was a function but props.columns is missing");for(let n of o)yield{type:"column",value:n,renderer:u}}else{let n=[];q.Children.forEach(u,i=>{n.push({type:"column",element:i})}),yield*n}};let Mu=al;function cl(e){return null}cl.getCollectionNode=function*(t){let{children:l,items:u}=t;yield{type:"body",hasChildNodes:!0,props:t,*childNodes(){if(typeof l=="function"){if(!u)throw new Error("props.children was a function but props.items is missing");for(let o of u)yield{type:"item",value:o,renderer:l}}else{let o=[];q.Children.forEach(l,n=>{o.push({type:"item",element:n})}),yield*o}}}};let Tu=cl;function dl(e){return null}dl.getCollectionNode=function*(t,l){let{title:u,children:o,childColumns:n}=t,i=u||o,a=t.textValue||(typeof i=="string"?i:"")||t["aria-label"],m=yield{type:"column",hasChildNodes:!!n||!!u&&q.Children.count(o)>0,rendered:i,textValue:a,props:t,*childNodes(){if(n)for(let d of n)yield{type:"column",value:d};else if(u){let d=[];q.Children.forEach(o,r=>{d.push({type:"column",element:r})}),yield*d}},shouldInvalidate(d){return c(d),!1}},c=d=>{for(let r of m)r.hasChildNodes||d.columns.push(r)};c(l)};let Ru=dl;function me(e){return null}me.getCollectionNode=function*(t,l){let{children:u,textValue:o,UNSTABLE_childItems:n}=t;yield{type:"item",props:t,textValue:o,"aria-label":t["aria-label"],hasChildNodes:!0,*childNodes(){if(l.showDragButtons&&(yield{type:"cell",key:"header-drag",props:{isDragButtonCell:!0}}),l.showSelectionCheckboxes&&l.selectionMode!=="none"&&(yield{type:"cell",key:"header",props:{isSelectionCell:!0}}),typeof u=="function"){for(let i of l.columns)yield{type:"cell",element:u(i.key),key:i.key};if(n)for(let i of n)yield{type:"item",value:i}}else{let i=[],a=[],m=0;if(q.Children.forEach(u,c=>{if(c.type===me){if(i.lengtha.key!==l.columns[m].key)||i.showSelectionCheckboxes!==l.showSelectionCheckboxes||i.showDragButtons!==l.showDragButtons||i.selectionMode!==l.selectionMode}}};let Vu=me;function ml(e){return null}ml.getCollectionNode=function*(t){let{children:l}=t,u=t.textValue||(typeof l=="string"?l:"")||t["aria-label"]||"";yield{type:"cell",props:t,rendered:l,textValue:u,"aria-label":t["aria-label"],hasChildNodes:!1}};let Ou=ml;function pl(e){var t;const l=Jl(),[u,o]=Pe(e,ke.variantKeys),{ref:n,as:i,baseRef:a,children:m,className:c,classNames:d,removeWrapper:r=!1,disableAnimation:p=(t=l?.disableAnimation)!=null?t:!1,isKeyboardNavigationDisabled:s=!1,selectionMode:b="none",topContentPlacement:v="inside",bottomContentPlacement:g="inside",selectionBehavior:x=b==="none"?null:"toggle",disabledBehavior:D="selection",showSelectionCheckboxes:y=b==="multiple"&&x!=="replace",BaseComponent:$="div",checkboxesProps:f,topContent:E,bottomContent:S,sortIcon:A,onRowAction:k,onCellAction:C,...N}=u,j=i||"table",F=typeof j=="string",R=M(n),Q=M(a),G=ju({...e,children:m,showSelectionCheckboxes:y});s&&!G.isKeyboardNavigationDisabled&&G.setKeyboardNavigationDisabled(!0);const{collection:se}=G,{layout:sn,...Fl}=e,{gridProps:$e}=Bu({...Fl},G,R),ee=b!=="none",ye=b==="multiple",H=B.useMemo(()=>ke({...o,isSelectable:ee,isMultiSelectable:ye}),[Ke(o),ee,ye]),xe=K(d?.base,c),Pl=B.useMemo(()=>{var P;return{state:G,slots:H,isSelectable:ee,collection:se,classNames:d,color:e?.color,disableAnimation:p,checkboxesProps:f,isHeaderSticky:(P=e?.isHeaderSticky)!=null?P:!1,selectionMode:b,selectionBehavior:x,disabledBehavior:D,showSelectionCheckboxes:y,onRowAction:k,onCellAction:C}},[H,G,se,ee,d,b,x,f,D,p,y,e?.color,e?.isHeaderSticky,k,C]),Kl=B.useCallback(P=>({...P,ref:Q,className:H.base({class:K(xe,P?.className)})}),[xe,H]),Il=B.useCallback(P=>({...P,ref:Q,className:H.wrapper({class:K(d?.wrapper,P?.className)})}),[d?.wrapper,H]),jl=B.useCallback(P=>({...I($e,O(N,{enabled:F}),P),onKeyDownCapture:void 0,ref:R,className:H.table({class:K(d?.table,P?.className)})}),[d?.table,F,H,$e,N]);return{BaseComponent:$,Component:j,children:m,state:G,collection:se,values:Pl,topContent:E,bottomContent:S,removeWrapper:r,topContentPlacement:v,bottomContentPlacement:g,sortIcon:A,getBaseProps:Kl,getWrapperProps:Il,getTableProps:jl}}var bl=T((e,t)=>{var l,u,o;const{as:n,className:i,node:a,rowKey:m,slots:c,state:d,classNames:r,...p}=e,s=n||"td",b=typeof s=="string",v=M(t),{gridCellProps:g}=ol({node:a},d,v),x=K(r?.td,i,(l=a.props)==null?void 0:l.className),{isFocusVisible:D,focusProps:y}=X(),$=d.selectionManager.isSelected(m),f=B.useMemo(()=>{const S=typeof a.rendered;return S!=="object"&&S!=="function"?h.jsx("span",{children:a.rendered}):a.rendered},[a.rendered]),E=((u=a.column)==null?void 0:u.props)||{};return h.jsx(s,{ref:v,"data-focus-visible":w(D),"data-selected":w($),...I(g,y,O(a.props,{enabled:b}),p),className:(o=c.td)==null?void 0:o.call(c,{align:E.align,class:x}),children:f})});bl.displayName="HeroUI.TableCell";var fl=bl,hl=T((e,t)=>{var l,u;const{as:o,className:n,node:i,rowKey:a,slots:m,state:c,color:d,disableAnimation:r,checkboxesProps:p,selectionMode:s,classNames:b,...v}=e,g=o||"td",x=typeof g=="string",D=M(t),{gridCellProps:y}=ol({node:i},c,D),{isFocusVisible:$,focusProps:f}=X(),{checkboxProps:E}=wu({key:i?.parentKey||i.key},c),S=K(b?.td,n,(l=i.props)==null?void 0:l.className),A=s==="single",{onChange:k,...C}=E,N=c.selectionManager.isSelected(a);return h.jsx(g,{ref:D,"data-focus-visible":w($),"data-selected":w(N),...I(y,f,O(i.props,{enabled:x}),v),className:(u=m.td)==null?void 0:u.call(m,{class:S}),children:A?h.jsx(be,{children:E["aria-label"]}):h.jsx(Fe,{color:d,disableAnimation:r,onValueChange:k,...I(p,C)})})});hl.displayName="HeroUI.TableCheckboxCell";var vl=hl,gl=T((e,t)=>{var l,u;const{as:o,className:n,children:i,node:a,slots:m,state:c,isSelectable:d,classNames:r,...p}=e,s=o||(e?.href?"a":"tr"),b=typeof s=="string",v=M(t),{rowProps:g}=Eu({node:a},c,v),x=K(r?.tr,n,(l=a.props)==null?void 0:l.className),{isFocusVisible:D,focusProps:y}=X(),$=c.disabledKeys.has(a.key),f=c.selectionManager.isSelected(a.key),{isHovered:E,hoverProps:S}=Ie({isDisabled:$}),{isFirst:A,isLast:k,isMiddle:C,isOdd:N}=B.useMemo(()=>{const j=a.key===c.collection.getFirstKey(),F=a.key===c.collection.getLastKey(),R=!j&&!F,Q=a?.index?(a.index+1)%2===0:!1;return{isFirst:j,isLast:F,isMiddle:R,isOdd:Q}},[a,c.collection]);return h.jsx(s,{ref:v,"data-disabled":w($),"data-first":w(A),"data-focus-visible":w(D),"data-hover":w(E),"data-last":w(k),"data-middle":w(C),"data-odd":w(N),"data-selected":w(f),...I(g,y,d?S:{},O(a.props,{enabled:b}),p),className:(u=m.tr)==null?void 0:u.call(m,{class:x}),children:i})});gl.displayName="HeroUI.TableRow";var $l=gl,yl=T((e,t)=>{var l;const{as:u,className:o,slots:n,state:i,collection:a,isSelectable:m,color:c,disableAnimation:d,checkboxesProps:r,selectionMode:p,classNames:s,rowVirtualizer:b,...v}=e,g=u||"tbody",x=typeof g=="string",D=M(t),{rowGroupProps:y}=ge(),$=K(s?.tbody,o),f=a?.body.props,E=f?.isLoading||f?.loadingState==="loading"||f?.loadingState==="loadingMore",S=[...a.body.childNodes],A=b.getVirtualItems();let k,C;return a.size===0&&f.emptyContent&&(k=h.jsx("tr",{role:"row",children:h.jsx("td",{className:n?.emptyWrapper({class:s?.emptyWrapper}),colSpan:a.columnCount,role:"gridcell",children:!E&&f.emptyContent})})),E&&f.loadingContent&&(C=h.jsxs("tr",{role:"row",children:[h.jsx("td",{className:n?.loadingWrapper({class:s?.loadingWrapper}),colSpan:a.columnCount,role:"gridcell",children:f.loadingContent}),!k&&a.size===0?h.jsx("td",{className:n?.emptyWrapper({class:s?.emptyWrapper})}):null]})),h.jsxs(g,{ref:D,...I(y,O(f,{enabled:x}),v),className:(l=n.tbody)==null?void 0:l.call(n,{class:$}),"data-empty":w(a.size===0),"data-loading":w(E),children:[A.map((N,j)=>{const F=S[N.index];return F?h.jsx($l,{classNames:s,isSelectable:m,node:F,slots:n,state:i,style:{transform:`translateY(${N.start-j*N.size}px)`,height:`${N.size}px`},children:[...F.childNodes].map(R=>R.props.isSelectionCell?h.jsx(vl,{checkboxesProps:r,classNames:s,color:c,disableAnimation:d,node:R,rowKey:F.key,selectionMode:p,slots:n,state:i},String(R.key)):h.jsx(fl,{classNames:s,node:R,rowKey:F.key,slots:n,state:i},String(R.key)))},String(F.key)):null}),C,k]})});yl.displayName="HeroUI.VirtualizedTableBody";var Hu=yl,xl=T((e,t)=>{var l,u,o,n,i;const{as:a,className:m,state:c,node:d,slots:r,classNames:p,sortIcon:s,...b}=e,v=a||"th",g=typeof v=="string",x=M(t),{columnHeaderProps:D}=nl({node:d},c,x),y=K(p?.th,m,(l=d.props)==null?void 0:l.className),{isFocusVisible:$,focusProps:f}=X(),{isHovered:E,hoverProps:S}=Ie({}),{hideHeader:A,align:k,...C}=d.props,N=C.allowsSorting,j={"aria-hidden":!0,"data-direction":(u=c.sortDescriptor)==null?void 0:u.direction,"data-visible":w(((o=c.sortDescriptor)==null?void 0:o.column)===d.key),className:(n=r.sortIcon)==null?void 0:n.call(r,{class:p?.sortIcon})},F=typeof s=="function"?s(j):B.isValidElement(s)&&B.cloneElement(s,j);return h.jsxs(v,{ref:x,colSpan:d.colspan,"data-focus-visible":w($),"data-hover":w(E),"data-sortable":w(N),...I(D,f,O(C,{enabled:g}),N?S:{},b),className:(i=r.th)==null?void 0:i.call(r,{align:k,class:y}),children:[A?h.jsx(be,{children:d.rendered}):d.rendered,N&&(F||h.jsx(su,{strokeWidth:3,...j}))]})});xl.displayName="HeroUI.TableColumnHeader";var Cl=xl,Dl=T((e,t)=>{var l,u;const{as:o,className:n,children:i,node:a,slots:m,classNames:c,state:d,...r}=e,p=o||"tr",s=typeof p=="string",b=M(t),{rowProps:v}=Su({node:a},d),g=K(c?.tr,n,(l=a.props)==null?void 0:l.className);return h.jsx(p,{ref:b,...I(v,O(a.props,{enabled:s}),r),className:(u=m.tr)==null?void 0:u.call(m,{class:g}),children:i})});Dl.displayName="HeroUI.TableHeaderRow";var Bl=Dl,kl=B.forwardRef((e,t)=>{var l;const{as:u,className:o,children:n,slots:i,classNames:a,...m}=e,c=u||"thead",d=M(t),{rowGroupProps:r}=ge(),p=K(a?.thead,o);return h.jsx(c,{ref:d,className:(l=i.thead)==null?void 0:l.call(i,{class:p}),...I(r,m),children:n})});kl.displayName="HeroUI.TableRowGroup";var El=kl,Lu={px:"1px",0:"0px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},Ae=e=>{var t;return(t=Lu[e])!=null?t:e};function Uu(e){const[t,l]=Pe(e,Be.variantKeys),{as:u,className:o,x:n=1,y:i=1,...a}=t,m=u||"span",c=B.useMemo(()=>Be({...l,className:o}),[Ke(l),o]),d=Ae(n),r=Ae(i);return{Component:m,getSpacerProps:(s={})=>({...s,...a,"aria-hidden":w(!0),className:K(c,s.className),style:{...s.style,...a.style,marginLeft:d,marginTop:r}})}}var Sl=T((e,t)=>{const{Component:l,getSpacerProps:u}=Uu({...e});return h.jsx(l,{ref:t,...u()})});Sl.displayName="HeroUI.Spacer";var Al=Sl,wl=T((e,t)=>{const{BaseComponent:l,Component:u,collection:o,values:n,topContent:i,topContentPlacement:a,bottomContentPlacement:m,bottomContent:c,getBaseProps:d,getWrapperProps:r,getTableProps:p}=pl({...e,ref:t}),{rowHeight:s=40,maxTableHeight:b=600}=e,v=B.useCallback(({children:A})=>h.jsx(l,{...r(),ref:D,style:{height:b,display:"block"},children:A}),[r,b]),x=[...o.body.childNodes].length,D=B.useRef(null),[y,$]=B.useState(0),f=B.useRef(null);B.useLayoutEffect(()=>{f.current&&$(f.current.getBoundingClientRect().height)},[f]);const E=iu({count:x,getScrollElement:()=>D.current,estimateSize:()=>s,overscan:5}),S=p();return h.jsxs("div",{...d(),children:[a==="outside"&&i,h.jsx(v,{children:h.jsxs(h.Fragment,{children:[a==="inside"&&i,h.jsxs(u,{...S,style:{height:`calc(${E.getTotalSize()+y}px)`,...S.style},children:[h.jsxs(El,{ref:f,classNames:n.classNames,slots:n.slots,children:[o.headerRows.map(A=>h.jsx(Bl,{classNames:n.classNames,node:A,slots:n.slots,state:n.state,children:[...A.childNodes].map(k=>{var C;return(C=k?.props)!=null&&C.isSelectionCell?h.jsx(il,{checkboxesProps:n.checkboxesProps,classNames:n.classNames,color:n.color,disableAnimation:n.disableAnimation,node:k,selectionMode:n.selectionMode,slots:n.slots,state:n.state},k?.key):h.jsx(Cl,{classNames:n.classNames,node:k,slots:n.slots,state:n.state},k?.key)})},A?.key)),h.jsx(Al,{as:"tr",tabIndex:-1,y:1})]}),h.jsx(Hu,{checkboxesProps:n.checkboxesProps,classNames:n.classNames,collection:n.collection,color:n.color,disableAnimation:n.disableAnimation,isSelectable:n.isSelectable,rowVirtualizer:E,selectionMode:n.selectionMode,slots:n.slots,state:n.state})]}),m==="inside"&&c]})}),m==="outside"&&c]})});wl.displayName="HeroUI.VirtualizedTable";var Wu=wl,Nl=T((e,t)=>{var l;const{as:u,className:o,slots:n,state:i,collection:a,isSelectable:m,color:c,disableAnimation:d,checkboxesProps:r,selectionMode:p,classNames:s,...b}=e,v=u||"tbody",g=typeof v=="string",x=M(t),{rowGroupProps:D}=ge(),y=K(s?.tbody,o),$=a?.body.props,f=$?.isLoading||$?.loadingState==="loading"||$?.loadingState==="loadingMore",E=B.useMemo(()=>[...a.body.childNodes].map(k=>h.jsx($l,{classNames:s,isSelectable:m,node:k,slots:n,state:i,children:[...k.childNodes].map(C=>C.props.isSelectionCell?h.jsx(vl,{checkboxesProps:r,classNames:s,color:c,disableAnimation:d,node:C,rowKey:k.key,selectionMode:p,slots:n,state:i},C.key):h.jsx(fl,{classNames:s,node:C,rowKey:k.key,slots:n,state:i},C.key))},k.key)),[a.body.childNodes,s,m,n,i]);let S,A;return a.size===0&&$.emptyContent&&(S=h.jsx("tr",{role:"row",children:h.jsx("td",{className:n?.emptyWrapper({class:s?.emptyWrapper}),colSpan:a.columnCount,role:"gridcell",children:!f&&$.emptyContent})})),f&&$.loadingContent&&(A=h.jsxs("tr",{role:"row",children:[h.jsx("td",{className:n?.loadingWrapper({class:s?.loadingWrapper}),colSpan:a.columnCount,role:"gridcell",children:$.loadingContent}),!S&&a.size===0?h.jsx("td",{className:n?.emptyWrapper({class:s?.emptyWrapper})}):null]})),h.jsxs(v,{ref:x,...I(D,O($,{enabled:g}),b),className:(l=n.tbody)==null?void 0:l.call(n,{class:y}),"data-empty":w(a.size===0),"data-loading":w(f),children:[E,A,S]})});Nl.displayName="HeroUI.TableBody";var Gu=Nl,zl=T((e,t)=>{const{BaseComponent:l,Component:u,collection:o,values:n,topContent:i,topContentPlacement:a,bottomContentPlacement:m,bottomContent:c,removeWrapper:d,sortIcon:r,getBaseProps:p,getWrapperProps:s,getTableProps:b}=pl({...e,ref:t}),{isVirtualized:v,rowHeight:g=40,maxTableHeight:x=600}=e,D=v,y=B.useCallback(({children:$})=>d?$:h.jsx(l,{...s(),children:$}),[d,s]);return D?h.jsx(Wu,{...e,ref:t,maxTableHeight:x,rowHeight:g}):h.jsxs("div",{...p(),children:[a==="outside"&&i,h.jsx(y,{children:h.jsxs(h.Fragment,{children:[a==="inside"&&i,h.jsxs(u,{...b(),children:[h.jsxs(El,{classNames:n.classNames,slots:n.slots,children:[o.headerRows.map($=>h.jsx(Bl,{classNames:n.classNames,node:$,slots:n.slots,state:n.state,children:[...$.childNodes].map(f=>{var E;return(E=f?.props)!=null&&E.isSelectionCell?h.jsx(il,{checkboxesProps:n.checkboxesProps,classNames:n.classNames,color:n.color,disableAnimation:n.disableAnimation,node:f,selectionMode:n.selectionMode,slots:n.slots,state:n.state},f?.key):h.jsx(Cl,{classNames:n.classNames,node:f,slots:n.slots,sortIcon:r,state:n.state},f?.key)})},$?.key)),h.jsx(Al,{as:"tr",tabIndex:-1,y:1})]}),h.jsx(Gu,{checkboxesProps:n.checkboxesProps,classNames:n.classNames,collection:n.collection,color:n.color,disableAnimation:n.disableAnimation,isSelectable:n.isSelectable,selectionMode:n.selectionMode,slots:n.slots,state:n.state})]}),m==="inside"&&c]})}),m==="outside"&&c]})});zl.displayName="HeroUI.Table";var Yu=zl,Zu=Ru,_u=Zu,qu=Mu,Ju=qu,Xu=Vu,Qu=Xu,en=Tu,tn=en,ln=Ou,un=ln;const nn={n_requests:"Number Of Requests",estimated_cost:"Estimated Cost ($)"},we=["model","n_requests","prompt_tokens","completion_tokens","total_tokens","estimated_cost"];function on(e){return e.replace(/(-?)(\d*)\.?(\d*)e([+-]\d+)/,function(t,l,u,o,n){return n<0?l+"0."+Array(1-n-u.length).join("0")+o+u:l+u+o+Array(n-o.length+1).join("0")})}function mn({usage:e}){const t=Object.keys(e),{isOpen:l,onOpen:u,onClose:o}=Xl(),n=()=>{o()},i=Object.keys(e[t[0]]),a=[...we.filter(s=>s==="model"||i.includes(s)),...i.filter(s=>!we.includes(s))],m=i.reduce((s,b)=>({...s,[b]:0}),{}),c=t.reduce((s,b)=>(a.reduce((v,g)=>(g==="model"||(v[g]+=e[b][g]),v),s),s),m),d=[...a.map(s=>({key:s,label:nn[s]??De.words(s).map(De.upperFirst).join(" ")}))],r=[...t.map(s=>({model:s,...e[s]})),{model:"Total",...c}],p=h.jsxs("div",{className:"p-2",children:[h.jsxs("div",{className:"flex flex-col gap-2",children:[c.prompt_tokens!==void 0&&h.jsxs("div",{className:"flex justify-between gap-2",children:[h.jsx("span",{className:"font-semibold",children:"Prompt tokens"}),h.jsx("span",{children:c.prompt_tokens})]}),c.completion_tokens!==void 0&&h.jsxs("div",{className:"flex justify-between gap-2",children:[h.jsx("span",{className:"font-semibold",children:"Completion tokens"}),h.jsx("span",{children:c.completion_tokens})]}),c.total_tokens!==void 0&&h.jsxs("div",{className:"flex justify-between gap-2",children:[h.jsx("span",{className:"font-semibold",children:"Total tokens"}),h.jsx("span",{children:c.total_tokens})]}),c.estimated_cost!==void 0&&h.jsxs("div",{className:"flex justify-between gap-2",children:[h.jsx("span",{className:"font-semibold",children:"Estimated cost"}),h.jsxs("span",{children:[on(c.estimated_cost.toString()),"$"]})]})]}),h.jsx("p",{className:"m-auto mt-2 text-center",children:"Show detailed usage breakdown by model."})]});return h.jsxs(h.Fragment,{children:[h.jsx(Ql,{content:p,placement:"bottom",children:h.jsx(eu,{isIconOnly:!0,variant:"ghost",className:"p-0","aria-label":"Open usage details",onPress:u,children:h.jsx(tu,{icon:"heroicons:information-circle"})})}),h.jsx(lu,{isOpen:l,onOpenChange:n,size:"4xl",children:h.jsx(uu,{children:h.jsxs(h.Fragment,{children:[h.jsx(ru,{className:"text-default-900 flex flex-col gap-1",children:"Usage details"}),h.jsx(nu,{children:h.jsxs(Yu,{"aria-label":"Table with detailed usage statistics for each model used to generate the message.",fullWidth:!0,children:[h.jsx(Ju,{columns:d,children:s=>h.jsx(_u,{children:s.label},s.key)}),h.jsx(tn,{items:r,children:s=>h.jsx(Qu,{className:s.model==="Total"?"border-default-200 border-t-1":"",children:b=>h.jsx(un,{children:ou(s,b)})},s.model)})]})})]})})})]})}export{mn as default};
+import{r as B,aX as Ml,aY as ae,t as Ne,k as ie,aK as z,aZ as W,a_ as U,a$ as te,b0 as Tl,aT as _,b1 as Rl,b2 as Vl,A as ze,b3 as ue,b4 as Ol,K as pe,H as Hl,J,M as Ll,b5 as L,af as Ul,b6 as Y,b7 as Z,b8 as le,U as Wl,b9 as Gl,ba as Ce,bb as Yl,l as T,R as M,W as X,Z as K,j as h,v as I,a2 as w,ap as be,au as Fe,a3 as O,w as Zl,y as _l,x as ql,a5 as q,O as Jl,Q as Pe,a0 as Ke,X as Ie,u as Xl,as as De,D as Ql,d as eu,I as tu,m as lu,e as uu,f as nu,bc as ou}from"./index-anmhb6wk.js";import{b as fe,$ as je}from"./useSelectableItem-BIhPf2mL.js";import{C as su,u as iu}from"./index-BAUrj1ow.js";import{m as ru}from"./chunk-IGSAU2ZA-DCwEaDm9.js";function Me(e,t){const l=B.useRef(!0),u=B.useRef(null);B.useEffect(()=>(l.current=!0,()=>{l.current=!1}),[]),B.useEffect(()=>{let o=u.current;l.current?l.current=!1:(!o||t.some((n,i)=>!Object.is(n,o[i])))&&e(),u.current=t},t)}function au(e,t){let l=t?.isDisabled,[u,o]=B.useState(!1);return Ml(()=>{if(e?.current&&!l){let n=()=>{if(e.current){let a=ae(e.current,{tabbable:!0});o(!!a.nextNode())}};n();let i=new MutationObserver(n);return i.observe(e.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{i.disconnect()}}}),l?!1:u}var Be=Ne({base:"w-px h-px inline-block",variants:{isInline:{true:"inline-block",false:"block"}},defaultVariants:{isInline:!1}}),ke=Ne({slots:{base:"flex flex-col relative gap-4",wrapper:["p-4","z-0","flex","flex-col","relative","justify-between","gap-4","shadow-small","bg-content1","overflow-auto"],table:"min-w-full h-auto",thead:"[&>tr]:first:rounded-lg",tbody:"after:block",tr:["group/tr","outline-hidden",...ie],th:["group/th","px-3","h-10","text-start","align-middle","bg-default-100","whitespace-nowrap","text-foreground-500","text-tiny","font-semibold","first:rounded-s-lg","last:rounded-e-lg","outline-hidden","data-[sortable=true]:cursor-pointer","data-[hover=true]:text-foreground-400",...ie],td:["py-2","px-3","relative","align-middle","whitespace-normal","text-small","font-normal","outline-hidden","[&>*]:z-1","[&>*]:relative",...ie,"before:pointer-events-none","before:content-['']","before:absolute","before:z-0","before:inset-0","before:opacity-0","data-[selected=true]:before:opacity-100","group-data-[disabled=true]/tr:text-foreground-300","group-data-[disabled=true]/tr:cursor-not-allowed"],tfoot:"",sortIcon:["ms-2","mb-px","opacity-0","text-inherit","inline-block","transition-transform-opacity","data-[visible=true]:opacity-100","group-data-[hover=true]/th:opacity-100","data-[direction=ascending]:rotate-180"],emptyWrapper:"text-foreground-400 align-middle text-center h-40",loadingWrapper:"absolute inset-0 flex items-center justify-center"},variants:{color:{default:{td:"before:bg-default/60 data-[selected=true]:text-default-foreground"},primary:{td:"before:bg-primary/20 data-[selected=true]:text-primary"},secondary:{td:"before:bg-secondary/20 data-[selected=true]:text-secondary"},success:{td:"before:bg-success/20 data-[selected=true]:text-success-600 dark:data-[selected=true]:text-success"},warning:{td:"before:bg-warning/20 data-[selected=true]:text-warning-600 dark:data-[selected=true]:text-warning"},danger:{td:"before:bg-danger/20 data-[selected=true]:text-danger dark:data-[selected=true]:text-danger-500"}},layout:{auto:{table:"table-auto"},fixed:{table:"table-fixed"}},shadow:{none:{wrapper:"shadow-none"},sm:{wrapper:"shadow-small"},md:{wrapper:"shadow-medium"},lg:{wrapper:"shadow-large"}},hideHeader:{true:{thead:"hidden"}},isStriped:{true:{td:["group-data-[odd=true]/tr:before:bg-default-100","group-data-[odd=true]/tr:before:opacity-100","group-data-[odd=true]/tr:before:-z-10"]}},isCompact:{true:{td:"py-1"},false:{}},isHeaderSticky:{true:{thead:"sticky top-0 z-20 [&>tr]:first:shadow-small"}},isSelectable:{true:{tr:"cursor-default",td:["group-aria-[selected=false]/tr:group-data-[hover=true]/tr:before:bg-default-100","group-aria-[selected=false]/tr:group-data-[hover=true]/tr:before:opacity-70"]}},isMultiSelectable:{true:{td:["group-data-[first=true]/tr:first:before:rounded-ss-lg","group-data-[first=true]/tr:last:before:rounded-se-lg","group-data-[middle=true]/tr:before:rounded-none","group-data-[last=true]/tr:first:before:rounded-es-lg","group-data-[last=true]/tr:last:before:rounded-ee-lg"]},false:{td:["first:before:rounded-s-lg","last:before:rounded-e-lg"]}},radius:{none:{wrapper:"rounded-none",th:["first:rounded-s-none","first:before:rounded-s-none","last:rounded-e-none","last:before:rounded-e-none"],td:["first:before:rounded-s-none","last:before:rounded-e-none","group-data-[first=true]/tr:first:before:rounded-ss-none","group-data-[first=true]/tr:last:before:rounded-se-none","group-data-[last=true]/tr:first:before:rounded-es-none","group-data-[last=true]/tr:last:before:rounded-ee-none"]},sm:{wrapper:"rounded-small"},md:{wrapper:"rounded-medium"},lg:{wrapper:"rounded-large"}},fullWidth:{true:{base:"w-full",wrapper:"w-full",table:"w-full"}},align:{start:{th:"text-start",td:"text-start"},center:{th:"text-center",td:"text-center"},end:{th:"text-end",td:"text-end"}}},defaultVariants:{layout:"auto",shadow:"sm",radius:"lg",color:"default",isCompact:!1,hideHeader:!1,isStriped:!1,fullWidth:!0,align:"start"},compoundVariants:[{isStriped:!0,color:"default",class:{td:"group-data-[odd=true]/tr:data-[selected=true]/tr:before:bg-default/60"}},{isStriped:!0,color:"primary",class:{td:"group-data-[odd=true]/tr:data-[selected=true]/tr:before:bg-primary/20"}},{isStriped:!0,color:"secondary",class:{td:"group-data-[odd=true]/tr:data-[selected=true]/tr:before:bg-secondary/20"}},{isStriped:!0,color:"success",class:{td:"group-data-[odd=true]/tr:data-[selected=true]/tr:before:bg-success/20"}},{isStriped:!0,color:"warning",class:{td:"group-data-[odd=true]/tr:data-[selected=true]/tr:before:bg-warning/20"}},{isStriped:!0,color:"danger",class:{td:"group-data-[odd=true]/tr:data-[selected=true]/tr:before:bg-danger/20"}}]});const he=new WeakMap;function ce(e){return typeof e=="string"?e.replace(/\s*/g,""):""+e}function cu(e,t){let l=he.get(e);if(!l)throw new Error("Unknown grid");return`${l}-${ce(t)}`}function Te(e,t,l){let u=he.get(e);if(!u)throw new Error("Unknown grid");return`${u}-${ce(t)}-${ce(l)}`}function Re(e,t){return[...e.collection.rowHeaderColumnKeys].map(l=>Te(e,t,l)).join(" ")}var Ve={};Ve={ascending:"تصاعدي",ascendingSort:e=>`ترتيب حسب العمود ${e.columnName} بترتيب تصاعدي`,columnSize:e=>`${e.value} بالبكسل`,descending:"تنازلي",descendingSort:e=>`ترتيب حسب العمود ${e.columnName} بترتيب تنازلي`,resizerDescription:"اضغط على مفتاح Enter لبدء تغيير الحجم",select:"تحديد",selectAll:"تحديد الكل",sortable:"عمود قابل للترتيب"};var Oe={};Oe={ascending:"възходящ",ascendingSort:e=>`сортирано по колона ${e.columnName} във възходящ ред`,columnSize:e=>`${e.value} пиксела`,descending:"низходящ",descendingSort:e=>`сортирано по колона ${e.columnName} в низходящ ред`,resizerDescription:"Натиснете „Enter“, за да започнете да преоразмерявате",select:"Изберете",selectAll:"Изберете всичко",sortable:"сортираща колона"};var He={};He={ascending:"vzestupně",ascendingSort:e=>`řazeno vzestupně podle sloupce ${e.columnName}`,columnSize:e=>`${e.value} pixelů`,descending:"sestupně",descendingSort:e=>`řazeno sestupně podle sloupce ${e.columnName}`,resizerDescription:"Stisknutím klávesy Enter začnete měnit velikost",select:"Vybrat",selectAll:"Vybrat vše",sortable:"sloupec s možností řazení"};var Le={};Le={ascending:"stigende",ascendingSort:e=>`sorteret efter kolonne ${e.columnName} i stigende rækkefølge`,columnSize:e=>`${e.value} pixels`,descending:"faldende",descendingSort:e=>`sorteret efter kolonne ${e.columnName} i faldende rækkefølge`,resizerDescription:"Tryk på Enter for at ændre størrelse",select:"Vælg",selectAll:"Vælg alle",sortable:"sorterbar kolonne"};var Ue={};Ue={ascending:"aufsteigend",ascendingSort:e=>`sortiert nach Spalte ${e.columnName} in aufsteigender Reihenfolge`,columnSize:e=>`${e.value} Pixel`,descending:"absteigend",descendingSort:e=>`sortiert nach Spalte ${e.columnName} in absteigender Reihenfolge`,resizerDescription:"Eingabetaste zum Starten der Größenänderung drücken",select:"Auswählen",selectAll:"Alles auswählen",sortable:"sortierbare Spalte"};var We={};We={ascending:"αύξουσα",ascendingSort:e=>`διαλογή ανά στήλη ${e.columnName} σε αύξουσα σειρά`,columnSize:e=>`${e.value} pixel`,descending:"φθίνουσα",descendingSort:e=>`διαλογή ανά στήλη ${e.columnName} σε φθίνουσα σειρά`,resizerDescription:"Πατήστε Enter για έναρξη της αλλαγής μεγέθους",select:"Επιλογή",selectAll:"Επιλογή όλων",sortable:"Στήλη διαλογής"};var Ge={};Ge={select:"Select",selectAll:"Select All",sortable:"sortable column",ascending:"ascending",descending:"descending",ascendingSort:e=>`sorted by column ${e.columnName} in ascending order`,descendingSort:e=>`sorted by column ${e.columnName} in descending order`,columnSize:e=>`${e.value} pixels`,resizerDescription:"Press Enter to start resizing"};var Ye={};Ye={ascending:"ascendente",ascendingSort:e=>`ordenado por columna ${e.columnName} en sentido ascendente`,columnSize:e=>`${e.value} píxeles`,descending:"descendente",descendingSort:e=>`ordenado por columna ${e.columnName} en orden descendente`,resizerDescription:"Pulse Intro para empezar a redimensionar",select:"Seleccionar",selectAll:"Seleccionar todos",sortable:"columna ordenable"};var Ze={};Ze={ascending:"tõusev järjestus",ascendingSort:e=>`sorditud veeru järgi ${e.columnName} tõusvas järjestuses`,columnSize:e=>`${e.value} pikslit`,descending:"laskuv järjestus",descendingSort:e=>`sorditud veeru järgi ${e.columnName} laskuvas järjestuses`,resizerDescription:"Suuruse muutmise alustamiseks vajutage klahvi Enter",select:"Vali",selectAll:"Vali kõik",sortable:"sorditav veerg"};var _e={};_e={ascending:"nouseva",ascendingSort:e=>`lajiteltu sarakkeen ${e.columnName} mukaan nousevassa järjestyksessä`,columnSize:e=>`${e.value} pikseliä`,descending:"laskeva",descendingSort:e=>`lajiteltu sarakkeen ${e.columnName} mukaan laskevassa järjestyksessä`,resizerDescription:"Aloita koon muutos painamalla Enter-näppäintä",select:"Valitse",selectAll:"Valitse kaikki",sortable:"lajiteltava sarake"};var qe={};qe={ascending:"croissant",ascendingSort:e=>`trié en fonction de la colonne ${e.columnName} par ordre croissant`,columnSize:e=>`${e.value} pixels`,descending:"décroissant",descendingSort:e=>`trié en fonction de la colonne ${e.columnName} par ordre décroissant`,resizerDescription:"Appuyez sur Entrée pour commencer le redimensionnement.",select:"Sélectionner",selectAll:"Sélectionner tout",sortable:"colonne triable"};var Je={};Je={ascending:"עולה",ascendingSort:e=>`מוין לפי עמודה ${e.columnName} בסדר עולה`,columnSize:e=>`${e.value} פיקסלים`,descending:"יורד",descendingSort:e=>`מוין לפי עמודה ${e.columnName} בסדר יורד`,resizerDescription:"הקש Enter כדי לשנות את הגודל",select:"בחר",selectAll:"בחר הכול",sortable:"עמודה שניתן למיין"};var Xe={};Xe={ascending:"rastući",ascendingSort:e=>`razvrstano po stupcima ${e.columnName} rastućem redoslijedom`,columnSize:e=>`${e.value} piksela`,descending:"padajući",descendingSort:e=>`razvrstano po stupcima ${e.columnName} padajućim redoslijedom`,resizerDescription:"Pritisnite Enter da biste započeli promenu veličine",select:"Odaberite",selectAll:"Odaberite sve",sortable:"stupac koji se može razvrstati"};var Qe={};Qe={ascending:"növekvő",ascendingSort:e=>`rendezve a(z) ${e.columnName} oszlop szerint, növekvő sorrendben`,columnSize:e=>`${e.value} képpont`,descending:"csökkenő",descendingSort:e=>`rendezve a(z) ${e.columnName} oszlop szerint, csökkenő sorrendben`,resizerDescription:"Nyomja le az Enter billentyűt az átméretezés megkezdéséhez",select:"Kijelölés",selectAll:"Összes kijelölése",sortable:"rendezendő oszlop"};var et={};et={ascending:"crescente",ascendingSort:e=>`in ordine crescente in base alla colonna ${e.columnName}`,columnSize:e=>`${e.value} pixel`,descending:"decrescente",descendingSort:e=>`in ordine decrescente in base alla colonna ${e.columnName}`,resizerDescription:"Premi Invio per iniziare a ridimensionare",select:"Seleziona",selectAll:"Seleziona tutto",sortable:"colonna ordinabile"};var tt={};tt={ascending:"昇順",ascendingSort:e=>`列 ${e.columnName} を昇順で並べ替え`,columnSize:e=>`${e.value} ピクセル`,descending:"降順",descendingSort:e=>`列 ${e.columnName} を降順で並べ替え`,resizerDescription:"Enter キーを押してサイズ変更を開始",select:"選択",selectAll:"すべて選択",sortable:"並べ替え可能な列"};var lt={};lt={ascending:"오름차순",ascendingSort:e=>`${e.columnName} 열을 기준으로 오름차순으로 정렬됨`,columnSize:e=>`${e.value} 픽셀`,descending:"내림차순",descendingSort:e=>`${e.columnName} 열을 기준으로 내림차순으로 정렬됨`,resizerDescription:"크기 조정을 시작하려면 Enter를 누르세요.",select:"선택",selectAll:"모두 선택",sortable:"정렬 가능한 열"};var ut={};ut={ascending:"didėjančia tvarka",ascendingSort:e=>`surikiuota pagal stulpelį ${e.columnName} didėjančia tvarka`,columnSize:e=>`${e.value} piks.`,descending:"mažėjančia tvarka",descendingSort:e=>`surikiuota pagal stulpelį ${e.columnName} mažėjančia tvarka`,resizerDescription:"Paspauskite „Enter“, kad pradėtumėte keisti dydį",select:"Pasirinkti",selectAll:"Pasirinkti viską",sortable:"rikiuojamas stulpelis"};var nt={};nt={ascending:"augošā secībā",ascendingSort:e=>`kārtots pēc kolonnas ${e.columnName} augošā secībā`,columnSize:e=>`${e.value} pikseļi`,descending:"dilstošā secībā",descendingSort:e=>`kārtots pēc kolonnas ${e.columnName} dilstošā secībā`,resizerDescription:"Nospiediet Enter, lai sāktu izmēru mainīšanu",select:"Atlasīt",selectAll:"Atlasīt visu",sortable:"kārtojamā kolonna"};var ot={};ot={ascending:"stigende",ascendingSort:e=>`sortert etter kolonne ${e.columnName} i stigende rekkefølge`,columnSize:e=>`${e.value} piksler`,descending:"synkende",descendingSort:e=>`sortert etter kolonne ${e.columnName} i synkende rekkefølge`,resizerDescription:"Trykk på Enter for å starte størrelsesendring",select:"Velg",selectAll:"Velg alle",sortable:"kolonne som kan sorteres"};var st={};st={ascending:"oplopend",ascendingSort:e=>`gesorteerd in oplopende volgorde in kolom ${e.columnName}`,columnSize:e=>`${e.value} pixels`,descending:"aflopend",descendingSort:e=>`gesorteerd in aflopende volgorde in kolom ${e.columnName}`,resizerDescription:"Druk op Enter om het formaat te wijzigen",select:"Selecteren",selectAll:"Alles selecteren",sortable:"sorteerbare kolom"};var it={};it={ascending:"rosnąco",ascendingSort:e=>`posortowano według kolumny ${e.columnName} w porządku rosnącym`,columnSize:e=>`Liczba pikseli: ${e.value}`,descending:"malejąco",descendingSort:e=>`posortowano według kolumny ${e.columnName} w porządku malejącym`,resizerDescription:"Naciśnij Enter, aby rozpocząć zmienianie rozmiaru",select:"Zaznacz",selectAll:"Zaznacz wszystko",sortable:"kolumna z możliwością sortowania"};var rt={};rt={ascending:"crescente",ascendingSort:e=>`classificado pela coluna ${e.columnName} em ordem crescente`,columnSize:e=>`${e.value} pixels`,descending:"decrescente",descendingSort:e=>`classificado pela coluna ${e.columnName} em ordem decrescente`,resizerDescription:"Pressione Enter para começar a redimensionar",select:"Selecionar",selectAll:"Selecionar tudo",sortable:"coluna classificável"};var at={};at={ascending:"ascendente",ascendingSort:e=>`Ordenar por coluna ${e.columnName} em ordem ascendente`,columnSize:e=>`${e.value} pixels`,descending:"descendente",descendingSort:e=>`Ordenar por coluna ${e.columnName} em ordem descendente`,resizerDescription:"Prima Enter para iniciar o redimensionamento",select:"Selecionar",selectAll:"Selecionar tudo",sortable:"Coluna ordenável"};var ct={};ct={ascending:"crescătoare",ascendingSort:e=>`sortate după coloana ${e.columnName} în ordine crescătoare`,columnSize:e=>`${e.value} pixeli`,descending:"descrescătoare",descendingSort:e=>`sortate după coloana ${e.columnName} în ordine descrescătoare`,resizerDescription:"Apăsați pe Enter pentru a începe redimensionarea",select:"Selectare",selectAll:"Selectare totală",sortable:"coloană sortabilă"};var dt={};dt={ascending:"возрастание",ascendingSort:e=>`сортировать столбец ${e.columnName} в порядке возрастания`,columnSize:e=>`${e.value} пикс.`,descending:"убывание",descendingSort:e=>`сортировать столбец ${e.columnName} в порядке убывания`,resizerDescription:"Нажмите клавишу Enter для начала изменения размеров",select:"Выбрать",selectAll:"Выбрать все",sortable:"сортируемый столбец"};var mt={};mt={ascending:"vzostupne",ascendingSort:e=>`zoradené zostupne podľa stĺpca ${e.columnName}`,columnSize:e=>`Počet pixelov: ${e.value}`,descending:"zostupne",descendingSort:e=>`zoradené zostupne podľa stĺpca ${e.columnName}`,resizerDescription:"Stlačením klávesu Enter začnete zmenu veľkosti",select:"Vybrať",selectAll:"Vybrať všetko",sortable:"zoraditeľný stĺpec"};var pt={};pt={ascending:"naraščajoče",ascendingSort:e=>`razvrščeno po stolpcu ${e.columnName} v naraščajočem vrstnem redu`,columnSize:e=>`${e.value} slikovnih pik`,descending:"padajoče",descendingSort:e=>`razvrščeno po stolpcu ${e.columnName} v padajočem vrstnem redu`,resizerDescription:"Pritisnite tipko Enter da začnete spreminjati velikost",select:"Izberite",selectAll:"Izberite vse",sortable:"razvrstljivi stolpec"};var bt={};bt={ascending:"rastući",ascendingSort:e=>`sortirano po kolonama ${e.columnName} rastućim redosledom`,columnSize:e=>`${e.value} piksela`,descending:"padajući",descendingSort:e=>`sortirano po kolonama ${e.columnName} padajućim redosledom`,resizerDescription:"Pritisnite Enter da biste započeli promenu veličine",select:"Izaberite",selectAll:"Izaberite sve",sortable:"kolona koja se može sortirati"};var ft={};ft={ascending:"stigande",ascendingSort:e=>`sorterat på kolumn ${e.columnName} i stigande ordning`,columnSize:e=>`${e.value} pixlar`,descending:"fallande",descendingSort:e=>`sorterat på kolumn ${e.columnName} i fallande ordning`,resizerDescription:"Tryck på Retur för att börja ändra storlek",select:"Markera",selectAll:"Markera allt",sortable:"sorterbar kolumn"};var ht={};ht={ascending:"artan sırada",ascendingSort:e=>`${e.columnName} sütuna göre artan düzende sırala`,columnSize:e=>`${e.value} piksel`,descending:"azalan sırada",descendingSort:e=>`${e.columnName} sütuna göre azalan düzende sırala`,resizerDescription:"Yeniden boyutlandırmak için Enter'a basın",select:"Seç",selectAll:"Tümünü Seç",sortable:"Sıralanabilir sütun"};var vt={};vt={ascending:"висхідний",ascendingSort:e=>`відсортовано за стовпцем ${e.columnName} у висхідному порядку`,columnSize:e=>`${e.value} пікс.`,descending:"низхідний",descendingSort:e=>`відсортовано за стовпцем ${e.columnName} у низхідному порядку`,resizerDescription:"Натисніть Enter, щоб почати зміну розміру",select:"Вибрати",selectAll:"Вибрати все",sortable:"сортувальний стовпець"};var gt={};gt={ascending:"升序",ascendingSort:e=>`按列 ${e.columnName} 升序排序`,columnSize:e=>`${e.value} 像素`,descending:"降序",descendingSort:e=>`按列 ${e.columnName} 降序排序`,resizerDescription:"按“输入”键开始调整大小。",select:"选择",selectAll:"全选",sortable:"可排序的列"};var $t={};$t={ascending:"遞增",ascendingSort:e=>`已依據「${e.columnName}」欄遞增排序`,columnSize:e=>`${e.value} 像素`,descending:"遞減",descendingSort:e=>`已依據「${e.columnName}」欄遞減排序`,resizerDescription:"按 Enter 鍵以開始調整大小",select:"選取",selectAll:"全選",sortable:"可排序的欄"};var ne={};ne={"ar-AE":Ve,"bg-BG":Oe,"cs-CZ":He,"da-DK":Le,"de-DE":Ue,"el-GR":We,"en-US":Ge,"es-ES":Ye,"et-EE":Ze,"fi-FI":_e,"fr-FR":qe,"he-IL":Je,"hr-HR":Xe,"hu-HU":Qe,"it-IT":et,"ja-JP":tt,"ko-KR":lt,"lt-LT":ut,"lv-LV":nt,"nb-NO":ot,"nl-NL":st,"pl-PL":it,"pt-BR":rt,"pt-PT":at,"ro-RO":ct,"ru-RU":dt,"sk-SK":mt,"sl-SI":pt,"sr-SP":bt,"sv-SE":ft,"tr-TR":ht,"uk-UA":vt,"zh-CN":gt,"zh-TW":$t};class yt{isCell(t){return t.type==="cell"}isRow(t){return t.type==="row"||t.type==="item"}isDisabled(t){var l;return this.disabledBehavior==="all"&&(((l=t.props)===null||l===void 0?void 0:l.isDisabled)||this.disabledKeys.has(t.key))}findPreviousKey(t,l){let u=t!=null?this.collection.getKeyBefore(t):this.collection.getLastKey();for(;u!=null;){let o=this.collection.getItem(u);if(!o)return null;if(!this.isDisabled(o)&&(!l||l(o)))return u;u=this.collection.getKeyBefore(u)}return null}findNextKey(t,l){let u=t!=null?this.collection.getKeyAfter(t):this.collection.getFirstKey();for(;u!=null;){let o=this.collection.getItem(u);if(!o)return null;if(!this.isDisabled(o)&&(!l||l(o)))return u;if(u=this.collection.getKeyAfter(u),u==null)return null}return null}getKeyForItemInRowByIndex(t,l=0){if(l<0)return null;let u=this.collection.getItem(t);if(!u)return null;let o=0;for(let a of z(u,this.collection)){var n;if(a.colSpan&&a.colSpan+o>l)return(n=a.key)!==null&&n!==void 0?n:null;a.colSpan&&(o=o+a.colSpan-1);var i;if(o===l)return(i=a.key)!==null&&i!==void 0?i:null;o++}return null}getKeyBelow(t){let l=t,u=this.collection.getItem(l);if(!u)return null;var o;if(this.isCell(u)&&(l=(o=u.parentKey)!==null&&o!==void 0?o:null),l==null)return null;if(l=this.findNextKey(l,n=>n.type==="item"),l!=null){if(this.isCell(u)){let n=u.colIndex?u.colIndex:u.index;return this.getKeyForItemInRowByIndex(l,n)}if(this.focusMode==="row")return l}return null}getKeyAbove(t){let l=t,u=this.collection.getItem(l);if(!u)return null;var o;if(this.isCell(u)&&(l=(o=u.parentKey)!==null&&o!==void 0?o:null),l==null)return null;if(l=this.findPreviousKey(l,n=>n.type==="item"),l!=null){if(this.isCell(u)){let n=u.colIndex?u.colIndex:u.index;return this.getKeyForItemInRowByIndex(l,n)}if(this.focusMode==="row")return l}return null}getKeyRightOf(t){let l=this.collection.getItem(t);if(!l)return null;if(this.isRow(l)){var u,o;let d=z(l,this.collection);var n;return(n=this.direction==="rtl"?(u=W(d))===null||u===void 0?void 0:u.key:(o=U(d))===null||o===void 0?void 0:o.key)!==null&&n!==void 0?n:null}if(this.isCell(l)&&l.parentKey!=null){let d=this.collection.getItem(l.parentKey);if(!d)return null;let r=z(d,this.collection);var i;let p=(i=this.direction==="rtl"?te(r,l.index-1):te(r,l.index+1))!==null&&i!==void 0?i:null;var a;if(p)return(a=p.key)!==null&&a!==void 0?a:null;var m;if(this.focusMode==="row")return(m=l.parentKey)!==null&&m!==void 0?m:null;var c;return(c=this.direction==="rtl"?this.getFirstKey(t):this.getLastKey(t))!==null&&c!==void 0?c:null}return null}getKeyLeftOf(t){let l=this.collection.getItem(t);if(!l)return null;if(this.isRow(l)){var u,o;let d=z(l,this.collection);var n;return(n=this.direction==="rtl"?(u=U(d))===null||u===void 0?void 0:u.key:(o=W(d))===null||o===void 0?void 0:o.key)!==null&&n!==void 0?n:null}if(this.isCell(l)&&l.parentKey!=null){let d=this.collection.getItem(l.parentKey);if(!d)return null;let r=z(d,this.collection);var i;let p=(i=this.direction==="rtl"?te(r,l.index+1):te(r,l.index-1))!==null&&i!==void 0?i:null;var a;if(p)return(a=p.key)!==null&&a!==void 0?a:null;var m;if(this.focusMode==="row")return(m=l.parentKey)!==null&&m!==void 0?m:null;var c;return(c=this.direction==="rtl"?this.getLastKey(t):this.getFirstKey(t))!==null&&c!==void 0?c:null}return null}getFirstKey(t,l){let u=t??null,o;if(u!=null){if(o=this.collection.getItem(u),!o)return null;if(this.isCell(o)&&!l&&o.parentKey!=null){var n;let c=this.collection.getItem(o.parentKey);if(!c)return null;var i;return(i=(n=U(z(c,this.collection)))===null||n===void 0?void 0:n.key)!==null&&i!==void 0?i:null}}if(u=this.findNextKey(void 0,c=>c.type==="item"),u!=null&&(o&&this.isCell(o)&&l||this.focusMode==="cell")){var a;let c=this.collection.getItem(u);if(!c)return null;var m;u=(m=(a=U(z(c,this.collection)))===null||a===void 0?void 0:a.key)!==null&&m!==void 0?m:null}return u}getLastKey(t,l){let u=t??null,o;if(u!=null){if(o=this.collection.getItem(u),!o)return null;if(this.isCell(o)&&!l&&o.parentKey!=null){var n;let c=this.collection.getItem(o.parentKey);if(!c)return null;let d=z(c,this.collection);var i;return(i=(n=W(d))===null||n===void 0?void 0:n.key)!==null&&i!==void 0?i:null}}if(u=this.findPreviousKey(void 0,c=>c.type==="item"),u!=null&&(o&&this.isCell(o)&&l||this.focusMode==="cell")){var a;let c=this.collection.getItem(u);if(!c)return null;let d=z(c,this.collection);var m;u=(m=(a=W(d))===null||a===void 0?void 0:a.key)!==null&&m!==void 0?m:null}return u}getKeyPageAbove(t){let l=t,u=this.layoutDelegate.getItemRect(l);if(!u)return null;let o=Math.max(0,u.y+u.height-this.layoutDelegate.getVisibleRect().height);for(;u&&u.y>o&&l!=null;){var n;if(l=(n=this.getKeyAbove(l))!==null&&n!==void 0?n:null,l==null)break;u=this.layoutDelegate.getItemRect(l)}return l}getKeyPageBelow(t){let l=t,u=this.layoutDelegate.getItemRect(l);if(!u)return null;let o=this.layoutDelegate.getVisibleRect().height,n=Math.min(this.layoutDelegate.getContentSize().height,u.y+o);for(;u&&u.y+u.heightr.type==="item"),u==null&&!a&&(u=this.getFirstKey(),a=!0)}return null}constructor(t){if(this.collection=t.collection,this.disabledKeys=t.disabledKeys,this.disabledBehavior=t.disabledBehavior||"all",this.direction=t.direction,this.collator=t.collator,!t.layout&&!t.ref)throw new Error("Either a layout or a ref must be specified.");this.layoutDelegate=t.layoutDelegate||(t.layout?new du(t.layout):new Tl(t.ref)),this.focusMode=t.focusMode||"row"}}class du{getContentSize(){return this.layout.getContentSize()}getItemRect(t){var l;return((l=this.layout.getLayoutInfo(t))===null||l===void 0?void 0:l.rect)||null}getVisibleRect(){return this.layout.virtualizer.visibleRect}constructor(t){this.layout=t}}const ve=new WeakMap;var xt={};xt={deselectedItem:e=>`${e.item} غير المحدد`,longPressToSelect:"اضغط مطولًا للدخول إلى وضع التحديد.",select:"تحديد",selectedAll:"جميع العناصر المحددة.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"لم يتم تحديد عناصر",one:()=>`${t.number(e.count)} عنصر محدد`,other:()=>`${t.number(e.count)} عنصر محدد`})}.`,selectedItem:e=>`${e.item} المحدد`};var Ct={};Ct={deselectedItem:e=>`${e.item} не е избран.`,longPressToSelect:"Натиснете и задръжте за да влезете в избирателен режим.",select:"Изберете",selectedAll:"Всички елементи са избрани.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Няма избрани елементи",one:()=>`${t.number(e.count)} избран елемент`,other:()=>`${t.number(e.count)} избрани елементи`})}.`,selectedItem:e=>`${e.item} избран.`};var Dt={};Dt={deselectedItem:e=>`Položka ${e.item} není vybrána.`,longPressToSelect:"Dlouhým stisknutím přejdete do režimu výběru.",select:"Vybrat",selectedAll:"Vybrány všechny položky.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nevybrány žádné položky",one:()=>`Vybrána ${t.number(e.count)} položka`,other:()=>`Vybráno ${t.number(e.count)} položek`})}.`,selectedItem:e=>`Vybrána položka ${e.item}.`};var Bt={};Bt={deselectedItem:e=>`${e.item} ikke valgt.`,longPressToSelect:"Lav et langt tryk for at aktivere valgtilstand.",select:"Vælg",selectedAll:"Alle elementer valgt.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Ingen elementer valgt",one:()=>`${t.number(e.count)} element valgt`,other:()=>`${t.number(e.count)} elementer valgt`})}.`,selectedItem:e=>`${e.item} valgt.`};var kt={};kt={deselectedItem:e=>`${e.item} nicht ausgewählt.`,longPressToSelect:"Gedrückt halten, um Auswahlmodus zu öffnen.",select:"Auswählen",selectedAll:"Alle Elemente ausgewählt.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Keine Elemente ausgewählt",one:()=>`${t.number(e.count)} Element ausgewählt`,other:()=>`${t.number(e.count)} Elemente ausgewählt`})}.`,selectedItem:e=>`${e.item} ausgewählt.`};var Et={};Et={deselectedItem:e=>`Δεν επιλέχθηκε το στοιχείο ${e.item}.`,longPressToSelect:"Πατήστε παρατεταμένα για να μπείτε σε λειτουργία επιλογής.",select:"Επιλογή",selectedAll:"Επιλέχθηκαν όλα τα στοιχεία.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Δεν επιλέχθηκαν στοιχεία",one:()=>`Επιλέχθηκε ${t.number(e.count)} στοιχείο`,other:()=>`Επιλέχθηκαν ${t.number(e.count)} στοιχεία`})}.`,selectedItem:e=>`Επιλέχθηκε το στοιχείο ${e.item}.`};var St={};St={deselectedItem:e=>`${e.item} not selected.`,select:"Select",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"No items selected",one:()=>`${t.number(e.count)} item selected`,other:()=>`${t.number(e.count)} items selected`})}.`,selectedAll:"All items selected.",selectedItem:e=>`${e.item} selected.`,longPressToSelect:"Long press to enter selection mode."};var At={};At={deselectedItem:e=>`${e.item} no seleccionado.`,longPressToSelect:"Mantenga pulsado para abrir el modo de selección.",select:"Seleccionar",selectedAll:"Todos los elementos seleccionados.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Ningún elemento seleccionado",one:()=>`${t.number(e.count)} elemento seleccionado`,other:()=>`${t.number(e.count)} elementos seleccionados`})}.`,selectedItem:e=>`${e.item} seleccionado.`};var wt={};wt={deselectedItem:e=>`${e.item} pole valitud.`,longPressToSelect:"Valikurežiimi sisenemiseks vajutage pikalt.",select:"Vali",selectedAll:"Kõik üksused valitud.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Üksusi pole valitud",one:()=>`${t.number(e.count)} üksus valitud`,other:()=>`${t.number(e.count)} üksust valitud`})}.`,selectedItem:e=>`${e.item} valitud.`};var Nt={};Nt={deselectedItem:e=>`Kohdetta ${e.item} ei valittu.`,longPressToSelect:"Siirry valintatilaan painamalla pitkään.",select:"Valitse",selectedAll:"Kaikki kohteet valittu.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Ei yhtään kohdetta valittu",one:()=>`${t.number(e.count)} kohde valittu`,other:()=>`${t.number(e.count)} kohdetta valittu`})}.`,selectedItem:e=>`${e.item} valittu.`};var zt={};zt={deselectedItem:e=>`${e.item} non sélectionné.`,longPressToSelect:"Appuyez de manière prolongée pour passer en mode de sélection.",select:"Sélectionner",selectedAll:"Tous les éléments sélectionnés.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Aucun élément sélectionné",one:()=>`${t.number(e.count)} élément sélectionné`,other:()=>`${t.number(e.count)} éléments sélectionnés`})}.`,selectedItem:e=>`${e.item} sélectionné.`};var Ft={};Ft={deselectedItem:e=>`${e.item} לא נבחר.`,longPressToSelect:"הקשה ארוכה לכניסה למצב בחירה.",select:"בחר",selectedAll:"כל הפריטים נבחרו.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"לא נבחרו פריטים",one:()=>`פריט ${t.number(e.count)} נבחר`,other:()=>`${t.number(e.count)} פריטים נבחרו`})}.`,selectedItem:e=>`${e.item} נבחר.`};var Pt={};Pt={deselectedItem:e=>`Stavka ${e.item} nije odabrana.`,longPressToSelect:"Dugo pritisnite za ulazak u način odabira.",select:"Odaberite",selectedAll:"Odabrane su sve stavke.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nije odabrana nijedna stavka",one:()=>`Odabrana je ${t.number(e.count)} stavka`,other:()=>`Odabrano je ${t.number(e.count)} stavki`})}.`,selectedItem:e=>`Stavka ${e.item} je odabrana.`};var Kt={};Kt={deselectedItem:e=>`${e.item} nincs kijelölve.`,longPressToSelect:"Nyomja hosszan a kijelöléshez.",select:"Kijelölés",selectedAll:"Az összes elem kijelölve.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Egy elem sincs kijelölve",one:()=>`${t.number(e.count)} elem kijelölve`,other:()=>`${t.number(e.count)} elem kijelölve`})}.`,selectedItem:e=>`${e.item} kijelölve.`};var It={};It={deselectedItem:e=>`${e.item} non selezionato.`,longPressToSelect:"Premi a lungo per passare alla modalità di selezione.",select:"Seleziona",selectedAll:"Tutti gli elementi selezionati.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nessun elemento selezionato",one:()=>`${t.number(e.count)} elemento selezionato`,other:()=>`${t.number(e.count)} elementi selezionati`})}.`,selectedItem:e=>`${e.item} selezionato.`};var jt={};jt={deselectedItem:e=>`${e.item} が選択されていません。`,longPressToSelect:"長押しして選択モードを開きます。",select:"選択",selectedAll:"すべての項目を選択しました。",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"項目が選択されていません",one:()=>`${t.number(e.count)} 項目を選択しました`,other:()=>`${t.number(e.count)} 項目を選択しました`})}。`,selectedItem:e=>`${e.item} を選択しました。`};var Mt={};Mt={deselectedItem:e=>`${e.item}이(가) 선택되지 않았습니다.`,longPressToSelect:"선택 모드로 들어가려면 길게 누르십시오.",select:"선택",selectedAll:"모든 항목이 선택되었습니다.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"선택된 항목이 없습니다",one:()=>`${t.number(e.count)}개 항목이 선택되었습니다`,other:()=>`${t.number(e.count)}개 항목이 선택되었습니다`})}.`,selectedItem:e=>`${e.item}이(가) 선택되었습니다.`};var Tt={};Tt={deselectedItem:e=>`${e.item} nepasirinkta.`,longPressToSelect:"Norėdami įjungti pasirinkimo režimą, paspauskite ir palaikykite.",select:"Pasirinkti",selectedAll:"Pasirinkti visi elementai.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nepasirinktas nė vienas elementas",one:()=>`Pasirinktas ${t.number(e.count)} elementas`,other:()=>`Pasirinkta elementų: ${t.number(e.count)}`})}.`,selectedItem:e=>`Pasirinkta: ${e.item}.`};var Rt={};Rt={deselectedItem:e=>`Vienums ${e.item} nav atlasīts.`,longPressToSelect:"Ilgi turiet nospiestu. lai ieslēgtu atlases režīmu.",select:"Atlasīt",selectedAll:"Atlasīti visi vienumi.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nav atlasīts neviens vienums",one:()=>`Atlasīto vienumu skaits: ${t.number(e.count)}`,other:()=>`Atlasīto vienumu skaits: ${t.number(e.count)}`})}.`,selectedItem:e=>`Atlasīts vienums ${e.item}.`};var Vt={};Vt={deselectedItem:e=>`${e.item} er ikke valgt.`,longPressToSelect:"Bruk et langt trykk for å gå inn i valgmodus.",select:"Velg",selectedAll:"Alle elementer er valgt.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Ingen elementer er valgt",one:()=>`${t.number(e.count)} element er valgt`,other:()=>`${t.number(e.count)} elementer er valgt`})}.`,selectedItem:e=>`${e.item} er valgt.`};var Ot={};Ot={deselectedItem:e=>`${e.item} niet geselecteerd.`,longPressToSelect:"Druk lang om de selectiemodus te openen.",select:"Selecteren",selectedAll:"Alle items geselecteerd.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Geen items geselecteerd",one:()=>`${t.number(e.count)} item geselecteerd`,other:()=>`${t.number(e.count)} items geselecteerd`})}.`,selectedItem:e=>`${e.item} geselecteerd.`};var Ht={};Ht={deselectedItem:e=>`Nie zaznaczono ${e.item}.`,longPressToSelect:"Naciśnij i przytrzymaj, aby wejść do trybu wyboru.",select:"Zaznacz",selectedAll:"Wszystkie zaznaczone elementy.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nie zaznaczono żadnych elementów",one:()=>`${t.number(e.count)} zaznaczony element`,other:()=>`${t.number(e.count)} zaznaczonych elementów`})}.`,selectedItem:e=>`Zaznaczono ${e.item}.`};var Lt={};Lt={deselectedItem:e=>`${e.item} não selecionado.`,longPressToSelect:"Mantenha pressionado para entrar no modo de seleção.",select:"Selecionar",selectedAll:"Todos os itens selecionados.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nenhum item selecionado",one:()=>`${t.number(e.count)} item selecionado`,other:()=>`${t.number(e.count)} itens selecionados`})}.`,selectedItem:e=>`${e.item} selecionado.`};var Ut={};Ut={deselectedItem:e=>`${e.item} não selecionado.`,longPressToSelect:"Prima continuamente para entrar no modo de seleção.",select:"Selecionar",selectedAll:"Todos os itens selecionados.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nenhum item selecionado",one:()=>`${t.number(e.count)} item selecionado`,other:()=>`${t.number(e.count)} itens selecionados`})}.`,selectedItem:e=>`${e.item} selecionado.`};var Wt={};Wt={deselectedItem:e=>`${e.item} neselectat.`,longPressToSelect:"Apăsați lung pentru a intra în modul de selectare.",select:"Selectare",selectedAll:"Toate elementele selectate.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Niciun element selectat",one:()=>`${t.number(e.count)} element selectat`,other:()=>`${t.number(e.count)} elemente selectate`})}.`,selectedItem:e=>`${e.item} selectat.`};var Gt={};Gt={deselectedItem:e=>`${e.item} не выбрано.`,longPressToSelect:"Нажмите и удерживайте для входа в режим выбора.",select:"Выбрать",selectedAll:"Выбраны все элементы.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Нет выбранных элементов",one:()=>`${t.number(e.count)} элемент выбран`,other:()=>`${t.number(e.count)} элементов выбрано`})}.`,selectedItem:e=>`${e.item} выбрано.`};var Yt={};Yt={deselectedItem:e=>`Nevybraté položky: ${e.item}.`,longPressToSelect:"Dlhším stlačením prejdite do režimu výberu.",select:"Vybrať",selectedAll:"Všetky vybraté položky.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Žiadne vybraté položky",one:()=>`${t.number(e.count)} vybratá položka`,other:()=>`Počet vybratých položiek:${t.number(e.count)}`})}.`,selectedItem:e=>`Vybraté položky: ${e.item}.`};var Zt={};Zt={deselectedItem:e=>`Element ${e.item} ni izbran.`,longPressToSelect:"Za izbirni način pritisnite in dlje časa držite.",select:"Izberite",selectedAll:"Vsi elementi so izbrani.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Noben element ni izbran",one:()=>`${t.number(e.count)} element je izbran`,other:()=>`${t.number(e.count)} elementov je izbranih`})}.`,selectedItem:e=>`Element ${e.item} je izbran.`};var _t={};_t={deselectedItem:e=>`${e.item} nije izabrano.`,longPressToSelect:"Dugo pritisnite za ulazak u režim biranja.",select:"Izaberite",selectedAll:"Izabrane su sve stavke.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Nije izabrana nijedna stavka",one:()=>`Izabrana je ${t.number(e.count)} stavka`,other:()=>`Izabrano je ${t.number(e.count)} stavki`})}.`,selectedItem:e=>`${e.item} je izabrano.`};var qt={};qt={deselectedItem:e=>`${e.item} ej markerat.`,longPressToSelect:"Tryck länge när du vill öppna väljarläge.",select:"Markera",selectedAll:"Alla markerade objekt.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Inga markerade objekt",one:()=>`${t.number(e.count)} markerat objekt`,other:()=>`${t.number(e.count)} markerade objekt`})}.`,selectedItem:e=>`${e.item} markerat.`};var Jt={};Jt={deselectedItem:e=>`${e.item} seçilmedi.`,longPressToSelect:"Seçim moduna girmek için uzun basın.",select:"Seç",selectedAll:"Tüm ögeler seçildi.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Hiçbir öge seçilmedi",one:()=>`${t.number(e.count)} öge seçildi`,other:()=>`${t.number(e.count)} öge seçildi`})}.`,selectedItem:e=>`${e.item} seçildi.`};var Xt={};Xt={deselectedItem:e=>`${e.item} не вибрано.`,longPressToSelect:"Виконайте довге натиснення, щоб перейти в режим вибору.",select:"Вибрати",selectedAll:"Усі елементи вибрано.",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"Жодних елементів не вибрано",one:()=>`${t.number(e.count)} елемент вибрано`,other:()=>`Вибрано елементів: ${t.number(e.count)}`})}.`,selectedItem:e=>`${e.item} вибрано.`};var Qt={};Qt={deselectedItem:e=>`未选择 ${e.item}。`,longPressToSelect:"长按以进入选择模式。",select:"选择",selectedAll:"已选择所有项目。",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"未选择项目",one:()=>`已选择 ${t.number(e.count)} 个项目`,other:()=>`已选择 ${t.number(e.count)} 个项目`})}。`,selectedItem:e=>`已选择 ${e.item}。`};var el={};el={deselectedItem:e=>`未選取「${e.item}」。`,longPressToSelect:"長按以進入選擇模式。",select:"選取",selectedAll:"已選取所有項目。",selectedCount:(e,t)=>`${t.plural(e.count,{"=0":"未選取任何項目",one:()=>`已選取 ${t.number(e.count)} 個項目`,other:()=>`已選取 ${t.number(e.count)} 個項目`})}。`,selectedItem:e=>`已選取「${e.item}」。`};var oe={};oe={"ar-AE":xt,"bg-BG":Ct,"cs-CZ":Dt,"da-DK":Bt,"de-DE":kt,"el-GR":Et,"en-US":St,"es-ES":At,"et-EE":wt,"fi-FI":Nt,"fr-FR":zt,"he-IL":Ft,"hr-HR":Pt,"hu-HU":Kt,"it-IT":It,"ja-JP":jt,"ko-KR":Mt,"lt-LT":Tt,"lv-LV":Rt,"nb-NO":Vt,"nl-NL":Ot,"pl-PL":Ht,"pt-BR":Lt,"pt-PT":Ut,"ro-RO":Wt,"ru-RU":Gt,"sk-SK":Yt,"sl-SI":Zt,"sr-SP":_t,"sv-SE":qt,"tr-TR":Jt,"uk-UA":Xt,"zh-CN":Qt,"zh-TW":el};const tl=7e3;let V=null;function ll(e,t="assertive",l=tl){V?V.announce(e,t,l):(V=new mu,(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u")?V.announce(e,t,l):setTimeout(()=>{V?.isAttached()&&V?.announce(e,t,l)},100))}class mu{isAttached(){var t;return(t=this.node)===null||t===void 0?void 0:t.isConnected}createLog(t){let l=document.createElement("div");return l.setAttribute("role","log"),l.setAttribute("aria-live",t),l.setAttribute("aria-relevant","additions"),l}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(t,l="assertive",u=tl){var o,n;if(!this.node)return;let i=document.createElement("div");typeof t=="object"?(i.setAttribute("role","img"),i.setAttribute("aria-labelledby",t["aria-labelledby"])):i.textContent=t,l==="assertive"?(o=this.assertiveLog)===null||o===void 0||o.appendChild(i):(n=this.politeLog)===null||n===void 0||n.appendChild(i),t!==""&&setTimeout(()=>{i.remove()},u)}clear(t){this.node&&((!t||t==="assertive")&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!t||t==="polite")&&this.politeLog&&(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,typeof document<"u"&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}}function pu(e){return e&&e.__esModule?e.default:e}function bu(e,t){let{getRowText:l=a=>{var m,c,d,r;return(r=(m=(c=t.collection).getTextValue)===null||m===void 0?void 0:m.call(c,a))!==null&&r!==void 0?r:(d=t.collection.getItem(a))===null||d===void 0?void 0:d.textValue}}=e,u=_(pu(oe),"@react-aria/grid"),o=t.selectionManager.rawSelection,n=B.useRef(o),i=Rl(()=>{var a;if(!t.selectionManager.isFocused||o===n.current){n.current=o;return}let m=Ee(o,n.current),c=Ee(n.current,o),d=t.selectionManager.selectionBehavior==="replace",r=[];if(t.selectionManager.selectedKeys.size===1&&d){let p=t.selectionManager.selectedKeys.keys().next().value;if(p!=null&&t.collection.getItem(p)){let s=l(p);s&&r.push(u.format("selectedItem",{item:s}))}}else if(m.size===1&&c.size===0){let p=m.keys().next().value;if(p!=null){let s=l(p);s&&r.push(u.format("selectedItem",{item:s}))}}else if(c.size===1&&m.size===0){let p=c.keys().next().value;if(p!=null&&t.collection.getItem(p)){let s=l(p);s&&r.push(u.format("deselectedItem",{item:s}))}}t.selectionManager.selectionMode==="multiple"&&(r.length===0||o==="all"||o.size>1||n.current==="all"||((a=n.current)===null||a===void 0?void 0:a.size)>1)&&r.push(o==="all"?u.format("selectedAll"):u.format("selectedCount",{count:o.size})),r.length>0&&ll(r.join(" ")),n.current=o});Me(()=>{if(t.selectionManager.isFocused)i();else{let a=requestAnimationFrame(i);return()=>cancelAnimationFrame(a)}},[o,t.selectionManager.isFocused])}function Ee(e,t){let l=new Set;if(e==="all"||t==="all")return l;for(let u of e.keys())t.has(u)||l.add(u);return l}function fu(e){return e&&e.__esModule?e.default:e}function hu(e){let t=_(fu(oe),"@react-aria/grid"),l=Vl(),u=(l==="pointer"||l==="virtual"||l==null)&&typeof window<"u"&&"ontouchstart"in window,o=B.useMemo(()=>{let i=e.selectionManager.selectionMode,a=e.selectionManager.selectionBehavior,m;return u&&(m=t.format("longPressToSelect")),a==="replace"&&i!=="none"&&e.hasItemActions?m:void 0},[e.selectionManager.selectionMode,e.selectionManager.selectionBehavior,e.hasItemActions,t,u]);return fe(o)}function vu(e,t,l){let{isVirtualized:u,disallowTypeAhead:o,keyboardDelegate:n,focusMode:i,scrollRef:a,getRowText:m,onRowAction:c,onCellAction:d,escapeKeyBehavior:r="clearSelection",shouldSelectOnPressUp:p}=e,{selectionManager:s}=t;!e["aria-label"]&&!e["aria-labelledby"]&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let b=ze({usage:"search",sensitivity:"base"}),{direction:v}=ue(),g=t.selectionManager.disabledBehavior,x=B.useMemo(()=>n||new yt({collection:t.collection,disabledKeys:t.disabledKeys,disabledBehavior:g,ref:l,direction:v,collator:b,focusMode:i}),[n,t.collection,t.disabledKeys,g,l,v,b,i]),{collectionProps:D}=Ol({ref:l,selectionManager:s,keyboardDelegate:x,isVirtualized:u,scrollRef:a,disallowTypeAhead:o,escapeKeyBehavior:r}),y=pe(e.id);ve.set(t,{keyboardDelegate:x,actions:{onRowAction:c,onCellAction:d},shouldSelectOnPressUp:p});let $=hu({selectionManager:s,hasItemActions:!!(c||d)}),f=Hl(e,{labelable:!0}),E=B.useCallback(C=>{if(s.isFocused){C.currentTarget.contains(C.target)||s.setFocused(!1);return}C.currentTarget.contains(C.target)&&s.setFocused(!0)},[s]),S=B.useMemo(()=>({onBlur:D.onBlur,onFocus:E}),[E,D.onBlur]),A=au(l,{isDisabled:t.collection.size!==0}),k=J(f,{role:"grid",id:y,"aria-multiselectable":s.selectionMode==="multiple"?"true":void 0},t.isKeyboardNavigationDisabled?S:D,t.collection.size===0&&{tabIndex:A?-1:0}||void 0,$);return u&&(k["aria-rowcount"]=t.collection.size,k["aria-colcount"]=t.collection.columnCount),bu({getRowText:m},t),{gridProps:k}}function gu(){return{rowGroupProps:{role:"rowgroup"}}}function $u(e,t,l){var u,o;let{node:n,isVirtualized:i,shouldSelectOnPressUp:a,onAction:m}=e,{actions:c,shouldSelectOnPressUp:d}=ve.get(t),r=c.onRowAction?()=>{var g;return(g=c.onRowAction)===null||g===void 0?void 0:g.call(c,n.key)}:m,{itemProps:p,...s}=je({selectionManager:t.selectionManager,key:n.key,ref:l,isVirtualized:i,shouldSelectOnPressUp:d||a,onAction:r||!(n==null||(u=n.props)===null||u===void 0)&&u.onAction?Ll(n==null||(o=n.props)===null||o===void 0?void 0:o.onAction,r):void 0,isDisabled:t.collection.size===0}),b=t.selectionManager.isSelected(n.key),v={role:"row","aria-selected":t.selectionManager.selectionMode!=="none"?b:void 0,"aria-disabled":s.isDisabled||void 0,...p};return i&&(v["aria-rowindex"]=n.index+1),{rowProps:v,...s}}function ul(e,t,l){let{node:u,isVirtualized:o,focusMode:n="child",shouldSelectOnPressUp:i,onAction:a}=e,{direction:m}=ue(),{keyboardDelegate:c,actions:{onCellAction:d}}=ve.get(t),r=B.useRef(null),p=()=>{if(l.current){let y=ae(l.current);if(n==="child"){if(l.current.contains(document.activeElement)&&l.current!==document.activeElement)return;let $=t.selectionManager.childFocusStrategy==="last"?re(y):y.firstChild();if($){L($);return}}(r.current!=null&&u.key!==r.current||!l.current.contains(document.activeElement))&&L(l.current)}},{itemProps:s,isPressed:b}=je({selectionManager:t.selectionManager,key:u.key,ref:l,isVirtualized:o,focus:p,shouldSelectOnPressUp:i,onAction:d?()=>d(u.key):a,isDisabled:t.collection.size===0}),v=y=>{if(!y.currentTarget.contains(y.target)||t.isKeyboardNavigationDisabled||!l.current||!document.activeElement)return;let $=ae(l.current);switch($.currentNode=document.activeElement,y.key){case"ArrowLeft":{let C=m==="rtl"?$.nextNode():$.previousNode();if(n==="child"&&C===l.current&&(C=null),y.preventDefault(),y.stopPropagation(),C)L(C),Y(C,{containingElement:Z(l.current)});else{var f;if(((f=c.getKeyLeftOf)===null||f===void 0?void 0:f.call(c,u.key))!==u.key){var E;(E=l.current.parentElement)===null||E===void 0||E.dispatchEvent(new KeyboardEvent(y.nativeEvent.type,y.nativeEvent));break}n==="cell"&&m==="rtl"?(L(l.current),Y(l.current,{containingElement:Z(l.current)})):($.currentNode=l.current,C=m==="rtl"?$.firstChild():re($),C&&(L(C),Y(C,{containingElement:Z(l.current)})))}break}case"ArrowRight":{let C=m==="rtl"?$.previousNode():$.nextNode();if(n==="child"&&C===l.current&&(C=null),y.preventDefault(),y.stopPropagation(),C)L(C),Y(C,{containingElement:Z(l.current)});else{var S;if(((S=c.getKeyRightOf)===null||S===void 0?void 0:S.call(c,u.key))!==u.key){var A;(A=l.current.parentElement)===null||A===void 0||A.dispatchEvent(new KeyboardEvent(y.nativeEvent.type,y.nativeEvent));break}n==="cell"&&m==="ltr"?(L(l.current),Y(l.current,{containingElement:Z(l.current)})):($.currentNode=l.current,C=m==="rtl"?re($):$.firstChild(),C&&(L(C),Y(C,{containingElement:Z(l.current)})))}break}case"ArrowUp":case"ArrowDown":if(!y.altKey&&l.current.contains(y.target)){var k;y.stopPropagation(),y.preventDefault(),(k=l.current.parentElement)===null||k===void 0||k.dispatchEvent(new KeyboardEvent(y.nativeEvent.type,y.nativeEvent))}break}},g=y=>{if(r.current=u.key,y.target!==l.current){Ul()||t.selectionManager.setFocusedKey(u.key);return}requestAnimationFrame(()=>{n==="child"&&document.activeElement===l.current&&p()})},x=J(s,{role:"gridcell",onKeyDownCapture:v,"aria-colspan":u.colSpan,"aria-colindex":u.colIndex!=null?u.colIndex+1:void 0,colSpan:o?void 0:u.colSpan,onFocus:g});var D;return o&&(x["aria-colindex"]=((D=u.colIndex)!==null&&D!==void 0?D:u.index)+1),i&&x.tabIndex!=null&&x.onPointerDown==null&&(x.onPointerDown=y=>{let $=y.currentTarget,f=$.getAttribute("tabindex");$.removeAttribute("tabindex"),requestAnimationFrame(()=>{f!=null&&$.setAttribute("tabindex",f)})}),{gridCellProps:x,isPressed:b}}function re(e){let t=null,l=null;do l=e.lastChild(),l&&(t=l);while(l);return t}function yu(e){return e&&e.__esModule?e.default:e}function xu(e,t){let{key:l}=e,u=t.selectionManager,o=pe(),n=!t.selectionManager.canSelectItem(l),i=t.selectionManager.isSelected(l),a=()=>u.toggleSelection(l);const m=_(yu(oe),"@react-aria/grid");return{checkboxProps:{id:o,"aria-label":m.format("select"),isSelected:i,isDisabled:n,onChange:a}}}class Cu extends yt{isCell(t){return t.type==="cell"||t.type==="rowheader"||t.type==="column"}getKeyBelow(t){let l=this.collection.getItem(t);if(!l)return null;if(l.type==="column"){let u=U(z(l,this.collection));if(u)return u.key;let o=this.getFirstKey();return o==null||!this.collection.getItem(o)?null:super.getKeyForItemInRowByIndex(o,l.index)}return super.getKeyBelow(t)}getKeyAbove(t){let l=this.collection.getItem(t);if(!l)return null;if(l.type==="column"){let n=l.parentKey!=null?this.collection.getItem(l.parentKey):null;return n&&n.type==="column"?n.key:null}let u=super.getKeyAbove(t),o=u!=null?this.collection.getItem(u):null;return o&&o.type!=="headerrow"?u:this.isCell(l)?this.collection.columns[l.index].key:this.collection.columns[0].key}findNextColumnKey(t){let l=this.findNextKey(t.key,o=>o.type==="column");if(l!=null)return l;let u=this.collection.headerRows[t.level];for(let o of z(u,this.collection))if(o.type==="column")return o.key;return null}findPreviousColumnKey(t){let l=this.findPreviousKey(t.key,n=>n.type==="column");if(l!=null)return l;let u=this.collection.headerRows[t.level],o=[...z(u,this.collection)];for(let n=o.length-1;n>=0;n--){let i=o[n];if(i.type==="column")return i.key}return null}getKeyRightOf(t){let l=this.collection.getItem(t);return l?l.type==="column"?this.direction==="rtl"?this.findPreviousColumnKey(l):this.findNextColumnKey(l):super.getKeyRightOf(t):null}getKeyLeftOf(t){let l=this.collection.getItem(t);return l?l.type==="column"?this.direction==="rtl"?this.findNextColumnKey(l):this.findPreviousColumnKey(l):super.getKeyLeftOf(t):null}getKeyForSearch(t,l){if(!this.collator)return null;let u=this.collection,o=l??this.getFirstKey();if(o==null)return null;let n=u.getItem(o);var i;n?.type==="cell"&&(o=(i=n.parentKey)!==null&&i!==void 0?i:null);let a=!1;for(;o!=null;){let m=u.getItem(o);if(!m)return null;if(m.textValue){let c=m.textValue.slice(0,t.length);if(this.collator.compare(c,t)===0)return m.key}for(let c of z(m,this.collection)){let d=u.columns[c.index];if(u.rowHeaderColumnKeys.has(d.key)&&c.textValue){let r=c.textValue.slice(0,t.length);if(this.collator.compare(r,t)===0){let p=l!=null?u.getItem(l):n;return p?.type==="cell"?c.key:m.key}}}o=this.getKeyBelow(o),o==null&&!a&&(o=this.getFirstKey(),a=!0)}return null}}function Du(e){return e&&e.__esModule?e.default:e}function Bu(e,t,l){let{keyboardDelegate:u,isVirtualized:o,layoutDelegate:n,layout:i}=e,a=ze({usage:"search",sensitivity:"base"}),{direction:m}=ue(),c=t.selectionManager.disabledBehavior,d=B.useMemo(()=>u||new Cu({collection:t.collection,disabledKeys:t.disabledKeys,disabledBehavior:c,ref:l,direction:m,collator:a,layoutDelegate:n,layout:i}),[u,t.collection,t.disabledKeys,c,l,m,a,n,i]),r=pe(e.id);he.set(t,r);let{gridProps:p}=vu({...e,id:r,keyboardDelegate:d},t,l);o&&(p["aria-rowcount"]=t.collection.size+t.collection.headerRows.length),le()&&"expandedKeys"in t&&(p.role="treegrid");let{column:s,direction:b}=t.sortDescriptor||{},v=_(Du(ne),"@react-aria/table"),g=B.useMemo(()=>{var D,y;let $=(y=(D=t.collection.columns.find(f=>f.key===s))===null||D===void 0?void 0:D.textValue)!==null&&y!==void 0?y:"";return b&&s?v.format(`${b}Sort`,{columnName:$}):void 0},[b,s,t.collection.columns]),x=fe(g);return Me(()=>{g&&ll(g,"assertive",500)},[g]),{gridProps:J(p,x,{"aria-describedby":[x["aria-describedby"],p["aria-describedby"]].filter(Boolean).join(" ")})}}function ku(e){return e&&e.__esModule?e.default:e}function nl(e,t,l){var u,o;let{node:n}=e,i=n.props.allowsSorting,{gridCellProps:a}=ul({...e,focusMode:"child"},t,l),m=n.props.isSelectionCell&&t.selectionManager.selectionMode==="single",{pressProps:c}=Wl({isDisabled:!i||m,onPress(){t.sort(n.key)},ref:l}),{focusableProps:d}=Gl({},l),r,p=((u=t.sortDescriptor)===null||u===void 0?void 0:u.column)===n.key,s=(o=t.sortDescriptor)===null||o===void 0?void 0:o.direction;n.props.allowsSorting&&!Ce()&&(r=p?s:"none");let b=_(ku(ne),"@react-aria/table"),v;i&&(v=`${b.format("sortable")}`,p&&s&&Ce()&&(v=`${v}, ${b.format(s)}`));let g=fe(v),x=t.collection.size===0;return B.useEffect(()=>{x&&t.selectionManager.focusedKey===n.key&&t.selectionManager.setFocusedKey(null)},[x,t.selectionManager,n.key]),{columnHeaderProps:{...J(d,a,c,g,x?{tabIndex:-1}:null),role:"columnheader",id:cu(t,n.key),"aria-colspan":n.colSpan&&n.colSpan>1?n.colSpan:void 0,"aria-sort":r}}}const Se={expand:{ltr:"ArrowRight",rtl:"ArrowLeft"},collapse:{ltr:"ArrowLeft",rtl:"ArrowRight"}};function Eu(e,t,l){let{node:u,isVirtualized:o}=e,{rowProps:n,...i}=$u(e,t,l),{direction:a}=ue();o&&!(le()&&"expandedKeys"in t)?n["aria-rowindex"]=u.index+1+t.collection.headerRows.length:delete n["aria-rowindex"];let m={};if(le()&&"expandedKeys"in t){let f=t.keyMap.get(u.key);if(f!=null){var c,d,r,p,s,b;let E=((c=f.props)===null||c===void 0?void 0:c.UNSTABLE_childItems)||((r=f.props)===null||r===void 0||(d=r.children)===null||d===void 0?void 0:d.length)>t.userColumnCount;var v,g,x,D;m={onKeyDown:S=>{(S.key===Se.expand[a]&&t.selectionManager.focusedKey===f.key&&E&&t.expandedKeys!=="all"&&!t.expandedKeys.has(f.key)||S.key===Se.collapse[a]&&t.selectionManager.focusedKey===f.key&&E&&(t.expandedKeys==="all"||t.expandedKeys.has(f.key)))&&(t.toggleKey(f.key),S.stopPropagation())},"aria-expanded":E?t.expandedKeys==="all"||t.expandedKeys.has(u.key):void 0,"aria-level":f.level,"aria-posinset":((v=f.indexOfType)!==null&&v!==void 0?v:0)+1,"aria-setsize":f.level>1?((x=(p=W((g=(s=t.keyMap.get(f.parentKey))===null||s===void 0?void 0:s.childNodes)!==null&&g!==void 0?g:[]))===null||p===void 0?void 0:p.indexOfType)!==null&&x!==void 0?x:0)+1:((D=(b=W(t.collection.body.childNodes))===null||b===void 0?void 0:b.indexOfType)!==null&&D!==void 0?D:0)+1}}}let y=Yl(u.props),$=i.hasAction?y:{};return{rowProps:{...J(n,m,$),"aria-labelledby":Re(t,u.key)},...i}}function Su(e,t,l){let{node:u,isVirtualized:o}=e,n={role:"row"};return o&&!(le()&&"expandedKeys"in t)&&(n["aria-rowindex"]=u.index+1),{rowProps:n}}function ol(e,t,l){var u;let{gridCellProps:o,isPressed:n}=ul(e,t,l),i=(u=e.node.column)===null||u===void 0?void 0:u.key;return i!=null&&t.collection.rowHeaderColumnKeys.has(i)&&(o.role="rowheader",o.id=Te(t,e.node.parentKey,i)),{gridCellProps:o,isPressed:n}}function Au(e){return e&&e.__esModule?e.default:e}function wu(e,t){let{key:l}=e;const{checkboxProps:u}=xu(e,t);return{checkboxProps:{...u,"aria-labelledby":`${u.id} ${Re(t,l)}`}}}function Nu(e){let{isEmpty:t,isSelectAll:l,selectionMode:u}=e.selectionManager;return{checkboxProps:{"aria-label":_(Au(ne),"@react-aria/table").format(u==="single"?"select":"selectAll"),isSelected:l,isDisabled:u!=="multiple"||e.collection.size===0||e.collection.rows.length===1&&e.collection.rows[0].type==="loader",isIndeterminate:!t&&!l,onChange:()=>e.selectionManager.toggleSelectAll()}}}function ge(){return gu()}var sl=T((e,t)=>{var l,u;const{as:o,className:n,node:i,slots:a,state:m,selectionMode:c,color:d,checkboxesProps:r,disableAnimation:p,classNames:s,...b}=e,v=o||"th",g=typeof v=="string",x=M(t),{columnHeaderProps:D}=nl({node:i},m,x),{isFocusVisible:y,focusProps:$}=X(),{checkboxProps:f}=Nu(m),E=K(s?.th,n,(l=i.props)==null?void 0:l.className),S=c==="single",{onChange:A,...k}=f;return h.jsx(v,{ref:x,"data-focus-visible":w(y),...I(D,$,O(i.props,{enabled:g}),O(b,{enabled:g})),className:(u=a.th)==null?void 0:u.call(a,{class:E}),children:S?h.jsx(be,{children:f["aria-label"]}):h.jsx(Fe,{color:d,disableAnimation:p,onValueChange:A,...I(r,k)})})});sl.displayName="HeroUI.TableSelectAllCheckbox";var il=sl;function zu(e){let{collection:t,focusMode:l}=e,u=e.UNSAFE_selectionState||Zl(e),o=B.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),n=u.setFocusedKey;u.setFocusedKey=(m,c)=>{if(l==="cell"&&m!=null){let b=t.getItem(m);if(b?.type==="item"){var d,r;let v=z(b,t);var p,s;c==="last"?m=(p=(d=W(v))===null||d===void 0?void 0:d.key)!==null&&p!==void 0?p:null:m=(s=(r=U(v))===null||r===void 0?void 0:r.key)!==null&&s!==void 0?s:null}}n(m,c)};let i=B.useMemo(()=>new _l(t,u),[t,u]);const a=B.useRef(null);return B.useEffect(()=>{if(u.focusedKey!=null&&a.current&&!t.getItem(u.focusedKey)){const m=a.current.getItem(u.focusedKey),c=m?.parentKey!=null&&(m.type==="cell"||m.type==="rowheader"||m.type==="column")?a.current.getItem(m.parentKey):m;if(!c){u.setFocusedKey(null);return}const d=a.current.rows,r=t.rows,p=d.length-r.length;let s=Math.min(p>1?Math.max(c.index-p+1,0):c.index,r.length-1),b=null;for(;s>=0;){if(!i.isDisabled(r[s].key)&&r[s].type!=="headerrow"){b=r[s];break}sc.index&&(s=c.index),s--)}if(b){const v=b.hasChildNodes?[...z(b,t)]:[],g=b.hasChildNodes&&c!==m&&m&&m.index{let p=this.keyMap.get(r.key);t.visitNode&&(r=t.visitNode(r)),this.keyMap.set(r.key,r);let s=new Set,b=null,v=!1;if(r.type==="item"){var g;for(let f of r.childNodes)if(((g=f.props)===null||g===void 0?void 0:g.colSpan)!==void 0){v=!0;break}}for(let f of r.childNodes){if(f.type==="cell"&&v){var x,D;f.colspan=(x=f.props)===null||x===void 0?void 0:x.colSpan,f.colSpan=(D=f.props)===null||D===void 0?void 0:D.colSpan;var y,$;f.colIndex=b?((y=b.colIndex)!==null&&y!==void 0?y:b.index)+(($=b.colSpan)!==null&&$!==void 0?$:1):f.index}f.type==="cell"&&f.parentKey==null&&(f.parentKey=r.key),s.add(f.key),b?(b.nextKey=f.key,f.prevKey=b.key):f.prevKey=null,l(f),b=f}if(b&&(b.nextKey=null),p)for(let f of p.childNodes)s.has(f.key)||u(f)},u=r=>{this.keyMap.delete(r.key);for(let p of r.childNodes)this.keyMap.get(p.key)===p&&u(p)},o=null;for(let[r,p]of t.items.entries()){var n,i,a,m,c,d;let s={...p,level:(n=p.level)!==null&&n!==void 0?n:0,key:(i=p.key)!==null&&i!==void 0?i:"row-"+r,type:(a=p.type)!==null&&a!==void 0?a:"row",value:(m=p.value)!==null&&m!==void 0?m:null,hasChildNodes:!0,childNodes:[...p.childNodes],rendered:p.rendered,textValue:(c=p.textValue)!==null&&c!==void 0?c:"",index:(d=p.index)!==null&&d!==void 0?d:r};o?(o.nextKey=s.key,s.prevKey=o.key):s.prevKey=null,this.rows.push(s),l(s),o=s}o&&(o.nextKey=null)}}const rl="row-header-column-"+Math.random().toString(36).slice(2);let de="row-header-column-"+Math.random().toString(36).slice(2);for(;rl===de;)de="row-header-column-"+Math.random().toString(36).slice(2);function Pu(e,t){if(t.length===0)return[];let l=[],u=new Map;for(let d of t){let r=d.parentKey,p=[d];for(;r;){let s=e.get(r);if(!s)break;if(u.has(s)){var o,n;(n=(o=s).colSpan)!==null&&n!==void 0||(o.colSpan=0),s.colSpan++,s.colspan=s.colSpan;let{column:b,index:v}=u.get(s);if(v>p.length)break;for(let g=v;gd.length)),a=Array(i).fill(0).map(()=>[]),m=0;for(let d of l){let r=i-1;for(let p of d){if(p){let s=a[r],b=s.reduce((v,g)=>{var x;return v+((x=g.colSpan)!==null&&x!==void 0?x:1)},0);if(b0&&(s[s.length-1].nextKey=v.key,v.prevKey=s[s.length-1].key),s.push(v)}s.length>0&&(s[s.length-1].nextKey=p.key,p.prevKey=s[s.length-1].key),p.level=r,p.colIndex=m,s.push(p)}r--}m++}let c=0;for(let d of a){let r=d.reduce((p,s)=>{var b;return p+((b=s.colSpan)!==null&&b!==void 0?b:1)},0);if(r({type:"headerrow",key:"headerrow-"+r,index:r,value:null,rendered:null,level:0,hasChildNodes:!0,childNodes:d,textValue:""}))}class Ku extends Fu{*[Symbol.iterator](){yield*this.body.childNodes}get size(){return this._size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let l=this.keyMap.get(t);var u;return(u=l?.prevKey)!==null&&u!==void 0?u:null}getKeyAfter(t){let l=this.keyMap.get(t);var u;return(u=l?.nextKey)!==null&&u!==void 0?u:null}getFirstKey(){var t,l;return(l=(t=U(this.body.childNodes))===null||t===void 0?void 0:t.key)!==null&&l!==void 0?l:null}getLastKey(){var t,l;return(l=(t=W(this.body.childNodes))===null||t===void 0?void 0:t.key)!==null&&l!==void 0?l:null}getItem(t){var l;return(l=this.keyMap.get(t))!==null&&l!==void 0?l:null}at(t){const l=[...this.getKeys()];return this.getItem(l[t])}getChildren(t){return t===this.body.key?this.body.childNodes:super.getChildren(t)}getTextValue(t){let l=this.getItem(t);if(!l)return"";if(l.textValue)return l.textValue;let u=this.rowHeaderColumnKeys;if(u){let o=[];for(let n of l.childNodes){let i=this.columns[n.index];if(u.has(i.key)&&n.textValue&&o.push(n.textValue),o.length===u.size)break}return o.join(" ")}return""}constructor(t,l,u){let o=new Set,n=null,i=[];if(u?.showSelectionCheckboxes){let r={type:"column",key:rl,value:null,textValue:"",level:0,index:u?.showDragButtons?1:0,hasChildNodes:!1,rendered:null,childNodes:[],props:{isSelectionCell:!0}};i.unshift(r)}if(u?.showDragButtons){let r={type:"column",key:de,value:null,textValue:"",level:0,index:0,hasChildNodes:!1,rendered:null,childNodes:[],props:{isDragButtonCell:!0}};i.unshift(r)}let a=[],m=new Map,c=r=>{switch(r.type){case"body":n=r;break;case"column":m.set(r.key,r),r.hasChildNodes||(i.push(r),r.props.isRowHeader&&o.add(r.key));break;case"item":a.push(r);return}for(let p of r.childNodes)c(p)};for(let r of t)c(r);let d=Pu(m,i);if(d.forEach((r,p)=>a.splice(p,0,r)),super({columnCount:i.length,items:a,visitNode:r=>(r.column=i[r.index],r)}),this._size=0,this.columns=i,this.rowHeaderColumnKeys=o,this.body=n,this.headerRows=d,this._size=[...n.childNodes].length,this.rowHeaderColumnKeys.size===0){let r=this.columns.find(p=>{var s,b;return!(!((s=p.props)===null||s===void 0)&&s.isDragButtonCell)&&!(!((b=p.props)===null||b===void 0)&&b.isSelectionCell)});r&&this.rowHeaderColumnKeys.add(r.key)}}}const Iu={ascending:"descending",descending:"ascending"};function ju(e){let[t,l]=B.useState(!1),{selectionMode:u="none",showSelectionCheckboxes:o,showDragButtons:n}=e,i=B.useMemo(()=>({showSelectionCheckboxes:o&&u!=="none",showDragButtons:n,selectionMode:u,columns:[]}),[e.children,o,u,n]),a=ql(e,B.useCallback(r=>new Ku(r,null,i),[i]),i),{disabledKeys:m,selectionManager:c}=zu({...e,collection:a,disabledBehavior:e.disabledBehavior||"selection"});var d;return{collection:a,disabledKeys:m,selectionManager:c,showSelectionCheckboxes:e.showSelectionCheckboxes||!1,sortDescriptor:(d=e.sortDescriptor)!==null&&d!==void 0?d:null,isKeyboardNavigationDisabled:a.size===0||t,setKeyboardNavigationDisabled:l,sort(r,p){var s,b;(b=e.onSortChange)===null||b===void 0||b.call(e,{column:r,direction:p??(((s=e.sortDescriptor)===null||s===void 0?void 0:s.column)===r?Iu[e.sortDescriptor.direction]:"ascending")})}}}function al(e){return null}al.getCollectionNode=function*(t,l){let{children:u,columns:o}=t;if(l.columns=[],typeof u=="function"){if(!o)throw new Error("props.children was a function but props.columns is missing");for(let n of o)yield{type:"column",value:n,renderer:u}}else{let n=[];q.Children.forEach(u,i=>{n.push({type:"column",element:i})}),yield*n}};let Mu=al;function cl(e){return null}cl.getCollectionNode=function*(t){let{children:l,items:u}=t;yield{type:"body",hasChildNodes:!0,props:t,*childNodes(){if(typeof l=="function"){if(!u)throw new Error("props.children was a function but props.items is missing");for(let o of u)yield{type:"item",value:o,renderer:l}}else{let o=[];q.Children.forEach(l,n=>{o.push({type:"item",element:n})}),yield*o}}}};let Tu=cl;function dl(e){return null}dl.getCollectionNode=function*(t,l){let{title:u,children:o,childColumns:n}=t,i=u||o,a=t.textValue||(typeof i=="string"?i:"")||t["aria-label"],m=yield{type:"column",hasChildNodes:!!n||!!u&&q.Children.count(o)>0,rendered:i,textValue:a,props:t,*childNodes(){if(n)for(let d of n)yield{type:"column",value:d};else if(u){let d=[];q.Children.forEach(o,r=>{d.push({type:"column",element:r})}),yield*d}},shouldInvalidate(d){return c(d),!1}},c=d=>{for(let r of m)r.hasChildNodes||d.columns.push(r)};c(l)};let Ru=dl;function me(e){return null}me.getCollectionNode=function*(t,l){let{children:u,textValue:o,UNSTABLE_childItems:n}=t;yield{type:"item",props:t,textValue:o,"aria-label":t["aria-label"],hasChildNodes:!0,*childNodes(){if(l.showDragButtons&&(yield{type:"cell",key:"header-drag",props:{isDragButtonCell:!0}}),l.showSelectionCheckboxes&&l.selectionMode!=="none"&&(yield{type:"cell",key:"header",props:{isSelectionCell:!0}}),typeof u=="function"){for(let i of l.columns)yield{type:"cell",element:u(i.key),key:i.key};if(n)for(let i of n)yield{type:"item",value:i}}else{let i=[],a=[],m=0;if(q.Children.forEach(u,c=>{if(c.type===me){if(i.lengtha.key!==l.columns[m].key)||i.showSelectionCheckboxes!==l.showSelectionCheckboxes||i.showDragButtons!==l.showDragButtons||i.selectionMode!==l.selectionMode}}};let Vu=me;function ml(e){return null}ml.getCollectionNode=function*(t){let{children:l}=t,u=t.textValue||(typeof l=="string"?l:"")||t["aria-label"]||"";yield{type:"cell",props:t,rendered:l,textValue:u,"aria-label":t["aria-label"],hasChildNodes:!1}};let Ou=ml;function pl(e){var t;const l=Jl(),[u,o]=Pe(e,ke.variantKeys),{ref:n,as:i,baseRef:a,children:m,className:c,classNames:d,removeWrapper:r=!1,disableAnimation:p=(t=l?.disableAnimation)!=null?t:!1,isKeyboardNavigationDisabled:s=!1,selectionMode:b="none",topContentPlacement:v="inside",bottomContentPlacement:g="inside",selectionBehavior:x=b==="none"?null:"toggle",disabledBehavior:D="selection",showSelectionCheckboxes:y=b==="multiple"&&x!=="replace",BaseComponent:$="div",checkboxesProps:f,topContent:E,bottomContent:S,sortIcon:A,onRowAction:k,onCellAction:C,...N}=u,j=i||"table",F=typeof j=="string",R=M(n),Q=M(a),G=ju({...e,children:m,showSelectionCheckboxes:y});s&&!G.isKeyboardNavigationDisabled&&G.setKeyboardNavigationDisabled(!0);const{collection:se}=G,{layout:sn,...Fl}=e,{gridProps:$e}=Bu({...Fl},G,R),ee=b!=="none",ye=b==="multiple",H=B.useMemo(()=>ke({...o,isSelectable:ee,isMultiSelectable:ye}),[Ke(o),ee,ye]),xe=K(d?.base,c),Pl=B.useMemo(()=>{var P;return{state:G,slots:H,isSelectable:ee,collection:se,classNames:d,color:e?.color,disableAnimation:p,checkboxesProps:f,isHeaderSticky:(P=e?.isHeaderSticky)!=null?P:!1,selectionMode:b,selectionBehavior:x,disabledBehavior:D,showSelectionCheckboxes:y,onRowAction:k,onCellAction:C}},[H,G,se,ee,d,b,x,f,D,p,y,e?.color,e?.isHeaderSticky,k,C]),Kl=B.useCallback(P=>({...P,ref:Q,className:H.base({class:K(xe,P?.className)})}),[xe,H]),Il=B.useCallback(P=>({...P,ref:Q,className:H.wrapper({class:K(d?.wrapper,P?.className)})}),[d?.wrapper,H]),jl=B.useCallback(P=>({...I($e,O(N,{enabled:F}),P),onKeyDownCapture:void 0,ref:R,className:H.table({class:K(d?.table,P?.className)})}),[d?.table,F,H,$e,N]);return{BaseComponent:$,Component:j,children:m,state:G,collection:se,values:Pl,topContent:E,bottomContent:S,removeWrapper:r,topContentPlacement:v,bottomContentPlacement:g,sortIcon:A,getBaseProps:Kl,getWrapperProps:Il,getTableProps:jl}}var bl=T((e,t)=>{var l,u,o;const{as:n,className:i,node:a,rowKey:m,slots:c,state:d,classNames:r,...p}=e,s=n||"td",b=typeof s=="string",v=M(t),{gridCellProps:g}=ol({node:a},d,v),x=K(r?.td,i,(l=a.props)==null?void 0:l.className),{isFocusVisible:D,focusProps:y}=X(),$=d.selectionManager.isSelected(m),f=B.useMemo(()=>{const S=typeof a.rendered;return S!=="object"&&S!=="function"?h.jsx("span",{children:a.rendered}):a.rendered},[a.rendered]),E=((u=a.column)==null?void 0:u.props)||{};return h.jsx(s,{ref:v,"data-focus-visible":w(D),"data-selected":w($),...I(g,y,O(a.props,{enabled:b}),p),className:(o=c.td)==null?void 0:o.call(c,{align:E.align,class:x}),children:f})});bl.displayName="HeroUI.TableCell";var fl=bl,hl=T((e,t)=>{var l,u;const{as:o,className:n,node:i,rowKey:a,slots:m,state:c,color:d,disableAnimation:r,checkboxesProps:p,selectionMode:s,classNames:b,...v}=e,g=o||"td",x=typeof g=="string",D=M(t),{gridCellProps:y}=ol({node:i},c,D),{isFocusVisible:$,focusProps:f}=X(),{checkboxProps:E}=wu({key:i?.parentKey||i.key},c),S=K(b?.td,n,(l=i.props)==null?void 0:l.className),A=s==="single",{onChange:k,...C}=E,N=c.selectionManager.isSelected(a);return h.jsx(g,{ref:D,"data-focus-visible":w($),"data-selected":w(N),...I(y,f,O(i.props,{enabled:x}),v),className:(u=m.td)==null?void 0:u.call(m,{class:S}),children:A?h.jsx(be,{children:E["aria-label"]}):h.jsx(Fe,{color:d,disableAnimation:r,onValueChange:k,...I(p,C)})})});hl.displayName="HeroUI.TableCheckboxCell";var vl=hl,gl=T((e,t)=>{var l,u;const{as:o,className:n,children:i,node:a,slots:m,state:c,isSelectable:d,classNames:r,...p}=e,s=o||(e?.href?"a":"tr"),b=typeof s=="string",v=M(t),{rowProps:g}=Eu({node:a},c,v),x=K(r?.tr,n,(l=a.props)==null?void 0:l.className),{isFocusVisible:D,focusProps:y}=X(),$=c.disabledKeys.has(a.key),f=c.selectionManager.isSelected(a.key),{isHovered:E,hoverProps:S}=Ie({isDisabled:$}),{isFirst:A,isLast:k,isMiddle:C,isOdd:N}=B.useMemo(()=>{const j=a.key===c.collection.getFirstKey(),F=a.key===c.collection.getLastKey(),R=!j&&!F,Q=a?.index?(a.index+1)%2===0:!1;return{isFirst:j,isLast:F,isMiddle:R,isOdd:Q}},[a,c.collection]);return h.jsx(s,{ref:v,"data-disabled":w($),"data-first":w(A),"data-focus-visible":w(D),"data-hover":w(E),"data-last":w(k),"data-middle":w(C),"data-odd":w(N),"data-selected":w(f),...I(g,y,d?S:{},O(a.props,{enabled:b}),p),className:(u=m.tr)==null?void 0:u.call(m,{class:x}),children:i})});gl.displayName="HeroUI.TableRow";var $l=gl,yl=T((e,t)=>{var l;const{as:u,className:o,slots:n,state:i,collection:a,isSelectable:m,color:c,disableAnimation:d,checkboxesProps:r,selectionMode:p,classNames:s,rowVirtualizer:b,...v}=e,g=u||"tbody",x=typeof g=="string",D=M(t),{rowGroupProps:y}=ge(),$=K(s?.tbody,o),f=a?.body.props,E=f?.isLoading||f?.loadingState==="loading"||f?.loadingState==="loadingMore",S=[...a.body.childNodes],A=b.getVirtualItems();let k,C;return a.size===0&&f.emptyContent&&(k=h.jsx("tr",{role:"row",children:h.jsx("td",{className:n?.emptyWrapper({class:s?.emptyWrapper}),colSpan:a.columnCount,role:"gridcell",children:!E&&f.emptyContent})})),E&&f.loadingContent&&(C=h.jsxs("tr",{role:"row",children:[h.jsx("td",{className:n?.loadingWrapper({class:s?.loadingWrapper}),colSpan:a.columnCount,role:"gridcell",children:f.loadingContent}),!k&&a.size===0?h.jsx("td",{className:n?.emptyWrapper({class:s?.emptyWrapper})}):null]})),h.jsxs(g,{ref:D,...I(y,O(f,{enabled:x}),v),className:(l=n.tbody)==null?void 0:l.call(n,{class:$}),"data-empty":w(a.size===0),"data-loading":w(E),children:[A.map((N,j)=>{const F=S[N.index];return F?h.jsx($l,{classNames:s,isSelectable:m,node:F,slots:n,state:i,style:{transform:`translateY(${N.start-j*N.size}px)`,height:`${N.size}px`},children:[...F.childNodes].map(R=>R.props.isSelectionCell?h.jsx(vl,{checkboxesProps:r,classNames:s,color:c,disableAnimation:d,node:R,rowKey:F.key,selectionMode:p,slots:n,state:i},String(R.key)):h.jsx(fl,{classNames:s,node:R,rowKey:F.key,slots:n,state:i},String(R.key)))},String(F.key)):null}),C,k]})});yl.displayName="HeroUI.VirtualizedTableBody";var Hu=yl,xl=T((e,t)=>{var l,u,o,n,i;const{as:a,className:m,state:c,node:d,slots:r,classNames:p,sortIcon:s,...b}=e,v=a||"th",g=typeof v=="string",x=M(t),{columnHeaderProps:D}=nl({node:d},c,x),y=K(p?.th,m,(l=d.props)==null?void 0:l.className),{isFocusVisible:$,focusProps:f}=X(),{isHovered:E,hoverProps:S}=Ie({}),{hideHeader:A,align:k,...C}=d.props,N=C.allowsSorting,j={"aria-hidden":!0,"data-direction":(u=c.sortDescriptor)==null?void 0:u.direction,"data-visible":w(((o=c.sortDescriptor)==null?void 0:o.column)===d.key),className:(n=r.sortIcon)==null?void 0:n.call(r,{class:p?.sortIcon})},F=typeof s=="function"?s(j):B.isValidElement(s)&&B.cloneElement(s,j);return h.jsxs(v,{ref:x,colSpan:d.colspan,"data-focus-visible":w($),"data-hover":w(E),"data-sortable":w(N),...I(D,f,O(C,{enabled:g}),N?S:{},b),className:(i=r.th)==null?void 0:i.call(r,{align:k,class:y}),children:[A?h.jsx(be,{children:d.rendered}):d.rendered,N&&(F||h.jsx(su,{strokeWidth:3,...j}))]})});xl.displayName="HeroUI.TableColumnHeader";var Cl=xl,Dl=T((e,t)=>{var l,u;const{as:o,className:n,children:i,node:a,slots:m,classNames:c,state:d,...r}=e,p=o||"tr",s=typeof p=="string",b=M(t),{rowProps:v}=Su({node:a},d),g=K(c?.tr,n,(l=a.props)==null?void 0:l.className);return h.jsx(p,{ref:b,...I(v,O(a.props,{enabled:s}),r),className:(u=m.tr)==null?void 0:u.call(m,{class:g}),children:i})});Dl.displayName="HeroUI.TableHeaderRow";var Bl=Dl,kl=B.forwardRef((e,t)=>{var l;const{as:u,className:o,children:n,slots:i,classNames:a,...m}=e,c=u||"thead",d=M(t),{rowGroupProps:r}=ge(),p=K(a?.thead,o);return h.jsx(c,{ref:d,className:(l=i.thead)==null?void 0:l.call(i,{class:p}),...I(r,m),children:n})});kl.displayName="HeroUI.TableRowGroup";var El=kl,Lu={px:"1px",0:"0px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},Ae=e=>{var t;return(t=Lu[e])!=null?t:e};function Uu(e){const[t,l]=Pe(e,Be.variantKeys),{as:u,className:o,x:n=1,y:i=1,...a}=t,m=u||"span",c=B.useMemo(()=>Be({...l,className:o}),[Ke(l),o]),d=Ae(n),r=Ae(i);return{Component:m,getSpacerProps:(s={})=>({...s,...a,"aria-hidden":w(!0),className:K(c,s.className),style:{...s.style,...a.style,marginLeft:d,marginTop:r}})}}var Sl=T((e,t)=>{const{Component:l,getSpacerProps:u}=Uu({...e});return h.jsx(l,{ref:t,...u()})});Sl.displayName="HeroUI.Spacer";var Al=Sl,wl=T((e,t)=>{const{BaseComponent:l,Component:u,collection:o,values:n,topContent:i,topContentPlacement:a,bottomContentPlacement:m,bottomContent:c,getBaseProps:d,getWrapperProps:r,getTableProps:p}=pl({...e,ref:t}),{rowHeight:s=40,maxTableHeight:b=600}=e,v=B.useCallback(({children:A})=>h.jsx(l,{...r(),ref:D,style:{height:b,display:"block"},children:A}),[r,b]),x=[...o.body.childNodes].length,D=B.useRef(null),[y,$]=B.useState(0),f=B.useRef(null);B.useLayoutEffect(()=>{f.current&&$(f.current.getBoundingClientRect().height)},[f]);const E=iu({count:x,getScrollElement:()=>D.current,estimateSize:()=>s,overscan:5}),S=p();return h.jsxs("div",{...d(),children:[a==="outside"&&i,h.jsx(v,{children:h.jsxs(h.Fragment,{children:[a==="inside"&&i,h.jsxs(u,{...S,style:{height:`calc(${E.getTotalSize()+y}px)`,...S.style},children:[h.jsxs(El,{ref:f,classNames:n.classNames,slots:n.slots,children:[o.headerRows.map(A=>h.jsx(Bl,{classNames:n.classNames,node:A,slots:n.slots,state:n.state,children:[...A.childNodes].map(k=>{var C;return(C=k?.props)!=null&&C.isSelectionCell?h.jsx(il,{checkboxesProps:n.checkboxesProps,classNames:n.classNames,color:n.color,disableAnimation:n.disableAnimation,node:k,selectionMode:n.selectionMode,slots:n.slots,state:n.state},k?.key):h.jsx(Cl,{classNames:n.classNames,node:k,slots:n.slots,state:n.state},k?.key)})},A?.key)),h.jsx(Al,{as:"tr",tabIndex:-1,y:1})]}),h.jsx(Hu,{checkboxesProps:n.checkboxesProps,classNames:n.classNames,collection:n.collection,color:n.color,disableAnimation:n.disableAnimation,isSelectable:n.isSelectable,rowVirtualizer:E,selectionMode:n.selectionMode,slots:n.slots,state:n.state})]}),m==="inside"&&c]})}),m==="outside"&&c]})});wl.displayName="HeroUI.VirtualizedTable";var Wu=wl,Nl=T((e,t)=>{var l;const{as:u,className:o,slots:n,state:i,collection:a,isSelectable:m,color:c,disableAnimation:d,checkboxesProps:r,selectionMode:p,classNames:s,...b}=e,v=u||"tbody",g=typeof v=="string",x=M(t),{rowGroupProps:D}=ge(),y=K(s?.tbody,o),$=a?.body.props,f=$?.isLoading||$?.loadingState==="loading"||$?.loadingState==="loadingMore",E=B.useMemo(()=>[...a.body.childNodes].map(k=>h.jsx($l,{classNames:s,isSelectable:m,node:k,slots:n,state:i,children:[...k.childNodes].map(C=>C.props.isSelectionCell?h.jsx(vl,{checkboxesProps:r,classNames:s,color:c,disableAnimation:d,node:C,rowKey:k.key,selectionMode:p,slots:n,state:i},C.key):h.jsx(fl,{classNames:s,node:C,rowKey:k.key,slots:n,state:i},C.key))},k.key)),[a.body.childNodes,s,m,n,i]);let S,A;return a.size===0&&$.emptyContent&&(S=h.jsx("tr",{role:"row",children:h.jsx("td",{className:n?.emptyWrapper({class:s?.emptyWrapper}),colSpan:a.columnCount,role:"gridcell",children:!f&&$.emptyContent})})),f&&$.loadingContent&&(A=h.jsxs("tr",{role:"row",children:[h.jsx("td",{className:n?.loadingWrapper({class:s?.loadingWrapper}),colSpan:a.columnCount,role:"gridcell",children:$.loadingContent}),!S&&a.size===0?h.jsx("td",{className:n?.emptyWrapper({class:s?.emptyWrapper})}):null]})),h.jsxs(v,{ref:x,...I(D,O($,{enabled:g}),b),className:(l=n.tbody)==null?void 0:l.call(n,{class:y}),"data-empty":w(a.size===0),"data-loading":w(f),children:[E,A,S]})});Nl.displayName="HeroUI.TableBody";var Gu=Nl,zl=T((e,t)=>{const{BaseComponent:l,Component:u,collection:o,values:n,topContent:i,topContentPlacement:a,bottomContentPlacement:m,bottomContent:c,removeWrapper:d,sortIcon:r,getBaseProps:p,getWrapperProps:s,getTableProps:b}=pl({...e,ref:t}),{isVirtualized:v,rowHeight:g=40,maxTableHeight:x=600}=e,D=v,y=B.useCallback(({children:$})=>d?$:h.jsx(l,{...s(),children:$}),[d,s]);return D?h.jsx(Wu,{...e,ref:t,maxTableHeight:x,rowHeight:g}):h.jsxs("div",{...p(),children:[a==="outside"&&i,h.jsx(y,{children:h.jsxs(h.Fragment,{children:[a==="inside"&&i,h.jsxs(u,{...b(),children:[h.jsxs(El,{classNames:n.classNames,slots:n.slots,children:[o.headerRows.map($=>h.jsx(Bl,{classNames:n.classNames,node:$,slots:n.slots,state:n.state,children:[...$.childNodes].map(f=>{var E;return(E=f?.props)!=null&&E.isSelectionCell?h.jsx(il,{checkboxesProps:n.checkboxesProps,classNames:n.classNames,color:n.color,disableAnimation:n.disableAnimation,node:f,selectionMode:n.selectionMode,slots:n.slots,state:n.state},f?.key):h.jsx(Cl,{classNames:n.classNames,node:f,slots:n.slots,sortIcon:r,state:n.state},f?.key)})},$?.key)),h.jsx(Al,{as:"tr",tabIndex:-1,y:1})]}),h.jsx(Gu,{checkboxesProps:n.checkboxesProps,classNames:n.classNames,collection:n.collection,color:n.color,disableAnimation:n.disableAnimation,isSelectable:n.isSelectable,selectionMode:n.selectionMode,slots:n.slots,state:n.state})]}),m==="inside"&&c]})}),m==="outside"&&c]})});zl.displayName="HeroUI.Table";var Yu=zl,Zu=Ru,_u=Zu,qu=Mu,Ju=qu,Xu=Vu,Qu=Xu,en=Tu,tn=en,ln=Ou,un=ln;const nn={n_requests:"Number Of Requests",estimated_cost:"Estimated Cost ($)"},we=["model","n_requests","prompt_tokens","completion_tokens","total_tokens","estimated_cost"];function on(e){return e.replace(/(-?)(\d*)\.?(\d*)e([+-]\d+)/,function(t,l,u,o,n){return n<0?l+"0."+Array(1-n-u.length).join("0")+o+u:l+u+o+Array(n-o.length+1).join("0")})}function mn({usage:e}){const t=Object.keys(e),{isOpen:l,onOpen:u,onClose:o}=Xl(),n=()=>{o()},i=Object.keys(e[t[0]]),a=[...we.filter(s=>s==="model"||i.includes(s)),...i.filter(s=>!we.includes(s))],m=i.reduce((s,b)=>({...s,[b]:0}),{}),c=t.reduce((s,b)=>(a.reduce((v,g)=>(g==="model"||(v[g]+=e[b][g]),v),s),s),m),d=[...a.map(s=>({key:s,label:nn[s]??De.words(s).map(De.upperFirst).join(" ")}))],r=[...t.map(s=>({model:s,...e[s]})),{model:"Total",...c}],p=h.jsxs("div",{className:"p-2",children:[h.jsxs("div",{className:"flex flex-col gap-2",children:[c.prompt_tokens!==void 0&&h.jsxs("div",{className:"flex justify-between gap-2",children:[h.jsx("span",{className:"font-semibold",children:"Prompt tokens"}),h.jsx("span",{children:c.prompt_tokens})]}),c.completion_tokens!==void 0&&h.jsxs("div",{className:"flex justify-between gap-2",children:[h.jsx("span",{className:"font-semibold",children:"Completion tokens"}),h.jsx("span",{children:c.completion_tokens})]}),c.total_tokens!==void 0&&h.jsxs("div",{className:"flex justify-between gap-2",children:[h.jsx("span",{className:"font-semibold",children:"Total tokens"}),h.jsx("span",{children:c.total_tokens})]}),c.estimated_cost!==void 0&&h.jsxs("div",{className:"flex justify-between gap-2",children:[h.jsx("span",{className:"font-semibold",children:"Estimated cost"}),h.jsxs("span",{children:[on(c.estimated_cost.toString()),"$"]})]})]}),h.jsx("p",{className:"m-auto mt-2 text-center",children:"Show detailed usage breakdown by model."})]});return h.jsxs(h.Fragment,{children:[h.jsx(Ql,{content:p,placement:"bottom",children:h.jsx(eu,{isIconOnly:!0,variant:"ghost",className:"p-0","aria-label":"Open usage details",onPress:u,children:h.jsx(tu,{icon:"heroicons:information-circle"})})}),h.jsx(lu,{isOpen:l,onOpenChange:n,size:"4xl",children:h.jsx(uu,{children:h.jsxs(h.Fragment,{children:[h.jsx(ru,{className:"text-default-900 flex flex-col gap-1",children:"Usage details"}),h.jsx(nu,{children:h.jsxs(Yu,{"aria-label":"Table with detailed usage statistics for each model used to generate the message.",fullWidth:!0,children:[h.jsx(Ju,{columns:d,children:s=>h.jsx(_u,{children:s.label},s.key)}),h.jsx(tn,{items:r,children:s=>h.jsx(Qu,{className:s.model==="Total"?"border-default-200 border-t-1":"",children:b=>h.jsx(un,{children:ou(s,b)})},s.model)})]})})]})})})]})}export{mn as default};
diff --git a/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/authStore-w3touTBX.js b/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/authStore-Dtjh8LvS.js
similarity index 91%
rename from packages/ragbits-chat/src/ragbits/chat/ui-build/assets/authStore-w3touTBX.js
rename to packages/ragbits-chat/src/ragbits/chat/ui-build/assets/authStore-Dtjh8LvS.js
index 92e38962b..4dc5ead5c 100644
--- a/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/authStore-w3touTBX.js
+++ b/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/authStore-Dtjh8LvS.js
@@ -1 +1 @@
-import{bu as u,bv as l,bw as c}from"./index-aPw21Xcf.js";const h=e=>({user_id:e.user_id,email:e.email}),d=u(l(c((e,i)=>({user:null,token:null,isAuthenticated:!1,tokenExpiration:null,hasHydrated:!1,onRehydrated:()=>{const{token:t,tokenExpiration:o,logout:n}=i(),a=Date.now(),s=(o??0)-a;!t||s<=0?n():e(r=>{r.isAuthenticated=!0}),e(r=>{r.hasHydrated=!0})},login:(t,o)=>e(n=>{n.user=t,n.token=o,n.tokenExpiration=Date.now()+o.expires_in*1e3,n.isAuthenticated=!0}),logout:()=>e(t=>{t.user=null,t.token=null,t.isAuthenticated=!1})})),{name:"ragbits-auth",partialize:e=>({token:e.token,tokenExpiration:e.tokenExpiration,user:e.user?h(e.user):null}),merge:(e,i)=>({...i,...e,isAuthenticated:!1}),onRehydrateStorage:e=>()=>{e.onRehydrated()}}));export{d as a};
+import{bu as u,bv as l,bw as c}from"./index-anmhb6wk.js";const h=e=>({user_id:e.user_id,email:e.email}),d=u(l(c((e,i)=>({user:null,token:null,isAuthenticated:!1,tokenExpiration:null,hasHydrated:!1,onRehydrated:()=>{const{token:t,tokenExpiration:o,logout:n}=i(),a=Date.now(),s=(o??0)-a;!t||s<=0?n():e(r=>{r.isAuthenticated=!0}),e(r=>{r.hasHydrated=!0})},login:(t,o)=>e(n=>{n.user=t,n.token=o,n.tokenExpiration=Date.now()+o.expires_in*1e3,n.isAuthenticated=!0}),logout:()=>e(t=>{t.user=null,t.token=null,t.isAuthenticated=!1})})),{name:"ragbits-auth",partialize:e=>({token:e.token,tokenExpiration:e.tokenExpiration,user:e.user?h(e.user):null}),merge:(e,i)=>({...i,...e,isAuthenticated:!1}),onRehydrateStorage:e=>()=>{e.onRehydrated()}}));export{d as a};
diff --git a/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/chunk-IGSAU2ZA-CZpYjJJG.js b/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/chunk-IGSAU2ZA-DCwEaDm9.js
similarity index 84%
rename from packages/ragbits-chat/src/ragbits/chat/ui-build/assets/chunk-IGSAU2ZA-CZpYjJJG.js
rename to packages/ragbits-chat/src/ragbits/chat/ui-build/assets/chunk-IGSAU2ZA-DCwEaDm9.js
index eabec6a18..58229096f 100644
--- a/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/chunk-IGSAU2ZA-CZpYjJJG.js
+++ b/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/chunk-IGSAU2ZA-DCwEaDm9.js
@@ -1 +1 @@
-import{l as h,be as p,R as x,r as i,j as M,Z as R}from"./index-aPw21Xcf.js";var s=h((r,o)=>{const{as:t,children:d,className:l,...n}=r,{slots:c,classNames:a,headerId:m,setHeaderMounted:e}=p(),f=x(o),u=t||"header";return i.useEffect(()=>(e(!0),()=>e(!1)),[e]),M.jsx(u,{ref:f,className:c.header({class:R(a?.header,l)}),id:m,...n,children:d})});s.displayName="HeroUI.ModalHeader";var N=s;export{N as m};
+import{l as h,be as p,R as x,r as i,j as M,Z as R}from"./index-anmhb6wk.js";var s=h((r,o)=>{const{as:t,children:d,className:l,...n}=r,{slots:c,classNames:a,headerId:m,setHeaderMounted:e}=p(),f=x(o),u=t||"header";return i.useEffect(()=>(e(!0),()=>e(!1)),[e]),M.jsx(u,{ref:f,className:c.header({class:R(a?.header,l)}),id:m,...n,children:d})});s.displayName="HeroUI.ModalHeader";var N=s;export{N as m};
diff --git a/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/chunk-SSA7SXE4-26fqANp7.js b/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/chunk-SSA7SXE4-D2nwPcpz.js
similarity index 89%
rename from packages/ragbits-chat/src/ragbits/chat/ui-build/assets/chunk-SSA7SXE4-26fqANp7.js
rename to packages/ragbits-chat/src/ragbits/chat/ui-build/assets/chunk-SSA7SXE4-D2nwPcpz.js
index 4c8eefecf..7c9f3d162 100644
--- a/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/chunk-SSA7SXE4-26fqANp7.js
+++ b/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/chunk-SSA7SXE4-D2nwPcpz.js
@@ -1 +1 @@
-import{l as y,bo as D,j as e,r as t,am as N}from"./index-aPw21Xcf.js";var E=y((B,H)=>{const{Component:L,label:u,description:r,isClearable:d,startContent:c,endContent:h,labelPlacement:O,hasHelper:x,isOutsideLeft:j,isOutsideTop:g,shouldLabelBeOutside:m,errorMessage:s,isInvalid:P,getBaseProps:w,getLabelProps:F,getInputProps:v,getInnerWrapperProps:b,getInputWrapperProps:o,getMainWrapperProps:C,getHelperWrapperProps:I,getDescriptionProps:l,getErrorMessageProps:i,getClearButtonProps:f}=D({...B,ref:H}),n=u?e.jsx("label",{...F(),children:u}):null,M=t.useMemo(()=>d?e.jsx("button",{...f(),children:h||e.jsx(N,{})}):h,[d,f]),p=t.useMemo(()=>{const W=P&&s;return!x||!(W||r)?null:e.jsx("div",{...I(),children:W?e.jsx("div",{...i(),children:s}):e.jsx("div",{...l(),children:r})})},[x,P,s,r,I,i,l]),a=t.useMemo(()=>e.jsxs("div",{...b(),children:[c,e.jsx("input",{...v()}),M]}),[c,M,v,b]),R=t.useMemo(()=>m?e.jsxs("div",{...C(),children:[e.jsxs("div",{...o(),children:[!j&&!g?n:null,a]}),p]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{...o(),children:[n,a]}),p]}),[O,p,m,n,a,s,r,C,o,i,l]);return e.jsxs(L,{...w(),children:[j||g?n:null,R]})});E.displayName="HeroUI.Input";var U=E;export{U as i};
+import{l as y,bo as D,j as e,r as t,am as N}from"./index-anmhb6wk.js";var E=y((B,H)=>{const{Component:L,label:u,description:r,isClearable:d,startContent:c,endContent:h,labelPlacement:O,hasHelper:x,isOutsideLeft:j,isOutsideTop:g,shouldLabelBeOutside:m,errorMessage:s,isInvalid:P,getBaseProps:w,getLabelProps:F,getInputProps:v,getInnerWrapperProps:b,getInputWrapperProps:o,getMainWrapperProps:C,getHelperWrapperProps:I,getDescriptionProps:l,getErrorMessageProps:i,getClearButtonProps:f}=D({...B,ref:H}),n=u?e.jsx("label",{...F(),children:u}):null,M=t.useMemo(()=>d?e.jsx("button",{...f(),children:h||e.jsx(N,{})}):h,[d,f]),p=t.useMemo(()=>{const W=P&&s;return!x||!(W||r)?null:e.jsx("div",{...I(),children:W?e.jsx("div",{...i(),children:s}):e.jsx("div",{...l(),children:r})})},[x,P,s,r,I,i,l]),a=t.useMemo(()=>e.jsxs("div",{...b(),children:[c,e.jsx("input",{...v()}),M]}),[c,M,v,b]),R=t.useMemo(()=>m?e.jsxs("div",{...C(),children:[e.jsxs("div",{...o(),children:[!j&&!g?n:null,a]}),p]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{...o(),children:[n,a]}),p]}),[O,p,m,n,a,s,r,C,o,i,l]);return e.jsxs(L,{...w(),children:[j||g?n:null,R]})});E.displayName="HeroUI.Input";var U=E;export{U as i};
diff --git a/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/index-BMhtIjmr.js b/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/index-BAUrj1ow.js
similarity index 99%
rename from packages/ragbits-chat/src/ragbits/chat/ui-build/assets/index-BMhtIjmr.js
rename to packages/ragbits-chat/src/ragbits/chat/ui-build/assets/index-BAUrj1ow.js
index b50547979..a03e0c448 100644
--- a/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/index-BMhtIjmr.js
+++ b/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/index-BAUrj1ow.js
@@ -1,4 +1,4 @@
-import{j as E,r as x,bd as I}from"./index-aPw21Xcf.js";var L=({strokeWidth:o=1.5,...l})=>E.jsx("svg",{"aria-hidden":"true",fill:"none",focusable:"false",height:"1em",role:"presentation",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:o,viewBox:"0 0 24 24",width:"1em",...l,children:E.jsx("path",{d:"m6 9 6 6 6-6"})});function g(o,l,e){let s=e.initialDeps??[],t;return()=>{var n,i,r,h;let c;e.key&&((n=e.debug)!=null&&n.call(e))&&(c=Date.now());const a=o();if(!(a.length!==s.length||a.some((m,f)=>s[f]!==m)))return t;s=a;let d;if(e.key&&((i=e.debug)!=null&&i.call(e))&&(d=Date.now()),t=l(...a),e.key&&((r=e.debug)!=null&&r.call(e))){const m=Math.round((Date.now()-c)*100)/100,f=Math.round((Date.now()-d)*100)/100,v=f/16,b=(u,z)=>{for(u=String(u);u.lengthE.jsx("svg",{"aria-hidden":"true",fill:"none",focusable:"false",height:"1em",role:"presentation",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:o,viewBox:"0 0 24 24",width:"1em",...l,children:E.jsx("path",{d:"m6 9 6 6 6-6"})});function g(o,l,e){let s=e.initialDeps??[],t;return()=>{var n,i,r,h;let c;e.key&&((n=e.debug)!=null&&n.call(e))&&(c=Date.now());const a=o();if(!(a.length!==s.length||a.some((m,f)=>s[f]!==m)))return t;s=a;let d;if(e.key&&((i=e.debug)!=null&&i.call(e))&&(d=Date.now()),t=l(...a),e.key&&((r=e.debug)!=null&&r.call(e))){const m=Math.round((Date.now()-c)*100)/100,f=Math.round((Date.now()-d)*100)/100,v=f/16,b=(u,z)=>{for(u=String(u);u.lengthMath.abs(o-l)<1,C=(o,l,e)=>{let s;return function(...t){o.clearTimeout(s),s=o.setTimeout(()=>l.apply(this,t),e)}},T=o=>o,R=o=>{const l=Math.max(o.startIndex-o.overscan,0),e=Math.min(o.endIndex+o.overscan,o.count-1),s=[];for(let t=l;t<=e;t++)s.push(t);return s},_=(o,l)=>{const e=o.scrollElement;if(!e)return;const s=o.targetWindow;if(!s)return;const t=i=>{const{width:r,height:h}=i;l({width:Math.round(r),height:Math.round(h)})};if(t(e.getBoundingClientRect()),!s.ResizeObserver)return()=>{};const n=new s.ResizeObserver(i=>{const r=i[0];if(r?.borderBoxSize){const h=r.borderBoxSize[0];if(h){t({width:h.inlineSize,height:h.blockSize});return}}t(e.getBoundingClientRect())});return n.observe(e,{box:"border-box"}),()=>{n.unobserve(e)}},w={passive:!0},k=typeof window>"u"?!0:"onscrollend"in window,D=(o,l)=>{const e=o.scrollElement;if(!e)return;const s=o.targetWindow;if(!s)return;let t=0;const n=o.options.useScrollendEvent&&k?()=>{}:C(s,()=>{l(t,!1)},o.options.isScrollingResetDelay),i=c=>()=>{const{horizontal:a,isRtl:p}=o.options;t=a?e.scrollLeft*(p&&-1||1):e.scrollTop,n(),l(t,c)},r=i(!0),h=i(!1);return h(),e.addEventListener("scroll",r,w),e.addEventListener("scrollend",h,w),()=>{e.removeEventListener("scroll",r),e.removeEventListener("scrollend",h)}},F=(o,l,e)=>{if(l?.borderBoxSize){const s=l.borderBoxSize[0];if(s)return Math.round(s[e.options.horizontal?"inlineSize":"blockSize"])}return Math.round(o.getBoundingClientRect()[e.options.horizontal?"width":"height"])},j=(o,{adjustments:l=0,behavior:e},s)=>{var t,n;const i=o+l;(n=(t=s.scrollElement)==null?void 0:t.scrollTo)==null||n.call(t,{[s.options.horizontal?"left":"top"]:i,behavior:e})};class A{constructor(l){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null;const s=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(t=>{t.forEach(n=>{this._measureElement(n.target,n)})}));return{disconnect:()=>{var t;(t=s())==null||t.disconnect(),e=null},observe:t=>{var n;return(n=s())==null?void 0:n.observe(t,{box:"border-box"})},unobserve:t=>{var n;return(n=s())==null?void 0:n.unobserve(t)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([s,t])=>{typeof t>"u"&&delete e[s]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:T,rangeExtractor:R,onChange:()=>{},measureElement:F,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!0,...e}},this.notify=e=>{var s,t;(t=(s=this.options).onChange)==null||t.call(s,this,e)},this.maybeNotify=g(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;const s=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==s){if(this.cleanup(),!s){this.maybeNotify();return}this.scrollElement=s,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((e=this.scrollElement)==null?void 0:e.window)??null,this.elementsCache.forEach(t=>{this.observer.observe(t)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,t=>{this.scrollRect=t,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(t,n)=>{this.scrollAdjustments=0,this.scrollDirection=n?this.getScrollOffset()this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,s)=>{const t=new Map,n=new Map;for(let i=s-1;i>=0;i--){const r=e[i];if(t.has(r.lane))continue;const h=n.get(r.lane);if(h==null||r.end>h.end?n.set(r.lane,r):r.endi.end===r.end?i.index-r.index:i.end-r.end)[0]:void 0},this.getMeasurementOptions=g(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(e,s,t,n,i)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:s,scrollMargin:t,getItemKey:n,enabled:i}),{key:!1}),this.getMeasurements=g(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:s,scrollMargin:t,getItemKey:n,enabled:i},r)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(a=>{this.itemSizeCache.set(a.key,a.size)}));const h=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const c=this.measurementsCache.slice(0,h);for(let a=h;athis.options.debug}),this.calculateRange=g(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(e,s,t)=>this.range=e.length>0&&s>0?W({measurements:e,outerSize:s,scrollOffset:t}):null,{key:!1,debug:()=>this.options.debug}),this.getIndexes=g(()=>{let e=null,s=null;const t=this.calculateRange();return t&&(e=t.startIndex,s=t.endIndex),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,s]},(e,s,t,n,i)=>n===null||i===null?[]:e({startIndex:n,endIndex:i,overscan:s,count:t}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{const s=this.options.indexAttribute,t=e.getAttribute(s);return t?parseInt(t,10):(console.warn(`Missing attribute name '${s}={index}' on measured element.`),-1)},this._measureElement=(e,s)=>{const t=this.indexFromElement(e),n=this.measurementsCache[t];if(!n)return;const i=n.key,r=this.elementsCache.get(i);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(i,e)),e.isConnected&&this.resizeItem(t,this.options.measureElement(e,s,this))},this.resizeItem=(e,s)=>{const t=this.measurementsCache[e];if(!t)return;const n=this.itemSizeCache.get(t.key)??t.size,i=s-n;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(t,i,this):t.start{if(!e){this.elementsCache.forEach((s,t)=>{s.isConnected||(this.observer.unobserve(s),this.elementsCache.delete(t))});return}this._measureElement(e,void 0)},this.getVirtualItems=g(()=>[this.getIndexes(),this.getMeasurements()],(e,s)=>{const t=[];for(let n=0,i=e.length;nthis.options.debug}),this.getVirtualItemForOffset=e=>{const s=this.getMeasurements();if(s.length!==0)return S(s[O(0,s.length-1,t=>S(s[t]).start,e)])},this.getOffsetForAlignment=(e,s)=>{const t=this.getSize(),n=this.getScrollOffset();s==="auto"&&e>=n+t&&(s="end"),s==="end"&&(e-=t);const i=this.options.horizontal?"scrollWidth":"scrollHeight",h=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[i]:this.scrollElement[i]:0)-t;return Math.max(Math.min(h,e),0)},this.getOffsetForIndex=(e,s="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const t=this.measurementsCache[e];if(!t)return;const n=this.getSize(),i=this.getScrollOffset();if(s==="auto")if(t.end>=i+n-this.options.scrollPaddingEnd)s="end";else if(t.start<=i+this.options.scrollPaddingStart)s="start";else return[i,s];const r=t.start-this.options.scrollPaddingStart+(t.size-n)/2;switch(s){case"center":return[this.getOffsetForAlignment(r,s),s];case"end":return[this.getOffsetForAlignment(t.end+this.options.scrollPaddingEnd,s),s];default:return[this.getOffsetForAlignment(t.start-this.options.scrollPaddingStart,s),s]}},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(e,{align:s="start",behavior:t}={})=>{this.cancelScrollToIndex(),t==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,s),{adjustments:void 0,behavior:t})},this.scrollToIndex=(e,{align:s="auto",behavior:t}={})=>{e=Math.max(0,Math.min(e,this.options.count-1)),this.cancelScrollToIndex(),t==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const n=this.getOffsetForIndex(e,s);if(!n)return;const[i,r]=n;this._scrollToOffset(i,{adjustments:void 0,behavior:t}),t!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(e))){const[c]=S(this.getOffsetForIndex(e,r));y(c,this.getScrollOffset())||this.scrollToIndex(e,{align:r,behavior:t})}else this.scrollToIndex(e,{align:r,behavior:t})}))},this.scrollBy=(e,{behavior:s}={})=>{this.cancelScrollToIndex(),s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adjustments:void 0,behavior:s})},this.getTotalSize=()=>{var e;const s=this.getMeasurements();let t;return s.length===0?t=this.options.paddingStart:t=this.options.lanes===1?((e=s[s.length-1])==null?void 0:e.end)??0:Math.max(...s.slice(-this.options.lanes).map(n=>n.end)),Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:s,behavior:t})=>{this.options.scrollToFn(e,{behavior:t,adjustments:s},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(l)}}const O=(o,l,e,s)=>{for(;o<=l;){const t=(o+l)/2|0,n=e(t);if(ns)l=t-1;else return t}return o>0?o-1:0};function W({measurements:o,outerSize:l,scrollOffset:e}){const s=o.length-1,n=O(0,s,r=>o[r].start,e);let i=n;for(;i({}),{})[1],e={...o,onChange:(t,n)=>{var i;n?I.flushSync(l):l(),(i=o.onChange)==null||i.call(o,t,n)}},[s]=x.useState(()=>new A(e));return s.setOptions(e),M(()=>s._didMount(),[]),M(()=>s._willUpdate()),s}function N(o){return B({observeElementRect:_,observeElementOffset:D,scrollToFn:j,...o})}export{L as C,N as u};
diff --git a/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/index-BoBogvMe.js b/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/index-BoBogvMe.js
deleted file mode 100644
index d82c2b02e..000000000
--- a/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/index-BoBogvMe.js
+++ /dev/null
@@ -1 +0,0 @@
-import{bx as a,by as e,bz as t}from"./index-aPw21Xcf.js";const n={renderer:t,...e,...a};var o=n;export{o as default};
diff --git a/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/index-CN_ylOby.js b/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/index-CN_ylOby.js
new file mode 100644
index 000000000..5d7acaba9
--- /dev/null
+++ b/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/index-CN_ylOby.js
@@ -0,0 +1 @@
+import{bx as a,by as e,bz as t}from"./index-anmhb6wk.js";const n={renderer:t,...e,...a};var o=n;export{o as default};
diff --git a/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/index-V0bFpjmJ.js b/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/index-CYAMgynD.js
similarity index 99%
rename from packages/ragbits-chat/src/ragbits/chat/ui-build/assets/index-V0bFpjmJ.js
rename to packages/ragbits-chat/src/ragbits/chat/ui-build/assets/index-CYAMgynD.js
index 8022cbfb8..3ab49beff 100644
--- a/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/index-V0bFpjmJ.js
+++ b/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/index-CYAMgynD.js
@@ -1,5 +1,5 @@
-const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BoBogvMe.js","assets/index-aPw21Xcf.js","assets/index-DlZV-Rce.css"])))=>i.map(i=>d[i]);
-import{t as P_,k as Qc,l as kr,r as H,$ as O_,j as A,L as Ry,_ as E_,n as xy,T as qy,o as A_,q as ed,s as C_,v as qe,w as I_,x as T_,y as R_,z as x_,A as q_,B as j_,E as N_,G as D_,H as Ou,J as Ir,K as Eu,M as jy,N as F_,O as Au,P as M_,Q as Cu,R as Gn,S as k_,U as Ny,V as L_,W as du,X as Iu,Y as U_,Z as Ee,a0 as Tu,a1 as V_,a2 as be,a3 as Tr,a4 as K_,a5 as B_,a6 as z_,a7 as W_,a8 as H_,a9 as G_,aa as Y_,ab as J_,ac as td,ad as X_,ae as Z_,af as rd,ag as Q_,ah as e0,ai as t0,aj as r0,ak as nd,al as n0,am as a0,an as i0,ao as s0,ap as o0,aq as l0,ar as Lr,g as tn,as as u0,at as c0,au as d0}from"./index-aPw21Xcf.js";import{i as f0}from"./chunk-SSA7SXE4-26fqANp7.js";import{u as p0,$ as h0,a as m0,b as g0,m as y0,c as ad,d as v0,e as b0}from"./useMenuTriggerState-B-4lUpkM.js";import{$ as _0}from"./useSelectableItem-BaL4tj6I.js";import{u as $0,C as S0}from"./index-BMhtIjmr.js";var id=P_({slots:{base:["group inline-flex flex-col relative"],label:["block","absolute","z-10","origin-top-left","flex-shrink-0","rtl:origin-top-right","subpixel-antialiased","text-small","text-foreground-500","pointer-events-none","group-data-[has-label-outside=true]:pointer-events-auto"],mainWrapper:"w-full flex flex-col",trigger:"relative px-3 gap-3 w-full inline-flex flex-row items-center shadow-xs outline-hidden tap-highlight-transparent",innerWrapper:"inline-flex h-fit w-[calc(100%_-theme(spacing.6))] min-h-4 items-center gap-1.5 box-border",selectorIcon:"absolute end-3 w-4 h-4",spinner:"absolute end-3",value:["text-foreground-500","font-normal","w-full","text-start"],listboxWrapper:"scroll-py-6 w-full",listbox:"",popoverContent:"w-full p-1 overflow-hidden",clearButton:["w-4","h-4","z-10","mb-4","relative","start-auto","appearance-none","outline-none","select-none","opacity-70","hover:!opacity-100","cursor-pointer","active:!opacity-70","rounded-full",...Qc],helperWrapper:"p-1 flex relative flex-col gap-1.5 group-data-[has-helper=true]:flex",description:"text-tiny text-foreground-400",errorMessage:"text-tiny text-danger",endWrapper:"flex end-18",endContent:"mb-4"},variants:{variant:{flat:{trigger:["bg-default-100","data-[hover=true]:bg-default-200","group-data-[focus=true]:bg-default-200"],clearButton:"mb-4"},faded:{trigger:["bg-default-100","border-medium","border-default-200","data-[hover=true]:border-default-400 data-[focus=true]:border-default-400 data-[open=true]:border-default-400"],value:"group-data-[has-value=true]:text-default-foreground",clearButton:"mb-4"},bordered:{trigger:["border-medium","border-default-200","data-[hover=true]:border-default-400","data-[open=true]:border-default-foreground","data-[focus=true]:border-default-foreground"],value:"group-data-[has-value=true]:text-default-foreground",clearButton:"mb-4"},underlined:{trigger:["!px-1","!pb-0","!gap-0","relative","box-border","border-b-medium","shadow-[0_1px_0px_0_rgba(0,0,0,0.05)]","border-default-200","!rounded-none","hover:border-default-300","after:content-['']","after:w-0","after:origin-center","after:bg-default-foreground","after:absolute","after:left-1/2","after:-translate-x-1/2","after:-bottom-[2px]","after:h-[2px]","data-[open=true]:after:w-full","data-[focus=true]:after:w-full"],value:"group-data-[has-value=true]:text-default-foreground",clearButton:"mb-4 me-2"}},color:{default:{},primary:{selectorIcon:"text-primary"},secondary:{selectorIcon:"text-secondary"},success:{selectorIcon:"text-success"},warning:{selectorIcon:"text-warning"},danger:{selectorIcon:"text-danger"}},size:{sm:{label:"text-tiny",trigger:"h-8 min-h-8 px-2 rounded-small",value:"text-small",clearButton:"text-medium"},md:{trigger:"h-10 min-h-10 rounded-medium",value:"text-small",clearButton:"text-large"},lg:{trigger:"h-12 min-h-12 rounded-large",value:"text-medium",clearButton:"mb-5 text-large"}},radius:{none:{trigger:"rounded-none"},sm:{trigger:"rounded-small"},md:{trigger:"rounded-medium"},lg:{trigger:"rounded-large"},full:{trigger:"rounded-full"}},labelPlacement:{outside:{base:"flex flex-col",clearButton:"mb-0"},"outside-left":{base:"flex-row items-center flex-nowrap data-[has-helper=true]:items-start",label:"relative pe-2 text-foreground",clearButton:"mb-0"},inside:{label:"text-tiny cursor-pointer",trigger:"flex-col items-start justify-center gap-0"}},fullWidth:{true:{base:"w-full"},false:{base:"min-w-40"}},isClearable:{true:{clearButton:"peer-data-[filled=true]:opacity-70 peer-data-[filled=true]:block",endContent:"ms-3"}},isDisabled:{true:{base:"opacity-disabled pointer-events-none",trigger:"pointer-events-none"}},isInvalid:{true:{label:"!text-danger",value:"!text-danger",selectorIcon:"text-danger"}},isRequired:{true:{label:"after:content-['*'] after:text-danger after:ms-0.5"}},isMultiline:{true:{label:"relative",trigger:"!h-auto"},false:{value:"truncate"}},disableAnimation:{true:{trigger:"after:transition-none",base:"transition-none",label:"transition-none",selectorIcon:"transition-none"},false:{base:"transition-background motion-reduce:transition-none !duration-150",label:["will-change-auto","origin-top-left","rtl:origin-top-right","!duration-200","!ease-out","transition-[transform,color,left,opacity,translate,scale]","motion-reduce:transition-none"],selectorIcon:"transition-transform duration-150 ease motion-reduce:transition-none",clearButton:["transition-opacity","motion-reduce:transition-none"]}},disableSelectorIconRotation:{true:{},false:{selectorIcon:"data-[open=true]:rotate-180"}}},defaultVariants:{variant:"flat",color:"default",size:"md",fullWidth:!0,isDisabled:!1,isMultiline:!1,disableSelectorIconRotation:!1},compoundVariants:[{variant:"flat",color:"default",class:{value:"group-data-[has-value=true]:text-default-foreground",trigger:["bg-default-100","data-[hover=true]:bg-default-200"]}},{variant:"flat",color:"primary",class:{trigger:["bg-primary-100","text-primary","data-[hover=true]:bg-primary-50","group-data-[focus=true]:bg-primary-50"],value:"text-primary",label:"text-primary"}},{variant:"flat",color:"secondary",class:{trigger:["bg-secondary-100","text-secondary","data-[hover=true]:bg-secondary-50","group-data-[focus=true]:bg-secondary-50"],value:"text-secondary",label:"text-secondary"}},{variant:"flat",color:"success",class:{trigger:["bg-success-100","text-success-600","dark:text-success","data-[hover=true]:bg-success-50","group-data-[focus=true]:bg-success-50"],value:"text-success-600 dark:text-success",label:"text-success-600 dark:text-success"}},{variant:"flat",color:"warning",class:{trigger:["bg-warning-100","text-warning-600","dark:text-warning","data-[hover=true]:bg-warning-50","group-data-[focus=true]:bg-warning-50"],value:"text-warning-600 dark:text-warning",label:"text-warning-600 dark:text-warning"}},{variant:"flat",color:"danger",class:{trigger:["bg-danger-100","text-danger","dark:text-danger-500","data-[hover=true]:bg-danger-50","group-data-[focus=true]:bg-danger-50"],value:"text-danger dark:text-danger-500",label:"text-danger dark:text-danger-500"}},{variant:"faded",color:"primary",class:{trigger:"data-[hover=true]:border-primary data-[focus=true]:border-primary data-[open=true]:border-primary",label:"text-primary"}},{variant:"faded",color:"secondary",class:{trigger:"data-[hover=true]:border-secondary data-[focus=true]:border-secondary data-[open=true]:border-secondary",label:"text-secondary"}},{variant:"faded",color:"success",class:{trigger:"data-[hover=true]:border-success data-[focus=true]:border-success data-[open=true]:border-success",label:"text-success"}},{variant:"faded",color:"warning",class:{trigger:"data-[hover=true]:border-warning data-[focus=true]:border-warning data-[open=true]:border-warning",label:"text-warning"}},{variant:"faded",color:"danger",class:{trigger:"data-[hover=true]:border-danger data-[focus=true]:border-danger data-[open=true]:border-danger",label:"text-danger"}},{variant:"underlined",color:"default",class:{value:"group-data-[has-value=true]:text-foreground"}},{variant:"underlined",color:"primary",class:{trigger:"after:bg-primary",label:"text-primary"}},{variant:"underlined",color:"secondary",class:{trigger:"after:bg-secondary",label:"text-secondary"}},{variant:"underlined",color:"success",class:{trigger:"after:bg-success",label:"text-success"}},{variant:"underlined",color:"warning",class:{trigger:"after:bg-warning",label:"text-warning"}},{variant:"underlined",color:"danger",class:{trigger:"after:bg-danger",label:"text-danger"}},{variant:"bordered",color:"primary",class:{trigger:["data-[open=true]:border-primary","data-[focus=true]:border-primary"],label:"text-primary"}},{variant:"bordered",color:"secondary",class:{trigger:["data-[open=true]:border-secondary","data-[focus=true]:border-secondary"],label:"text-secondary"}},{variant:"bordered",color:"success",class:{trigger:["data-[open=true]:border-success","data-[focus=true]:border-success"],label:"text-success"}},{variant:"bordered",color:"warning",class:{trigger:["data-[open=true]:border-warning","data-[focus=true]:border-warning"],label:"text-warning"}},{variant:"bordered",color:"danger",class:{trigger:["data-[open=true]:border-danger","data-[focus=true]:border-danger"],label:"text-danger"}},{labelPlacement:"inside",color:"default",class:{label:"group-data-[filled=true]:text-default-600"}},{labelPlacement:"outside",color:"default",class:{label:"group-data-[filled=true]:text-foreground"}},{radius:"full",size:["sm"],class:{trigger:"px-3"}},{radius:"full",size:"md",class:{trigger:"px-4"}},{radius:"full",size:"lg",class:{trigger:"px-5"}},{disableAnimation:!1,variant:["faded","bordered"],class:{trigger:"transition-colors motion-reduce:transition-none"}},{disableAnimation:!1,variant:"underlined",class:{trigger:"after:transition-width motion-reduce:after:transition-none"}},{variant:["flat","faded"],class:{trigger:[...Qc]}},{isInvalid:!0,variant:"flat",class:{trigger:["bg-danger-50","data-[hover=true]:bg-danger-100","group-data-[focus=true]:bg-danger-50"]}},{isInvalid:!0,variant:"bordered",class:{trigger:"!border-danger group-data-[focus=true]:border-danger"}},{isInvalid:!0,variant:"underlined",class:{trigger:"after:bg-danger"}},{labelPlacement:"inside",size:"sm",class:{trigger:"h-12 min-h-12 py-1.5 px-3"}},{labelPlacement:"inside",size:"md",class:{trigger:"h-14 min-h-14 py-2"}},{labelPlacement:"inside",size:"lg",class:{label:"text-medium",trigger:"h-16 min-h-16 py-2.5 gap-0"}},{labelPlacement:"outside",isMultiline:!1,class:{base:"group relative justify-end",label:["pb-0","z-20","top-1/2","-translate-y-1/2","group-data-[filled=true]:start-0"]}},{labelPlacement:["inside"],class:{label:"group-data-[filled=true]:scale-85"}},{labelPlacement:"inside",size:["sm","md"],class:{label:"text-small"}},{labelPlacement:"inside",isMultiline:!1,size:"sm",class:{label:["group-data-[filled=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-tiny)/2_-_8px)]"],innerWrapper:"group-data-[has-label=true]:pt-4"}},{labelPlacement:"inside",isMultiline:!1,size:"md",class:{label:["group-data-[filled=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_6px)]"],innerWrapper:"group-data-[has-label=true]:pt-4"}},{labelPlacement:"inside",isMultiline:!1,size:"lg",class:{label:["text-medium","group-data-[filled=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_8px)]"],innerWrapper:"group-data-[has-label=true]:pt-5"}},{labelPlacement:"inside",variant:["faded","bordered"],isMultiline:!1,size:"sm",class:{label:["group-data-[filled=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-tiny)/2_-_8px_-_var(--heroui-border-width-medium))]"]}},{labelPlacement:"inside",variant:["faded","bordered"],isMultiline:!1,size:"md",class:{label:["group-data-[filled=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_6px_-_var(--heroui-border-width-medium))]"]}},{labelPlacement:"inside",variant:["faded","bordered"],isMultiline:!1,size:"lg",class:{label:["text-medium","group-data-[filled=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_8px_-_var(--heroui-border-width-medium))]"]}},{labelPlacement:"inside",variant:"underlined",isMultiline:!1,size:"sm",class:{label:["group-data-[filled=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-tiny)/2_-_5px)]"]}},{labelPlacement:"inside",variant:"underlined",isMultiline:!1,size:"md",class:{label:["group-data-[filled=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_3.5px)]"]}},{labelPlacement:"inside",variant:"underlined",isMultiline:!1,size:"lg",class:{label:["text-medium","group-data-[filled=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_4px)]"]}},{labelPlacement:"outside",size:"sm",isMultiline:!1,class:{label:["start-2","text-tiny","group-data-[filled=true]:-translate-y-[calc(100%_+var(--heroui-font-size-tiny)/2_+_16px)]","group-data-[has-helper=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-small)/2_+_26px)]"],base:"data-[has-label=true]:mt-[calc(var(--heroui-font-size-small)_+_8px)]"}},{labelPlacement:"outside",isMultiline:!1,size:"md",class:{label:["start-3","text-small","group-data-[filled=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-small)/2_+_20px)]","group-data-[has-helper=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-small)/2_+_30px)]"],base:"data-[has-label=true]:mt-[calc(var(--heroui-font-size-small)_+_10px)]"}},{labelPlacement:"outside",isMultiline:!1,size:"lg",class:{label:["start-3","text-medium","group-data-[filled=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-small)/2_+_24px)]","group-data-[has-helper=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-small)/2_+_34px)]"],base:"data-[has-label=true]:mt-[calc(var(--heroui-font-size-small)_+_12px)]"}},{labelPlacement:"outside-left",size:"sm",class:{label:"group-data-[has-helper=true]:pt-2"}},{labelPlacement:"outside-left",size:"md",class:{label:"group-data-[has-helper=true]:pt-3"}},{labelPlacement:"outside-left",size:"lg",class:{label:"group-data-[has-helper=true]:pt-4"}},{labelPlacement:"outside",isMultiline:!0,class:{label:"pb-1.5"}},{labelPlacement:["inside","outside"],class:{label:["pe-2","max-w-full","text-ellipsis","overflow-hidden"]}},{labelPlacement:["outside","outside-left"],isClearable:!0,class:{endContent:["mt-4"],clearButton:["group-data-[has-end-content=true]:mt-4"]}},{isClearable:!1,labelPlacement:["outside","outside-left"],class:{endContent:["mt-4"]}},{isClearable:!0,variant:["underlined"],class:{clearButton:["relative group-data-[has-end-content=true]:left-2"],endContent:["me-2"]}},{isClearable:!1,variant:["underlined"],class:{endContent:["me-2"]}},{isClearable:!0,size:"sm",class:{endContent:"ms-2"}}]}),Dy=()=>E_(()=>import("./index-BoBogvMe.js"),__vite__mapDeps([0,1,2])).then(e=>e.default),Fy=kr(({children:e,motionProps:t,placement:r,disableAnimation:n,style:a={},transformOrigin:i={},...s},o)=>{let l=a;return i.originX!==void 0||i.originY!==void 0?l={...l,transformOrigin:i}:r&&(l={...l,...C_(r==="center"?"top":r)}),n?A.jsx("div",{...s,ref:o,children:e}):A.jsx(Ry,{features:Dy,children:A.jsx(xy.div,{ref:o,animate:"enter",exit:"exit",initial:"initial",style:l,variants:qy.scaleSpringOpacity,...qe(s,t),children:e})})});Fy.displayName="HeroUI.FreeSoloPopoverWrapper";var My=kr(({children:e,transformOrigin:t,disableDialogFocus:r=!1,...n},a)=>{const{Component:i,state:s,placement:o,backdrop:l,portalContainer:u,disableAnimation:c,motionProps:h,isNonModal:g,getPopoverProps:v,getBackdropProps:b,getDialogProps:y,getContentProps:p}=p0({...n,ref:a}),f=H.useRef(null),{dialogProps:d,titleProps:m}=O_({},f),_=y({...!r&&{ref:f},...d}),$=H.useMemo(()=>l==="transparent"?null:c?A.jsx("div",{...b()}):A.jsx(Ry,{features:Dy,children:A.jsx(xy.div,{animate:"enter",exit:"exit",initial:"exit",variants:qy.fade,...b()})}),[l,c,b]);return A.jsxs(A_,{portalContainer:u,children:[!g&&$,A.jsx(i,{...v(),children:A.jsxs(Fy,{disableAnimation:c,motionProps:h,placement:o,tabIndex:-1,transformOrigin:t,..._,children:[!g&&A.jsx(ed,{onDismiss:s.close}),A.jsx("div",{...p(),children:typeof e=="function"?e(m):e}),A.jsx(ed,{onDismiss:s.close})]})})]})});My.displayName="HeroUI.FreeSoloPopover";var w0=My;class sd{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let r=this.keyMap.get(t);var n;return r&&(n=r.prevKey)!==null&&n!==void 0?n:null}getKeyAfter(t){let r=this.keyMap.get(t);var n;return r&&(n=r.nextKey)!==null&&n!==void 0?n:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(t){var r;return(r=this.keyMap.get(t))!==null&&r!==void 0?r:null}at(t){const r=[...this.getKeys()];return this.getItem(r[t])}getChildren(t){let r=this.keyMap.get(t);return r?.childNodes||[]}constructor(t){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=t;let r=s=>{if(this.keyMap.set(s.key,s),s.childNodes&&s.type==="section")for(let o of s.childNodes)r(o)};for(let s of t)r(s);let n=null,a=0;for(let[s,o]of this.keyMap)n?(n.nextKey=s,o.prevKey=n.key):(this.firstKey=s,o.prevKey=void 0),o.type==="item"&&(o.index=a++),n=o,n.nextKey=void 0;var i;this.lastKey=(i=n?.key)!==null&&i!==void 0?i:null}}function ky(e){let{filter:t,layoutDelegate:r}=e,n=I_(e),a=H.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),i=H.useCallback(u=>t?new sd(t(u)):new sd(u),[t]),s=H.useMemo(()=>({suppressTextValueWarning:e.suppressTextValueWarning}),[e.suppressTextValueWarning]),o=T_(e,i,s),l=H.useMemo(()=>new R_(o,n,{layoutDelegate:r}),[o,n,r]);return P0(o,l),{collection:o,disabledKeys:a,selectionManager:l}}function P0(e,t){const r=H.useRef(null);H.useEffect(()=>{if(t.focusedKey!=null&&!e.getItem(t.focusedKey)&&r.current){const c=r.current.getItem(t.focusedKey),h=[...r.current.getKeys()].map(f=>{const d=r.current.getItem(f);return d?.type==="item"?d:null}).filter(f=>f!==null),g=[...e.getKeys()].map(f=>{const d=e.getItem(f);return d?.type==="item"?d:null}).filter(f=>f!==null);var n,a;const v=((n=h?.length)!==null&&n!==void 0?n:0)-((a=g?.length)!==null&&a!==void 0?a:0);var i,s,o;let b=Math.min(v>1?Math.max(((i=c?.index)!==null&&i!==void 0?i:0)-v+1,0):(s=c?.index)!==null&&s!==void 0?s:0,((o=g?.length)!==null&&o!==void 0?o:0)-1),y=null,p=!1;for(;b>=0;){if(!t.isDisabled(g[b].key)){y=g[b];break}if(b((l=c?.index)!==null&&l!==void 0?l:0)&&(b=(u=c?.index)!==null&&u!==void 0?u:0),b--}}t.setFocusedKey(y?y.key:null)}r.current=e},[e,t])}function O0(e){const{collection:t,disabledKeys:r,selectionManager:n,selectionManager:{setSelectedKeys:a,selectedKeys:i,selectionMode:s}}=ky(e),o=H.useMemo(()=>!e.isLoading&&i.size!==0?Array.from(i).filter(Boolean).filter(u=>!t.getItem(u)):[],[i,t]),l=i.size!==0?Array.from(i).map(u=>t.getItem(u)).filter(Boolean):null;return o.length&&console.warn(`Select: Keys "${o.join(", ")}" passed to "selectedKeys" are not present in the collection.`),{collection:t,disabledKeys:r,selectionManager:n,selectionMode:s,selectedKeys:i,setSelectedKeys:a.bind(n),selectedItems:l}}function E0({validate:e,validationBehavior:t,...r}){const[n,a]=H.useState(!1),[i,s]=H.useState(null),o=h0(r),l=O0({...r,onSelectionChange:h=>{r.onSelectionChange!=null&&(h==="all"?r.onSelectionChange(new Set(l.collection.getKeys())):r.onSelectionChange(h)),r.selectionMode==="single"&&o.close()}}),u=x_({...r,validationBehavior:t,validate:h=>{if(!e)return;const g=Array.from(h);return e(r.selectionMode==="single"?g[0]:g)},value:l.selectedKeys}),c=l.collection.size===0&&r.hideEmptyContent;return{...u,...l,...o,focusStrategy:i,close(){o.close()},open(h=null){c||(s(h),o.open())},toggle(h=null){c||(s(h),o.toggle())},isFocused:n,setFocused:a}}function A0(e,t,r){const{disallowEmptySelection:n,isDisabled:a}=e,i=q_({usage:"search",sensitivity:"base"}),s=H.useMemo(()=>new j_(t.collection,t.disabledKeys,null,i),[t.collection,t.disabledKeys,i]),{menuTriggerProps:o,menuProps:l}=m0({isDisabled:a,type:"listbox"},t,r),u=$=>{if(t.selectionMode==="single")switch($.key){case"ArrowLeft":{$.preventDefault();const S=t.selectedKeys.size>0?s.getKeyAbove(t.selectedKeys.values().next().value):s.getFirstKey();S&&t.setSelectedKeys([S]);break}case"ArrowRight":{$.preventDefault();const S=t.selectedKeys.size>0?s.getKeyBelow(t.selectedKeys.values().next().value):s.getFirstKey();S&&t.setSelectedKeys([S]);break}}},{typeSelectProps:c}=N_({keyboardDelegate:s,selectionManager:t.selectionManager,onTypeSelect($){t.setSelectedKeys([$])}}),{isInvalid:h,validationErrors:g,validationDetails:v}=t.displayValidation,{labelProps:b,fieldProps:y,descriptionProps:p,errorMessageProps:f}=D_({...e,labelElementType:"span",isInvalid:h,errorMessage:e.errorMessage||g});c.onKeyDown=c.onKeyDownCapture,delete c.onKeyDownCapture,o.onPressStart=$=>{$.pointerType!=="touch"&&$.pointerType!=="keyboard"&&!a&&t.toggle($.pointerType==="virtual"?"first":null)};const d=Ou(e,{labelable:!0}),m=Ir(c,o,y),_=Eu();return{labelProps:{...b,onClick:()=>{var $;e.isDisabled||(($=r.current)==null||$.focus(),F_("keyboard"))}},triggerProps:Ir(d,{...m,onKeyDown:jy(m.onKeyDown,u,e.onKeyDown),onKeyUp:e.onKeyUp,"aria-labelledby":[_,m["aria-labelledby"],m["aria-label"]&&!m["aria-labelledby"]?m.id:null].join(","),onFocus($){t.isFocused||(e.onFocus&&e.onFocus($),t.setFocused(!0))},onBlur($){t.isOpen||(e.onBlur&&e.onBlur($),t.setFocused(!1))}}),valueProps:{id:_},menuProps:{...l,disallowEmptySelection:n,autoFocus:t.focusStrategy||!0,shouldSelectOnPressUp:!0,shouldFocusOnHover:!0,onBlur:$=>{$.currentTarget.contains($.relatedTarget)||(e.onBlur&&e.onBlur($),t.setFocused(!1))},onFocus:l?.onFocus,"aria-labelledby":[y["aria-labelledby"],m["aria-label"]&&!y["aria-labelledby"]?m.id:null].filter(Boolean).join(" ")},descriptionProps:p,errorMessageProps:f,isInvalid:h,validationErrors:g,validationDetails:v}}var Ly=new WeakMap;function C0(e){var t,r,n,a,i,s;const o=Au(),{validationBehavior:l}=M_(K_)||{},[u,c]=Cu(e,id.variantKeys),h=(r=(t=e.disableAnimation)!=null?t:o?.disableAnimation)!=null?r:!1,{ref:g,as:v,label:b,name:y,isLoading:p,selectorIcon:f,isOpen:d,defaultOpen:m,onOpenChange:_,startContent:$,endContent:S,description:w,renderValue:O,onSelectionChange:E,placeholder:R,isVirtualized:q,itemHeight:M=36,maxListboxHeight:I=256,children:L,disallowEmptySelection:k=!1,selectionMode:J="single",spinnerRef:X,scrollRef:Y,popoverProps:ne={},scrollShadowProps:K={},listboxProps:j={},spinnerProps:V={},validationState:N,onChange:P,onClose:T,className:D,classNames:U,validationBehavior:Q=(n=l??o?.validationBehavior)!=null?n:"native",hideEmptyContent:B=!1,onClear:G,...C}=u,x=Gn(Y),F={popoverProps:qe({placement:"bottom",triggerScaleOnOpen:!1,offset:5,disableAnimation:h},ne),scrollShadowProps:qe({ref:x,isEnabled:(a=e.showScrollIndicators)!=null?a:!0,hideScrollBar:!0,offset:15},K),listboxProps:qe({disableAnimation:h},j)},z=v||"button",W=typeof z=="string",Z=Gn(g),ee=H.useRef(null),ce=H.useRef(null),se=H.useRef(null);let re=E0({...u,isOpen:d,selectionMode:J,disallowEmptySelection:k,validationBehavior:Q,children:L,isRequired:e.isRequired,isDisabled:e.isDisabled,isInvalid:e.isInvalid,defaultOpen:m,hideEmptyContent:B,onOpenChange:te=>{_?.(te),te||T?.()},onSelectionChange:te=>{E?.(te),P&&typeof P=="function"&&P({target:{...Z.current&&{...Z.current,name:Z.current.name},value:Array.from(te).join(",")}}),re.commitValidation()}});re={...re,...e.isDisabled&&{disabledKeys:new Set([...re.collection.getKeys()])}},k_(()=>{var te;(te=Z.current)!=null&&te.value&&re.setSelectedKeys(new Set([...re.selectedKeys,Z.current.value]))},[Z.current]);const{labelProps:de,triggerProps:ie,valueProps:ue,menuProps:Ae,descriptionProps:Te,errorMessageProps:Ve,isInvalid:Xe,validationErrors:je,validationDetails:Ct}=A0({...u,disallowEmptySelection:k,isDisabled:e.isDisabled},re,ee),Gt=H.useCallback(()=>{var te;re.setSelectedKeys(new Set([])),G?.(),(te=ee.current)==null||te.focus()},[G,re]),{pressProps:en}=Ny({isDisabled:!!e?.isDisabled,onPress:Gt}),ot=e.isInvalid||N==="invalid"||Xe,{isPressed:We,buttonProps:Ze}=L_(ie,ee),{focusProps:Fc,isFocused:Mc,isFocusVisible:kc}=du(),{focusProps:Lc,isFocusVisible:Uc}=du(),{isHovered:Vc,hoverProps:Kc}=Iu({isDisabled:e.isDisabled}),It=U_({labelPlacement:e.labelPlacement,label:b}),ja=!!R,Bc=It==="outside-left"||It==="outside",n_=It==="inside",zc=It==="outside-left",Wc=e.isClearable,Hc=re.isOpen||ja||!!((i=re.selectedItems)!=null&&i.length)||!!$||!!S||!!e.isMultiline,Gc=!!((s=re.selectedItems)!=null&&s.length),Na=!!b,Yc=Na&&(zc||Bc&&ja),Jc=Ee(U?.base,D),fe=H.useMemo(()=>id({...c,isInvalid:ot,isClearable:Wc,labelPlacement:It,disableAnimation:h}),[Tu(c),ot,It,h]);V_({isDisabled:!re.isOpen});const Xc=typeof u.errorMessage=="function"?u.errorMessage({isInvalid:ot,validationErrors:je,validationDetails:Ct}):u.errorMessage||je?.join(" "),Da=!!w||!!Xc,a_=!!S;H.useEffect(()=>{if(re.isOpen&&se.current&&ee.current){let te=ee.current.getBoundingClientRect(),Tt=se.current;Tt.style.width=te.width+"px"}},[re.isOpen]);const i_=H.useCallback((te={})=>({"data-slot":"base","data-filled":be(Hc),"data-has-value":be(Gc),"data-has-label":be(Na),"data-has-helper":be(Da),"data-has-end-content":be(a_),"data-invalid":be(ot),"data-has-label-outside":be(Yc),className:fe.base({class:Ee(Jc,te.className)}),...te}),[fe,Da,Gc,Na,Yc,Hc,Jc]),s_=H.useCallback((te={})=>({ref:ee,"data-slot":"trigger","data-open":be(re.isOpen),"data-disabled":be(e?.isDisabled),"data-focus":be(Mc),"data-pressed":be(We),"data-focus-visible":be(kc),"data-hover":be(Vc),className:fe.trigger({class:U?.trigger}),...qe(Ze,Fc,Kc,Tr(C,{enabled:W}),Tr(te))}),[fe,ee,re.isOpen,U?.trigger,e?.isDisabled,Mc,We,kc,Vc,Ze,Fc,Kc,C,W]),o_=H.useCallback((te={})=>({state:re,triggerRef:ee,selectRef:Z,selectionMode:J,label:e?.label,name:e?.name,isRequired:e?.isRequired,autoComplete:e?.autoComplete,isDisabled:e?.isDisabled,form:e?.form,onChange:P,...te}),[re,J,e?.label,e?.autoComplete,e?.name,e?.isDisabled,ee]),l_=H.useCallback((te={})=>({"data-slot":"label",className:fe.label({class:Ee(U?.label,te.className)}),...de,...te}),[fe,U?.label,de]),u_=H.useCallback((te={})=>({"data-slot":"value",className:fe.value({class:Ee(U?.value,te.className)}),...ue,...te}),[fe,U?.value,ue]),c_=H.useCallback((te={})=>({"data-slot":"listboxWrapper",className:fe.listboxWrapper({class:Ee(U?.listboxWrapper,te?.className)}),style:{maxHeight:I??256,...te.style},...qe(F.scrollShadowProps,te)}),[fe.listboxWrapper,U?.listboxWrapper,F.scrollShadowProps,I]),d_=(te={})=>{const Tt=q??re.collection.size>50;return{state:re,ref:ce,isVirtualized:Tt,virtualization:Tt?{maxListboxHeight:I,itemHeight:M}:void 0,"data-slot":"listbox",className:fe.listbox({class:Ee(U?.listbox,te?.className)}),scrollShadowProps:F.scrollShadowProps,...qe(F.listboxProps,te,Ae)}},f_=H.useCallback((te={})=>{var Tt,Zc;const w_=qe(F.popoverProps,te);return{state:re,triggerRef:ee,ref:se,"data-slot":"popover",scrollRef:ce,triggerType:"listbox",classNames:{content:fe.popoverContent({class:Ee(U?.popoverContent,te.className)})},...w_,offset:re.selectedItems&&re.selectedItems.length>0?re.selectedItems.length*1e-8+(((Tt=F.popoverProps)==null?void 0:Tt.offset)||0):(Zc=F.popoverProps)==null?void 0:Zc.offset}},[fe,U?.popoverContent,F.popoverProps,ee,re,re.selectedItems]),p_=H.useCallback(()=>({"data-slot":"selectorIcon","aria-hidden":be(!0),"data-open":be(re.isOpen),className:fe.selectorIcon({class:U?.selectorIcon})}),[fe,U?.selectorIcon,re.isOpen]),h_=H.useCallback((te={})=>({...te,"data-slot":"innerWrapper",className:fe.innerWrapper({class:Ee(U?.innerWrapper,te?.className)})}),[fe,U?.innerWrapper]),m_=H.useCallback((te={})=>({...te,"data-slot":"helperWrapper",className:fe.helperWrapper({class:Ee(U?.helperWrapper,te?.className)})}),[fe,U?.helperWrapper]),g_=H.useCallback((te={})=>({...te,...Te,"data-slot":"description",className:fe.description({class:Ee(U?.description,te?.className)})}),[fe,U?.description]),y_=H.useCallback((te={})=>({...te,"data-slot":"mainWrapper",className:fe.mainWrapper({class:Ee(U?.mainWrapper,te?.className)})}),[fe,U?.mainWrapper]),v_=H.useCallback((te={})=>({...te,"data-slot":"end-wrapper",className:fe.endWrapper({class:Ee(U?.endWrapper,te?.className)})}),[fe,U?.endWrapper]),b_=H.useCallback((te={})=>({...te,"data-slot":"end-content",className:fe.endContent({class:Ee(U?.endContent,te?.className)})}),[fe,U?.endContent]),__=H.useCallback((te={})=>({...te,...Ve,"data-slot":"error-message",className:fe.errorMessage({class:Ee(U?.errorMessage,te?.className)})}),[fe,Ve,U?.errorMessage]),$_=H.useCallback((te={})=>({"aria-hidden":be(!0),"data-slot":"spinner",color:"current",size:"sm",...V,...te,ref:X,className:fe.spinner({class:Ee(U?.spinner,te?.className)})}),[fe,X,V,U?.spinner]),S_=H.useCallback((te={})=>({...te,type:"button",tabIndex:-1,"aria-label":"clear selection","data-slot":"clear-button","data-focus-visible":be(Uc),className:fe.clearButton({class:Ee(U?.clearButton,te?.className)}),...qe(en,Lc)}),[fe,Uc,en,Lc,U?.clearButton]);return Ly.set(re,{isDisabled:e?.isDisabled,isRequired:e?.isRequired,name:e?.name,isInvalid:ot,validationBehavior:Q}),{Component:z,domRef:Z,state:re,label:b,name:y,triggerRef:ee,isLoading:p,placeholder:R,startContent:$,endContent:S,description:w,selectorIcon:f,hasHelper:Da,labelPlacement:It,hasPlaceholder:ja,renderValue:O,selectionMode:J,disableAnimation:h,isOutsideLeft:zc,shouldLabelBeOutside:Bc,shouldLabelBeInside:n_,isInvalid:ot,errorMessage:Xc,isClearable:Wc,getClearButtonProps:S_,getBaseProps:i_,getTriggerProps:s_,getLabelProps:l_,getValueProps:u_,getListboxProps:d_,getPopoverProps:f_,getSpinnerProps:$_,getMainWrapperProps:y_,getListboxWrapperProps:c_,getHiddenSelectProps:o_,getInnerWrapperProps:h_,getHelperWrapperProps:m_,getDescriptionProps:g_,getErrorMessageProps:__,getSelectorIconProps:p_,getEndWrapperProps:v_,getEndContentProps:b_}}var I0=typeof document<"u"?B_.useLayoutEffect:()=>{};function T0(e){const t=H.useRef(null);return I0(()=>{t.current=e},[e]),H.useCallback((...r)=>{const n=t.current;return n?.(...r)},[])}function R0(e,t,r){let n=H.useRef(t),a=T0(()=>{r&&r(n.current)});H.useEffect(()=>{var i;let s=(i=e?.current)==null?void 0:i.form;return s?.addEventListener("reset",a),()=>{s?.removeEventListener("reset",a)}},[e,a])}function x0(e,t,r){var n;let a=Ly.get(t)||{},{autoComplete:i,name:s=a.name,isDisabled:o=a.isDisabled,selectionMode:l,onChange:u,form:c}=e,{validationBehavior:h,isRequired:g,isInvalid:v}=a,{visuallyHiddenProps:b}=z_();return R0(e.selectRef,t.selectedKeys,t.setSelectedKeys),W_({validationBehavior:h,focus:()=>{var y;return(y=r.current)==null?void 0:y.focus()}},t,e.selectRef),{containerProps:{...b,"aria-hidden":!0,"data-a11y-ignore":"aria-hidden-focus"},inputProps:{style:{display:"none"}},selectProps:{form:c,autoComplete:i,disabled:o,"aria-invalid":v||void 0,"aria-required":g&&h==="aria"||void 0,required:g&&h==="native",name:s,tabIndex:-1,value:l==="multiple"?[...t.selectedKeys].map(y=>String(y)):(n=[...t.selectedKeys][0])!=null?n:"",multiple:l==="multiple",onChange:y=>{t.setSelectedKeys(y.target.value),u?.(y)}}}}function q0(e){var t;let{state:r,triggerRef:n,selectRef:a,label:i,name:s,isDisabled:o,form:l}=e,{containerProps:u,selectProps:c}=x0({...e,selectRef:a},r,n);return r.collection.size<=300?A.jsx("div",{...u,"data-testid":"hidden-select-container",children:A.jsxs("label",{children:[i,A.jsxs("select",{...c,ref:a,children:[A.jsx("option",{}),[...r.collection.getKeys()].map(h=>{let g=r.collection.getItem(h);if(g?.type==="item")return A.jsx("option",{value:g.key,children:g.textValue},g.key)})]})]})}):s?A.jsx("input",{autoComplete:c.autoComplete,disabled:o,form:l,name:s,type:"hidden",value:(t=[...r.selectedKeys].join(","))!=null?t:""}):null}var j0=H_,N0=j0;const Ru=new WeakMap;function D0(e){return typeof e=="string"?e.replace(/\s*/g,""):""+e}function F0(e,t){let r=Ru.get(e);if(!r)throw new Error("Unknown list");return`${r.id}-option-${D0(t)}`}function M0(e,t,r){let n=Ou(e,{labelable:!0}),a=e.selectionBehavior||"toggle",i=e.linkBehavior||(a==="replace"?"action":"override");a==="toggle"&&i==="action"&&(i="override");let{listProps:s}=G_({...e,ref:r,selectionManager:t.selectionManager,collection:t.collection,disabledKeys:t.disabledKeys,linkBehavior:i}),{focusWithinProps:o}=Y_({onFocusWithin:e.onFocus,onBlurWithin:e.onBlur,onFocusWithinChange:e.onFocusChange}),l=Eu(e.id);Ru.set(t,{id:l,shouldUseVirtualFocus:e.shouldUseVirtualFocus,shouldSelectOnPressUp:e.shouldSelectOnPressUp,shouldFocusOnHover:e.shouldFocusOnHover,isVirtualized:e.isVirtualized,onAction:e.onAction,linkBehavior:i});let{labelProps:u,fieldProps:c}=J_({...e,id:l,labelElementType:"span"});return{labelProps:u,listBoxProps:Ir(n,o,t.selectionManager.selectionMode==="multiple"?{"aria-multiselectable":"true"}:{},{role:"listbox",...Ir(c,s)})}}function k0(e,t,r){var n,a;let{key:i}=e,s=Ru.get(t);var o;let l=(o=e.isDisabled)!==null&&o!==void 0?o:t.selectionManager.isDisabled(i);var u;let c=(u=e.isSelected)!==null&&u!==void 0?u:t.selectionManager.isSelected(i);var h;let g=(h=e.shouldSelectOnPressUp)!==null&&h!==void 0?h:s?.shouldSelectOnPressUp;var v;let b=(v=e.shouldFocusOnHover)!==null&&v!==void 0?v:s?.shouldFocusOnHover;var y;let p=(y=e.shouldUseVirtualFocus)!==null&&y!==void 0?y:s?.shouldUseVirtualFocus;var f;let d=(f=e.isVirtualized)!==null&&f!==void 0?f:s?.isVirtualized,m=td(),_=td(),$={role:"option","aria-disabled":l||void 0,"aria-selected":t.selectionManager.selectionMode!=="none"?c:void 0};X_()&&Z_()||($["aria-label"]=e["aria-label"],$["aria-labelledby"]=m,$["aria-describedby"]=_);let S=t.collection.getItem(i);if(d){let X=Number(S?.index);$["aria-posinset"]=Number.isNaN(X)?void 0:X+1,$["aria-setsize"]=g0(t.collection)}let w=s?.onAction?()=>{var X;return s==null||(X=s.onAction)===null||X===void 0?void 0:X.call(s,i)}:void 0,O=F0(t,i),{itemProps:E,isPressed:R,isFocused:q,hasAction:M,allowsSelection:I}=_0({selectionManager:t.selectionManager,key:i,ref:r,shouldSelectOnPressUp:g,allowsDifferentPressOrigin:g&&b,isVirtualized:d,shouldUseVirtualFocus:p,isDisabled:l,onAction:w||!(S==null||(n=S.props)===null||n===void 0)&&n.onAction?jy(S==null||(a=S.props)===null||a===void 0?void 0:a.onAction,w):void 0,linkBehavior:s?.linkBehavior,id:O}),{hoverProps:L}=Iu({isDisabled:l||!b,onHoverStart(){rd()||(t.selectionManager.setFocused(!0),t.selectionManager.setFocusedKey(i))}}),k=Ou(S?.props);delete k.id;let J=Q_(S?.props);return{optionProps:{...$,...Ir(k,E,L,J),id:O},labelProps:{id:m},descriptionProps:{id:_},isFocused:q,isFocusVisible:q&&t.selectionManager.isFocused&&rd(),isSelected:c,isDisabled:l,isPressed:R,allowsSelection:I,hasAction:M}}function L0(e){let{heading:t,"aria-label":r}=e,n=Eu();return{itemProps:{role:"presentation"},headingProps:t?{id:n,role:"presentation"}:{},groupProps:{role:"group","aria-label":r,"aria-labelledby":t?n:void 0}}}function U0(e){var t;const r=Au(),{ref:n,as:a,state:i,variant:s,color:o,onAction:l,children:u,onSelectionChange:c,disableAnimation:h=(t=r?.disableAnimation)!=null?t:!1,itemClasses:g,className:v,topContent:b,bottomContent:y,emptyContent:p="No items.",hideSelectedIcon:f=!1,hideEmptyContent:d=!1,shouldHighlightOnFocus:m=!1,classNames:_,...$}=e,S=a||"ul",w=typeof S=="string",O=Gn(n),E=ky({...e,children:u,onSelectionChange:c}),R=i||E,{listBoxProps:q}=M0({...e,onAction:l},R,O),M=H.useMemo(()=>y0(),[]),I=Ee(_?.base,v);return{Component:S,state:R,variant:s,color:o,slots:M,classNames:_,topContent:b,bottomContent:y,emptyContent:p,hideEmptyContent:d,shouldHighlightOnFocus:m,hideSelectedIcon:f,disableAnimation:h,className:v,itemClasses:g,getBaseProps:(X={})=>({ref:O,"data-slot":"base",className:M.base({class:I}),...Tr($,{enabled:w}),...X}),getListProps:(X={})=>({"data-slot":"list",className:M.list({class:_?.list}),...q,...X}),getEmptyContentProps:(X={})=>({"data-slot":"empty-content",children:p,className:M.emptyContent({class:_?.emptyContent}),...X})}}function V0(e){const{isSelected:t,disableAnimation:r,...n}=e;return A.jsx("svg",{"aria-hidden":"true","data-selected":t,role:"presentation",viewBox:"0 0 17 18",...n,children:A.jsx("polyline",{fill:"none",points:"1 9 7 14 15 4",stroke:"currentColor",strokeDasharray:22,strokeDashoffset:t?44:66,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,style:r?{}:{transition:"stroke-dashoffset 200ms ease"}})})}function K0(e){var t,r;const n=Au(),[a,i]=Cu(e,ad.variantKeys),{as:s,item:o,state:l,description:u,startContent:c,endContent:h,isVirtualized:g,selectedIcon:v,className:b,classNames:y,autoFocus:p,onPress:f,onPressUp:d,onPressStart:m,onPressEnd:_,onPressChange:$,onClick:S,shouldHighlightOnFocus:w,hideSelectedIcon:O=!1,isReadOnly:E=!1,...R}=a,q=(r=(t=e.disableAnimation)!=null?t:n?.disableAnimation)!=null?r:!1,M=H.useRef(null),I=s||(e.href?"a":"li"),L=typeof I=="string",{rendered:k,key:J}=o,X=l.disabledKeys.has(J)||e.isDisabled,Y=l.selectionManager.selectionMode!=="none",ne=v0(),{pressProps:K,isPressed:j}=Ny({ref:M,isDisabled:X,onClick:S,onPress:f,onPressUp:d,onPressStart:m,onPressEnd:_,onPressChange:$}),{isHovered:V,hoverProps:N}=Iu({isDisabled:X}),{isFocusVisible:P,focusProps:T}=du({autoFocus:p}),{isFocused:D,isSelected:U,optionProps:Q,labelProps:B,descriptionProps:G}=k0({key:J,isDisabled:X,"aria-label":a["aria-label"],isVirtualized:g},l,M);let C=Q;const x=H.useMemo(()=>ad({...i,isDisabled:X,disableAnimation:q,hasTitleTextChild:typeof k=="string",hasDescriptionTextChild:typeof u=="string"}),[Tu(i),X,q,k,u]),F=Ee(y?.base,b);E&&(C=e0(C));const z=w&&D||(ne?V||j:V||D&&!P),W=(re={})=>({ref:M,...qe(C,E?{}:qe(T,K),N,Tr(R,{enabled:L}),re),"data-selectable":be(Y),"data-focus":be(D),"data-hover":be(z),"data-disabled":be(X),"data-selected":be(U),"data-pressed":be(j),"data-focus-visible":be(P),className:x.base({class:Ee(F,re.className)})}),Z=(re={})=>({...qe(B,re),"data-label":be(!0),className:x.title({class:y?.title})}),ee=(re={})=>({...qe(G,re),className:x.description({class:y?.description})}),ce=(re={})=>({...qe(re),className:x.wrapper({class:y?.wrapper})}),se=H.useCallback((re={})=>({"aria-hidden":be(!0),"data-disabled":be(X),className:x.selectedIcon({class:y?.selectedIcon}),...re}),[X,x,y]);return{Component:I,domRef:M,slots:x,classNames:y,isSelectable:Y,isSelected:U,isDisabled:X,rendered:k,description:u,startContent:c,endContent:h,selectedIcon:v,hideSelectedIcon:O,disableAnimation:q,getItemProps:W,getLabelProps:Z,getWrapperProps:ce,getDescriptionProps:ee,getSelectedIconProps:se}}var Uy=e=>{const{Component:t,rendered:r,description:n,isSelectable:a,isSelected:i,isDisabled:s,selectedIcon:o,startContent:l,endContent:u,hideSelectedIcon:c,disableAnimation:h,getItemProps:g,getLabelProps:v,getWrapperProps:b,getDescriptionProps:y,getSelectedIconProps:p}=K0(e),f=H.useMemo(()=>{const d=A.jsx(V0,{disableAnimation:h,isSelected:i});return typeof o=="function"?o({icon:d,isSelected:i,isDisabled:s}):o||d},[o,i,s,h]);return A.jsxs(t,{...g(),children:[l,n?A.jsxs("div",{...b(),children:[A.jsx("span",{...v(),children:r}),A.jsx("span",{...y(),children:n})]}):A.jsx("span",{...v(),children:r}),a&&!c&&A.jsx("span",{...p(),children:f}),u]})};Uy.displayName="HeroUI.ListboxItem";var xu=Uy,Vy=kr(({item:e,state:t,as:r,variant:n,color:a,disableAnimation:i,className:s,classNames:o,hideSelectedIcon:l,showDivider:u=!1,dividerProps:c={},itemClasses:h,title:g,items:v,...b},y)=>{const p=r||"li",f=H.useMemo(()=>b0(),[]),d=Ee(o?.base,s),m=Ee(o?.divider,c?.className),{itemProps:_,headingProps:$,groupProps:S}=L0({heading:e.rendered,"aria-label":e["aria-label"]});return A.jsxs(p,{"data-slot":"base",...qe(_,b),className:f.base({class:d}),children:[e.rendered&&A.jsx("span",{...$,className:f.heading({class:o?.heading}),"data-slot":"heading",children:e.rendered}),A.jsxs("ul",{...S,className:f.group({class:o?.group}),"data-has-title":!!e.rendered,"data-slot":"group",children:[[...e.childNodes].map(w=>{const{key:O,props:E}=w;let R=A.jsx(xu,{classNames:h,color:a,disableAnimation:i,hideSelectedIcon:l,item:w,state:t,variant:n,...E},O);return w.wrapper&&(R=w.wrapper(R)),R}),u&&A.jsx(t0,{as:"li",className:f.divider({class:m}),...c})]})]},e.key)});Vy.displayName="HeroUI.ListboxSection";var Ky=Vy;function B0(e={}){const{domRef:t,isEnabled:r=!0,overflowCheck:n="vertical",visibility:a="auto",offset:i=0,onVisibilityChange:s,updateDeps:o=[]}=e,l=H.useRef(a);H.useEffect(()=>{const u=t?.current;if(!u||!r)return;const c=(v,b,y,p,f)=>{if(a==="auto"){const d=`${p}${n0(f)}Scroll`;b&&y?(u.dataset[d]="true",u.removeAttribute(`data-${p}-scroll`),u.removeAttribute(`data-${f}-scroll`)):(u.dataset[`${p}Scroll`]=b.toString(),u.dataset[`${f}Scroll`]=y.toString(),u.removeAttribute(`data-${p}-${f}-scroll`))}else{const d=b&&y?"both":b?p:y?f:"none";d!==l.current&&(s?.(d),l.current=d)}},h=()=>{var v,b;const y=[{type:"vertical",prefix:"top",suffix:"bottom"},{type:"horizontal",prefix:"left",suffix:"right"}],p=u.querySelector('ul[data-slot="list"]'),f=+((v=p?.getAttribute("data-virtual-scroll-height"))!=null?v:u.scrollHeight),d=+((b=p?.getAttribute("data-virtual-scroll-top"))!=null?b:u.scrollTop);for(const{type:m,prefix:_,suffix:$}of y)if(n===m||n==="both"){const S=m==="vertical"?d>i:u.scrollLeft>i,w=m==="vertical"?d+u.clientHeight+i{["top","bottom","top-bottom","left","right","left-right"].forEach(v=>{u.removeAttribute(`data-${v}-scroll`)})};return h(),u.addEventListener("scroll",h,!0),a!=="auto"&&(g(),a==="both"?(u.dataset.topBottomScroll=String(n==="vertical"),u.dataset.leftRightScroll=String(n==="horizontal")):(u.dataset.topBottomScroll="false",u.dataset.leftRightScroll="false",["top","bottom","left","right"].forEach(v=>{u.dataset[`${v}Scroll`]=String(a===v)}))),()=>{u.removeEventListener("scroll",h,!0),g()}},[...o,r,a,n,s,t])}function z0(e){var t;const[r,n]=Cu(e,nd.variantKeys),{ref:a,as:i,children:s,className:o,style:l,size:u=40,offset:c=0,visibility:h="auto",isEnabled:g=!0,onVisibilityChange:v,...b}=r,y=i||"div",p=Gn(a);B0({domRef:p,offset:c,visibility:h,isEnabled:g,onVisibilityChange:v,updateDeps:[s],overflowCheck:(t=e.orientation)!=null?t:"vertical"});const f=H.useMemo(()=>nd({...n,className:o}),[Tu(n),o]);return{Component:y,styles:f,domRef:p,children:s,getBaseProps:(m={})=>{var _;return{ref:p,className:f,"data-orientation":(_=e.orientation)!=null?_:"vertical",style:{"--scroll-shadow-size":`${u}px`,...l,...m.style},...b,...m}}}}var W0=(e,t)=>{const r=[];for(const n of e)n.type==="section"?r.push(([...n.childNodes].length+1)*t):r.push(t);return r},H0=e=>{if(!e||e.scrollTop===void 0||e.clientHeight===void 0||e.scrollHeight===void 0)return{isTop:!1,isBottom:!1,isMiddle:!1};const t=e.scrollTop===0,r=Math.ceil(e.scrollTop+e.clientHeight)>=e.scrollHeight;return{isTop:t,isBottom:r,isMiddle:!t&&!r}},G0=e=>{var t;const{Component:r,state:n,color:a,variant:i,itemClasses:s,getBaseProps:o,topContent:l,bottomContent:u,hideEmptyContent:c,hideSelectedIcon:h,shouldHighlightOnFocus:g,disableAnimation:v,getEmptyContentProps:b,getListProps:y,scrollShadowProps:p}=e,{virtualization:f}=e;if(!f||!r0(f)&&!f.maxListboxHeight&&!f.itemHeight)throw new Error("You are using a virtualized listbox. VirtualizedListbox requires 'virtualization' props with 'maxListboxHeight' and 'itemHeight' properties. This error might have originated from autocomplete components that use VirtualizedListbox. Please provide these props to use the virtualized listbox.");const{maxListboxHeight:d,itemHeight:m}=f,_=Math.min(d,m*n.collection.size),$=H.useRef(null),S=H.useMemo(()=>W0([...n.collection],m),[n.collection,m]),w=$0({count:[...n.collection].length,getScrollElement:()=>$.current,estimateSize:k=>S[k]}),O=w.getVirtualItems(),E=w.getTotalSize(),{getBaseProps:R}=z0({...p}),q=k=>{var J;const X=[...n.collection][k.index];if(!X)return null;const Y={color:a,item:X,state:n,variant:i,disableAnimation:v,hideSelectedIcon:h,...X.props},ne={position:"absolute",top:0,left:0,width:"100%",height:`${k.size}px`,transform:`translateY(${k.start}px)`};if(X.type==="section")return A.jsx(Ky,{...Y,itemClasses:s,style:{...ne,...Y.style}},X.key);let K=A.jsx(xu,{...Y,classNames:qe(s,(J=X.props)==null?void 0:J.classNames),shouldHighlightOnFocus:g,style:{...ne,...Y.style}},X.key);return X.wrapper&&(K=X.wrapper(K)),K},[M,I]=H.useState({isTop:!1,isBottom:!0,isMiddle:!1}),L=A.jsxs(r,{...y(),"data-virtual-scroll-height":E,"data-virtual-scroll-top":(t=$?.current)==null?void 0:t.scrollTop,children:[!n.collection.size&&!c&&A.jsx("li",{children:A.jsx("div",{...b()})}),A.jsx("div",{...Tr(R()),ref:$,style:{height:d,overflow:"auto"},onScroll:k=>{I(H0(k.target))},children:_>0&&m>0&&A.jsx("div",{style:{height:`${E}px`,width:"100%",position:"relative"},children:O.map(k=>q(k))})})]});return A.jsxs("div",{...o(),children:[l,L,u]})},Y0=G0,J0=kr(function(t,r){const{isVirtualized:n,...a}=t,i=U0({...a,ref:r}),{Component:s,state:o,color:l,variant:u,itemClasses:c,getBaseProps:h,topContent:g,bottomContent:v,hideEmptyContent:b,hideSelectedIcon:y,shouldHighlightOnFocus:p,disableAnimation:f,getEmptyContentProps:d,getListProps:m}=i;if(n)return A.jsx(Y0,{...t,...i});const _=A.jsxs(s,{...m(),children:[!o.collection.size&&!b&&A.jsx("li",{children:A.jsx("div",{...d()})}),[...o.collection].map($=>{var S;const w={color:l,item:$,state:o,variant:u,disableAnimation:f,hideSelectedIcon:y,...$.props};if($.type==="section")return A.jsx(Ky,{...w,itemClasses:c},$.key);let O=A.jsx(xu,{...w,classNames:qe(c,(S=$.props)==null?void 0:S.classNames),shouldHighlightOnFocus:p},$.key);return $.wrapper&&(O=$.wrapper(O)),O})]});return A.jsxs("div",{...h(),children:[g,_,v]})}),X0=J0,Z0=kr(function(t,r){var n;const{Component:a,state:i,label:s,hasHelper:o,isLoading:l,triggerRef:u,selectorIcon:c=A.jsx(S0,{}),description:h,errorMessage:g,isInvalid:v,startContent:b,endContent:y,placeholder:p,renderValue:f,shouldLabelBeOutside:d,disableAnimation:m,getBaseProps:_,getLabelProps:$,getTriggerProps:S,getValueProps:w,getListboxProps:O,getPopoverProps:E,getSpinnerProps:R,getMainWrapperProps:q,getInnerWrapperProps:M,getHiddenSelectProps:I,getHelperWrapperProps:L,getListboxWrapperProps:k,getDescriptionProps:J,getErrorMessageProps:X,getSelectorIconProps:Y,isClearable:ne,getClearButtonProps:K,getEndWrapperProps:j,getEndContentProps:V}=C0({...t,ref:r}),N=s?A.jsx("label",{...$(),children:s}):null,P=H.cloneElement(c,Y()),T=H.useMemo(()=>{var C;return ne&&((C=i.selectedItems)!=null&&C.length)?A.jsx("span",{...K(),children:A.jsx(a0,{})}):null},[ne,K,(n=i.selectedItems)==null?void 0:n.length]),D=H.useMemo(()=>T?A.jsxs("div",{...j(),children:[T,y&&A.jsx("span",{...V(),children:y})]}):y&&A.jsx("span",{...V(),children:y}),[T,y,j,V]),U=H.useMemo(()=>{const C=v&&g;return!o||!(C||h)?null:A.jsx("div",{...L(),children:C?A.jsx("div",{...X(),children:g}):A.jsx("div",{...J(),children:h})})},[o,v,g,h,L,X,J]),Q=H.useMemo(()=>{var C;if(!((C=i.selectedItems)!=null&&C.length))return p;if(f&&typeof f=="function"){const x=[...i.selectedItems].map(F=>({key:F.key,data:F.value,type:F.type,props:F.props,textValue:F.textValue,rendered:F.rendered,"aria-label":F["aria-label"]}));return f(x)}return i.selectedItems.map(x=>x.textValue).join(", ")},[i.selectedItems,f,p]),B=H.useMemo(()=>l?A.jsx(i0,{...R()}):P,[l,P,R]),G=H.useMemo(()=>i.isOpen?A.jsx(w0,{...E(),children:A.jsx(s0,{...k(),children:A.jsx(X0,{...O()})})}):null,[i.isOpen,E,i,u,k,O]);return A.jsxs("div",{..._(),children:[A.jsx(q0,{...I()}),d?N:null,A.jsxs("div",{...q(),children:[A.jsxs(a,{...S(),children:[d?null:N,A.jsxs("div",{...M(),children:[b,A.jsx("span",{...w(),children:Q}),y&&i.selectedItems&&A.jsx(o0,{elementType:"span",children:","}),D]}),B]}),U]}),m?G:A.jsx(l0,{children:G})]})}),Q0=Z0;function he(e){return typeof e!="object"||e===null||typeof e.lastModified=="number"&&typeof File<"u"&&e instanceof File||typeof e.getMonth=="function"&&typeof Date<"u"&&e instanceof Date?!1:!Array.isArray(e)}function e1(e){return e.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),he(e.additionalItems)}function od(e){if(e==="")return;if(e===null)return null;if(/\.$/.test(e)||/\.0$/.test(e)||/\.\d*0$/.test(e))return e;const t=Number(e);return typeof t=="number"&&!Number.isNaN(t)?t:e}const Ur="__additional_property",fu="additionalProperties",ir="allOf",Ge="anyOf",ht="const",t1="default",na="dependencies",r1="enum",Me="__errors",Pt="$id",n1="if",Ot="items",a1="_$junk_option_schema_id$_",Kn="$name",ke="oneOf",Oe="properties",i1="required",Yn="submitButtonOptions",Ce="$ref",qu="__rjsf_additionalProperties",By="__rjsf_rootSchema",s1="ui:field",ju="ui:widget",Pr="ui:options",o1="ui:globalOptions";function pe(e={},t={}){return Object.keys(e).filter(r=>r.indexOf("ui:")===0).reduce((r,n)=>{const a=e[n];return n===ju&&he(a)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),r):n===Pr&&he(a)?{...r,...a}:{...r,[n.substring(3)]:a}},{...t})}function l1(e,t={},r){if(!e.additionalProperties)return!1;const{expandable:n=!0}=pe(t);return n===!1?n:e.maxProperties!==void 0&&r?Object.keys(r).length({...r,[a]:Jn(n)}),t);if(Dt(e)){const r=e;return Object.keys(r).reduce((n,a)=>({...n,[a]:Jn(r[a])}),t)}return t}function w1(){this.__data__=[],this.size=0}function Vr(e,t){return e===t||e!==e&&t!==t}function ia(e,t){for(var r=e.length;r--;)if(Vr(e[r][0],t))return r;return-1}var P1=Array.prototype,O1=P1.splice;function E1(e){var t=this.__data__,r=ia(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():O1.call(t,r,1),--this.size,!0}function A1(e){var t=this.__data__,r=ia(t,e);return r<0?void 0:t[r][1]}function C1(e){return ia(this.__data__,e)>-1}function I1(e,t){var r=this.__data__,n=ia(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function vt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++to))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var h=-1,g=!0,v=r&_$?new Qt:void 0;for(i.set(e,t),i.set(t,e);++h-1&&e%1==0&&e-1&&e%1==0&&e<=H$}var G$="[object Arguments]",Y$="[object Array]",J$="[object Boolean]",X$="[object Date]",Z$="[object Error]",Q$="[object Function]",eS="[object Map]",tS="[object Number]",rS="[object Object]",nS="[object RegExp]",aS="[object Set]",iS="[object String]",sS="[object WeakMap]",oS="[object ArrayBuffer]",lS="[object DataView]",uS="[object Float32Array]",cS="[object Float64Array]",dS="[object Int8Array]",fS="[object Int16Array]",pS="[object Int32Array]",hS="[object Uint8Array]",mS="[object Uint8ClampedArray]",gS="[object Uint16Array]",yS="[object Uint32Array]",we={};we[uS]=we[cS]=we[dS]=we[fS]=we[pS]=we[hS]=we[mS]=we[gS]=we[yS]=!0;we[G$]=we[Y$]=we[oS]=we[J$]=we[lS]=we[X$]=we[Z$]=we[Q$]=we[eS]=we[tS]=we[rS]=we[nS]=we[aS]=we[iS]=we[sS]=!1;function vS(e){return ze(e)&&ku(e.length)&&!!we[yt(e)]}function Lu(e){return function(t){return e(t)}}var tv=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Or=tv&&typeof module=="object"&&module&&!module.nodeType&&module,bS=Or&&Or.exports===tv,ka=bS&&zy.process,tr=function(){try{var e=Or&&Or.require&&Or.require("util").types;return e||ka&&ka.binding&&ka.binding("util")}catch{}}(),md=tr&&tr.isTypedArray,Kr=md?Lu(md):vS,_S=Object.prototype,$S=_S.hasOwnProperty;function rv(e,t){var r=Ie(e),n=!r&&er(e),a=!r&&!n&&Mt(e),i=!r&&!n&&!a&&Kr(e),s=r||n||a||i,o=s?Zy(e.length,String):[],l=o.length;for(var u in e)(t||$S.call(e,u))&&!(s&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||la(u,l)))&&o.push(u);return o}var SS=Object.prototype;function ua(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||SS;return e===r}var wS=Hy(Object.keys,Object),PS=Object.prototype,OS=PS.hasOwnProperty;function nv(e){if(!ua(e))return wS(e);var t=[];for(var r in Object(e))OS.call(e,r)&&r!="constructor"&&t.push(r);return t}function sr(e){return e!=null&&ku(e.length)&&!sa(e)}function et(e){return sr(e)?rv(e):nv(e)}function pu(e){return Jy(e,et,Mu)}var ES=1,AS=Object.prototype,CS=AS.hasOwnProperty;function IS(e,t,r,n,a,i){var s=r&ES,o=pu(e),l=o.length,u=pu(t),c=u.length;if(l!=c&&!s)return!1;for(var h=l;h--;){var g=o[h];if(!(s?g in t:CS.call(t,g)))return!1}var v=i.get(e),b=i.get(t);if(v&&b)return v==t&&b==e;var y=!0;i.set(e,t),i.set(t,e);for(var p=s;++h{if(typeof r=="function"&&typeof n=="function")return!0})}var LS="[object Symbol]";function Br(e){return typeof e=="symbol"||ze(e)&&yt(e)==LS}var US=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,VS=/^\w*$/;function Uu(e,t){if(Ie(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Br(e)?!0:VS.test(e)||!US.test(e)||t!=null&&e in Object(t)}var KS="Expected a function";function Vu(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(KS);var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var s=e.apply(this,n);return r.cache=i.set(a,s)||i,s};return r.cache=new(Vu.Cache||bt),r}Vu.Cache=bt;var BS=500;function zS(e){var t=Vu(e,function(n){return r.size===BS&&r.clear(),n}),r=t.cache;return t}var WS=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,HS=/\\(\\)?/g,av=zS(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(WS,function(r,n,a,i){t.push(a?i.replace(HS,"$1"):n||r)}),t});function da(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++rb,typeof u[g]>"u"&&(Array.isArray(u)&&g==="-"&&(g=u.length),v&&(c[b]!==""&&c[b]<1/0||c[b]==="-"?u[g]=[]:u[g]={})),!v)break;u=u[g]}var p=u[g];return h===void 0?delete u[g]:u[g]=h,p}function i(u){if(typeof u=="string"){if(u=u.split("/"),u[0]==="")return u;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(u)){for(const c of u)if(typeof c!="string"&&typeof c!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return u}throw new Error("Invalid JSON pointer.")}function s(u,c){if(typeof u!="object")throw new Error("Invalid input object.");c=i(c);var h=c.length;if(h===1)return u;for(var g=1;ga?0:a+t),r=r>a?a:r,r<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(a);++n0&&r(o)?t>1?Wr(o,t-1,r,n,a):Fu(a,o):n||(a[a.length]=o)}return a}function wP(e){var t=e==null?0:e.length;return t?Wr(e,1):[]}function PP(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var Dd=Math.max;function yv(e,t,r){return t=Dd(t===void 0?e.length-1:t,0),function(){for(var n=arguments,a=-1,i=Dd(n.length-t,0),s=Array(i);++a0){if(++t>=AP)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var vv=TP(EP);function bv(e){return vv(yv(e,void 0,wP),e+"")}var RP=1,xP=2,qP=4,Qn=bv(function(e,t){var r={};if(e==null)return r;var n=!1;t=da(t,function(i){return i=or(i,e),n||(n=i.length>1),i}),lr(e,Hu(e),r),n&&(r=Er(r,RP|xP|qP,$P));for(var a=t.length;a--;)gv(r,t[a]);return r});function Yu(e,t){const r=t[e];return[Qn(t,[e]),r]}function _v(e,t={},r=[]){const n=e||"";let a;if(n.startsWith("#"))a=decodeURIComponent(n.substring(1));else throw new Error(`Could not find a definition for ${e}.`);const i=ew.get(t,a);if(i===void 0)throw new Error(`Could not find a definition for ${e}.`);const s=i[Ce];if(s){if(r.includes(s)){if(r.length===1)throw new Error(`Definition for ${e} is a circular reference`);const[c,...h]=r,g=[...h,n,c].join(" -> ");throw new Error(`Definition for ${c} contains a circular reference through ${g}`)}const[o,l]=Yu(Ce,i),u=_v(l,t,[...r,n]);return Object.keys(o).length>0?{...o,...u}:u}return i}function $v(e,t={}){return _v(e,t,[])}var jP=Object.prototype,NP=jP.hasOwnProperty;function DP(e,t){return e!=null&&NP.call(e,t)}function Sv(e,t,r){t=or(t,e);for(var n=-1,a=t.length,i=!1;++nhO)return[];var r=La,n=mO(e,La);t=Tv(t),e-=La;for(var a=Zy(n,t);++r({required:[c]}))};let u;if(o.anyOf){const{...c}=o;c.allOf?c.allOf=c.allOf.slice():c.allOf=[],c.allOf.push(l),u=c}else u=Object.assign({},o,l);if(delete u.required,e.isValid(u,t,n))return s}else if(e.isValid(o,t,n))return s}return 0}function Xu(e,t,r,n,a){return qv(e,t,r,n,a)}function Zu(e,t,r,n){if(!Se(e))return e;t=or(t,e);for(var a=-1,i=t.length,s=i-1,o=e;o!=null&&++a1?r[a-1]:void 0,s=a>2?r[2]:void 0;for(i=e.length>3&&typeof i=="function"?(a--,i):void 0,s&&bO(r[0],r[1],s)&&(i=a<3?void 0:i,a=1),t=Object(t);++n-1}function CO(){}var IO=1/0,TO=Zt&&1/Du(new Zt([,-0]))[1]==IO?function(e){return new Zt(e)}:CO,RO=200;function Dv(e,t,r){var n=-1,a=Nv,i=e.length,s=!0,o=[],l=o;if(i>=RO){var u=TO(e);if(u)return Du(u);s=!1,a=Nu,l=new Qt}else l=o;e:for(;++n-1}return Wa=t,Wa}var Ha,zd;function FO(){if(zd)return Ha;zd=1;var e=ma();function t(r,n){var a=this.__data__,i=e(a,r);return i<0?(++this.size,a.push([r,n])):a[i][1]=n,this}return Ha=t,Ha}var Ga,Wd;function ga(){if(Wd)return Ga;Wd=1;var e=qO(),t=jO(),r=NO(),n=DO(),a=FO();function i(s){var o=-1,l=s==null?0:s.length;for(this.clear();++o-1&&n%1==0&&n-1&&r%1==0&&r<=e}return Ki=t,Ki}var Bi,Bf;function cE(){if(Bf)return Bi;Bf=1;var e=Vt(),t=ic(),r=st(),n="[object Arguments]",a="[object Array]",i="[object Boolean]",s="[object Date]",o="[object Error]",l="[object Function]",u="[object Map]",c="[object Number]",h="[object Object]",g="[object RegExp]",v="[object Set]",b="[object String]",y="[object WeakMap]",p="[object ArrayBuffer]",f="[object DataView]",d="[object Float32Array]",m="[object Float64Array]",_="[object Int8Array]",$="[object Int16Array]",S="[object Int32Array]",w="[object Uint8Array]",O="[object Uint8ClampedArray]",E="[object Uint16Array]",R="[object Uint32Array]",q={};q[d]=q[m]=q[_]=q[$]=q[S]=q[w]=q[O]=q[E]=q[R]=!0,q[n]=q[a]=q[p]=q[i]=q[f]=q[s]=q[o]=q[l]=q[u]=q[c]=q[h]=q[g]=q[v]=q[b]=q[y]=!1;function M(I){return r(I)&&t(I.length)&&!!q[e(I)]}return Bi=M,Bi}var zi,zf;function Bt(){if(zf)return zi;zf=1;function e(t){return function(r){return t(r)}}return zi=e,zi}var Sr={exports:{}};Sr.exports;var Wf;function sc(){return Wf||(Wf=1,function(e,t){var r=Fv(),n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,s=i&&r.process,o=function(){try{var l=a&&a.require&&a.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();e.exports=o}(Sr,Sr.exports)),Sr.exports}var Wi,Hf;function oc(){if(Hf)return Wi;Hf=1;var e=cE(),t=Bt(),r=sc(),n=r&&r.isTypedArray,a=n?t(n):e;return Wi=a,Wi}var Hi,Gf;function Vv(){if(Gf)return Hi;Gf=1;var e=oE(),t=_a(),r=Ue(),n=$a(),a=ac(),i=oc(),s=Object.prototype,o=s.hasOwnProperty;function l(u,c){var h=r(u),g=!h&&t(u),v=!h&&!g&&n(u),b=!h&&!g&&!v&&i(u),y=h||g||v||b,p=y?e(u.length,String):[],f=p.length;for(var d in u)(c||o.call(u,d))&&!(y&&(d=="length"||v&&(d=="offset"||d=="parent")||b&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||a(d,f)))&&p.push(d);return p}return Hi=l,Hi}var Gi,Yf;function lc(){if(Yf)return Gi;Yf=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,a=typeof n=="function"&&n.prototype||e;return r===a}return Gi=t,Gi}var Yi,Jf;function Kv(){if(Jf)return Yi;Jf=1;function e(t,r){return function(n){return t(r(n))}}return Yi=e,Yi}var Ji,Xf;function dE(){if(Xf)return Ji;Xf=1;var e=Kv(),t=e(Object.keys,Object);return Ji=t,Ji}var Xi,Zf;function fE(){if(Zf)return Xi;Zf=1;var e=lc(),t=dE(),r=Object.prototype,n=r.hasOwnProperty;function a(i){if(!e(i))return t(i);var s=[];for(var o in Object(i))n.call(i,o)&&o!="constructor"&&s.push(o);return s}return Xi=a,Xi}var Zi,Qf;function dr(){if(Qf)return Zi;Qf=1;var e=ec(),t=ic();function r(n){return n!=null&&t(n.length)&&!e(n)}return Zi=r,Zi}var Qi,ep;function Gr(){if(ep)return Qi;ep=1;var e=Vv(),t=fE(),r=dr();function n(a){return r(a)?e(a):t(a)}return Qi=n,Qi}var es,tp;function pE(){if(tp)return es;tp=1;var e=Hr(),t=Gr();function r(n,a){return n&&e(a,t(a),n)}return es=r,es}var ts,rp;function hE(){if(rp)return ts;rp=1;function e(t){var r=[];if(t!=null)for(var n in Object(t))r.push(n);return r}return ts=e,ts}var rs,np;function mE(){if(np)return rs;np=1;var e=it(),t=lc(),r=hE(),n=Object.prototype,a=n.hasOwnProperty;function i(s){if(!e(s))return r(s);var o=t(s),l=[];for(var u in s)u=="constructor"&&(o||!a.call(s,u))||l.push(u);return l}return rs=i,rs}var ns,ap;function fr(){if(ap)return ns;ap=1;var e=Vv(),t=mE(),r=dr();function n(a){return r(a)?e(a,!0):t(a)}return ns=n,ns}var as,ip;function gE(){if(ip)return as;ip=1;var e=Hr(),t=fr();function r(n,a){return n&&e(a,t(a),n)}return as=r,as}var wr={exports:{}};wr.exports;var sp;function Bv(){return sp||(sp=1,function(e,t){var r=at(),n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,s=i?r.Buffer:void 0,o=s?s.allocUnsafe:void 0;function l(u,c){if(c)return u.slice();var h=u.length,g=o?o(h):new u.constructor(h);return u.copy(g),g}e.exports=l}(wr,wr.exports)),wr.exports}var is,op;function uc(){if(op)return is;op=1;function e(t,r){var n=-1,a=t.length;for(r||(r=Array(a));++n v))return!1;var y=h.get(s),p=h.get(o);if(y&&p)return y==o&&p==s;var f=-1,d=!0,m=l&a?new e:void 0;for(h.set(s,o),h.set(o,s);++f0&&i(c)?a>1?r(c,a-1,i,s,o):e(o,c):s||(o[o.length]=c)}return o}return Zs=r,Zs}var Qs,th;function zt(){if(th)return Qs;th=1;function e(t,r){for(var n=-1,a=t==null?0:t.length,i=Array(a);++nn||o&&l&&c&&!u&&!h||i&&l&&c||!a&&c||!s)return 1;if(!i&&!o&&!h&&r=u)return c;var h=a[i];return c*(h=="desc"?-1:1)}}return r.index-n.index}return jo=t,jo}var No,Dh;function hA(){if(Dh)return No;Dh=1;var e=zt(),t=vc(),r=sA(),n=cA(),a=dA(),i=Bt(),s=pA(),o=Yr(),l=Ue();function u(c,h,g){h.length?h=e(h,function(y){return l(y)?function(p){return t(p,y.length===1?y[0]:y)}:y}):h=[o];var v=-1;h=e(h,i(r));var b=n(c,function(y,p,f){var d=e(h,function(m){return m(y)});return{criteria:d,index:++v,value:y}});return a(b,function(y,p){return s(y,p,g)})}return No=u,No}var Do,Fh;function sb(){if(Fh)return Do;Fh=1;function e(t,r,n){switch(n.length){case 0:return t.call(r);case 1:return t.call(r,n[0]);case 2:return t.call(r,n[0],n[1]);case 3:return t.call(r,n[0],n[1],n[2])}return t.apply(r,n)}return Do=e,Do}var Fo,Mh;function mA(){if(Mh)return Fo;Mh=1;var e=sb(),t=Math.max;function r(n,a,i){return a=t(a===void 0?n.length-1:a,0),function(){for(var s=arguments,o=-1,l=t(s.length-a,0),u=Array(l);++o0){if(++i>=e)return arguments[0]}else i=0;return a.apply(void 0,arguments)}}return Lo=n,Lo}var Uo,Vh;function bA(){if(Vh)return Uo;Vh=1;var e=yA(),t=vA(),r=t(e);return Uo=r,Uo}var Vo,Kh;function Wt(){if(Kh)return Vo;Kh=1;var e=Yr(),t=mA(),r=bA();function n(a,i){return r(t(a,i,e),a+"")}return Vo=n,Vo}var Ko,Bh;function bc(){if(Bh)return Ko;Bh=1;var e=ur(),t=dr(),r=ac(),n=it();function a(i,s,o){if(!n(o))return!1;var l=typeof s;return(l=="number"?t(o)&&r(s,o.length):l=="string"&&s in o)?e(o[s],i):!1}return Ko=a,Ko}var Bo,zh;function ob(){if(zh)return Bo;zh=1;var e=gc(),t=hA(),r=Wt(),n=bc(),a=r(function(i,s){if(i==null)return[];var o=s.length;return o>1&&n(i,s[0],s[1])?s=[]:o>2&&n(s[0],s[1],s[2])&&(s=[s[0]]),t(i,e(s,1),[])});return Bo=a,Bo}var zo,Wh;function _A(){if(Wh)return zo;Wh=1;function e(t,r,n,a){for(var i=t.length,s=n+(a?1:-1);a?s--:++s-1}return Yo=t,Yo}var Jo,Xh;function $c(){if(Xh)return Jo;Xh=1;function e(t,r,n){for(var a=-1,i=t==null?0:t.length;++a=s){var f=u?null:a(l);if(f)return i(f);b=!1,g=n,p=new e}else p=u?[]:y;e:for(;++h2?l[2]:void 0;for(h&&r(l[0],l[1],h)&&(c=1);++u=120&&d.length>=120)?new e(b&&d):void 0}d=l[0];var m=-1,_=y[0];e:for(;++mArray.isArray(I)?I:[I],u=I=>I===void 0,c=I=>s(I)||Array.isArray(I)?Object.keys(I):[],h=(I,L)=>I.hasOwnProperty(L),g=I=>t(r(I)),v=I=>u(I)||Array.isArray(I)&&I.length===0,b=(I,L,k,J)=>L&&h(L,k)&&I&&h(I,k)&&J(I[k],L[k]),y=(I,L)=>u(I)&&L===0||u(L)&&I===0||e(I,L),p=(I,L)=>u(I)&&L===!1||u(L)&&I===!1||e(I,L),f=I=>u(I)||e(I,{})||I===!0,d=I=>u(I)||e(I,{}),m=I=>u(I)||s(I)||I===!0||I===!1;function _(I,L){return v(I)&&v(L)?!0:e(g(I),g(L))}function $(I,L){return I=l(I),L=l(L),e(g(I),g(L))}function S(I,L,k,J){var X=r(c(I).concat(c(L)));return d(I)&&d(L)?!0:d(I)&&c(L).length||d(L)&&c(I).length?!1:X.every(function(Y){var ne=I[Y],K=L[Y];return Array.isArray(ne)&&Array.isArray(K)?e(g(I),g(L)):Array.isArray(ne)&&!Array.isArray(K)||Array.isArray(K)&&!Array.isArray(ne)?!1:b(I,L,Y,J)})}function w(I,L,k,J){return s(I)&&s(L)?J(I,L):Array.isArray(I)&&Array.isArray(L)?S(I,L,k,J):e(I,L)}function O(I,L,k,J){var X=n(I,J),Y=n(L,J),ne=i(X,Y,J);return ne.length===Math.max(X.length,Y.length)}var E={title:e,uniqueItems:p,minLength:y,minItems:y,minProperties:y,required:_,enum:_,type:$,items:w,anyOf:O,allOf:O,oneOf:O,properties:S,patternProperties:S,dependencies:S},R=["properties","patternProperties","dependencies","uniqueItems","minLength","minItems","minProperties","required"],q=["additionalProperties","additionalItems","contains","propertyNames","not"];function M(I,L,k){if(k=a(k,{ignore:[]}),f(I)&&f(L))return!0;if(!m(I)||!m(L))throw new Error("Either of the values are not a JSON schema.");if(I===L)return!0;if(o(I)&&o(L))return I===L;if(I===void 0&&L===!1||L===void 0&&I===!1||u(I)&&!u(L)||!u(I)&&u(L))return!1;var J=r(Object.keys(I).concat(Object.keys(L)));if(k.ignore.length&&(J=J.filter(Y=>k.ignore.indexOf(Y)===-1)),!J.length)return!0;function X(Y,ne){return M(Y,ne,k)}return J.every(function(Y){var ne=I[Y],K=L[Y];if(q.indexOf(Y)!==-1)return M(ne,K,k);var j=E[Y];if(j||(j=e),e(ne,K))return!0;if(R.indexOf(Y)===-1&&(!h(I,Y)&&h(L,Y)||h(I,Y)&&!h(L,Y)))return ne===K;var V=j(ne,K,Y,X);if(!o(V))throw new Error("Comparer must return true or false");return V})}return cl=M,cl}var dl,fm;function Ec(){if(fm)return dl;fm=1;function e(t){return Object.prototype.toString.call(t)==="[object Array]"}return dl=Array.isArray||e,dl}var fl,pm;function CA(){if(pm)return fl;pm=1;function e(t){return(typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]")&&t.valueOf()===t.valueOf()}return fl=e,fl}var pl,hm;function IA(){if(hm)return pl;hm=1;var e=CA();function t(r){return e(r)&&r%1===0}return pl=t,pl}var hl,mm;function pb(){if(mm)return hl;mm=1;var e=Ec(),t=IA();function r(n){var a;if(!e(n)||(a=n.length,!a))return!1;for(var i=0;il&&(c=l,l=o,o=c),l=l-o}return u*o}function i(o,l){var u=0,c;if(o===0)return l;if(l===0)return o;for(;(o&1)===0&&(l&1)===0;)o>>>=1,l>>>=1,u++;for(;(o&1)===0;)o>>>=1;for(;l;){for(;(l&1)===0;)l>>>=1;o>l&&(c=l,l=o,o=c),l=l-o}return o<1){if(c=l[0],u=l[1],!r(u))throw new TypeError("gcd()::invalid input argument. Accessor must be a function. Value: `"+u+"`.")}else c=l[0];else throw new TypeError("gcd()::invalid input argument. Must provide an array of integers. Value: `"+l[0]+"`.");if(h=c.length,h<2)return null;if(u){for(g=new Array(h),b=0;b1){if(l=s[0],o=s[1],!n(o))throw new TypeError("lcm()::invalid input argument. Accessor must be a function. Value: `"+o+"`.")}else l=s[0];else throw new TypeError("lcm()::invalid input argument. Must provide an array of integers. Value: `"+s[0]+"`.");if(u=l.length,u<2)return null;if(o){for(c=new Array(u),g=0;g1?i[o-1]:void 0,u=o>2?i[2]:void 0;for(l=n.length>3&&typeof l=="function"?(o--,l):void 0,u&&t(i[0],i[1],u)&&(l=o<3?void 0:l,o=1),a=Object(a);++s-1;)y!==l&&s.call(y,p,1),s.call(l,p,1);return l}return Rl=o,Rl}var xl,qm;function UA(){if(qm)return xl;qm=1;var e=LA();function t(r,n){return r&&r.length&&n&&n.length?e(r,n):r}return xl=t,xl}var ql,jm;function VA(){if(jm)return ql;jm=1;var e=Yr();function t(r){return typeof r=="function"?r:e}return ql=t,ql}var jl,Nm;function _b(){if(Nm)return jl;Nm=1;var e=kv(),t=ib(),r=VA(),n=Ue();function a(i,s){var o=n(i)?e:t;return o(i,r(s))}return jl=a,jl}var Nl,Dm;function KA(){if(Dm)return Nl;Dm=1;var e=wa(),t=_c(),r=$c(),n=zt(),a=Bt(),i=Pa(),s=200;function o(l,u,c,h){var g=-1,v=t,b=!0,y=l.length,p=[],f=u.length;if(!y)return p;c&&(u=n(u,a(c))),h?(v=r,b=!1):u.length>=s&&(v=i,b=!1,u=new e(u));e:for(;++gn(t(y.map(c))),l=(y,p)=>y.map(f=>f&&f[p]),u=(y,p)=>Object.prototype.hasOwnProperty.call(y,p),c=y=>r(y)||Array.isArray(y)?Object.keys(y):[],h=y=>y!==void 0,g=y=>r(y)||y===!0||y===!1,v=y=>!c(y).length&&y!==!1&&y!==!0;return Fl={allUniqueKeys:o,deleteUndefinedProps:s,getValues:l,has:u,isEmptySchema:v,isSchema:g,keys:c,notUndefined:h,uniqWith:a,withoutArr:(y,...p)=>i.apply(null,[y].concat(e(p)))},Fl}var Ml,km;function zA(){if(km)return Ml;km=1;const e=Oc(),t=_b(),{allUniqueKeys:r,deleteUndefinedProps:n,getValues:a,keys:i,notUndefined:s,uniqWith:o,withoutArr:l}=$b();function u(h){t(h,function(g,v){g===!1&&delete h[v]})}function c(h,g){return r(h).reduce(function(b,y){const p=a(h,y),f=o(p.filter(s),e);return b[y]=g(f,y),b},{})}return Ml={keywords:["properties","patternProperties","additionalProperties"],resolver(h,g,v,b){b.ignoreAdditionalProperties||(h.forEach(function(p){const f=h.filter($=>$!==p),d=i(p.properties),_=i(p.patternProperties).map($=>new RegExp($));f.forEach(function($){const S=i($.properties),w=S.filter(E=>_.some(R=>R.test(E)));l(S,d,w).forEach(function(E){$.properties[E]=v.properties([$.properties[E],p.additionalProperties],E)})})}),h.forEach(function(p){const f=h.filter(m=>m!==p),d=i(p.patternProperties);p.additionalProperties===!1&&f.forEach(function(m){const _=i(m.patternProperties);l(_,d).forEach(S=>delete m.patternProperties[S])})}));const y={additionalProperties:v.additionalProperties(h.map(p=>p.additionalProperties)),patternProperties:c(h.map(p=>p.patternProperties),v.patternProperties),properties:c(h.map(p=>p.properties),v.properties)};return y.additionalProperties===!1&&u(y.properties),n(y)}},Ml}var kl,Lm;function WA(){if(Lm)return kl;Lm=1;const e=Oc(),t=_b(),{allUniqueKeys:r,deleteUndefinedProps:n,has:a,isSchema:i,notUndefined:s,uniqWith:o}=$b();function l(g){t(g,function(v,b){v===!1&&g.splice(b,1)})}function u(g,v){return g.map(function(b){if(b)if(Array.isArray(b.items)){const y=b.items[v];if(i(y))return y;if(a(b,"additionalItems"))return b.additionalItems}else return b.items})}function c(g){return g.map(function(v){if(v)return Array.isArray(v.items)?v.additionalItems:v.items})}function h(g,v,b){return r(b).reduce(function(p,f){const d=u(g,f),m=o(d.filter(s),e);return p[f]=v(m,f),p},[])}return kl={keywords:["items","additionalItems"],resolver(g,v,b){const y=g.map(m=>m.items),p=y.filter(s),f={};p.every(i)?f.items=b.items(y):f.items=h(g,b.items,y);let d;return p.every(Array.isArray)?d=g.map(m=>m.additionalItems):p.some(Array.isArray)&&(d=c(g)),d&&(f.additionalItems=b.additionalItems(d)),f.additionalItems===!1&&Array.isArray(f.items)&&l(f.items),n(f)}},kl}var Ll,Um;function HA(){if(Um)return Ll;Um=1;const e=NE(),t=Oc(),r=RA(),n=FA(),a=vb(),i=bb(),s=MA(),o=fb(),l=eb(),u=Aa(),c=UA(),h=ob(),g=Sc(),v=wc(),b=zA(),y=WA(),p=(B,G)=>B.indexOf(G)!==-1,f=B=>u(B)||B===!0||B===!1,d=B=>B===!1,m=B=>B===!0,_=(B,G,C)=>C(B),$=B=>h(g(i(B))),S=B=>B!==void 0,w=B=>g(i(B.map(Y))),O=B=>B[0],E=B=>$(B),R=B=>Math.max.apply(Math,B),q=B=>Math.min.apply(Math,B),M=B=>B.some(m),I=B=>v(a(B),l);function L(B){return function(G,C){return t({[B]:G},{[B]:C})}}function k(B){let{allOf:G=[],...C}=B;return C=u(B)?C:B,[C,...G.map(k)]}function J(B,G){return B.map(C=>C&&C[G])}function X(B,G){return B.map(function(C,x){try{return G(C,x)}catch{return}}).filter(S)}function Y(B){return u(B)||Array.isArray(B)?Object.keys(B):[]}function ne(B,G){if(G=G||[],!B.length)return G;const C=B.slice(0).shift(),x=B.slice(1);return G.length?ne(x,a(G.map(F=>C.map(z=>[z].concat(F))))):ne(x,C.map(F=>F))}function K(B,G){let C;try{C=B.map(function(x){return JSON.stringify(x,null,2)}).join(`
+const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CN_ylOby.js","assets/index-anmhb6wk.js","assets/index-DlZV-Rce.css"])))=>i.map(i=>d[i]);
+import{t as P_,k as Qc,l as kr,r as H,$ as O_,j as A,L as Ry,_ as E_,n as xy,T as qy,o as A_,q as ed,s as C_,v as qe,w as I_,x as T_,y as R_,z as x_,A as q_,B as j_,E as N_,G as D_,H as Ou,J as Ir,K as Eu,M as jy,N as F_,O as Au,P as M_,Q as Cu,R as Gn,S as k_,U as Ny,V as L_,W as du,X as Iu,Y as U_,Z as Ee,a0 as Tu,a1 as V_,a2 as be,a3 as Tr,a4 as K_,a5 as B_,a6 as z_,a7 as W_,a8 as H_,a9 as G_,aa as Y_,ab as J_,ac as td,ad as X_,ae as Z_,af as rd,ag as Q_,ah as e0,ai as t0,aj as r0,ak as nd,al as n0,am as a0,an as i0,ao as s0,ap as o0,aq as l0,ar as Lr,g as tn,as as u0,at as c0,au as d0}from"./index-anmhb6wk.js";import{i as f0}from"./chunk-SSA7SXE4-D2nwPcpz.js";import{u as p0,$ as h0,a as m0,b as g0,m as y0,c as ad,d as v0,e as b0}from"./useMenuTriggerState-C6GDlwil.js";import{$ as _0}from"./useSelectableItem-BIhPf2mL.js";import{u as $0,C as S0}from"./index-BAUrj1ow.js";var id=P_({slots:{base:["group inline-flex flex-col relative"],label:["block","absolute","z-10","origin-top-left","flex-shrink-0","rtl:origin-top-right","subpixel-antialiased","text-small","text-foreground-500","pointer-events-none","group-data-[has-label-outside=true]:pointer-events-auto"],mainWrapper:"w-full flex flex-col",trigger:"relative px-3 gap-3 w-full inline-flex flex-row items-center shadow-xs outline-hidden tap-highlight-transparent",innerWrapper:"inline-flex h-fit w-[calc(100%_-theme(spacing.6))] min-h-4 items-center gap-1.5 box-border",selectorIcon:"absolute end-3 w-4 h-4",spinner:"absolute end-3",value:["text-foreground-500","font-normal","w-full","text-start"],listboxWrapper:"scroll-py-6 w-full",listbox:"",popoverContent:"w-full p-1 overflow-hidden",clearButton:["w-4","h-4","z-10","mb-4","relative","start-auto","appearance-none","outline-none","select-none","opacity-70","hover:!opacity-100","cursor-pointer","active:!opacity-70","rounded-full",...Qc],helperWrapper:"p-1 flex relative flex-col gap-1.5 group-data-[has-helper=true]:flex",description:"text-tiny text-foreground-400",errorMessage:"text-tiny text-danger",endWrapper:"flex end-18",endContent:"mb-4"},variants:{variant:{flat:{trigger:["bg-default-100","data-[hover=true]:bg-default-200","group-data-[focus=true]:bg-default-200"],clearButton:"mb-4"},faded:{trigger:["bg-default-100","border-medium","border-default-200","data-[hover=true]:border-default-400 data-[focus=true]:border-default-400 data-[open=true]:border-default-400"],value:"group-data-[has-value=true]:text-default-foreground",clearButton:"mb-4"},bordered:{trigger:["border-medium","border-default-200","data-[hover=true]:border-default-400","data-[open=true]:border-default-foreground","data-[focus=true]:border-default-foreground"],value:"group-data-[has-value=true]:text-default-foreground",clearButton:"mb-4"},underlined:{trigger:["!px-1","!pb-0","!gap-0","relative","box-border","border-b-medium","shadow-[0_1px_0px_0_rgba(0,0,0,0.05)]","border-default-200","!rounded-none","hover:border-default-300","after:content-['']","after:w-0","after:origin-center","after:bg-default-foreground","after:absolute","after:left-1/2","after:-translate-x-1/2","after:-bottom-[2px]","after:h-[2px]","data-[open=true]:after:w-full","data-[focus=true]:after:w-full"],value:"group-data-[has-value=true]:text-default-foreground",clearButton:"mb-4 me-2"}},color:{default:{},primary:{selectorIcon:"text-primary"},secondary:{selectorIcon:"text-secondary"},success:{selectorIcon:"text-success"},warning:{selectorIcon:"text-warning"},danger:{selectorIcon:"text-danger"}},size:{sm:{label:"text-tiny",trigger:"h-8 min-h-8 px-2 rounded-small",value:"text-small",clearButton:"text-medium"},md:{trigger:"h-10 min-h-10 rounded-medium",value:"text-small",clearButton:"text-large"},lg:{trigger:"h-12 min-h-12 rounded-large",value:"text-medium",clearButton:"mb-5 text-large"}},radius:{none:{trigger:"rounded-none"},sm:{trigger:"rounded-small"},md:{trigger:"rounded-medium"},lg:{trigger:"rounded-large"},full:{trigger:"rounded-full"}},labelPlacement:{outside:{base:"flex flex-col",clearButton:"mb-0"},"outside-left":{base:"flex-row items-center flex-nowrap data-[has-helper=true]:items-start",label:"relative pe-2 text-foreground",clearButton:"mb-0"},inside:{label:"text-tiny cursor-pointer",trigger:"flex-col items-start justify-center gap-0"}},fullWidth:{true:{base:"w-full"},false:{base:"min-w-40"}},isClearable:{true:{clearButton:"peer-data-[filled=true]:opacity-70 peer-data-[filled=true]:block",endContent:"ms-3"}},isDisabled:{true:{base:"opacity-disabled pointer-events-none",trigger:"pointer-events-none"}},isInvalid:{true:{label:"!text-danger",value:"!text-danger",selectorIcon:"text-danger"}},isRequired:{true:{label:"after:content-['*'] after:text-danger after:ms-0.5"}},isMultiline:{true:{label:"relative",trigger:"!h-auto"},false:{value:"truncate"}},disableAnimation:{true:{trigger:"after:transition-none",base:"transition-none",label:"transition-none",selectorIcon:"transition-none"},false:{base:"transition-background motion-reduce:transition-none !duration-150",label:["will-change-auto","origin-top-left","rtl:origin-top-right","!duration-200","!ease-out","transition-[transform,color,left,opacity,translate,scale]","motion-reduce:transition-none"],selectorIcon:"transition-transform duration-150 ease motion-reduce:transition-none",clearButton:["transition-opacity","motion-reduce:transition-none"]}},disableSelectorIconRotation:{true:{},false:{selectorIcon:"data-[open=true]:rotate-180"}}},defaultVariants:{variant:"flat",color:"default",size:"md",fullWidth:!0,isDisabled:!1,isMultiline:!1,disableSelectorIconRotation:!1},compoundVariants:[{variant:"flat",color:"default",class:{value:"group-data-[has-value=true]:text-default-foreground",trigger:["bg-default-100","data-[hover=true]:bg-default-200"]}},{variant:"flat",color:"primary",class:{trigger:["bg-primary-100","text-primary","data-[hover=true]:bg-primary-50","group-data-[focus=true]:bg-primary-50"],value:"text-primary",label:"text-primary"}},{variant:"flat",color:"secondary",class:{trigger:["bg-secondary-100","text-secondary","data-[hover=true]:bg-secondary-50","group-data-[focus=true]:bg-secondary-50"],value:"text-secondary",label:"text-secondary"}},{variant:"flat",color:"success",class:{trigger:["bg-success-100","text-success-600","dark:text-success","data-[hover=true]:bg-success-50","group-data-[focus=true]:bg-success-50"],value:"text-success-600 dark:text-success",label:"text-success-600 dark:text-success"}},{variant:"flat",color:"warning",class:{trigger:["bg-warning-100","text-warning-600","dark:text-warning","data-[hover=true]:bg-warning-50","group-data-[focus=true]:bg-warning-50"],value:"text-warning-600 dark:text-warning",label:"text-warning-600 dark:text-warning"}},{variant:"flat",color:"danger",class:{trigger:["bg-danger-100","text-danger","dark:text-danger-500","data-[hover=true]:bg-danger-50","group-data-[focus=true]:bg-danger-50"],value:"text-danger dark:text-danger-500",label:"text-danger dark:text-danger-500"}},{variant:"faded",color:"primary",class:{trigger:"data-[hover=true]:border-primary data-[focus=true]:border-primary data-[open=true]:border-primary",label:"text-primary"}},{variant:"faded",color:"secondary",class:{trigger:"data-[hover=true]:border-secondary data-[focus=true]:border-secondary data-[open=true]:border-secondary",label:"text-secondary"}},{variant:"faded",color:"success",class:{trigger:"data-[hover=true]:border-success data-[focus=true]:border-success data-[open=true]:border-success",label:"text-success"}},{variant:"faded",color:"warning",class:{trigger:"data-[hover=true]:border-warning data-[focus=true]:border-warning data-[open=true]:border-warning",label:"text-warning"}},{variant:"faded",color:"danger",class:{trigger:"data-[hover=true]:border-danger data-[focus=true]:border-danger data-[open=true]:border-danger",label:"text-danger"}},{variant:"underlined",color:"default",class:{value:"group-data-[has-value=true]:text-foreground"}},{variant:"underlined",color:"primary",class:{trigger:"after:bg-primary",label:"text-primary"}},{variant:"underlined",color:"secondary",class:{trigger:"after:bg-secondary",label:"text-secondary"}},{variant:"underlined",color:"success",class:{trigger:"after:bg-success",label:"text-success"}},{variant:"underlined",color:"warning",class:{trigger:"after:bg-warning",label:"text-warning"}},{variant:"underlined",color:"danger",class:{trigger:"after:bg-danger",label:"text-danger"}},{variant:"bordered",color:"primary",class:{trigger:["data-[open=true]:border-primary","data-[focus=true]:border-primary"],label:"text-primary"}},{variant:"bordered",color:"secondary",class:{trigger:["data-[open=true]:border-secondary","data-[focus=true]:border-secondary"],label:"text-secondary"}},{variant:"bordered",color:"success",class:{trigger:["data-[open=true]:border-success","data-[focus=true]:border-success"],label:"text-success"}},{variant:"bordered",color:"warning",class:{trigger:["data-[open=true]:border-warning","data-[focus=true]:border-warning"],label:"text-warning"}},{variant:"bordered",color:"danger",class:{trigger:["data-[open=true]:border-danger","data-[focus=true]:border-danger"],label:"text-danger"}},{labelPlacement:"inside",color:"default",class:{label:"group-data-[filled=true]:text-default-600"}},{labelPlacement:"outside",color:"default",class:{label:"group-data-[filled=true]:text-foreground"}},{radius:"full",size:["sm"],class:{trigger:"px-3"}},{radius:"full",size:"md",class:{trigger:"px-4"}},{radius:"full",size:"lg",class:{trigger:"px-5"}},{disableAnimation:!1,variant:["faded","bordered"],class:{trigger:"transition-colors motion-reduce:transition-none"}},{disableAnimation:!1,variant:"underlined",class:{trigger:"after:transition-width motion-reduce:after:transition-none"}},{variant:["flat","faded"],class:{trigger:[...Qc]}},{isInvalid:!0,variant:"flat",class:{trigger:["bg-danger-50","data-[hover=true]:bg-danger-100","group-data-[focus=true]:bg-danger-50"]}},{isInvalid:!0,variant:"bordered",class:{trigger:"!border-danger group-data-[focus=true]:border-danger"}},{isInvalid:!0,variant:"underlined",class:{trigger:"after:bg-danger"}},{labelPlacement:"inside",size:"sm",class:{trigger:"h-12 min-h-12 py-1.5 px-3"}},{labelPlacement:"inside",size:"md",class:{trigger:"h-14 min-h-14 py-2"}},{labelPlacement:"inside",size:"lg",class:{label:"text-medium",trigger:"h-16 min-h-16 py-2.5 gap-0"}},{labelPlacement:"outside",isMultiline:!1,class:{base:"group relative justify-end",label:["pb-0","z-20","top-1/2","-translate-y-1/2","group-data-[filled=true]:start-0"]}},{labelPlacement:["inside"],class:{label:"group-data-[filled=true]:scale-85"}},{labelPlacement:"inside",size:["sm","md"],class:{label:"text-small"}},{labelPlacement:"inside",isMultiline:!1,size:"sm",class:{label:["group-data-[filled=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-tiny)/2_-_8px)]"],innerWrapper:"group-data-[has-label=true]:pt-4"}},{labelPlacement:"inside",isMultiline:!1,size:"md",class:{label:["group-data-[filled=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_6px)]"],innerWrapper:"group-data-[has-label=true]:pt-4"}},{labelPlacement:"inside",isMultiline:!1,size:"lg",class:{label:["text-medium","group-data-[filled=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_8px)]"],innerWrapper:"group-data-[has-label=true]:pt-5"}},{labelPlacement:"inside",variant:["faded","bordered"],isMultiline:!1,size:"sm",class:{label:["group-data-[filled=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-tiny)/2_-_8px_-_var(--heroui-border-width-medium))]"]}},{labelPlacement:"inside",variant:["faded","bordered"],isMultiline:!1,size:"md",class:{label:["group-data-[filled=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_6px_-_var(--heroui-border-width-medium))]"]}},{labelPlacement:"inside",variant:["faded","bordered"],isMultiline:!1,size:"lg",class:{label:["text-medium","group-data-[filled=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_8px_-_var(--heroui-border-width-medium))]"]}},{labelPlacement:"inside",variant:"underlined",isMultiline:!1,size:"sm",class:{label:["group-data-[filled=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-tiny)/2_-_5px)]"]}},{labelPlacement:"inside",variant:"underlined",isMultiline:!1,size:"md",class:{label:["group-data-[filled=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_3.5px)]"]}},{labelPlacement:"inside",variant:"underlined",isMultiline:!1,size:"lg",class:{label:["text-medium","group-data-[filled=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_4px)]"]}},{labelPlacement:"outside",size:"sm",isMultiline:!1,class:{label:["start-2","text-tiny","group-data-[filled=true]:-translate-y-[calc(100%_+var(--heroui-font-size-tiny)/2_+_16px)]","group-data-[has-helper=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-small)/2_+_26px)]"],base:"data-[has-label=true]:mt-[calc(var(--heroui-font-size-small)_+_8px)]"}},{labelPlacement:"outside",isMultiline:!1,size:"md",class:{label:["start-3","text-small","group-data-[filled=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-small)/2_+_20px)]","group-data-[has-helper=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-small)/2_+_30px)]"],base:"data-[has-label=true]:mt-[calc(var(--heroui-font-size-small)_+_10px)]"}},{labelPlacement:"outside",isMultiline:!1,size:"lg",class:{label:["start-3","text-medium","group-data-[filled=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-small)/2_+_24px)]","group-data-[has-helper=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-small)/2_+_34px)]"],base:"data-[has-label=true]:mt-[calc(var(--heroui-font-size-small)_+_12px)]"}},{labelPlacement:"outside-left",size:"sm",class:{label:"group-data-[has-helper=true]:pt-2"}},{labelPlacement:"outside-left",size:"md",class:{label:"group-data-[has-helper=true]:pt-3"}},{labelPlacement:"outside-left",size:"lg",class:{label:"group-data-[has-helper=true]:pt-4"}},{labelPlacement:"outside",isMultiline:!0,class:{label:"pb-1.5"}},{labelPlacement:["inside","outside"],class:{label:["pe-2","max-w-full","text-ellipsis","overflow-hidden"]}},{labelPlacement:["outside","outside-left"],isClearable:!0,class:{endContent:["mt-4"],clearButton:["group-data-[has-end-content=true]:mt-4"]}},{isClearable:!1,labelPlacement:["outside","outside-left"],class:{endContent:["mt-4"]}},{isClearable:!0,variant:["underlined"],class:{clearButton:["relative group-data-[has-end-content=true]:left-2"],endContent:["me-2"]}},{isClearable:!1,variant:["underlined"],class:{endContent:["me-2"]}},{isClearable:!0,size:"sm",class:{endContent:"ms-2"}}]}),Dy=()=>E_(()=>import("./index-CN_ylOby.js"),__vite__mapDeps([0,1,2])).then(e=>e.default),Fy=kr(({children:e,motionProps:t,placement:r,disableAnimation:n,style:a={},transformOrigin:i={},...s},o)=>{let l=a;return i.originX!==void 0||i.originY!==void 0?l={...l,transformOrigin:i}:r&&(l={...l,...C_(r==="center"?"top":r)}),n?A.jsx("div",{...s,ref:o,children:e}):A.jsx(Ry,{features:Dy,children:A.jsx(xy.div,{ref:o,animate:"enter",exit:"exit",initial:"initial",style:l,variants:qy.scaleSpringOpacity,...qe(s,t),children:e})})});Fy.displayName="HeroUI.FreeSoloPopoverWrapper";var My=kr(({children:e,transformOrigin:t,disableDialogFocus:r=!1,...n},a)=>{const{Component:i,state:s,placement:o,backdrop:l,portalContainer:u,disableAnimation:c,motionProps:h,isNonModal:g,getPopoverProps:v,getBackdropProps:b,getDialogProps:y,getContentProps:p}=p0({...n,ref:a}),f=H.useRef(null),{dialogProps:d,titleProps:m}=O_({},f),_=y({...!r&&{ref:f},...d}),$=H.useMemo(()=>l==="transparent"?null:c?A.jsx("div",{...b()}):A.jsx(Ry,{features:Dy,children:A.jsx(xy.div,{animate:"enter",exit:"exit",initial:"exit",variants:qy.fade,...b()})}),[l,c,b]);return A.jsxs(A_,{portalContainer:u,children:[!g&&$,A.jsx(i,{...v(),children:A.jsxs(Fy,{disableAnimation:c,motionProps:h,placement:o,tabIndex:-1,transformOrigin:t,..._,children:[!g&&A.jsx(ed,{onDismiss:s.close}),A.jsx("div",{...p(),children:typeof e=="function"?e(m):e}),A.jsx(ed,{onDismiss:s.close})]})})]})});My.displayName="HeroUI.FreeSoloPopover";var w0=My;class sd{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let r=this.keyMap.get(t);var n;return r&&(n=r.prevKey)!==null&&n!==void 0?n:null}getKeyAfter(t){let r=this.keyMap.get(t);var n;return r&&(n=r.nextKey)!==null&&n!==void 0?n:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(t){var r;return(r=this.keyMap.get(t))!==null&&r!==void 0?r:null}at(t){const r=[...this.getKeys()];return this.getItem(r[t])}getChildren(t){let r=this.keyMap.get(t);return r?.childNodes||[]}constructor(t){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=t;let r=s=>{if(this.keyMap.set(s.key,s),s.childNodes&&s.type==="section")for(let o of s.childNodes)r(o)};for(let s of t)r(s);let n=null,a=0;for(let[s,o]of this.keyMap)n?(n.nextKey=s,o.prevKey=n.key):(this.firstKey=s,o.prevKey=void 0),o.type==="item"&&(o.index=a++),n=o,n.nextKey=void 0;var i;this.lastKey=(i=n?.key)!==null&&i!==void 0?i:null}}function ky(e){let{filter:t,layoutDelegate:r}=e,n=I_(e),a=H.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),i=H.useCallback(u=>t?new sd(t(u)):new sd(u),[t]),s=H.useMemo(()=>({suppressTextValueWarning:e.suppressTextValueWarning}),[e.suppressTextValueWarning]),o=T_(e,i,s),l=H.useMemo(()=>new R_(o,n,{layoutDelegate:r}),[o,n,r]);return P0(o,l),{collection:o,disabledKeys:a,selectionManager:l}}function P0(e,t){const r=H.useRef(null);H.useEffect(()=>{if(t.focusedKey!=null&&!e.getItem(t.focusedKey)&&r.current){const c=r.current.getItem(t.focusedKey),h=[...r.current.getKeys()].map(f=>{const d=r.current.getItem(f);return d?.type==="item"?d:null}).filter(f=>f!==null),g=[...e.getKeys()].map(f=>{const d=e.getItem(f);return d?.type==="item"?d:null}).filter(f=>f!==null);var n,a;const v=((n=h?.length)!==null&&n!==void 0?n:0)-((a=g?.length)!==null&&a!==void 0?a:0);var i,s,o;let b=Math.min(v>1?Math.max(((i=c?.index)!==null&&i!==void 0?i:0)-v+1,0):(s=c?.index)!==null&&s!==void 0?s:0,((o=g?.length)!==null&&o!==void 0?o:0)-1),y=null,p=!1;for(;b>=0;){if(!t.isDisabled(g[b].key)){y=g[b];break}if(b((l=c?.index)!==null&&l!==void 0?l:0)&&(b=(u=c?.index)!==null&&u!==void 0?u:0),b--}}t.setFocusedKey(y?y.key:null)}r.current=e},[e,t])}function O0(e){const{collection:t,disabledKeys:r,selectionManager:n,selectionManager:{setSelectedKeys:a,selectedKeys:i,selectionMode:s}}=ky(e),o=H.useMemo(()=>!e.isLoading&&i.size!==0?Array.from(i).filter(Boolean).filter(u=>!t.getItem(u)):[],[i,t]),l=i.size!==0?Array.from(i).map(u=>t.getItem(u)).filter(Boolean):null;return o.length&&console.warn(`Select: Keys "${o.join(", ")}" passed to "selectedKeys" are not present in the collection.`),{collection:t,disabledKeys:r,selectionManager:n,selectionMode:s,selectedKeys:i,setSelectedKeys:a.bind(n),selectedItems:l}}function E0({validate:e,validationBehavior:t,...r}){const[n,a]=H.useState(!1),[i,s]=H.useState(null),o=h0(r),l=O0({...r,onSelectionChange:h=>{r.onSelectionChange!=null&&(h==="all"?r.onSelectionChange(new Set(l.collection.getKeys())):r.onSelectionChange(h)),r.selectionMode==="single"&&o.close()}}),u=x_({...r,validationBehavior:t,validate:h=>{if(!e)return;const g=Array.from(h);return e(r.selectionMode==="single"?g[0]:g)},value:l.selectedKeys}),c=l.collection.size===0&&r.hideEmptyContent;return{...u,...l,...o,focusStrategy:i,close(){o.close()},open(h=null){c||(s(h),o.open())},toggle(h=null){c||(s(h),o.toggle())},isFocused:n,setFocused:a}}function A0(e,t,r){const{disallowEmptySelection:n,isDisabled:a}=e,i=q_({usage:"search",sensitivity:"base"}),s=H.useMemo(()=>new j_(t.collection,t.disabledKeys,null,i),[t.collection,t.disabledKeys,i]),{menuTriggerProps:o,menuProps:l}=m0({isDisabled:a,type:"listbox"},t,r),u=$=>{if(t.selectionMode==="single")switch($.key){case"ArrowLeft":{$.preventDefault();const S=t.selectedKeys.size>0?s.getKeyAbove(t.selectedKeys.values().next().value):s.getFirstKey();S&&t.setSelectedKeys([S]);break}case"ArrowRight":{$.preventDefault();const S=t.selectedKeys.size>0?s.getKeyBelow(t.selectedKeys.values().next().value):s.getFirstKey();S&&t.setSelectedKeys([S]);break}}},{typeSelectProps:c}=N_({keyboardDelegate:s,selectionManager:t.selectionManager,onTypeSelect($){t.setSelectedKeys([$])}}),{isInvalid:h,validationErrors:g,validationDetails:v}=t.displayValidation,{labelProps:b,fieldProps:y,descriptionProps:p,errorMessageProps:f}=D_({...e,labelElementType:"span",isInvalid:h,errorMessage:e.errorMessage||g});c.onKeyDown=c.onKeyDownCapture,delete c.onKeyDownCapture,o.onPressStart=$=>{$.pointerType!=="touch"&&$.pointerType!=="keyboard"&&!a&&t.toggle($.pointerType==="virtual"?"first":null)};const d=Ou(e,{labelable:!0}),m=Ir(c,o,y),_=Eu();return{labelProps:{...b,onClick:()=>{var $;e.isDisabled||(($=r.current)==null||$.focus(),F_("keyboard"))}},triggerProps:Ir(d,{...m,onKeyDown:jy(m.onKeyDown,u,e.onKeyDown),onKeyUp:e.onKeyUp,"aria-labelledby":[_,m["aria-labelledby"],m["aria-label"]&&!m["aria-labelledby"]?m.id:null].join(","),onFocus($){t.isFocused||(e.onFocus&&e.onFocus($),t.setFocused(!0))},onBlur($){t.isOpen||(e.onBlur&&e.onBlur($),t.setFocused(!1))}}),valueProps:{id:_},menuProps:{...l,disallowEmptySelection:n,autoFocus:t.focusStrategy||!0,shouldSelectOnPressUp:!0,shouldFocusOnHover:!0,onBlur:$=>{$.currentTarget.contains($.relatedTarget)||(e.onBlur&&e.onBlur($),t.setFocused(!1))},onFocus:l?.onFocus,"aria-labelledby":[y["aria-labelledby"],m["aria-label"]&&!y["aria-labelledby"]?m.id:null].filter(Boolean).join(" ")},descriptionProps:p,errorMessageProps:f,isInvalid:h,validationErrors:g,validationDetails:v}}var Ly=new WeakMap;function C0(e){var t,r,n,a,i,s;const o=Au(),{validationBehavior:l}=M_(K_)||{},[u,c]=Cu(e,id.variantKeys),h=(r=(t=e.disableAnimation)!=null?t:o?.disableAnimation)!=null?r:!1,{ref:g,as:v,label:b,name:y,isLoading:p,selectorIcon:f,isOpen:d,defaultOpen:m,onOpenChange:_,startContent:$,endContent:S,description:w,renderValue:O,onSelectionChange:E,placeholder:R,isVirtualized:q,itemHeight:M=36,maxListboxHeight:I=256,children:L,disallowEmptySelection:k=!1,selectionMode:J="single",spinnerRef:X,scrollRef:Y,popoverProps:ne={},scrollShadowProps:K={},listboxProps:j={},spinnerProps:V={},validationState:N,onChange:P,onClose:T,className:D,classNames:U,validationBehavior:Q=(n=l??o?.validationBehavior)!=null?n:"native",hideEmptyContent:B=!1,onClear:G,...C}=u,x=Gn(Y),F={popoverProps:qe({placement:"bottom",triggerScaleOnOpen:!1,offset:5,disableAnimation:h},ne),scrollShadowProps:qe({ref:x,isEnabled:(a=e.showScrollIndicators)!=null?a:!0,hideScrollBar:!0,offset:15},K),listboxProps:qe({disableAnimation:h},j)},z=v||"button",W=typeof z=="string",Z=Gn(g),ee=H.useRef(null),ce=H.useRef(null),se=H.useRef(null);let re=E0({...u,isOpen:d,selectionMode:J,disallowEmptySelection:k,validationBehavior:Q,children:L,isRequired:e.isRequired,isDisabled:e.isDisabled,isInvalid:e.isInvalid,defaultOpen:m,hideEmptyContent:B,onOpenChange:te=>{_?.(te),te||T?.()},onSelectionChange:te=>{E?.(te),P&&typeof P=="function"&&P({target:{...Z.current&&{...Z.current,name:Z.current.name},value:Array.from(te).join(",")}}),re.commitValidation()}});re={...re,...e.isDisabled&&{disabledKeys:new Set([...re.collection.getKeys()])}},k_(()=>{var te;(te=Z.current)!=null&&te.value&&re.setSelectedKeys(new Set([...re.selectedKeys,Z.current.value]))},[Z.current]);const{labelProps:de,triggerProps:ie,valueProps:ue,menuProps:Ae,descriptionProps:Te,errorMessageProps:Ve,isInvalid:Xe,validationErrors:je,validationDetails:Ct}=A0({...u,disallowEmptySelection:k,isDisabled:e.isDisabled},re,ee),Gt=H.useCallback(()=>{var te;re.setSelectedKeys(new Set([])),G?.(),(te=ee.current)==null||te.focus()},[G,re]),{pressProps:en}=Ny({isDisabled:!!e?.isDisabled,onPress:Gt}),ot=e.isInvalid||N==="invalid"||Xe,{isPressed:We,buttonProps:Ze}=L_(ie,ee),{focusProps:Fc,isFocused:Mc,isFocusVisible:kc}=du(),{focusProps:Lc,isFocusVisible:Uc}=du(),{isHovered:Vc,hoverProps:Kc}=Iu({isDisabled:e.isDisabled}),It=U_({labelPlacement:e.labelPlacement,label:b}),ja=!!R,Bc=It==="outside-left"||It==="outside",n_=It==="inside",zc=It==="outside-left",Wc=e.isClearable,Hc=re.isOpen||ja||!!((i=re.selectedItems)!=null&&i.length)||!!$||!!S||!!e.isMultiline,Gc=!!((s=re.selectedItems)!=null&&s.length),Na=!!b,Yc=Na&&(zc||Bc&&ja),Jc=Ee(U?.base,D),fe=H.useMemo(()=>id({...c,isInvalid:ot,isClearable:Wc,labelPlacement:It,disableAnimation:h}),[Tu(c),ot,It,h]);V_({isDisabled:!re.isOpen});const Xc=typeof u.errorMessage=="function"?u.errorMessage({isInvalid:ot,validationErrors:je,validationDetails:Ct}):u.errorMessage||je?.join(" "),Da=!!w||!!Xc,a_=!!S;H.useEffect(()=>{if(re.isOpen&&se.current&&ee.current){let te=ee.current.getBoundingClientRect(),Tt=se.current;Tt.style.width=te.width+"px"}},[re.isOpen]);const i_=H.useCallback((te={})=>({"data-slot":"base","data-filled":be(Hc),"data-has-value":be(Gc),"data-has-label":be(Na),"data-has-helper":be(Da),"data-has-end-content":be(a_),"data-invalid":be(ot),"data-has-label-outside":be(Yc),className:fe.base({class:Ee(Jc,te.className)}),...te}),[fe,Da,Gc,Na,Yc,Hc,Jc]),s_=H.useCallback((te={})=>({ref:ee,"data-slot":"trigger","data-open":be(re.isOpen),"data-disabled":be(e?.isDisabled),"data-focus":be(Mc),"data-pressed":be(We),"data-focus-visible":be(kc),"data-hover":be(Vc),className:fe.trigger({class:U?.trigger}),...qe(Ze,Fc,Kc,Tr(C,{enabled:W}),Tr(te))}),[fe,ee,re.isOpen,U?.trigger,e?.isDisabled,Mc,We,kc,Vc,Ze,Fc,Kc,C,W]),o_=H.useCallback((te={})=>({state:re,triggerRef:ee,selectRef:Z,selectionMode:J,label:e?.label,name:e?.name,isRequired:e?.isRequired,autoComplete:e?.autoComplete,isDisabled:e?.isDisabled,form:e?.form,onChange:P,...te}),[re,J,e?.label,e?.autoComplete,e?.name,e?.isDisabled,ee]),l_=H.useCallback((te={})=>({"data-slot":"label",className:fe.label({class:Ee(U?.label,te.className)}),...de,...te}),[fe,U?.label,de]),u_=H.useCallback((te={})=>({"data-slot":"value",className:fe.value({class:Ee(U?.value,te.className)}),...ue,...te}),[fe,U?.value,ue]),c_=H.useCallback((te={})=>({"data-slot":"listboxWrapper",className:fe.listboxWrapper({class:Ee(U?.listboxWrapper,te?.className)}),style:{maxHeight:I??256,...te.style},...qe(F.scrollShadowProps,te)}),[fe.listboxWrapper,U?.listboxWrapper,F.scrollShadowProps,I]),d_=(te={})=>{const Tt=q??re.collection.size>50;return{state:re,ref:ce,isVirtualized:Tt,virtualization:Tt?{maxListboxHeight:I,itemHeight:M}:void 0,"data-slot":"listbox",className:fe.listbox({class:Ee(U?.listbox,te?.className)}),scrollShadowProps:F.scrollShadowProps,...qe(F.listboxProps,te,Ae)}},f_=H.useCallback((te={})=>{var Tt,Zc;const w_=qe(F.popoverProps,te);return{state:re,triggerRef:ee,ref:se,"data-slot":"popover",scrollRef:ce,triggerType:"listbox",classNames:{content:fe.popoverContent({class:Ee(U?.popoverContent,te.className)})},...w_,offset:re.selectedItems&&re.selectedItems.length>0?re.selectedItems.length*1e-8+(((Tt=F.popoverProps)==null?void 0:Tt.offset)||0):(Zc=F.popoverProps)==null?void 0:Zc.offset}},[fe,U?.popoverContent,F.popoverProps,ee,re,re.selectedItems]),p_=H.useCallback(()=>({"data-slot":"selectorIcon","aria-hidden":be(!0),"data-open":be(re.isOpen),className:fe.selectorIcon({class:U?.selectorIcon})}),[fe,U?.selectorIcon,re.isOpen]),h_=H.useCallback((te={})=>({...te,"data-slot":"innerWrapper",className:fe.innerWrapper({class:Ee(U?.innerWrapper,te?.className)})}),[fe,U?.innerWrapper]),m_=H.useCallback((te={})=>({...te,"data-slot":"helperWrapper",className:fe.helperWrapper({class:Ee(U?.helperWrapper,te?.className)})}),[fe,U?.helperWrapper]),g_=H.useCallback((te={})=>({...te,...Te,"data-slot":"description",className:fe.description({class:Ee(U?.description,te?.className)})}),[fe,U?.description]),y_=H.useCallback((te={})=>({...te,"data-slot":"mainWrapper",className:fe.mainWrapper({class:Ee(U?.mainWrapper,te?.className)})}),[fe,U?.mainWrapper]),v_=H.useCallback((te={})=>({...te,"data-slot":"end-wrapper",className:fe.endWrapper({class:Ee(U?.endWrapper,te?.className)})}),[fe,U?.endWrapper]),b_=H.useCallback((te={})=>({...te,"data-slot":"end-content",className:fe.endContent({class:Ee(U?.endContent,te?.className)})}),[fe,U?.endContent]),__=H.useCallback((te={})=>({...te,...Ve,"data-slot":"error-message",className:fe.errorMessage({class:Ee(U?.errorMessage,te?.className)})}),[fe,Ve,U?.errorMessage]),$_=H.useCallback((te={})=>({"aria-hidden":be(!0),"data-slot":"spinner",color:"current",size:"sm",...V,...te,ref:X,className:fe.spinner({class:Ee(U?.spinner,te?.className)})}),[fe,X,V,U?.spinner]),S_=H.useCallback((te={})=>({...te,type:"button",tabIndex:-1,"aria-label":"clear selection","data-slot":"clear-button","data-focus-visible":be(Uc),className:fe.clearButton({class:Ee(U?.clearButton,te?.className)}),...qe(en,Lc)}),[fe,Uc,en,Lc,U?.clearButton]);return Ly.set(re,{isDisabled:e?.isDisabled,isRequired:e?.isRequired,name:e?.name,isInvalid:ot,validationBehavior:Q}),{Component:z,domRef:Z,state:re,label:b,name:y,triggerRef:ee,isLoading:p,placeholder:R,startContent:$,endContent:S,description:w,selectorIcon:f,hasHelper:Da,labelPlacement:It,hasPlaceholder:ja,renderValue:O,selectionMode:J,disableAnimation:h,isOutsideLeft:zc,shouldLabelBeOutside:Bc,shouldLabelBeInside:n_,isInvalid:ot,errorMessage:Xc,isClearable:Wc,getClearButtonProps:S_,getBaseProps:i_,getTriggerProps:s_,getLabelProps:l_,getValueProps:u_,getListboxProps:d_,getPopoverProps:f_,getSpinnerProps:$_,getMainWrapperProps:y_,getListboxWrapperProps:c_,getHiddenSelectProps:o_,getInnerWrapperProps:h_,getHelperWrapperProps:m_,getDescriptionProps:g_,getErrorMessageProps:__,getSelectorIconProps:p_,getEndWrapperProps:v_,getEndContentProps:b_}}var I0=typeof document<"u"?B_.useLayoutEffect:()=>{};function T0(e){const t=H.useRef(null);return I0(()=>{t.current=e},[e]),H.useCallback((...r)=>{const n=t.current;return n?.(...r)},[])}function R0(e,t,r){let n=H.useRef(t),a=T0(()=>{r&&r(n.current)});H.useEffect(()=>{var i;let s=(i=e?.current)==null?void 0:i.form;return s?.addEventListener("reset",a),()=>{s?.removeEventListener("reset",a)}},[e,a])}function x0(e,t,r){var n;let a=Ly.get(t)||{},{autoComplete:i,name:s=a.name,isDisabled:o=a.isDisabled,selectionMode:l,onChange:u,form:c}=e,{validationBehavior:h,isRequired:g,isInvalid:v}=a,{visuallyHiddenProps:b}=z_();return R0(e.selectRef,t.selectedKeys,t.setSelectedKeys),W_({validationBehavior:h,focus:()=>{var y;return(y=r.current)==null?void 0:y.focus()}},t,e.selectRef),{containerProps:{...b,"aria-hidden":!0,"data-a11y-ignore":"aria-hidden-focus"},inputProps:{style:{display:"none"}},selectProps:{form:c,autoComplete:i,disabled:o,"aria-invalid":v||void 0,"aria-required":g&&h==="aria"||void 0,required:g&&h==="native",name:s,tabIndex:-1,value:l==="multiple"?[...t.selectedKeys].map(y=>String(y)):(n=[...t.selectedKeys][0])!=null?n:"",multiple:l==="multiple",onChange:y=>{t.setSelectedKeys(y.target.value),u?.(y)}}}}function q0(e){var t;let{state:r,triggerRef:n,selectRef:a,label:i,name:s,isDisabled:o,form:l}=e,{containerProps:u,selectProps:c}=x0({...e,selectRef:a},r,n);return r.collection.size<=300?A.jsx("div",{...u,"data-testid":"hidden-select-container",children:A.jsxs("label",{children:[i,A.jsxs("select",{...c,ref:a,children:[A.jsx("option",{}),[...r.collection.getKeys()].map(h=>{let g=r.collection.getItem(h);if(g?.type==="item")return A.jsx("option",{value:g.key,children:g.textValue},g.key)})]})]})}):s?A.jsx("input",{autoComplete:c.autoComplete,disabled:o,form:l,name:s,type:"hidden",value:(t=[...r.selectedKeys].join(","))!=null?t:""}):null}var j0=H_,N0=j0;const Ru=new WeakMap;function D0(e){return typeof e=="string"?e.replace(/\s*/g,""):""+e}function F0(e,t){let r=Ru.get(e);if(!r)throw new Error("Unknown list");return`${r.id}-option-${D0(t)}`}function M0(e,t,r){let n=Ou(e,{labelable:!0}),a=e.selectionBehavior||"toggle",i=e.linkBehavior||(a==="replace"?"action":"override");a==="toggle"&&i==="action"&&(i="override");let{listProps:s}=G_({...e,ref:r,selectionManager:t.selectionManager,collection:t.collection,disabledKeys:t.disabledKeys,linkBehavior:i}),{focusWithinProps:o}=Y_({onFocusWithin:e.onFocus,onBlurWithin:e.onBlur,onFocusWithinChange:e.onFocusChange}),l=Eu(e.id);Ru.set(t,{id:l,shouldUseVirtualFocus:e.shouldUseVirtualFocus,shouldSelectOnPressUp:e.shouldSelectOnPressUp,shouldFocusOnHover:e.shouldFocusOnHover,isVirtualized:e.isVirtualized,onAction:e.onAction,linkBehavior:i});let{labelProps:u,fieldProps:c}=J_({...e,id:l,labelElementType:"span"});return{labelProps:u,listBoxProps:Ir(n,o,t.selectionManager.selectionMode==="multiple"?{"aria-multiselectable":"true"}:{},{role:"listbox",...Ir(c,s)})}}function k0(e,t,r){var n,a;let{key:i}=e,s=Ru.get(t);var o;let l=(o=e.isDisabled)!==null&&o!==void 0?o:t.selectionManager.isDisabled(i);var u;let c=(u=e.isSelected)!==null&&u!==void 0?u:t.selectionManager.isSelected(i);var h;let g=(h=e.shouldSelectOnPressUp)!==null&&h!==void 0?h:s?.shouldSelectOnPressUp;var v;let b=(v=e.shouldFocusOnHover)!==null&&v!==void 0?v:s?.shouldFocusOnHover;var y;let p=(y=e.shouldUseVirtualFocus)!==null&&y!==void 0?y:s?.shouldUseVirtualFocus;var f;let d=(f=e.isVirtualized)!==null&&f!==void 0?f:s?.isVirtualized,m=td(),_=td(),$={role:"option","aria-disabled":l||void 0,"aria-selected":t.selectionManager.selectionMode!=="none"?c:void 0};X_()&&Z_()||($["aria-label"]=e["aria-label"],$["aria-labelledby"]=m,$["aria-describedby"]=_);let S=t.collection.getItem(i);if(d){let X=Number(S?.index);$["aria-posinset"]=Number.isNaN(X)?void 0:X+1,$["aria-setsize"]=g0(t.collection)}let w=s?.onAction?()=>{var X;return s==null||(X=s.onAction)===null||X===void 0?void 0:X.call(s,i)}:void 0,O=F0(t,i),{itemProps:E,isPressed:R,isFocused:q,hasAction:M,allowsSelection:I}=_0({selectionManager:t.selectionManager,key:i,ref:r,shouldSelectOnPressUp:g,allowsDifferentPressOrigin:g&&b,isVirtualized:d,shouldUseVirtualFocus:p,isDisabled:l,onAction:w||!(S==null||(n=S.props)===null||n===void 0)&&n.onAction?jy(S==null||(a=S.props)===null||a===void 0?void 0:a.onAction,w):void 0,linkBehavior:s?.linkBehavior,id:O}),{hoverProps:L}=Iu({isDisabled:l||!b,onHoverStart(){rd()||(t.selectionManager.setFocused(!0),t.selectionManager.setFocusedKey(i))}}),k=Ou(S?.props);delete k.id;let J=Q_(S?.props);return{optionProps:{...$,...Ir(k,E,L,J),id:O},labelProps:{id:m},descriptionProps:{id:_},isFocused:q,isFocusVisible:q&&t.selectionManager.isFocused&&rd(),isSelected:c,isDisabled:l,isPressed:R,allowsSelection:I,hasAction:M}}function L0(e){let{heading:t,"aria-label":r}=e,n=Eu();return{itemProps:{role:"presentation"},headingProps:t?{id:n,role:"presentation"}:{},groupProps:{role:"group","aria-label":r,"aria-labelledby":t?n:void 0}}}function U0(e){var t;const r=Au(),{ref:n,as:a,state:i,variant:s,color:o,onAction:l,children:u,onSelectionChange:c,disableAnimation:h=(t=r?.disableAnimation)!=null?t:!1,itemClasses:g,className:v,topContent:b,bottomContent:y,emptyContent:p="No items.",hideSelectedIcon:f=!1,hideEmptyContent:d=!1,shouldHighlightOnFocus:m=!1,classNames:_,...$}=e,S=a||"ul",w=typeof S=="string",O=Gn(n),E=ky({...e,children:u,onSelectionChange:c}),R=i||E,{listBoxProps:q}=M0({...e,onAction:l},R,O),M=H.useMemo(()=>y0(),[]),I=Ee(_?.base,v);return{Component:S,state:R,variant:s,color:o,slots:M,classNames:_,topContent:b,bottomContent:y,emptyContent:p,hideEmptyContent:d,shouldHighlightOnFocus:m,hideSelectedIcon:f,disableAnimation:h,className:v,itemClasses:g,getBaseProps:(X={})=>({ref:O,"data-slot":"base",className:M.base({class:I}),...Tr($,{enabled:w}),...X}),getListProps:(X={})=>({"data-slot":"list",className:M.list({class:_?.list}),...q,...X}),getEmptyContentProps:(X={})=>({"data-slot":"empty-content",children:p,className:M.emptyContent({class:_?.emptyContent}),...X})}}function V0(e){const{isSelected:t,disableAnimation:r,...n}=e;return A.jsx("svg",{"aria-hidden":"true","data-selected":t,role:"presentation",viewBox:"0 0 17 18",...n,children:A.jsx("polyline",{fill:"none",points:"1 9 7 14 15 4",stroke:"currentColor",strokeDasharray:22,strokeDashoffset:t?44:66,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,style:r?{}:{transition:"stroke-dashoffset 200ms ease"}})})}function K0(e){var t,r;const n=Au(),[a,i]=Cu(e,ad.variantKeys),{as:s,item:o,state:l,description:u,startContent:c,endContent:h,isVirtualized:g,selectedIcon:v,className:b,classNames:y,autoFocus:p,onPress:f,onPressUp:d,onPressStart:m,onPressEnd:_,onPressChange:$,onClick:S,shouldHighlightOnFocus:w,hideSelectedIcon:O=!1,isReadOnly:E=!1,...R}=a,q=(r=(t=e.disableAnimation)!=null?t:n?.disableAnimation)!=null?r:!1,M=H.useRef(null),I=s||(e.href?"a":"li"),L=typeof I=="string",{rendered:k,key:J}=o,X=l.disabledKeys.has(J)||e.isDisabled,Y=l.selectionManager.selectionMode!=="none",ne=v0(),{pressProps:K,isPressed:j}=Ny({ref:M,isDisabled:X,onClick:S,onPress:f,onPressUp:d,onPressStart:m,onPressEnd:_,onPressChange:$}),{isHovered:V,hoverProps:N}=Iu({isDisabled:X}),{isFocusVisible:P,focusProps:T}=du({autoFocus:p}),{isFocused:D,isSelected:U,optionProps:Q,labelProps:B,descriptionProps:G}=k0({key:J,isDisabled:X,"aria-label":a["aria-label"],isVirtualized:g},l,M);let C=Q;const x=H.useMemo(()=>ad({...i,isDisabled:X,disableAnimation:q,hasTitleTextChild:typeof k=="string",hasDescriptionTextChild:typeof u=="string"}),[Tu(i),X,q,k,u]),F=Ee(y?.base,b);E&&(C=e0(C));const z=w&&D||(ne?V||j:V||D&&!P),W=(re={})=>({ref:M,...qe(C,E?{}:qe(T,K),N,Tr(R,{enabled:L}),re),"data-selectable":be(Y),"data-focus":be(D),"data-hover":be(z),"data-disabled":be(X),"data-selected":be(U),"data-pressed":be(j),"data-focus-visible":be(P),className:x.base({class:Ee(F,re.className)})}),Z=(re={})=>({...qe(B,re),"data-label":be(!0),className:x.title({class:y?.title})}),ee=(re={})=>({...qe(G,re),className:x.description({class:y?.description})}),ce=(re={})=>({...qe(re),className:x.wrapper({class:y?.wrapper})}),se=H.useCallback((re={})=>({"aria-hidden":be(!0),"data-disabled":be(X),className:x.selectedIcon({class:y?.selectedIcon}),...re}),[X,x,y]);return{Component:I,domRef:M,slots:x,classNames:y,isSelectable:Y,isSelected:U,isDisabled:X,rendered:k,description:u,startContent:c,endContent:h,selectedIcon:v,hideSelectedIcon:O,disableAnimation:q,getItemProps:W,getLabelProps:Z,getWrapperProps:ce,getDescriptionProps:ee,getSelectedIconProps:se}}var Uy=e=>{const{Component:t,rendered:r,description:n,isSelectable:a,isSelected:i,isDisabled:s,selectedIcon:o,startContent:l,endContent:u,hideSelectedIcon:c,disableAnimation:h,getItemProps:g,getLabelProps:v,getWrapperProps:b,getDescriptionProps:y,getSelectedIconProps:p}=K0(e),f=H.useMemo(()=>{const d=A.jsx(V0,{disableAnimation:h,isSelected:i});return typeof o=="function"?o({icon:d,isSelected:i,isDisabled:s}):o||d},[o,i,s,h]);return A.jsxs(t,{...g(),children:[l,n?A.jsxs("div",{...b(),children:[A.jsx("span",{...v(),children:r}),A.jsx("span",{...y(),children:n})]}):A.jsx("span",{...v(),children:r}),a&&!c&&A.jsx("span",{...p(),children:f}),u]})};Uy.displayName="HeroUI.ListboxItem";var xu=Uy,Vy=kr(({item:e,state:t,as:r,variant:n,color:a,disableAnimation:i,className:s,classNames:o,hideSelectedIcon:l,showDivider:u=!1,dividerProps:c={},itemClasses:h,title:g,items:v,...b},y)=>{const p=r||"li",f=H.useMemo(()=>b0(),[]),d=Ee(o?.base,s),m=Ee(o?.divider,c?.className),{itemProps:_,headingProps:$,groupProps:S}=L0({heading:e.rendered,"aria-label":e["aria-label"]});return A.jsxs(p,{"data-slot":"base",...qe(_,b),className:f.base({class:d}),children:[e.rendered&&A.jsx("span",{...$,className:f.heading({class:o?.heading}),"data-slot":"heading",children:e.rendered}),A.jsxs("ul",{...S,className:f.group({class:o?.group}),"data-has-title":!!e.rendered,"data-slot":"group",children:[[...e.childNodes].map(w=>{const{key:O,props:E}=w;let R=A.jsx(xu,{classNames:h,color:a,disableAnimation:i,hideSelectedIcon:l,item:w,state:t,variant:n,...E},O);return w.wrapper&&(R=w.wrapper(R)),R}),u&&A.jsx(t0,{as:"li",className:f.divider({class:m}),...c})]})]},e.key)});Vy.displayName="HeroUI.ListboxSection";var Ky=Vy;function B0(e={}){const{domRef:t,isEnabled:r=!0,overflowCheck:n="vertical",visibility:a="auto",offset:i=0,onVisibilityChange:s,updateDeps:o=[]}=e,l=H.useRef(a);H.useEffect(()=>{const u=t?.current;if(!u||!r)return;const c=(v,b,y,p,f)=>{if(a==="auto"){const d=`${p}${n0(f)}Scroll`;b&&y?(u.dataset[d]="true",u.removeAttribute(`data-${p}-scroll`),u.removeAttribute(`data-${f}-scroll`)):(u.dataset[`${p}Scroll`]=b.toString(),u.dataset[`${f}Scroll`]=y.toString(),u.removeAttribute(`data-${p}-${f}-scroll`))}else{const d=b&&y?"both":b?p:y?f:"none";d!==l.current&&(s?.(d),l.current=d)}},h=()=>{var v,b;const y=[{type:"vertical",prefix:"top",suffix:"bottom"},{type:"horizontal",prefix:"left",suffix:"right"}],p=u.querySelector('ul[data-slot="list"]'),f=+((v=p?.getAttribute("data-virtual-scroll-height"))!=null?v:u.scrollHeight),d=+((b=p?.getAttribute("data-virtual-scroll-top"))!=null?b:u.scrollTop);for(const{type:m,prefix:_,suffix:$}of y)if(n===m||n==="both"){const S=m==="vertical"?d>i:u.scrollLeft>i,w=m==="vertical"?d+u.clientHeight+i{["top","bottom","top-bottom","left","right","left-right"].forEach(v=>{u.removeAttribute(`data-${v}-scroll`)})};return h(),u.addEventListener("scroll",h,!0),a!=="auto"&&(g(),a==="both"?(u.dataset.topBottomScroll=String(n==="vertical"),u.dataset.leftRightScroll=String(n==="horizontal")):(u.dataset.topBottomScroll="false",u.dataset.leftRightScroll="false",["top","bottom","left","right"].forEach(v=>{u.dataset[`${v}Scroll`]=String(a===v)}))),()=>{u.removeEventListener("scroll",h,!0),g()}},[...o,r,a,n,s,t])}function z0(e){var t;const[r,n]=Cu(e,nd.variantKeys),{ref:a,as:i,children:s,className:o,style:l,size:u=40,offset:c=0,visibility:h="auto",isEnabled:g=!0,onVisibilityChange:v,...b}=r,y=i||"div",p=Gn(a);B0({domRef:p,offset:c,visibility:h,isEnabled:g,onVisibilityChange:v,updateDeps:[s],overflowCheck:(t=e.orientation)!=null?t:"vertical"});const f=H.useMemo(()=>nd({...n,className:o}),[Tu(n),o]);return{Component:y,styles:f,domRef:p,children:s,getBaseProps:(m={})=>{var _;return{ref:p,className:f,"data-orientation":(_=e.orientation)!=null?_:"vertical",style:{"--scroll-shadow-size":`${u}px`,...l,...m.style},...b,...m}}}}var W0=(e,t)=>{const r=[];for(const n of e)n.type==="section"?r.push(([...n.childNodes].length+1)*t):r.push(t);return r},H0=e=>{if(!e||e.scrollTop===void 0||e.clientHeight===void 0||e.scrollHeight===void 0)return{isTop:!1,isBottom:!1,isMiddle:!1};const t=e.scrollTop===0,r=Math.ceil(e.scrollTop+e.clientHeight)>=e.scrollHeight;return{isTop:t,isBottom:r,isMiddle:!t&&!r}},G0=e=>{var t;const{Component:r,state:n,color:a,variant:i,itemClasses:s,getBaseProps:o,topContent:l,bottomContent:u,hideEmptyContent:c,hideSelectedIcon:h,shouldHighlightOnFocus:g,disableAnimation:v,getEmptyContentProps:b,getListProps:y,scrollShadowProps:p}=e,{virtualization:f}=e;if(!f||!r0(f)&&!f.maxListboxHeight&&!f.itemHeight)throw new Error("You are using a virtualized listbox. VirtualizedListbox requires 'virtualization' props with 'maxListboxHeight' and 'itemHeight' properties. This error might have originated from autocomplete components that use VirtualizedListbox. Please provide these props to use the virtualized listbox.");const{maxListboxHeight:d,itemHeight:m}=f,_=Math.min(d,m*n.collection.size),$=H.useRef(null),S=H.useMemo(()=>W0([...n.collection],m),[n.collection,m]),w=$0({count:[...n.collection].length,getScrollElement:()=>$.current,estimateSize:k=>S[k]}),O=w.getVirtualItems(),E=w.getTotalSize(),{getBaseProps:R}=z0({...p}),q=k=>{var J;const X=[...n.collection][k.index];if(!X)return null;const Y={color:a,item:X,state:n,variant:i,disableAnimation:v,hideSelectedIcon:h,...X.props},ne={position:"absolute",top:0,left:0,width:"100%",height:`${k.size}px`,transform:`translateY(${k.start}px)`};if(X.type==="section")return A.jsx(Ky,{...Y,itemClasses:s,style:{...ne,...Y.style}},X.key);let K=A.jsx(xu,{...Y,classNames:qe(s,(J=X.props)==null?void 0:J.classNames),shouldHighlightOnFocus:g,style:{...ne,...Y.style}},X.key);return X.wrapper&&(K=X.wrapper(K)),K},[M,I]=H.useState({isTop:!1,isBottom:!0,isMiddle:!1}),L=A.jsxs(r,{...y(),"data-virtual-scroll-height":E,"data-virtual-scroll-top":(t=$?.current)==null?void 0:t.scrollTop,children:[!n.collection.size&&!c&&A.jsx("li",{children:A.jsx("div",{...b()})}),A.jsx("div",{...Tr(R()),ref:$,style:{height:d,overflow:"auto"},onScroll:k=>{I(H0(k.target))},children:_>0&&m>0&&A.jsx("div",{style:{height:`${E}px`,width:"100%",position:"relative"},children:O.map(k=>q(k))})})]});return A.jsxs("div",{...o(),children:[l,L,u]})},Y0=G0,J0=kr(function(t,r){const{isVirtualized:n,...a}=t,i=U0({...a,ref:r}),{Component:s,state:o,color:l,variant:u,itemClasses:c,getBaseProps:h,topContent:g,bottomContent:v,hideEmptyContent:b,hideSelectedIcon:y,shouldHighlightOnFocus:p,disableAnimation:f,getEmptyContentProps:d,getListProps:m}=i;if(n)return A.jsx(Y0,{...t,...i});const _=A.jsxs(s,{...m(),children:[!o.collection.size&&!b&&A.jsx("li",{children:A.jsx("div",{...d()})}),[...o.collection].map($=>{var S;const w={color:l,item:$,state:o,variant:u,disableAnimation:f,hideSelectedIcon:y,...$.props};if($.type==="section")return A.jsx(Ky,{...w,itemClasses:c},$.key);let O=A.jsx(xu,{...w,classNames:qe(c,(S=$.props)==null?void 0:S.classNames),shouldHighlightOnFocus:p},$.key);return $.wrapper&&(O=$.wrapper(O)),O})]});return A.jsxs("div",{...h(),children:[g,_,v]})}),X0=J0,Z0=kr(function(t,r){var n;const{Component:a,state:i,label:s,hasHelper:o,isLoading:l,triggerRef:u,selectorIcon:c=A.jsx(S0,{}),description:h,errorMessage:g,isInvalid:v,startContent:b,endContent:y,placeholder:p,renderValue:f,shouldLabelBeOutside:d,disableAnimation:m,getBaseProps:_,getLabelProps:$,getTriggerProps:S,getValueProps:w,getListboxProps:O,getPopoverProps:E,getSpinnerProps:R,getMainWrapperProps:q,getInnerWrapperProps:M,getHiddenSelectProps:I,getHelperWrapperProps:L,getListboxWrapperProps:k,getDescriptionProps:J,getErrorMessageProps:X,getSelectorIconProps:Y,isClearable:ne,getClearButtonProps:K,getEndWrapperProps:j,getEndContentProps:V}=C0({...t,ref:r}),N=s?A.jsx("label",{...$(),children:s}):null,P=H.cloneElement(c,Y()),T=H.useMemo(()=>{var C;return ne&&((C=i.selectedItems)!=null&&C.length)?A.jsx("span",{...K(),children:A.jsx(a0,{})}):null},[ne,K,(n=i.selectedItems)==null?void 0:n.length]),D=H.useMemo(()=>T?A.jsxs("div",{...j(),children:[T,y&&A.jsx("span",{...V(),children:y})]}):y&&A.jsx("span",{...V(),children:y}),[T,y,j,V]),U=H.useMemo(()=>{const C=v&&g;return!o||!(C||h)?null:A.jsx("div",{...L(),children:C?A.jsx("div",{...X(),children:g}):A.jsx("div",{...J(),children:h})})},[o,v,g,h,L,X,J]),Q=H.useMemo(()=>{var C;if(!((C=i.selectedItems)!=null&&C.length))return p;if(f&&typeof f=="function"){const x=[...i.selectedItems].map(F=>({key:F.key,data:F.value,type:F.type,props:F.props,textValue:F.textValue,rendered:F.rendered,"aria-label":F["aria-label"]}));return f(x)}return i.selectedItems.map(x=>x.textValue).join(", ")},[i.selectedItems,f,p]),B=H.useMemo(()=>l?A.jsx(i0,{...R()}):P,[l,P,R]),G=H.useMemo(()=>i.isOpen?A.jsx(w0,{...E(),children:A.jsx(s0,{...k(),children:A.jsx(X0,{...O()})})}):null,[i.isOpen,E,i,u,k,O]);return A.jsxs("div",{..._(),children:[A.jsx(q0,{...I()}),d?N:null,A.jsxs("div",{...q(),children:[A.jsxs(a,{...S(),children:[d?null:N,A.jsxs("div",{...M(),children:[b,A.jsx("span",{...w(),children:Q}),y&&i.selectedItems&&A.jsx(o0,{elementType:"span",children:","}),D]}),B]}),U]}),m?G:A.jsx(l0,{children:G})]})}),Q0=Z0;function he(e){return typeof e!="object"||e===null||typeof e.lastModified=="number"&&typeof File<"u"&&e instanceof File||typeof e.getMonth=="function"&&typeof Date<"u"&&e instanceof Date?!1:!Array.isArray(e)}function e1(e){return e.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),he(e.additionalItems)}function od(e){if(e==="")return;if(e===null)return null;if(/\.$/.test(e)||/\.0$/.test(e)||/\.\d*0$/.test(e))return e;const t=Number(e);return typeof t=="number"&&!Number.isNaN(t)?t:e}const Ur="__additional_property",fu="additionalProperties",ir="allOf",Ge="anyOf",ht="const",t1="default",na="dependencies",r1="enum",Me="__errors",Pt="$id",n1="if",Ot="items",a1="_$junk_option_schema_id$_",Kn="$name",ke="oneOf",Oe="properties",i1="required",Yn="submitButtonOptions",Ce="$ref",qu="__rjsf_additionalProperties",By="__rjsf_rootSchema",s1="ui:field",ju="ui:widget",Pr="ui:options",o1="ui:globalOptions";function pe(e={},t={}){return Object.keys(e).filter(r=>r.indexOf("ui:")===0).reduce((r,n)=>{const a=e[n];return n===ju&&he(a)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),r):n===Pr&&he(a)?{...r,...a}:{...r,[n.substring(3)]:a}},{...t})}function l1(e,t={},r){if(!e.additionalProperties)return!1;const{expandable:n=!0}=pe(t);return n===!1?n:e.maxProperties!==void 0&&r?Object.keys(r).length({...r,[a]:Jn(n)}),t);if(Dt(e)){const r=e;return Object.keys(r).reduce((n,a)=>({...n,[a]:Jn(r[a])}),t)}return t}function w1(){this.__data__=[],this.size=0}function Vr(e,t){return e===t||e!==e&&t!==t}function ia(e,t){for(var r=e.length;r--;)if(Vr(e[r][0],t))return r;return-1}var P1=Array.prototype,O1=P1.splice;function E1(e){var t=this.__data__,r=ia(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():O1.call(t,r,1),--this.size,!0}function A1(e){var t=this.__data__,r=ia(t,e);return r<0?void 0:t[r][1]}function C1(e){return ia(this.__data__,e)>-1}function I1(e,t){var r=this.__data__,n=ia(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function vt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++to))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var h=-1,g=!0,v=r&_$?new Qt:void 0;for(i.set(e,t),i.set(t,e);++h-1&&e%1==0&&e-1&&e%1==0&&e<=H$}var G$="[object Arguments]",Y$="[object Array]",J$="[object Boolean]",X$="[object Date]",Z$="[object Error]",Q$="[object Function]",eS="[object Map]",tS="[object Number]",rS="[object Object]",nS="[object RegExp]",aS="[object Set]",iS="[object String]",sS="[object WeakMap]",oS="[object ArrayBuffer]",lS="[object DataView]",uS="[object Float32Array]",cS="[object Float64Array]",dS="[object Int8Array]",fS="[object Int16Array]",pS="[object Int32Array]",hS="[object Uint8Array]",mS="[object Uint8ClampedArray]",gS="[object Uint16Array]",yS="[object Uint32Array]",we={};we[uS]=we[cS]=we[dS]=we[fS]=we[pS]=we[hS]=we[mS]=we[gS]=we[yS]=!0;we[G$]=we[Y$]=we[oS]=we[J$]=we[lS]=we[X$]=we[Z$]=we[Q$]=we[eS]=we[tS]=we[rS]=we[nS]=we[aS]=we[iS]=we[sS]=!1;function vS(e){return ze(e)&&ku(e.length)&&!!we[yt(e)]}function Lu(e){return function(t){return e(t)}}var tv=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Or=tv&&typeof module=="object"&&module&&!module.nodeType&&module,bS=Or&&Or.exports===tv,ka=bS&&zy.process,tr=function(){try{var e=Or&&Or.require&&Or.require("util").types;return e||ka&&ka.binding&&ka.binding("util")}catch{}}(),md=tr&&tr.isTypedArray,Kr=md?Lu(md):vS,_S=Object.prototype,$S=_S.hasOwnProperty;function rv(e,t){var r=Ie(e),n=!r&&er(e),a=!r&&!n&&Mt(e),i=!r&&!n&&!a&&Kr(e),s=r||n||a||i,o=s?Zy(e.length,String):[],l=o.length;for(var u in e)(t||$S.call(e,u))&&!(s&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||la(u,l)))&&o.push(u);return o}var SS=Object.prototype;function ua(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||SS;return e===r}var wS=Hy(Object.keys,Object),PS=Object.prototype,OS=PS.hasOwnProperty;function nv(e){if(!ua(e))return wS(e);var t=[];for(var r in Object(e))OS.call(e,r)&&r!="constructor"&&t.push(r);return t}function sr(e){return e!=null&&ku(e.length)&&!sa(e)}function et(e){return sr(e)?rv(e):nv(e)}function pu(e){return Jy(e,et,Mu)}var ES=1,AS=Object.prototype,CS=AS.hasOwnProperty;function IS(e,t,r,n,a,i){var s=r&ES,o=pu(e),l=o.length,u=pu(t),c=u.length;if(l!=c&&!s)return!1;for(var h=l;h--;){var g=o[h];if(!(s?g in t:CS.call(t,g)))return!1}var v=i.get(e),b=i.get(t);if(v&&b)return v==t&&b==e;var y=!0;i.set(e,t),i.set(t,e);for(var p=s;++h{if(typeof r=="function"&&typeof n=="function")return!0})}var LS="[object Symbol]";function Br(e){return typeof e=="symbol"||ze(e)&&yt(e)==LS}var US=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,VS=/^\w*$/;function Uu(e,t){if(Ie(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Br(e)?!0:VS.test(e)||!US.test(e)||t!=null&&e in Object(t)}var KS="Expected a function";function Vu(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(KS);var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var s=e.apply(this,n);return r.cache=i.set(a,s)||i,s};return r.cache=new(Vu.Cache||bt),r}Vu.Cache=bt;var BS=500;function zS(e){var t=Vu(e,function(n){return r.size===BS&&r.clear(),n}),r=t.cache;return t}var WS=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,HS=/\\(\\)?/g,av=zS(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(WS,function(r,n,a,i){t.push(a?i.replace(HS,"$1"):n||r)}),t});function da(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++rb,typeof u[g]>"u"&&(Array.isArray(u)&&g==="-"&&(g=u.length),v&&(c[b]!==""&&c[b]<1/0||c[b]==="-"?u[g]=[]:u[g]={})),!v)break;u=u[g]}var p=u[g];return h===void 0?delete u[g]:u[g]=h,p}function i(u){if(typeof u=="string"){if(u=u.split("/"),u[0]==="")return u;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(u)){for(const c of u)if(typeof c!="string"&&typeof c!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return u}throw new Error("Invalid JSON pointer.")}function s(u,c){if(typeof u!="object")throw new Error("Invalid input object.");c=i(c);var h=c.length;if(h===1)return u;for(var g=1;ga?0:a+t),r=r>a?a:r,r<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(a);++n0&&r(o)?t>1?Wr(o,t-1,r,n,a):Fu(a,o):n||(a[a.length]=o)}return a}function wP(e){var t=e==null?0:e.length;return t?Wr(e,1):[]}function PP(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var Dd=Math.max;function yv(e,t,r){return t=Dd(t===void 0?e.length-1:t,0),function(){for(var n=arguments,a=-1,i=Dd(n.length-t,0),s=Array(i);++a0){if(++t>=AP)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var vv=TP(EP);function bv(e){return vv(yv(e,void 0,wP),e+"")}var RP=1,xP=2,qP=4,Qn=bv(function(e,t){var r={};if(e==null)return r;var n=!1;t=da(t,function(i){return i=or(i,e),n||(n=i.length>1),i}),lr(e,Hu(e),r),n&&(r=Er(r,RP|xP|qP,$P));for(var a=t.length;a--;)gv(r,t[a]);return r});function Yu(e,t){const r=t[e];return[Qn(t,[e]),r]}function _v(e,t={},r=[]){const n=e||"";let a;if(n.startsWith("#"))a=decodeURIComponent(n.substring(1));else throw new Error(`Could not find a definition for ${e}.`);const i=ew.get(t,a);if(i===void 0)throw new Error(`Could not find a definition for ${e}.`);const s=i[Ce];if(s){if(r.includes(s)){if(r.length===1)throw new Error(`Definition for ${e} is a circular reference`);const[c,...h]=r,g=[...h,n,c].join(" -> ");throw new Error(`Definition for ${c} contains a circular reference through ${g}`)}const[o,l]=Yu(Ce,i),u=_v(l,t,[...r,n]);return Object.keys(o).length>0?{...o,...u}:u}return i}function $v(e,t={}){return _v(e,t,[])}var jP=Object.prototype,NP=jP.hasOwnProperty;function DP(e,t){return e!=null&&NP.call(e,t)}function Sv(e,t,r){t=or(t,e);for(var n=-1,a=t.length,i=!1;++nhO)return[];var r=La,n=mO(e,La);t=Tv(t),e-=La;for(var a=Zy(n,t);++r({required:[c]}))};let u;if(o.anyOf){const{...c}=o;c.allOf?c.allOf=c.allOf.slice():c.allOf=[],c.allOf.push(l),u=c}else u=Object.assign({},o,l);if(delete u.required,e.isValid(u,t,n))return s}else if(e.isValid(o,t,n))return s}return 0}function Xu(e,t,r,n,a){return qv(e,t,r,n,a)}function Zu(e,t,r,n){if(!Se(e))return e;t=or(t,e);for(var a=-1,i=t.length,s=i-1,o=e;o!=null&&++a1?r[a-1]:void 0,s=a>2?r[2]:void 0;for(i=e.length>3&&typeof i=="function"?(a--,i):void 0,s&&bO(r[0],r[1],s)&&(i=a<3?void 0:i,a=1),t=Object(t);++n-1}function CO(){}var IO=1/0,TO=Zt&&1/Du(new Zt([,-0]))[1]==IO?function(e){return new Zt(e)}:CO,RO=200;function Dv(e,t,r){var n=-1,a=Nv,i=e.length,s=!0,o=[],l=o;if(i>=RO){var u=TO(e);if(u)return Du(u);s=!1,a=Nu,l=new Qt}else l=o;e:for(;++n-1}return Wa=t,Wa}var Ha,zd;function FO(){if(zd)return Ha;zd=1;var e=ma();function t(r,n){var a=this.__data__,i=e(a,r);return i<0?(++this.size,a.push([r,n])):a[i][1]=n,this}return Ha=t,Ha}var Ga,Wd;function ga(){if(Wd)return Ga;Wd=1;var e=qO(),t=jO(),r=NO(),n=DO(),a=FO();function i(s){var o=-1,l=s==null?0:s.length;for(this.clear();++o-1&&n%1==0&&n-1&&r%1==0&&r<=e}return Ki=t,Ki}var Bi,Bf;function cE(){if(Bf)return Bi;Bf=1;var e=Vt(),t=ic(),r=st(),n="[object Arguments]",a="[object Array]",i="[object Boolean]",s="[object Date]",o="[object Error]",l="[object Function]",u="[object Map]",c="[object Number]",h="[object Object]",g="[object RegExp]",v="[object Set]",b="[object String]",y="[object WeakMap]",p="[object ArrayBuffer]",f="[object DataView]",d="[object Float32Array]",m="[object Float64Array]",_="[object Int8Array]",$="[object Int16Array]",S="[object Int32Array]",w="[object Uint8Array]",O="[object Uint8ClampedArray]",E="[object Uint16Array]",R="[object Uint32Array]",q={};q[d]=q[m]=q[_]=q[$]=q[S]=q[w]=q[O]=q[E]=q[R]=!0,q[n]=q[a]=q[p]=q[i]=q[f]=q[s]=q[o]=q[l]=q[u]=q[c]=q[h]=q[g]=q[v]=q[b]=q[y]=!1;function M(I){return r(I)&&t(I.length)&&!!q[e(I)]}return Bi=M,Bi}var zi,zf;function Bt(){if(zf)return zi;zf=1;function e(t){return function(r){return t(r)}}return zi=e,zi}var Sr={exports:{}};Sr.exports;var Wf;function sc(){return Wf||(Wf=1,function(e,t){var r=Fv(),n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,s=i&&r.process,o=function(){try{var l=a&&a.require&&a.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();e.exports=o}(Sr,Sr.exports)),Sr.exports}var Wi,Hf;function oc(){if(Hf)return Wi;Hf=1;var e=cE(),t=Bt(),r=sc(),n=r&&r.isTypedArray,a=n?t(n):e;return Wi=a,Wi}var Hi,Gf;function Vv(){if(Gf)return Hi;Gf=1;var e=oE(),t=_a(),r=Ue(),n=$a(),a=ac(),i=oc(),s=Object.prototype,o=s.hasOwnProperty;function l(u,c){var h=r(u),g=!h&&t(u),v=!h&&!g&&n(u),b=!h&&!g&&!v&&i(u),y=h||g||v||b,p=y?e(u.length,String):[],f=p.length;for(var d in u)(c||o.call(u,d))&&!(y&&(d=="length"||v&&(d=="offset"||d=="parent")||b&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||a(d,f)))&&p.push(d);return p}return Hi=l,Hi}var Gi,Yf;function lc(){if(Yf)return Gi;Yf=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,a=typeof n=="function"&&n.prototype||e;return r===a}return Gi=t,Gi}var Yi,Jf;function Kv(){if(Jf)return Yi;Jf=1;function e(t,r){return function(n){return t(r(n))}}return Yi=e,Yi}var Ji,Xf;function dE(){if(Xf)return Ji;Xf=1;var e=Kv(),t=e(Object.keys,Object);return Ji=t,Ji}var Xi,Zf;function fE(){if(Zf)return Xi;Zf=1;var e=lc(),t=dE(),r=Object.prototype,n=r.hasOwnProperty;function a(i){if(!e(i))return t(i);var s=[];for(var o in Object(i))n.call(i,o)&&o!="constructor"&&s.push(o);return s}return Xi=a,Xi}var Zi,Qf;function dr(){if(Qf)return Zi;Qf=1;var e=ec(),t=ic();function r(n){return n!=null&&t(n.length)&&!e(n)}return Zi=r,Zi}var Qi,ep;function Gr(){if(ep)return Qi;ep=1;var e=Vv(),t=fE(),r=dr();function n(a){return r(a)?e(a):t(a)}return Qi=n,Qi}var es,tp;function pE(){if(tp)return es;tp=1;var e=Hr(),t=Gr();function r(n,a){return n&&e(a,t(a),n)}return es=r,es}var ts,rp;function hE(){if(rp)return ts;rp=1;function e(t){var r=[];if(t!=null)for(var n in Object(t))r.push(n);return r}return ts=e,ts}var rs,np;function mE(){if(np)return rs;np=1;var e=it(),t=lc(),r=hE(),n=Object.prototype,a=n.hasOwnProperty;function i(s){if(!e(s))return r(s);var o=t(s),l=[];for(var u in s)u=="constructor"&&(o||!a.call(s,u))||l.push(u);return l}return rs=i,rs}var ns,ap;function fr(){if(ap)return ns;ap=1;var e=Vv(),t=mE(),r=dr();function n(a){return r(a)?e(a,!0):t(a)}return ns=n,ns}var as,ip;function gE(){if(ip)return as;ip=1;var e=Hr(),t=fr();function r(n,a){return n&&e(a,t(a),n)}return as=r,as}var wr={exports:{}};wr.exports;var sp;function Bv(){return sp||(sp=1,function(e,t){var r=at(),n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,s=i?r.Buffer:void 0,o=s?s.allocUnsafe:void 0;function l(u,c){if(c)return u.slice();var h=u.length,g=o?o(h):new u.constructor(h);return u.copy(g),g}e.exports=l}(wr,wr.exports)),wr.exports}var is,op;function uc(){if(op)return is;op=1;function e(t,r){var n=-1,a=t.length;for(r||(r=Array(a));++n v))return!1;var y=h.get(s),p=h.get(o);if(y&&p)return y==o&&p==s;var f=-1,d=!0,m=l&a?new e:void 0;for(h.set(s,o),h.set(o,s);++f0&&i(c)?a>1?r(c,a-1,i,s,o):e(o,c):s||(o[o.length]=c)}return o}return Zs=r,Zs}var Qs,th;function zt(){if(th)return Qs;th=1;function e(t,r){for(var n=-1,a=t==null?0:t.length,i=Array(a);++nn||o&&l&&c&&!u&&!h||i&&l&&c||!a&&c||!s)return 1;if(!i&&!o&&!h&&r=u)return c;var h=a[i];return c*(h=="desc"?-1:1)}}return r.index-n.index}return jo=t,jo}var No,Dh;function hA(){if(Dh)return No;Dh=1;var e=zt(),t=vc(),r=sA(),n=cA(),a=dA(),i=Bt(),s=pA(),o=Yr(),l=Ue();function u(c,h,g){h.length?h=e(h,function(y){return l(y)?function(p){return t(p,y.length===1?y[0]:y)}:y}):h=[o];var v=-1;h=e(h,i(r));var b=n(c,function(y,p,f){var d=e(h,function(m){return m(y)});return{criteria:d,index:++v,value:y}});return a(b,function(y,p){return s(y,p,g)})}return No=u,No}var Do,Fh;function sb(){if(Fh)return Do;Fh=1;function e(t,r,n){switch(n.length){case 0:return t.call(r);case 1:return t.call(r,n[0]);case 2:return t.call(r,n[0],n[1]);case 3:return t.call(r,n[0],n[1],n[2])}return t.apply(r,n)}return Do=e,Do}var Fo,Mh;function mA(){if(Mh)return Fo;Mh=1;var e=sb(),t=Math.max;function r(n,a,i){return a=t(a===void 0?n.length-1:a,0),function(){for(var s=arguments,o=-1,l=t(s.length-a,0),u=Array(l);++o0){if(++i>=e)return arguments[0]}else i=0;return a.apply(void 0,arguments)}}return Lo=n,Lo}var Uo,Vh;function bA(){if(Vh)return Uo;Vh=1;var e=yA(),t=vA(),r=t(e);return Uo=r,Uo}var Vo,Kh;function Wt(){if(Kh)return Vo;Kh=1;var e=Yr(),t=mA(),r=bA();function n(a,i){return r(t(a,i,e),a+"")}return Vo=n,Vo}var Ko,Bh;function bc(){if(Bh)return Ko;Bh=1;var e=ur(),t=dr(),r=ac(),n=it();function a(i,s,o){if(!n(o))return!1;var l=typeof s;return(l=="number"?t(o)&&r(s,o.length):l=="string"&&s in o)?e(o[s],i):!1}return Ko=a,Ko}var Bo,zh;function ob(){if(zh)return Bo;zh=1;var e=gc(),t=hA(),r=Wt(),n=bc(),a=r(function(i,s){if(i==null)return[];var o=s.length;return o>1&&n(i,s[0],s[1])?s=[]:o>2&&n(s[0],s[1],s[2])&&(s=[s[0]]),t(i,e(s,1),[])});return Bo=a,Bo}var zo,Wh;function _A(){if(Wh)return zo;Wh=1;function e(t,r,n,a){for(var i=t.length,s=n+(a?1:-1);a?s--:++s-1}return Yo=t,Yo}var Jo,Xh;function $c(){if(Xh)return Jo;Xh=1;function e(t,r,n){for(var a=-1,i=t==null?0:t.length;++a=s){var f=u?null:a(l);if(f)return i(f);b=!1,g=n,p=new e}else p=u?[]:y;e:for(;++h2?l[2]:void 0;for(h&&r(l[0],l[1],h)&&(c=1);++u=120&&d.length>=120)?new e(b&&d):void 0}d=l[0];var m=-1,_=y[0];e:for(;++mArray.isArray(I)?I:[I],u=I=>I===void 0,c=I=>s(I)||Array.isArray(I)?Object.keys(I):[],h=(I,L)=>I.hasOwnProperty(L),g=I=>t(r(I)),v=I=>u(I)||Array.isArray(I)&&I.length===0,b=(I,L,k,J)=>L&&h(L,k)&&I&&h(I,k)&&J(I[k],L[k]),y=(I,L)=>u(I)&&L===0||u(L)&&I===0||e(I,L),p=(I,L)=>u(I)&&L===!1||u(L)&&I===!1||e(I,L),f=I=>u(I)||e(I,{})||I===!0,d=I=>u(I)||e(I,{}),m=I=>u(I)||s(I)||I===!0||I===!1;function _(I,L){return v(I)&&v(L)?!0:e(g(I),g(L))}function $(I,L){return I=l(I),L=l(L),e(g(I),g(L))}function S(I,L,k,J){var X=r(c(I).concat(c(L)));return d(I)&&d(L)?!0:d(I)&&c(L).length||d(L)&&c(I).length?!1:X.every(function(Y){var ne=I[Y],K=L[Y];return Array.isArray(ne)&&Array.isArray(K)?e(g(I),g(L)):Array.isArray(ne)&&!Array.isArray(K)||Array.isArray(K)&&!Array.isArray(ne)?!1:b(I,L,Y,J)})}function w(I,L,k,J){return s(I)&&s(L)?J(I,L):Array.isArray(I)&&Array.isArray(L)?S(I,L,k,J):e(I,L)}function O(I,L,k,J){var X=n(I,J),Y=n(L,J),ne=i(X,Y,J);return ne.length===Math.max(X.length,Y.length)}var E={title:e,uniqueItems:p,minLength:y,minItems:y,minProperties:y,required:_,enum:_,type:$,items:w,anyOf:O,allOf:O,oneOf:O,properties:S,patternProperties:S,dependencies:S},R=["properties","patternProperties","dependencies","uniqueItems","minLength","minItems","minProperties","required"],q=["additionalProperties","additionalItems","contains","propertyNames","not"];function M(I,L,k){if(k=a(k,{ignore:[]}),f(I)&&f(L))return!0;if(!m(I)||!m(L))throw new Error("Either of the values are not a JSON schema.");if(I===L)return!0;if(o(I)&&o(L))return I===L;if(I===void 0&&L===!1||L===void 0&&I===!1||u(I)&&!u(L)||!u(I)&&u(L))return!1;var J=r(Object.keys(I).concat(Object.keys(L)));if(k.ignore.length&&(J=J.filter(Y=>k.ignore.indexOf(Y)===-1)),!J.length)return!0;function X(Y,ne){return M(Y,ne,k)}return J.every(function(Y){var ne=I[Y],K=L[Y];if(q.indexOf(Y)!==-1)return M(ne,K,k);var j=E[Y];if(j||(j=e),e(ne,K))return!0;if(R.indexOf(Y)===-1&&(!h(I,Y)&&h(L,Y)||h(I,Y)&&!h(L,Y)))return ne===K;var V=j(ne,K,Y,X);if(!o(V))throw new Error("Comparer must return true or false");return V})}return cl=M,cl}var dl,fm;function Ec(){if(fm)return dl;fm=1;function e(t){return Object.prototype.toString.call(t)==="[object Array]"}return dl=Array.isArray||e,dl}var fl,pm;function CA(){if(pm)return fl;pm=1;function e(t){return(typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]")&&t.valueOf()===t.valueOf()}return fl=e,fl}var pl,hm;function IA(){if(hm)return pl;hm=1;var e=CA();function t(r){return e(r)&&r%1===0}return pl=t,pl}var hl,mm;function pb(){if(mm)return hl;mm=1;var e=Ec(),t=IA();function r(n){var a;if(!e(n)||(a=n.length,!a))return!1;for(var i=0;il&&(c=l,l=o,o=c),l=l-o}return u*o}function i(o,l){var u=0,c;if(o===0)return l;if(l===0)return o;for(;(o&1)===0&&(l&1)===0;)o>>>=1,l>>>=1,u++;for(;(o&1)===0;)o>>>=1;for(;l;){for(;(l&1)===0;)l>>>=1;o>l&&(c=l,l=o,o=c),l=l-o}return o<1){if(c=l[0],u=l[1],!r(u))throw new TypeError("gcd()::invalid input argument. Accessor must be a function. Value: `"+u+"`.")}else c=l[0];else throw new TypeError("gcd()::invalid input argument. Must provide an array of integers. Value: `"+l[0]+"`.");if(h=c.length,h<2)return null;if(u){for(g=new Array(h),b=0;b1){if(l=s[0],o=s[1],!n(o))throw new TypeError("lcm()::invalid input argument. Accessor must be a function. Value: `"+o+"`.")}else l=s[0];else throw new TypeError("lcm()::invalid input argument. Must provide an array of integers. Value: `"+s[0]+"`.");if(u=l.length,u<2)return null;if(o){for(c=new Array(u),g=0;g1?i[o-1]:void 0,u=o>2?i[2]:void 0;for(l=n.length>3&&typeof l=="function"?(o--,l):void 0,u&&t(i[0],i[1],u)&&(l=o<3?void 0:l,o=1),a=Object(a);++s-1;)y!==l&&s.call(y,p,1),s.call(l,p,1);return l}return Rl=o,Rl}var xl,qm;function UA(){if(qm)return xl;qm=1;var e=LA();function t(r,n){return r&&r.length&&n&&n.length?e(r,n):r}return xl=t,xl}var ql,jm;function VA(){if(jm)return ql;jm=1;var e=Yr();function t(r){return typeof r=="function"?r:e}return ql=t,ql}var jl,Nm;function _b(){if(Nm)return jl;Nm=1;var e=kv(),t=ib(),r=VA(),n=Ue();function a(i,s){var o=n(i)?e:t;return o(i,r(s))}return jl=a,jl}var Nl,Dm;function KA(){if(Dm)return Nl;Dm=1;var e=wa(),t=_c(),r=$c(),n=zt(),a=Bt(),i=Pa(),s=200;function o(l,u,c,h){var g=-1,v=t,b=!0,y=l.length,p=[],f=u.length;if(!y)return p;c&&(u=n(u,a(c))),h?(v=r,b=!1):u.length>=s&&(v=i,b=!1,u=new e(u));e:for(;++gn(t(y.map(c))),l=(y,p)=>y.map(f=>f&&f[p]),u=(y,p)=>Object.prototype.hasOwnProperty.call(y,p),c=y=>r(y)||Array.isArray(y)?Object.keys(y):[],h=y=>y!==void 0,g=y=>r(y)||y===!0||y===!1,v=y=>!c(y).length&&y!==!1&&y!==!0;return Fl={allUniqueKeys:o,deleteUndefinedProps:s,getValues:l,has:u,isEmptySchema:v,isSchema:g,keys:c,notUndefined:h,uniqWith:a,withoutArr:(y,...p)=>i.apply(null,[y].concat(e(p)))},Fl}var Ml,km;function zA(){if(km)return Ml;km=1;const e=Oc(),t=_b(),{allUniqueKeys:r,deleteUndefinedProps:n,getValues:a,keys:i,notUndefined:s,uniqWith:o,withoutArr:l}=$b();function u(h){t(h,function(g,v){g===!1&&delete h[v]})}function c(h,g){return r(h).reduce(function(b,y){const p=a(h,y),f=o(p.filter(s),e);return b[y]=g(f,y),b},{})}return Ml={keywords:["properties","patternProperties","additionalProperties"],resolver(h,g,v,b){b.ignoreAdditionalProperties||(h.forEach(function(p){const f=h.filter($=>$!==p),d=i(p.properties),_=i(p.patternProperties).map($=>new RegExp($));f.forEach(function($){const S=i($.properties),w=S.filter(E=>_.some(R=>R.test(E)));l(S,d,w).forEach(function(E){$.properties[E]=v.properties([$.properties[E],p.additionalProperties],E)})})}),h.forEach(function(p){const f=h.filter(m=>m!==p),d=i(p.patternProperties);p.additionalProperties===!1&&f.forEach(function(m){const _=i(m.patternProperties);l(_,d).forEach(S=>delete m.patternProperties[S])})}));const y={additionalProperties:v.additionalProperties(h.map(p=>p.additionalProperties)),patternProperties:c(h.map(p=>p.patternProperties),v.patternProperties),properties:c(h.map(p=>p.properties),v.properties)};return y.additionalProperties===!1&&u(y.properties),n(y)}},Ml}var kl,Lm;function WA(){if(Lm)return kl;Lm=1;const e=Oc(),t=_b(),{allUniqueKeys:r,deleteUndefinedProps:n,has:a,isSchema:i,notUndefined:s,uniqWith:o}=$b();function l(g){t(g,function(v,b){v===!1&&g.splice(b,1)})}function u(g,v){return g.map(function(b){if(b)if(Array.isArray(b.items)){const y=b.items[v];if(i(y))return y;if(a(b,"additionalItems"))return b.additionalItems}else return b.items})}function c(g){return g.map(function(v){if(v)return Array.isArray(v.items)?v.additionalItems:v.items})}function h(g,v,b){return r(b).reduce(function(p,f){const d=u(g,f),m=o(d.filter(s),e);return p[f]=v(m,f),p},[])}return kl={keywords:["items","additionalItems"],resolver(g,v,b){const y=g.map(m=>m.items),p=y.filter(s),f={};p.every(i)?f.items=b.items(y):f.items=h(g,b.items,y);let d;return p.every(Array.isArray)?d=g.map(m=>m.additionalItems):p.some(Array.isArray)&&(d=c(g)),d&&(f.additionalItems=b.additionalItems(d)),f.additionalItems===!1&&Array.isArray(f.items)&&l(f.items),n(f)}},kl}var Ll,Um;function HA(){if(Um)return Ll;Um=1;const e=NE(),t=Oc(),r=RA(),n=FA(),a=vb(),i=bb(),s=MA(),o=fb(),l=eb(),u=Aa(),c=UA(),h=ob(),g=Sc(),v=wc(),b=zA(),y=WA(),p=(B,G)=>B.indexOf(G)!==-1,f=B=>u(B)||B===!0||B===!1,d=B=>B===!1,m=B=>B===!0,_=(B,G,C)=>C(B),$=B=>h(g(i(B))),S=B=>B!==void 0,w=B=>g(i(B.map(Y))),O=B=>B[0],E=B=>$(B),R=B=>Math.max.apply(Math,B),q=B=>Math.min.apply(Math,B),M=B=>B.some(m),I=B=>v(a(B),l);function L(B){return function(G,C){return t({[B]:G},{[B]:C})}}function k(B){let{allOf:G=[],...C}=B;return C=u(B)?C:B,[C,...G.map(k)]}function J(B,G){return B.map(C=>C&&C[G])}function X(B,G){return B.map(function(C,x){try{return G(C,x)}catch{return}}).filter(S)}function Y(B){return u(B)||Array.isArray(B)?Object.keys(B):[]}function ne(B,G){if(G=G||[],!B.length)return G;const C=B.slice(0).shift(),x=B.slice(1);return G.length?ne(x,a(G.map(F=>C.map(z=>[z].concat(F))))):ne(x,C.map(F=>F))}function K(B,G){let C;try{C=B.map(function(x){return JSON.stringify(x,null,2)}).join(`
`)}catch{C=B.join(", ")}throw new Error('Could not resolve values for path:"'+G.join(".")+`". They are probably incompatible. Values:
`+C)}function j(B,G,C,x,F,z){if(B.length){const W=F.complexResolvers[G];if(!W||!W.resolver)throw new Error("No resolver found for "+G);const Z=C.map(re=>B.reduce((de,ie)=>(re[ie]!==void 0&&(de[ie]=re[ie]),de),{})),ee=v(Z,t),ce=W.keywords.reduce((re,de)=>({...re,[de]:(ie,ue=[])=>x(ie,null,z.concat(de,ue))}),{}),se=W.resolver(ee,z.concat(G),ce,F);return u(se)||K(ee,z.concat(G)),se}}function V(B){return{required:B}}const N=["properties","patternProperties","definitions","dependencies"],P=["anyOf","oneOf"],T=["additionalProperties","additionalItems","contains","propertyNames","not","items"],D={type(B){if(B.some(Array.isArray)){const G=B.map(function(x){return Array.isArray(x)?x:[x]}),C=s.apply(null,G);if(C.length===1)return C[0];if(C.length>1)return g(C)}},dependencies(B,G,C){return w(B).reduce(function(F,z){const W=J(B,z);let Z=v(W.filter(S),l);const ee=Z.filter(Array.isArray);if(ee.length){if(ee.length===Z.length)F[z]=$(Z);else{const ce=Z.filter(f),se=ee.map(V);F[z]=C(ce.concat(se),z)}return F}return Z=v(Z,t),F[z]=C(Z,z),F},{})},oneOf(B,G,C){const x=ne(e(B)),F=X(x,C),z=v(F,t);if(z.length)return z},not(B){return{anyOf:B}},pattern(B){return B.map(G=>"(?="+G+")").join("")},multipleOf(B){let G=B.slice(0),C=1;for(;G.some(x=>!Number.isInteger(x));)G=G.map(x=>x*10),C=C*10;return r(G)/C},enum(B){const G=o.apply(null,B.concat(l));if(G.length)return h(G)}};D.$id=O,D.$ref=O,D.$schema=O,D.additionalItems=_,D.additionalProperties=_,D.anyOf=D.oneOf,D.contains=_,D.default=O,D.definitions=D.dependencies,D.description=O,D.examples=I,D.exclusiveMaximum=q,D.exclusiveMinimum=R,D.items=y,D.maximum=q,D.maxItems=q,D.maxLength=q,D.maxProperties=q,D.minimum=R,D.minItems=R,D.minLength=R,D.minProperties=R,D.properties=b,D.propertyNames=_,D.required=E,D.title=O,D.uniqueItems=M;const U={properties:b,items:y};function Q(B,G,C){G=n(G,{ignoreAdditionalProperties:!1,resolvers:D,complexResolvers:U,deep:!0});const x=Object.entries(G.complexResolvers);function F(Z,ee,ce){Z=e(Z.filter(S)),ce=ce||[];const se=u(ee)?ee:{};if(!Z.length)return;if(Z.some(d))return!1;if(Z.every(m))return!0;Z=Z.filter(u);const re=w(Z);if(G.deep&&p(re,"allOf"))return Q({allOf:Z},G);const de=x.map(([ie,ue])=>re.filter(Ae=>ue.keywords.includes(Ae)));return de.forEach(ie=>c(re,ie)),re.forEach(function(ie){const ue=J(Z,ie),Ae=v(ue.filter(S),L(ie));if(Ae.length===1&&p(P,ie))se[ie]=Ae[0].map(Te=>F([Te],Te));else if(Ae.length===1&&!p(N,ie)&&!p(T,ie))se[ie]=Ae[0];else{const Te=G.resolvers[ie]||G.resolvers.defaultResolver;if(!Te)throw new Error("No resolver found for key "+ie+". You can provide a resolver for this keyword in the options, or provide a default resolver.");const Ve=(Xe,je=[])=>F(Xe,null,ce.concat(ie,je));se[ie]=Te(Ae,ce.concat(ie),Ve,G),se[ie]===void 0?K(Ae,ce.concat(ie)):se[ie]===void 0&&delete se[ie]}}),x.reduce((ie,[ue,Ae],Te)=>({...ie,...j(de[Te],ue,Z,F,G,ce)}),se)}const z=i(k(B));return F(z)}return Q.options={resolvers:D},Ll=Q,Ll}var GA=HA();const YA=Lr(GA);function nr(e){let t;const r=ae(e,"discriminator.propertyName",void 0);return ha(r)?t=r:r!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof r}" instead`),t}function qr(e){return Array.isArray(e)?"array":typeof e=="string"?"string":e==null?"null":typeof e=="boolean"?"boolean":isNaN(e)?typeof e=="object"?"object":"string":"number"}var JA=Qu(function(e){return Dv(Wr(e,1,ea,!0))});function mt(e){let{type:t}=e;return!t&&e.const?qr(e.const):!t&&e.enum?"string":!t&&(e.properties||e.additionalProperties)?"object":(Array.isArray(t)&&(t.length===2&&t.includes("null")?t=t.find(r=>r!=="null"):t=t[0]),t)}function gt(e,t){const r=Object.assign({},e);return Object.keys(t).reduce((n,a)=>{const i=e?e[a]:{},s=t[a];return e&&a in e&&he(s)?n[a]=gt(i,s):e&&t&&(mt(e)==="object"||mt(t)==="object")&&a===i1&&Array.isArray(i)&&Array.isArray(s)?n[a]=JA(i,s):n[a]=s,n},r)}function Le(e,t,r={},n,a){return tt(e,t,r,n,void 0,void 0,a)[0]}function XA(e,t,r,n,a,i,s){const{if:o,then:l,else:u,...c}=t,h=e.isValid(o,i||{},r);let g=[c],v=[];if(n)l&&typeof l!="boolean"&&(v=v.concat(tt(e,l,r,i,n,a,s))),u&&typeof u!="boolean"&&(v=v.concat(tt(e,u,r,i,n,a,s)));else{const b=h?l:u;b&&typeof b!="boolean"&&(v=v.concat(tt(e,b,r,i,n,a,s)))}return v.length&&(g=v.map(b=>gt(c,b))),g.flatMap(b=>tt(e,b,r,i,n,a,s))}function Sb(e){return e.reduce((r,n)=>n.length>1?n.flatMap(a=>Rv(r.length,i=>[...r[i]].concat(a))):(r.forEach(a=>a.push(n[0])),r),[[]])}function ZA(e,t,r,n,a,i,s){const o=wb(e,t,r,n,a,i);if(o.length>1||o[0]!==t)return o;if(na in t)return Pb(e,t,r,n,a,i).flatMap(u=>tt(e,u,r,i,n,a,s));if(ir in t&&Array.isArray(t.allOf)){const l=t.allOf.map(c=>tt(e,c,r,i,n,a,s));return Sb(l).map(c=>({...t,allOf:c}))}return[t]}function wb(e,t,r,n,a,i,s){const o=jr(t,r,a);return o!==t?tt(e,o,r,i,n,a,s):[t]}function jr(e,t,r){if(!he(e))return e;let n=e;if(Ce in n){const{$ref:a,...i}=n;if(r.includes(a))return n;r.push(a),n={...$v(a,t),...i}}if(Oe in n){const a=[],i=gO(n[Oe],(s,o,l)=>{const u=[...r];s[l]=jr(o,t,u),a.push(u)},{});$O(r,xO(wO(a))),n={...n,[Oe]:i}}return Ot in n&&!Array.isArray(n.items)&&typeof n.items!="boolean"&&(n={...n,items:jr(n.items,t,r)}),Pe(e,n)?e:n}function QA(e,t,r,n,a){const i={...t,properties:{...t.properties}},s=n&&he(n)?n:{};return Object.keys(s).forEach(o=>{if(o in i.properties)return;let l={};typeof i.additionalProperties!="boolean"?Ce in i.additionalProperties?l=Le(e,{$ref:ae(i.additionalProperties,[Ce])},r,s,a):"type"in i.additionalProperties?l={...i.additionalProperties}:Ge in i.additionalProperties||ke in i.additionalProperties?l={type:"object",...i.additionalProperties}:l={type:qr(ae(s,[o]))}:l={type:qr(ae(s,[o]))},i.properties[o]=l,xe(i.properties,[o,Ur],!0)}),i}function tt(e,t,r,n,a=!1,i=[],s){return he(t)?ZA(e,t,r,a,i,n,s).flatMap(l=>{var u;let c=l;if(n1 in c)return XA(e,c,r,a,i,n,s);if(ir in c){if(a){const{allOf:g,...v}=c;return[...g,v]}try{const g=[],v=[];(u=c.allOf)===null||u===void 0||u.forEach(b=>{typeof b=="object"&&b.contains?g.push(b):v.push(b)}),g.length&&(c={...c,allOf:v}),c=s?s(c):YA(c,{deep:!1}),g.length&&(c.allOf=g)}catch(g){console.warn(`could not merge subschemas in allOf:
`,g);const{allOf:v,...b}=c;return b}}return fu in c&&c.additionalProperties!==!1?QA(e,c,r,n,s):c}):[{}]}function eC(e,t,r,n,a){let i;const{oneOf:s,anyOf:o,...l}=t;if(Array.isArray(s)?i=s:Array.isArray(o)&&(i=o),i){const u=a===void 0&&n?{}:a,c=nr(t);i=i.map(g=>jr(g,r,[]));const h=Xu(e,u,i,r,c);if(n)return i.map(g=>gt(l,g));t=gt(l,i[h])}return[t]}function Pb(e,t,r,n,a,i,s){const{dependencies:o,...l}=t;return eC(e,l,r,n,i).flatMap(c=>Ob(e,o,c,r,n,a,i,s))}function Ob(e,t,r,n,a,i,s,o){let l=[r];for(const u in t){if(!a&&ae(s,[u])===void 0||r.properties&&!(u in r.properties))continue;const[c,h]=Yu(u,t);return Array.isArray(h)?l[0]=tC(r,h):he(h)&&(l=rC(e,r,n,u,h,a,i,s,o)),l.flatMap(g=>Ob(e,c,g,n,a,i,s,o))}return l}function tC(e,t){if(!t)return e;const r=Array.isArray(e.required)?Array.from(new Set([...e.required,...t])):t;return{...e,required:r}}function rC(e,t,r,n,a,i,s,o,l){return tt(e,a,r,o,i,s,l).flatMap(c=>{const{oneOf:h,...g}=c;if(t=gt(t,g),h===void 0)return t;const v=h.map(y=>typeof y=="boolean"||!(Ce in y)?[y]:wb(e,y,r,i,s,o));return Sb(v).flatMap(y=>nC(e,t,r,n,y,i,s,o,l))})}function nC(e,t,r,n,a,i,s,o,l){const u=a.filter(c=>{if(typeof c=="boolean"||!c||!c.properties)return!1;const{[n]:h}=c.properties;if(h){const g={type:"object",properties:{[n]:h}};return e.isValid(g,o,r)||i}return!1});return!i&&u.length!==1?(console.warn("ignoring oneOf in dependencies because there isn't exactly one subschema that is valid"),[t]):u.flatMap(c=>{const h=c,[g]=Yu(n,h.properties),v={...h,properties:g};return tt(e,v,r,o,i,s,l).map(y=>gt(t,y))})}const aC={type:"object",$id:a1,properties:{__not_really_there__:{type:"number"}}};function bu(e,t,r,n,a){let i=0;return r&&(Se(r.properties)?i+=tO(r.properties,(s,o,l)=>{const u=ae(n,l);if(typeof o=="boolean")return s;if(De(o,Ce)){const c=Le(e,o,t,u,a);return s+bu(e,t,c,u||{},a)}if((De(o,ke)||De(o,Ge))&&u){const c=De(o,ke)?ke:Ge,h=nr(o);return s+Nr(e,t,u,ae(o,c),-1,h,a)}if(o.type==="object")return Se(u)&&(s+=1),s+bu(e,t,o,u,a);if(o.type===qr(u)){let c=s+1;return o.default?c+=u===o.default?1:-1:o.const&&(c+=u===o.const?1:-1),c}return s},0):ha(r.type)&&r.type===qr(n)&&(i+=1)),i}function Nr(e,t,r,n,a=-1,i,s){const o=n.map(g=>jr(g,t,[])),l=xv(r,n,i);if(wv(l))return l;const u=o.reduce((g,v,b)=>(Xu(e,r,[aC,v],t,i)===1&&g.push(b),g),[]);if(u.length===1)return u[0];u.length||Rv(o.length,g=>u.push(g));const c=new Set,{bestIndex:h}=u.reduce((g,v)=>{const{bestScore:b}=g,y=o[v],p=bu(e,t,y,r,s);return c.add(p),p>b?{bestIndex:v,bestScore:p}:g},{bestIndex:a,bestScore:0});return c.size===1&&a>=0?a:h}function _u(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every(t=>he(t))}function Ar(e){return e==null}function Dr(e,t,r=!1,n=!1,a=!1){if(Array.isArray(t)){const i=Array.isArray(e)?e:[],s=a?i:t,o=a?t:i,l=s.map((u,c)=>o[c]!==void 0?Dr(i[c],t[c],r,n,a):u);return(r||a)&&l.length{const l=ae(t,o),u=he(e)&&o in e,c=o in t;return s[o]=Dr(e?ae(e,o):{},l,r,n,a&&(u||!c)),s},i)}return n&&(!Ar(e)&&Ar(t)||typeof t=="number"&&isNaN(t))||a&&!Ar(t)?e:t}function ft(e,t,r=!1){return Object.keys(t).reduce((n,a)=>{const i=e?e[a]:{},s=t[a];if(e&&a in e&&he(s))n[a]=ft(i,s,r);else if(r&&Array.isArray(i)&&Array.isArray(s)){let o=s;r==="preventDuplicates"&&(o=s.reduce((l,u)=>(i.includes(u)||l.push(u),l),[])),n[a]=i.concat(o)}else n[a]=s;return n},Object.assign({},e))}function Eb(e){return Array.isArray(e.enum)&&e.enum.length===1||ht in e}function Ac(e,t,r={},n){const a=Le(e,t,r,void 0,n),i=a.oneOf||a.anyOf;return Array.isArray(a.enum)?!0:Array.isArray(i)?i.every(s=>typeof s!="boolean"&&Eb(s)):!1}function Cc(e,t,r,n){return!t.uniqueItems||!t.items||typeof t.items=="boolean"?!1:Ac(e,t.items,r,n)}function Ab(e){const t=e[ht],r=mt(e);return he(t)&&ha(t?.$data)&&r!=="object"&&r!=="array"}function iC(e){if(r1 in e&&Array.isArray(e.enum)&&e.enum.length===1)return e.enum[0];if(ht in e)return e.const;throw new Error("schema cannot be inferred as a constant")}function Fr(e,t){const r=e;if(e.enum){let i;if(t){const{enumNames:s}=pe(t);i=s}return!i&&r.enumNames&&(i=r.enumNames),e.enum.map((s,o)=>({label:i?.[o]||String(s),value:s}))}let n,a;return e.anyOf?(n=e.anyOf,a=t?.anyOf):e.oneOf&&(n=e.oneOf,a=t?.oneOf),n&&n.map((i,s)=>{const{title:o}=pe(a?.[s]),l=i,u=iC(l),c=o||l.title||String(u);return{schema:l,label:c,value:u}})}const sC=["string","number","integer","boolean","null"];var ar;(function(e){e[e.Ignore=0]="Ignore",e[e.Invert=1]="Invert",e[e.Fallback=2]="Fallback"})(ar||(ar={}));function Ul(e,t=ar.Ignore,r=-1){if(r>=0){if(Array.isArray(e.items)&&rEt(e,_,{rootSchema:i,includeUndefinedValues:s,_recurseList:o,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:u,parentDefaults:Array.isArray(n)?n[$]:void 0,rawFormData:g,required:c,shouldMergeDefaultsIntoFormData:h}));else if(ke in v){const{oneOf:_,...$}=v;if(_.length===0)return;const S=nr(v),{type:w="null"}=$;!Array.isArray(w)&&sC.includes(w)&&p?.constAsDefaults==="skipOneOf"&&(p={...p,constAsDefaults:"never"}),y=_[Nr(e,i,a??v.default,_,0,S,u)],y=gt($,y)}else if(Ge in v){const{anyOf:_,...$}=v;if(_.length===0)return;const S=nr(v);y=_[Nr(e,i,a??v.default,_,0,S,u)],y=gt($,y)}if(y)return Et(e,y,{rootSchema:i,includeUndefinedValues:s,_recurseList:f,experimental_defaultFormStateBehavior:p,experimental_customMergeAllOf:u,parentDefaults:b,rawFormData:a??g,required:c,shouldMergeDefaultsIntoFormData:h});b===void 0&&(b=v.default);const d=Km(e,v,r,b);let m=d??b;if(h){const{arrayMinItems:_={}}=l||{},{mergeExtraDefaults:$}=_,S=oC(e,v,i,a,l,u);(!he(a)||ir in v)&&(m=Dr(m,S,$,!0))}return m}function oC(e,t,r,n,a,i){const s=!Eb(t)&&Ac(e,t,r,i);let o=n;if(s){const u=Fr(t);o=u?.some(h=>Pe(h.value,n))?n:void 0}return t[ht]&&a?.constAsDefaults==="always"&&(o=t.const),o}function lC(e,t,{rawFormData:r,rootSchema:n={},includeUndefinedValues:a=!1,_recurseList:i=[],experimental_defaultFormStateBehavior:s=void 0,experimental_customMergeAllOf:o=void 0,required:l,shouldMergeDefaultsIntoFormData:u}={},c){{const h=he(r)?r:{},g=t,v=s?.allOf==="populateDefaults"&&ir in g?Le(e,g,n,h,o):g,b=v[ht],y=Object.keys(v.properties||{}).reduce((p,f)=>{var d;const m=ae(v,[Oe,f]),_=he(b)&&b[f]!==void 0,$=(he(m)&&ht in m||_)&&s?.constAsDefaults!=="never"&&!Ab(m),S=Et(e,m,{rootSchema:n,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,includeUndefinedValues:a===!0,parentDefaults:ae(c,[f]),rawFormData:ae(h,[f]),required:(d=v.required)===null||d===void 0?void 0:d.includes(f),shouldMergeDefaultsIntoFormData:u});return Vm(p,f,S,a,l,v.required,s,$),p},{});if(v.additionalProperties){const p=he(v.additionalProperties)?v.additionalProperties:{},f=new Set;he(c)&&Object.keys(c).filter(m=>!v.properties||!v.properties[m]).forEach(m=>f.add(m));const d=[];Object.keys(h).filter(m=>!v.properties||!v.properties[m]).forEach(m=>{f.add(m),d.push(m)}),f.forEach(m=>{var _;const $=Et(e,p,{rootSchema:n,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,includeUndefinedValues:a===!0,parentDefaults:ae(c,[m]),rawFormData:ae(h,[m]),required:(_=v.required)===null||_===void 0?void 0:_.includes(m),shouldMergeDefaultsIntoFormData:u});Vm(y,m,$,a,l,d)})}return y}}function uC(e,t,{rawFormData:r,rootSchema:n={},_recurseList:a=[],experimental_defaultFormStateBehavior:i=void 0,experimental_customMergeAllOf:s=void 0,required:o,shouldMergeDefaultsIntoFormData:l}={},u){var c,h;const g=t,v=(c=i?.arrayMinItems)!==null&&c!==void 0?c:{},{populate:b,mergeExtraDefaults:y}=v,p=b==="never",f=b==="requiredOnly",d=b==="all"||!p&&!f,m=(h=v?.computeSkipPopulate)!==null&&h!==void 0?h:()=>!1,$=i?.emptyObjectFields==="skipEmptyDefaults"?void 0:[];if(Array.isArray(u)&&(u=u.map((M,I)=>{const L=Ul(g,ar.Fallback,I);return Et(e,L,{rootSchema:n,_recurseList:a,experimental_defaultFormStateBehavior:i,experimental_customMergeAllOf:s,parentDefaults:M,required:o,shouldMergeDefaultsIntoFormData:l})})),Array.isArray(r)){const M=Ul(g);if(p)u=r;else{const I=r.map((k,J)=>Et(e,M,{rootSchema:n,_recurseList:a,experimental_defaultFormStateBehavior:i,experimental_customMergeAllOf:s,rawFormData:k,parentDefaults:ae(u,[J]),required:o,shouldMergeDefaultsIntoFormData:l}));u=Dr(u,I,(f&&o||d)&&y)}}if((he(g)&&ht in g&&i?.constAsDefaults!=="never")===!1){if(p)return u??$;if(f&&!o)return u||void 0}const w=Array.isArray(u)?u.length:0;if(!g.minItems||Cc(e,g,n,s)||m(e,g,n)||g.minItems<=w)return u||$;const O=u||[],E=Ul(g,ar.Invert),R=E.default,q=new Array(g.minItems-w).fill(Et(e,E,{parentDefaults:R,rootSchema:n,_recurseList:a,experimental_defaultFormStateBehavior:i,experimental_customMergeAllOf:s,required:o,shouldMergeDefaultsIntoFormData:l}));return O.concat(q)}function Km(e,t,r={},n){switch(mt(t)){case"object":return lC(e,t,r,n);case"array":return uC(e,t,r,n)}}function Cb(e,t,r,n,a=!1,i,s){if(!he(t))throw new Error("Invalid schema: "+t);const o=Le(e,t,n,r,s),l=Et(e,o,{rootSchema:n,includeUndefinedValues:a,experimental_defaultFormStateBehavior:i,experimental_customMergeAllOf:s,rawFormData:r,shouldMergeDefaultsIntoFormData:!0});if(he(r)||Array.isArray(r)){const{mergeDefaultsIntoFormData:u}=i||{};return Dr(l,r,!0,u==="useDefaultIfFormDataUndefined",!0)}return l}function Ib(e={}){return"widget"in pe(e)&&pe(e).widget!=="hidden"}function Tb(e,t,r={},n,a){if(r[ju]==="files")return!0;if(t.items){const i=Le(e,t.items,n,void 0,a);return i.type==="string"&&i.format==="data-url"}return!1}function cC(e,t,r={},n,a,i){const s=pe(r,a),{label:o=!0}=s;let l=!!o;const u=mt(t);return u==="array"&&(l=Cc(e,t,n,i)||Tb(e,t,r,n,i)||Ib(r)),u==="object"&&(l=!1),u==="boolean"&&!r[ju]&&(l=!1),r[s1]&&(l=!1),l}function dC(e,t,r){if(!r)return t;const{errors:n,errorSchema:a}=t;let i=e.toErrorList(r),s=r;return rr(a)||(s=ft(a,r,!0),i=[...n].concat(i)),{errorSchema:s,errors:i}}const Yt=Symbol("no Value");function $u(e,t,r,n,a={},i){let s;if(De(r,Oe)){const o={};if(De(n,Oe)){const c=ae(n,Oe,{});Object.keys(c).forEach(h=>{De(a,h)&&(o[h]=void 0)})}const l=Object.keys(ae(r,Oe,{})),u={};l.forEach(c=>{const h=ae(a,c);let g=ae(n,[Oe,c],{}),v=ae(r,[Oe,c],{});De(g,Ce)&&(g=Le(e,g,t,h,i)),De(v,Ce)&&(v=Le(e,v,t,h,i));const b=ae(g,"type"),y=ae(v,"type");if(!b||b===y)if(De(o,c)&&delete o[c],y==="object"||y==="array"&&Array.isArray(h)){const p=$u(e,t,v,g,h,i);(p!==void 0||y==="array")&&(u[c]=p)}else{const p=ae(v,"default",Yt),f=ae(g,"default",Yt);p!==Yt&&p!==h&&(f===h?o[c]=p:ae(v,"readOnly")===!0&&(o[c]=void 0));const d=ae(v,"const",Yt),m=ae(g,"const",Yt);d!==Yt&&d!==h&&(o[c]=m===h?d:void 0)}}),s={...typeof a=="string"||Array.isArray(a)?void 0:a,...o,...u}}else if(ae(n,"type")==="array"&&ae(r,"type")==="array"&&Array.isArray(a)){let o=ae(n,"items"),l=ae(r,"items");if(typeof o=="object"&&typeof l=="object"&&!Array.isArray(o)&&!Array.isArray(l)){De(o,Ce)&&(o=Le(e,o,t,a,i)),De(l,Ce)&&(l=Le(e,l,t,a,i));const u=ae(o,"type"),c=ae(l,"type");if(!u||u===c){const h=ae(r,"maxItems",-1);c==="object"?s=a.reduce((g,v)=>{const b=$u(e,t,l,o,v,i);return b!==void 0&&(h<0||g.length0&&a.length>h?a.slice(0,h):a}}else typeof o=="boolean"&&typeof l=="boolean"&&o===l&&(s=a)}return s}function Bn(e,t,r,n,a,i,s,o=[],l){if(Ce in t||na in t||ir in t){const h=Le(e,t,i,s,l);if(o.findIndex(v=>Pe(v,h))===-1)return Bn(e,h,r,n,a,i,s,o.concat(h),l)}if(Ot in t&&!ae(t,[Ot,Ce]))return Bn(e,ae(t,Ot),r,n,a,i,s,o,l);const c={$id:a||r};if(mt(t)==="object"&&Oe in t)for(const h in t.properties){const g=ae(t,[Oe,h]),v=c[Pt]+n+h;c[h]=Bn(e,he(g)?g:{},r,n,v,i,ae(s,[h]),o,l)}return c}function fC(e,t,r,n,a,i="root",s="_",o){return Bn(e,t,i,s,r,n,a,void 0,o)}function jt(e,t,r,n,a,i=[],s){if(Ce in t||na in t||ir in t){const l=Le(e,t,n,a,s);if(i.findIndex(c=>Pe(c,l))===-1)return jt(e,l,r,n,a,i.concat(l),s)}let o={[Kn]:r.replace(/^\./,"")};if(ke in t||Ge in t){const l=ke in t?t.oneOf:t.anyOf,u=nr(t),c=Nr(e,n,a,l,0,u,s),h=l[c];o={...o,...jt(e,h,r,n,a,i,s)}}if(fu in t&&t[fu]!==!1&&xe(o,qu,!0),Ot in t&&Array.isArray(a)){const{items:l,additionalItems:u}=t;Array.isArray(l)?a.forEach((c,h)=>{l[h]?o[h]=jt(e,l[h],`${r}.${h}`,n,c,i,s):u?o[h]=jt(e,u,`${r}.${h}`,n,c,i,s):console.warn(`Unable to generate path schema for "${r}.${h}". No schema defined for it`)}):a.forEach((c,h)=>{o[h]=jt(e,l,`${r}.${h}`,n,c,i,s)})}else if(Oe in t)for(const l in t.properties){const u=ae(t,[Oe,l]);o[l]=jt(e,u,`${r}.${l}`,n,ae(a,[l]),i,s)}return o}function pC(e,t,r="",n,a,i){return jt(e,t,r,n,a,void 0,i)}class hC{constructor(t,r,n,a){this.rootSchema=r,this.validator=t,this.experimental_defaultFormStateBehavior=n,this.experimental_customMergeAllOf=a}getValidator(){return this.validator}doesSchemaUtilsDiffer(t,r,n={},a){return!t||!r?!1:this.validator!==t||!Pe(this.rootSchema,r)||!Pe(this.experimental_defaultFormStateBehavior,n)||this.experimental_customMergeAllOf!==a}getDefaultFormState(t,r,n=!1){return Cb(this.validator,t,r,this.rootSchema,n,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf)}getDisplayLabel(t,r,n){return cC(this.validator,t,r,this.rootSchema,n,this.experimental_customMergeAllOf)}getClosestMatchingOption(t,r,n,a){return Nr(this.validator,this.rootSchema,t,r,n,a,this.experimental_customMergeAllOf)}getFirstMatchingOption(t,r,n){return Xu(this.validator,t,r,this.rootSchema,n)}getMatchingOption(t,r,n){return qv(this.validator,t,r,this.rootSchema,n)}isFilesArray(t,r){return Tb(this.validator,t,r,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(t){return Cc(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(t){return Ac(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}mergeValidationData(t,r){return dC(this.validator,t,r)}retrieveSchema(t,r){return Le(this.validator,t,this.rootSchema,r,this.experimental_customMergeAllOf)}sanitizeDataForNewSchema(t,r,n){return $u(this.validator,this.rootSchema,t,r,n,this.experimental_customMergeAllOf)}toIdSchema(t,r,n,a="root",i="_"){return fC(this.validator,t,r,this.rootSchema,n,a,i,this.experimental_customMergeAllOf)}toPathSchema(t,r,n){return pC(this.validator,t,r,this.rootSchema,n,this.experimental_customMergeAllOf)}}function mC(e,t,r={},n){return new hC(e,t,r,n)}function gC(e){var t;if(e.indexOf("data:")===-1)throw new Error("File is invalid: URI must be a dataURI");const n=e.slice(5).split(";base64,");if(n.length!==2)throw new Error("File is invalid: dataURI must be base64");const[a,i]=n,[s,...o]=a.split(";"),l=s||"",u=decodeURI(((t=o.map(c=>c.split("=")).find(([c])=>c==="name"))===null||t===void 0?void 0:t[1])||"unknown");try{const c=atob(i),h=new Array(c.length);for(let v=0;v 0, got one of each`);if(e>t)return Rb(t,e).reverse();const r=[];for(let n=e;n<=t;n++)r.push({value:n,label:wt(n,2)});return r}function yC(e,t){let r=e;if(Array.isArray(t)){const n=r.split(/(%\d)/);t.forEach((a,i)=>{const s=n.findIndex(o=>o===`%${i+1}`);s>=0&&(n[s]=a)}),r=n.join("")}return r}function vC(e,t){return yC(e,t)}function rt(e,t=[],r){if(Array.isArray(e))return e.map(i=>rt(i,t)).filter(i=>i!==r);const n=e===""||e===null?-1:Number(e),a=t[n];return a?a.value:r}function bC(e,t,r=[]){const n=rt(e,r);return Array.isArray(t)?t.filter(a=>!Pe(a,n)):Pe(n,t)?void 0:t}function Ic(e,t){return Array.isArray(t)?t.some(r=>Pe(r,e)):Pe(t,e)}function _C(e,t=[],r=!1){const n=t.map((a,i)=>Ic(a.value,e)?String(i):void 0).filter(a=>typeof a<"u");return r?n:n[0]}function $C(e,t,r=[]){const n=rt(e,r);if(!Ar(n)){const a=r.findIndex(o=>n===o.value),i=r.map(({value:o})=>o);return t.slice(0,a).concat(n,t.slice(a)).sort((o,l)=>+(i.indexOf(o)>i.indexOf(l)))}return t}var SC=1,wC=4;function xb(e){return Er(e,SC|wC)}function PC(e,t,r,n){return n=typeof n=="function"?n:void 0,e==null?e:Zu(e,t,r,n)}class OC{constructor(t){this.errorSchema={},this.resetAllErrors(t)}get ErrorSchema(){return this.errorSchema}getOrCreateErrorBlock(t){let n=Array.isArray(t)&&t.length>0||typeof t=="string"?ae(this.errorSchema,t):this.errorSchema;return!n&&t&&(n={},PC(this.errorSchema,t,n,Object)),n}resetAllErrors(t){return this.errorSchema=t?xb(t):{},this}addErrors(t,r){const n=this.getOrCreateErrorBlock(r);let a=ae(n,Me);return Array.isArray(a)||(a=[],n[Me]=a),Array.isArray(t)?xe(n,Me,[...new Set([...a,...t])]):xe(n,Me,[...new Set([...a,t])]),this}setErrors(t,r){const n=this.getOrCreateErrorBlock(r),a=Array.isArray(t)?[...new Set([...t])]:[t];return xe(n,Me,a),this}clearErrors(t){const r=this.getOrCreateErrorBlock(t);return xe(r,Me,[]),this}}function EC(e,t,r=[1900,new Date().getFullYear()+2],n="YMD"){const{day:a,month:i,year:s,hour:o,minute:l,second:u}=e,c={type:"day",range:[1,31],value:a},h={type:"month",range:[1,12],value:i},g={type:"year",range:r,value:s},v=[];switch(n){case"MDY":v.push(h,c,g);break;case"DMY":v.push(c,h,g);break;case"YMD":default:v.push(g,h,c)}return t&&v.push({type:"hour",range:[0,23],value:o},{type:"minute",range:[0,59],value:l},{type:"second",range:[0,59],value:u}),v}function AC(e){const t={};return e.multipleOf&&(t.step=e.multipleOf),(e.minimum||e.minimum===0)&&(t.min=e.minimum),(e.maximum||e.maximum===0)&&(t.max=e.maximum),t}function qb(e,t,r={},n=!0){const a={type:t||"text",...AC(e)};return r.inputType?a.type=r.inputType:t||(e.type==="number"?(a.type="number",n&&a.step===void 0&&(a.step="any")):e.type==="integer"&&(a.type="number",a.step===void 0&&(a.step=1))),r.autocomplete&&(a.autoComplete=r.autocomplete),r.accept&&(a.accept=r.accept),a}const Bm={props:{disabled:!1},submitText:"Submit",norender:!1};function CC(e={}){const t=pe(e);if(t&&t[Yn]){const r=t[Yn];return{...Bm,...r}}return Bm}function ye(e,t,r={}){const{templates:n}=t;return e==="ButtonTemplates"?n[e]:r[e]||n[e]}var Vl={exports:{}},ge={};/**
diff --git a/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/index-aPw21Xcf.js b/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/index-anmhb6wk.js
similarity index 97%
rename from packages/ragbits-chat/src/ragbits/chat/ui-build/assets/index-aPw21Xcf.js
rename to packages/ragbits-chat/src/ragbits/chat/ui-build/assets/index-anmhb6wk.js
index 5c55246a8..30f753916 100644
--- a/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/index-aPw21Xcf.js
+++ b/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/index-anmhb6wk.js
@@ -1,4 +1,4 @@
-const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/FeedbackForm-BPycljsV.js","assets/index-V0bFpjmJ.js","assets/chunk-SSA7SXE4-26fqANp7.js","assets/useMenuTriggerState-B-4lUpkM.js","assets/useSelectableItem-BaL4tj6I.js","assets/index-BMhtIjmr.js","assets/chunk-IGSAU2ZA-CZpYjJJG.js","assets/ChatOptionsForm-x2g6iEPU.js","assets/ShareButton-DS3Dsf4s.js","assets/UsageButton-Bu-ZOHWk.js","assets/ChatHistory-C7A2uiIQ.js","assets/Login-BWGQs3cn.js","assets/authStore-w3touTBX.js","assets/AuthGuard-BTxv1Dj_.js","assets/LogoutButton-gJF91B1i.js"])))=>i.map(i=>d[i]);
+const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/FeedbackForm-D54-Ucqr.js","assets/index-CYAMgynD.js","assets/chunk-SSA7SXE4-D2nwPcpz.js","assets/useMenuTriggerState-C6GDlwil.js","assets/useSelectableItem-BIhPf2mL.js","assets/index-BAUrj1ow.js","assets/chunk-IGSAU2ZA-DCwEaDm9.js","assets/ChatOptionsForm-qNtrae8b.js","assets/ShareButton-DayYwYWS.js","assets/UsageButton-DstwX8_2.js","assets/ChatHistory-DXJFh5OF.js","assets/Login-Owv53qnj.js","assets/authStore-Dtjh8LvS.js","assets/AuthGuard-0_PL4fVX.js","assets/LogoutButton-CmhKreNa.js"])))=>i.map(i=>d[i]);
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var ig=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Oy={exports:{}},pp={},zy={exports:{}},ht={};/**
* @license React
* react.production.min.js
@@ -52,8 +52,8 @@ Error generating stack: `+C.message+`
touch-action: pan-x pan-y pinch-zoom;
}
}
- `.trim(),B.head.prepend(Y)},[b]),S.useEffect(()=>{let B=_.current;return()=>{var Y;g||KS((Y=B.target)!==null&&Y!==void 0?Y:void 0);for(let te of B.disposables)te();B.disposables=[]}},[g]),{isPressed:d||k,pressProps:Pn(x,j,{[qS]:!0})}}function Hx(e){return e.tagName==="A"&&e.hasAttribute("href")}function a0(e,t){const{key:n,code:r}=e,i=t,s=i.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(i instanceof Zi(i).HTMLInputElement&&!wT(i,n)||i instanceof Zi(i).HTMLTextAreaElement||i.isContentEditable)&&!((s==="link"||!s&&Hx(i))&&n!=="Enter")}function iu(e,t){let n=t.clientX,r=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function R5(e){return e instanceof HTMLInputElement?!1:e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!Hx(e)}function YS(e,t){return e instanceof HTMLInputElement?!wT(e,t):R5(e)}const L5=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function wT(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":L5.has(e.type)}let Zs=null,ih=new Set,jp=new Map,Su=!1,gb=!1;const M5={Tab:!0,Escape:!0};function wv(e,t){for(let n of ih)n(e,t)}function D5(e){return!(e.metaKey||!bu()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Yg(e){Su=!0,D5(e)&&(Zs="keyboard",wv("keyboard",e))}function xf(e){Zs="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Su=!0,wv("pointer",e))}function ST(e){AE(e)&&(Su=!0,Zs="virtual")}function kT(e){e.target===window||e.target===document||qg||!e.isTrusted||(!Su&&!gb&&(Zs="virtual",wv("virtual",e)),Su=!1,gb=!1)}function CT(){qg||(Su=!1,gb=!0)}function Xg(e){if(typeof window>"u"||typeof document>"u"||jp.get(Zi(e)))return;const t=Zi(e),n=Dt(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Su=!0,r.apply(this,arguments)},n.addEventListener("keydown",Yg,!0),n.addEventListener("keyup",Yg,!0),n.addEventListener("click",ST,!0),t.addEventListener("focus",kT,!0),t.addEventListener("blur",CT,!1),typeof PointerEvent<"u"&&(n.addEventListener("pointerdown",xf,!0),n.addEventListener("pointermove",xf,!0),n.addEventListener("pointerup",xf,!0)),t.addEventListener("beforeunload",()=>{ET(e)},{once:!0}),jp.set(t,{focus:r})}const ET=(e,t)=>{const n=Zi(e),r=Dt(e);t&&r.removeEventListener("DOMContentLoaded",t),jp.has(n)&&(n.HTMLElement.prototype.focus=jp.get(n).focus,r.removeEventListener("keydown",Yg,!0),r.removeEventListener("keyup",Yg,!0),r.removeEventListener("click",ST,!0),n.removeEventListener("focus",kT,!0),n.removeEventListener("blur",CT,!1),typeof PointerEvent<"u"&&(r.removeEventListener("pointerdown",xf,!0),r.removeEventListener("pointermove",xf,!0),r.removeEventListener("pointerup",xf,!0)),jp.delete(n))};function N5(e){const t=Dt(e);let n;return t.readyState!=="loading"?Xg(e):(n=()=>{Xg(e)},t.addEventListener("DOMContentLoaded",n)),()=>ET(e,n)}typeof document<"u"&&N5();function Gx(){return Zs!=="pointer"}function oh(){return Zs}function F5(e){Zs=e,wv(e,null)}function FG(){Xg();let[e,t]=S.useState(Zs);return S.useEffect(()=>{let n=()=>{t(Zs)};return ih.add(n),()=>{ih.delete(n)}},[]),ph()?null:e}const O5=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function z5(e,t,n){let r=Dt(n?.target);const i=typeof window<"u"?Zi(n?.target).HTMLInputElement:HTMLInputElement,s=typeof window<"u"?Zi(n?.target).HTMLTextAreaElement:HTMLTextAreaElement,l=typeof window<"u"?Zi(n?.target).HTMLElement:HTMLElement,c=typeof window<"u"?Zi(n?.target).KeyboardEvent:KeyboardEvent;return e=e||r.activeElement instanceof i&&!O5.has(r.activeElement.type)||r.activeElement instanceof s||r.activeElement instanceof l&&r.activeElement.isContentEditable,!(e&&t==="keyboard"&&n instanceof c&&!M5[n.key])}function j5(e,t,n){Xg(),S.useEffect(()=>{let r=(i,s)=>{z5(!!n?.isTextInput,i,s)&&e(Gx())};return ih.add(r),()=>{ih.delete(r)}},t)}function ku(e){const t=Dt(e),n=Or(t);if(oh()==="virtual"){let r=n;PE(()=>{Or(t)===r&&e.isConnected&&Jl(e)})}else Jl(e)}function PT(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e;const s=S.useCallback(d=>{if(d.target===d.currentTarget)return r&&r(d),i&&i(!1),!0},[r,i]),l=bT(s),c=S.useCallback(d=>{const h=Dt(d.target),m=h?Or(h):Or();d.target===d.currentTarget&&m===En(d.nativeEvent)&&(n&&n(d),i&&i(!0),l(d))},[i,n,l]);return{focusProps:{onFocus:!t&&(n||i||r)?c:void 0,onBlur:!t&&(r||i)?s:void 0}}}function XS(e){if(!e)return;let t=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){t=!0},continuePropagation(){t=!1},isPropagationStopped(){return t}};e(r),t&&n.stopPropagation()}}function B5(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:XS(e.onKeyDown),onKeyUp:XS(e.onKeyUp)}}}let V5=We.createContext(null);function U5(e){let t=S.useContext(V5)||{};_E(t,e);let{ref:n,...r}=t;return r}function xh(e,t){let{focusProps:n}=PT(e),{keyboardProps:r}=B5(e),i=Pn(n,r),s=U5(t),l=e.isDisabled?{}:s,c=S.useRef(e.autoFocus);S.useEffect(()=>{c.current&&t.current&&ku(t.current),c.current=!1},[t]);let d=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(d=void 0),{focusableProps:Pn({...i,tabIndex:d},l)}}function K5({children:e}){let t=S.useMemo(()=>({register:()=>{}}),[]);return We.createElement(Wx.Provider,{value:t},e)}function Sv(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,s=S.useRef({isFocusWithin:!1}),{addGlobalListener:l,removeAllGlobalListeners:c}=ux(),d=S.useCallback(g=>{g.currentTarget.contains(g.target)&&s.current.isFocusWithin&&!g.currentTarget.contains(g.relatedTarget)&&(s.current.isFocusWithin=!1,c(),n&&n(g),i&&i(!1))},[n,i,s,c]),h=bT(d),m=S.useCallback(g=>{if(!g.currentTarget.contains(g.target))return;const b=Dt(g.target),x=Or(b);if(!s.current.isFocusWithin&&x===En(g.nativeEvent)){r&&r(g),i&&i(!0),s.current.isFocusWithin=!0,h(g);let k=g.currentTarget;l(b,"focus",P=>{if(s.current.isFocusWithin&&!ii(k,P.target)){let _=new b.defaultView.FocusEvent("blur",{relatedTarget:P.target});yT(_,k);let T=Kx(_);d(T)}},{capture:!0})}},[r,i,h,l,d]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:m,onBlur:d}}}let vb=!1,u0=0;function W5(){vb=!0,setTimeout(()=>{vb=!1},50)}function QS(e){e.pointerType==="touch"&&W5()}function H5(){if(!(typeof document>"u"))return typeof PointerEvent<"u"&&document.addEventListener("pointerup",QS),u0++,()=>{u0--,!(u0>0)&&typeof PointerEvent<"u"&&document.removeEventListener("pointerup",QS)}}function Cu(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[s,l]=S.useState(!1),c=S.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;S.useEffect(H5,[]);let{addGlobalListener:d,removeAllGlobalListeners:h}=ux(),{hoverProps:m,triggerHoverEnd:g}=S.useMemo(()=>{let b=(P,_)=>{if(c.pointerType=_,i||_==="touch"||c.isHovered||!P.currentTarget.contains(P.target))return;c.isHovered=!0;let T=P.currentTarget;c.target=T,d(Dt(P.target),"pointerover",$=>{c.isHovered&&c.target&&!ii(c.target,$.target)&&x($,$.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:T,pointerType:_}),n&&n(!0),l(!0)},x=(P,_)=>{let T=c.target;c.pointerType="",c.target=null,!(_==="touch"||!c.isHovered||!T)&&(c.isHovered=!1,h(),r&&r({type:"hoverend",target:T,pointerType:_}),n&&n(!1),l(!1))},k={};return typeof PointerEvent<"u"&&(k.onPointerEnter=P=>{vb&&P.pointerType==="mouse"||b(P,P.pointerType)},k.onPointerLeave=P=>{!i&&P.currentTarget.contains(P.target)&&x(P,P.pointerType)}),{hoverProps:k,triggerHoverEnd:x}},[t,n,r,i,c,d,h]);return S.useEffect(()=>{i&&g({currentTarget:c.target},c.pointerType)},[i]),{hoverProps:m,isHovered:s}}function G5(e){let{ref:t,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:i}=e,s=S.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),l=jn(d=>{n&&JS(d,t)&&(i&&i(d),s.current.isPointerDown=!0)}),c=jn(d=>{n&&n(d)});S.useEffect(()=>{let d=s.current;if(r)return;const h=t.current,m=Dt(h);if(typeof PointerEvent<"u"){let g=b=>{d.isPointerDown&&JS(b,t)&&c(b),d.isPointerDown=!1};return m.addEventListener("pointerdown",l,!0),m.addEventListener("click",g,!0),()=>{m.removeEventListener("pointerdown",l,!0),m.removeEventListener("click",g,!0)}}},[t,r,l,c])}function JS(e,t){if(e.button>0)return!1;if(e.target){const n=e.target.ownerDocument;if(!n||!n.documentElement.contains(e.target)||e.target.closest("[data-react-aria-top-layer]"))return!1}return t.current?!e.composedPath().includes(t.current):!1}const ZS=We.createContext(null),yb="react-aria-focus-scope-restore";let Xt=null;function q5(e){let{children:t,contain:n,restoreFocus:r,autoFocus:i}=e,s=S.useRef(null),l=S.useRef(null),c=S.useRef([]),{parentNode:d}=S.useContext(ZS)||{},h=S.useMemo(()=>new xb({scopeRef:c}),[c]);sn(()=>{let b=d||Ln.root;if(Ln.getTreeNode(b.scopeRef)&&Xt&&!Qg(Xt,b.scopeRef)){let x=Ln.getTreeNode(Xt);x&&(b=x)}b.addChild(h),Ln.addNode(h)},[h,d]),sn(()=>{let b=Ln.getTreeNode(c);b&&(b.contain=!!n)},[n]),sn(()=>{var b;let x=(b=s.current)===null||b===void 0?void 0:b.nextSibling,k=[],P=_=>_.stopPropagation();for(;x&&x!==l.current;)k.push(x),x.addEventListener(yb,P),x=x.nextSibling;return c.current=k,()=>{for(let _ of k)_.removeEventListener(yb,P)}},[t]),Z5(c,r,n),X5(c,n),eF(c,r,n),J5(c,i),S.useEffect(()=>{const b=Or(Dt(c.current?c.current[0]:void 0));let x=null;if(to(b,c.current)){for(let k of Ln.traverse())k.scopeRef&&to(b,k.scopeRef.current)&&(x=k);x===Ln.getTreeNode(c)&&(Xt=x.scopeRef)}},[c]),sn(()=>()=>{var b,x,k;let P=(k=(x=Ln.getTreeNode(c))===null||x===void 0||(b=x.parent)===null||b===void 0?void 0:b.scopeRef)!==null&&k!==void 0?k:null;(c===Xt||Qg(c,Xt))&&(!P||Ln.getTreeNode(P))&&(Xt=P),Ln.removeTreeNode(c)},[c]);let m=S.useMemo(()=>Y5(c),[]),g=S.useMemo(()=>({focusManager:m,parentNode:h}),[h,m]);return We.createElement(ZS.Provider,{value:g},We.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:s}),t,We.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:l}))}function Y5(e){return{focusNext(t={}){let n=e.current,{from:r,tabbable:i,wrap:s,accept:l}=t;var c;let d=r||Or(Dt((c=n[0])!==null&&c!==void 0?c:void 0)),h=n[0].previousElementSibling,m=hu(n),g=Xs(m,{tabbable:i,accept:l},n);g.currentNode=to(d,n)?d:h;let b=g.nextNode();return!b&&s&&(g.currentNode=h,b=g.nextNode()),b&&Ys(b,!0),b},focusPrevious(t={}){let n=e.current,{from:r,tabbable:i,wrap:s,accept:l}=t;var c;let d=r||Or(Dt((c=n[0])!==null&&c!==void 0?c:void 0)),h=n[n.length-1].nextElementSibling,m=hu(n),g=Xs(m,{tabbable:i,accept:l},n);g.currentNode=to(d,n)?d:h;let b=g.previousNode();return!b&&s&&(g.currentNode=h,b=g.previousNode()),b&&Ys(b,!0),b},focusFirst(t={}){let n=e.current,{tabbable:r,accept:i}=t,s=hu(n),l=Xs(s,{tabbable:r,accept:i},n);l.currentNode=n[0].previousElementSibling;let c=l.nextNode();return c&&Ys(c,!0),c},focusLast(t={}){let n=e.current,{tabbable:r,accept:i}=t,s=hu(n),l=Xs(s,{tabbable:r,accept:i},n);l.currentNode=n[n.length-1].nextElementSibling;let c=l.previousNode();return c&&Ys(c,!0),c}}}function hu(e){return e[0].parentElement}function Ap(e){let t=Ln.getTreeNode(Xt);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function X5(e,t){let n=S.useRef(void 0),r=S.useRef(void 0);sn(()=>{let i=e.current;if(!t){r.current&&(cancelAnimationFrame(r.current),r.current=void 0);return}const s=Dt(i?i[0]:void 0);let l=h=>{if(h.key!=="Tab"||h.altKey||h.ctrlKey||h.metaKey||!Ap(e)||h.isComposing)return;let m=Or(s),g=e.current;if(!g||!to(m,g))return;let b=hu(g),x=Xs(b,{tabbable:!0},g);if(!m)return;x.currentNode=m;let k=h.shiftKey?x.previousNode():x.nextNode();k||(x.currentNode=h.shiftKey?g[g.length-1].nextElementSibling:g[0].previousElementSibling,k=h.shiftKey?x.previousNode():x.nextNode()),h.preventDefault(),k&&Ys(k,!0)},c=h=>{(!Xt||Qg(Xt,e))&&to(En(h),e.current)?(Xt=e,n.current=En(h)):Ap(e)&&!ql(En(h),e)?n.current?n.current.focus():Xt&&Xt.current&&bb(Xt.current):Ap(e)&&(n.current=En(h))},d=h=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{let m=oh(),g=(m==="virtual"||m===null)&&lx()&&kE(),b=Or(s);if(!g&&b&&Ap(e)&&!ql(b,e)){Xt=e;let k=En(h);if(k&&k.isConnected){var x;n.current=k,(x=n.current)===null||x===void 0||x.focus()}else Xt.current&&bb(Xt.current)}})};return s.addEventListener("keydown",l,!1),s.addEventListener("focusin",c,!1),i?.forEach(h=>h.addEventListener("focusin",c,!1)),i?.forEach(h=>h.addEventListener("focusout",d,!1)),()=>{s.removeEventListener("keydown",l,!1),s.removeEventListener("focusin",c,!1),i?.forEach(h=>h.removeEventListener("focusin",c,!1)),i?.forEach(h=>h.removeEventListener("focusout",d,!1))}},[e,t]),sn(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function TT(e){return ql(e)}function to(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}function ql(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of Ln.traverse(Ln.getTreeNode(t)))if(n&&to(e,n.current))return!0;return!1}function Q5(e){return ql(e,Xt)}function Qg(e,t){var n;let r=(n=Ln.getTreeNode(t))===null||n===void 0?void 0:n.parent;for(;r;){if(r.scopeRef===e)return!0;r=r.parent}return!1}function Ys(e,t=!1){if(e!=null&&!t)try{ku(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function _T(e,t=!0){let n=e[0].previousElementSibling,r=hu(e),i=Xs(r,{tabbable:t},e);i.currentNode=n;let s=i.nextNode();return t&&!s&&(r=hu(e),i=Xs(r,{tabbable:!1},e),i.currentNode=n,s=i.nextNode()),s}function bb(e,t=!0){Ys(_T(e,t))}function J5(e,t){const n=We.useRef(t);S.useEffect(()=>{if(n.current){Xt=e;const r=Dt(e.current?e.current[0]:void 0);!to(Or(r),Xt.current)&&e.current&&bb(e.current)}n.current=!1},[e])}function Z5(e,t,n){sn(()=>{if(t||n)return;let r=e.current;const i=Dt(r?r[0]:void 0);let s=l=>{let c=En(l);to(c,e.current)?Xt=e:TT(c)||(Xt=null)};return i.addEventListener("focusin",s,!1),r?.forEach(l=>l.addEventListener("focusin",s,!1)),()=>{i.removeEventListener("focusin",s,!1),r?.forEach(l=>l.removeEventListener("focusin",s,!1))}},[e,t,n])}function ek(e){let t=Ln.getTreeNode(Xt);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return t?.scopeRef===e}function eF(e,t,n){const r=S.useRef(typeof document<"u"?Or(Dt(e.current?e.current[0]:void 0)):null);sn(()=>{let i=e.current;const s=Dt(i?i[0]:void 0);if(!t||n)return;let l=()=>{(!Xt||Qg(Xt,e))&&to(Or(s),e.current)&&(Xt=e)};return s.addEventListener("focusin",l,!1),i?.forEach(c=>c.addEventListener("focusin",l,!1)),()=>{s.removeEventListener("focusin",l,!1),i?.forEach(c=>c.removeEventListener("focusin",l,!1))}},[e,n]),sn(()=>{const i=Dt(e.current?e.current[0]:void 0);if(!t)return;let s=l=>{if(l.key!=="Tab"||l.altKey||l.ctrlKey||l.metaKey||!Ap(e)||l.isComposing)return;let c=i.activeElement;if(!ql(c,e)||!ek(e))return;let d=Ln.getTreeNode(e);if(!d)return;let h=d.nodeToRestore,m=Xs(i.body,{tabbable:!0});m.currentNode=c;let g=l.shiftKey?m.previousNode():m.nextNode();if((!h||!h.isConnected||h===i.body)&&(h=void 0,d.nodeToRestore=void 0),(!g||!ql(g,e))&&h){m.currentNode=h;do g=l.shiftKey?m.previousNode():m.nextNode();while(ql(g,e));l.preventDefault(),l.stopPropagation(),g?Ys(g,!0):TT(h)?Ys(h,!0):c.blur()}};return n||i.addEventListener("keydown",s,!0),()=>{n||i.removeEventListener("keydown",s,!0)}},[e,t,n]),sn(()=>{const i=Dt(e.current?e.current[0]:void 0);if(!t)return;let s=Ln.getTreeNode(e);if(s){var l;return s.nodeToRestore=(l=r.current)!==null&&l!==void 0?l:void 0,()=>{let c=Ln.getTreeNode(e);if(!c)return;let d=c.nodeToRestore,h=Or(i);if(t&&d&&(h&&ql(h,e)||h===i.body&&ek(e))){let m=Ln.clone();requestAnimationFrame(()=>{if(i.activeElement===i.body){let g=m.getTreeNode(e);for(;g;){if(g.nodeToRestore&&g.nodeToRestore.isConnected){tk(g.nodeToRestore);return}g=g.parent}for(g=m.getTreeNode(e);g;){if(g.scopeRef&&g.scopeRef.current&&Ln.getTreeNode(g.scopeRef)){let b=_T(g.scopeRef.current,!0);tk(b);return}g=g.parent}}})}}}},[e,t])}function tk(e){e.dispatchEvent(new CustomEvent(yb,{bubbles:!0,cancelable:!0}))&&Ys(e)}function Xs(e,t,n){let r=t?.tabbable?wM:DE,i=e?.nodeType===Node.ELEMENT_NODE?e:null,s=Dt(i),l=JL(s,e||s,NodeFilter.SHOW_ELEMENT,{acceptNode(c){var d;return!(t==null||(d=t.from)===null||d===void 0)&&d.contains(c)?NodeFilter.FILTER_REJECT:r(c)&&vT(c)&&(!n||to(c,n))&&(!t?.accept||t.accept(c))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(l.currentNode=t.from),l}class qx{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let i=this.fastMap.get(n??null);if(!i)return;let s=new xb({scopeRef:t});i.addChild(s),s.parent=i,this.fastMap.set(t,s),r&&(s.nodeToRestore=r)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let n=this.fastMap.get(t);if(!n)return;let r=n.parent;for(let s of this.traverse())s!==n&&n.nodeToRestore&&s.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&to(s.nodeToRestore,n.scopeRef.current)&&(s.nodeToRestore=n.nodeToRestore);let i=n.children;r&&(r.removeChild(n),i.size>0&&i.forEach(s=>r&&r.addChild(s))),this.fastMap.delete(n.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let n of t.children)yield*this.traverse(n)}clone(){var t;let n=new qx;var r;for(let i of this.traverse())n.addTreeNode(i.scopeRef,(r=(t=i.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&r!==void 0?r:null,i.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new xb({scopeRef:null}),this.fastMap.set(null,this.root)}}class xb{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}let Ln=new qx;function Af(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=S.useRef({isFocused:!1,isFocusVisible:t||Gx()}),[s,l]=S.useState(!1),[c,d]=S.useState(()=>i.current.isFocused&&i.current.isFocusVisible),h=S.useCallback(()=>d(i.current.isFocused&&i.current.isFocusVisible),[]),m=S.useCallback(x=>{i.current.isFocused=x,l(x),h()},[h]);j5(x=>{i.current.isFocusVisible=x,h()},[],{isTextInput:n});let{focusProps:g}=PT({isDisabled:r,onFocusChange:m}),{focusWithinProps:b}=Sv({isDisabled:!r,onFocusWithinChange:m});return{isFocused:s,isFocusVisible:c,focusProps:r?b:g}}function tF(e){let t=iF(Dt(e));t!==e&&(t&&nF(t,e),e&&rF(e,t))}function nF(e,t){e.dispatchEvent(new FocusEvent("blur",{relatedTarget:t})),e.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:t}))}function rF(e,t){e.dispatchEvent(new FocusEvent("focus",{relatedTarget:t})),e.dispatchEvent(new FocusEvent("focusin",{bubbles:!0,relatedTarget:t}))}function iF(e){let t=Or(e),n=t?.getAttribute("aria-activedescendant");return n&&e.getElementById(n)||t}const c0=typeof document<"u"&&window.visualViewport,oF=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let gg=0,f0;function sF(e={}){let{isDisabled:t}=e;sn(()=>{if(!t)return gg++,gg===1&&(gv()?f0=aF():f0=lF()),()=>{gg--,gg===0&&f0()}},[t])}function lF(){let e=window.innerWidth-document.documentElement.clientWidth;return Pf(e>0&&("scrollbarGutter"in document.documentElement.style?mu(document.documentElement,"scrollbarGutter","stable"):mu(document.documentElement,"paddingRight",`${e}px`)),mu(document.documentElement,"overflow","hidden"))}function aF(){let e,t,n=h=>{e=IE(h.target,!0),!(e===document.documentElement&&e===document.body)&&e instanceof HTMLElement&&window.getComputedStyle(e).overscrollBehavior==="auto"&&(t=mu(e,"overscrollBehavior","contain"))},r=h=>{if(!e||e===document.documentElement||e===document.body){h.preventDefault();return}e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&h.preventDefault()},i=()=>{t&&t()},s=h=>{let m=h.target;uF(m)&&(c(),m.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{m.style.transform="",c0&&(c0.height{nk(m)}):c0.addEventListener("resize",()=>nk(m),{once:!0}))}))},l=null,c=()=>{if(l)return;let h=()=>{window.scrollTo(0,0)},m=window.pageXOffset,g=window.pageYOffset;l=Pf(gp(window,"scroll",h),mu(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),mu(document.documentElement,"overflow","hidden"),mu(document.body,"marginTop",`-${g}px`),()=>{window.scrollTo(m,g)}),window.scrollTo(0,0)},d=Pf(gp(document,"touchstart",n,{passive:!1,capture:!0}),gp(document,"touchmove",r,{passive:!1,capture:!0}),gp(document,"touchend",i,{passive:!1,capture:!0}),gp(document,"focus",s,!0));return()=>{t?.(),l?.(),d()}}function mu(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function gp(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function nk(e){let t=document.scrollingElement||document.documentElement,n=e;for(;n&&n!==t;){let r=IE(n);if(r!==document.documentElement&&r!==document.body&&r!==n){let i=r.getBoundingClientRect().top,s=n.getBoundingClientRect().top;s>i+n.clientHeight&&(r.scrollTop+=s-i)}n=r.parentElement}}function uF(e){return e instanceof HTMLInputElement&&!oF.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}const cF=S.createContext({});function IT(){var e;return(e=S.useContext(cF))!==null&&e!==void 0?e:{}}const wb=We.createContext(null);function fF(e){let{children:t}=e,n=S.useContext(wb),[r,i]=S.useState(0),s=S.useMemo(()=>({parent:n,modalCount:r,addModal(){i(l=>l+1),n&&n.addModal()},removeModal(){i(l=>l-1),n&&n.removeModal()}}),[n,r]);return We.createElement(wb.Provider,{value:s},t)}function dF(){let e=S.useContext(wb);return{modalProviderProps:{"aria-hidden":e&&e.modalCount>0?!0:void 0}}}function pF(e){let{modalProviderProps:t}=dF();return We.createElement("div",{"data-overlay-container":!0,...e,...t})}function $T(e){return We.createElement(fF,null,We.createElement(pF,e))}function rk(e){let t=ph(),{portalContainer:n=t?null:document.body,...r}=e,{getContainer:i}=IT();if(!e.portalContainer&&i&&(n=i()),We.useEffect(()=>{if(n?.closest("[data-overlay-container]"))throw new Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.")},[n]),!n)return null;let s=We.createElement($T,r);return ME.createPortal(s,n)}var AT={};AT={dismiss:"تجاهل"};var RT={};RT={dismiss:"Отхвърляне"};var LT={};LT={dismiss:"Odstranit"};var MT={};MT={dismiss:"Luk"};var DT={};DT={dismiss:"Schließen"};var NT={};NT={dismiss:"Απόρριψη"};var FT={};FT={dismiss:"Dismiss"};var OT={};OT={dismiss:"Descartar"};var zT={};zT={dismiss:"Lõpeta"};var jT={};jT={dismiss:"Hylkää"};var BT={};BT={dismiss:"Rejeter"};var VT={};VT={dismiss:"התעלם"};var UT={};UT={dismiss:"Odbaci"};var KT={};KT={dismiss:"Elutasítás"};var WT={};WT={dismiss:"Ignora"};var HT={};HT={dismiss:"閉じる"};var GT={};GT={dismiss:"무시"};var qT={};qT={dismiss:"Atmesti"};var YT={};YT={dismiss:"Nerādīt"};var XT={};XT={dismiss:"Lukk"};var QT={};QT={dismiss:"Negeren"};var JT={};JT={dismiss:"Zignoruj"};var ZT={};ZT={dismiss:"Descartar"};var e_={};e_={dismiss:"Dispensar"};var t_={};t_={dismiss:"Revocare"};var n_={};n_={dismiss:"Пропустить"};var r_={};r_={dismiss:"Zrušiť"};var i_={};i_={dismiss:"Opusti"};var o_={};o_={dismiss:"Odbaci"};var s_={};s_={dismiss:"Avvisa"};var l_={};l_={dismiss:"Kapat"};var a_={};a_={dismiss:"Скасувати"};var u_={};u_={dismiss:"取消"};var c_={};c_={dismiss:"關閉"};var f_={};f_={"ar-AE":AT,"bg-BG":RT,"cs-CZ":LT,"da-DK":MT,"de-DE":DT,"el-GR":NT,"en-US":FT,"es-ES":OT,"et-EE":zT,"fi-FI":jT,"fr-FR":BT,"he-IL":VT,"hr-HR":UT,"hu-HU":KT,"it-IT":WT,"ja-JP":HT,"ko-KR":GT,"lt-LT":qT,"lv-LV":YT,"nb-NO":XT,"nl-NL":QT,"pl-PL":JT,"pt-BR":ZT,"pt-PT":e_,"ro-RO":t_,"ru-RU":n_,"sk-SK":r_,"sl-SI":i_,"sr-SP":o_,"sv-SE":s_,"tr-TR":l_,"uk-UA":a_,"zh-CN":u_,"zh-TW":c_};const ik={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function hF(e={}){let{style:t,isFocusable:n}=e,[r,i]=S.useState(!1),{focusWithinProps:s}=Sv({isDisabled:!n,onFocusWithinChange:c=>i(c)}),l=S.useMemo(()=>r?t:t?{...ik,...t}:ik,[r]);return{visuallyHiddenProps:{...s,style:l}}}function mF(e){let{children:t,elementType:n="div",isFocusable:r,style:i,...s}=e,{visuallyHiddenProps:l}=hF(e);return We.createElement(n,Pn(s,l),t)}function gF(e){return e&&e.__esModule?e.default:e}function ok(e){let{onDismiss:t,...n}=e,r=BL(gF(f_),"@react-aria/overlays"),i=TE(n,r.format("dismiss")),s=()=>{t&&t()};return We.createElement(mF,null,We.createElement("button",{...i,tabIndex:-1,onClick:s,style:{width:1,height:1}}))}let vp=new WeakMap,qi=[];function vF(e,t=document.body){let n=new Set(e),r=new Set,i=d=>{for(let b of d.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))n.add(b);let h=b=>{if(n.has(b)||b.parentElement&&r.has(b.parentElement)&&b.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let x of n)if(b.contains(x))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},m=document.createTreeWalker(d,NodeFilter.SHOW_ELEMENT,{acceptNode:h}),g=h(d);if(g===NodeFilter.FILTER_ACCEPT&&s(d),g!==NodeFilter.FILTER_REJECT){let b=m.nextNode();for(;b!=null;)s(b),b=m.nextNode()}},s=d=>{var h;let m=(h=vp.get(d))!==null&&h!==void 0?h:0;d.getAttribute("aria-hidden")==="true"&&m===0||(m===0&&d.setAttribute("aria-hidden","true"),r.add(d),vp.set(d,m+1))};qi.length&&qi[qi.length-1].disconnect(),i(t);let l=new MutationObserver(d=>{for(let h of d)if(!(h.type!=="childList"||h.addedNodes.length===0)&&![...n,...r].some(m=>m.contains(h.target))){for(let m of h.removedNodes)m instanceof Element&&(n.delete(m),r.delete(m));for(let m of h.addedNodes)(m instanceof HTMLElement||m instanceof SVGElement)&&(m.dataset.liveAnnouncer==="true"||m.dataset.reactAriaTopLayer==="true")?n.add(m):m instanceof Element&&i(m)}});l.observe(t,{childList:!0,subtree:!0});let c={visibleNodes:n,hiddenNodes:r,observe(){l.observe(t,{childList:!0,subtree:!0})},disconnect(){l.disconnect()}};return qi.push(c),()=>{l.disconnect();for(let d of r){let h=vp.get(d);h!=null&&(h===1?(d.removeAttribute("aria-hidden"),vp.delete(d)):vp.set(d,h-1))}c===qi[qi.length-1]?(qi.pop(),qi.length&&qi[qi.length-1].observe()):qi.splice(qi.indexOf(c),1)}}const d_=We.createContext(null);function yF(e){let t=ph(),{portalContainer:n=t?null:document.body,isExiting:r}=e,[i,s]=S.useState(!1),l=S.useMemo(()=>({contain:i,setContain:s}),[i,s]),{getContainer:c}=IT();if(!e.portalContainer&&c&&(n=c()),!n)return null;let d=e.children;return e.disableFocusManagement||(d=We.createElement(q5,{restoreFocus:!0,contain:(e.shouldContainFocus||i)&&!r},d)),d=We.createElement(d_.Provider,{value:l},We.createElement(K5,null,d)),ME.createPortal(d,n)}function p_(){let e=S.useContext(d_),t=e?.setContain;sn(()=>{t?.(!0)},[t])}var bF=({children:e,navigate:t,disableAnimation:n,useHref:r,disableRipple:i=!1,skipFramerMotionAnimations:s=n,reducedMotion:l="never",validationBehavior:c,locale:d="en-US",labelPlacement:h,defaultDates:m,createCalendar:g,spinnerVariant:b,...x})=>{let k=e;t&&(k=D.jsx(cM,{navigate:t,useHref:r,children:k}));const P=S.useMemo(()=>(n&&s&&(fs.skipAnimations=!0),{createCalendar:g,defaultDates:m,disableAnimation:n,disableRipple:i,validationBehavior:c,labelPlacement:h,spinnerVariant:b}),[g,m?.maxDate,m?.minDate,n,i,c,h,b]);return D.jsx(wL,{value:P,children:D.jsx(LL,{locale:d,children:D.jsx(D3,{reducedMotion:l,children:D.jsx($T,{...x,children:k})})})})};function OG(e){const t=si(),n=t?.labelPlacement;return S.useMemo(()=>{var r,i;const s=(i=(r=e.labelPlacement)!=null?r:n)!=null?i:"inside";return s==="inside"&&!e.label?"outside":s},[e.labelPlacement,n,e.label])}function xF(e){const t=si(),n=t?.labelPlacement;return S.useMemo(()=>{var r,i;const s=(i=(r=e.labelPlacement)!=null?r:n)!=null?i:"inside";return s==="inside"&&!e.label?"outside":s},[e.labelPlacement,n,e.label])}function li(e){return S.forwardRef(e)}var na=(e,t,n=!0)=>{if(!t)return[e,{}];const r=t.reduce((i,s)=>s in e?{...i,[s]:e[s]}:i,{});return n?[Object.keys(e).filter(s=>!t.includes(s)).reduce((s,l)=>({...s,[l]:e[l]}),{}),r]:[e,r]},wF={default:"bg-default text-default-foreground",primary:"bg-primary text-primary-foreground",secondary:"bg-secondary text-secondary-foreground",success:"bg-success text-success-foreground",warning:"bg-warning text-warning-foreground",danger:"bg-danger text-danger-foreground",foreground:"bg-foreground text-background"},SF={default:"shadow-lg shadow-default/50 bg-default text-default-foreground",primary:"shadow-lg shadow-primary/40 bg-primary text-primary-foreground",secondary:"shadow-lg shadow-secondary/40 bg-secondary text-secondary-foreground",success:"shadow-lg shadow-success/40 bg-success text-success-foreground",warning:"shadow-lg shadow-warning/40 bg-warning text-warning-foreground",danger:"shadow-lg shadow-danger/40 bg-danger text-danger-foreground"},kF={default:"bg-transparent border-default text-foreground",primary:"bg-transparent border-primary text-primary",secondary:"bg-transparent border-secondary text-secondary",success:"bg-transparent border-success text-success",warning:"bg-transparent border-warning text-warning",danger:"bg-transparent border-danger text-danger"},CF={default:"bg-default/40 text-default-700",primary:"bg-primary/20 text-primary-600",secondary:"bg-secondary/20 text-secondary-600",success:"bg-success/20 text-success-700 dark:text-success",warning:"bg-warning/20 text-warning-700 dark:text-warning",danger:"bg-danger/20 text-danger-600 dark:text-danger-500"},EF={default:"border-default bg-default-100 text-default-foreground",primary:"border-default bg-default-100 text-primary",secondary:"border-default bg-default-100 text-secondary",success:"border-default bg-default-100 text-success",warning:"border-default bg-default-100 text-warning",danger:"border-default bg-default-100 text-danger"},PF={default:"bg-transparent text-default-foreground",primary:"bg-transparent text-primary",secondary:"bg-transparent text-secondary",success:"bg-transparent text-success",warning:"bg-transparent text-warning",danger:"bg-transparent text-danger"},TF={default:"border-default text-default-foreground",primary:"border-primary text-primary",secondary:"border-secondary text-secondary",success:"border-success text-success",warning:"border-warning text-warning",danger:"border-danger text-danger"},et={solid:wF,shadow:SF,bordered:kF,flat:CF,faded:EF,light:PF,ghost:TF},_F={".spinner-bar-animation":{"animation-delay":"calc(-1.2s + (0.1s * var(--bar-index)))",transform:"rotate(calc(30deg * var(--bar-index)))translate(140%)"},".spinner-dot-animation":{"animation-delay":"calc(250ms * var(--dot-index))"},".spinner-dot-blink-animation":{"animation-delay":"calc(200ms * var(--dot-index))"}},IF={".leading-inherit":{"line-height":"inherit"},".bg-img-inherit":{"background-image":"inherit"},".bg-clip-inherit":{"background-clip":"inherit"},".text-fill-inherit":{"-webkit-text-fill-color":"inherit"},".tap-highlight-transparent":{"-webkit-tap-highlight-color":"transparent"},".input-search-cancel-button-none":{"&::-webkit-search-cancel-button":{"-webkit-appearance":"none"}}},$F={".scrollbar-hide":{"-ms-overflow-style":"none","scrollbar-width":"none","&::-webkit-scrollbar":{display:"none"}},".scrollbar-default":{"-ms-overflow-style":"auto","scrollbar-width":"auto","&::-webkit-scrollbar":{display:"block"}}},AF={".text-tiny":{"font-size":"var(--heroui-font-size-tiny)","line-height":"var(--heroui-line-height-tiny)"},".text-small":{"font-size":"var(--heroui-font-size-small)","line-height":"var(--heroui-line-height-small)"},".text-medium":{"font-size":"var(--heroui-font-size-medium)","line-height":"var(--heroui-line-height-medium)"},".text-large":{"font-size":"var(--heroui-font-size-large)","line-height":"var(--heroui-line-height-large)"}},rs="250ms",RF={".transition-background":{"transition-property":"background","transition-timing-function":"ease","transition-duration":rs},".transition-colors-opacity":{"transition-property":"color, background-color, border-color, text-decoration-color, fill, stroke, opacity","transition-timing-function":"ease","transition-duration":rs},".transition-width":{"transition-property":"width","transition-timing-function":"ease","transition-duration":rs},".transition-height":{"transition-property":"height","transition-timing-function":"ease","transition-duration":rs},".transition-size":{"transition-property":"width, height","transition-timing-function":"ease","transition-duration":rs},".transition-left":{"transition-property":"left","transition-timing-function":"ease","transition-duration":rs},".transition-transform-opacity":{"transition-property":"transform, scale, opacity rotate","transition-timing-function":"ease","transition-duration":rs},".transition-transform-background":{"transition-property":"transform, scale, background","transition-timing-function":"ease","transition-duration":rs},".transition-transform-colors":{"transition-property":"transform, scale, color, background, background-color, border-color, text-decoration-color, fill, stroke","transition-timing-function":"ease","transition-duration":rs},".transition-transform-colors-opacity":{"transition-property":"transform, scale, color, background, background-color, border-color, text-decoration-color, fill, stroke, opacity","transition-timing-function":"ease","transition-duration":rs}},LF={...IF,...RF,...$F,...AF,..._F},vg=["small","medium","large"],Sb={theme:{spacing:["divider"],radius:vg},classGroups:{shadow:[{shadow:vg}],opacity:[{opacity:["disabled"]}],"font-size":[{text:["tiny",...vg]}],"border-w":[{border:vg}],"bg-image":["bg-stripe-gradient-default","bg-stripe-gradient-primary","bg-stripe-gradient-secondary","bg-stripe-gradient-success","bg-stripe-gradient-warning","bg-stripe-gradient-danger"],transition:Object.keys(LF).filter(e=>e.includes(".transition")).map(e=>e.replace(".",""))}},sk=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ni=e=>!e||typeof e!="object"||Object.keys(e).length===0,MF=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function h_(e,t){e.forEach(function(n){Array.isArray(n)?h_(n,t):t.push(n)})}function m_(e){let t=[];return h_(e,t),t}var g_=(...e)=>m_(e).filter(Boolean),v_=(e,t)=>{let n={},r=Object.keys(e),i=Object.keys(t);for(let s of r)if(i.includes(s)){let l=e[s],c=t[s];Array.isArray(l)||Array.isArray(c)?n[s]=g_(c,l):typeof l=="object"&&typeof c=="object"?n[s]=v_(l,c):n[s]=c+" "+l}else n[s]=e[s];for(let s of i)r.includes(s)||(n[s]=t[s]);return n},lk=e=>!e||typeof e!="string"?e:e.replace(/\s+/g," ").trim();const Yx="-",DF=e=>{const t=FF(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{const c=l.split(Yx);return c[0]===""&&c.length!==1&&c.shift(),y_(c,t)||NF(l)},getConflictingClassGroupIds:(l,c)=>{const d=n[l]||[];return c&&r[l]?[...d,...r[l]]:d}}},y_=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?y_(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(Yx);return t.validators.find(({validator:l})=>l(s))?.classGroupId},ak=/^\[(.+)\]$/,NF=e=>{if(ak.test(e)){const t=ak.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},FF=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const i in n)kb(n[i],r,i,t);return r},kb=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:uk(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(OF(i)){kb(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,l])=>{kb(l,uk(t,s),n,r)})})},uk=(e,t)=>{let n=e;return t.split(Yx).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},OF=e=>e.isThemeGetter,zF=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(s,l)=>{n.set(s,l),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let l=n.get(s);if(l!==void 0)return l;if((l=r.get(s))!==void 0)return i(s,l),l},set(s,l){n.has(s)?n.set(s,l):i(s,l)}}},Cb="!",Eb=":",jF=Eb.length,BF=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const s=[];let l=0,c=0,d=0,h;for(let k=0;kd?h-d:void 0;return{modifiers:s,hasImportantModifier:b,baseClassName:g,maybePostfixModifierPosition:x}};if(t){const i=t+Eb,s=r;r=l=>l.startsWith(i)?s(l.substring(i.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:l,maybePostfixModifierPosition:void 0}}if(n){const i=r;r=s=>n({className:s,parseClassName:i})}return r},VF=e=>e.endsWith(Cb)?e.substring(0,e.length-1):e.startsWith(Cb)?e.substring(1):e,UF=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const i=[];let s=[];return r.forEach(l=>{l[0]==="["||t[l]?(i.push(...s.sort(),l),s=[]):s.push(l)}),i.push(...s.sort()),i}},KF=e=>({cache:zF(e.cacheSize),parseClassName:BF(e),sortModifiers:UF(e),...DF(e)}),WF=/\s+/,HF=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:s}=t,l=[],c=e.trim().split(WF);let d="";for(let h=c.length-1;h>=0;h-=1){const m=c[h],{isExternal:g,modifiers:b,hasImportantModifier:x,baseClassName:k,maybePostfixModifierPosition:P}=n(m);if(g){d=m+(d.length>0?" "+d:d);continue}let _=!!P,T=r(_?k.substring(0,P):k);if(!T){if(!_){d=m+(d.length>0?" "+d:d);continue}if(T=r(k),!T){d=m+(d.length>0?" "+d:d);continue}_=!1}const $=s(b).join(":"),L=x?$+Cb:$,z=L+T;if(l.includes(z))continue;l.push(z);const K=i(T,_);for(let M=0;M0?" "+d:d)}return d};function GF(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rg(m),e());return n=KF(h),r=n.cache.get,i=n.cache.set,s=c,c(d)}function c(d){const h=r(d);if(h)return h;const m=HF(d,n);return i(d,m),m}return function(){return s(GF.apply(null,arguments))}}const Jn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},x_=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,w_=/^\((?:(\w[\w-]*):)?(.+)\)$/i,qF=/^\d+\/\d+$/,YF=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,XF=/\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$/,QF=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,JF=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ZF=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,of=e=>qF.test(e),yt=e=>!!e&&!Number.isNaN(Number(e)),ou=e=>!!e&&Number.isInteger(Number(e)),ck=e=>e.endsWith("%")&&yt(e.slice(0,-1)),Kl=e=>YF.test(e),eO=()=>!0,tO=e=>XF.test(e)&&!QF.test(e),Xx=()=>!1,nO=e=>JF.test(e),rO=e=>ZF.test(e),iO=e=>!ze(e)&&!je(e),oO=e=>Of(e,C_,Xx),ze=e=>x_.test(e),su=e=>Of(e,E_,tO),d0=e=>Of(e,gO,yt),sO=e=>Of(e,S_,Xx),lO=e=>Of(e,k_,rO),aO=e=>Of(e,Xx,nO),je=e=>w_.test(e),yg=e=>zf(e,E_),uO=e=>zf(e,vO),cO=e=>zf(e,S_),fO=e=>zf(e,C_),dO=e=>zf(e,k_),pO=e=>zf(e,yO,!0),Of=(e,t,n)=>{const r=x_.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},zf=(e,t,n=!1)=>{const r=w_.exec(e);return r?r[1]?t(r[1]):n:!1},S_=e=>e==="position",hO=new Set(["image","url"]),k_=e=>hO.has(e),mO=new Set(["length","size","percentage"]),C_=e=>mO.has(e),E_=e=>e==="length",gO=e=>e==="number",vO=e=>e==="family-name",yO=e=>e==="shadow",Tb=()=>{const e=Jn("color"),t=Jn("font"),n=Jn("text"),r=Jn("font-weight"),i=Jn("tracking"),s=Jn("leading"),l=Jn("breakpoint"),c=Jn("container"),d=Jn("spacing"),h=Jn("radius"),m=Jn("shadow"),g=Jn("inset-shadow"),b=Jn("drop-shadow"),x=Jn("blur"),k=Jn("perspective"),P=Jn("aspect"),_=Jn("ease"),T=Jn("animate"),$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],z=()=>["auto","hidden","clip","visible","scroll"],K=()=>["auto","contain","none"],M=()=>[je,ze,d],J=()=>[of,"full","auto",...M()],re=()=>[ou,"none","subgrid",je,ze],ae=()=>["auto",{span:["full",ou,je,ze]},je,ze],j=()=>[ou,"auto",je,ze],B=()=>["auto","min","max","fr",je,ze],Y=()=>["start","end","center","between","around","evenly","stretch","baseline"],te=()=>["start","end","center","stretch"],G=()=>["auto",...M()],ce=()=>[of,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],Z=()=>[e,je,ze],q=()=>[ck,su],V=()=>["","none","full",h,je,ze],se=()=>["",yt,yg,su],R=()=>["solid","dashed","dotted","double"],U=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ie=()=>["","none",x,je,ze],O=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",je,ze],me=()=>["none",yt,je,ze],Ce=()=>["none",yt,je,ze],ye=()=>[yt,je,ze],Fe=()=>[of,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Kl],breakpoint:[Kl],color:[eO],container:[Kl],"drop-shadow":[Kl],ease:["in","out","in-out"],font:[iO],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Kl],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Kl],shadow:[Kl],spacing:["px",yt],text:[Kl],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",of,ze,je,P]}],container:["container"],columns:[{columns:[yt,ze,je,c]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"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:[...L(),ze,je]}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:K()}],"overscroll-x":[{"overscroll-x":K()}],"overscroll-y":[{"overscroll-y":K()}],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:[ou,"auto",je,ze]}],basis:[{basis:[of,"full","auto",c,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[yt,of,"auto","initial","none",ze]}],grow:[{grow:["",yt,je,ze]}],shrink:[{shrink:["",yt,je,ze]}],order:[{order:[ou,"first","last","none",je,ze]}],"grid-cols":[{"grid-cols":re()}],"col-start-end":[{col:ae()}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":re()}],"row-start-end":[{row:ae()}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":B()}],"auto-rows":[{"auto-rows":B()}],gap:[{gap:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"justify-content":[{justify:[...Y(),"normal"]}],"justify-items":[{"justify-items":[...te(),"normal"]}],"justify-self":[{"justify-self":["auto",...te()]}],"align-content":[{content:["normal",...Y()]}],"align-items":[{items:[...te(),"baseline"]}],"align-self":[{self:["auto",...te(),"baseline"]}],"place-content":[{"place-content":Y()}],"place-items":[{"place-items":[...te(),"baseline"]}],"place-self":[{"place-self":["auto",...te()]}],p:[{p:M()}],px:[{px:M()}],py:[{py:M()}],ps:[{ps:M()}],pe:[{pe:M()}],pt:[{pt:M()}],pr:[{pr:M()}],pb:[{pb:M()}],pl:[{pl:M()}],m:[{m:G()}],mx:[{mx:G()}],my:[{my:G()}],ms:[{ms:G()}],me:[{me:G()}],mt:[{mt:G()}],mr:[{mr:G()}],mb:[{mb:G()}],ml:[{ml:G()}],"space-x":[{"space-x":M()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":M()}],"space-y-reverse":["space-y-reverse"],size:[{size:ce()}],w:[{w:[c,"screen",...ce()]}],"min-w":[{"min-w":[c,"screen","none",...ce()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[l]},...ce()]}],h:[{h:["screen",...ce()]}],"min-h":[{"min-h":["screen","none",...ce()]}],"max-h":[{"max-h":["screen",...ce()]}],"font-size":[{text:["base",n,yg,su]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,je,d0]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ck,ze]}],"font-family":[{font:[uO,ze,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:[i,je,ze]}],"line-clamp":[{"line-clamp":[yt,"none",je,d0]}],leading:[{leading:[s,...M()]}],"list-image":[{"list-image":["none",je,ze]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",je,ze]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Z()}],"text-color":[{text:Z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...R(),"wavy"]}],"text-decoration-thickness":[{decoration:[yt,"from-font","auto",je,su]}],"text-decoration-color":[{decoration:Z()}],"underline-offset":[{"underline-offset":[yt,"auto",je,ze]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",je,ze]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",je,ze]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...L(),cO,sO]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",fO,oO]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ou,je,ze],radial:["",je,ze],conic:[ou,je,ze]},dO,lO]}],"bg-color":[{bg:Z()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:Z()}],"gradient-via":[{via:Z()}],"gradient-to":[{to:Z()}],rounded:[{rounded:V()}],"rounded-s":[{"rounded-s":V()}],"rounded-e":[{"rounded-e":V()}],"rounded-t":[{"rounded-t":V()}],"rounded-r":[{"rounded-r":V()}],"rounded-b":[{"rounded-b":V()}],"rounded-l":[{"rounded-l":V()}],"rounded-ss":[{"rounded-ss":V()}],"rounded-se":[{"rounded-se":V()}],"rounded-ee":[{"rounded-ee":V()}],"rounded-es":[{"rounded-es":V()}],"rounded-tl":[{"rounded-tl":V()}],"rounded-tr":[{"rounded-tr":V()}],"rounded-br":[{"rounded-br":V()}],"rounded-bl":[{"rounded-bl":V()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...R(),"hidden","none"]}],"divide-style":[{divide:[...R(),"hidden","none"]}],"border-color":[{border:Z()}],"border-color-x":[{"border-x":Z()}],"border-color-y":[{"border-y":Z()}],"border-color-s":[{"border-s":Z()}],"border-color-e":[{"border-e":Z()}],"border-color-t":[{"border-t":Z()}],"border-color-r":[{"border-r":Z()}],"border-color-b":[{"border-b":Z()}],"border-color-l":[{"border-l":Z()}],"divide-color":[{divide:Z()}],"outline-style":[{outline:[...R(),"none","hidden"]}],"outline-offset":[{"outline-offset":[yt,je,ze]}],"outline-w":[{outline:["",yt,yg,su]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",m,pO,aO]}],"shadow-color":[{shadow:Z()}],"inset-shadow":[{"inset-shadow":["none",je,ze,g]}],"inset-shadow-color":[{"inset-shadow":Z()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Z()}],"ring-offset-w":[{"ring-offset":[yt,su]}],"ring-offset-color":[{"ring-offset":Z()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":Z()}],opacity:[{opacity:[yt,je,ze]}],"mix-blend":[{"mix-blend":[...U(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":U()}],filter:[{filter:["","none",je,ze]}],blur:[{blur:ie()}],brightness:[{brightness:[yt,je,ze]}],contrast:[{contrast:[yt,je,ze]}],"drop-shadow":[{"drop-shadow":["","none",b,je,ze]}],grayscale:[{grayscale:["",yt,je,ze]}],"hue-rotate":[{"hue-rotate":[yt,je,ze]}],invert:[{invert:["",yt,je,ze]}],saturate:[{saturate:[yt,je,ze]}],sepia:[{sepia:["",yt,je,ze]}],"backdrop-filter":[{"backdrop-filter":["","none",je,ze]}],"backdrop-blur":[{"backdrop-blur":ie()}],"backdrop-brightness":[{"backdrop-brightness":[yt,je,ze]}],"backdrop-contrast":[{"backdrop-contrast":[yt,je,ze]}],"backdrop-grayscale":[{"backdrop-grayscale":["",yt,je,ze]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[yt,je,ze]}],"backdrop-invert":[{"backdrop-invert":["",yt,je,ze]}],"backdrop-opacity":[{"backdrop-opacity":[yt,je,ze]}],"backdrop-saturate":[{"backdrop-saturate":[yt,je,ze]}],"backdrop-sepia":[{"backdrop-sepia":["",yt,je,ze]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":M()}],"border-spacing-x":[{"border-spacing-x":M()}],"border-spacing-y":[{"border-spacing-y":M()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",je,ze]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[yt,"initial",je,ze]}],ease:[{ease:["linear","initial",_,je,ze]}],delay:[{delay:[yt,je,ze]}],animate:[{animate:["none",T,je,ze]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,je,ze]}],"perspective-origin":[{"perspective-origin":O()}],rotate:[{rotate:me()}],"rotate-x":[{"rotate-x":me()}],"rotate-y":[{"rotate-y":me()}],"rotate-z":[{"rotate-z":me()}],scale:[{scale:Ce()}],"scale-x":[{"scale-x":Ce()}],"scale-y":[{"scale-y":Ce()}],"scale-z":[{"scale-z":Ce()}],"scale-3d":["scale-3d"],skew:[{skew:ye()}],"skew-x":[{"skew-x":ye()}],"skew-y":[{"skew-y":ye()}],transform:[{transform:[je,ze,"","none","gpu","cpu"]}],"transform-origin":[{origin:O()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Fe()}],"translate-x":[{"translate-x":Fe()}],"translate-y":[{"translate-y":Fe()}],"translate-z":[{"translate-z":Fe()}],"translate-none":["translate-none"],accent:[{accent:Z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Z()}],"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",je,ze]}],"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":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"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",je,ze]}],fill:[{fill:["none",...Z()]}],"stroke-w":[{stroke:[yt,yg,su,d0]}],stroke:[{stroke:["none",...Z()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],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:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}},bO=(e,{cacheSize:t,prefix:n,experimentalParseClassName:r,extend:i={},override:s={}})=>(Rp(e,"cacheSize",t),Rp(e,"prefix",n),Rp(e,"experimentalParseClassName",r),bg(e.theme,s.theme),bg(e.classGroups,s.classGroups),bg(e.conflictingClassGroups,s.conflictingClassGroups),bg(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),Rp(e,"orderSensitiveModifiers",s.orderSensitiveModifiers),xg(e.theme,i.theme),xg(e.classGroups,i.classGroups),xg(e.conflictingClassGroups,i.conflictingClassGroups),xg(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),P_(e,i,"orderSensitiveModifiers"),e),Rp=(e,t,n)=>{n!==void 0&&(e[t]=n)},bg=(e,t)=>{if(t)for(const n in t)Rp(e,n,t[n])},xg=(e,t)=>{if(t)for(const n in t)P_(e,t,n)},P_=(e,t,n)=>{const r=t[n];r!==void 0&&(e[n]=e[n]?e[n].concat(r):r)},T_=(e,...t)=>typeof e=="function"?Pb(Tb,e,...t):Pb(()=>bO(Tb(),e),...t),xO=Pb(Tb);var wO={twMerge:!0,twMergeConfig:{},responsiveVariants:!1},__=e=>e||void 0,sh=(...e)=>__(m_(e).filter(Boolean).join(" ")),p0=null,qs={},_b=!1,yp=(...e)=>t=>t.twMerge?((!p0||_b)&&(_b=!1,p0=ni(qs)?xO:T_({...qs,extend:{theme:qs.theme,classGroups:qs.classGroups,conflictingClassGroupModifiers:qs.conflictingClassGroupModifiers,conflictingClassGroups:qs.conflictingClassGroups,...qs.extend}})),__(p0(sh(e)))):sh(e),fk=(e,t)=>{for(let n in t)e.hasOwnProperty(n)?e[n]=sh(e[n],t[n]):e[n]=t[n];return e},SO=(e,t)=>{let{extend:n=null,slots:r={},variants:i={},compoundVariants:s=[],compoundSlots:l=[],defaultVariants:c={}}=e,d={...wO,...t},h=n!=null&&n.base?sh(n.base,e?.base):e?.base,m=n!=null&&n.variants&&!ni(n.variants)?v_(i,n.variants):i,g=n!=null&&n.defaultVariants&&!ni(n.defaultVariants)?{...n.defaultVariants,...c}:c;!ni(d.twMergeConfig)&&!MF(d.twMergeConfig,qs)&&(_b=!0,qs=d.twMergeConfig);let b=ni(n?.slots),x=ni(r)?{}:{base:sh(e?.base,b&&n?.base),...r},k=b?x:fk({...n?.slots},ni(x)?{base:e?.base}:x),P=ni(n?.compoundVariants)?s:g_(n?.compoundVariants,s),_=$=>{if(ni(m)&&ni(r)&&b)return yp(h,$?.class,$?.className)(d);if(P&&!Array.isArray(P))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof P}`);if(l&&!Array.isArray(l))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof l}`);let L=(Y,te,G=[],ce)=>{let Z=G;if(typeof te=="string")Z=Z.concat(lk(te).split(" ").map(q=>`${Y}:${q}`));else if(Array.isArray(te))Z=Z.concat(te.reduce((q,V)=>q.concat(`${Y}:${V}`),[]));else if(typeof te=="object"&&typeof ce=="string"){for(let q in te)if(te.hasOwnProperty(q)&&q===ce){let V=te[q];if(V&&typeof V=="string"){let se=lk(V);Z[ce]?Z[ce]=Z[ce].concat(se.split(" ").map(R=>`${Y}:${R}`)):Z[ce]=se.split(" ").map(R=>`${Y}:${R}`)}else Array.isArray(V)&&V.length>0&&(Z[ce]=V.reduce((se,R)=>se.concat(`${Y}:${R}`),[]))}}return Z},z=(Y,te=m,G=null,ce=null)=>{var Z;let q=te[Y];if(!q||ni(q))return null;let V=(Z=ce?.[Y])!=null?Z:$?.[Y];if(V===null)return null;let se=sk(V),R=Array.isArray(d.responsiveVariants)&&d.responsiveVariants.length>0||d.responsiveVariants===!0,U=g?.[Y],ie=[];if(typeof se=="object"&&R)for(let[Ce,ye]of Object.entries(se)){let Fe=q[ye];if(Ce==="initial"){U=ye;continue}Array.isArray(d.responsiveVariants)&&!d.responsiveVariants.includes(Ce)||(ie=L(Ce,Fe,ie,G))}let O=se!=null&&typeof se!="object"?se:sk(U),me=q[O||"false"];return typeof ie=="object"&&typeof G=="string"&&ie[G]?fk(ie,me):ie.length>0?(ie.push(me),G==="base"?ie.join(" "):ie):me},K=()=>m?Object.keys(m).map(Y=>z(Y,m)):null,M=(Y,te)=>{if(!m||typeof m!="object")return null;let G=new Array;for(let ce in m){let Z=z(ce,m,Y,te),q=Y==="base"&&typeof Z=="string"?Z:Z&&Z[Y];q&&(G[G.length]=q)}return G},J={};for(let Y in $)$[Y]!==void 0&&(J[Y]=$[Y]);let re=(Y,te)=>{var G;let ce=typeof $?.[Y]=="object"?{[Y]:(G=$[Y])==null?void 0:G.initial}:{};return{...g,...J,...ce,...te}},ae=(Y=[],te)=>{let G=[];for(let{class:ce,className:Z,...q}of Y){let V=!0;for(let[se,R]of Object.entries(q)){let U=re(se,te)[se];if(Array.isArray(R)){if(!R.includes(U)){V=!1;break}}else{let ie=O=>O==null||O===!1;if(ie(R)&&ie(U))continue;if(U!==R){V=!1;break}}}V&&(ce&&G.push(ce),Z&&G.push(Z))}return G},j=Y=>{let te=ae(P,Y);if(!Array.isArray(te))return te;let G={};for(let ce of te)if(typeof ce=="string"&&(G.base=yp(G.base,ce)(d)),typeof ce=="object")for(let[Z,q]of Object.entries(ce))G[Z]=yp(G[Z],q)(d);return G},B=Y=>{if(l.length<1)return null;let te={};for(let{slots:G=[],class:ce,className:Z,...q}of l){if(!ni(q)){let V=!0;for(let se of Object.keys(q)){let R=re(se,Y)[se];if(R===void 0||(Array.isArray(q[se])?!q[se].includes(R):q[se]!==R)){V=!1;break}}if(!V)continue}for(let V of G)te[V]=te[V]||[],te[V].push([ce,Z])}return te};if(!ni(r)||!b){let Y={};if(typeof k=="object"&&!ni(k))for(let te of Object.keys(k))Y[te]=G=>{var ce,Z;return yp(k[te],M(te,G),((ce=j(G))!=null?ce:[])[te],((Z=B(G))!=null?Z:[])[te],G?.class,G?.className)(d)};return Y}return yp(h,K(),ae(P),$?.class,$?.className)(d)},T=()=>{if(!(!m||typeof m!="object"))return Object.keys(m)};return _.variantKeys=T(),_.extend=n,_.base=h,_.slots=k,_.variants=m,_.defaultVariants=g,_.compoundSlots=l,_.compoundVariants=P,_},fr=(e,t)=>{var n,r,i;return SO(e,{...t,twMerge:(n=t?.twMerge)!=null?n:!0,twMergeConfig:{...t?.twMergeConfig,theme:{...(r=t?.twMergeConfig)==null?void 0:r.theme,...Sb.theme},classGroups:{...(i=t?.twMergeConfig)==null?void 0:i.classGroups,...Sb.classGroups}}})},dk=fr({slots:{base:"relative inline-flex flex-col gap-2 items-center justify-center",wrapper:"relative flex",label:"text-foreground dark:text-foreground-dark font-regular",circle1:"absolute w-full h-full rounded-full",circle2:"absolute w-full h-full rounded-full",dots:"relative rounded-full mx-auto",spinnerBars:["absolute","animate-fade-out","rounded-full","w-[25%]","h-[8%]","left-[calc(37.5%)]","top-[calc(46%)]","spinner-bar-animation"]},variants:{size:{sm:{wrapper:"w-5 h-5",circle1:"border-2",circle2:"border-2",dots:"size-1",label:"text-small"},md:{wrapper:"w-8 h-8",circle1:"border-3",circle2:"border-3",dots:"size-1.5",label:"text-medium"},lg:{wrapper:"w-10 h-10",circle1:"border-3",circle2:"border-3",dots:"size-2",label:"text-large"}},color:{current:{circle1:"border-b-current",circle2:"border-b-current",dots:"bg-current",spinnerBars:"bg-current"},white:{circle1:"border-b-white",circle2:"border-b-white",dots:"bg-white",spinnerBars:"bg-white"},default:{circle1:"border-b-default",circle2:"border-b-default",dots:"bg-default",spinnerBars:"bg-default"},primary:{circle1:"border-b-primary",circle2:"border-b-primary",dots:"bg-primary",spinnerBars:"bg-primary"},secondary:{circle1:"border-b-secondary",circle2:"border-b-secondary",dots:"bg-secondary",spinnerBars:"bg-secondary"},success:{circle1:"border-b-success",circle2:"border-b-success",dots:"bg-success",spinnerBars:"bg-success"},warning:{circle1:"border-b-warning",circle2:"border-b-warning",dots:"bg-warning",spinnerBars:"bg-warning"},danger:{circle1:"border-b-danger",circle2:"border-b-danger",dots:"bg-danger",spinnerBars:"bg-danger"}},labelColor:{foreground:{label:"text-foreground"},primary:{label:"text-primary"},secondary:{label:"text-secondary"},success:{label:"text-success"},warning:{label:"text-warning"},danger:{label:"text-danger"}},variant:{default:{circle1:["animate-spinner-ease-spin","border-solid","border-t-transparent","border-l-transparent","border-r-transparent"],circle2:["opacity-75","animate-spinner-linear-spin","border-dotted","border-t-transparent","border-l-transparent","border-r-transparent"]},gradient:{circle1:["border-0","bg-gradient-to-b","from-transparent","via-transparent","to-primary","animate-spinner-linear-spin","[animation-duration:1s]","[-webkit-mask:radial-gradient(closest-side,rgba(0,0,0,0.0)calc(100%-3px),rgba(0,0,0,1)calc(100%-3px))]"],circle2:["hidden"]},wave:{wrapper:"translate-y-3/4",dots:["animate-sway","spinner-dot-animation"]},dots:{wrapper:"translate-y-2/4",dots:["animate-blink","spinner-dot-blink-animation"]},spinner:{},simple:{wrapper:"text-foreground h-5 w-5 animate-spin",circle1:"opacity-25",circle2:"opacity-75"}}},defaultVariants:{size:"md",color:"primary",labelColor:"foreground",variant:"default"},compoundVariants:[{variant:"gradient",color:"current",class:{circle1:"to-current"}},{variant:"gradient",color:"white",class:{circle1:"to-white"}},{variant:"gradient",color:"default",class:{circle1:"to-default"}},{variant:"gradient",color:"primary",class:{circle1:"to-primary"}},{variant:"gradient",color:"secondary",class:{circle1:"to-secondary"}},{variant:"gradient",color:"success",class:{circle1:"to-success"}},{variant:"gradient",color:"warning",class:{circle1:"to-warning"}},{variant:"gradient",color:"danger",class:{circle1:"to-danger"}},{variant:"wave",size:"sm",class:{wrapper:"w-5 h-5"}},{variant:"wave",size:"md",class:{wrapper:"w-8 h-8"}},{variant:"wave",size:"lg",class:{wrapper:"w-12 h-12"}},{variant:"dots",size:"sm",class:{wrapper:"w-5 h-5"}},{variant:"dots",size:"md",class:{wrapper:"w-8 h-8"}},{variant:"dots",size:"lg",class:{wrapper:"w-12 h-12"}},{variant:"simple",size:"sm",class:{wrapper:"w-5 h-5"}},{variant:"simple",size:"md",class:{wrapper:"w-8 h-8"}},{variant:"simple",size:"lg",class:{wrapper:"w-12 h-12"}},{variant:"simple",color:"current",class:{wrapper:"text-current"}},{variant:"simple",color:"white",class:{wrapper:"text-white"}},{variant:"simple",color:"default",class:{wrapper:"text-default"}},{variant:"simple",color:"primary",class:{wrapper:"text-primary"}},{variant:"simple",color:"secondary",class:{wrapper:"text-secondary"}},{variant:"simple",color:"success",class:{wrapper:"text-success"}},{variant:"simple",color:"warning",class:{wrapper:"text-warning"}},{variant:"simple",color:"danger",class:{wrapper:"text-danger"}}]}),wh=["outline-hidden","data-[focus-visible=true]:z-10","data-[focus-visible=true]:outline-2","data-[focus-visible=true]:outline-focus","data-[focus-visible=true]:outline-offset-2"],I_=["outline-hidden","group-data-[focus-visible=true]:z-10","group-data-[focus-visible=true]:ring-2","group-data-[focus-visible=true]:ring-focus","group-data-[focus-visible=true]:ring-offset-2","group-data-[focus-visible=true]:ring-offset-background"],sf={default:["[&+.border-medium.border-default]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],primary:["[&+.border-medium.border-primary]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],secondary:["[&+.border-medium.border-secondary]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],success:["[&+.border-medium.border-success]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],warning:["[&+.border-medium.border-warning]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],danger:["[&+.border-medium.border-danger]:ms-[calc(var(--heroui-border-width-medium)*-1)]"]},kO=["font-inherit","text-[100%]","leading-[1.15]","m-0","p-0","overflow-visible","box-border","absolute","top-0","w-full","h-full","opacity-[0.0001]","z-[1]","cursor-pointer","disabled:cursor-default"],pk=fr({slots:{base:["z-0","relative","bg-transparent","before:content-['']","before:hidden","before:z-[-1]","before:absolute","before:rotate-45","before:w-2.5","before:h-2.5","before:rounded-sm","data-[arrow=true]:before:block","data-[placement=top]:before:-bottom-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=top]:before:left-1/2","data-[placement=top]:before:-translate-x-1/2","data-[placement=top-start]:before:-bottom-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=top-start]:before:left-3","data-[placement=top-end]:before:-bottom-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=top-end]:before:right-3","data-[placement=bottom]:before:-top-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=bottom]:before:left-1/2","data-[placement=bottom]:before:-translate-x-1/2","data-[placement=bottom-start]:before:-top-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=bottom-start]:before:left-3","data-[placement=bottom-end]:before:-top-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=bottom-end]:before:right-3","data-[placement=left]:before:-right-[calc(theme(spacing.5)/4_-_2px)]","data-[placement=left]:before:top-1/2","data-[placement=left]:before:-translate-y-1/2","data-[placement=left-start]:before:-right-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=left-start]:before:top-1/4","data-[placement=left-end]:before:-right-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=left-end]:before:bottom-1/4","data-[placement=right]:before:-left-[calc(theme(spacing.5)/4_-_2px)]","data-[placement=right]:before:top-1/2","data-[placement=right]:before:-translate-y-1/2","data-[placement=right-start]:before:-left-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=right-start]:before:top-1/4","data-[placement=right-end]:before:-left-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=right-end]:before:bottom-1/4",...wh],content:["z-10","px-2.5","py-1","w-full","inline-flex","flex-col","items-center","justify-center","box-border","subpixel-antialiased","outline-hidden","box-border"],trigger:["z-10"],backdrop:["hidden"],arrow:[]},variants:{size:{sm:{content:"text-tiny"},md:{content:"text-small"},lg:{content:"text-medium"}},color:{default:{base:"before:bg-content1 before:shadow-small",content:"bg-content1"},foreground:{base:"before:bg-foreground",content:et.solid.foreground},primary:{base:"before:bg-primary",content:et.solid.primary},secondary:{base:"before:bg-secondary",content:et.solid.secondary},success:{base:"before:bg-success",content:et.solid.success},warning:{base:"before:bg-warning",content:et.solid.warning},danger:{base:"before:bg-danger",content:et.solid.danger}},radius:{none:{content:"rounded-none"},sm:{content:"rounded-small"},md:{content:"rounded-medium"},lg:{content:"rounded-large"},full:{content:"rounded-full"}},shadow:{none:{content:"shadow-none"},sm:{content:"shadow-small"},md:{content:"shadow-medium"},lg:{content:"shadow-large"}},backdrop:{transparent:{},opaque:{backdrop:"bg-overlay/50 backdrop-opacity-disabled"},blur:{backdrop:"backdrop-blur-sm backdrop-saturate-150 bg-overlay/30"}},triggerScaleOnOpen:{true:{trigger:["aria-expanded:scale-[0.97]","aria-expanded:opacity-70","subpixel-antialiased"]},false:{}},disableAnimation:{true:{base:"animate-none"}},isTriggerDisabled:{true:{trigger:"opacity-disabled pointer-events-none"},false:{}}},defaultVariants:{color:"default",radius:"lg",size:"md",shadow:"md",backdrop:"transparent",triggerScaleOnOpen:!0},compoundVariants:[{backdrop:["opaque","blur"],class:{backdrop:"block w-full h-full fixed inset-0 -z-30"}}]});fr({slots:{base:"flex flex-col gap-2 w-full",label:"",labelWrapper:"flex justify-between",value:"",track:"z-0 relative bg-default-300/50 overflow-hidden rtl:rotate-180",indicator:"h-full"},variants:{color:{default:{indicator:"bg-default-400"},primary:{indicator:"bg-primary"},secondary:{indicator:"bg-secondary"},success:{indicator:"bg-success"},warning:{indicator:"bg-warning"},danger:{indicator:"bg-danger"}},size:{sm:{label:"text-small",value:"text-small",track:"h-1"},md:{label:"text-medium",value:"text-medium",track:"h-3"},lg:{label:"text-large",value:"text-large",track:"h-5"}},radius:{none:{track:"rounded-none",indicator:"rounded-none"},sm:{track:"rounded-small",indicator:"rounded-small"},md:{track:"rounded-medium",indicator:"rounded-medium"},lg:{track:"rounded-large",indicator:"rounded-large"},full:{track:"rounded-full",indicator:"rounded-full"}},isStriped:{true:{indicator:"bg-stripe-gradient-default bg-stripe-size"}},isIndeterminate:{true:{indicator:["absolute","w-full","origin-left","animate-indeterminate-bar"]}},isDisabled:{true:{base:"opacity-disabled cursor-not-allowed"}},disableAnimation:{true:{},false:{indicator:"transition-transform !duration-500"}}},defaultVariants:{color:"primary",size:"md",radius:"full",isStriped:!1,isIndeterminate:!1,isDisabled:!1},compoundVariants:[{disableAnimation:!0,isIndeterminate:!1,class:{indicator:"!transition-none motion-reduce:transition-none"}},{color:"primary",isStriped:!0,class:{indicator:"bg-stripe-gradient-primary bg-stripe-size"}},{color:"secondary",isStriped:!0,class:{indicator:"bg-stripe-gradient-secondary bg-stripe-size"}},{color:"success",isStriped:!0,class:{indicator:"bg-stripe-gradient-success bg-stripe-size"}},{color:"warning",isStriped:!0,class:{indicator:"bg-stripe-gradient-warning bg-stripe-size"}},{color:"danger",isStriped:!0,class:{indicator:"bg-stripe-gradient-danger bg-stripe-size"}}]},{twMerge:!0});var hk=fr({slots:{base:"flex flex-col justify-center gap-1 max-w-fit items-center",label:"",svgWrapper:"relative block",svg:"z-0 relative overflow-hidden",track:"h-full stroke-default-300/50",indicator:"h-full stroke-current",value:"absolute font-normal inset-0 flex items-center justify-center"},variants:{color:{default:{svg:"text-default-400"},primary:{svg:"text-primary"},secondary:{svg:"text-secondary"},success:{svg:"text-success"},warning:{svg:"text-warning"},danger:{svg:"text-danger"}},size:{sm:{svg:"w-8 h-8",label:"text-small",value:"text-[0.5rem]"},md:{svg:"w-10 h-10",label:"text-small",value:"text-[0.55rem]"},lg:{svg:"w-12 h-12",label:"text-medium",value:"text-[0.6rem]"}},isIndeterminate:{true:{svg:"animate-spinner-ease-spin"}},isDisabled:{true:{base:"opacity-disabled cursor-not-allowed"}},disableAnimation:{true:{},false:{indicator:"transition-all !duration-500"}}},defaultVariants:{color:"primary",size:"md",isDisabled:!1},compoundVariants:[{disableAnimation:!0,isIndeterminate:!1,class:{svg:"!transition-none motion-reduce:transition-none"}}]}),CO=["data-[top-scroll=true]:[mask-image:linear-gradient(0deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]","data-[bottom-scroll=true]:[mask-image:linear-gradient(180deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]","data-[top-bottom-scroll=true]:[mask-image:linear-gradient(#000,#000,transparent_0,#000_var(--scroll-shadow-size),#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]"],EO=["data-[left-scroll=true]:[mask-image:linear-gradient(270deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]","data-[right-scroll=true]:[mask-image:linear-gradient(90deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]","data-[left-right-scroll=true]:[mask-image:linear-gradient(to_right,#000,#000,transparent_0,#000_var(--scroll-shadow-size),#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]"],mk=fr({base:[],variants:{orientation:{vertical:["overflow-y-auto",...CO],horizontal:["overflow-x-auto",...EO]},hideScrollBar:{true:"scrollbar-hide",false:""}},defaultVariants:{orientation:"vertical",hideScrollBar:!1}}),gk=fr({slots:{base:["group","relative","overflow-hidden","bg-content3 dark:bg-content2","pointer-events-none","before:opacity-100","before:absolute","before:inset-0","before:-translate-x-full","before:animate-shimmer","before:border-t","before:border-content4/30","before:bg-gradient-to-r","before:from-transparent","before:via-content4","dark:before:via-default-700/10","before:to-transparent","after:opacity-100","after:absolute","after:inset-0","after:-z-10","after:bg-content3","dark:after:bg-content2","data-[loaded=true]:pointer-events-auto","data-[loaded=true]:overflow-visible","data-[loaded=true]:!bg-transparent","data-[loaded=true]:before:opacity-0 data-[loaded=true]:before:-z-10 data-[loaded=true]:before:animate-none","data-[loaded=true]:after:opacity-0"],content:["opacity-0","group-data-[loaded=true]:opacity-100"]},variants:{disableAnimation:{true:{base:"before:animate-none before:transition-none after:transition-none",content:"transition-none"},false:{base:"transition-background !duration-300",content:"transition-opacity motion-reduce:transition-none !duration-300"}}},defaultVariants:{}}),vk=fr({slots:{base:"group flex flex-col data-[hidden=true]:hidden",label:["absolute","z-10","pointer-events-none","origin-top-left","shrink-0","rtl:origin-top-right","subpixel-antialiased","block","text-small","text-foreground-500"],mainWrapper:"h-full",inputWrapper:"relative w-full inline-flex tap-highlight-transparent flex-row items-center shadow-xs px-3 gap-3",innerWrapper:"inline-flex w-full items-center h-full box-border",input:["w-full font-normal bg-transparent !outline-hidden placeholder:text-foreground-500 focus-visible:outline-hidden","data-[has-start-content=true]:ps-1.5","data-[has-end-content=true]:pe-1.5","data-[type=color]:rounded-none","file:cursor-pointer file:bg-transparent file:border-0","autofill:bg-transparent bg-clip-text"],clearButton:["p-2","-m-2","z-10","absolute","end-3","start-auto","pointer-events-none","appearance-none","outline-hidden","select-none","opacity-0","cursor-pointer","active:!opacity-70","rounded-full",...wh],helperWrapper:"hidden group-data-[has-helper=true]:flex p-1 relative flex-col gap-1.5",description:"text-tiny text-foreground-400",errorMessage:"text-tiny text-danger"},variants:{variant:{flat:{inputWrapper:["bg-default-100","data-[hover=true]:bg-default-200","group-data-[focus=true]:bg-default-100"]},faded:{inputWrapper:["bg-default-100","border-medium","border-default-200","data-[hover=true]:border-default-400 focus-within:border-default-400"],value:"group-data-[has-value=true]:text-default-foreground"},bordered:{inputWrapper:["border-medium","border-default-200","data-[hover=true]:border-default-400","group-data-[focus=true]:border-default-foreground"]},underlined:{inputWrapper:["!px-1","!pb-0","!gap-0","relative","box-border","border-b-medium","shadow-[0_1px_0px_0_rgba(0,0,0,0.05)]","border-default-200","!rounded-none","hover:border-default-300","after:content-['']","after:w-0","after:origin-center","after:bg-default-foreground","after:absolute","after:left-1/2","after:-translate-x-1/2","after:-bottom-[2px]","after:h-[2px]","group-data-[focus=true]:after:w-full"],innerWrapper:"pb-1",label:"group-data-[filled-within=true]:text-foreground"}},color:{default:{},primary:{},secondary:{},success:{},warning:{},danger:{}},size:{sm:{label:"text-tiny",inputWrapper:"h-8 min-h-8 px-2 rounded-small",input:"text-small",clearButton:"text-medium"},md:{inputWrapper:"h-10 min-h-10 rounded-medium",input:"text-small",clearButton:"text-large hover:!opacity-100"},lg:{label:"text-medium",inputWrapper:"h-12 min-h-12 rounded-large",input:"text-medium",clearButton:"text-large hover:!opacity-100"}},radius:{none:{inputWrapper:"rounded-none"},sm:{inputWrapper:"rounded-small"},md:{inputWrapper:"rounded-medium"},lg:{inputWrapper:"rounded-large"},full:{inputWrapper:"rounded-full"}},labelPlacement:{outside:{mainWrapper:"flex flex-col"},"outside-left":{base:"flex-row items-center flex-nowrap data-[has-helper=true]:items-start",inputWrapper:"flex-1",mainWrapper:"flex flex-col",label:"relative text-foreground pe-2 ps-2 pointer-events-auto"},"outside-top":{mainWrapper:"flex flex-col",label:"relative text-foreground pb-2 pointer-events-auto"},inside:{label:"cursor-text",inputWrapper:"flex-col items-start justify-center gap-0",innerWrapper:"group-data-[has-label=true]:items-end"}},fullWidth:{true:{base:"w-full"},false:{}},isClearable:{true:{input:"peer pe-6 input-search-cancel-button-none",clearButton:["peer-data-[filled=true]:pointer-events-auto","peer-data-[filled=true]:opacity-70 peer-data-[filled=true]:block","peer-data-[filled=true]:scale-100"]}},isDisabled:{true:{base:"opacity-disabled pointer-events-none",inputWrapper:"pointer-events-none",label:"pointer-events-none"}},isInvalid:{true:{label:"!text-danger",input:"!placeholder:text-danger !text-danger"}},isRequired:{true:{label:"after:content-['*'] after:text-danger after:ms-0.5"}},isMultiline:{true:{label:"relative",inputWrapper:"!h-auto",innerWrapper:"items-start group-data-[has-label=true]:items-start",input:"resize-none data-[hide-scroll=true]:scrollbar-hide",clearButton:"absolute top-2 right-2 rtl:right-auto rtl:left-2 z-10"}},disableAnimation:{true:{input:"transition-none",inputWrapper:"transition-none",label:"transition-none"},false:{inputWrapper:"transition-background motion-reduce:transition-none !duration-150",label:["will-change-auto","!duration-200","!ease-out","motion-reduce:transition-none","transition-[transform,color,left,opacity,translate,scale]"],clearButton:["scale-90","ease-out","duration-150","transition-[opacity,transform]","motion-reduce:transition-none","motion-reduce:scale-100"]}}},defaultVariants:{variant:"flat",color:"default",size:"md",fullWidth:!0,isDisabled:!1,isMultiline:!1},compoundVariants:[{variant:"flat",color:"default",class:{input:"group-data-[has-value=true]:text-default-foreground"}},{variant:"flat",color:"primary",class:{inputWrapper:["bg-primary-100","data-[hover=true]:bg-primary-50","text-primary","group-data-[focus=true]:bg-primary-50","placeholder:text-primary"],input:"placeholder:text-primary",label:"text-primary"}},{variant:"flat",color:"secondary",class:{inputWrapper:["bg-secondary-100","text-secondary","data-[hover=true]:bg-secondary-50","group-data-[focus=true]:bg-secondary-50","placeholder:text-secondary"],input:"placeholder:text-secondary",label:"text-secondary"}},{variant:"flat",color:"success",class:{inputWrapper:["bg-success-100","text-success-600","dark:text-success","placeholder:text-success-600","dark:placeholder:text-success","data-[hover=true]:bg-success-50","group-data-[focus=true]:bg-success-50"],input:"placeholder:text-success-600 dark:placeholder:text-success",label:"text-success-600 dark:text-success"}},{variant:"flat",color:"warning",class:{inputWrapper:["bg-warning-100","text-warning-600","dark:text-warning","placeholder:text-warning-600","dark:placeholder:text-warning","data-[hover=true]:bg-warning-50","group-data-[focus=true]:bg-warning-50"],input:"placeholder:text-warning-600 dark:placeholder:text-warning",label:"text-warning-600 dark:text-warning"}},{variant:"flat",color:"danger",class:{inputWrapper:["bg-danger-100","text-danger","dark:text-danger-500","placeholder:text-danger","dark:placeholder:text-danger-500","data-[hover=true]:bg-danger-50","group-data-[focus=true]:bg-danger-50"],input:"placeholder:text-danger dark:placeholder:text-danger-500",label:"text-danger dark:text-danger-500"}},{variant:"faded",color:"primary",class:{label:"text-primary",inputWrapper:"data-[hover=true]:border-primary focus-within:border-primary"}},{variant:"faded",color:"secondary",class:{label:"text-secondary",inputWrapper:"data-[hover=true]:border-secondary focus-within:border-secondary"}},{variant:"faded",color:"success",class:{label:"text-success",inputWrapper:"data-[hover=true]:border-success focus-within:border-success"}},{variant:"faded",color:"warning",class:{label:"text-warning",inputWrapper:"data-[hover=true]:border-warning focus-within:border-warning"}},{variant:"faded",color:"danger",class:{label:"text-danger",inputWrapper:"data-[hover=true]:border-danger focus-within:border-danger"}},{variant:"underlined",color:"default",class:{input:"group-data-[has-value=true]:text-foreground"}},{variant:"underlined",color:"primary",class:{inputWrapper:"after:bg-primary",label:"text-primary"}},{variant:"underlined",color:"secondary",class:{inputWrapper:"after:bg-secondary",label:"text-secondary"}},{variant:"underlined",color:"success",class:{inputWrapper:"after:bg-success",label:"text-success"}},{variant:"underlined",color:"warning",class:{inputWrapper:"after:bg-warning",label:"text-warning"}},{variant:"underlined",color:"danger",class:{inputWrapper:"after:bg-danger",label:"text-danger"}},{variant:"bordered",color:"primary",class:{inputWrapper:"group-data-[focus=true]:border-primary",label:"text-primary"}},{variant:"bordered",color:"secondary",class:{inputWrapper:"group-data-[focus=true]:border-secondary",label:"text-secondary"}},{variant:"bordered",color:"success",class:{inputWrapper:"group-data-[focus=true]:border-success",label:"text-success"}},{variant:"bordered",color:"warning",class:{inputWrapper:"group-data-[focus=true]:border-warning",label:"text-warning"}},{variant:"bordered",color:"danger",class:{inputWrapper:"group-data-[focus=true]:border-danger",label:"text-danger"}},{labelPlacement:"inside",color:"default",class:{label:"group-data-[filled-within=true]:text-default-600"}},{labelPlacement:"outside",color:"default",class:{label:"group-data-[filled-within=true]:text-foreground"}},{radius:"full",size:["sm"],class:{inputWrapper:"px-3"}},{radius:"full",size:"md",class:{inputWrapper:"px-4"}},{radius:"full",size:"lg",class:{inputWrapper:"px-5"}},{disableAnimation:!1,variant:["faded","bordered"],class:{inputWrapper:"transition-colors motion-reduce:transition-none"}},{disableAnimation:!1,variant:"underlined",class:{inputWrapper:"after:transition-width motion-reduce:after:transition-none"}},{variant:["flat","faded"],class:{inputWrapper:[...I_]}},{isInvalid:!0,variant:"flat",class:{inputWrapper:["!bg-danger-50","data-[hover=true]:!bg-danger-100","group-data-[focus=true]:!bg-danger-50"]}},{isInvalid:!0,variant:"bordered",class:{inputWrapper:"!border-danger group-data-[focus=true]:!border-danger"}},{isInvalid:!0,variant:"underlined",class:{inputWrapper:"after:!bg-danger"}},{labelPlacement:"inside",size:"sm",class:{inputWrapper:"h-12 py-1.5 px-3"}},{labelPlacement:"inside",size:"md",class:{inputWrapper:"h-14 py-2"}},{labelPlacement:"inside",size:"lg",class:{inputWrapper:"h-16 py-2.5 gap-0"}},{labelPlacement:"inside",size:"sm",variant:["bordered","faded"],class:{inputWrapper:"py-1"}},{labelPlacement:["inside","outside"],class:{label:["group-data-[filled-within=true]:pointer-events-auto"]}},{labelPlacement:"outside",isMultiline:!1,class:{base:"relative justify-end",label:["pb-0","z-20","top-1/2","-translate-y-1/2","group-data-[filled-within=true]:start-0"]}},{labelPlacement:["inside"],class:{label:["group-data-[filled-within=true]:scale-85"]}},{labelPlacement:["inside"],variant:"flat",class:{innerWrapper:"pb-0.5"}},{variant:"underlined",size:"sm",class:{innerWrapper:"pb-1"}},{variant:"underlined",size:["md","lg"],class:{innerWrapper:"pb-1.5"}},{labelPlacement:"inside",size:["sm","md"],class:{label:"text-small"}},{labelPlacement:"inside",isMultiline:!1,size:"sm",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-tiny)/2_-_8px)]"]}},{labelPlacement:"inside",isMultiline:!1,size:"md",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_6px)]"]}},{labelPlacement:"inside",isMultiline:!1,size:"lg",class:{label:["text-medium","group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_8px)]"]}},{labelPlacement:"inside",variant:["faded","bordered"],isMultiline:!1,size:"sm",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-tiny)/2_-_8px_-_var(--heroui-border-width-medium))]"]}},{labelPlacement:"inside",variant:["faded","bordered"],isMultiline:!1,size:"md",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_6px_-_var(--heroui-border-width-medium))]"]}},{labelPlacement:"inside",variant:["faded","bordered"],isMultiline:!1,size:"lg",class:{label:["text-medium","group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_8px_-_var(--heroui-border-width-medium))]"]}},{labelPlacement:"inside",variant:"underlined",isMultiline:!1,size:"sm",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-tiny)/2_-_5px)]"]}},{labelPlacement:"inside",variant:"underlined",isMultiline:!1,size:"md",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_3.5px)]"]}},{labelPlacement:"inside",variant:"underlined",size:"lg",isMultiline:!1,class:{label:["text-medium","group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_4px)]"]}},{labelPlacement:"outside",size:"sm",isMultiline:!1,class:{label:["start-2","text-tiny","group-data-[filled-within=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-tiny)/2_+_16px)]"],base:"data-[has-label=true]:mt-[calc(var(--heroui-font-size-small)_+_8px)]"}},{labelPlacement:"outside",size:"md",isMultiline:!1,class:{label:["start-3","end-auto","text-small","group-data-[filled-within=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-small)/2_+_20px)]"],base:"data-[has-label=true]:mt-[calc(var(--heroui-font-size-small)_+_10px)]"}},{labelPlacement:"outside",size:"lg",isMultiline:!1,class:{label:["start-3","end-auto","text-medium","group-data-[filled-within=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-small)/2_+_24px)]"],base:"data-[has-label=true]:mt-[calc(var(--heroui-font-size-small)_+_12px)]"}},{labelPlacement:"outside-left",size:"sm",class:{label:"group-data-[has-helper=true]:pt-2"}},{labelPlacement:"outside-left",size:"md",class:{label:"group-data-[has-helper=true]:pt-3"}},{labelPlacement:"outside-left",size:"lg",class:{label:"group-data-[has-helper=true]:pt-4"}},{labelPlacement:["outside","outside-left"],isMultiline:!0,class:{inputWrapper:"py-2"}},{labelPlacement:"outside",isMultiline:!0,class:{label:"pb-1.5"}},{labelPlacement:"inside",isMultiline:!0,class:{label:"pb-0.5",input:"pt-0"}},{isMultiline:!0,disableAnimation:!1,class:{input:"transition-height !duration-100 motion-reduce:transition-none"}},{labelPlacement:["inside","outside"],class:{label:["pe-2","max-w-full","text-ellipsis","overflow-hidden"]}},{isMultiline:!0,radius:"full",class:{inputWrapper:"data-[has-multiple-rows=true]:rounded-large"}},{isClearable:!0,isMultiline:!0,class:{clearButton:["group-data-[has-value=true]:opacity-70 group-data-[has-value=true]:block","group-data-[has-value=true]:scale-100","group-data-[has-value=true]:pointer-events-auto"]}}]}),yk=fr({slots:{wrapper:["flex","w-screen","h-[100dvh]","fixed","inset-0","z-50","overflow-x-auto","justify-center","h-[--visual-viewport-height]"],base:["flex","flex-col","relative","bg-white","z-50","w-full","box-border","bg-content1","outline-hidden","mx-1","my-1","sm:mx-6","sm:my-16"],backdrop:"z-50",header:"flex py-4 px-6 flex-initial text-large font-semibold",body:"flex flex-1 flex-col gap-3 px-6 py-2",footer:"flex flex-row gap-2 px-6 py-4 justify-end",closeButton:["absolute","appearance-none","outline-hidden","select-none","top-1","end-1","p-2","text-foreground-500","rounded-full","hover:bg-default-100","active:bg-default-200","tap-highlight-transparent",...wh]},variants:{size:{xs:{base:"max-w-xs"},sm:{base:"max-w-sm"},md:{base:"max-w-md"},lg:{base:"max-w-lg"},xl:{base:"max-w-xl"},"2xl":{base:"max-w-2xl"},"3xl":{base:"max-w-3xl"},"4xl":{base:"max-w-4xl"},"5xl":{base:"max-w-5xl"},full:{base:"my-0 mx-0 sm:mx-0 sm:my-0 max-w-full h-[100dvh] min-h-[100dvh] !rounded-none"}},radius:{none:{base:"rounded-none"},sm:{base:"rounded-small"},md:{base:"rounded-medium"},lg:{base:"rounded-large"}},placement:{auto:{wrapper:"items-end sm:items-center"},center:{wrapper:"items-center sm:items-center"},top:{wrapper:"items-start sm:items-start"},"top-center":{wrapper:"items-start sm:items-center"},bottom:{wrapper:"items-end sm:items-end"},"bottom-center":{wrapper:"items-end sm:items-center"}},shadow:{none:{base:"shadow-none"},sm:{base:"shadow-small"},md:{base:"shadow-medium"},lg:{base:"shadow-large"}},backdrop:{transparent:{backdrop:"hidden"},opaque:{backdrop:"bg-overlay/50 backdrop-opacity-disabled"},blur:{backdrop:"backdrop-blur-md backdrop-saturate-150 bg-overlay/30"}},scrollBehavior:{normal:{base:"overflow-y-hidden"},inside:{base:"max-h-[calc(100%_-_8rem)]",body:"overflow-y-auto"},outside:{wrapper:"items-start sm:items-start overflow-y-auto",base:"my-16"}},disableAnimation:{false:{wrapper:["[--scale-enter:100%]","[--scale-exit:100%]","[--slide-enter:0px]","[--slide-exit:80px]","sm:[--scale-enter:100%]","sm:[--scale-exit:103%]","sm:[--slide-enter:0px]","sm:[--slide-exit:0px]"]}}},defaultVariants:{size:"md",radius:"lg",shadow:"sm",placement:"auto",backdrop:"opaque",scrollBehavior:"normal"},compoundVariants:[{backdrop:["opaque","blur"],class:{backdrop:"w-screen h-screen fixed inset-0"}}]}),PO=fr({base:"shrink-0 bg-divider border-none",variants:{orientation:{horizontal:"w-full h-divider",vertical:"h-full w-divider"}},defaultVariants:{orientation:"horizontal"}}),TO=fr({base:"flex flex-col gap-2 items-start"}),bk=fr({slots:{wrapper:"relative shadow-black/5",zoomedWrapper:"relative overflow-hidden rounded-inherit",img:"relative z-10 opacity-0 shadow-black/5 data-[loaded=true]:opacity-100",blurredImg:["absolute","z-0","inset-0","w-full","h-full","object-cover","filter","blur-lg","scale-105","saturate-150","opacity-30","translate-y-1"]},variants:{radius:{none:{},sm:{},md:{},lg:{},full:{}},shadow:{none:{wrapper:"shadow-none",img:"shadow-none"},sm:{wrapper:"shadow-small",img:"shadow-small"},md:{wrapper:"shadow-medium",img:"shadow-medium"},lg:{wrapper:"shadow-large",img:"shadow-large"}},isZoomed:{true:{img:["object-cover","transform","hover:scale-125"]}},showSkeleton:{true:{wrapper:["group","relative","overflow-hidden","bg-content3 dark:bg-content2"],img:"opacity-0"}},disableAnimation:{true:{img:"transition-none"},false:{img:"transition-transform-opacity motion-reduce:transition-none !duration-300"}}},defaultVariants:{radius:"lg",shadow:"none",isZoomed:!1,isBlurred:!1,showSkeleton:!1},compoundVariants:[{showSkeleton:!0,disableAnimation:!1,class:{wrapper:["before:opacity-100","before:absolute","before:inset-0","before:-translate-x-full","before:animate-shimmer","before:border-t","before:border-content4/30","before:bg-gradient-to-r","before:from-transparent","before:via-content4","dark:before:via-default-700/10","before:to-transparent","after:opacity-100","after:absolute","after:inset-0","after:-z-10","after:bg-content3","dark:after:bg-content2"]}}],compoundSlots:[{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"none",class:"rounded-none"},{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"full",class:"rounded-full"},{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"sm",class:"rounded-small"},{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"md",class:"rounded-md"},{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"lg",class:"rounded-large"}]}),_O=fr({base:["z-0","group","relative","inline-flex","items-center","justify-center","box-border","appearance-none","outline-hidden","select-none","whitespace-nowrap","min-w-max","font-normal","subpixel-antialiased","overflow-hidden","tap-highlight-transparent","transform-gpu data-[pressed=true]:scale-[0.97]","cursor-pointer",...wh],variants:{variant:{solid:"",bordered:"border-medium bg-transparent",light:"bg-transparent",flat:"",faded:"border-medium",shadow:"",ghost:"border-medium bg-transparent"},size:{sm:"px-3 min-w-16 h-8 text-tiny gap-2 rounded-small",md:"px-4 min-w-20 h-10 text-small gap-2 rounded-medium",lg:"px-6 min-w-24 h-12 text-medium gap-3 rounded-large"},color:{default:"",primary:"",secondary:"",success:"",warning:"",danger:""},radius:{none:"rounded-none",sm:"rounded-small",md:"rounded-medium",lg:"rounded-large",full:"rounded-full"},fullWidth:{true:"w-full"},isDisabled:{true:"opacity-disabled pointer-events-none"},isInGroup:{true:"[&:not(:first-child):not(:last-child)]:rounded-none"},isIconOnly:{true:"px-0 !gap-0",false:"[&>svg]:max-w-[theme(spacing.8)]"},disableAnimation:{true:"!transition-none data-[pressed=true]:scale-100",false:"transition-transform-colors-opacity motion-reduce:transition-none"}},defaultVariants:{size:"md",variant:"solid",color:"default",fullWidth:!1,isDisabled:!1,isInGroup:!1},compoundVariants:[{variant:"solid",color:"default",class:et.solid.default},{variant:"solid",color:"primary",class:et.solid.primary},{variant:"solid",color:"secondary",class:et.solid.secondary},{variant:"solid",color:"success",class:et.solid.success},{variant:"solid",color:"warning",class:et.solid.warning},{variant:"solid",color:"danger",class:et.solid.danger},{variant:"shadow",color:"default",class:et.shadow.default},{variant:"shadow",color:"primary",class:et.shadow.primary},{variant:"shadow",color:"secondary",class:et.shadow.secondary},{variant:"shadow",color:"success",class:et.shadow.success},{variant:"shadow",color:"warning",class:et.shadow.warning},{variant:"shadow",color:"danger",class:et.shadow.danger},{variant:"bordered",color:"default",class:et.bordered.default},{variant:"bordered",color:"primary",class:et.bordered.primary},{variant:"bordered",color:"secondary",class:et.bordered.secondary},{variant:"bordered",color:"success",class:et.bordered.success},{variant:"bordered",color:"warning",class:et.bordered.warning},{variant:"bordered",color:"danger",class:et.bordered.danger},{variant:"flat",color:"default",class:et.flat.default},{variant:"flat",color:"primary",class:et.flat.primary},{variant:"flat",color:"secondary",class:et.flat.secondary},{variant:"flat",color:"success",class:et.flat.success},{variant:"flat",color:"warning",class:et.flat.warning},{variant:"flat",color:"danger",class:et.flat.danger},{variant:"faded",color:"default",class:et.faded.default},{variant:"faded",color:"primary",class:et.faded.primary},{variant:"faded",color:"secondary",class:et.faded.secondary},{variant:"faded",color:"success",class:et.faded.success},{variant:"faded",color:"warning",class:et.faded.warning},{variant:"faded",color:"danger",class:et.faded.danger},{variant:"light",color:"default",class:[et.light.default,"data-[hover=true]:bg-default/40"]},{variant:"light",color:"primary",class:[et.light.primary,"data-[hover=true]:bg-primary/20"]},{variant:"light",color:"secondary",class:[et.light.secondary,"data-[hover=true]:bg-secondary/20"]},{variant:"light",color:"success",class:[et.light.success,"data-[hover=true]:bg-success/20"]},{variant:"light",color:"warning",class:[et.light.warning,"data-[hover=true]:bg-warning/20"]},{variant:"light",color:"danger",class:[et.light.danger,"data-[hover=true]:bg-danger/20"]},{variant:"ghost",color:"default",class:[et.ghost.default,"data-[hover=true]:!bg-default"]},{variant:"ghost",color:"primary",class:[et.ghost.primary,"data-[hover=true]:!bg-primary data-[hover=true]:!text-primary-foreground"]},{variant:"ghost",color:"secondary",class:[et.ghost.secondary,"data-[hover=true]:!bg-secondary data-[hover=true]:!text-secondary-foreground"]},{variant:"ghost",color:"success",class:[et.ghost.success,"data-[hover=true]:!bg-success data-[hover=true]:!text-success-foreground"]},{variant:"ghost",color:"warning",class:[et.ghost.warning,"data-[hover=true]:!bg-warning data-[hover=true]:!text-warning-foreground"]},{variant:"ghost",color:"danger",class:[et.ghost.danger,"data-[hover=true]:!bg-danger data-[hover=true]:!text-danger-foreground"]},{isInGroup:!0,class:"rounded-none first:rounded-s-medium last:rounded-e-medium"},{isInGroup:!0,size:"sm",class:"rounded-none first:rounded-s-small last:rounded-e-small"},{isInGroup:!0,size:"md",class:"rounded-none first:rounded-s-medium last:rounded-e-medium"},{isInGroup:!0,size:"lg",class:"rounded-none first:rounded-s-large last:rounded-e-large"},{isInGroup:!0,isRounded:!0,class:"rounded-none first:rounded-s-full last:rounded-e-full"},{isInGroup:!0,radius:"none",class:"rounded-none first:rounded-s-none last:rounded-e-none"},{isInGroup:!0,radius:"sm",class:"rounded-none first:rounded-s-small last:rounded-e-small"},{isInGroup:!0,radius:"md",class:"rounded-none first:rounded-s-medium last:rounded-e-medium"},{isInGroup:!0,radius:"lg",class:"rounded-none first:rounded-s-large last:rounded-e-large"},{isInGroup:!0,radius:"full",class:"rounded-none first:rounded-s-full last:rounded-e-full"},{isInGroup:!0,variant:["ghost","bordered"],color:"default",className:sf.default},{isInGroup:!0,variant:["ghost","bordered"],color:"primary",className:sf.primary},{isInGroup:!0,variant:["ghost","bordered"],color:"secondary",className:sf.secondary},{isInGroup:!0,variant:["ghost","bordered"],color:"success",className:sf.success},{isInGroup:!0,variant:["ghost","bordered"],color:"warning",className:sf.warning},{isInGroup:!0,variant:["ghost","bordered"],color:"danger",className:sf.danger},{isIconOnly:!0,size:"sm",class:"min-w-8 w-8 h-8"},{isIconOnly:!0,size:"md",class:"min-w-10 w-10 h-10"},{isIconOnly:!0,size:"lg",class:"min-w-12 w-12 h-12"},{variant:["solid","faded","flat","bordered","shadow"],class:"data-[hover=true]:opacity-hover"}]});fr({base:"inline-flex items-center justify-center h-auto",variants:{fullWidth:{true:"w-full"}},defaultVariants:{fullWidth:!1}});var IO=fr({slots:{base:"group relative max-w-fit inline-flex items-center justify-start cursor-pointer tap-highlight-transparent p-2 -m-2 select-none",wrapper:["relative","inline-flex","items-center","justify-center","shrink-0","overflow-hidden","before:content-['']","before:absolute","before:inset-0","before:border-solid","before:border-2","before:box-border","before:border-default","after:content-['']","after:absolute","after:inset-0","after:scale-50","after:opacity-0","after:origin-center","group-data-[selected=true]:after:scale-100","group-data-[selected=true]:after:opacity-100","group-data-[hover=true]:before:bg-default-100",...I_],hiddenInput:kO,icon:"z-10 w-4 h-3 opacity-0 group-data-[selected=true]:opacity-100 pointer-events-none",label:"relative text-foreground select-none"},variants:{color:{default:{wrapper:"after:bg-default after:text-default-foreground text-default-foreground"},primary:{wrapper:"after:bg-primary after:text-primary-foreground text-primary-foreground"},secondary:{wrapper:"after:bg-secondary after:text-secondary-foreground text-secondary-foreground"},success:{wrapper:"after:bg-success after:text-success-foreground text-success-foreground"},warning:{wrapper:"after:bg-warning after:text-warning-foreground text-warning-foreground"},danger:{wrapper:"after:bg-danger after:text-danger-foreground text-danger-foreground"}},size:{sm:{wrapper:["w-4 h-4 me-2","rounded-[calc(var(--heroui-radius-medium)*0.5)]","before:rounded-[calc(var(--heroui-radius-medium)*0.5)]","after:rounded-[calc(var(--heroui-radius-medium)*0.5)]"],label:"text-small",icon:"w-3 h-2"},md:{wrapper:["w-5 h-5 me-2","rounded-[calc(var(--heroui-radius-medium)*0.6)]","before:rounded-[calc(var(--heroui-radius-medium)*0.6)]","after:rounded-[calc(var(--heroui-radius-medium)*0.6)]"],label:"text-medium",icon:"w-4 h-3"},lg:{wrapper:["w-6 h-6 me-2","rounded-[calc(var(--heroui-radius-medium)*0.7)]","before:rounded-[calc(var(--heroui-radius-medium)*0.7)]","after:rounded-[calc(var(--heroui-radius-medium)*0.7)]"],label:"text-large",icon:"w-5 h-4"}},radius:{none:{wrapper:"rounded-none before:rounded-none after:rounded-none"},sm:{wrapper:["rounded-[calc(var(--heroui-radius-medium)*0.5)]","before:rounded-[calc(var(--heroui-radius-medium)*0.5)]","after:rounded-[calc(var(--heroui-radius-medium)*0.5)]"]},md:{wrapper:["rounded-[calc(var(--heroui-radius-medium)*0.6)]","before:rounded-[calc(var(--heroui-radius-medium)*0.6)]","after:rounded-[calc(var(--heroui-radius-medium)*0.6)]"]},lg:{wrapper:["rounded-[calc(var(--heroui-radius-medium)*0.7)]","before:rounded-[calc(var(--heroui-radius-medium)*0.7)]","after:rounded-[calc(var(--heroui-radius-medium)*0.7)]"]},full:{wrapper:"rounded-full before:rounded-full after:rounded-full"}},lineThrough:{true:{label:["inline-flex","items-center","justify-center","before:content-['']","before:absolute","before:bg-foreground","before:w-0","before:h-0.5","group-data-[selected=true]:opacity-60","group-data-[selected=true]:before:w-full"]}},isDisabled:{true:{base:"opacity-disabled pointer-events-none"}},isInvalid:{true:{wrapper:"before:border-danger",label:"text-danger"}},disableAnimation:{true:{wrapper:"transition-none",icon:"transition-none",label:"transition-none"},false:{wrapper:["before:transition-colors","group-data-[pressed=true]:scale-95","transition-transform","after:transition-transform-opacity","after:!ease-linear","after:!duration-200","motion-reduce:transition-none"],icon:"transition-opacity motion-reduce:transition-none",label:"transition-colors-opacity before:transition-width motion-reduce:transition-none"}}},defaultVariants:{color:"primary",size:"md",isDisabled:!1,lineThrough:!1}});fr({slots:{base:"relative flex flex-col gap-2",label:"relative text-medium text-foreground-500",wrapper:"flex flex-col flex-wrap gap-2 data-[orientation=horizontal]:flex-row",description:"text-small text-foreground-400",errorMessage:"text-small text-danger"},variants:{isRequired:{true:{label:"after:content-['*'] after:text-danger after:ml-0.5"}},isInvalid:{true:{description:"text-danger"}},disableAnimation:{true:{},false:{description:"transition-colors !duration-150 motion-reduce:transition-none"}}},defaultVariants:{isInvalid:!1,isRequired:!1}});var $O=fr({base:"px-2",variants:{variant:{light:"",shadow:"px-4 shadow-medium rounded-medium bg-content1",bordered:"px-4 border-medium border-divider rounded-medium",splitted:"flex flex-col gap-2"},fullWidth:{true:"w-full"}},defaultVariants:{variant:"light",fullWidth:!0}}),AO=fr({slots:{base:"",heading:"",trigger:["flex py-4 w-full h-full gap-3 outline-hidden items-center tap-highlight-transparent",...wh],startContent:"shrink-0",indicator:"text-default-400",titleWrapper:"flex-1 flex flex-col text-start",title:"text-foreground text-medium",subtitle:"text-small text-foreground-500 font-normal",content:"py-2"},variants:{variant:{splitted:{base:"px-4 bg-content1 shadow-medium rounded-medium"}},isCompact:{true:{trigger:"py-2",title:"text-medium",subtitle:"text-small",indicator:"text-medium",content:"py-1"}},isDisabled:{true:{base:"opacity-disabled pointer-events-none"}},hideIndicator:{true:{indicator:"hidden"}},disableAnimation:{true:{content:"hidden data-[open=true]:block"},false:{indicator:"transition-transform",trigger:"transition-opacity"}},disableIndicatorAnimation:{true:{indicator:"transition-none"},false:{indicator:"rotate-0 data-[open=true]:-rotate-90 rtl:-rotate-180 rtl:data-[open=true]:-rotate-90"}}},defaultVariants:{size:"md",radius:"lg",isDisabled:!1,hideIndicator:!1,disableIndicatorAnimation:!1}});function $_(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t0){let d=function(h){return Promise.all(h.map(m=>Promise.resolve(m).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),c=l?.nonce||l?.getAttribute("nonce");i=d(n.map(h=>{if(h=DO(h),h in xk)return;xk[h]=!0;const m=h.endsWith(".css"),g=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${g}`))return;const b=document.createElement("link");if(b.rel=m?"stylesheet":MO,m||(b.as="script"),b.crossOrigin="",b.href=h,c&&b.setAttribute("nonce",c),document.head.appendChild(b),m)return new Promise((x,k)=>{b.addEventListener("load",x),b.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${h}`)))})}))}function s(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return i.then(l=>{for(const c of l||[])c.status==="rejected"&&s(c.reason);return t().catch(s)})};function NO(e,t){let{elementType:n="button",isDisabled:r,onPress:i,onPressStart:s,onPressEnd:l,onPressUp:c,onPressChange:d,preventFocusOnPress:h,allowFocusWhenDisabled:m,onClick:g,href:b,target:x,rel:k,type:P="button"}=e,_;n==="button"?_={type:P,disabled:r}:_={role:"button",href:n==="a"&&!r?b:void 0,target:n==="a"?x:void 0,type:n==="input"?P:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?k:void 0};let{pressProps:T,isPressed:$}=wu({onPressStart:s,onPressEnd:l,onPressChange:d,onPress:i,onPressUp:c,onClick:g,isDisabled:r,preventFocusOnPress:h,ref:t}),{focusableProps:L}=xh(e,t);m&&(L.tabIndex=r?-1:L.tabIndex);let z=Pn(L,T,_u(e,{labelable:!0}));return{isPressed:$,buttonProps:Pn(_,z,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"]})}}function FO(e,t,n){let{item:r,isDisabled:i}=e,s=r.key,l=t.selectionManager,c=S.useId(),d=S.useId(),h=t.disabledKeys.has(r.key)||i;S.useEffect(()=>{s===t.focusedKey&&document.activeElement!==n.current&&n.current&&ku(n.current)},[n,s,t.focusedKey]);let m=S.useCallback(P=>{l.canSelectItem(s)&&(l.select(s,P),t.toggleKey(s))},[s,l]);const g=S.useCallback(P=>{l.selectionBehavior==="replace"&&l.extendSelection(P),l.setFocusedKey(P)},[l]),b=S.useCallback(P=>{const T={ArrowDown:()=>{const $=t.collection.getKeyAfter(s);if($&&t.disabledKeys.has($)){const L=t.collection.getKeyAfter($);L&&g(L)}else $&&g($)},ArrowUp:()=>{const $=t.collection.getKeyBefore(s);if($&&t.disabledKeys.has($)){const L=t.collection.getKeyBefore($);L&&g(L)}else $&&g($)},Home:()=>{const $=t.collection.getFirstKey();$&&g($)},End:()=>{const $=t.collection.getLastKey();$&&g($)}}[P.key];T&&(P.preventDefault(),l.canSelectItem(s)&&T(P))},[s,l]);let{buttonProps:x}=NO({id:c,elementType:"button",isDisabled:h,onKeyDown:b,onPress:m},n),k=t.selectionManager.isSelected(r.key);return{buttonProps:{...x,"aria-expanded":k,"aria-controls":k?d:void 0},regionProps:{id:d,role:"region","aria-labelledby":c}}}function wk(e){return aM()?e.altKey:e.ctrlKey}function Lg(e,t){var n,r;let i=`[data-key="${CSS.escape(String(t))}"]`,s=(n=e.current)===null||n===void 0?void 0:n.dataset.collection;return s&&(i=`[data-collection="${CSS.escape(s)}"]${i}`),(r=e.current)===null||r===void 0?void 0:r.querySelector(i)}const A_=new WeakMap;function OO(e){let t=Ef();return A_.set(e,t),t}function zG(e){return A_.get(e)}const zO=1e3;function jO(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:r}=e,i=S.useRef({search:"",timeout:void 0}).current,s=l=>{let c=BO(l.key);if(!(!c||l.ctrlKey||l.metaKey||!l.currentTarget.contains(l.target))){if(c===" "&&i.search.trim().length>0&&(l.preventDefault(),"continuePropagation"in l||l.stopPropagation()),i.search+=c,t.getKeyForSearch!=null){let d=t.getKeyForSearch(i.search,n.focusedKey);d==null&&(d=t.getKeyForSearch(i.search)),d!=null&&(n.setFocusedKey(d),r&&r(d))}clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=""},zO)}};return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?s:void 0}}}function BO(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function VO(e){let{selectionManager:t,keyboardDelegate:n,ref:r,autoFocus:i=!1,shouldFocusWrap:s=!1,disallowEmptySelection:l=!1,disallowSelectAll:c=!1,escapeKeyBehavior:d="clearSelection",selectOnFocus:h=t.selectionBehavior==="replace",disallowTypeAhead:m=!1,shouldUseVirtualFocus:g,allowsTabNavigation:b=!1,isVirtualized:x,scrollRef:k=r,linkBehavior:P="action"}=e,{direction:_}=hh(),T=ax(),$=q=>{var V;if(q.altKey&&q.key==="Tab"&&q.preventDefault(),!(!((V=r.current)===null||V===void 0)&&V.contains(q.target)))return;const se=(_e,mt)=>{if(_e!=null){if(t.isLink(_e)&&P==="selection"&&h&&!wk(q)){LE.flushSync(()=>{t.setFocusedKey(_e,mt)});let pt=Lg(r,_e),Vt=t.getItemProps(_e);pt&&T.open(pt,q,Vt.href,Vt.routerOptions);return}if(t.setFocusedKey(_e,mt),t.isLink(_e)&&P==="override")return;q.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(_e):h&&!wk(q)&&t.replaceSelection(_e)}};switch(q.key){case"ArrowDown":if(n.getKeyBelow){var R,U,ie;let _e=t.focusedKey!=null?(R=n.getKeyBelow)===null||R===void 0?void 0:R.call(n,t.focusedKey):(U=n.getFirstKey)===null||U===void 0?void 0:U.call(n);_e==null&&s&&(_e=(ie=n.getFirstKey)===null||ie===void 0?void 0:ie.call(n,t.focusedKey)),_e!=null&&(q.preventDefault(),se(_e))}break;case"ArrowUp":if(n.getKeyAbove){var O,me,Ce;let _e=t.focusedKey!=null?(O=n.getKeyAbove)===null||O===void 0?void 0:O.call(n,t.focusedKey):(me=n.getLastKey)===null||me===void 0?void 0:me.call(n);_e==null&&s&&(_e=(Ce=n.getLastKey)===null||Ce===void 0?void 0:Ce.call(n,t.focusedKey)),_e!=null&&(q.preventDefault(),se(_e))}break;case"ArrowLeft":if(n.getKeyLeftOf){var ye,Fe,De;let _e=t.focusedKey!=null?(ye=n.getKeyLeftOf)===null||ye===void 0?void 0:ye.call(n,t.focusedKey):null;_e==null&&s&&(_e=_==="rtl"?(Fe=n.getFirstKey)===null||Fe===void 0?void 0:Fe.call(n,t.focusedKey):(De=n.getLastKey)===null||De===void 0?void 0:De.call(n,t.focusedKey)),_e!=null&&(q.preventDefault(),se(_e,_==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){var Te,Xe,lt;let _e=t.focusedKey!=null?(Te=n.getKeyRightOf)===null||Te===void 0?void 0:Te.call(n,t.focusedKey):null;_e==null&&s&&(_e=_==="rtl"?(Xe=n.getLastKey)===null||Xe===void 0?void 0:Xe.call(n,t.focusedKey):(lt=n.getFirstKey)===null||lt===void 0?void 0:lt.call(n,t.focusedKey)),_e!=null&&(q.preventDefault(),se(_e,_==="rtl"?"last":"first"))}break;case"Home":if(n.getFirstKey){if(t.focusedKey===null&&q.shiftKey)return;q.preventDefault();let _e=n.getFirstKey(t.focusedKey,hp(q));t.setFocusedKey(_e),_e!=null&&(hp(q)&&q.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(_e):h&&t.replaceSelection(_e))}break;case"End":if(n.getLastKey){if(t.focusedKey===null&&q.shiftKey)return;q.preventDefault();let _e=n.getLastKey(t.focusedKey,hp(q));t.setFocusedKey(_e),_e!=null&&(hp(q)&&q.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(_e):h&&t.replaceSelection(_e))}break;case"PageDown":if(n.getKeyPageBelow&&t.focusedKey!=null){let _e=n.getKeyPageBelow(t.focusedKey);_e!=null&&(q.preventDefault(),se(_e))}break;case"PageUp":if(n.getKeyPageAbove&&t.focusedKey!=null){let _e=n.getKeyPageAbove(t.focusedKey);_e!=null&&(q.preventDefault(),se(_e))}break;case"a":hp(q)&&t.selectionMode==="multiple"&&c!==!0&&(q.preventDefault(),t.selectAll());break;case"Escape":d==="clearSelection"&&!l&&t.selectedKeys.size!==0&&(q.stopPropagation(),q.preventDefault(),t.clearSelection());break;case"Tab":if(!b){if(q.shiftKey)r.current.focus();else{let _e=Xs(r.current,{tabbable:!0}),mt,pt;do pt=_e.lastChild(),pt&&(mt=pt);while(pt);mt&&!mt.contains(document.activeElement)&&Jl(mt)}break}}},L=S.useRef({top:0,left:0});ag(k,"scroll",x?void 0:()=>{var q,V,se,R;L.current={top:(se=(q=k.current)===null||q===void 0?void 0:q.scrollTop)!==null&&se!==void 0?se:0,left:(R=(V=k.current)===null||V===void 0?void 0:V.scrollLeft)!==null&&R!==void 0?R:0}});let z=q=>{if(t.isFocused){q.currentTarget.contains(q.target)||t.setFocused(!1);return}if(q.currentTarget.contains(q.target)){if(t.setFocused(!0),t.focusedKey==null){var V,se;let ie=me=>{me!=null&&(t.setFocusedKey(me),h&&!t.isSelected(me)&&t.replaceSelection(me))},O=q.relatedTarget;var R,U;O&&q.currentTarget.compareDocumentPosition(O)&Node.DOCUMENT_POSITION_FOLLOWING?ie((R=t.lastSelectedKey)!==null&&R!==void 0?R:(V=n.getLastKey)===null||V===void 0?void 0:V.call(n)):ie((U=t.firstSelectedKey)!==null&&U!==void 0?U:(se=n.getFirstKey)===null||se===void 0?void 0:se.call(n))}else!x&&k.current&&(k.current.scrollTop=L.current.top,k.current.scrollLeft=L.current.left);if(t.focusedKey!=null&&k.current){let ie=Lg(r,t.focusedKey);ie instanceof HTMLElement&&(!ie.contains(document.activeElement)&&!g&&Jl(ie),oh()==="keyboard"&&k1(ie,{containingElement:r.current}))}}},K=q=>{q.currentTarget.contains(q.relatedTarget)||t.setFocused(!1)},M=S.useRef(!1);ag(r,yM,g?q=>{let{detail:V}=q;q.stopPropagation(),t.setFocused(!0),V?.focusStrategy==="first"&&(M.current=!0)}:void 0);let J=jn(()=>{var q,V;let se=(V=(q=n.getFirstKey)===null||q===void 0?void 0:q.call(n))!==null&&V!==void 0?V:null;se==null?(tF(r.current),t.collection.size>0&&(M.current=!1)):(t.setFocusedKey(se),M.current=!1)});x1(()=>{M.current&&J()},[t.collection,J]);let re=jn(()=>{t.collection.size>0&&(M.current=!1)});x1(()=>{re()},[t.focusedKey,re]),ag(r,vM,g?q=>{var V;q.stopPropagation(),t.setFocused(!1),!((V=q.detail)===null||V===void 0)&&V.clearFocusKey&&t.setFocusedKey(null)}:void 0);const ae=S.useRef(i),j=S.useRef(!1);S.useEffect(()=>{if(ae.current){var q,V;let U=null;var se;i==="first"&&(U=(se=(q=n.getFirstKey)===null||q===void 0?void 0:q.call(n))!==null&&se!==void 0?se:null);var R;i==="last"&&(U=(R=(V=n.getLastKey)===null||V===void 0?void 0:V.call(n))!==null&&R!==void 0?R:null);let ie=t.selectedKeys;if(ie.size){for(let O of ie)if(t.canSelectItem(O)){U=O;break}}t.setFocused(!0),t.setFocusedKey(U),U==null&&!g&&r.current&&ku(r.current),t.collection.size>0&&(ae.current=!1,j.current=!0)}});let B=S.useRef(t.focusedKey),Y=S.useRef(null);S.useEffect(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==B.current||j.current)&&k.current&&r.current){let q=oh(),V=Lg(r,t.focusedKey);if(!(V instanceof HTMLElement))return;(q==="keyboard"||j.current)&&(Y.current&&cancelAnimationFrame(Y.current),Y.current=requestAnimationFrame(()=>{k.current&&($E(k.current,V),q!=="virtual"&&k1(V,{containingElement:r.current}))}))}!g&&t.isFocused&&t.focusedKey==null&&B.current!=null&&r.current&&ku(r.current),B.current=t.focusedKey,j.current=!1}),S.useEffect(()=>()=>{Y.current&&cancelAnimationFrame(Y.current)},[]),ag(r,"react-aria-focus-scope-restore",q=>{q.preventDefault(),t.setFocused(!0)});let te={onKeyDown:$,onFocus:z,onBlur:K,onMouseDown(q){k.current===q.target&&q.preventDefault()}},{typeSelectProps:G}=jO({keyboardDelegate:n,selectionManager:t});m||(te=Pn(G,te));let ce;g||(ce=t.focusedKey==null?0:-1);let Z=OO(t.collection);return{collectionProps:Pn(te,{tabIndex:ce,"data-collection":Z})}}class Sk{getItemRect(t){let n=this.ref.current;if(!n)return null;let r=t!=null?Lg(this.ref,t):null;if(!r)return null;let i=n.getBoundingClientRect(),s=r.getBoundingClientRect();return{x:s.left-i.left+n.scrollLeft,y:s.top-i.top+n.scrollTop,width:s.width,height:s.height}}getContentSize(){let t=this.ref.current;var n,r;return{width:(n=t?.scrollWidth)!==null&&n!==void 0?n:0,height:(r=t?.scrollHeight)!==null&&r!==void 0?r:0}}getVisibleRect(){let t=this.ref.current;var n,r,i,s;return{x:(n=t?.scrollLeft)!==null&&n!==void 0?n:0,y:(r=t?.scrollTop)!==null&&r!==void 0?r:0,width:(i=t?.offsetWidth)!==null&&i!==void 0?i:0,height:(s=t?.offsetHeight)!==null&&s!==void 0?s:0}}constructor(t){this.ref=t}}class UO{isDisabled(t){var n;return this.disabledBehavior==="all"&&(((n=t.props)===null||n===void 0?void 0:n.isDisabled)||this.disabledKeys.has(t.key))}findNextNonDisabled(t,n){let r=t;for(;r!=null;){let i=this.collection.getItem(r);if(i?.type==="item"&&!this.isDisabled(i))return r;r=n(r)}return null}getNextKey(t){let n=t;return n=this.collection.getKeyAfter(n),this.findNextNonDisabled(n,r=>this.collection.getKeyAfter(r))}getPreviousKey(t){let n=t;return n=this.collection.getKeyBefore(n),this.findNextNonDisabled(n,r=>this.collection.getKeyBefore(r))}findKey(t,n,r){let i=t,s=this.layoutDelegate.getItemRect(i);if(!s||i==null)return null;let l=s;do{if(i=n(i),i==null)break;s=this.layoutDelegate.getItemRect(i)}while(s&&r(l,s)&&i!=null);return i}isSameRow(t,n){return t.y===n.y||t.x!==n.x}isSameColumn(t,n){return t.x===n.x||t.y!==n.y}getKeyBelow(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,n=>this.getNextKey(n),this.isSameRow):this.getNextKey(t)}getKeyAbove(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,n=>this.getPreviousKey(n),this.isSameRow):this.getPreviousKey(t)}getNextColumn(t,n){return n?this.getPreviousKey(t):this.getNextKey(t)}getKeyRightOf(t){let n=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[n]?(t=this.layoutDelegate[n](t),this.findNextNonDisabled(t,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="rtl"):this.findKey(t,r=>this.getNextColumn(r,this.direction==="rtl"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="rtl"):null}getKeyLeftOf(t){let n=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[n]?(t=this.layoutDelegate[n](t),this.findNextNonDisabled(t,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="ltr"):this.findKey(t,r=>this.getNextColumn(r,this.direction==="ltr"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="ltr"):null}getFirstKey(){let t=this.collection.getFirstKey();return this.findNextNonDisabled(t,n=>this.collection.getKeyAfter(n))}getLastKey(){let t=this.collection.getLastKey();return this.findNextNonDisabled(t,n=>this.collection.getKeyBefore(n))}getKeyPageAbove(t){let n=this.ref.current,r=this.layoutDelegate.getItemRect(t);if(!r)return null;if(n&&!qp(n))return this.getFirstKey();let i=t;if(this.orientation==="horizontal"){let s=Math.max(0,r.x+r.width-this.layoutDelegate.getVisibleRect().width);for(;r&&r.x>s&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}else{let s=Math.max(0,r.y+r.height-this.layoutDelegate.getVisibleRect().height);for(;r&&r.y>s&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}return i??this.getFirstKey()}getKeyPageBelow(t){let n=this.ref.current,r=this.layoutDelegate.getItemRect(t);if(!r)return null;if(n&&!qp(n))return this.getLastKey();let i=t;if(this.orientation==="horizontal"){let s=Math.min(this.layoutDelegate.getContentSize().width,r.y-r.width+this.layoutDelegate.getVisibleRect().width);for(;r&&r.xs||new UO({collection:n,disabledKeys:r,disabledBehavior:d,ref:i,collator:c,layoutDelegate:l}),[s,l,n,r,i,c,d]),{collectionProps:m}=VO({...e,ref:i,selectionManager:t,keyboardDelegate:h});return{listProps:m}}function WO(e,t,n){let{listProps:r}=KO({...e,...t,allowsTabNavigation:!0,disallowSelectAll:!0,ref:n});return delete r.onKeyDownCapture,{accordionProps:{...r,tabIndex:void 0}}}function HO(e){var t,n;const r=si(),{ref:i,as:s,item:l,onFocusChange:c}=e,{state:d,className:h,indicator:m,children:g,title:b,subtitle:x,startContent:k,motionProps:P,focusedKey:_,variant:T,isCompact:$=!1,classNames:L={},isDisabled:z=!1,hideIndicator:K=!1,disableAnimation:M=(t=r?.disableAnimation)!=null?t:!1,keepContentMounted:J=!1,disableIndicatorAnimation:re=!1,HeadingComponent:ae=s||"h2",onPress:j,onPressStart:B,onPressEnd:Y,onPressChange:te,onPressUp:G,onClick:ce,...Z}=e,q=s||"div",V=typeof q=="string",se=Ji(i),R=d.disabledKeys.has(l.key)||z,U=d.selectionManager.isSelected(l.key),{buttonProps:ie,regionProps:O}=FO({item:l,isDisabled:R},{...d,focusedKey:_},se),{onFocus:me,onBlur:Ce,...ye}=ie,{isFocused:Fe,isFocusVisible:De,focusProps:Te}=Af({autoFocus:(n=l.props)==null?void 0:n.autoFocus}),{isHovered:Xe,hoverProps:lt}=Cu({isDisabled:R}),{pressProps:_e,isPressed:mt}=wu({ref:se,isDisabled:R,onPress:j,onPressStart:B,onPressEnd:Y,onPressChange:te,onPressUp:G}),pt=S.useCallback(()=>{c?.(!0,l.key)},[]),Vt=S.useCallback(()=>{c?.(!1,l.key)},[]),Ve=S.useMemo(()=>({...L}),[tl(L)]),it=S.useMemo(()=>AO({isCompact:$,isDisabled:R,hideIndicator:K,disableAnimation:M,disableIndicatorAnimation:re,variant:T}),[$,R,K,M,re,T]),Ut=tn(Ve?.base,h),Zn=S.useCallback((pe={})=>({"data-open":$e(U),"data-disabled":$e(R),"data-slot":"base",className:it.base({class:Ut}),...on(Cf(Z,{enabled:V}),pe)}),[Ut,V,Z,it,l.props,U,R]),ln=(pe={})=>{var Se,Oe;return{ref:se,"data-open":$e(U),"data-focus":$e(Fe),"data-focus-visible":$e(De),"data-disabled":$e(R),"data-hover":$e(Xe),"data-pressed":$e(mt),"data-slot":"trigger",className:it.trigger({class:Ve?.trigger}),onFocus:c1(pt,me,Te.onFocus,Z.onFocus,(Se=l.props)==null?void 0:Se.onFocus),onBlur:c1(Vt,Ce,Te.onBlur,Z.onBlur,(Oe=l.props)==null?void 0:Oe.onBlur),...on(ye,lt,_e,pe,{onClick:Ql(_e.onClick,ce)})}},_t=S.useCallback((pe={})=>({"data-open":$e(U),"data-disabled":$e(R),"data-slot":"content",className:it.content({class:Ve?.content}),...on(O,pe)}),[it,Ve,O,U,R,Ve?.content]),Rt=S.useCallback((pe={})=>({"aria-hidden":$e(!0),"data-open":$e(U),"data-disabled":$e(R),"data-slot":"indicator",className:it.indicator({class:Ve?.indicator}),...pe}),[it,Ve?.indicator,U,R,Ve?.indicator]),Tn=S.useCallback((pe={})=>({"data-open":$e(U),"data-disabled":$e(R),"data-slot":"heading",className:it.heading({class:Ve?.heading}),...pe}),[it,Ve?.heading,U,R,Ve?.heading]),Cr=S.useCallback((pe={})=>({"data-open":$e(U),"data-disabled":$e(R),"data-slot":"title",className:it.title({class:Ve?.title}),...pe}),[it,Ve?.title,U,R,Ve?.title]),Nt=S.useCallback((pe={})=>({"data-open":$e(U),"data-disabled":$e(R),"data-slot":"subtitle",className:it.subtitle({class:Ve?.subtitle}),...pe}),[it,Ve,U,R,Ve?.subtitle]);return{Component:q,HeadingComponent:ae,item:l,slots:it,classNames:Ve,domRef:se,indicator:m,children:g,title:b,subtitle:x,startContent:k,isOpen:U,isDisabled:R,hideIndicator:K,keepContentMounted:J,disableAnimation:M,motionProps:P,getBaseProps:Zn,getHeadingProps:Tn,getButtonProps:ln,getContentProps:_t,getIndicatorProps:Rt,getTitleProps:Cr,getSubtitleProps:Nt}}var kk=e=>D.jsx("svg",{"aria-hidden":"true",fill:"none",focusable:"false",height:"1em",role:"presentation",viewBox:"0 0 24 24",width:"1em",...e,children:D.jsx("path",{d:"M15.5 19l-7-7 7-7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})}),GO=e=>D.jsx("svg",{"aria-hidden":"true",focusable:"false",height:"1em",role:"presentation",viewBox:"0 0 24 24",width:"1em",...e,children:D.jsx("path",{d:"M12 2a10 10 0 1010 10A10.016 10.016 0 0012 2zm3.36 12.3a.754.754 0 010 1.06.748.748 0 01-1.06 0l-2.3-2.3-2.3 2.3a.748.748 0 01-1.06 0 .754.754 0 010-1.06l2.3-2.3-2.3-2.3A.75.75 0 019.7 8.64l2.3 2.3 2.3-2.3a.75.75 0 011.06 1.06l-2.3 2.3z",fill:"currentColor"})}),qO=e=>{const{isSelected:t,isIndeterminate:n,disableAnimation:r,...i}=e;return D.jsx("svg",{"aria-hidden":"true",className:"fill-current",fill:"none",focusable:"false",height:"1em",role:"presentation",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",width:"1em",...i,children:D.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})},Bp={ease:[.36,.66,.4,1]},Jg={scaleSpring:{enter:{transform:"scale(1)",opacity:1,transition:{type:"spring",bounce:0,duration:.2}},exit:{transform:"scale(0.85)",opacity:0,transition:{type:"easeOut",duration:.15}}},scaleSpringOpacity:{initial:{opacity:0,transform:"scale(0.8)"},enter:{opacity:1,transform:"scale(1)",transition:{type:"spring",bounce:0,duration:.3}},exit:{opacity:0,transform:"scale(0.96)",transition:{type:"easeOut",bounce:0,duration:.15}}},fade:{enter:{opacity:1,transition:{duration:.4,ease:Bp.ease}},exit:{opacity:0,transition:{duration:.3,ease:Bp.ease}}},collapse:{enter:{opacity:1,height:"auto",transition:{height:{type:"spring",bounce:0,duration:.3},opacity:{easings:"ease",duration:.4}}},exit:{opacity:0,height:0,transition:{easings:"ease",duration:.3}}}},Ck=()=>no(()=>import("./index-BoBogvMe.js"),[]).then(e=>e.default),R_=li((e,t)=>{const{Component:n,HeadingComponent:r,classNames:i,slots:s,indicator:l,children:c,title:d,subtitle:h,startContent:m,isOpen:g,isDisabled:b,hideIndicator:x,keepContentMounted:k,disableAnimation:P,motionProps:_,getBaseProps:T,getHeadingProps:$,getButtonProps:L,getTitleProps:z,getSubtitleProps:K,getContentProps:M,getIndicatorProps:J}=HO({...e,ref:t}),re=f5(),j=S.useMemo(()=>typeof l=="function"?l({indicator:D.jsx(kk,{}),isOpen:g,isDisabled:b}):l||null,[l,g,b])||D.jsx(kk,{}),B=S.useMemo(()=>{if(P)return k?D.jsx("div",{...M(),children:c}):g&&D.jsx("div",{...M(),children:c});const Y={exit:{...Jg.collapse.exit,overflowY:"hidden"},enter:{...Jg.collapse.enter,overflowY:"unset"}};return k?D.jsx(If,{features:Ck,children:D.jsx($f.section,{animate:g?"enter":"exit",exit:"exit",initial:"exit",style:{willChange:re},variants:Y,onKeyDown:te=>{te.stopPropagation()},..._,children:D.jsx("div",{...M(),children:c})},"accordion-content")}):D.jsx(Au,{initial:!1,children:g&&D.jsx(If,{features:Ck,children:D.jsx($f.section,{animate:"enter",exit:"exit",initial:"exit",style:{willChange:re},variants:Y,onKeyDown:te=>{te.stopPropagation()},..._,children:D.jsx("div",{...M(),children:c})},"accordion-content")})})},[g,P,k,c,_]);return D.jsxs(n,{...T(),children:[D.jsx(r,{...$(),children:D.jsxs("button",{...L(),children:[m&&D.jsx("div",{className:s.startContent({class:i?.startContent}),children:m}),D.jsxs("div",{className:s.titleWrapper({class:i?.titleWrapper}),children:[d&&D.jsx("span",{...z(),children:d}),h&&D.jsx("span",{...K(),children:h})]}),!x&&j&&D.jsx("span",{...J(),children:j})]})}),B]})});R_.displayName="HeroUI.AccordionItem";var YO=R_;class XO{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let n=this.keyMap.get(t);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(t){let n=this.keyMap.get(t);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(t){var n;return(n=this.keyMap.get(t))!==null&&n!==void 0?n:null}at(t){const n=[...this.getKeys()];return this.getItem(n[t])}constructor(t,{expandedKeys:n}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=t,n=n||new Set;let r=c=>{if(this.keyMap.set(c.key,c),c.childNodes&&(c.type==="section"||n.has(c.key)))for(let d of c.childNodes)r(d)};for(let c of t)r(c);let i=null,s=0;for(let[c,d]of this.keyMap)i?(i.nextKey=c,d.prevKey=i.key):(this.firstKey=c,d.prevKey=void 0),d.type==="item"&&(d.index=s++),i=d,i.nextKey=void 0;var l;this.lastKey=(l=i?.key)!==null&&l!==void 0?l:null}}class Co extends Set{constructor(t,n,r){super(t),t instanceof Co?(this.anchorKey=n??t.anchorKey,this.currentKey=r??t.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}}function QO(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function JO(e){let{selectionMode:t="none",disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i="toggle",disabledBehavior:s="all"}=e,l=S.useRef(!1),[,c]=S.useState(!1),d=S.useRef(null),h=S.useRef(null),[,m]=S.useState(null),g=S.useMemo(()=>Ek(e.selectedKeys),[e.selectedKeys]),b=S.useMemo(()=>Ek(e.defaultSelectedKeys,new Co),[e.defaultSelectedKeys]),[x,k]=Iu(g,b,e.onSelectionChange),P=S.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[_,T]=S.useState(i);i==="replace"&&_==="toggle"&&typeof x=="object"&&x.size===0&&T("replace");let $=S.useRef(i);return S.useEffect(()=>{i!==$.current&&(T(i),$.current=i)},[i]),{selectionMode:t,disallowEmptySelection:n,selectionBehavior:_,setSelectionBehavior:T,get isFocused(){return l.current},setFocused(L){l.current=L,c(L)},get focusedKey(){return d.current},get childFocusStrategy(){return h.current},setFocusedKey(L,z="first"){d.current=L,h.current=z,m(L)},selectedKeys:x,setSelectedKeys(L){(r||!QO(L,x))&&k(L)},disabledKeys:P,disabledBehavior:s}}function Ek(e,t){return e?e==="all"?"all":new Co(e):t}function L_(e){return null}L_.getCollectionNode=function*(t,n){let{childItems:r,title:i,children:s}=t,l=t.title||t.children,c=t.textValue||(typeof l=="string"?l:"")||t["aria-label"]||"";!c&&n?.suppressTextValueWarning,yield{type:"item",props:t,rendered:l,textValue:c,"aria-label":t["aria-label"],hasChildNodes:ZO(t),*childNodes(){if(r)for(let d of r)yield{type:"item",value:d};else if(i){let d=[];We.Children.forEach(s,h=>{d.push({type:"item",element:h})}),yield*d}}}};function ZO(e){return e.hasChildItems!=null?e.hasChildItems:!!(e.childItems||e.title&&We.Children.count(e.children)>0)}let e6=L_;class t6{build(t,n){return this.context=n,Pk(()=>this.iterateCollection(t))}*iterateCollection(t){let{children:n,items:r}=t;if(We.isValidElement(n)&&n.type===We.Fragment)yield*this.iterateCollection({children:n.props.children,items:r});else if(typeof n=="function"){if(!r)throw new Error("props.children was a function but props.items is missing");let i=0;for(let s of r)yield*this.getFullNode({value:s,index:i},{renderer:n}),i++}else{let i=[];We.Children.forEach(n,l=>{l&&i.push(l)});let s=0;for(let l of i){let c=this.getFullNode({element:l,index:s},{});for(let d of c)s++,yield d}}}getKey(t,n,r,i){if(t.key!=null)return t.key;if(n.type==="cell"&&n.key!=null)return`${i}${n.key}`;let s=n.value;if(s!=null){var l;let c=(l=s.key)!==null&&l!==void 0?l:s.id;if(c==null)throw new Error("No key found for item");return c}return i?`${i}.${n.index}`:`$.${n.index}`}getChildState(t,n){return{renderer:n.renderer||t.renderer}}*getFullNode(t,n,r,i){if(We.isValidElement(t.element)&&t.element.type===We.Fragment){let _=[];We.Children.forEach(t.element.props.children,$=>{_.push($)});var s;let T=(s=t.index)!==null&&s!==void 0?s:0;for(const $ of _)yield*this.getFullNode({element:$,index:T++},n,r,i);return}let l=t.element;if(!l&&t.value&&n&&n.renderer){let _=this.cache.get(t.value);if(_&&(!_.shouldInvalidate||!_.shouldInvalidate(this.context))){_.index=t.index,_.parentKey=i?i.key:null,yield _;return}l=n.renderer(t.value)}if(We.isValidElement(l)){let _=l.type;if(typeof _!="function"&&typeof _.getCollectionNode!="function"){let z=l.type;throw new Error(`Unknown element <${z}> in collection.`)}let T=_.getCollectionNode(l.props,this.context);var c;let $=(c=t.index)!==null&&c!==void 0?c:0,L=T.next();for(;!L.done&&L.value;){let z=L.value;t.index=$;var d;let K=(d=z.key)!==null&&d!==void 0?d:null;K==null&&(K=z.element?null:this.getKey(l,t,n,r));let J=[...this.getFullNode({...z,key:K,index:$,wrapper:n6(t.wrapper,z.wrapper)},this.getChildState(n,z),r?`${r}${l.key}`:l.key,i)];for(let re of J){var h,m;re.value=(m=(h=z.value)!==null&&h!==void 0?h:t.value)!==null&&m!==void 0?m:null,re.value&&this.cache.set(re.value,re);var g;if(t.type&&re.type!==t.type)throw new Error(`Unsupported type <${h0(re.type)}> in <${h0((g=i?.type)!==null&&g!==void 0?g:"unknown parent type")}>. Only <${h0(t.type)}> is supported.`);$++,yield re}L=T.next(J)}return}if(t.key==null||t.type==null)return;let b=this;var x,k;let P={type:t.type,props:t.props,key:t.key,parentKey:i?i.key:null,value:(x=t.value)!==null&&x!==void 0?x:null,level:i?i.level+1:0,index:t.index,rendered:t.rendered,textValue:(k=t.textValue)!==null&&k!==void 0?k:"","aria-label":t["aria-label"],wrapper:t.wrapper,shouldInvalidate:t.shouldInvalidate,hasChildNodes:t.hasChildNodes||!1,childNodes:Pk(function*(){if(!t.hasChildNodes||!t.childNodes)return;let _=0;for(let T of t.childNodes()){T.key!=null&&(T.key=`${P.key}${T.key}`);let $=b.getFullNode({...T,index:_},b.getChildState(n,T),P.key,P);for(let L of $)_++,yield L}})};yield P}constructor(){this.cache=new WeakMap}}function Pk(e){let t=[],n=null;return{*[Symbol.iterator](){for(let r of t)yield r;n||(n=e());for(let r of n)t.push(r),yield r}}}function n6(e,t){if(e&&t)return n=>e(t(n));if(e)return e;if(t)return t}function h0(e){return e[0].toUpperCase()+e.slice(1)}function r6(e,t,n){let r=S.useMemo(()=>new t6,[]),{children:i,items:s,collection:l}=e;return S.useMemo(()=>{if(l)return l;let d=r.build({children:i,items:s},n);return t(d)},[r,i,s,l,n,t])}function i6(e,t){return typeof t.getChildren=="function"?t.getChildren(e.key):e.childNodes}function o6(e){return s6(e,0)}function s6(e,t){if(t<0)return;let n=0;for(let r of e){if(n===t)return r;n++}}function jG(e){let t;for(let n of e)t=n;return t}function m0(e,t,n){if(t.parentKey===n.parentKey)return t.index-n.index;let r=[...Tk(e,t),t],i=[...Tk(e,n),n],s=r.slice(0,i.length).findIndex((l,c)=>l!==i[c]);return s!==-1?(t=r[s],n=i[s],t.index-n.index):r.findIndex(l=>l===n)>=0?1:(i.findIndex(l=>l===t)>=0,-1)}function Tk(e,t){let n=[],r=t;for(;r?.parentKey!=null;)r=e.getItem(r.parentKey),r&&n.unshift(r);return n}class Qx{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(t){this.state.setSelectionBehavior(t)}get isFocused(){return this.state.isFocused}setFocused(t){this.state.setFocused(t)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(t,n){(t==null||this.collection.getItem(t))&&this.state.setFocusedKey(t,n)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(t){if(this.state.selectionMode==="none")return!1;let n=this.getKey(t);return n==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(n):this.state.selectedKeys.has(n)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let t=this.getSelectAllKeys(),n=this.state.selectedKeys;return this._isSelectAll=t.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let t=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!t||i&&m0(this.collection,i,t)<0)&&(t=i)}var n;return(n=t?.key)!==null&&n!==void 0?n:null}get lastSelectedKey(){let t=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!t||i&&m0(this.collection,i,t)>0)&&(t=i)}var n;return(n=t?.key)!==null&&n!==void 0?n:null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(t);return}let n=this.getKey(t);if(n==null)return;let r;if(this.state.selectedKeys==="all")r=new Co([n],n,n);else{let l=this.state.selectedKeys;var i;let c=(i=l.anchorKey)!==null&&i!==void 0?i:n;r=new Co(l,c,n);var s;for(let d of this.getKeyRange(c,(s=l.currentKey)!==null&&s!==void 0?s:n))r.delete(d);for(let d of this.getKeyRange(n,c))this.canSelectItem(d)&&r.add(d)}this.state.setSelectedKeys(r)}getKeyRange(t,n){let r=this.collection.getItem(t),i=this.collection.getItem(n);return r&&i?m0(this.collection,r,i)<=0?this.getKeyRangeInternal(t,n):this.getKeyRangeInternal(n,t):[]}getKeyRangeInternal(t,n){var r;if(!((r=this.layoutDelegate)===null||r===void 0)&&r.getKeyRange)return this.layoutDelegate.getKeyRange(t,n);let i=[],s=t;for(;s!=null;){let l=this.collection.getItem(s);if(l&&(l.type==="item"||l.type==="cell"&&this.allowsCellSelection)&&i.push(s),s===n)return i;s=this.collection.getKeyAfter(s)}return[]}getKey(t){let n=this.collection.getItem(t);if(!n||n.type==="cell"&&this.allowsCellSelection)return t;for(;n&&n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(t)){this.replaceSelection(t);return}let n=this.getKey(t);if(n==null)return;let r=new Co(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);r.has(n)?r.delete(n):this.canSelectItem(n)&&(r.add(n),r.anchorKey=n,r.currentKey=n),!(this.disallowEmptySelection&&r.size===0)&&this.state.setSelectedKeys(r)}replaceSelection(t){if(this.selectionMode==="none")return;let n=this.getKey(t);if(n==null)return;let r=this.canSelectItem(n)?new Co([n],n,n):new Co;this.state.setSelectedKeys(r)}setSelectedKeys(t){if(this.selectionMode==="none")return;let n=new Co;for(let r of t){let i=this.getKey(r);if(i!=null&&(n.add(i),this.selectionMode==="single"))break}this.state.setSelectedKeys(n)}getSelectAllKeys(){let t=[],n=r=>{for(;r!=null;){if(this.canSelectItem(r)){var i;let l=this.collection.getItem(r);l?.type==="item"&&t.push(r);var s;l?.hasChildNodes&&(this.allowsCellSelection||l.type!=="item")&&n((s=(i=o6(i6(l,this.collection)))===null||i===void 0?void 0:i.key)!==null&&s!==void 0?s:null)}r=this.collection.getKeyAfter(r)}};return n(this.collection.getFirstKey()),t}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new Co)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(t,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(t)&&!this.disallowEmptySelection?this.toggleSelection(t):this.replaceSelection(t):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(t):this.replaceSelection(t))}isSelectionEqual(t){if(t===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(t.size!==n.size)return!1;for(let r of t)if(!n.has(r))return!1;for(let r of n)if(!t.has(r))return!1;return!0}canSelectItem(t){var n;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(t))return!1;let r=this.collection.getItem(t);return!(!r||!(r==null||(n=r.props)===null||n===void 0)&&n.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(t){var n,r;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(t)||!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled))}isLink(t){var n,r;return!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.href)}getItemProps(t){var n;return(n=this.collection.getItem(t))===null||n===void 0?void 0:n.props}withCollection(t){return new Qx(t,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0})}constructor(t,n,r){this.collection=t,this.state=n;var i;this.allowsCellSelection=(i=r?.allowsCellSelection)!==null&&i!==void 0?i:!1,this._isSelectAll=null,this.layoutDelegate=r?.layoutDelegate||null}}function l6(e){let{onExpandedChange:t}=e,[n,r]=Iu(e.expandedKeys?new Set(e.expandedKeys):void 0,e.defaultExpandedKeys?new Set(e.defaultExpandedKeys):new Set,t),i=JO(e),s=S.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),l=r6(e,S.useCallback(d=>new XO(d,{expandedKeys:n}),[n]),null);return S.useEffect(()=>{i.focusedKey!=null&&!l.getItem(i.focusedKey)&&i.setFocusedKey(null)},[l,i.focusedKey]),{collection:l,expandedKeys:n,disabledKeys:s,toggleKey:d=>{r(a6(n,d))},setExpandedKeys:r,selectionManager:new Qx(l,i)}}function a6(e,t){let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}function u6(e){var t;const n=si(),{ref:r,as:i,className:s,items:l,variant:c,motionProps:d,expandedKeys:h,disabledKeys:m,selectedKeys:g,children:b,defaultExpandedKeys:x,selectionMode:k="single",selectionBehavior:P="toggle",keepContentMounted:_=!1,disallowEmptySelection:T,defaultSelectedKeys:$,onExpandedChange:L,onSelectionChange:z,dividerProps:K={},isCompact:M=!1,isDisabled:J=!1,showDivider:re=!0,hideIndicator:ae=!1,disableAnimation:j=(t=n?.disableAnimation)!=null?t:!1,disableIndicatorAnimation:B=!1,itemClasses:Y,...te}=e,[G,ce]=S.useState(null),Z=i||"div",q=typeof Z=="string",V=Ji(r),se=S.useMemo(()=>$O({variant:c,className:s}),[c,s]),U={children:S.useMemo(()=>{let Te=[];return We.Children.map(b,Xe=>{var lt;if(We.isValidElement(Xe)&&typeof((lt=Xe.props)==null?void 0:lt.children)!="string"){const _e=We.cloneElement(Xe,{hasChildItems:!1});Te.push(_e)}else Te.push(Xe)}),Te},[b]),items:l},ie={expandedKeys:h,defaultExpandedKeys:x,onExpandedChange:L},O={disabledKeys:m,selectedKeys:g,selectionMode:k,selectionBehavior:P,disallowEmptySelection:T,defaultSelectedKeys:$??x,onSelectionChange:z,...U,...ie},me=l6(O);me.selectionManager.setFocusedKey=Te=>{ce(Te)};const{accordionProps:Ce}=WO({...U,...ie},me,V),ye=S.useMemo(()=>({state:me,focusedKey:G,motionProps:d,isCompact:M,isDisabled:J,hideIndicator:ae,disableAnimation:j,keepContentMounted:_,disableIndicatorAnimation:B}),[G,M,J,ae,g,j,_,me?.expandedKeys.values,B,me.expandedKeys.size,me.disabledKeys.size,d]),Fe=S.useCallback((Te={})=>({ref:V,className:se,"data-orientation":"vertical",...on(Ce,Cf(te,{enabled:q}),Te)}),[]),De=S.useCallback((Te,Xe)=>{Te&&ce(Xe)},[]);return{Component:Z,values:ye,state:me,focusedKey:G,getBaseProps:Fe,isSplitted:c==="splitted",classNames:se,showDivider:re,dividerProps:K,disableAnimation:j,handleFocusChanged:De,itemClasses:Y}}function c6(e){let t=Cf(e,{enabled:typeof e.elementType=="string"}),n;return e.orientation==="vertical"&&(n="vertical"),e.elementType!=="hr"?{separatorProps:{...t,role:"separator","aria-orientation":n}}:{separatorProps:t}}function f6(e){const{as:t,className:n,orientation:r,...i}=e;let s=t||"hr";s==="hr"&&r==="vertical"&&(s="div");const{separatorProps:l}=c6({elementType:typeof s=="string"?s:"hr",orientation:r}),c=S.useMemo(()=>PO({orientation:r,className:n}),[r,n]),d=S.useCallback((h={})=>({className:c,role:"separator","data-orientation":r,...l,...i,...h}),[c,r,l,i]);return{Component:s,getDividerProps:d}}var M_=li((e,t)=>{const{Component:n,getDividerProps:r}=f6({...e});return D.jsx(n,{ref:t,...r()})});M_.displayName="HeroUI.Divider";var d6=M_,D_=li((e,t)=>{const{Component:n,values:r,state:i,isSplitted:s,showDivider:l,getBaseProps:c,disableAnimation:d,handleFocusChanged:h,itemClasses:m,dividerProps:g}=u6({...e,ref:t}),b=S.useCallback((k,P)=>h(k,P),[h]),x=S.useMemo(()=>[...i.collection].map((k,P)=>{const _={...m,...k.props.classNames||{}};return D.jsxs(S.Fragment,{children:[D.jsx(YO,{item:k,variant:e.variant,onFocusChange:b,...r,...k.props,classNames:_}),!k.props.hidden&&!s&&l&&P{const t={top:{originY:1},bottom:{originY:0},left:{originX:1},right:{originX:0},"top-start":{originX:0,originY:1},"top-end":{originX:1,originY:1},"bottom-start":{originX:0,originY:0},"bottom-end":{originX:1,originY:0},"right-start":{originX:0,originY:0},"right-end":{originX:0,originY:1},"left-start":{originX:1,originY:0},"left-end":{originX:1,originY:1}};return t?.[e]||{}},h6=e=>({top:"top",bottom:"bottom",left:"left",right:"right","top-start":"top start","top-end":"top end","bottom-start":"bottom start","bottom-end":"bottom end","left-start":"left top","left-end":"left bottom","right-start":"right top","right-end":"right bottom"})[e],BG=(e,t)=>{if(t.includes("-")){const[n]=t.split("-");if(n.includes(e))return!1}return!0},Ik=(e,t)=>{if(t.includes("-")){const[,n]=t.split("-");return`${e}-${n}`}return e},m6=e6,bp=m6,Sh=globalThis?.document?S.useLayoutEffect:S.useEffect;function g6(e={}){const{onLoad:t,onError:n,ignoreFallback:r,src:i,crossOrigin:s,srcSet:l,sizes:c,loading:d,shouldBypassImageLoad:h=!1}=e,m=vL(),g=S.useRef(m?new Image:null),[b,x]=S.useState("pending");S.useEffect(()=>{g.current&&(g.current.onload=_=>{k(),x("loaded"),t?.(_)},g.current.onerror=_=>{k(),x("failed"),n?.(_)})},[g.current]);const k=()=>{g.current&&(g.current.onload=null,g.current.onerror=null,g.current=null)},P=S.useCallback(()=>{if(!i)return"pending";if(r||h)return"loaded";const _=new Image;return _.src=i,s&&(_.crossOrigin=s),l&&(_.srcset=l),c&&(_.sizes=c),d&&(_.loading=d),g.current=_,_.complete&&_.naturalWidth?"loaded":"loading"},[i,s,l,c,t,n,d,h]);return Sh(()=>{m&&x(P())},[m,P]),r?"loaded":b}var[VG,v6]=dv({name:"ButtonGroupContext",strict:!1});function N_(e,t){let{elementType:n="button",isDisabled:r,onPress:i,onPressStart:s,onPressEnd:l,onPressUp:c,onPressChange:d,preventFocusOnPress:h,allowFocusWhenDisabled:m,onClick:g,href:b,target:x,rel:k,type:P="button",allowTextSelectionOnPress:_}=e,T;n==="button"?T={type:P,disabled:r}:T={role:"button",href:n==="a"&&!r?b:void 0,target:n==="a"?x:void 0,type:n==="input"?P:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?k:void 0};let{pressProps:$,isPressed:L}=wu({onClick:g,onPressStart:s,onPressEnd:l,onPressUp:c,onPressChange:d,onPress:i,isDisabled:r,preventFocusOnPress:h,allowTextSelectionOnPress:_,ref:t}),{focusableProps:z}=xh(e,t);m&&(z.tabIndex=r?-1:z.tabIndex);let K=Pn(z,$,_u(e,{labelable:!0}));return{isPressed:L,buttonProps:Pn(T,K,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"]})}}var y6=()=>no(()=>import("./index-BoBogvMe.js"),[]).then(e=>e.default),F_=e=>{const{ripples:t=[],motionProps:n,color:r="currentColor",style:i,onClear:s}=e;return D.jsx(D.Fragment,{children:t.map(l=>{const c=dL(.01*l.size,.2,l.size>100?.75:.5);return D.jsx(If,{features:y6,children:D.jsx(Au,{mode:"popLayout",children:D.jsx($f.span,{animate:{transform:"scale(2)",opacity:0},className:"heroui-ripple",exit:{opacity:0},initial:{transform:"scale(0)",opacity:.35},style:{position:"absolute",backgroundColor:r,borderRadius:"100%",transformOrigin:"center",pointerEvents:"none",overflow:"hidden",inset:0,zIndex:0,top:l.y,left:l.x,width:`${l.size}px`,height:`${l.size}px`,...i},transition:{duration:c},onAnimationComplete:()=>{s(l.key)},...n})})},l.key)})})};F_.displayName="HeroUI.Ripple";var b6=F_;function x6(e={}){const[t,n]=S.useState([]),r=S.useCallback(s=>{const l=s.target,c=Math.max(l.clientWidth,l.clientHeight);n(d=>[...d,{key:fL(d.length.toString()),size:c,x:s.x-c/2,y:s.y-c/2}])},[]),i=S.useCallback(s=>{n(l=>l.filter(c=>c.key!==s))},[]);return{ripples:t,onClear:i,onPress:r,...e}}function w6(e){var t,n,r,i,s,l,c,d,h;const m=v6(),g=si(),b=!!m,{ref:x,as:k,children:P,startContent:_,endContent:T,autoFocus:$,className:L,spinner:z,isLoading:K=!1,disableRipple:M=!1,fullWidth:J=(t=m?.fullWidth)!=null?t:!1,radius:re=m?.radius,size:ae=(n=m?.size)!=null?n:"md",color:j=(r=m?.color)!=null?r:"default",variant:B=(i=m?.variant)!=null?i:"solid",disableAnimation:Y=(l=(s=m?.disableAnimation)!=null?s:g?.disableAnimation)!=null?l:!1,isDisabled:te=(c=m?.isDisabled)!=null?c:!1,isIconOnly:G=(d=m?.isIconOnly)!=null?d:!1,spinnerPlacement:ce="start",onPress:Z,onClick:q,...V}=e,se=k||"button",R=typeof se=="string",U=Ji(x),ie=(h=M||g?.disableRipple)!=null?h:Y,{isFocusVisible:O,isFocused:me,focusProps:Ce}=Af({autoFocus:$}),ye=te||K,Fe=S.useMemo(()=>_O({size:ae,color:j,variant:B,radius:re,fullWidth:J,isDisabled:ye,isInGroup:b,disableAnimation:Y,isIconOnly:G,className:L}),[ae,j,B,re,J,ye,b,G,Y,L]),{onPress:De,onClear:Te,ripples:Xe}=x6(),lt=S.useCallback(Rt=>{ie||ye||Y||U.current&&De(Rt)},[ie,ye,Y,U,De]),{buttonProps:_e,isPressed:mt}=N_({elementType:k,isDisabled:ye,onPress:Ql(Z,lt),onClick:q,...V},U),{isHovered:pt,hoverProps:Vt}=Cu({isDisabled:ye}),Ve=S.useCallback((Rt={})=>({"data-disabled":$e(ye),"data-focus":$e(me),"data-pressed":$e(mt),"data-focus-visible":$e(O),"data-hover":$e(pt),"data-loading":$e(K),...on(_e,Ce,Vt,Cf(V,{enabled:R}),Cf(Rt)),className:Fe}),[K,ye,me,mt,R,O,pt,_e,Ce,Vt,V,Fe]),it=Rt=>S.isValidElement(Rt)?S.cloneElement(Rt,{"aria-hidden":!0,focusable:!1}):null,Ut=it(_),Zn=it(T),ln=S.useMemo(()=>({sm:"sm",md:"sm",lg:"md"})[ae],[ae]),_t=S.useCallback(()=>({ripples:Xe,onClear:Te}),[Xe,Te]);return{Component:se,children:P,domRef:U,spinner:z,styles:Fe,startContent:Ut,endContent:Zn,isLoading:K,spinnerPlacement:ce,spinnerSize:ln,disableRipple:ie,getButtonProps:Ve,getRippleProps:_t,isIconOnly:G}}function S6(e){var t,n;const[r,i]=na(e,dk.variantKeys),s=si(),l=(n=(t=e?.variant)!=null?t:s?.spinnerVariant)!=null?n:"default",{children:c,className:d,classNames:h,label:m,...g}=r,b=S.useMemo(()=>dk({...i}),[tl(i)]),x=tn(h?.base,d),k=m||c,P=S.useMemo(()=>k&&typeof k=="string"?k:g["aria-label"]?"":"Loading",[c,k,g["aria-label"]]),_=S.useCallback(()=>({"aria-label":P,className:b.base({class:x}),...g}),[P,b,x,g]);return{label:k,slots:b,classNames:h,variant:l,getSpinnerProps:_}}var O_=li((e,t)=>{const{slots:n,classNames:r,label:i,variant:s,getSpinnerProps:l}=S6({...e});return s==="wave"||s==="dots"?D.jsxs("div",{ref:t,...l(),children:[D.jsx("div",{className:n.wrapper({class:r?.wrapper}),children:[...new Array(3)].map((c,d)=>D.jsx("i",{className:n.dots({class:r?.dots}),style:{"--dot-index":d}},`dot-${d}`))}),i&&D.jsx("span",{className:n.label({class:r?.label}),children:i})]}):s==="simple"?D.jsxs("div",{ref:t,...l(),children:[D.jsxs("svg",{className:n.wrapper({class:r?.wrapper}),fill:"none",viewBox:"0 0 24 24",children:[D.jsx("circle",{className:n.circle1({class:r?.circle1}),cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),D.jsx("path",{className:n.circle2({class:r?.circle2}),d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z",fill:"currentColor"})]}),i&&D.jsx("span",{className:n.label({class:r?.label}),children:i})]}):s==="spinner"?D.jsxs("div",{ref:t,...l(),children:[D.jsx("div",{className:n.wrapper({class:r?.wrapper}),children:[...new Array(12)].map((c,d)=>D.jsx("i",{className:n.spinnerBars({class:r?.spinnerBars}),style:{"--bar-index":d}},`star-${d}`))}),i&&D.jsx("span",{className:n.label({class:r?.label}),children:i})]}):D.jsxs("div",{ref:t,...l(),children:[D.jsxs("div",{className:n.wrapper({class:r?.wrapper}),children:[D.jsx("i",{className:n.circle1({class:r?.circle1})}),D.jsx("i",{className:n.circle2({class:r?.circle2})})]}),i&&D.jsx("span",{className:n.label({class:r?.label}),children:i})]})});O_.displayName="HeroUI.Spinner";var k6=O_,z_=li((e,t)=>{const{Component:n,domRef:r,children:i,spinnerSize:s,spinner:l=D.jsx(k6,{color:"current",size:s}),spinnerPlacement:c,startContent:d,endContent:h,isLoading:m,disableRipple:g,getButtonProps:b,getRippleProps:x,isIconOnly:k}=w6({...e,ref:t});return D.jsxs(n,{ref:r,...b(),children:[d,m&&c==="start"&&l,m&&k?null:i,m&&c==="end"&&l,h,!g&&D.jsx(b6,{...x()})]})});z_.displayName="HeroUI.Button";var To=z_;const j_={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},B_={...j_,customError:!0,valid:!1},cf={isInvalid:!1,validationDetails:j_,validationErrors:[]},V_=S.createContext({}),Zg="__formValidationState"+Date.now();function Jx(e){if(e[Zg]){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:s}=e[Zg];return{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:s}}return C6(e)}function C6(e){let{isInvalid:t,validationState:n,name:r,value:i,builtinValidation:s,validate:l,validationBehavior:c="aria"}=e;n&&(t||(t=n==="invalid"));let d=t!==void 0?{isInvalid:t,validationErrors:[],validationDetails:B_}:null,h=S.useMemo(()=>{if(!l||i==null)return null;let j=E6(l,i);return $k(j)},[l,i]);s?.validationDetails.valid&&(s=void 0);let m=S.useContext(V_),g=S.useMemo(()=>r?Array.isArray(r)?r.flatMap(j=>Ib(m[j])):Ib(m[r]):[],[m,r]),[b,x]=S.useState(m),[k,P]=S.useState(!1);m!==b&&(x(m),P(!1));let _=S.useMemo(()=>$k(k?[]:g),[k,g]),T=S.useRef(cf),[$,L]=S.useState(cf),z=S.useRef(cf),K=()=>{if(!M)return;J(!1);let j=h||s||T.current;g0(j,z.current)||(z.current=j,L(j))},[M,J]=S.useState(!1);return S.useEffect(K),{realtimeValidation:d||_||h||s||cf,displayValidation:c==="native"?d||_||$:d||_||h||s||$,updateValidation(j){c==="aria"&&!g0($,j)?L(j):T.current=j},resetValidation(){let j=cf;g0(j,z.current)||(z.current=j,L(j)),c==="native"&&J(!1),P(!0)},commitValidation(){c==="native"&&J(!0),P(!0)}}}function Ib(e){return e?Array.isArray(e)?e:[e]:[]}function E6(e,t){if(typeof e=="function"){let n=e(t);if(n&&typeof n!="boolean")return Ib(n)}return[]}function $k(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:B_}:null}function g0(e,t){return e===t?!0:!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((n,r)=>n===t.validationErrors[r])&&Object.entries(e.validationDetails).every(([n,r])=>t.validationDetails[n]===r)}function U_(e,t,n){let{validationBehavior:r,focus:i}=e;sn(()=>{if(r==="native"&&n?.current&&!n.current.disabled){let d=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(d),n.current.hasAttribute("title")||(n.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation(T6(n.current))}});let s=jn(()=>{t.resetValidation()}),l=jn(d=>{var h;t.displayValidation.isInvalid||t.commitValidation();let m=n==null||(h=n.current)===null||h===void 0?void 0:h.form;if(!d.defaultPrevented&&n&&m&&_6(m)===n.current){var g;i?i():(g=n.current)===null||g===void 0||g.focus(),F5("keyboard")}d.preventDefault()}),c=jn(()=>{t.commitValidation()});S.useEffect(()=>{let d=n?.current;if(!d)return;let h=d.form;return d.addEventListener("invalid",l),d.addEventListener("change",c),h?.addEventListener("reset",s),()=>{d.removeEventListener("invalid",l),d.removeEventListener("change",c),h?.removeEventListener("reset",s)}},[n,l,c,s,r])}function P6(e){let t=e.validity;return{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing,valid:t.valid}}function T6(e){return{isInvalid:!e.validity.valid,validationDetails:P6(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function _6(e){for(let t=0;t{z.stopPropagation(),t.setSelected(z.target.checked)},{pressProps:x,isPressed:k}=wu({isDisabled:r}),{pressProps:P,isPressed:_}=wu({onPress(){var z;t.toggle(),(z=n.current)===null||z===void 0||z.focus()},isDisabled:r||i}),{focusableProps:T}=xh(e,n),$=Pn(x,T),L=_u(e,{labelable:!0});return RE(n,t.isSelected,t.setSelected),{labelProps:Pn(P,{onClick:z=>z.preventDefault()}),inputProps:Pn(L,{"aria-invalid":g||m==="invalid"||void 0,"aria-errormessage":e["aria-errormessage"],"aria-controls":e["aria-controls"],"aria-readonly":i||void 0,onChange:b,disabled:r,...s==null?{}:{value:s},name:l,type:"checkbox",...$}),isSelected:t.isSelected,isPressed:k||_,isDisabled:r,isReadOnly:i,isInvalid:g||m==="invalid"}}function K_(e,t,n){let r=Jx({...e,value:t.isSelected}),{isInvalid:i,validationErrors:s,validationDetails:l}=r.displayValidation,{labelProps:c,inputProps:d,isSelected:h,isPressed:m,isDisabled:g,isReadOnly:b}=I6({...e,isInvalid:i},t,n);U_(e,r,n);let{isIndeterminate:x,isRequired:k,validationBehavior:P="aria"}=e;S.useEffect(()=>{n.current&&(n.current.indeterminate=!!x)});let{pressProps:_}=wu({isDisabled:g||b,onPress(){let{[Zg]:T}=e,{commitValidation:$}=T||r;$()}});return{labelProps:Pn(c,_),inputProps:{...d,checked:h,"aria-required":k&&P==="aria"||void 0,required:k&&P==="native"},isSelected:h,isPressed:m,isDisabled:g,isReadOnly:b,isInvalid:i,validationErrors:s,validationDetails:l}}const $6=new WeakMap;function W_(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":i,labelElementType:s="label"}=e;t=Ef(t);let l=Ef(),c={};n&&(r=r?`${l} ${r}`:l,c={id:l,htmlFor:s==="label"?t:void 0});let d=TE({id:t,"aria-label":i,"aria-labelledby":r});return{labelProps:c,fieldProps:d}}function A6(e){let{description:t,errorMessage:n,isInvalid:r,validationState:i}=e,{labelProps:s,fieldProps:l}=W_(e),c=K0([!!t,!!n,r,i]),d=K0([!!t,!!n,r,i]);return l=Pn(l,{"aria-describedby":[c,d,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:s,fieldProps:l,descriptionProps:{id:c},errorMessageProps:{id:d}}}function H_(e={}){let{isReadOnly:t}=e,[n,r]=Iu(e.isSelected,e.defaultSelected||!1,e.onChange);function i(l){t||r(l)}function s(){t||r(!n)}return{isSelected:n,setSelected:i,toggle:s}}function R6(e,t,n){const r=H_({isReadOnly:e.isReadOnly||t.isReadOnly,isSelected:t.isSelected(e.value),onChange(_){_?t.addValue(e.value):t.removeValue(e.value),e.onChange&&e.onChange(_)}});let{name:i,descriptionId:s,errorMessageId:l,validationBehavior:c}=$6.get(t);var d;c=(d=e.validationBehavior)!==null&&d!==void 0?d:c;let{realtimeValidation:h}=Jx({...e,value:r.isSelected,name:void 0,validationBehavior:"aria"}),m=S.useRef(cf),g=()=>{t.setInvalid(e.value,h.isInvalid?h:m.current)};S.useEffect(g);let b=t.realtimeValidation.isInvalid?t.realtimeValidation:h,x=c==="native"?t.displayValidation:b;var k;let P=K_({...e,isReadOnly:e.isReadOnly||t.isReadOnly,isDisabled:e.isDisabled||t.isDisabled,name:e.name||i,isRequired:(k=e.isRequired)!==null&&k!==void 0?k:t.isRequired,validationBehavior:c,[Zg]:{realtimeValidation:b,displayValidation:x,resetValidation:t.resetValidation,commitValidation:t.commitValidation,updateValidation(_){m.current=_,g()}}},r,n);return{...P,inputProps:{...P.inputProps,"aria-describedby":[e["aria-describedby"],t.isInvalid?l:null,s].filter(Boolean).join(" ")||void 0}}}var Ak=Symbol("default");function L6(e){const t=S.useRef(null),n=S.useRef(void 0),r=S.useCallback(i=>{if(typeof e=="function"){const s=e,l=s(i);return()=>{typeof l=="function"?l():s(null)}}else if(e)return e.current=i,()=>{e.current=null}},[e]);return S.useMemo(()=>({get current(){return t.current},set current(i){t.current=i,n.current&&(n.current(),n.current=void 0),i!=null&&(n.current=r(i))}}),[r])}function Zx(e,t){let n=S.useContext(e);if(t===null)return null;if(n&&typeof n=="object"&&"slots"in n&&n.slots){let r=new Intl.ListFormat().format(Object.keys(n.slots).map(s=>`"${s}"`));if(!t&&!n.slots[Ak])throw new Error(`A slot prop is required. Valid slot names are ${r}.`);let i=t||Ak;if(!n.slots[i])throw new Error(`Invalid slot "${t}". Valid slot names are ${r}.`);return n.slots[i]}return n}function M6(e,t,n){let r=Zx(n,e.slot)||{},{ref:i,...s}=r,l=L6(S.useMemo(()=>dE(t,i),[t,i])),c=on(s,e);return"style"in s&&s.style&&"style"in e&&e.style&&(typeof s.style=="function"||typeof e.style=="function"?c.style=d=>{let h=typeof s.style=="function"?s.style(d):s.style,m={...d.defaultStyle,...h},g=typeof e.style=="function"?e.style({...d,defaultStyle:m}):e.style;return{...m,...g}}:c.style={...s.style,...e.style}),[c,l]}var ev=S.createContext(null),D6=S.forwardRef(function(t,n){[t,n]=M6(t,n,ev);let{validationErrors:r,validationBehavior:i="native",children:s,className:l,...c}=t;const d=S.useMemo(()=>TO({className:l}),[l]);return D.jsx("form",{noValidate:i!=="native",...c,ref:n,className:d,children:D.jsx(ev.Provider,{value:{...t,validationBehavior:i},children:D.jsx(V_.Provider,{value:r??{},children:s})})})}),N6=S.forwardRef(function(t,n){var r,i;const s=si(),l=(i=(r=t.validationBehavior)!=null?r:s?.validationBehavior)!=null?i:"native";return D.jsx(D6,{...t,ref:n,validationBehavior:l})}),[UG,F6]=dv({name:"CheckboxGroupContext",strict:!1});function O6(e){const{isSelected:t,disableAnimation:n,...r}=e;return D.jsx("svg",{"aria-hidden":"true",fill:"none",role:"presentation",stroke:"currentColor",strokeDasharray:22,strokeDashoffset:t?44:66,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,style:!n&&t?{transition:"stroke-dashoffset 250ms linear 0.2s"}:{},viewBox:"0 0 17 18",...r,children:D.jsx("polyline",{points:"1 9 7 14 15 4"})})}function z6(e){const{isSelected:t,disableAnimation:n,...r}=e;return D.jsx("svg",{stroke:"currentColor",strokeWidth:3,viewBox:"0 0 24 24",...r,children:D.jsx("line",{x1:"21",x2:"3",y1:"12",y2:"12"})})}function j6(e){const{isIndeterminate:t,...n}=e,r=t?z6:O6;return D.jsx(r,{...n})}function $b(e,t=[]){const n=S.useRef(e);return Sh(()=>{n.current=e}),S.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function B6(e={}){var t,n,r,i,s,l,c,d;const h=si(),m=F6(),{validationBehavior:g}=Zx(ev)||{},b=!!m,{as:x,ref:k,value:P="",children:_,icon:T,name:$,isRequired:L,isReadOnly:z=!1,autoFocus:K=!1,isSelected:M,size:J=(t=m?.size)!=null?t:"md",color:re=(n=m?.color)!=null?n:"primary",radius:ae=m?.radius,lineThrough:j=(r=m?.lineThrough)!=null?r:!1,isDisabled:B=(i=m?.isDisabled)!=null?i:!1,disableAnimation:Y=(l=(s=m?.disableAnimation)!=null?s:h?.disableAnimation)!=null?l:!1,validationState:te,isInvalid:G=te?te==="invalid":(c=m?.isInvalid)!=null?c:!1,isIndeterminate:ce=!1,validationBehavior:Z=b?m.validationBehavior:(d=g??h?.validationBehavior)!=null?d:"native",defaultSelected:q,classNames:V,className:se,onValueChange:R,validate:U,...ie}=e,O=x||"label",me=S.useRef(null),Ce=S.useRef(null);let ye=e.onChange;b&&(ye=Ql(()=>{m.groupState.resetValidation()},ye));const Fe=S.useId(),De=S.useMemo(()=>({name:$,value:P,children:_,autoFocus:K,defaultSelected:q,isIndeterminate:ce,isRequired:L,isInvalid:G,isSelected:M,isDisabled:B,isReadOnly:z,"aria-label":fE(ie["aria-label"],_),"aria-labelledby":ie["aria-labelledby"]||Fe,onChange:R}),[$,P,_,K,q,ce,L,G,M,B,z,ie["aria-label"],ie["aria-labelledby"],Fe,R]),Te=H_(De),Xe={isInvalid:G,isRequired:L,validate:U,validationState:te,validationBehavior:Z},{inputProps:lt,isSelected:_e,isDisabled:mt,isReadOnly:pt,isPressed:Vt,isInvalid:Ve}=b?R6({...De,...Xe},m.groupState,Ce):K_({...De,...Xe},Te,Ce),it=mt||pt,Ut=te==="invalid"||G||Ve,Zn=it?!1:Vt,{hoverProps:ln,isHovered:_t}=Cu({isDisabled:lt.disabled}),{focusProps:Rt,isFocused:Tn,isFocusVisible:Cr}=Af({autoFocus:lt.autoFocus}),Nt=S.useMemo(()=>IO({color:re,size:J,radius:ae,isInvalid:Ut,lineThrough:j,isDisabled:mt,disableAnimation:Y}),[re,J,ae,Ut,j,mt,Y]);Sh(()=>{if(!Ce.current)return;const Pt=!!Ce.current.checked;Te.setSelected(Pt)},[Ce.current]);const pe=$b(ye),Se=S.useCallback(Pt=>{if(pt||mt){Pt.preventDefault();return}pe?.(Pt)},[pt,mt,pe]),Oe=tn(V?.base,se),nt=S.useCallback(()=>({ref:me,className:Nt.base({class:Oe}),"data-disabled":$e(mt),"data-selected":$e(_e||ce),"data-invalid":$e(Ut),"data-hover":$e(_t),"data-focus":$e(Tn),"data-pressed":$e(Zn),"data-readonly":$e(lt.readOnly),"data-focus-visible":$e(Cr),"data-indeterminate":$e(ce),...on(ln,ie)}),[Nt,Oe,mt,_e,ce,Ut,_t,Tn,Zn,lt.readOnly,Cr,ln,ie]),at=S.useCallback((Pt={})=>({...Pt,"aria-hidden":!0,className:tn(Nt.wrapper({class:tn(V?.wrapper,Pt?.className)}))}),[Nt,V?.wrapper]),Kt=S.useCallback(()=>({ref:pE(Ce,k),...on(lt,Rt),className:Nt.hiddenInput({class:V?.hiddenInput}),onChange:Ql(lt.onChange,Se)}),[lt,Rt,Se,V?.hiddenInput]),Bn=S.useCallback(()=>({id:Fe,className:Nt.label({class:V?.label})}),[Nt,V?.label,mt,_e,Ut]),Qt=S.useCallback(()=>({isSelected:_e,isIndeterminate:ce,disableAnimation:Y,className:Nt.icon({class:V?.icon})}),[Nt,V?.icon,_e,ce,Y]);return{Component:O,icon:T,children:_,isSelected:_e,isDisabled:mt,isInvalid:Ut,isFocused:Tn,isHovered:_t,isFocusVisible:Cr,getBaseProps:nt,getWrapperProps:at,getInputProps:Kt,getLabelProps:Bn,getIconProps:Qt}}var G_=li((e,t)=>{const{Component:n,children:r,icon:i=D.jsx(j6,{}),getBaseProps:s,getWrapperProps:l,getInputProps:c,getIconProps:d,getLabelProps:h}=B6({...e,ref:t}),m=typeof i=="function"?i(d()):S.cloneElement(i,d());return D.jsxs(n,{...s(),children:[D.jsx("input",{...c()}),D.jsx("span",{...l(),children:m}),r&&D.jsx("span",{...h(),children:r})]})});G_.displayName="HeroUI.Checkbox";var V6=G_;function q_(e){let[t,n]=Iu(e.isOpen,e.defaultOpen||!1,e.onOpenChange);const r=S.useCallback(()=>{n(!0)},[n]),i=S.useCallback(()=>{n(!1)},[n]),s=S.useCallback(()=>{n(!t)},[n,t]);return{isOpen:t,setOpen:n,open:r,close:i,toggle:s}}const U6=1500,Rk=500;let lu={},K6=0,xp=!1,Hs=null,au=null;function W6(e={}){let{delay:t=U6,closeDelay:n=Rk}=e,{isOpen:r,open:i,close:s}=q_(e),l=S.useMemo(()=>`${++K6}`,[]),c=S.useRef(null),d=S.useRef(s),h=()=>{lu[l]=b},m=()=>{for(let k in lu)k!==l&&(lu[k](!0),delete lu[k])},g=()=>{c.current&&clearTimeout(c.current),c.current=null,m(),h(),xp=!0,i(),Hs&&(clearTimeout(Hs),Hs=null),au&&(clearTimeout(au),au=null)},b=k=>{k||n<=0?(c.current&&clearTimeout(c.current),c.current=null,d.current()):c.current||(c.current=setTimeout(()=>{c.current=null,d.current()},n)),Hs&&(clearTimeout(Hs),Hs=null),xp&&(au&&clearTimeout(au),au=setTimeout(()=>{delete lu[l],au=null,xp=!1},Math.max(Rk,n)))},x=()=>{m(),h(),!r&&!Hs&&!xp?Hs=setTimeout(()=>{Hs=null,xp=!0,g()},t):r||g()};return S.useEffect(()=>{d.current=s},[s]),S.useEffect(()=>()=>{c.current&&clearTimeout(c.current),lu[l]&&delete lu[l]},[l]),{isOpen:r,open:k=>{!k&&t>0&&!c.current?x():g()},close:b}}function H6(e,t){let n=_u(e,{labelable:!0}),{hoverProps:r}=Cu({onHoverStart:()=>t?.open(!0),onHoverEnd:()=>t?.close()});return{tooltipProps:Pn(n,r,{role:"tooltip"})}}function G6(e,t,n){let{isDisabled:r,trigger:i}=e,s=Ef(),l=S.useRef(!1),c=S.useRef(!1),d=()=>{(l.current||c.current)&&t.open(c.current)},h=T=>{!l.current&&!c.current&&t.close(T)};S.useEffect(()=>{let T=$=>{n&&n.current&&$.key==="Escape"&&($.stopPropagation(),t.close(!0))};if(t.isOpen)return document.addEventListener("keydown",T,!0),()=>{document.removeEventListener("keydown",T,!0)}},[n,t]);let m=()=>{i!=="focus"&&(oh()==="pointer"?l.current=!0:l.current=!1,d())},g=()=>{i!=="focus"&&(c.current=!1,l.current=!1,h())},b=()=>{c.current=!1,l.current=!1,h(!0)},x=()=>{Gx()&&(c.current=!0,d())},k=()=>{c.current=!1,l.current=!1,h(!0)},{hoverProps:P}=Cu({isDisabled:r,onHoverStart:m,onHoverEnd:g}),{focusableProps:_}=xh({isDisabled:r,onFocus:x,onBlur:k},n);return{triggerProps:{"aria-describedby":t.isOpen?s:void 0,...Pn(_,P,{onPointerDown:b,onKeyDown:b,tabIndex:void 0})},tooltipProps:{id:s}}}var Gs=[];function Y_(e,t){const{disableOutsideEvents:n=!0,isDismissable:r=!1,isKeyboardDismissDisabled:i=!1,isOpen:s,onClose:l,shouldCloseOnBlur:c,shouldCloseOnInteractOutside:d}=e;S.useEffect(()=>(s&&Gs.push(t),()=>{const P=Gs.indexOf(t);P>=0&&Gs.splice(P,1)}),[s,t]);const h=()=>{Gs[Gs.length-1]===t&&l&&l()},m=P=>{(!d||d(P.target))&&(Gs[Gs.length-1]===t&&n&&(P.stopPropagation(),P.preventDefault()),P.pointerType!=="touch"&&h())},g=P=>{P.pointerType==="touch"&&(!d||d(P.target))&&(Gs[Gs.length-1]===t&&n&&(P.stopPropagation(),P.preventDefault()),h())},b=P=>{P.key==="Escape"&&!i&&!P.nativeEvent.isComposing&&(P.stopPropagation(),P.preventDefault(),h())};G5({isDisabled:!(r&&s),onInteractOutside:r&&s?g:void 0,onInteractOutsideStart:m,ref:t});const{focusWithinProps:x}=Sv({isDisabled:!c,onBlurWithin:P=>{!P.relatedTarget||Q5(P.relatedTarget)||(!d||d(P.relatedTarget))&&h()}}),k=P=>{P.target===P.currentTarget&&P.preventDefault()};return{overlayProps:{onKeyDown:b,...x},underlayProps:{onPointerDown:k}}}function q6(e){var t,n;const r=si(),[i,s]=na(e,pk.variantKeys),{ref:l,as:c,isOpen:d,content:h,children:m,defaultOpen:g,onOpenChange:b,isDisabled:x,trigger:k,shouldFlip:P=!0,containerPadding:_=12,placement:T="top",delay:$=0,closeDelay:L=500,showArrow:z=!1,offset:K=7,crossOffset:M=0,isDismissable:J,shouldCloseOnBlur:re=!0,portalContainer:ae,isKeyboardDismissDisabled:j=!1,updatePositionDeps:B=[],shouldCloseOnInteractOutside:Y,className:te,onClose:G,motionProps:ce,classNames:Z,...q}=i,V=c||"div",se=(n=(t=e?.disableAnimation)!=null?t:r?.disableAnimation)!=null?n:!1,R=W6({delay:$,closeDelay:L,isDisabled:x,defaultOpen:g,isOpen:d,onOpenChange:Ve=>{b?.(Ve),Ve||G?.()}}),U=S.useRef(null),ie=S.useRef(null),O=S.useId(),me=R.isOpen&&!x;S.useImperativeHandle(l,()=>oL(ie));const{triggerProps:Ce,tooltipProps:ye}=G6({isDisabled:x,trigger:k},R,U),{tooltipProps:Fe}=H6({isOpen:me,...on(i,ye)},R),{overlayProps:De,placement:Te,updatePosition:Xe}=w5({isOpen:me,targetRef:U,placement:h6(T),overlayRef:ie,offset:z?K+3:K,crossOffset:M,shouldFlip:P,containerPadding:_});Sh(()=>{B.length&&Xe()},B);const{overlayProps:lt}=Y_({isOpen:me,onClose:R.close,isDismissable:J,shouldCloseOnBlur:re,isKeyboardDismissDisabled:j,shouldCloseOnInteractOutside:Y},ie),_e=S.useMemo(()=>{var Ve,it,Ut;return pk({...s,disableAnimation:se,radius:(Ve=e?.radius)!=null?Ve:"md",size:(it=e?.size)!=null?it:"md",shadow:(Ut=e?.shadow)!=null?Ut:"sm"})},[tl(s),se,e?.radius,e?.size,e?.shadow]),mt=S.useCallback((Ve={},it=null)=>({...on(Ce,Ve),ref:pE(it,U),"aria-describedby":me?O:void 0}),[Ce,me,O,R]),pt=S.useCallback(()=>({ref:ie,"data-slot":"base","data-open":$e(me),"data-arrow":$e(z),"data-disabled":$e(x),"data-placement":Ik(Te||"top",T),...on(Fe,lt,q),style:on(De.style,q.style,i.style),className:_e.base({class:Z?.base}),id:O}),[_e,me,z,x,Te,T,Fe,lt,q,De,i,O]),Vt=S.useCallback(()=>({"data-slot":"content","data-open":$e(me),"data-arrow":$e(z),"data-disabled":$e(x),"data-placement":Ik(Te||"top",T),className:_e.content({class:tn(Z?.content,te)})}),[_e,me,z,x,Te,T,Z]);return{Component:V,content:h,children:m,isOpen:me,triggerRef:U,showArrow:z,portalContainer:ae,placement:T,disableAnimation:se,isDisabled:x,motionProps:ce,getTooltipContentProps:Vt,getTriggerProps:mt,getTooltipProps:pt}}var Y6=()=>no(()=>import("./index-BoBogvMe.js"),[]).then(e=>e.default),X_=li((e,t)=>{var n;const{Component:r,children:i,content:s,isOpen:l,portalContainer:c,placement:d,disableAnimation:h,motionProps:m,getTriggerProps:g,getTooltipProps:b,getTooltipContentProps:x}=q6({...e,ref:t});let k;try{if(S.Children.count(i)!==1)throw new Error;if(!S.isValidElement(i))k=D.jsx("p",{...g(),children:i});else{const K=i,M=(n=K.props.ref)!=null?n:K.ref;k=S.cloneElement(K,g(K.props,M))}}catch{k=D.jsx("span",{}),hL("Tooltip must have only one child node. Please, check your code.")}const{ref:P,id:_,style:T,...$}=b(),L=D.jsx("div",{ref:P,id:_,style:T,children:D.jsx($f.div,{animate:"enter",exit:"exit",initial:"exit",variants:Jg.scaleSpring,...on(m,$),style:{...p6(d)},children:D.jsx(r,{...x(),children:s})},`${_}-tooltip-inner`)},`${_}-tooltip-content`);return D.jsxs(D.Fragment,{children:[k,h?l&&D.jsx(rk,{portalContainer:c,children:D.jsx("div",{ref:P,id:_,style:T,...$,children:D.jsx(r,{...x(),children:s})})}):D.jsx(If,{features:Y6,children:D.jsx(Au,{children:l&&D.jsx(rk,{portalContainer:c,children:L})})})]})});X_.displayName="HeroUI.Tooltip";var X6=X_;function Q6(e={}){const{rerender:t=!1,delay:n=0}=e,r=S.useRef(!1),[i,s]=S.useState(!1);return S.useEffect(()=>{r.current=!0;let l=null;return t&&(n>0?l=setTimeout(()=>{s(!0)},n):s(!0)),()=>{r.current=!1,t&&s(!1),l&&clearTimeout(l)}},[t]),[S.useCallback(()=>r.current,[]),i]}function J6(e){let{value:t=0,minValue:n=0,maxValue:r=100,valueLabel:i,isIndeterminate:s,formatOptions:l={style:"percent"}}=e,c=_u(e,{labelable:!0}),{labelProps:d,fieldProps:h}=W_({...e,labelElementType:"span"});t=jg(t,n,r);let m=(t-n)/(r-n),g=EM(l);if(!s&&!i){let b=l.style==="percent"?m:t;i=g.format(b)}return{progressBarProps:Pn(c,{...h,"aria-valuenow":s?void 0:t,"aria-valuemin":n,"aria-valuemax":r,"aria-valuetext":s?void 0:i,role:"progressbar"}),labelProps:d}}function Z6(e){var t,n,r;const i=si(),[s,l]=na(e,hk.variantKeys),{ref:c,as:d,id:h,className:m,classNames:g,label:b,valueLabel:x,value:k=void 0,minValue:P=0,maxValue:_=100,strokeWidth:T,showValueLabel:$=!1,formatOptions:L={style:"percent"},...z}=s,K=d||"div",M=Ji(c),J=tn(g?.base,m),[,re]=Q6({rerender:!0,delay:100}),ae=((t=e.isIndeterminate)!=null?t:!0)&&k===void 0,j=(r=(n=e.disableAnimation)!=null?n:i?.disableAnimation)!=null?r:!1,{progressBarProps:B,labelProps:Y}=J6({id:h,label:b,value:k,minValue:P,maxValue:_,valueLabel:x,formatOptions:L,isIndeterminate:ae,"aria-labelledby":e["aria-labelledby"],"aria-label":e["aria-label"]}),te=S.useMemo(()=>hk({...l,disableAnimation:j,isIndeterminate:ae}),[tl(l),j,ae]),G=j?!0:re,ce=16,Z=T||(e.size==="sm"?2:3),q=16-Z,V=2*q*Math.PI,se=S.useMemo(()=>G?ae?.25:k?pL((k-P)/(_-P),1):0:0,[G,k,P,_,ae]),R=V-se*V,U=S.useCallback((ye={})=>({ref:M,"data-indeterminate":$e(ae),"data-disabled":$e(e.isDisabled),className:te.base({class:J}),...on(B,z,ye)}),[M,te,ae,e.isDisabled,J,B,z]),ie=S.useCallback((ye={})=>({className:te.label({class:g?.label}),...on(Y,ye)}),[te,g,Y]),O=S.useCallback((ye={})=>({viewBox:"0 0 32 32",fill:"none",strokeWidth:Z,className:te.svg({class:g?.svg}),...ye}),[Z,te,g]),me=S.useCallback((ye={})=>({cx:ce,cy:ce,r:q,role:"presentation",strokeDasharray:`${V} ${V}`,strokeDashoffset:R,transform:"rotate(-90 16 16)",strokeLinecap:"round",className:te.indicator({class:g?.indicator}),...ye}),[te,g,R,V,q]),Ce=S.useCallback((ye={})=>({cx:ce,cy:ce,r:q,role:"presentation",strokeDasharray:`${V} ${V}`,strokeDashoffset:0,transform:"rotate(-90 16 16)",strokeLinecap:"round",className:te.track({class:g?.track}),...ye}),[te,g,V,q]);return{Component:K,domRef:M,slots:te,classNames:g,label:b,showValueLabel:$,getProgressBarProps:U,getLabelProps:ie,getSvgProps:O,getIndicatorProps:me,getTrackProps:Ce}}var Q_=li((e,t)=>{const{Component:n,slots:r,classNames:i,label:s,showValueLabel:l,getProgressBarProps:c,getLabelProps:d,getSvgProps:h,getIndicatorProps:m,getTrackProps:g}=Z6({ref:t,...e}),b=c();return D.jsxs(n,{...b,children:[D.jsxs("div",{className:r.svgWrapper({class:i?.svgWrapper}),children:[D.jsxs("svg",{...h(),children:[D.jsx("circle",{...g()}),D.jsx("circle",{...m()})]}),l&&D.jsx("span",{className:r.value({class:i?.value}),children:b["aria-valuetext"]})]}),s&&D.jsx("span",{...d(),children:s})]})});Q_.displayName="HeroUI.CircularProgress";var J_=Q_;function ez(e,t){let{inputElementType:n="input",isDisabled:r=!1,isRequired:i=!1,isReadOnly:s=!1,type:l="text",validationBehavior:c="aria"}=e,[d,h]=Iu(e.value,e.defaultValue||"",e.onChange),{focusableProps:m}=xh(e,t),g=Jx({...e,value:d}),{isInvalid:b,validationErrors:x,validationDetails:k}=g.displayValidation,{labelProps:P,fieldProps:_,descriptionProps:T,errorMessageProps:$}=A6({...e,isInvalid:b,errorMessage:e.errorMessage||x}),L=_u(e,{labelable:!0});const z={type:l,pattern:e.pattern};return RE(t,d,h),U_(e,g,t),S.useEffect(()=>{if(t.current instanceof Zi(t.current).HTMLTextAreaElement){let K=t.current;Object.defineProperty(K,"defaultValue",{get:()=>K.value,set:()=>{},configurable:!0})}},[t]),{labelProps:P,inputProps:Pn(L,n==="input"?z:void 0,{disabled:r,readOnly:s,required:i&&c==="native","aria-required":i&&c==="aria"||void 0,"aria-invalid":b||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],"aria-controls":e["aria-controls"],value:d,onChange:K=>h(K.target.value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,[parseInt(We.version,10)>=17?"enterKeyHint":"enterkeyhint"]:e.enterKeyHint,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...m,..._}),descriptionProps:T,errorMessageProps:$,isInvalid:b,validationErrors:x,validationDetails:k}}function tz(e){var t,n,r,i,s,l,c;const d=si(),{validationBehavior:h}=Zx(ev)||{},[m,g]=na(e,vk.variantKeys),{ref:b,as:x,type:k,label:P,baseRef:_,wrapperRef:T,description:$,className:L,classNames:z,autoFocus:K,startContent:M,endContent:J,onClear:re,onChange:ae,validationState:j,validationBehavior:B=(t=h??d?.validationBehavior)!=null?t:"native",innerWrapperRef:Y,onValueChange:te=()=>{},...G}=m,ce=S.useCallback(Ye=>{te(Ye??"")},[te]),[Z,q]=S.useState(!1),V=x||"div",se=(r=(n=e.disableAnimation)!=null?n:d?.disableAnimation)!=null?r:!1,R=Ji(b),U=Ji(_),ie=Ji(T),O=Ji(Y),[me,Ce]=Iu(m.value,(i=m.defaultValue)!=null?i:"",ce),ye=k==="file",Fe=((c=(l=(s=R?.current)==null?void 0:s.files)==null?void 0:l.length)!=null?c:0)>0,De=["date","time","month","week","range"].includes(k),Te=!aL(me)||De||Fe,Xe=Te||Z,lt=k==="hidden",_e=e.isMultiline,mt=tn(z?.base,L,Te?"is-filled":""),pt=S.useCallback(()=>{var Ye;ye?R.current.value="":Ce(""),re?.(),(Ye=R.current)==null||Ye.focus()},[Ce,re,ye]);Sh(()=>{R.current&&Ce(R.current.value)},[R.current]);const{labelProps:Vt,inputProps:Ve,isInvalid:it,validationErrors:Ut,validationDetails:Zn,descriptionProps:ln,errorMessageProps:_t}=ez({...e,validationBehavior:B,autoCapitalize:e.autoCapitalize,value:me,"aria-label":e.label?e["aria-label"]:fE(e["aria-label"],e.placeholder),inputElementType:_e?"textarea":"input",onChange:Ce},R);ye&&(delete Ve.value,delete Ve.onChange);const{isFocusVisible:Rt,isFocused:Tn,focusProps:Cr}=Af({autoFocus:K,isTextInput:!0}),{isHovered:Nt,hoverProps:pe}=Cu({isDisabled:!!e?.isDisabled}),{isHovered:Se,hoverProps:Oe}=Cu({isDisabled:!!e?.isDisabled}),{focusProps:nt,isFocusVisible:at}=Af(),{focusWithinProps:Kt}=Sv({onFocusWithinChange:q}),{pressProps:Bn}=wu({isDisabled:!!e?.isDisabled||!!e?.isReadOnly,onPress:pt}),Qt=j==="invalid"||it,Pt=xF({labelPlacement:e.labelPlacement,label:P}),Er=typeof m.errorMessage=="function"?m.errorMessage({isInvalid:Qt,validationErrors:Ut,validationDetails:Zn}):m.errorMessage||Ut?.join(" "),Ft=!!re||e.isClearable,er=!!P||!!$||!!Er,an=!!m.placeholder,il=!!P,ps=!!$||!!Er,ui=Pt==="outside-left",ci=Pt==="outside-top",sa=Pt==="outside"||ui||ci,Lu=Pt==="inside",hs=R.current?(!R.current.value||R.current.value===""||!me||me==="")&&an:!1,zr=!!M,la=sa?ui||ci||an||Pt==="outside"&&zr:!1,aa=Pt==="outside"&&!an&&!zr,Jt=S.useMemo(()=>vk({...g,isInvalid:Qt,labelPlacement:Pt,isClearable:Ft,disableAnimation:se}),[tl(g),Qt,Pt,Ft,zr,se]),ms=S.useCallback((Ye={})=>({ref:U,className:Jt.base({class:mt}),"data-slot":"base","data-filled":$e(Te||an||zr||hs||ye),"data-filled-within":$e(Xe||an||zr||hs||ye),"data-focus-within":$e(Z),"data-focus-visible":$e(Rt),"data-readonly":$e(e.isReadOnly),"data-focus":$e(Tn),"data-hover":$e(Nt||Se),"data-required":$e(e.isRequired),"data-invalid":$e(Qt),"data-disabled":$e(e.isDisabled),"data-has-elements":$e(er),"data-has-helper":$e(ps),"data-has-label":$e(il),"data-has-value":$e(!hs),"data-hidden":$e(lt),...Kt,...Ye}),[Jt,mt,Te,Tn,Nt,Se,Qt,ps,il,er,hs,zr,Z,Rt,Xe,an,Kt,lt,e.isReadOnly,e.isRequired,e.isDisabled]),gs=S.useCallback((Ye={})=>({"data-slot":"label",className:Jt.label({class:z?.label}),...on(Vt,Oe,Ye)}),[Jt,Se,Vt,z?.label]),Ao=S.useCallback(Ye=>{Ye.key==="Escape"&&me&&(Ft||re)&&!e.isReadOnly&&(Ce(""),re?.())},[me,Ce,re,Ft,e.isReadOnly]),ua=S.useCallback((Ye={})=>({"data-slot":"input","data-filled":$e(Te),"data-filled-within":$e(Xe),"data-has-start-content":$e(zr),"data-has-end-content":$e(!!J),"data-type":k,className:Jt.input({class:tn(z?.input,Te?"is-filled":"",_e?"pe-0":"",k==="password"?"[&::-ms-reveal]:hidden":"")}),...on(Cr,Ve,Cf(G,{enabled:!0,labelable:!0,omitEventNames:new Set(Object.keys(Ve))}),Ye),"aria-readonly":$e(e.isReadOnly),onChange:Ql(Ve.onChange,ae),onKeyDown:Ql(Ve.onKeyDown,Ye.onKeyDown,Ao),ref:R}),[Jt,me,Cr,Ve,G,Te,Xe,zr,J,z?.input,e.isReadOnly,e.isRequired,ae,Ao]),vs=S.useCallback((Ye={})=>({ref:ie,"data-slot":"input-wrapper","data-hover":$e(Nt||Se),"data-focus-visible":$e(Rt),"data-focus":$e(Tn),className:Jt.inputWrapper({class:tn(z?.inputWrapper,Te?"is-filled":"")}),...on(Ye,pe),onClick:io=>{R.current&&io.currentTarget===io.target&&R.current.focus()},style:{cursor:"text",...Ye.style}}),[Jt,Nt,Se,Rt,Tn,me,z?.inputWrapper]),ol=S.useCallback((Ye={})=>({...Ye,ref:O,"data-slot":"inner-wrapper",onClick:io=>{R.current&&io.currentTarget===io.target&&R.current.focus()},className:Jt.innerWrapper({class:tn(z?.innerWrapper,Ye?.className)})}),[Jt,z?.innerWrapper]),sl=S.useCallback((Ye={})=>({...Ye,"data-slot":"main-wrapper",className:Jt.mainWrapper({class:tn(z?.mainWrapper,Ye?.className)})}),[Jt,z?.mainWrapper]),ca=S.useCallback((Ye={})=>({...Ye,"data-slot":"helper-wrapper",className:Jt.helperWrapper({class:tn(z?.helperWrapper,Ye?.className)})}),[Jt,z?.helperWrapper]),Kf=S.useCallback((Ye={})=>({...Ye,...ln,"data-slot":"description",className:Jt.description({class:tn(z?.description,Ye?.className)})}),[Jt,z?.description]),Wf=S.useCallback((Ye={})=>({...Ye,..._t,"data-slot":"error-message",className:Jt.errorMessage({class:tn(z?.errorMessage,Ye?.className)})}),[Jt,_t,z?.errorMessage]),Hf=S.useCallback((Ye={})=>({...Ye,type:"button",tabIndex:-1,disabled:e.isDisabled,"aria-label":"clear input","data-slot":"clear-button","data-focus-visible":$e(at),className:Jt.clearButton({class:tn(z?.clearButton,Ye?.className)}),...on(Bn,nt)}),[Jt,at,Bn,nt,z?.clearButton]);return{Component:V,classNames:z,domRef:R,label:P,description:$,startContent:M,endContent:J,labelPlacement:Pt,isClearable:Ft,hasHelper:ps,hasStartContent:zr,isLabelOutside:la,isOutsideLeft:ui,isOutsideTop:ci,isLabelOutsideAsPlaceholder:aa,shouldLabelBeOutside:sa,shouldLabelBeInside:Lu,hasPlaceholder:an,isInvalid:Qt,errorMessage:Er,getBaseProps:ms,getLabelProps:gs,getInputProps:ua,getMainWrapperProps:sl,getInputWrapperProps:vs,getInnerWrapperProps:ol,getHelperWrapperProps:ca,getDescriptionProps:Kf,getErrorMessageProps:Wf,getClearButtonProps:Hf}}function Ab(){return Ab=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{Component:d,label:h,description:m,startContent:g,endContent:b,hasHelper:x,shouldLabelBeOutside:k,shouldLabelBeInside:P,isInvalid:_,errorMessage:T,getBaseProps:$,getLabelProps:L,getInputProps:z,getInnerWrapperProps:K,getInputWrapperProps:M,getHelperWrapperProps:J,getDescriptionProps:re,getErrorMessageProps:ae,isClearable:j,getClearButtonProps:B}=tz({...l,ref:c,isMultiline:!0}),[Y,te]=S.useState(t>1),[G,ce]=S.useState(!1),Z=h?D.jsx("label",{...L(),children:h}):null,q=z(),V=(me,Ce)=>{if(t===1&&te(me>=Ce.rowHeight*2),n>t){const ye=me>=n*Ce.rowHeight;ce(ye)}s?.(me,Ce)},se=i?D.jsx("textarea",{...q,style:on(q.style,e??{})}):D.jsx(yz,{...q,cacheMeasurements:r,"data-hide-scroll":$e(!G),maxRows:n,minRows:t,style:on(q.style,e??{}),onHeightChange:V}),R=S.useMemo(()=>j?D.jsx("button",{...B(),children:D.jsx(GO,{})}):null,[j,B]),U=S.useMemo(()=>g||b?D.jsxs("div",{...K(),children:[g,se,b]}):D.jsx("div",{...K(),children:se}),[g,q,b,K]),ie=_&&T,O=ie||m;return D.jsxs(d,{...$(),children:[k?Z:null,D.jsxs("div",{...M(),"data-has-multiple-rows":$e(Y),children:[P?Z:null,U,R]}),x&&O?D.jsx("div",{...J(),children:ie?D.jsx("div",{...ae(),children:T}):D.jsx("div",{...re(),children:m})}):null]})});Z_.displayName="HeroUI.Textarea";var bz=Z_;function xz(e,t){let{role:n="dialog"}=e,r=K0();r=e["aria-label"]?void 0:r;let i=S.useRef(!1);return S.useEffect(()=>{if(t.current&&!t.current.contains(document.activeElement)){ku(t.current);let s=setTimeout(()=>{document.activeElement===t.current&&(i.current=!0,t.current&&(t.current.blur(),ku(t.current)),i.current=!1)},500);return()=>{clearTimeout(s)}}},[t]),p_(),{dialogProps:{..._u(e,{labelable:!0}),role:n,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||r,onBlur:s=>{i.current&&s.stopPropagation()}},titleProps:{id:r}}}function wz(e){var t,n;const r=si(),[i,s]=na(e,bk.variantKeys),{ref:l,as:c,src:d,className:h,classNames:m,loading:g,isBlurred:b,fallbackSrc:x,isLoading:k,disableSkeleton:P=!!x,removeWrapper:_=!1,onError:T,onLoad:$,srcSet:L,sizes:z,crossOrigin:K,...M}=i,J=g6({src:d,loading:g,onError:T,onLoad:$,ignoreFallback:!1,srcSet:L,sizes:z,crossOrigin:K,shouldBypassImageLoad:c!==void 0}),re=(n=(t=e.disableAnimation)!=null?t:r?.disableAnimation)!=null?n:!1,ae=J==="loaded"&&!k,j=J==="loading"||k,B=e.isZoomed,Y=c||"img",te=Ji(l),{w:G,h:ce}=S.useMemo(()=>({w:i.width?typeof i.width=="number"?`${i.width}px`:i.width:"fit-content",h:i.height?typeof i.height=="number"?`${i.height}px`:i.height:"auto"}),[i?.width,i?.height]),Z=(!d||!ae)&&!!x,q=j&&!P,V=S.useMemo(()=>bk({...s,disableAnimation:re,showSkeleton:q}),[tl(s),re,q]),se=tn(h,m?.img),R=(O={})=>{const me=tn(se,O?.className);return{src:d,ref:te,"data-loaded":$e(ae),className:V.img({class:me}),loading:g,srcSet:L,sizes:z,crossOrigin:K,...M,style:{...M?.height&&{height:ce},...O.style,...M.style}}},U=S.useCallback(()=>{const O=Z?{backgroundImage:`url(${x})`}:{};return{className:V.wrapper({class:m?.wrapper}),style:{...O,maxWidth:G}}},[V,Z,x,m?.wrapper,G]),ie=S.useCallback(()=>({src:d,"aria-hidden":$e(!0),className:V.blurredImg({class:m?.blurredImg})}),[V,d,m?.blurredImg]);return{Component:Y,domRef:te,slots:V,classNames:m,isBlurred:b,disableSkeleton:P,fallbackSrc:x,removeWrapper:_,isZoomed:B,isLoading:j,getImgProps:R,getWrapperProps:U,getBlurredImgProps:ie}}var e2=li((e,t)=>{const{Component:n,domRef:r,slots:i,classNames:s,isBlurred:l,isZoomed:c,fallbackSrc:d,removeWrapper:h,disableSkeleton:m,getImgProps:g,getWrapperProps:b,getBlurredImgProps:x}=wz({...e,ref:t}),k=D.jsx(n,{ref:r,...g()});if(h)return k;const P=D.jsx("div",{className:i.zoomedWrapper({class:s?.zoomedWrapper}),children:k});return l?D.jsxs("div",{...b(),children:[c?P:k,S.cloneElement(k,x())]}):c||!m||d?D.jsxs("div",{...b(),children:[" ",c?P:k]}):k});e2.displayName="HeroUI.Image";var v0=e2,[Sz,t2]=dv({name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap all popover components within ` `"}),n2=li((e,t)=>{const{as:n,children:r,className:i,...s}=e,{slots:l,classNames:c,bodyId:d,setBodyMounted:h}=t2(),m=Ji(t),g=n||"div";return S.useEffect(()=>(h(!0),()=>h(!1)),[h]),D.jsx(g,{ref:m,className:l.body({class:tn(c?.body,i)}),id:d,...s,children:r})});n2.displayName="HeroUI.ModalBody";var kz=n2,Cz={enter:{scale:"var(--scale-enter)",y:"var(--slide-enter)",opacity:1,willChange:"auto",transition:{scale:{duration:.4,ease:Bp.ease},opacity:{duration:.4,ease:Bp.ease},y:{type:"spring",bounce:0,duration:.6}}},exit:{scale:"var(--scale-exit)",y:"var(--slide-exit)",opacity:0,willChange:"transform",transition:{duration:.3,ease:Bp.ease}}},ss=typeof document<"u"&&window.visualViewport,Ez=We.createContext(!1);function Pz(){return!1}function Tz(){return!0}function _z(e){return()=>{}}function Iz(){return typeof We.useSyncExternalStore=="function"?We.useSyncExternalStore(_z,Pz,Tz):S.useContext(Ez)}function $z(){let e=Iz(),[t,n]=S.useState(()=>e?{width:0,height:0}:Ok());return S.useEffect(()=>{let r=()=>{n(i=>{let s=Ok();return s.width===i.width&&s.height===i.height?i:s})};return ss?ss.addEventListener("resize",r):window.addEventListener("resize",r),()=>{ss?ss.removeEventListener("resize",r):window.removeEventListener("resize",r)}},[]),t}function Ok(){return{width:ss&&ss?.width||window.innerWidth,height:ss&&ss?.height||window.innerHeight}}var zk=()=>no(()=>import("./index-BoBogvMe.js"),[]).then(e=>e.default),r2=e=>{const{as:t,children:n,role:r="dialog",...i}=e,{Component:s,domRef:l,slots:c,classNames:d,motionProps:h,backdrop:m,closeButton:g,hideCloseButton:b,disableAnimation:x,getDialogProps:k,getBackdropProps:P,getCloseButtonProps:_,onClose:T}=t2(),$=t||s||"div",L=$z(),{dialogProps:z}=xz({role:r},l),K=S.isValidElement(g)?S.cloneElement(g,_()):D.jsx("button",{..._(),children:D.jsx(qO,{})}),M=S.useCallback(Y=>{Y.key==="Tab"&&Y.nativeEvent.isComposing&&(Y.stopPropagation(),Y.preventDefault())},[]),J=k(on(z,i)),re=D.jsxs($,{...J,onKeyDown:Ql(J.onKeyDown,M),children:[D.jsx(ok,{onDismiss:T}),!b&&K,typeof n=="function"?n(T):n,D.jsx(ok,{onDismiss:T})]}),ae=S.useMemo(()=>m==="transparent"?null:x?D.jsx("div",{...P()}):D.jsx(If,{features:zk,children:D.jsx($f.div,{animate:"enter",exit:"exit",initial:"exit",variants:Jg.fade,...P()})}),[m,x,P]),j={"--visual-viewport-height":L.height+"px"},B=x?D.jsx("div",{className:c.wrapper({class:d?.wrapper}),"data-slot":"wrapper",style:j,children:re}):D.jsx(If,{features:zk,children:D.jsx($f.div,{animate:"enter",className:c.wrapper({class:d?.wrapper}),"data-slot":"wrapper",exit:"exit",initial:"exit",variants:Cz,...h,style:j,children:re})});return D.jsxs("div",{tabIndex:-1,children:[ae,B]})};r2.displayName="HeroUI.ModalContent";var Az=r2;function Rz(e={shouldBlockScroll:!0},t,n){let{overlayProps:r,underlayProps:i}=Y_({...e,isOpen:t.isOpen,onClose:t.close},n);return sF({isDisabled:!t.isOpen||!e.shouldBlockScroll}),p_(),S.useEffect(()=>{if(t.isOpen&&n.current)return vF([n.current])},[t.isOpen,n]),{modalProps:Pn(r),underlayProps:i}}function Lz(e){var t,n,r;const i=si(),[s,l]=na(e,yk.variantKeys),{ref:c,as:d,className:h,classNames:m,isOpen:g,defaultOpen:b,onOpenChange:x,motionProps:k,closeButton:P,isDismissable:_=!0,hideCloseButton:T=!1,shouldBlockScroll:$=!0,portalContainer:L,isKeyboardDismissDisabled:z=!1,onClose:K,...M}=s,J=d||"section",re=Ji(c),ae=S.useRef(null),[j,B]=S.useState(!1),[Y,te]=S.useState(!1),G=(n=(t=e.disableAnimation)!=null?t:i?.disableAnimation)!=null?n:!1,ce=S.useId(),Z=S.useId(),q=S.useId(),V=q_({isOpen:g,defaultOpen:b,onOpenChange:Te=>{x?.(Te),Te||K?.()}}),{modalProps:se,underlayProps:R}=Rz({isDismissable:_,shouldBlockScroll:$,isKeyboardDismissDisabled:z},V,re),{buttonProps:U}=N_({onPress:V.close},ae),{isFocusVisible:ie,focusProps:O}=Af(),me=tn(m?.base,h),Ce=S.useMemo(()=>yk({...l,disableAnimation:G}),[tl(l),G]),ye=(Te={},Xe=null)=>{var lt;return{ref:dE(Xe,re),...on(se,M,Te),className:Ce.base({class:tn(me,Te.className)}),id:ce,"data-open":$e(V.isOpen),"data-dismissable":$e(_),"aria-modal":$e(!0),"data-placement":(lt=e?.placement)!=null?lt:"right","aria-labelledby":j?Z:void 0,"aria-describedby":Y?q:void 0}},Fe=S.useCallback((Te={})=>({className:Ce.backdrop({class:m?.backdrop}),...R,...Te}),[Ce,m,R]),De=()=>({role:"button",tabIndex:0,"aria-label":"Close","data-focus-visible":$e(ie),className:Ce.closeButton({class:m?.closeButton}),...on(U,O)});return{Component:J,slots:Ce,domRef:re,headerId:Z,bodyId:q,motionProps:k,classNames:m,isDismissable:_,closeButton:P,hideCloseButton:T,portalContainer:L,shouldBlockScroll:$,backdrop:(r=e.backdrop)!=null?r:"opaque",isOpen:V.isOpen,onClose:V.close,disableAnimation:G,setBodyMounted:te,setHeaderMounted:B,getDialogProps:ye,getBackdropProps:Fe,getCloseButtonProps:De}}var i2=li((e,t)=>{const{children:n,...r}=e,i=Lz({...r,ref:t}),s=D.jsx(yF,{portalContainer:i.portalContainer,children:n});return D.jsx(Sz,{value:i,children:i.disableAnimation&&i.isOpen?s:D.jsx(Au,{children:i.isOpen?s:null})})});i2.displayName="HeroUI.Modal";var Mz=i2;function Dz(e={}){const{id:t,defaultOpen:n,isOpen:r,onClose:i,onOpen:s,onChange:l=()=>{}}=e,c=$b(s),d=$b(i),[h,m]=Iu(r,n||!1,l),g=S.useId(),b=t||g,x=r!==void 0,k=S.useCallback(()=>{x||m(!1),d?.()},[x,d]),P=S.useCallback(()=>{x||m(!0),c?.()},[x,c]),_=S.useCallback(()=>{(h?k:P)()},[h,P,k]);return{isOpen:!!h,onOpen:P,onClose:k,onOpenChange:_,isControlled:x,getButtonProps:(T={})=>({...T,"aria-expanded":h,"aria-controls":b,onClick:Pf(T.onClick,_)}),getDisclosureProps:(T={})=>({...T,hidden:!h,id:b})}}function Nz(e){var t,n;const r=si(),[i,s]=na(e,gk.variantKeys),{as:l,children:c,isLoaded:d=!1,className:h,classNames:m,...g}=i,b=l||"div",x=(n=(t=e.disableAnimation)!=null?t:r?.disableAnimation)!=null?n:!1,k=S.useMemo(()=>gk({...s,disableAnimation:x}),[tl(s),x,c]),P=tn(m?.base,h);return{Component:b,children:c,slots:k,classNames:m,getSkeletonProps:($={})=>({"data-loaded":$e(d),className:k.base({class:tn(P,$?.className)}),...g}),getContentProps:($={})=>({className:k.content({class:tn(m?.content,$?.className)})})}}var o2=li((e,t)=>{const{Component:n,children:r,getSkeletonProps:i,getContentProps:s}=Nz({...e});return D.jsx(n,{ref:t,...i(),children:D.jsx("div",{...s(),children:r})})});o2.displayName="HeroUI.Skeleton";var Fz=o2;function Oz(e={}){const{domRef:t,isEnabled:n=!0,overflowCheck:r="vertical",visibility:i="auto",offset:s=0,onVisibilityChange:l,updateDeps:c=[]}=e,d=S.useRef(i);S.useEffect(()=>{const h=t?.current;if(!h||!n)return;const m=(x,k,P,_,T)=>{if(i==="auto"){const $=`${_}${cL(T)}Scroll`;k&&P?(h.dataset[$]="true",h.removeAttribute(`data-${_}-scroll`),h.removeAttribute(`data-${T}-scroll`)):(h.dataset[`${_}Scroll`]=k.toString(),h.dataset[`${T}Scroll`]=P.toString(),h.removeAttribute(`data-${_}-${T}-scroll`))}else{const $=k&&P?"both":k?_:P?T:"none";$!==d.current&&(l?.($),d.current=$)}},g=()=>{var x,k;const P=[{type:"vertical",prefix:"top",suffix:"bottom"},{type:"horizontal",prefix:"left",suffix:"right"}],_=h.querySelector('ul[data-slot="list"]'),T=+((x=_?.getAttribute("data-virtual-scroll-height"))!=null?x:h.scrollHeight),$=+((k=_?.getAttribute("data-virtual-scroll-top"))!=null?k:h.scrollTop);for(const{type:L,prefix:z,suffix:K}of P)if(r===L||r==="both"){const M=L==="vertical"?$>s:h.scrollLeft>s,J=L==="vertical"?$+h.clientHeight+s{["top","bottom","top-bottom","left","right","left-right"].forEach(x=>{h.removeAttribute(`data-${x}-scroll`)})};return g(),h.addEventListener("scroll",g,!0),i!=="auto"&&(b(),i==="both"?(h.dataset.topBottomScroll=String(r==="vertical"),h.dataset.leftRightScroll=String(r==="horizontal")):(h.dataset.topBottomScroll="false",h.dataset.leftRightScroll="false",["top","bottom","left","right"].forEach(x=>{h.dataset[`${x}Scroll`]=String(i===x)}))),()=>{h.removeEventListener("scroll",g,!0),b()}},[...c,n,i,r,l,t])}function zz(e){var t;const[n,r]=na(e,mk.variantKeys),{ref:i,as:s,children:l,className:c,style:d,size:h=40,offset:m=0,visibility:g="auto",isEnabled:b=!0,onVisibilityChange:x,...k}=n,P=s||"div",_=Ji(i);Oz({domRef:_,offset:m,visibility:g,isEnabled:b,onVisibilityChange:x,updateDeps:[l],overflowCheck:(t=e.orientation)!=null?t:"vertical"});const T=S.useMemo(()=>mk({...r,className:c}),[tl(r),c]);return{Component:P,styles:T,domRef:_,children:l,getBaseProps:(L={})=>{var z;return{ref:_,className:T,"data-orientation":(z=e.orientation)!=null?z:"vertical",style:{"--scroll-shadow-size":`${h}px`,...d,...L.style},...k,...L}}}}var s2=li((e,t)=>{const{Component:n,children:r,getBaseProps:i}=zz({...e,ref:t});return D.jsx(n,{...i(),children:r})});s2.displayName="HeroUI.ScrollShadow";var l2=s2;const KG={Like:"like",Dislike:"dislike"},jz={Start:"START"},wf={User:"user",Assistant:"assistant"},lf={Pending:"pending",InProgress:"in_progress",Completed:"completed"};class a2{constructor(t={}){if(this.chunkQueue=new Map,this.baseUrl=t.baseUrl??"",this.auth=t.auth,this.baseUrl.endsWith("/")&&(this.baseUrl=this.baseUrl.slice(0,-1)),!!this.baseUrl)try{new URL(this.baseUrl)}catch{throw new Error(`Invalid base URL: ${this.baseUrl}. Please provide a valid URL.`)}}getBaseUrl(){return this.baseUrl}_buildApiUrl(t){return`${this.baseUrl}${t}`}async _makeRequest(t,n={}){const i={...{"Content-Type":"application/json"},...this.normalizeHeaders(n.headers)};this.auth?.getToken&&(i.Authorization=`Bearer ${this.auth.getToken()}`);const s=await fetch(t,{...n,headers:i});if(s.status===401&&this.auth?.onUnauthorized?.(),!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return s}async makeRequest(t,n){const{method:r="GET",body:i,headers:s={},...l}=n||{},c={method:r,headers:s,...l};return i&&r!=="GET"&&(c.body=typeof i=="string"?i:JSON.stringify(i)),(await this._makeRequest(this._buildApiUrl(t.toString()),c)).json()}makeStreamRequest(t,n,r,i,s){let l=!1;const c=async h=>{const m=h.body?.pipeThrough(new TextDecoderStream).getReader();if(!m)throw new Error("Response body is null");let g="";for(;!l&&!i?.aborted;)try{const{value:b,done:x}=await m.read();if(x){r.onClose?.();break}g+=b;const k=g.split(`
-`);g=k.pop()??"";for(const P of k)if(P.startsWith("data: "))try{const _=P.replace("data: ","").trim(),T=JSON.parse(_);if(T.type==="chunked_content"){this.handleChunkedContent(T,r);continue}await r.onMessage(T),await new Promise($=>setTimeout($,0))}catch(_){console.error("Error parsing JSON:",_),await r.onError(new Error("Error processing server response"))}}catch(b){if(i?.aborted)return;console.error("Stream error:",b),await r.onError(new Error("Error reading stream"));break}},d=async()=>{try{const m={...{"Content-Type":"application/json",Accept:"text/event-stream"},...s};this.auth?.getToken&&(m.Authorization=`Bearer ${this.auth.getToken()}`);const g=await fetch(this._buildApiUrl(t.toString()),{method:"POST",headers:m,body:JSON.stringify(n),signal:i});if(g.status===401&&this.auth?.onUnauthorized?.(),!g.ok)throw new Error(`HTTP error! status: ${g.status}`);await c(g)}catch(h){if(i?.aborted)return;console.error("Request error:",h);const m=h instanceof Error?h.message:"Error connecting to server";await r.onError(new Error(m))}};try{d()}catch(h){const m=h instanceof Error?h.message:"Failed to start stream";r.onError(new Error(m))}return()=>{l=!0}}normalizeHeaders(t){return t?t instanceof Headers?Object.fromEntries(t.entries()):Array.isArray(t)?Object.fromEntries(t):t:{}}async handleChunkedContent(t,n){const i=t.content,{content_type:s,id:l,chunk_index:c,total_chunks:d,mime_type:h,data:m}=i;this.chunkQueue.has(l)||this.chunkQueue.set(l,{chunks:new Map,totalChunks:d,mimeType:h});const g=this.chunkQueue.get(l);if(g.chunks.set(c,m),g.chunks.size!==d)return;const x=Array.from({length:d},(k,P)=>g.chunks.get(P)).join("");try{atob(x)}catch(k){this.chunkQueue.delete(l),console.error("❌ Invalid base64 data: ",k),await n.onError(new Error("Error reading stream"))}if(s==="image"){const k={type:"image",content:{id:l,url:`${g.mimeType},${x}`}};await n.onMessage(k)}this.chunkQueue.delete(l)}}const u2=S.createContext(null);function Bz({children:e,...t}){const n=S.useMemo(()=>new a2(t),[t]),r=S.useMemo(()=>({client:n}),[n]);return D.jsx(u2.Provider,{value:r,children:e})}function c2(){const e=S.useContext(u2);if(!e)throw new Error("useRagbitsContext must be used within a RagbitsProvider");return e}function Vz(e,t){const{client:n}=c2(),[r,i]=S.useState(null),[s,l]=S.useState(null),[c,d]=S.useState(!1),h=S.useRef(null),m=S.useCallback(()=>{if(!h.current)return null;h.current.abort(),h.current=null,d(!1)},[]),g=S.useCallback(async(x={})=>{h.current&&c&&h.current.abort();const k=new AbortController;h.current=k,d(!0),l(null);try{const _={...{...t,...x,headers:{...t?.headers,...x.headers}},signal:k.signal},T=await n.makeRequest(e,_);return k.signal.aborted||(i(T),h.current=null),T}catch(P){if(!k.signal.aborted){const _=P instanceof Error?P:new Error("API call failed");throw l(_),h.current=null,_}throw P}finally{k.signal.aborted||d(!1)}},[n,e,t,c]),b=S.useCallback(()=>{m(),i(null),l(null),d(!1)},[m]);return{data:r,error:s,isLoading:c,call:g,reset:b,abort:m}}var Eo=(e=>(e.LIGHT="light",e.DARK="dark",e))(Eo||{});const f2=S.createContext(null),Uz="🐰",Kz="Ragbits Chat",Wz="by deepsense.ai",Hz="Loading...",d2="";function Gz(){return window.matchMedia("(prefers-color-scheme: dark)").matches?Eo.DARK:Eo.LIGHT}function jk(){const e=window.localStorage.getItem("theme");return e===Eo.DARK||e===Eo.LIGHT?e:Gz()}function qz(e){return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}const Yz=({children:e})=>{const t=S.useSyncExternalStore(qz,jk,jk),n=S.useRef(!1),r=new a2({baseUrl:d2});S.useEffect(()=>{if(n.current)return;(async()=>{try{const c=r.getBaseUrl(),d=await fetch(`${c}/api/theme`);if(d.ok){const h=await d.text(),m=document.getElementById("heroui-custom-theme");m&&m.remove();const g=document.createElement("style");g.id="heroui-custom-theme",g.textContent=h,document.head.appendChild(g),console.log("Custom HeroUI theme loaded successfully"),n.current=!0}}catch(c){console.warn("No custom theme available:",c),n.current=!0}})()},[]),S.useEffect(()=>{document.documentElement.classList.toggle("dark",t===Eo.DARK)},[t]);const i=S.useCallback(l=>{window.localStorage.setItem("theme",l),window.dispatchEvent(new Event("storage"))},[]),s=S.useMemo(()=>({theme:t,setTheme:i}),[t,i]);return D.jsx(f2.Provider,{value:s,children:e})},p2=Object.freeze({left:0,top:0,width:16,height:16}),tv=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),tw=Object.freeze({...p2,...tv}),Rb=Object.freeze({...tw,body:"",hidden:!1});function Xz(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function Bk(e,t){const n=Xz(e,t);for(const r in Rb)r in tv?r in e&&!(r in n)&&(n[r]=tv[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function Qz(e,t){const n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function s(l){if(n[l])return i[l]=[];if(!(l in i)){i[l]=null;const c=r[l]&&r[l].parent,d=c&&s(c);d&&(i[l]=[c].concat(d))}return i[l]}return Object.keys(n).concat(Object.keys(r)).forEach(s),i}function Jz(e,t,n){const r=e.icons,i=e.aliases||Object.create(null);let s={};function l(c){s=Bk(r[c]||i[c],s)}return l(t),n.forEach(l),Bk(e,s)}function h2(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(i=>{t(i,null),n.push(i)});const r=Qz(e);for(const i in r){const s=r[i];s&&(t(i,Jz(e,i,s)),n.push(i))}return n}const Zz={provider:"",aliases:{},not_found:{},...p2};function y0(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function m2(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!y0(e,Zz))return null;const n=t.icons;for(const i in n){const s=n[i];if(!i||typeof s.body!="string"||!y0(s,Rb))return null}const r=t.aliases||Object.create(null);for(const i in r){const s=r[i],l=s.parent;if(!i||typeof l!="string"||!n[l]&&!r[l]||!y0(s,Rb))return null}return t}const g2=/^[a-z0-9]+(-[a-z0-9]+)*$/,kv=(e,t,n,r="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const c=i.pop(),d=i.pop(),h={provider:i.length>0?i[0]:r,prefix:d,name:c};return t&&!Mg(h)?null:h}const s=i[0],l=s.split("-");if(l.length>1){const c={provider:r,prefix:l.shift(),name:l.join("-")};return t&&!Mg(c)?null:c}if(n&&r===""){const c={provider:r,prefix:"",name:s};return t&&!Mg(c,n)?null:c}return null},Mg=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,Vk=Object.create(null);function e8(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function Rf(e,t){const n=Vk[e]||(Vk[e]=Object.create(null));return n[t]||(n[t]=e8(e,t))}function v2(e,t){return m2(t)?h2(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function t8(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let lh=!1;function y2(e){return typeof e=="boolean"&&(lh=e),lh}function Uk(e){const t=typeof e=="string"?kv(e,!0,lh):e;if(t){const n=Rf(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function n8(e,t){const n=kv(e,!0,lh);if(!n)return!1;const r=Rf(n.provider,n.prefix);return t?t8(r,n.name,t):(r.missing.add(n.name),!0)}function r8(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),lh&&!t&&!e.prefix){let i=!1;return m2(e)&&(e.prefix="",h2(e,(s,l)=>{n8(s,l)&&(i=!0)})),i}const n=e.prefix;if(!Mg({prefix:n,name:"a"}))return!1;const r=Rf(t,n);return!!v2(r,e)}const b2=Object.freeze({width:null,height:null}),x2=Object.freeze({...b2,...tv}),i8=/(-?[0-9.]*[0-9]+[0-9.]*)/g,o8=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Kk(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(i8);if(r===null||!r.length)return e;const i=[];let s=r.shift(),l=o8.test(s);for(;;){if(l){const c=parseFloat(s);isNaN(c)?i.push(s):i.push(Math.ceil(c*t*n)/n)}else i.push(s);if(s=r.shift(),s===void 0)return i.join("");l=!l}}function s8(e,t="defs"){let n="";const r=e.indexOf("<"+t);for(;r>=0;){const i=e.indexOf(">",r),s=e.indexOf(""+t);if(i===-1||s===-1)break;const l=e.indexOf(">",s);if(l===-1)break;n+=e.slice(i+1,s).trim(),e=e.slice(0,r).trim()+e.slice(l+1)}return{defs:n,content:e}}function l8(e,t){return e?""+e+" "+t:t}function a8(e,t,n){const r=s8(e);return l8(r.defs,t+r.content+n)}const u8=e=>e==="unset"||e==="undefined"||e==="none";function c8(e,t){const n={...tw,...e},r={...x2,...t},i={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,r].forEach(P=>{const _=[],T=P.hFlip,$=P.vFlip;let L=P.rotate;T?$?L+=2:(_.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),_.push("scale(-1 1)"),i.top=i.left=0):$&&(_.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),_.push("scale(1 -1)"),i.top=i.left=0);let z;switch(L<0&&(L-=Math.floor(L/4)*4),L=L%4,L){case 1:z=i.height/2+i.top,_.unshift("rotate(90 "+z.toString()+" "+z.toString()+")");break;case 2:_.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:z=i.width/2+i.left,_.unshift("rotate(-90 "+z.toString()+" "+z.toString()+")");break}L%2===1&&(i.left!==i.top&&(z=i.left,i.left=i.top,i.top=z),i.width!==i.height&&(z=i.width,i.width=i.height,i.height=z)),_.length&&(s=a8(s,''," "))});const l=r.width,c=r.height,d=i.width,h=i.height;let m,g;l===null?(g=c===null?"1em":c==="auto"?h:c,m=Kk(g,d/h)):(m=l==="auto"?d:l,g=c===null?Kk(m,h/d):c==="auto"?h:c);const b={},x=(P,_)=>{u8(_)||(b[P]=_.toString())};x("width",m),x("height",g);const k=[i.left,i.top,d,h];return b.viewBox=k.join(" "),{attributes:b,viewBox:k,body:s}}const f8=/\sid="(\S+)"/g,d8="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let p8=0;function h8(e,t=d8){const n=[];let r;for(;r=f8.exec(e);)n.push(r[1]);if(!n.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(s=>{const l=typeof t=="function"?t(s):t+(p8++).toString(),c=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+l+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}const Lb=Object.create(null);function m8(e,t){Lb[e]=t}function Mb(e){return Lb[e]||Lb[""]}function nw(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const rw=Object.create(null),wp=["https://api.simplesvg.com","https://api.unisvg.com"],Dg=[];for(;wp.length>0;)wp.length===1||Math.random()>.5?Dg.push(wp.shift()):Dg.push(wp.pop());rw[""]=nw({resources:["https://api.iconify.design"].concat(Dg)});function g8(e,t){const n=nw(t);return n===null?!1:(rw[e]=n,!0)}function iw(e){return rw[e]}const v8=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Wk=v8();function y8(e,t){const n=iw(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let i=0;n.resources.forEach(l=>{i=Math.max(i,l.length)});const s=t+".json?icons=";r=n.maxURL-i-n.path.length-s.length}return r}function b8(e){return e===404}const x8=(e,t,n)=>{const r=[],i=y8(e,t),s="icons";let l={type:s,provider:e,prefix:t,icons:[]},c=0;return n.forEach((d,h)=>{c+=d.length+1,c>=i&&h>0&&(r.push(l),l={type:s,provider:e,prefix:t,icons:[]},c=d.length),l.icons.push(d)}),r.push(l),r};function w8(e){if(typeof e=="string"){const t=iw(e);if(t)return t.path}return"/"}const S8=(e,t,n)=>{if(!Wk){n("abort",424);return}let r=w8(t.provider);switch(t.type){case"icons":{const s=t.prefix,c=t.icons.join(","),d=new URLSearchParams({icons:c});r+=s+".json?"+d.toString();break}case"custom":{const s=t.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let i=503;Wk(e+r).then(s=>{const l=s.status;if(l!==200){setTimeout(()=>{n(b8(l)?"abort":"next",l)});return}return i=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",i)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",i)})},k8={prepare:x8,send:S8};function C8(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,s)=>i.provider!==s.provider?i.provider.localeCompare(s.provider):i.prefix!==s.prefix?i.prefix.localeCompare(s.prefix):i.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return e.forEach(i=>{if(r.name===i.name&&r.prefix===i.prefix&&r.provider===i.provider)return;r=i;const s=i.provider,l=i.prefix,c=i.name,d=n[s]||(n[s]=Object.create(null)),h=d[l]||(d[l]=Rf(s,l));let m;c in h.icons?m=t.loaded:l===""||h.missing.has(c)?m=t.missing:m=t.pending;const g={provider:s,prefix:l,name:c};m.push(g)}),t}function w2(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(i=>i.id!==t))})}function E8(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,i=e.prefix;t.forEach(s=>{const l=s.icons,c=l.pending.length;l.pending=l.pending.filter(d=>{if(d.prefix!==i)return!0;const h=d.name;if(e.icons[h])l.loaded.push({provider:r,prefix:i,name:h});else if(e.missing.has(h))l.missing.push({provider:r,prefix:i,name:h});else return n=!0,!0;return!1}),l.pending.length!==c&&(n||w2([e],s.id),s.callback(l.loaded.slice(0),l.missing.slice(0),l.pending.slice(0),s.abort))})}))}let P8=0;function T8(e,t,n){const r=P8++,i=w2.bind(null,n,r);if(!t.pending.length)return i;const s={id:r,icons:t,callback:e,abort:i};return n.forEach(l=>{(l.loaderCallbacks||(l.loaderCallbacks=[])).push(s)}),i}function _8(e,t=!0,n=!1){const r=[];return e.forEach(i=>{const s=typeof i=="string"?kv(i,t,n):i;s&&r.push(s)}),r}var I8={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function $8(e,t,n,r){const i=e.resources.length,s=e.random?Math.floor(Math.random()*i):e.index;let l;if(e.random){let M=e.resources.slice(0);for(l=[];M.length>1;){const J=Math.floor(Math.random()*M.length);l.push(M[J]),M=M.slice(0,J).concat(M.slice(J+1))}l=l.concat(M)}else l=e.resources.slice(s).concat(e.resources.slice(0,s));const c=Date.now();let d="pending",h=0,m,g=null,b=[],x=[];typeof r=="function"&&x.push(r);function k(){g&&(clearTimeout(g),g=null)}function P(){d==="pending"&&(d="aborted"),k(),b.forEach(M=>{M.status==="pending"&&(M.status="aborted")}),b=[]}function _(M,J){J&&(x=[]),typeof M=="function"&&x.push(M)}function T(){return{startTime:c,payload:t,status:d,queriesSent:h,queriesPending:b.length,subscribe:_,abort:P}}function $(){d="failed",x.forEach(M=>{M(void 0,m)})}function L(){b.forEach(M=>{M.status==="pending"&&(M.status="aborted")}),b=[]}function z(M,J,re){const ae=J!=="success";switch(b=b.filter(j=>j!==M),d){case"pending":break;case"failed":if(ae||!e.dataAfterTimeout)return;break;default:return}if(J==="abort"){m=re,$();return}if(ae){m=re,b.length||(l.length?K():$());return}if(k(),L(),!e.random){const j=e.resources.indexOf(M.resource);j!==-1&&j!==e.index&&(e.index=j)}d="completed",x.forEach(j=>{j(re)})}function K(){if(d!=="pending")return;k();const M=l.shift();if(M===void 0){if(b.length){g=setTimeout(()=>{k(),d==="pending"&&(L(),$())},e.timeout);return}$();return}const J={status:"pending",resource:M,callback:(re,ae)=>{z(J,re,ae)}};b.push(J),h++,g=setTimeout(K,e.rotate),n(M,t,J.callback)}return setTimeout(K),T}function S2(e){const t={...I8,...e};let n=[];function r(){n=n.filter(c=>c().status==="pending")}function i(c,d,h){const m=$8(t,c,d,(g,b)=>{r(),h&&h(g,b)});return n.push(m),m}function s(c){return n.find(d=>c(d))||null}return{query:i,find:s,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:r}}function Hk(){}const b0=Object.create(null);function A8(e){if(!b0[e]){const t=iw(e);if(!t)return;const n=S2(t),r={config:t,redundancy:n};b0[e]=r}return b0[e]}function R8(e,t,n){let r,i;if(typeof e=="string"){const s=Mb(e);if(!s)return n(void 0,424),Hk;i=s.send;const l=A8(e);l&&(r=l.redundancy)}else{const s=nw(e);if(s){r=S2(s);const l=e.resources?e.resources[0]:"",c=Mb(l);c&&(i=c.send)}}return!r||!i?(n(void 0,424),Hk):r.query(t,i,n)().abort}function Gk(){}function L8(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,E8(e)}))}function M8(e){const t=[],n=[];return e.forEach(r=>{(r.match(g2)?t:n).push(r)}),{valid:t,invalid:n}}function Sp(e,t,n){function r(){const i=e.pendingIcons;t.forEach(s=>{i&&i.delete(s),e.icons[s]||e.missing.add(s)})}if(n&&typeof n=="object")try{if(!v2(e,n).length){r();return}}catch(i){console.error(i)}r(),L8(e)}function qk(e,t){e instanceof Promise?e.then(n=>{t(n)}).catch(()=>{t(null)}):t(e)}function D8(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,i=e.iconsToLoad;if(delete e.iconsToLoad,!i||!i.length)return;const s=e.loadIcon;if(e.loadIcons&&(i.length>1||!s)){qk(e.loadIcons(i,r,n),m=>{Sp(e,i,m)});return}if(s){i.forEach(m=>{const g=s(m,r,n);qk(g,b=>{const x=b?{prefix:r,icons:{[m]:b}}:null;Sp(e,[m],x)})});return}const{valid:l,invalid:c}=M8(i);if(c.length&&Sp(e,c,null),!l.length)return;const d=r.match(g2)?Mb(n):null;if(!d){Sp(e,l,null);return}d.prepare(n,r,l).forEach(m=>{R8(n,m,g=>{Sp(e,m.icons,g)})})}))}const k2=(e,t)=>{const n=_8(e,!0,y2()),r=C8(n);if(!r.pending.length){let d=!0;return t&&setTimeout(()=>{d&&t(r.loaded,r.missing,r.pending,Gk)}),()=>{d=!1}}const i=Object.create(null),s=[];let l,c;return r.pending.forEach(d=>{const{provider:h,prefix:m}=d;if(m===c&&h===l)return;l=h,c=m,s.push(Rf(h,m));const g=i[h]||(i[h]=Object.create(null));g[m]||(g[m]=[])}),r.pending.forEach(d=>{const{provider:h,prefix:m,name:g}=d,b=Rf(h,m),x=b.pendingIcons||(b.pendingIcons=new Set);x.has(g)||(x.add(g),i[h][m].push(g))}),s.forEach(d=>{const h=i[d.provider][d.prefix];h.length&&D8(d,h)}),t?T8(t,r,s):Gk};function N8(e,t){const n={...e};for(const r in t){const i=t[r],s=typeof i;r in b2?(i===null||i&&(s==="string"||s==="number"))&&(n[r]=i):s===typeof n[r]&&(n[r]=r==="rotate"?i%4:i)}return n}const F8=/[\s,]+/;function O8(e,t){t.split(F8).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function z8(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(e);return isNaN(i)?0:r(i)}else if(n!==e){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let s=parseFloat(e.slice(0,e.length-n.length));return isNaN(s)?0:(s=s/i,s%1===0?r(s):0)}}return t}function j8(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'"+e+" "}function B8(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/ /g,"%3E").replace(/\s+/g," ")}function V8(e){return"data:image/svg+xml,"+B8(e)}function U8(e){return'url("'+V8(e)+'")'}let Vp;function K8(){try{Vp=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Vp=null}}function W8(e){return Vp===void 0&&K8(),Vp?Vp.createHTML(e):e}const C2={...x2,inline:!1},H8={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},G8={display:"inline-block"},Db={backgroundColor:"currentColor"},E2={backgroundColor:"transparent"},Yk={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Xk={WebkitMask:Db,mask:Db,background:E2};for(const e in Xk){const t=Xk[e];for(const n in Yk)t[e+n]=Yk[n]}const q8={...C2,inline:!0};function Qk(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const Y8=(e,t,n)=>{const r=t.inline?q8:C2,i=N8(r,t),s=t.mode||"svg",l={},c=t.style||{},d={...s==="svg"?H8:{}};if(n){const _=kv(n,!1,!0);if(_){const T=["iconify"],$=["provider","prefix"];for(const L of $)_[L]&&T.push("iconify--"+_[L]);d.className=T.join(" ")}}for(let _ in t){const T=t[_];if(T!==void 0)switch(_){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":break;case"_ref":d.ref=T;break;case"className":d[_]=(d[_]?d[_]+" ":"")+T;break;case"inline":case"hFlip":case"vFlip":i[_]=T===!0||T==="true"||T===1;break;case"flip":typeof T=="string"&&O8(i,T);break;case"color":l.color=T;break;case"rotate":typeof T=="string"?i[_]=z8(T):typeof T=="number"&&(i[_]=T);break;case"ariaHidden":case"aria-hidden":T!==!0&&T!=="true"&&delete d["aria-hidden"];break;default:r[_]===void 0&&(d[_]=T)}}const h=c8(e,i),m=h.attributes;if(i.inline&&(l.verticalAlign="-0.125em"),s==="svg"){d.style={...l,...c},Object.assign(d,m);let _=0,T=t.id;return typeof T=="string"&&(T=T.replace(/-/g,"_")),d.dangerouslySetInnerHTML={__html:W8(h8(h.body,T?()=>T+"ID"+_++:"iconifyReact"))},S.createElement("svg",d)}const{body:g,width:b,height:x}=e,k=s==="mask"||(s==="bg"?!1:g.indexOf("currentColor")!==-1),P=j8(g,{...m,width:b+"",height:x+""});return d.style={...l,"--svg":U8(P),width:Qk(m.width),height:Qk(m.height),...G8,...k?Db:E2,...c},S.createElement("span",d)};y2(!0);m8("",k8);if(typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!r8(r))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const r="IconifyProviders["+n+"] is invalid.";try{const i=t[n];if(typeof i!="object"||!i||i.resources===void 0)continue;g8(n,i)||console.error(r)}catch{console.error(r)}}}}function P2(e){const[t,n]=S.useState(!!e.ssr),[r,i]=S.useState({});function s(x){if(x){const k=e.icon;if(typeof k=="object")return{name:"",data:k};const P=Uk(k);if(P)return{name:k,data:P}}return{name:""}}const[l,c]=S.useState(s(!!e.ssr));function d(){const x=r.callback;x&&(x(),i({}))}function h(x){if(JSON.stringify(l)!==JSON.stringify(x))return d(),c(x),!0}function m(){var x;const k=e.icon;if(typeof k=="object"){h({name:"",data:k});return}const P=Uk(k);if(h({name:k,data:P}))if(P===void 0){const _=k2([k],m);i({callback:_})}else P&&((x=e.onLoad)===null||x===void 0||x.call(e,k))}S.useEffect(()=>(n(!0),d),[]),S.useEffect(()=>{t&&m()},[e.icon,t]);const{name:g,data:b}=l;return b?Y8({...tw,...b},e,g):e.children?e.children:e.fallback?e.fallback:S.createElement("span",{})}const Ei=S.forwardRef((e,t)=>P2({...e,_ref:t}));S.forwardRef((e,t)=>P2({inline:!0,...e,_ref:t}));var Lp={exports:{}};/**
+ `.trim(),B.head.prepend(Y)},[b]),S.useEffect(()=>{let B=_.current;return()=>{var Y;g||KS((Y=B.target)!==null&&Y!==void 0?Y:void 0);for(let te of B.disposables)te();B.disposables=[]}},[g]),{isPressed:d||k,pressProps:Pn(x,j,{[qS]:!0})}}function Hx(e){return e.tagName==="A"&&e.hasAttribute("href")}function a0(e,t){const{key:n,code:r}=e,i=t,s=i.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(i instanceof Zi(i).HTMLInputElement&&!wT(i,n)||i instanceof Zi(i).HTMLTextAreaElement||i.isContentEditable)&&!((s==="link"||!s&&Hx(i))&&n!=="Enter")}function iu(e,t){let n=t.clientX,r=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function R5(e){return e instanceof HTMLInputElement?!1:e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!Hx(e)}function YS(e,t){return e instanceof HTMLInputElement?!wT(e,t):R5(e)}const L5=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function wT(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":L5.has(e.type)}let Zs=null,ih=new Set,jp=new Map,Su=!1,gb=!1;const M5={Tab:!0,Escape:!0};function wv(e,t){for(let n of ih)n(e,t)}function D5(e){return!(e.metaKey||!bu()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Yg(e){Su=!0,D5(e)&&(Zs="keyboard",wv("keyboard",e))}function xf(e){Zs="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Su=!0,wv("pointer",e))}function ST(e){AE(e)&&(Su=!0,Zs="virtual")}function kT(e){e.target===window||e.target===document||qg||!e.isTrusted||(!Su&&!gb&&(Zs="virtual",wv("virtual",e)),Su=!1,gb=!1)}function CT(){qg||(Su=!1,gb=!0)}function Xg(e){if(typeof window>"u"||typeof document>"u"||jp.get(Zi(e)))return;const t=Zi(e),n=Dt(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Su=!0,r.apply(this,arguments)},n.addEventListener("keydown",Yg,!0),n.addEventListener("keyup",Yg,!0),n.addEventListener("click",ST,!0),t.addEventListener("focus",kT,!0),t.addEventListener("blur",CT,!1),typeof PointerEvent<"u"&&(n.addEventListener("pointerdown",xf,!0),n.addEventListener("pointermove",xf,!0),n.addEventListener("pointerup",xf,!0)),t.addEventListener("beforeunload",()=>{ET(e)},{once:!0}),jp.set(t,{focus:r})}const ET=(e,t)=>{const n=Zi(e),r=Dt(e);t&&r.removeEventListener("DOMContentLoaded",t),jp.has(n)&&(n.HTMLElement.prototype.focus=jp.get(n).focus,r.removeEventListener("keydown",Yg,!0),r.removeEventListener("keyup",Yg,!0),r.removeEventListener("click",ST,!0),n.removeEventListener("focus",kT,!0),n.removeEventListener("blur",CT,!1),typeof PointerEvent<"u"&&(r.removeEventListener("pointerdown",xf,!0),r.removeEventListener("pointermove",xf,!0),r.removeEventListener("pointerup",xf,!0)),jp.delete(n))};function N5(e){const t=Dt(e);let n;return t.readyState!=="loading"?Xg(e):(n=()=>{Xg(e)},t.addEventListener("DOMContentLoaded",n)),()=>ET(e,n)}typeof document<"u"&&N5();function Gx(){return Zs!=="pointer"}function oh(){return Zs}function F5(e){Zs=e,wv(e,null)}function FG(){Xg();let[e,t]=S.useState(Zs);return S.useEffect(()=>{let n=()=>{t(Zs)};return ih.add(n),()=>{ih.delete(n)}},[]),ph()?null:e}const O5=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function z5(e,t,n){let r=Dt(n?.target);const i=typeof window<"u"?Zi(n?.target).HTMLInputElement:HTMLInputElement,s=typeof window<"u"?Zi(n?.target).HTMLTextAreaElement:HTMLTextAreaElement,l=typeof window<"u"?Zi(n?.target).HTMLElement:HTMLElement,c=typeof window<"u"?Zi(n?.target).KeyboardEvent:KeyboardEvent;return e=e||r.activeElement instanceof i&&!O5.has(r.activeElement.type)||r.activeElement instanceof s||r.activeElement instanceof l&&r.activeElement.isContentEditable,!(e&&t==="keyboard"&&n instanceof c&&!M5[n.key])}function j5(e,t,n){Xg(),S.useEffect(()=>{let r=(i,s)=>{z5(!!n?.isTextInput,i,s)&&e(Gx())};return ih.add(r),()=>{ih.delete(r)}},t)}function ku(e){const t=Dt(e),n=Or(t);if(oh()==="virtual"){let r=n;PE(()=>{Or(t)===r&&e.isConnected&&Jl(e)})}else Jl(e)}function PT(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e;const s=S.useCallback(d=>{if(d.target===d.currentTarget)return r&&r(d),i&&i(!1),!0},[r,i]),l=bT(s),c=S.useCallback(d=>{const h=Dt(d.target),m=h?Or(h):Or();d.target===d.currentTarget&&m===En(d.nativeEvent)&&(n&&n(d),i&&i(!0),l(d))},[i,n,l]);return{focusProps:{onFocus:!t&&(n||i||r)?c:void 0,onBlur:!t&&(r||i)?s:void 0}}}function XS(e){if(!e)return;let t=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){t=!0},continuePropagation(){t=!1},isPropagationStopped(){return t}};e(r),t&&n.stopPropagation()}}function B5(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:XS(e.onKeyDown),onKeyUp:XS(e.onKeyUp)}}}let V5=We.createContext(null);function U5(e){let t=S.useContext(V5)||{};_E(t,e);let{ref:n,...r}=t;return r}function xh(e,t){let{focusProps:n}=PT(e),{keyboardProps:r}=B5(e),i=Pn(n,r),s=U5(t),l=e.isDisabled?{}:s,c=S.useRef(e.autoFocus);S.useEffect(()=>{c.current&&t.current&&ku(t.current),c.current=!1},[t]);let d=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(d=void 0),{focusableProps:Pn({...i,tabIndex:d},l)}}function K5({children:e}){let t=S.useMemo(()=>({register:()=>{}}),[]);return We.createElement(Wx.Provider,{value:t},e)}function Sv(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,s=S.useRef({isFocusWithin:!1}),{addGlobalListener:l,removeAllGlobalListeners:c}=ux(),d=S.useCallback(g=>{g.currentTarget.contains(g.target)&&s.current.isFocusWithin&&!g.currentTarget.contains(g.relatedTarget)&&(s.current.isFocusWithin=!1,c(),n&&n(g),i&&i(!1))},[n,i,s,c]),h=bT(d),m=S.useCallback(g=>{if(!g.currentTarget.contains(g.target))return;const b=Dt(g.target),x=Or(b);if(!s.current.isFocusWithin&&x===En(g.nativeEvent)){r&&r(g),i&&i(!0),s.current.isFocusWithin=!0,h(g);let k=g.currentTarget;l(b,"focus",P=>{if(s.current.isFocusWithin&&!ii(k,P.target)){let _=new b.defaultView.FocusEvent("blur",{relatedTarget:P.target});yT(_,k);let T=Kx(_);d(T)}},{capture:!0})}},[r,i,h,l,d]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:m,onBlur:d}}}let vb=!1,u0=0;function W5(){vb=!0,setTimeout(()=>{vb=!1},50)}function QS(e){e.pointerType==="touch"&&W5()}function H5(){if(!(typeof document>"u"))return typeof PointerEvent<"u"&&document.addEventListener("pointerup",QS),u0++,()=>{u0--,!(u0>0)&&typeof PointerEvent<"u"&&document.removeEventListener("pointerup",QS)}}function Cu(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[s,l]=S.useState(!1),c=S.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;S.useEffect(H5,[]);let{addGlobalListener:d,removeAllGlobalListeners:h}=ux(),{hoverProps:m,triggerHoverEnd:g}=S.useMemo(()=>{let b=(P,_)=>{if(c.pointerType=_,i||_==="touch"||c.isHovered||!P.currentTarget.contains(P.target))return;c.isHovered=!0;let T=P.currentTarget;c.target=T,d(Dt(P.target),"pointerover",$=>{c.isHovered&&c.target&&!ii(c.target,$.target)&&x($,$.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:T,pointerType:_}),n&&n(!0),l(!0)},x=(P,_)=>{let T=c.target;c.pointerType="",c.target=null,!(_==="touch"||!c.isHovered||!T)&&(c.isHovered=!1,h(),r&&r({type:"hoverend",target:T,pointerType:_}),n&&n(!1),l(!1))},k={};return typeof PointerEvent<"u"&&(k.onPointerEnter=P=>{vb&&P.pointerType==="mouse"||b(P,P.pointerType)},k.onPointerLeave=P=>{!i&&P.currentTarget.contains(P.target)&&x(P,P.pointerType)}),{hoverProps:k,triggerHoverEnd:x}},[t,n,r,i,c,d,h]);return S.useEffect(()=>{i&&g({currentTarget:c.target},c.pointerType)},[i]),{hoverProps:m,isHovered:s}}function G5(e){let{ref:t,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:i}=e,s=S.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),l=jn(d=>{n&&JS(d,t)&&(i&&i(d),s.current.isPointerDown=!0)}),c=jn(d=>{n&&n(d)});S.useEffect(()=>{let d=s.current;if(r)return;const h=t.current,m=Dt(h);if(typeof PointerEvent<"u"){let g=b=>{d.isPointerDown&&JS(b,t)&&c(b),d.isPointerDown=!1};return m.addEventListener("pointerdown",l,!0),m.addEventListener("click",g,!0),()=>{m.removeEventListener("pointerdown",l,!0),m.removeEventListener("click",g,!0)}}},[t,r,l,c])}function JS(e,t){if(e.button>0)return!1;if(e.target){const n=e.target.ownerDocument;if(!n||!n.documentElement.contains(e.target)||e.target.closest("[data-react-aria-top-layer]"))return!1}return t.current?!e.composedPath().includes(t.current):!1}const ZS=We.createContext(null),yb="react-aria-focus-scope-restore";let Xt=null;function q5(e){let{children:t,contain:n,restoreFocus:r,autoFocus:i}=e,s=S.useRef(null),l=S.useRef(null),c=S.useRef([]),{parentNode:d}=S.useContext(ZS)||{},h=S.useMemo(()=>new xb({scopeRef:c}),[c]);sn(()=>{let b=d||Ln.root;if(Ln.getTreeNode(b.scopeRef)&&Xt&&!Qg(Xt,b.scopeRef)){let x=Ln.getTreeNode(Xt);x&&(b=x)}b.addChild(h),Ln.addNode(h)},[h,d]),sn(()=>{let b=Ln.getTreeNode(c);b&&(b.contain=!!n)},[n]),sn(()=>{var b;let x=(b=s.current)===null||b===void 0?void 0:b.nextSibling,k=[],P=_=>_.stopPropagation();for(;x&&x!==l.current;)k.push(x),x.addEventListener(yb,P),x=x.nextSibling;return c.current=k,()=>{for(let _ of k)_.removeEventListener(yb,P)}},[t]),Z5(c,r,n),X5(c,n),eF(c,r,n),J5(c,i),S.useEffect(()=>{const b=Or(Dt(c.current?c.current[0]:void 0));let x=null;if(to(b,c.current)){for(let k of Ln.traverse())k.scopeRef&&to(b,k.scopeRef.current)&&(x=k);x===Ln.getTreeNode(c)&&(Xt=x.scopeRef)}},[c]),sn(()=>()=>{var b,x,k;let P=(k=(x=Ln.getTreeNode(c))===null||x===void 0||(b=x.parent)===null||b===void 0?void 0:b.scopeRef)!==null&&k!==void 0?k:null;(c===Xt||Qg(c,Xt))&&(!P||Ln.getTreeNode(P))&&(Xt=P),Ln.removeTreeNode(c)},[c]);let m=S.useMemo(()=>Y5(c),[]),g=S.useMemo(()=>({focusManager:m,parentNode:h}),[h,m]);return We.createElement(ZS.Provider,{value:g},We.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:s}),t,We.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:l}))}function Y5(e){return{focusNext(t={}){let n=e.current,{from:r,tabbable:i,wrap:s,accept:l}=t;var c;let d=r||Or(Dt((c=n[0])!==null&&c!==void 0?c:void 0)),h=n[0].previousElementSibling,m=hu(n),g=Xs(m,{tabbable:i,accept:l},n);g.currentNode=to(d,n)?d:h;let b=g.nextNode();return!b&&s&&(g.currentNode=h,b=g.nextNode()),b&&Ys(b,!0),b},focusPrevious(t={}){let n=e.current,{from:r,tabbable:i,wrap:s,accept:l}=t;var c;let d=r||Or(Dt((c=n[0])!==null&&c!==void 0?c:void 0)),h=n[n.length-1].nextElementSibling,m=hu(n),g=Xs(m,{tabbable:i,accept:l},n);g.currentNode=to(d,n)?d:h;let b=g.previousNode();return!b&&s&&(g.currentNode=h,b=g.previousNode()),b&&Ys(b,!0),b},focusFirst(t={}){let n=e.current,{tabbable:r,accept:i}=t,s=hu(n),l=Xs(s,{tabbable:r,accept:i},n);l.currentNode=n[0].previousElementSibling;let c=l.nextNode();return c&&Ys(c,!0),c},focusLast(t={}){let n=e.current,{tabbable:r,accept:i}=t,s=hu(n),l=Xs(s,{tabbable:r,accept:i},n);l.currentNode=n[n.length-1].nextElementSibling;let c=l.previousNode();return c&&Ys(c,!0),c}}}function hu(e){return e[0].parentElement}function Ap(e){let t=Ln.getTreeNode(Xt);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function X5(e,t){let n=S.useRef(void 0),r=S.useRef(void 0);sn(()=>{let i=e.current;if(!t){r.current&&(cancelAnimationFrame(r.current),r.current=void 0);return}const s=Dt(i?i[0]:void 0);let l=h=>{if(h.key!=="Tab"||h.altKey||h.ctrlKey||h.metaKey||!Ap(e)||h.isComposing)return;let m=Or(s),g=e.current;if(!g||!to(m,g))return;let b=hu(g),x=Xs(b,{tabbable:!0},g);if(!m)return;x.currentNode=m;let k=h.shiftKey?x.previousNode():x.nextNode();k||(x.currentNode=h.shiftKey?g[g.length-1].nextElementSibling:g[0].previousElementSibling,k=h.shiftKey?x.previousNode():x.nextNode()),h.preventDefault(),k&&Ys(k,!0)},c=h=>{(!Xt||Qg(Xt,e))&&to(En(h),e.current)?(Xt=e,n.current=En(h)):Ap(e)&&!ql(En(h),e)?n.current?n.current.focus():Xt&&Xt.current&&bb(Xt.current):Ap(e)&&(n.current=En(h))},d=h=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{let m=oh(),g=(m==="virtual"||m===null)&&lx()&&kE(),b=Or(s);if(!g&&b&&Ap(e)&&!ql(b,e)){Xt=e;let k=En(h);if(k&&k.isConnected){var x;n.current=k,(x=n.current)===null||x===void 0||x.focus()}else Xt.current&&bb(Xt.current)}})};return s.addEventListener("keydown",l,!1),s.addEventListener("focusin",c,!1),i?.forEach(h=>h.addEventListener("focusin",c,!1)),i?.forEach(h=>h.addEventListener("focusout",d,!1)),()=>{s.removeEventListener("keydown",l,!1),s.removeEventListener("focusin",c,!1),i?.forEach(h=>h.removeEventListener("focusin",c,!1)),i?.forEach(h=>h.removeEventListener("focusout",d,!1))}},[e,t]),sn(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function TT(e){return ql(e)}function to(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}function ql(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of Ln.traverse(Ln.getTreeNode(t)))if(n&&to(e,n.current))return!0;return!1}function Q5(e){return ql(e,Xt)}function Qg(e,t){var n;let r=(n=Ln.getTreeNode(t))===null||n===void 0?void 0:n.parent;for(;r;){if(r.scopeRef===e)return!0;r=r.parent}return!1}function Ys(e,t=!1){if(e!=null&&!t)try{ku(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function _T(e,t=!0){let n=e[0].previousElementSibling,r=hu(e),i=Xs(r,{tabbable:t},e);i.currentNode=n;let s=i.nextNode();return t&&!s&&(r=hu(e),i=Xs(r,{tabbable:!1},e),i.currentNode=n,s=i.nextNode()),s}function bb(e,t=!0){Ys(_T(e,t))}function J5(e,t){const n=We.useRef(t);S.useEffect(()=>{if(n.current){Xt=e;const r=Dt(e.current?e.current[0]:void 0);!to(Or(r),Xt.current)&&e.current&&bb(e.current)}n.current=!1},[e])}function Z5(e,t,n){sn(()=>{if(t||n)return;let r=e.current;const i=Dt(r?r[0]:void 0);let s=l=>{let c=En(l);to(c,e.current)?Xt=e:TT(c)||(Xt=null)};return i.addEventListener("focusin",s,!1),r?.forEach(l=>l.addEventListener("focusin",s,!1)),()=>{i.removeEventListener("focusin",s,!1),r?.forEach(l=>l.removeEventListener("focusin",s,!1))}},[e,t,n])}function ek(e){let t=Ln.getTreeNode(Xt);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return t?.scopeRef===e}function eF(e,t,n){const r=S.useRef(typeof document<"u"?Or(Dt(e.current?e.current[0]:void 0)):null);sn(()=>{let i=e.current;const s=Dt(i?i[0]:void 0);if(!t||n)return;let l=()=>{(!Xt||Qg(Xt,e))&&to(Or(s),e.current)&&(Xt=e)};return s.addEventListener("focusin",l,!1),i?.forEach(c=>c.addEventListener("focusin",l,!1)),()=>{s.removeEventListener("focusin",l,!1),i?.forEach(c=>c.removeEventListener("focusin",l,!1))}},[e,n]),sn(()=>{const i=Dt(e.current?e.current[0]:void 0);if(!t)return;let s=l=>{if(l.key!=="Tab"||l.altKey||l.ctrlKey||l.metaKey||!Ap(e)||l.isComposing)return;let c=i.activeElement;if(!ql(c,e)||!ek(e))return;let d=Ln.getTreeNode(e);if(!d)return;let h=d.nodeToRestore,m=Xs(i.body,{tabbable:!0});m.currentNode=c;let g=l.shiftKey?m.previousNode():m.nextNode();if((!h||!h.isConnected||h===i.body)&&(h=void 0,d.nodeToRestore=void 0),(!g||!ql(g,e))&&h){m.currentNode=h;do g=l.shiftKey?m.previousNode():m.nextNode();while(ql(g,e));l.preventDefault(),l.stopPropagation(),g?Ys(g,!0):TT(h)?Ys(h,!0):c.blur()}};return n||i.addEventListener("keydown",s,!0),()=>{n||i.removeEventListener("keydown",s,!0)}},[e,t,n]),sn(()=>{const i=Dt(e.current?e.current[0]:void 0);if(!t)return;let s=Ln.getTreeNode(e);if(s){var l;return s.nodeToRestore=(l=r.current)!==null&&l!==void 0?l:void 0,()=>{let c=Ln.getTreeNode(e);if(!c)return;let d=c.nodeToRestore,h=Or(i);if(t&&d&&(h&&ql(h,e)||h===i.body&&ek(e))){let m=Ln.clone();requestAnimationFrame(()=>{if(i.activeElement===i.body){let g=m.getTreeNode(e);for(;g;){if(g.nodeToRestore&&g.nodeToRestore.isConnected){tk(g.nodeToRestore);return}g=g.parent}for(g=m.getTreeNode(e);g;){if(g.scopeRef&&g.scopeRef.current&&Ln.getTreeNode(g.scopeRef)){let b=_T(g.scopeRef.current,!0);tk(b);return}g=g.parent}}})}}}},[e,t])}function tk(e){e.dispatchEvent(new CustomEvent(yb,{bubbles:!0,cancelable:!0}))&&Ys(e)}function Xs(e,t,n){let r=t?.tabbable?wM:DE,i=e?.nodeType===Node.ELEMENT_NODE?e:null,s=Dt(i),l=JL(s,e||s,NodeFilter.SHOW_ELEMENT,{acceptNode(c){var d;return!(t==null||(d=t.from)===null||d===void 0)&&d.contains(c)?NodeFilter.FILTER_REJECT:r(c)&&vT(c)&&(!n||to(c,n))&&(!t?.accept||t.accept(c))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(l.currentNode=t.from),l}class qx{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let i=this.fastMap.get(n??null);if(!i)return;let s=new xb({scopeRef:t});i.addChild(s),s.parent=i,this.fastMap.set(t,s),r&&(s.nodeToRestore=r)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let n=this.fastMap.get(t);if(!n)return;let r=n.parent;for(let s of this.traverse())s!==n&&n.nodeToRestore&&s.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&to(s.nodeToRestore,n.scopeRef.current)&&(s.nodeToRestore=n.nodeToRestore);let i=n.children;r&&(r.removeChild(n),i.size>0&&i.forEach(s=>r&&r.addChild(s))),this.fastMap.delete(n.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let n of t.children)yield*this.traverse(n)}clone(){var t;let n=new qx;var r;for(let i of this.traverse())n.addTreeNode(i.scopeRef,(r=(t=i.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&r!==void 0?r:null,i.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new xb({scopeRef:null}),this.fastMap.set(null,this.root)}}class xb{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}let Ln=new qx;function Af(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=S.useRef({isFocused:!1,isFocusVisible:t||Gx()}),[s,l]=S.useState(!1),[c,d]=S.useState(()=>i.current.isFocused&&i.current.isFocusVisible),h=S.useCallback(()=>d(i.current.isFocused&&i.current.isFocusVisible),[]),m=S.useCallback(x=>{i.current.isFocused=x,l(x),h()},[h]);j5(x=>{i.current.isFocusVisible=x,h()},[],{isTextInput:n});let{focusProps:g}=PT({isDisabled:r,onFocusChange:m}),{focusWithinProps:b}=Sv({isDisabled:!r,onFocusWithinChange:m});return{isFocused:s,isFocusVisible:c,focusProps:r?b:g}}function tF(e){let t=iF(Dt(e));t!==e&&(t&&nF(t,e),e&&rF(e,t))}function nF(e,t){e.dispatchEvent(new FocusEvent("blur",{relatedTarget:t})),e.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:t}))}function rF(e,t){e.dispatchEvent(new FocusEvent("focus",{relatedTarget:t})),e.dispatchEvent(new FocusEvent("focusin",{bubbles:!0,relatedTarget:t}))}function iF(e){let t=Or(e),n=t?.getAttribute("aria-activedescendant");return n&&e.getElementById(n)||t}const c0=typeof document<"u"&&window.visualViewport,oF=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let gg=0,f0;function sF(e={}){let{isDisabled:t}=e;sn(()=>{if(!t)return gg++,gg===1&&(gv()?f0=aF():f0=lF()),()=>{gg--,gg===0&&f0()}},[t])}function lF(){let e=window.innerWidth-document.documentElement.clientWidth;return Pf(e>0&&("scrollbarGutter"in document.documentElement.style?mu(document.documentElement,"scrollbarGutter","stable"):mu(document.documentElement,"paddingRight",`${e}px`)),mu(document.documentElement,"overflow","hidden"))}function aF(){let e,t,n=h=>{e=IE(h.target,!0),!(e===document.documentElement&&e===document.body)&&e instanceof HTMLElement&&window.getComputedStyle(e).overscrollBehavior==="auto"&&(t=mu(e,"overscrollBehavior","contain"))},r=h=>{if(!e||e===document.documentElement||e===document.body){h.preventDefault();return}e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&h.preventDefault()},i=()=>{t&&t()},s=h=>{let m=h.target;uF(m)&&(c(),m.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{m.style.transform="",c0&&(c0.height{nk(m)}):c0.addEventListener("resize",()=>nk(m),{once:!0}))}))},l=null,c=()=>{if(l)return;let h=()=>{window.scrollTo(0,0)},m=window.pageXOffset,g=window.pageYOffset;l=Pf(gp(window,"scroll",h),mu(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),mu(document.documentElement,"overflow","hidden"),mu(document.body,"marginTop",`-${g}px`),()=>{window.scrollTo(m,g)}),window.scrollTo(0,0)},d=Pf(gp(document,"touchstart",n,{passive:!1,capture:!0}),gp(document,"touchmove",r,{passive:!1,capture:!0}),gp(document,"touchend",i,{passive:!1,capture:!0}),gp(document,"focus",s,!0));return()=>{t?.(),l?.(),d()}}function mu(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function gp(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function nk(e){let t=document.scrollingElement||document.documentElement,n=e;for(;n&&n!==t;){let r=IE(n);if(r!==document.documentElement&&r!==document.body&&r!==n){let i=r.getBoundingClientRect().top,s=n.getBoundingClientRect().top;s>i+n.clientHeight&&(r.scrollTop+=s-i)}n=r.parentElement}}function uF(e){return e instanceof HTMLInputElement&&!oF.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}const cF=S.createContext({});function IT(){var e;return(e=S.useContext(cF))!==null&&e!==void 0?e:{}}const wb=We.createContext(null);function fF(e){let{children:t}=e,n=S.useContext(wb),[r,i]=S.useState(0),s=S.useMemo(()=>({parent:n,modalCount:r,addModal(){i(l=>l+1),n&&n.addModal()},removeModal(){i(l=>l-1),n&&n.removeModal()}}),[n,r]);return We.createElement(wb.Provider,{value:s},t)}function dF(){let e=S.useContext(wb);return{modalProviderProps:{"aria-hidden":e&&e.modalCount>0?!0:void 0}}}function pF(e){let{modalProviderProps:t}=dF();return We.createElement("div",{"data-overlay-container":!0,...e,...t})}function $T(e){return We.createElement(fF,null,We.createElement(pF,e))}function rk(e){let t=ph(),{portalContainer:n=t?null:document.body,...r}=e,{getContainer:i}=IT();if(!e.portalContainer&&i&&(n=i()),We.useEffect(()=>{if(n?.closest("[data-overlay-container]"))throw new Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.")},[n]),!n)return null;let s=We.createElement($T,r);return ME.createPortal(s,n)}var AT={};AT={dismiss:"تجاهل"};var RT={};RT={dismiss:"Отхвърляне"};var LT={};LT={dismiss:"Odstranit"};var MT={};MT={dismiss:"Luk"};var DT={};DT={dismiss:"Schließen"};var NT={};NT={dismiss:"Απόρριψη"};var FT={};FT={dismiss:"Dismiss"};var OT={};OT={dismiss:"Descartar"};var zT={};zT={dismiss:"Lõpeta"};var jT={};jT={dismiss:"Hylkää"};var BT={};BT={dismiss:"Rejeter"};var VT={};VT={dismiss:"התעלם"};var UT={};UT={dismiss:"Odbaci"};var KT={};KT={dismiss:"Elutasítás"};var WT={};WT={dismiss:"Ignora"};var HT={};HT={dismiss:"閉じる"};var GT={};GT={dismiss:"무시"};var qT={};qT={dismiss:"Atmesti"};var YT={};YT={dismiss:"Nerādīt"};var XT={};XT={dismiss:"Lukk"};var QT={};QT={dismiss:"Negeren"};var JT={};JT={dismiss:"Zignoruj"};var ZT={};ZT={dismiss:"Descartar"};var e_={};e_={dismiss:"Dispensar"};var t_={};t_={dismiss:"Revocare"};var n_={};n_={dismiss:"Пропустить"};var r_={};r_={dismiss:"Zrušiť"};var i_={};i_={dismiss:"Opusti"};var o_={};o_={dismiss:"Odbaci"};var s_={};s_={dismiss:"Avvisa"};var l_={};l_={dismiss:"Kapat"};var a_={};a_={dismiss:"Скасувати"};var u_={};u_={dismiss:"取消"};var c_={};c_={dismiss:"關閉"};var f_={};f_={"ar-AE":AT,"bg-BG":RT,"cs-CZ":LT,"da-DK":MT,"de-DE":DT,"el-GR":NT,"en-US":FT,"es-ES":OT,"et-EE":zT,"fi-FI":jT,"fr-FR":BT,"he-IL":VT,"hr-HR":UT,"hu-HU":KT,"it-IT":WT,"ja-JP":HT,"ko-KR":GT,"lt-LT":qT,"lv-LV":YT,"nb-NO":XT,"nl-NL":QT,"pl-PL":JT,"pt-BR":ZT,"pt-PT":e_,"ro-RO":t_,"ru-RU":n_,"sk-SK":r_,"sl-SI":i_,"sr-SP":o_,"sv-SE":s_,"tr-TR":l_,"uk-UA":a_,"zh-CN":u_,"zh-TW":c_};const ik={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function hF(e={}){let{style:t,isFocusable:n}=e,[r,i]=S.useState(!1),{focusWithinProps:s}=Sv({isDisabled:!n,onFocusWithinChange:c=>i(c)}),l=S.useMemo(()=>r?t:t?{...ik,...t}:ik,[r]);return{visuallyHiddenProps:{...s,style:l}}}function mF(e){let{children:t,elementType:n="div",isFocusable:r,style:i,...s}=e,{visuallyHiddenProps:l}=hF(e);return We.createElement(n,Pn(s,l),t)}function gF(e){return e&&e.__esModule?e.default:e}function ok(e){let{onDismiss:t,...n}=e,r=BL(gF(f_),"@react-aria/overlays"),i=TE(n,r.format("dismiss")),s=()=>{t&&t()};return We.createElement(mF,null,We.createElement("button",{...i,tabIndex:-1,onClick:s,style:{width:1,height:1}}))}let vp=new WeakMap,qi=[];function vF(e,t=document.body){let n=new Set(e),r=new Set,i=d=>{for(let b of d.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))n.add(b);let h=b=>{if(n.has(b)||b.parentElement&&r.has(b.parentElement)&&b.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let x of n)if(b.contains(x))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},m=document.createTreeWalker(d,NodeFilter.SHOW_ELEMENT,{acceptNode:h}),g=h(d);if(g===NodeFilter.FILTER_ACCEPT&&s(d),g!==NodeFilter.FILTER_REJECT){let b=m.nextNode();for(;b!=null;)s(b),b=m.nextNode()}},s=d=>{var h;let m=(h=vp.get(d))!==null&&h!==void 0?h:0;d.getAttribute("aria-hidden")==="true"&&m===0||(m===0&&d.setAttribute("aria-hidden","true"),r.add(d),vp.set(d,m+1))};qi.length&&qi[qi.length-1].disconnect(),i(t);let l=new MutationObserver(d=>{for(let h of d)if(!(h.type!=="childList"||h.addedNodes.length===0)&&![...n,...r].some(m=>m.contains(h.target))){for(let m of h.removedNodes)m instanceof Element&&(n.delete(m),r.delete(m));for(let m of h.addedNodes)(m instanceof HTMLElement||m instanceof SVGElement)&&(m.dataset.liveAnnouncer==="true"||m.dataset.reactAriaTopLayer==="true")?n.add(m):m instanceof Element&&i(m)}});l.observe(t,{childList:!0,subtree:!0});let c={visibleNodes:n,hiddenNodes:r,observe(){l.observe(t,{childList:!0,subtree:!0})},disconnect(){l.disconnect()}};return qi.push(c),()=>{l.disconnect();for(let d of r){let h=vp.get(d);h!=null&&(h===1?(d.removeAttribute("aria-hidden"),vp.delete(d)):vp.set(d,h-1))}c===qi[qi.length-1]?(qi.pop(),qi.length&&qi[qi.length-1].observe()):qi.splice(qi.indexOf(c),1)}}const d_=We.createContext(null);function yF(e){let t=ph(),{portalContainer:n=t?null:document.body,isExiting:r}=e,[i,s]=S.useState(!1),l=S.useMemo(()=>({contain:i,setContain:s}),[i,s]),{getContainer:c}=IT();if(!e.portalContainer&&c&&(n=c()),!n)return null;let d=e.children;return e.disableFocusManagement||(d=We.createElement(q5,{restoreFocus:!0,contain:(e.shouldContainFocus||i)&&!r},d)),d=We.createElement(d_.Provider,{value:l},We.createElement(K5,null,d)),ME.createPortal(d,n)}function p_(){let e=S.useContext(d_),t=e?.setContain;sn(()=>{t?.(!0)},[t])}var bF=({children:e,navigate:t,disableAnimation:n,useHref:r,disableRipple:i=!1,skipFramerMotionAnimations:s=n,reducedMotion:l="never",validationBehavior:c,locale:d="en-US",labelPlacement:h,defaultDates:m,createCalendar:g,spinnerVariant:b,...x})=>{let k=e;t&&(k=D.jsx(cM,{navigate:t,useHref:r,children:k}));const P=S.useMemo(()=>(n&&s&&(fs.skipAnimations=!0),{createCalendar:g,defaultDates:m,disableAnimation:n,disableRipple:i,validationBehavior:c,labelPlacement:h,spinnerVariant:b}),[g,m?.maxDate,m?.minDate,n,i,c,h,b]);return D.jsx(wL,{value:P,children:D.jsx(LL,{locale:d,children:D.jsx(D3,{reducedMotion:l,children:D.jsx($T,{...x,children:k})})})})};function OG(e){const t=si(),n=t?.labelPlacement;return S.useMemo(()=>{var r,i;const s=(i=(r=e.labelPlacement)!=null?r:n)!=null?i:"inside";return s==="inside"&&!e.label?"outside":s},[e.labelPlacement,n,e.label])}function xF(e){const t=si(),n=t?.labelPlacement;return S.useMemo(()=>{var r,i;const s=(i=(r=e.labelPlacement)!=null?r:n)!=null?i:"inside";return s==="inside"&&!e.label?"outside":s},[e.labelPlacement,n,e.label])}function li(e){return S.forwardRef(e)}var na=(e,t,n=!0)=>{if(!t)return[e,{}];const r=t.reduce((i,s)=>s in e?{...i,[s]:e[s]}:i,{});return n?[Object.keys(e).filter(s=>!t.includes(s)).reduce((s,l)=>({...s,[l]:e[l]}),{}),r]:[e,r]},wF={default:"bg-default text-default-foreground",primary:"bg-primary text-primary-foreground",secondary:"bg-secondary text-secondary-foreground",success:"bg-success text-success-foreground",warning:"bg-warning text-warning-foreground",danger:"bg-danger text-danger-foreground",foreground:"bg-foreground text-background"},SF={default:"shadow-lg shadow-default/50 bg-default text-default-foreground",primary:"shadow-lg shadow-primary/40 bg-primary text-primary-foreground",secondary:"shadow-lg shadow-secondary/40 bg-secondary text-secondary-foreground",success:"shadow-lg shadow-success/40 bg-success text-success-foreground",warning:"shadow-lg shadow-warning/40 bg-warning text-warning-foreground",danger:"shadow-lg shadow-danger/40 bg-danger text-danger-foreground"},kF={default:"bg-transparent border-default text-foreground",primary:"bg-transparent border-primary text-primary",secondary:"bg-transparent border-secondary text-secondary",success:"bg-transparent border-success text-success",warning:"bg-transparent border-warning text-warning",danger:"bg-transparent border-danger text-danger"},CF={default:"bg-default/40 text-default-700",primary:"bg-primary/20 text-primary-600",secondary:"bg-secondary/20 text-secondary-600",success:"bg-success/20 text-success-700 dark:text-success",warning:"bg-warning/20 text-warning-700 dark:text-warning",danger:"bg-danger/20 text-danger-600 dark:text-danger-500"},EF={default:"border-default bg-default-100 text-default-foreground",primary:"border-default bg-default-100 text-primary",secondary:"border-default bg-default-100 text-secondary",success:"border-default bg-default-100 text-success",warning:"border-default bg-default-100 text-warning",danger:"border-default bg-default-100 text-danger"},PF={default:"bg-transparent text-default-foreground",primary:"bg-transparent text-primary",secondary:"bg-transparent text-secondary",success:"bg-transparent text-success",warning:"bg-transparent text-warning",danger:"bg-transparent text-danger"},TF={default:"border-default text-default-foreground",primary:"border-primary text-primary",secondary:"border-secondary text-secondary",success:"border-success text-success",warning:"border-warning text-warning",danger:"border-danger text-danger"},et={solid:wF,shadow:SF,bordered:kF,flat:CF,faded:EF,light:PF,ghost:TF},_F={".spinner-bar-animation":{"animation-delay":"calc(-1.2s + (0.1s * var(--bar-index)))",transform:"rotate(calc(30deg * var(--bar-index)))translate(140%)"},".spinner-dot-animation":{"animation-delay":"calc(250ms * var(--dot-index))"},".spinner-dot-blink-animation":{"animation-delay":"calc(200ms * var(--dot-index))"}},IF={".leading-inherit":{"line-height":"inherit"},".bg-img-inherit":{"background-image":"inherit"},".bg-clip-inherit":{"background-clip":"inherit"},".text-fill-inherit":{"-webkit-text-fill-color":"inherit"},".tap-highlight-transparent":{"-webkit-tap-highlight-color":"transparent"},".input-search-cancel-button-none":{"&::-webkit-search-cancel-button":{"-webkit-appearance":"none"}}},$F={".scrollbar-hide":{"-ms-overflow-style":"none","scrollbar-width":"none","&::-webkit-scrollbar":{display:"none"}},".scrollbar-default":{"-ms-overflow-style":"auto","scrollbar-width":"auto","&::-webkit-scrollbar":{display:"block"}}},AF={".text-tiny":{"font-size":"var(--heroui-font-size-tiny)","line-height":"var(--heroui-line-height-tiny)"},".text-small":{"font-size":"var(--heroui-font-size-small)","line-height":"var(--heroui-line-height-small)"},".text-medium":{"font-size":"var(--heroui-font-size-medium)","line-height":"var(--heroui-line-height-medium)"},".text-large":{"font-size":"var(--heroui-font-size-large)","line-height":"var(--heroui-line-height-large)"}},rs="250ms",RF={".transition-background":{"transition-property":"background","transition-timing-function":"ease","transition-duration":rs},".transition-colors-opacity":{"transition-property":"color, background-color, border-color, text-decoration-color, fill, stroke, opacity","transition-timing-function":"ease","transition-duration":rs},".transition-width":{"transition-property":"width","transition-timing-function":"ease","transition-duration":rs},".transition-height":{"transition-property":"height","transition-timing-function":"ease","transition-duration":rs},".transition-size":{"transition-property":"width, height","transition-timing-function":"ease","transition-duration":rs},".transition-left":{"transition-property":"left","transition-timing-function":"ease","transition-duration":rs},".transition-transform-opacity":{"transition-property":"transform, scale, opacity rotate","transition-timing-function":"ease","transition-duration":rs},".transition-transform-background":{"transition-property":"transform, scale, background","transition-timing-function":"ease","transition-duration":rs},".transition-transform-colors":{"transition-property":"transform, scale, color, background, background-color, border-color, text-decoration-color, fill, stroke","transition-timing-function":"ease","transition-duration":rs},".transition-transform-colors-opacity":{"transition-property":"transform, scale, color, background, background-color, border-color, text-decoration-color, fill, stroke, opacity","transition-timing-function":"ease","transition-duration":rs}},LF={...IF,...RF,...$F,...AF,..._F},vg=["small","medium","large"],Sb={theme:{spacing:["divider"],radius:vg},classGroups:{shadow:[{shadow:vg}],opacity:[{opacity:["disabled"]}],"font-size":[{text:["tiny",...vg]}],"border-w":[{border:vg}],"bg-image":["bg-stripe-gradient-default","bg-stripe-gradient-primary","bg-stripe-gradient-secondary","bg-stripe-gradient-success","bg-stripe-gradient-warning","bg-stripe-gradient-danger"],transition:Object.keys(LF).filter(e=>e.includes(".transition")).map(e=>e.replace(".",""))}},sk=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ni=e=>!e||typeof e!="object"||Object.keys(e).length===0,MF=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function h_(e,t){e.forEach(function(n){Array.isArray(n)?h_(n,t):t.push(n)})}function m_(e){let t=[];return h_(e,t),t}var g_=(...e)=>m_(e).filter(Boolean),v_=(e,t)=>{let n={},r=Object.keys(e),i=Object.keys(t);for(let s of r)if(i.includes(s)){let l=e[s],c=t[s];Array.isArray(l)||Array.isArray(c)?n[s]=g_(c,l):typeof l=="object"&&typeof c=="object"?n[s]=v_(l,c):n[s]=c+" "+l}else n[s]=e[s];for(let s of i)r.includes(s)||(n[s]=t[s]);return n},lk=e=>!e||typeof e!="string"?e:e.replace(/\s+/g," ").trim();const Yx="-",DF=e=>{const t=FF(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{const c=l.split(Yx);return c[0]===""&&c.length!==1&&c.shift(),y_(c,t)||NF(l)},getConflictingClassGroupIds:(l,c)=>{const d=n[l]||[];return c&&r[l]?[...d,...r[l]]:d}}},y_=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?y_(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(Yx);return t.validators.find(({validator:l})=>l(s))?.classGroupId},ak=/^\[(.+)\]$/,NF=e=>{if(ak.test(e)){const t=ak.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},FF=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const i in n)kb(n[i],r,i,t);return r},kb=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:uk(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(OF(i)){kb(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,l])=>{kb(l,uk(t,s),n,r)})})},uk=(e,t)=>{let n=e;return t.split(Yx).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},OF=e=>e.isThemeGetter,zF=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(s,l)=>{n.set(s,l),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let l=n.get(s);if(l!==void 0)return l;if((l=r.get(s))!==void 0)return i(s,l),l},set(s,l){n.has(s)?n.set(s,l):i(s,l)}}},Cb="!",Eb=":",jF=Eb.length,BF=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const s=[];let l=0,c=0,d=0,h;for(let k=0;kd?h-d:void 0;return{modifiers:s,hasImportantModifier:b,baseClassName:g,maybePostfixModifierPosition:x}};if(t){const i=t+Eb,s=r;r=l=>l.startsWith(i)?s(l.substring(i.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:l,maybePostfixModifierPosition:void 0}}if(n){const i=r;r=s=>n({className:s,parseClassName:i})}return r},VF=e=>e.endsWith(Cb)?e.substring(0,e.length-1):e.startsWith(Cb)?e.substring(1):e,UF=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const i=[];let s=[];return r.forEach(l=>{l[0]==="["||t[l]?(i.push(...s.sort(),l),s=[]):s.push(l)}),i.push(...s.sort()),i}},KF=e=>({cache:zF(e.cacheSize),parseClassName:BF(e),sortModifiers:UF(e),...DF(e)}),WF=/\s+/,HF=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:s}=t,l=[],c=e.trim().split(WF);let d="";for(let h=c.length-1;h>=0;h-=1){const m=c[h],{isExternal:g,modifiers:b,hasImportantModifier:x,baseClassName:k,maybePostfixModifierPosition:P}=n(m);if(g){d=m+(d.length>0?" "+d:d);continue}let _=!!P,T=r(_?k.substring(0,P):k);if(!T){if(!_){d=m+(d.length>0?" "+d:d);continue}if(T=r(k),!T){d=m+(d.length>0?" "+d:d);continue}_=!1}const $=s(b).join(":"),L=x?$+Cb:$,z=L+T;if(l.includes(z))continue;l.push(z);const K=i(T,_);for(let M=0;M0?" "+d:d)}return d};function GF(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rg(m),e());return n=KF(h),r=n.cache.get,i=n.cache.set,s=c,c(d)}function c(d){const h=r(d);if(h)return h;const m=HF(d,n);return i(d,m),m}return function(){return s(GF.apply(null,arguments))}}const Jn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},x_=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,w_=/^\((?:(\w[\w-]*):)?(.+)\)$/i,qF=/^\d+\/\d+$/,YF=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,XF=/\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$/,QF=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,JF=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ZF=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,of=e=>qF.test(e),yt=e=>!!e&&!Number.isNaN(Number(e)),ou=e=>!!e&&Number.isInteger(Number(e)),ck=e=>e.endsWith("%")&&yt(e.slice(0,-1)),Kl=e=>YF.test(e),eO=()=>!0,tO=e=>XF.test(e)&&!QF.test(e),Xx=()=>!1,nO=e=>JF.test(e),rO=e=>ZF.test(e),iO=e=>!ze(e)&&!je(e),oO=e=>Of(e,C_,Xx),ze=e=>x_.test(e),su=e=>Of(e,E_,tO),d0=e=>Of(e,gO,yt),sO=e=>Of(e,S_,Xx),lO=e=>Of(e,k_,rO),aO=e=>Of(e,Xx,nO),je=e=>w_.test(e),yg=e=>zf(e,E_),uO=e=>zf(e,vO),cO=e=>zf(e,S_),fO=e=>zf(e,C_),dO=e=>zf(e,k_),pO=e=>zf(e,yO,!0),Of=(e,t,n)=>{const r=x_.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},zf=(e,t,n=!1)=>{const r=w_.exec(e);return r?r[1]?t(r[1]):n:!1},S_=e=>e==="position",hO=new Set(["image","url"]),k_=e=>hO.has(e),mO=new Set(["length","size","percentage"]),C_=e=>mO.has(e),E_=e=>e==="length",gO=e=>e==="number",vO=e=>e==="family-name",yO=e=>e==="shadow",Tb=()=>{const e=Jn("color"),t=Jn("font"),n=Jn("text"),r=Jn("font-weight"),i=Jn("tracking"),s=Jn("leading"),l=Jn("breakpoint"),c=Jn("container"),d=Jn("spacing"),h=Jn("radius"),m=Jn("shadow"),g=Jn("inset-shadow"),b=Jn("drop-shadow"),x=Jn("blur"),k=Jn("perspective"),P=Jn("aspect"),_=Jn("ease"),T=Jn("animate"),$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],z=()=>["auto","hidden","clip","visible","scroll"],K=()=>["auto","contain","none"],M=()=>[je,ze,d],J=()=>[of,"full","auto",...M()],re=()=>[ou,"none","subgrid",je,ze],ae=()=>["auto",{span:["full",ou,je,ze]},je,ze],j=()=>[ou,"auto",je,ze],B=()=>["auto","min","max","fr",je,ze],Y=()=>["start","end","center","between","around","evenly","stretch","baseline"],te=()=>["start","end","center","stretch"],G=()=>["auto",...M()],ce=()=>[of,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],Z=()=>[e,je,ze],q=()=>[ck,su],V=()=>["","none","full",h,je,ze],se=()=>["",yt,yg,su],R=()=>["solid","dashed","dotted","double"],U=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ie=()=>["","none",x,je,ze],O=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",je,ze],me=()=>["none",yt,je,ze],Ce=()=>["none",yt,je,ze],ye=()=>[yt,je,ze],Fe=()=>[of,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Kl],breakpoint:[Kl],color:[eO],container:[Kl],"drop-shadow":[Kl],ease:["in","out","in-out"],font:[iO],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Kl],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Kl],shadow:[Kl],spacing:["px",yt],text:[Kl],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",of,ze,je,P]}],container:["container"],columns:[{columns:[yt,ze,je,c]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"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:[...L(),ze,je]}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:K()}],"overscroll-x":[{"overscroll-x":K()}],"overscroll-y":[{"overscroll-y":K()}],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:[ou,"auto",je,ze]}],basis:[{basis:[of,"full","auto",c,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[yt,of,"auto","initial","none",ze]}],grow:[{grow:["",yt,je,ze]}],shrink:[{shrink:["",yt,je,ze]}],order:[{order:[ou,"first","last","none",je,ze]}],"grid-cols":[{"grid-cols":re()}],"col-start-end":[{col:ae()}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":re()}],"row-start-end":[{row:ae()}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":B()}],"auto-rows":[{"auto-rows":B()}],gap:[{gap:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"justify-content":[{justify:[...Y(),"normal"]}],"justify-items":[{"justify-items":[...te(),"normal"]}],"justify-self":[{"justify-self":["auto",...te()]}],"align-content":[{content:["normal",...Y()]}],"align-items":[{items:[...te(),"baseline"]}],"align-self":[{self:["auto",...te(),"baseline"]}],"place-content":[{"place-content":Y()}],"place-items":[{"place-items":[...te(),"baseline"]}],"place-self":[{"place-self":["auto",...te()]}],p:[{p:M()}],px:[{px:M()}],py:[{py:M()}],ps:[{ps:M()}],pe:[{pe:M()}],pt:[{pt:M()}],pr:[{pr:M()}],pb:[{pb:M()}],pl:[{pl:M()}],m:[{m:G()}],mx:[{mx:G()}],my:[{my:G()}],ms:[{ms:G()}],me:[{me:G()}],mt:[{mt:G()}],mr:[{mr:G()}],mb:[{mb:G()}],ml:[{ml:G()}],"space-x":[{"space-x":M()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":M()}],"space-y-reverse":["space-y-reverse"],size:[{size:ce()}],w:[{w:[c,"screen",...ce()]}],"min-w":[{"min-w":[c,"screen","none",...ce()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[l]},...ce()]}],h:[{h:["screen",...ce()]}],"min-h":[{"min-h":["screen","none",...ce()]}],"max-h":[{"max-h":["screen",...ce()]}],"font-size":[{text:["base",n,yg,su]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,je,d0]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ck,ze]}],"font-family":[{font:[uO,ze,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:[i,je,ze]}],"line-clamp":[{"line-clamp":[yt,"none",je,d0]}],leading:[{leading:[s,...M()]}],"list-image":[{"list-image":["none",je,ze]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",je,ze]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Z()}],"text-color":[{text:Z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...R(),"wavy"]}],"text-decoration-thickness":[{decoration:[yt,"from-font","auto",je,su]}],"text-decoration-color":[{decoration:Z()}],"underline-offset":[{"underline-offset":[yt,"auto",je,ze]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",je,ze]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",je,ze]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...L(),cO,sO]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",fO,oO]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ou,je,ze],radial:["",je,ze],conic:[ou,je,ze]},dO,lO]}],"bg-color":[{bg:Z()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:Z()}],"gradient-via":[{via:Z()}],"gradient-to":[{to:Z()}],rounded:[{rounded:V()}],"rounded-s":[{"rounded-s":V()}],"rounded-e":[{"rounded-e":V()}],"rounded-t":[{"rounded-t":V()}],"rounded-r":[{"rounded-r":V()}],"rounded-b":[{"rounded-b":V()}],"rounded-l":[{"rounded-l":V()}],"rounded-ss":[{"rounded-ss":V()}],"rounded-se":[{"rounded-se":V()}],"rounded-ee":[{"rounded-ee":V()}],"rounded-es":[{"rounded-es":V()}],"rounded-tl":[{"rounded-tl":V()}],"rounded-tr":[{"rounded-tr":V()}],"rounded-br":[{"rounded-br":V()}],"rounded-bl":[{"rounded-bl":V()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...R(),"hidden","none"]}],"divide-style":[{divide:[...R(),"hidden","none"]}],"border-color":[{border:Z()}],"border-color-x":[{"border-x":Z()}],"border-color-y":[{"border-y":Z()}],"border-color-s":[{"border-s":Z()}],"border-color-e":[{"border-e":Z()}],"border-color-t":[{"border-t":Z()}],"border-color-r":[{"border-r":Z()}],"border-color-b":[{"border-b":Z()}],"border-color-l":[{"border-l":Z()}],"divide-color":[{divide:Z()}],"outline-style":[{outline:[...R(),"none","hidden"]}],"outline-offset":[{"outline-offset":[yt,je,ze]}],"outline-w":[{outline:["",yt,yg,su]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",m,pO,aO]}],"shadow-color":[{shadow:Z()}],"inset-shadow":[{"inset-shadow":["none",je,ze,g]}],"inset-shadow-color":[{"inset-shadow":Z()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Z()}],"ring-offset-w":[{"ring-offset":[yt,su]}],"ring-offset-color":[{"ring-offset":Z()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":Z()}],opacity:[{opacity:[yt,je,ze]}],"mix-blend":[{"mix-blend":[...U(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":U()}],filter:[{filter:["","none",je,ze]}],blur:[{blur:ie()}],brightness:[{brightness:[yt,je,ze]}],contrast:[{contrast:[yt,je,ze]}],"drop-shadow":[{"drop-shadow":["","none",b,je,ze]}],grayscale:[{grayscale:["",yt,je,ze]}],"hue-rotate":[{"hue-rotate":[yt,je,ze]}],invert:[{invert:["",yt,je,ze]}],saturate:[{saturate:[yt,je,ze]}],sepia:[{sepia:["",yt,je,ze]}],"backdrop-filter":[{"backdrop-filter":["","none",je,ze]}],"backdrop-blur":[{"backdrop-blur":ie()}],"backdrop-brightness":[{"backdrop-brightness":[yt,je,ze]}],"backdrop-contrast":[{"backdrop-contrast":[yt,je,ze]}],"backdrop-grayscale":[{"backdrop-grayscale":["",yt,je,ze]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[yt,je,ze]}],"backdrop-invert":[{"backdrop-invert":["",yt,je,ze]}],"backdrop-opacity":[{"backdrop-opacity":[yt,je,ze]}],"backdrop-saturate":[{"backdrop-saturate":[yt,je,ze]}],"backdrop-sepia":[{"backdrop-sepia":["",yt,je,ze]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":M()}],"border-spacing-x":[{"border-spacing-x":M()}],"border-spacing-y":[{"border-spacing-y":M()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",je,ze]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[yt,"initial",je,ze]}],ease:[{ease:["linear","initial",_,je,ze]}],delay:[{delay:[yt,je,ze]}],animate:[{animate:["none",T,je,ze]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,je,ze]}],"perspective-origin":[{"perspective-origin":O()}],rotate:[{rotate:me()}],"rotate-x":[{"rotate-x":me()}],"rotate-y":[{"rotate-y":me()}],"rotate-z":[{"rotate-z":me()}],scale:[{scale:Ce()}],"scale-x":[{"scale-x":Ce()}],"scale-y":[{"scale-y":Ce()}],"scale-z":[{"scale-z":Ce()}],"scale-3d":["scale-3d"],skew:[{skew:ye()}],"skew-x":[{"skew-x":ye()}],"skew-y":[{"skew-y":ye()}],transform:[{transform:[je,ze,"","none","gpu","cpu"]}],"transform-origin":[{origin:O()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Fe()}],"translate-x":[{"translate-x":Fe()}],"translate-y":[{"translate-y":Fe()}],"translate-z":[{"translate-z":Fe()}],"translate-none":["translate-none"],accent:[{accent:Z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Z()}],"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",je,ze]}],"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":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"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",je,ze]}],fill:[{fill:["none",...Z()]}],"stroke-w":[{stroke:[yt,yg,su,d0]}],stroke:[{stroke:["none",...Z()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],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:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}},bO=(e,{cacheSize:t,prefix:n,experimentalParseClassName:r,extend:i={},override:s={}})=>(Rp(e,"cacheSize",t),Rp(e,"prefix",n),Rp(e,"experimentalParseClassName",r),bg(e.theme,s.theme),bg(e.classGroups,s.classGroups),bg(e.conflictingClassGroups,s.conflictingClassGroups),bg(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),Rp(e,"orderSensitiveModifiers",s.orderSensitiveModifiers),xg(e.theme,i.theme),xg(e.classGroups,i.classGroups),xg(e.conflictingClassGroups,i.conflictingClassGroups),xg(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),P_(e,i,"orderSensitiveModifiers"),e),Rp=(e,t,n)=>{n!==void 0&&(e[t]=n)},bg=(e,t)=>{if(t)for(const n in t)Rp(e,n,t[n])},xg=(e,t)=>{if(t)for(const n in t)P_(e,t,n)},P_=(e,t,n)=>{const r=t[n];r!==void 0&&(e[n]=e[n]?e[n].concat(r):r)},T_=(e,...t)=>typeof e=="function"?Pb(Tb,e,...t):Pb(()=>bO(Tb(),e),...t),xO=Pb(Tb);var wO={twMerge:!0,twMergeConfig:{},responsiveVariants:!1},__=e=>e||void 0,sh=(...e)=>__(m_(e).filter(Boolean).join(" ")),p0=null,qs={},_b=!1,yp=(...e)=>t=>t.twMerge?((!p0||_b)&&(_b=!1,p0=ni(qs)?xO:T_({...qs,extend:{theme:qs.theme,classGroups:qs.classGroups,conflictingClassGroupModifiers:qs.conflictingClassGroupModifiers,conflictingClassGroups:qs.conflictingClassGroups,...qs.extend}})),__(p0(sh(e)))):sh(e),fk=(e,t)=>{for(let n in t)e.hasOwnProperty(n)?e[n]=sh(e[n],t[n]):e[n]=t[n];return e},SO=(e,t)=>{let{extend:n=null,slots:r={},variants:i={},compoundVariants:s=[],compoundSlots:l=[],defaultVariants:c={}}=e,d={...wO,...t},h=n!=null&&n.base?sh(n.base,e?.base):e?.base,m=n!=null&&n.variants&&!ni(n.variants)?v_(i,n.variants):i,g=n!=null&&n.defaultVariants&&!ni(n.defaultVariants)?{...n.defaultVariants,...c}:c;!ni(d.twMergeConfig)&&!MF(d.twMergeConfig,qs)&&(_b=!0,qs=d.twMergeConfig);let b=ni(n?.slots),x=ni(r)?{}:{base:sh(e?.base,b&&n?.base),...r},k=b?x:fk({...n?.slots},ni(x)?{base:e?.base}:x),P=ni(n?.compoundVariants)?s:g_(n?.compoundVariants,s),_=$=>{if(ni(m)&&ni(r)&&b)return yp(h,$?.class,$?.className)(d);if(P&&!Array.isArray(P))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof P}`);if(l&&!Array.isArray(l))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof l}`);let L=(Y,te,G=[],ce)=>{let Z=G;if(typeof te=="string")Z=Z.concat(lk(te).split(" ").map(q=>`${Y}:${q}`));else if(Array.isArray(te))Z=Z.concat(te.reduce((q,V)=>q.concat(`${Y}:${V}`),[]));else if(typeof te=="object"&&typeof ce=="string"){for(let q in te)if(te.hasOwnProperty(q)&&q===ce){let V=te[q];if(V&&typeof V=="string"){let se=lk(V);Z[ce]?Z[ce]=Z[ce].concat(se.split(" ").map(R=>`${Y}:${R}`)):Z[ce]=se.split(" ").map(R=>`${Y}:${R}`)}else Array.isArray(V)&&V.length>0&&(Z[ce]=V.reduce((se,R)=>se.concat(`${Y}:${R}`),[]))}}return Z},z=(Y,te=m,G=null,ce=null)=>{var Z;let q=te[Y];if(!q||ni(q))return null;let V=(Z=ce?.[Y])!=null?Z:$?.[Y];if(V===null)return null;let se=sk(V),R=Array.isArray(d.responsiveVariants)&&d.responsiveVariants.length>0||d.responsiveVariants===!0,U=g?.[Y],ie=[];if(typeof se=="object"&&R)for(let[Ce,ye]of Object.entries(se)){let Fe=q[ye];if(Ce==="initial"){U=ye;continue}Array.isArray(d.responsiveVariants)&&!d.responsiveVariants.includes(Ce)||(ie=L(Ce,Fe,ie,G))}let O=se!=null&&typeof se!="object"?se:sk(U),me=q[O||"false"];return typeof ie=="object"&&typeof G=="string"&&ie[G]?fk(ie,me):ie.length>0?(ie.push(me),G==="base"?ie.join(" "):ie):me},K=()=>m?Object.keys(m).map(Y=>z(Y,m)):null,M=(Y,te)=>{if(!m||typeof m!="object")return null;let G=new Array;for(let ce in m){let Z=z(ce,m,Y,te),q=Y==="base"&&typeof Z=="string"?Z:Z&&Z[Y];q&&(G[G.length]=q)}return G},J={};for(let Y in $)$[Y]!==void 0&&(J[Y]=$[Y]);let re=(Y,te)=>{var G;let ce=typeof $?.[Y]=="object"?{[Y]:(G=$[Y])==null?void 0:G.initial}:{};return{...g,...J,...ce,...te}},ae=(Y=[],te)=>{let G=[];for(let{class:ce,className:Z,...q}of Y){let V=!0;for(let[se,R]of Object.entries(q)){let U=re(se,te)[se];if(Array.isArray(R)){if(!R.includes(U)){V=!1;break}}else{let ie=O=>O==null||O===!1;if(ie(R)&&ie(U))continue;if(U!==R){V=!1;break}}}V&&(ce&&G.push(ce),Z&&G.push(Z))}return G},j=Y=>{let te=ae(P,Y);if(!Array.isArray(te))return te;let G={};for(let ce of te)if(typeof ce=="string"&&(G.base=yp(G.base,ce)(d)),typeof ce=="object")for(let[Z,q]of Object.entries(ce))G[Z]=yp(G[Z],q)(d);return G},B=Y=>{if(l.length<1)return null;let te={};for(let{slots:G=[],class:ce,className:Z,...q}of l){if(!ni(q)){let V=!0;for(let se of Object.keys(q)){let R=re(se,Y)[se];if(R===void 0||(Array.isArray(q[se])?!q[se].includes(R):q[se]!==R)){V=!1;break}}if(!V)continue}for(let V of G)te[V]=te[V]||[],te[V].push([ce,Z])}return te};if(!ni(r)||!b){let Y={};if(typeof k=="object"&&!ni(k))for(let te of Object.keys(k))Y[te]=G=>{var ce,Z;return yp(k[te],M(te,G),((ce=j(G))!=null?ce:[])[te],((Z=B(G))!=null?Z:[])[te],G?.class,G?.className)(d)};return Y}return yp(h,K(),ae(P),$?.class,$?.className)(d)},T=()=>{if(!(!m||typeof m!="object"))return Object.keys(m)};return _.variantKeys=T(),_.extend=n,_.base=h,_.slots=k,_.variants=m,_.defaultVariants=g,_.compoundSlots=l,_.compoundVariants=P,_},fr=(e,t)=>{var n,r,i;return SO(e,{...t,twMerge:(n=t?.twMerge)!=null?n:!0,twMergeConfig:{...t?.twMergeConfig,theme:{...(r=t?.twMergeConfig)==null?void 0:r.theme,...Sb.theme},classGroups:{...(i=t?.twMergeConfig)==null?void 0:i.classGroups,...Sb.classGroups}}})},dk=fr({slots:{base:"relative inline-flex flex-col gap-2 items-center justify-center",wrapper:"relative flex",label:"text-foreground dark:text-foreground-dark font-regular",circle1:"absolute w-full h-full rounded-full",circle2:"absolute w-full h-full rounded-full",dots:"relative rounded-full mx-auto",spinnerBars:["absolute","animate-fade-out","rounded-full","w-[25%]","h-[8%]","left-[calc(37.5%)]","top-[calc(46%)]","spinner-bar-animation"]},variants:{size:{sm:{wrapper:"w-5 h-5",circle1:"border-2",circle2:"border-2",dots:"size-1",label:"text-small"},md:{wrapper:"w-8 h-8",circle1:"border-3",circle2:"border-3",dots:"size-1.5",label:"text-medium"},lg:{wrapper:"w-10 h-10",circle1:"border-3",circle2:"border-3",dots:"size-2",label:"text-large"}},color:{current:{circle1:"border-b-current",circle2:"border-b-current",dots:"bg-current",spinnerBars:"bg-current"},white:{circle1:"border-b-white",circle2:"border-b-white",dots:"bg-white",spinnerBars:"bg-white"},default:{circle1:"border-b-default",circle2:"border-b-default",dots:"bg-default",spinnerBars:"bg-default"},primary:{circle1:"border-b-primary",circle2:"border-b-primary",dots:"bg-primary",spinnerBars:"bg-primary"},secondary:{circle1:"border-b-secondary",circle2:"border-b-secondary",dots:"bg-secondary",spinnerBars:"bg-secondary"},success:{circle1:"border-b-success",circle2:"border-b-success",dots:"bg-success",spinnerBars:"bg-success"},warning:{circle1:"border-b-warning",circle2:"border-b-warning",dots:"bg-warning",spinnerBars:"bg-warning"},danger:{circle1:"border-b-danger",circle2:"border-b-danger",dots:"bg-danger",spinnerBars:"bg-danger"}},labelColor:{foreground:{label:"text-foreground"},primary:{label:"text-primary"},secondary:{label:"text-secondary"},success:{label:"text-success"},warning:{label:"text-warning"},danger:{label:"text-danger"}},variant:{default:{circle1:["animate-spinner-ease-spin","border-solid","border-t-transparent","border-l-transparent","border-r-transparent"],circle2:["opacity-75","animate-spinner-linear-spin","border-dotted","border-t-transparent","border-l-transparent","border-r-transparent"]},gradient:{circle1:["border-0","bg-gradient-to-b","from-transparent","via-transparent","to-primary","animate-spinner-linear-spin","[animation-duration:1s]","[-webkit-mask:radial-gradient(closest-side,rgba(0,0,0,0.0)calc(100%-3px),rgba(0,0,0,1)calc(100%-3px))]"],circle2:["hidden"]},wave:{wrapper:"translate-y-3/4",dots:["animate-sway","spinner-dot-animation"]},dots:{wrapper:"translate-y-2/4",dots:["animate-blink","spinner-dot-blink-animation"]},spinner:{},simple:{wrapper:"text-foreground h-5 w-5 animate-spin",circle1:"opacity-25",circle2:"opacity-75"}}},defaultVariants:{size:"md",color:"primary",labelColor:"foreground",variant:"default"},compoundVariants:[{variant:"gradient",color:"current",class:{circle1:"to-current"}},{variant:"gradient",color:"white",class:{circle1:"to-white"}},{variant:"gradient",color:"default",class:{circle1:"to-default"}},{variant:"gradient",color:"primary",class:{circle1:"to-primary"}},{variant:"gradient",color:"secondary",class:{circle1:"to-secondary"}},{variant:"gradient",color:"success",class:{circle1:"to-success"}},{variant:"gradient",color:"warning",class:{circle1:"to-warning"}},{variant:"gradient",color:"danger",class:{circle1:"to-danger"}},{variant:"wave",size:"sm",class:{wrapper:"w-5 h-5"}},{variant:"wave",size:"md",class:{wrapper:"w-8 h-8"}},{variant:"wave",size:"lg",class:{wrapper:"w-12 h-12"}},{variant:"dots",size:"sm",class:{wrapper:"w-5 h-5"}},{variant:"dots",size:"md",class:{wrapper:"w-8 h-8"}},{variant:"dots",size:"lg",class:{wrapper:"w-12 h-12"}},{variant:"simple",size:"sm",class:{wrapper:"w-5 h-5"}},{variant:"simple",size:"md",class:{wrapper:"w-8 h-8"}},{variant:"simple",size:"lg",class:{wrapper:"w-12 h-12"}},{variant:"simple",color:"current",class:{wrapper:"text-current"}},{variant:"simple",color:"white",class:{wrapper:"text-white"}},{variant:"simple",color:"default",class:{wrapper:"text-default"}},{variant:"simple",color:"primary",class:{wrapper:"text-primary"}},{variant:"simple",color:"secondary",class:{wrapper:"text-secondary"}},{variant:"simple",color:"success",class:{wrapper:"text-success"}},{variant:"simple",color:"warning",class:{wrapper:"text-warning"}},{variant:"simple",color:"danger",class:{wrapper:"text-danger"}}]}),wh=["outline-hidden","data-[focus-visible=true]:z-10","data-[focus-visible=true]:outline-2","data-[focus-visible=true]:outline-focus","data-[focus-visible=true]:outline-offset-2"],I_=["outline-hidden","group-data-[focus-visible=true]:z-10","group-data-[focus-visible=true]:ring-2","group-data-[focus-visible=true]:ring-focus","group-data-[focus-visible=true]:ring-offset-2","group-data-[focus-visible=true]:ring-offset-background"],sf={default:["[&+.border-medium.border-default]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],primary:["[&+.border-medium.border-primary]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],secondary:["[&+.border-medium.border-secondary]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],success:["[&+.border-medium.border-success]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],warning:["[&+.border-medium.border-warning]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],danger:["[&+.border-medium.border-danger]:ms-[calc(var(--heroui-border-width-medium)*-1)]"]},kO=["font-inherit","text-[100%]","leading-[1.15]","m-0","p-0","overflow-visible","box-border","absolute","top-0","w-full","h-full","opacity-[0.0001]","z-[1]","cursor-pointer","disabled:cursor-default"],pk=fr({slots:{base:["z-0","relative","bg-transparent","before:content-['']","before:hidden","before:z-[-1]","before:absolute","before:rotate-45","before:w-2.5","before:h-2.5","before:rounded-sm","data-[arrow=true]:before:block","data-[placement=top]:before:-bottom-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=top]:before:left-1/2","data-[placement=top]:before:-translate-x-1/2","data-[placement=top-start]:before:-bottom-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=top-start]:before:left-3","data-[placement=top-end]:before:-bottom-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=top-end]:before:right-3","data-[placement=bottom]:before:-top-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=bottom]:before:left-1/2","data-[placement=bottom]:before:-translate-x-1/2","data-[placement=bottom-start]:before:-top-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=bottom-start]:before:left-3","data-[placement=bottom-end]:before:-top-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=bottom-end]:before:right-3","data-[placement=left]:before:-right-[calc(theme(spacing.5)/4_-_2px)]","data-[placement=left]:before:top-1/2","data-[placement=left]:before:-translate-y-1/2","data-[placement=left-start]:before:-right-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=left-start]:before:top-1/4","data-[placement=left-end]:before:-right-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=left-end]:before:bottom-1/4","data-[placement=right]:before:-left-[calc(theme(spacing.5)/4_-_2px)]","data-[placement=right]:before:top-1/2","data-[placement=right]:before:-translate-y-1/2","data-[placement=right-start]:before:-left-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=right-start]:before:top-1/4","data-[placement=right-end]:before:-left-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=right-end]:before:bottom-1/4",...wh],content:["z-10","px-2.5","py-1","w-full","inline-flex","flex-col","items-center","justify-center","box-border","subpixel-antialiased","outline-hidden","box-border"],trigger:["z-10"],backdrop:["hidden"],arrow:[]},variants:{size:{sm:{content:"text-tiny"},md:{content:"text-small"},lg:{content:"text-medium"}},color:{default:{base:"before:bg-content1 before:shadow-small",content:"bg-content1"},foreground:{base:"before:bg-foreground",content:et.solid.foreground},primary:{base:"before:bg-primary",content:et.solid.primary},secondary:{base:"before:bg-secondary",content:et.solid.secondary},success:{base:"before:bg-success",content:et.solid.success},warning:{base:"before:bg-warning",content:et.solid.warning},danger:{base:"before:bg-danger",content:et.solid.danger}},radius:{none:{content:"rounded-none"},sm:{content:"rounded-small"},md:{content:"rounded-medium"},lg:{content:"rounded-large"},full:{content:"rounded-full"}},shadow:{none:{content:"shadow-none"},sm:{content:"shadow-small"},md:{content:"shadow-medium"},lg:{content:"shadow-large"}},backdrop:{transparent:{},opaque:{backdrop:"bg-overlay/50 backdrop-opacity-disabled"},blur:{backdrop:"backdrop-blur-sm backdrop-saturate-150 bg-overlay/30"}},triggerScaleOnOpen:{true:{trigger:["aria-expanded:scale-[0.97]","aria-expanded:opacity-70","subpixel-antialiased"]},false:{}},disableAnimation:{true:{base:"animate-none"}},isTriggerDisabled:{true:{trigger:"opacity-disabled pointer-events-none"},false:{}}},defaultVariants:{color:"default",radius:"lg",size:"md",shadow:"md",backdrop:"transparent",triggerScaleOnOpen:!0},compoundVariants:[{backdrop:["opaque","blur"],class:{backdrop:"block w-full h-full fixed inset-0 -z-30"}}]});fr({slots:{base:"flex flex-col gap-2 w-full",label:"",labelWrapper:"flex justify-between",value:"",track:"z-0 relative bg-default-300/50 overflow-hidden rtl:rotate-180",indicator:"h-full"},variants:{color:{default:{indicator:"bg-default-400"},primary:{indicator:"bg-primary"},secondary:{indicator:"bg-secondary"},success:{indicator:"bg-success"},warning:{indicator:"bg-warning"},danger:{indicator:"bg-danger"}},size:{sm:{label:"text-small",value:"text-small",track:"h-1"},md:{label:"text-medium",value:"text-medium",track:"h-3"},lg:{label:"text-large",value:"text-large",track:"h-5"}},radius:{none:{track:"rounded-none",indicator:"rounded-none"},sm:{track:"rounded-small",indicator:"rounded-small"},md:{track:"rounded-medium",indicator:"rounded-medium"},lg:{track:"rounded-large",indicator:"rounded-large"},full:{track:"rounded-full",indicator:"rounded-full"}},isStriped:{true:{indicator:"bg-stripe-gradient-default bg-stripe-size"}},isIndeterminate:{true:{indicator:["absolute","w-full","origin-left","animate-indeterminate-bar"]}},isDisabled:{true:{base:"opacity-disabled cursor-not-allowed"}},disableAnimation:{true:{},false:{indicator:"transition-transform !duration-500"}}},defaultVariants:{color:"primary",size:"md",radius:"full",isStriped:!1,isIndeterminate:!1,isDisabled:!1},compoundVariants:[{disableAnimation:!0,isIndeterminate:!1,class:{indicator:"!transition-none motion-reduce:transition-none"}},{color:"primary",isStriped:!0,class:{indicator:"bg-stripe-gradient-primary bg-stripe-size"}},{color:"secondary",isStriped:!0,class:{indicator:"bg-stripe-gradient-secondary bg-stripe-size"}},{color:"success",isStriped:!0,class:{indicator:"bg-stripe-gradient-success bg-stripe-size"}},{color:"warning",isStriped:!0,class:{indicator:"bg-stripe-gradient-warning bg-stripe-size"}},{color:"danger",isStriped:!0,class:{indicator:"bg-stripe-gradient-danger bg-stripe-size"}}]},{twMerge:!0});var hk=fr({slots:{base:"flex flex-col justify-center gap-1 max-w-fit items-center",label:"",svgWrapper:"relative block",svg:"z-0 relative overflow-hidden",track:"h-full stroke-default-300/50",indicator:"h-full stroke-current",value:"absolute font-normal inset-0 flex items-center justify-center"},variants:{color:{default:{svg:"text-default-400"},primary:{svg:"text-primary"},secondary:{svg:"text-secondary"},success:{svg:"text-success"},warning:{svg:"text-warning"},danger:{svg:"text-danger"}},size:{sm:{svg:"w-8 h-8",label:"text-small",value:"text-[0.5rem]"},md:{svg:"w-10 h-10",label:"text-small",value:"text-[0.55rem]"},lg:{svg:"w-12 h-12",label:"text-medium",value:"text-[0.6rem]"}},isIndeterminate:{true:{svg:"animate-spinner-ease-spin"}},isDisabled:{true:{base:"opacity-disabled cursor-not-allowed"}},disableAnimation:{true:{},false:{indicator:"transition-all !duration-500"}}},defaultVariants:{color:"primary",size:"md",isDisabled:!1},compoundVariants:[{disableAnimation:!0,isIndeterminate:!1,class:{svg:"!transition-none motion-reduce:transition-none"}}]}),CO=["data-[top-scroll=true]:[mask-image:linear-gradient(0deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]","data-[bottom-scroll=true]:[mask-image:linear-gradient(180deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]","data-[top-bottom-scroll=true]:[mask-image:linear-gradient(#000,#000,transparent_0,#000_var(--scroll-shadow-size),#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]"],EO=["data-[left-scroll=true]:[mask-image:linear-gradient(270deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]","data-[right-scroll=true]:[mask-image:linear-gradient(90deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]","data-[left-right-scroll=true]:[mask-image:linear-gradient(to_right,#000,#000,transparent_0,#000_var(--scroll-shadow-size),#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]"],mk=fr({base:[],variants:{orientation:{vertical:["overflow-y-auto",...CO],horizontal:["overflow-x-auto",...EO]},hideScrollBar:{true:"scrollbar-hide",false:""}},defaultVariants:{orientation:"vertical",hideScrollBar:!1}}),gk=fr({slots:{base:["group","relative","overflow-hidden","bg-content3 dark:bg-content2","pointer-events-none","before:opacity-100","before:absolute","before:inset-0","before:-translate-x-full","before:animate-shimmer","before:border-t","before:border-content4/30","before:bg-gradient-to-r","before:from-transparent","before:via-content4","dark:before:via-default-700/10","before:to-transparent","after:opacity-100","after:absolute","after:inset-0","after:-z-10","after:bg-content3","dark:after:bg-content2","data-[loaded=true]:pointer-events-auto","data-[loaded=true]:overflow-visible","data-[loaded=true]:!bg-transparent","data-[loaded=true]:before:opacity-0 data-[loaded=true]:before:-z-10 data-[loaded=true]:before:animate-none","data-[loaded=true]:after:opacity-0"],content:["opacity-0","group-data-[loaded=true]:opacity-100"]},variants:{disableAnimation:{true:{base:"before:animate-none before:transition-none after:transition-none",content:"transition-none"},false:{base:"transition-background !duration-300",content:"transition-opacity motion-reduce:transition-none !duration-300"}}},defaultVariants:{}}),vk=fr({slots:{base:"group flex flex-col data-[hidden=true]:hidden",label:["absolute","z-10","pointer-events-none","origin-top-left","shrink-0","rtl:origin-top-right","subpixel-antialiased","block","text-small","text-foreground-500"],mainWrapper:"h-full",inputWrapper:"relative w-full inline-flex tap-highlight-transparent flex-row items-center shadow-xs px-3 gap-3",innerWrapper:"inline-flex w-full items-center h-full box-border",input:["w-full font-normal bg-transparent !outline-hidden placeholder:text-foreground-500 focus-visible:outline-hidden","data-[has-start-content=true]:ps-1.5","data-[has-end-content=true]:pe-1.5","data-[type=color]:rounded-none","file:cursor-pointer file:bg-transparent file:border-0","autofill:bg-transparent bg-clip-text"],clearButton:["p-2","-m-2","z-10","absolute","end-3","start-auto","pointer-events-none","appearance-none","outline-hidden","select-none","opacity-0","cursor-pointer","active:!opacity-70","rounded-full",...wh],helperWrapper:"hidden group-data-[has-helper=true]:flex p-1 relative flex-col gap-1.5",description:"text-tiny text-foreground-400",errorMessage:"text-tiny text-danger"},variants:{variant:{flat:{inputWrapper:["bg-default-100","data-[hover=true]:bg-default-200","group-data-[focus=true]:bg-default-100"]},faded:{inputWrapper:["bg-default-100","border-medium","border-default-200","data-[hover=true]:border-default-400 focus-within:border-default-400"],value:"group-data-[has-value=true]:text-default-foreground"},bordered:{inputWrapper:["border-medium","border-default-200","data-[hover=true]:border-default-400","group-data-[focus=true]:border-default-foreground"]},underlined:{inputWrapper:["!px-1","!pb-0","!gap-0","relative","box-border","border-b-medium","shadow-[0_1px_0px_0_rgba(0,0,0,0.05)]","border-default-200","!rounded-none","hover:border-default-300","after:content-['']","after:w-0","after:origin-center","after:bg-default-foreground","after:absolute","after:left-1/2","after:-translate-x-1/2","after:-bottom-[2px]","after:h-[2px]","group-data-[focus=true]:after:w-full"],innerWrapper:"pb-1",label:"group-data-[filled-within=true]:text-foreground"}},color:{default:{},primary:{},secondary:{},success:{},warning:{},danger:{}},size:{sm:{label:"text-tiny",inputWrapper:"h-8 min-h-8 px-2 rounded-small",input:"text-small",clearButton:"text-medium"},md:{inputWrapper:"h-10 min-h-10 rounded-medium",input:"text-small",clearButton:"text-large hover:!opacity-100"},lg:{label:"text-medium",inputWrapper:"h-12 min-h-12 rounded-large",input:"text-medium",clearButton:"text-large hover:!opacity-100"}},radius:{none:{inputWrapper:"rounded-none"},sm:{inputWrapper:"rounded-small"},md:{inputWrapper:"rounded-medium"},lg:{inputWrapper:"rounded-large"},full:{inputWrapper:"rounded-full"}},labelPlacement:{outside:{mainWrapper:"flex flex-col"},"outside-left":{base:"flex-row items-center flex-nowrap data-[has-helper=true]:items-start",inputWrapper:"flex-1",mainWrapper:"flex flex-col",label:"relative text-foreground pe-2 ps-2 pointer-events-auto"},"outside-top":{mainWrapper:"flex flex-col",label:"relative text-foreground pb-2 pointer-events-auto"},inside:{label:"cursor-text",inputWrapper:"flex-col items-start justify-center gap-0",innerWrapper:"group-data-[has-label=true]:items-end"}},fullWidth:{true:{base:"w-full"},false:{}},isClearable:{true:{input:"peer pe-6 input-search-cancel-button-none",clearButton:["peer-data-[filled=true]:pointer-events-auto","peer-data-[filled=true]:opacity-70 peer-data-[filled=true]:block","peer-data-[filled=true]:scale-100"]}},isDisabled:{true:{base:"opacity-disabled pointer-events-none",inputWrapper:"pointer-events-none",label:"pointer-events-none"}},isInvalid:{true:{label:"!text-danger",input:"!placeholder:text-danger !text-danger"}},isRequired:{true:{label:"after:content-['*'] after:text-danger after:ms-0.5"}},isMultiline:{true:{label:"relative",inputWrapper:"!h-auto",innerWrapper:"items-start group-data-[has-label=true]:items-start",input:"resize-none data-[hide-scroll=true]:scrollbar-hide",clearButton:"absolute top-2 right-2 rtl:right-auto rtl:left-2 z-10"}},disableAnimation:{true:{input:"transition-none",inputWrapper:"transition-none",label:"transition-none"},false:{inputWrapper:"transition-background motion-reduce:transition-none !duration-150",label:["will-change-auto","!duration-200","!ease-out","motion-reduce:transition-none","transition-[transform,color,left,opacity,translate,scale]"],clearButton:["scale-90","ease-out","duration-150","transition-[opacity,transform]","motion-reduce:transition-none","motion-reduce:scale-100"]}}},defaultVariants:{variant:"flat",color:"default",size:"md",fullWidth:!0,isDisabled:!1,isMultiline:!1},compoundVariants:[{variant:"flat",color:"default",class:{input:"group-data-[has-value=true]:text-default-foreground"}},{variant:"flat",color:"primary",class:{inputWrapper:["bg-primary-100","data-[hover=true]:bg-primary-50","text-primary","group-data-[focus=true]:bg-primary-50","placeholder:text-primary"],input:"placeholder:text-primary",label:"text-primary"}},{variant:"flat",color:"secondary",class:{inputWrapper:["bg-secondary-100","text-secondary","data-[hover=true]:bg-secondary-50","group-data-[focus=true]:bg-secondary-50","placeholder:text-secondary"],input:"placeholder:text-secondary",label:"text-secondary"}},{variant:"flat",color:"success",class:{inputWrapper:["bg-success-100","text-success-600","dark:text-success","placeholder:text-success-600","dark:placeholder:text-success","data-[hover=true]:bg-success-50","group-data-[focus=true]:bg-success-50"],input:"placeholder:text-success-600 dark:placeholder:text-success",label:"text-success-600 dark:text-success"}},{variant:"flat",color:"warning",class:{inputWrapper:["bg-warning-100","text-warning-600","dark:text-warning","placeholder:text-warning-600","dark:placeholder:text-warning","data-[hover=true]:bg-warning-50","group-data-[focus=true]:bg-warning-50"],input:"placeholder:text-warning-600 dark:placeholder:text-warning",label:"text-warning-600 dark:text-warning"}},{variant:"flat",color:"danger",class:{inputWrapper:["bg-danger-100","text-danger","dark:text-danger-500","placeholder:text-danger","dark:placeholder:text-danger-500","data-[hover=true]:bg-danger-50","group-data-[focus=true]:bg-danger-50"],input:"placeholder:text-danger dark:placeholder:text-danger-500",label:"text-danger dark:text-danger-500"}},{variant:"faded",color:"primary",class:{label:"text-primary",inputWrapper:"data-[hover=true]:border-primary focus-within:border-primary"}},{variant:"faded",color:"secondary",class:{label:"text-secondary",inputWrapper:"data-[hover=true]:border-secondary focus-within:border-secondary"}},{variant:"faded",color:"success",class:{label:"text-success",inputWrapper:"data-[hover=true]:border-success focus-within:border-success"}},{variant:"faded",color:"warning",class:{label:"text-warning",inputWrapper:"data-[hover=true]:border-warning focus-within:border-warning"}},{variant:"faded",color:"danger",class:{label:"text-danger",inputWrapper:"data-[hover=true]:border-danger focus-within:border-danger"}},{variant:"underlined",color:"default",class:{input:"group-data-[has-value=true]:text-foreground"}},{variant:"underlined",color:"primary",class:{inputWrapper:"after:bg-primary",label:"text-primary"}},{variant:"underlined",color:"secondary",class:{inputWrapper:"after:bg-secondary",label:"text-secondary"}},{variant:"underlined",color:"success",class:{inputWrapper:"after:bg-success",label:"text-success"}},{variant:"underlined",color:"warning",class:{inputWrapper:"after:bg-warning",label:"text-warning"}},{variant:"underlined",color:"danger",class:{inputWrapper:"after:bg-danger",label:"text-danger"}},{variant:"bordered",color:"primary",class:{inputWrapper:"group-data-[focus=true]:border-primary",label:"text-primary"}},{variant:"bordered",color:"secondary",class:{inputWrapper:"group-data-[focus=true]:border-secondary",label:"text-secondary"}},{variant:"bordered",color:"success",class:{inputWrapper:"group-data-[focus=true]:border-success",label:"text-success"}},{variant:"bordered",color:"warning",class:{inputWrapper:"group-data-[focus=true]:border-warning",label:"text-warning"}},{variant:"bordered",color:"danger",class:{inputWrapper:"group-data-[focus=true]:border-danger",label:"text-danger"}},{labelPlacement:"inside",color:"default",class:{label:"group-data-[filled-within=true]:text-default-600"}},{labelPlacement:"outside",color:"default",class:{label:"group-data-[filled-within=true]:text-foreground"}},{radius:"full",size:["sm"],class:{inputWrapper:"px-3"}},{radius:"full",size:"md",class:{inputWrapper:"px-4"}},{radius:"full",size:"lg",class:{inputWrapper:"px-5"}},{disableAnimation:!1,variant:["faded","bordered"],class:{inputWrapper:"transition-colors motion-reduce:transition-none"}},{disableAnimation:!1,variant:"underlined",class:{inputWrapper:"after:transition-width motion-reduce:after:transition-none"}},{variant:["flat","faded"],class:{inputWrapper:[...I_]}},{isInvalid:!0,variant:"flat",class:{inputWrapper:["!bg-danger-50","data-[hover=true]:!bg-danger-100","group-data-[focus=true]:!bg-danger-50"]}},{isInvalid:!0,variant:"bordered",class:{inputWrapper:"!border-danger group-data-[focus=true]:!border-danger"}},{isInvalid:!0,variant:"underlined",class:{inputWrapper:"after:!bg-danger"}},{labelPlacement:"inside",size:"sm",class:{inputWrapper:"h-12 py-1.5 px-3"}},{labelPlacement:"inside",size:"md",class:{inputWrapper:"h-14 py-2"}},{labelPlacement:"inside",size:"lg",class:{inputWrapper:"h-16 py-2.5 gap-0"}},{labelPlacement:"inside",size:"sm",variant:["bordered","faded"],class:{inputWrapper:"py-1"}},{labelPlacement:["inside","outside"],class:{label:["group-data-[filled-within=true]:pointer-events-auto"]}},{labelPlacement:"outside",isMultiline:!1,class:{base:"relative justify-end",label:["pb-0","z-20","top-1/2","-translate-y-1/2","group-data-[filled-within=true]:start-0"]}},{labelPlacement:["inside"],class:{label:["group-data-[filled-within=true]:scale-85"]}},{labelPlacement:["inside"],variant:"flat",class:{innerWrapper:"pb-0.5"}},{variant:"underlined",size:"sm",class:{innerWrapper:"pb-1"}},{variant:"underlined",size:["md","lg"],class:{innerWrapper:"pb-1.5"}},{labelPlacement:"inside",size:["sm","md"],class:{label:"text-small"}},{labelPlacement:"inside",isMultiline:!1,size:"sm",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-tiny)/2_-_8px)]"]}},{labelPlacement:"inside",isMultiline:!1,size:"md",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_6px)]"]}},{labelPlacement:"inside",isMultiline:!1,size:"lg",class:{label:["text-medium","group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_8px)]"]}},{labelPlacement:"inside",variant:["faded","bordered"],isMultiline:!1,size:"sm",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-tiny)/2_-_8px_-_var(--heroui-border-width-medium))]"]}},{labelPlacement:"inside",variant:["faded","bordered"],isMultiline:!1,size:"md",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_6px_-_var(--heroui-border-width-medium))]"]}},{labelPlacement:"inside",variant:["faded","bordered"],isMultiline:!1,size:"lg",class:{label:["text-medium","group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_8px_-_var(--heroui-border-width-medium))]"]}},{labelPlacement:"inside",variant:"underlined",isMultiline:!1,size:"sm",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-tiny)/2_-_5px)]"]}},{labelPlacement:"inside",variant:"underlined",isMultiline:!1,size:"md",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_3.5px)]"]}},{labelPlacement:"inside",variant:"underlined",size:"lg",isMultiline:!1,class:{label:["text-medium","group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_4px)]"]}},{labelPlacement:"outside",size:"sm",isMultiline:!1,class:{label:["start-2","text-tiny","group-data-[filled-within=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-tiny)/2_+_16px)]"],base:"data-[has-label=true]:mt-[calc(var(--heroui-font-size-small)_+_8px)]"}},{labelPlacement:"outside",size:"md",isMultiline:!1,class:{label:["start-3","end-auto","text-small","group-data-[filled-within=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-small)/2_+_20px)]"],base:"data-[has-label=true]:mt-[calc(var(--heroui-font-size-small)_+_10px)]"}},{labelPlacement:"outside",size:"lg",isMultiline:!1,class:{label:["start-3","end-auto","text-medium","group-data-[filled-within=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-small)/2_+_24px)]"],base:"data-[has-label=true]:mt-[calc(var(--heroui-font-size-small)_+_12px)]"}},{labelPlacement:"outside-left",size:"sm",class:{label:"group-data-[has-helper=true]:pt-2"}},{labelPlacement:"outside-left",size:"md",class:{label:"group-data-[has-helper=true]:pt-3"}},{labelPlacement:"outside-left",size:"lg",class:{label:"group-data-[has-helper=true]:pt-4"}},{labelPlacement:["outside","outside-left"],isMultiline:!0,class:{inputWrapper:"py-2"}},{labelPlacement:"outside",isMultiline:!0,class:{label:"pb-1.5"}},{labelPlacement:"inside",isMultiline:!0,class:{label:"pb-0.5",input:"pt-0"}},{isMultiline:!0,disableAnimation:!1,class:{input:"transition-height !duration-100 motion-reduce:transition-none"}},{labelPlacement:["inside","outside"],class:{label:["pe-2","max-w-full","text-ellipsis","overflow-hidden"]}},{isMultiline:!0,radius:"full",class:{inputWrapper:"data-[has-multiple-rows=true]:rounded-large"}},{isClearable:!0,isMultiline:!0,class:{clearButton:["group-data-[has-value=true]:opacity-70 group-data-[has-value=true]:block","group-data-[has-value=true]:scale-100","group-data-[has-value=true]:pointer-events-auto"]}}]}),yk=fr({slots:{wrapper:["flex","w-screen","h-[100dvh]","fixed","inset-0","z-50","overflow-x-auto","justify-center","h-[--visual-viewport-height]"],base:["flex","flex-col","relative","bg-white","z-50","w-full","box-border","bg-content1","outline-hidden","mx-1","my-1","sm:mx-6","sm:my-16"],backdrop:"z-50",header:"flex py-4 px-6 flex-initial text-large font-semibold",body:"flex flex-1 flex-col gap-3 px-6 py-2",footer:"flex flex-row gap-2 px-6 py-4 justify-end",closeButton:["absolute","appearance-none","outline-hidden","select-none","top-1","end-1","p-2","text-foreground-500","rounded-full","hover:bg-default-100","active:bg-default-200","tap-highlight-transparent",...wh]},variants:{size:{xs:{base:"max-w-xs"},sm:{base:"max-w-sm"},md:{base:"max-w-md"},lg:{base:"max-w-lg"},xl:{base:"max-w-xl"},"2xl":{base:"max-w-2xl"},"3xl":{base:"max-w-3xl"},"4xl":{base:"max-w-4xl"},"5xl":{base:"max-w-5xl"},full:{base:"my-0 mx-0 sm:mx-0 sm:my-0 max-w-full h-[100dvh] min-h-[100dvh] !rounded-none"}},radius:{none:{base:"rounded-none"},sm:{base:"rounded-small"},md:{base:"rounded-medium"},lg:{base:"rounded-large"}},placement:{auto:{wrapper:"items-end sm:items-center"},center:{wrapper:"items-center sm:items-center"},top:{wrapper:"items-start sm:items-start"},"top-center":{wrapper:"items-start sm:items-center"},bottom:{wrapper:"items-end sm:items-end"},"bottom-center":{wrapper:"items-end sm:items-center"}},shadow:{none:{base:"shadow-none"},sm:{base:"shadow-small"},md:{base:"shadow-medium"},lg:{base:"shadow-large"}},backdrop:{transparent:{backdrop:"hidden"},opaque:{backdrop:"bg-overlay/50 backdrop-opacity-disabled"},blur:{backdrop:"backdrop-blur-md backdrop-saturate-150 bg-overlay/30"}},scrollBehavior:{normal:{base:"overflow-y-hidden"},inside:{base:"max-h-[calc(100%_-_8rem)]",body:"overflow-y-auto"},outside:{wrapper:"items-start sm:items-start overflow-y-auto",base:"my-16"}},disableAnimation:{false:{wrapper:["[--scale-enter:100%]","[--scale-exit:100%]","[--slide-enter:0px]","[--slide-exit:80px]","sm:[--scale-enter:100%]","sm:[--scale-exit:103%]","sm:[--slide-enter:0px]","sm:[--slide-exit:0px]"]}}},defaultVariants:{size:"md",radius:"lg",shadow:"sm",placement:"auto",backdrop:"opaque",scrollBehavior:"normal"},compoundVariants:[{backdrop:["opaque","blur"],class:{backdrop:"w-screen h-screen fixed inset-0"}}]}),PO=fr({base:"shrink-0 bg-divider border-none",variants:{orientation:{horizontal:"w-full h-divider",vertical:"h-full w-divider"}},defaultVariants:{orientation:"horizontal"}}),TO=fr({base:"flex flex-col gap-2 items-start"}),bk=fr({slots:{wrapper:"relative shadow-black/5",zoomedWrapper:"relative overflow-hidden rounded-inherit",img:"relative z-10 opacity-0 shadow-black/5 data-[loaded=true]:opacity-100",blurredImg:["absolute","z-0","inset-0","w-full","h-full","object-cover","filter","blur-lg","scale-105","saturate-150","opacity-30","translate-y-1"]},variants:{radius:{none:{},sm:{},md:{},lg:{},full:{}},shadow:{none:{wrapper:"shadow-none",img:"shadow-none"},sm:{wrapper:"shadow-small",img:"shadow-small"},md:{wrapper:"shadow-medium",img:"shadow-medium"},lg:{wrapper:"shadow-large",img:"shadow-large"}},isZoomed:{true:{img:["object-cover","transform","hover:scale-125"]}},showSkeleton:{true:{wrapper:["group","relative","overflow-hidden","bg-content3 dark:bg-content2"],img:"opacity-0"}},disableAnimation:{true:{img:"transition-none"},false:{img:"transition-transform-opacity motion-reduce:transition-none !duration-300"}}},defaultVariants:{radius:"lg",shadow:"none",isZoomed:!1,isBlurred:!1,showSkeleton:!1},compoundVariants:[{showSkeleton:!0,disableAnimation:!1,class:{wrapper:["before:opacity-100","before:absolute","before:inset-0","before:-translate-x-full","before:animate-shimmer","before:border-t","before:border-content4/30","before:bg-gradient-to-r","before:from-transparent","before:via-content4","dark:before:via-default-700/10","before:to-transparent","after:opacity-100","after:absolute","after:inset-0","after:-z-10","after:bg-content3","dark:after:bg-content2"]}}],compoundSlots:[{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"none",class:"rounded-none"},{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"full",class:"rounded-full"},{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"sm",class:"rounded-small"},{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"md",class:"rounded-md"},{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"lg",class:"rounded-large"}]}),_O=fr({base:["z-0","group","relative","inline-flex","items-center","justify-center","box-border","appearance-none","outline-hidden","select-none","whitespace-nowrap","min-w-max","font-normal","subpixel-antialiased","overflow-hidden","tap-highlight-transparent","transform-gpu data-[pressed=true]:scale-[0.97]","cursor-pointer",...wh],variants:{variant:{solid:"",bordered:"border-medium bg-transparent",light:"bg-transparent",flat:"",faded:"border-medium",shadow:"",ghost:"border-medium bg-transparent"},size:{sm:"px-3 min-w-16 h-8 text-tiny gap-2 rounded-small",md:"px-4 min-w-20 h-10 text-small gap-2 rounded-medium",lg:"px-6 min-w-24 h-12 text-medium gap-3 rounded-large"},color:{default:"",primary:"",secondary:"",success:"",warning:"",danger:""},radius:{none:"rounded-none",sm:"rounded-small",md:"rounded-medium",lg:"rounded-large",full:"rounded-full"},fullWidth:{true:"w-full"},isDisabled:{true:"opacity-disabled pointer-events-none"},isInGroup:{true:"[&:not(:first-child):not(:last-child)]:rounded-none"},isIconOnly:{true:"px-0 !gap-0",false:"[&>svg]:max-w-[theme(spacing.8)]"},disableAnimation:{true:"!transition-none data-[pressed=true]:scale-100",false:"transition-transform-colors-opacity motion-reduce:transition-none"}},defaultVariants:{size:"md",variant:"solid",color:"default",fullWidth:!1,isDisabled:!1,isInGroup:!1},compoundVariants:[{variant:"solid",color:"default",class:et.solid.default},{variant:"solid",color:"primary",class:et.solid.primary},{variant:"solid",color:"secondary",class:et.solid.secondary},{variant:"solid",color:"success",class:et.solid.success},{variant:"solid",color:"warning",class:et.solid.warning},{variant:"solid",color:"danger",class:et.solid.danger},{variant:"shadow",color:"default",class:et.shadow.default},{variant:"shadow",color:"primary",class:et.shadow.primary},{variant:"shadow",color:"secondary",class:et.shadow.secondary},{variant:"shadow",color:"success",class:et.shadow.success},{variant:"shadow",color:"warning",class:et.shadow.warning},{variant:"shadow",color:"danger",class:et.shadow.danger},{variant:"bordered",color:"default",class:et.bordered.default},{variant:"bordered",color:"primary",class:et.bordered.primary},{variant:"bordered",color:"secondary",class:et.bordered.secondary},{variant:"bordered",color:"success",class:et.bordered.success},{variant:"bordered",color:"warning",class:et.bordered.warning},{variant:"bordered",color:"danger",class:et.bordered.danger},{variant:"flat",color:"default",class:et.flat.default},{variant:"flat",color:"primary",class:et.flat.primary},{variant:"flat",color:"secondary",class:et.flat.secondary},{variant:"flat",color:"success",class:et.flat.success},{variant:"flat",color:"warning",class:et.flat.warning},{variant:"flat",color:"danger",class:et.flat.danger},{variant:"faded",color:"default",class:et.faded.default},{variant:"faded",color:"primary",class:et.faded.primary},{variant:"faded",color:"secondary",class:et.faded.secondary},{variant:"faded",color:"success",class:et.faded.success},{variant:"faded",color:"warning",class:et.faded.warning},{variant:"faded",color:"danger",class:et.faded.danger},{variant:"light",color:"default",class:[et.light.default,"data-[hover=true]:bg-default/40"]},{variant:"light",color:"primary",class:[et.light.primary,"data-[hover=true]:bg-primary/20"]},{variant:"light",color:"secondary",class:[et.light.secondary,"data-[hover=true]:bg-secondary/20"]},{variant:"light",color:"success",class:[et.light.success,"data-[hover=true]:bg-success/20"]},{variant:"light",color:"warning",class:[et.light.warning,"data-[hover=true]:bg-warning/20"]},{variant:"light",color:"danger",class:[et.light.danger,"data-[hover=true]:bg-danger/20"]},{variant:"ghost",color:"default",class:[et.ghost.default,"data-[hover=true]:!bg-default"]},{variant:"ghost",color:"primary",class:[et.ghost.primary,"data-[hover=true]:!bg-primary data-[hover=true]:!text-primary-foreground"]},{variant:"ghost",color:"secondary",class:[et.ghost.secondary,"data-[hover=true]:!bg-secondary data-[hover=true]:!text-secondary-foreground"]},{variant:"ghost",color:"success",class:[et.ghost.success,"data-[hover=true]:!bg-success data-[hover=true]:!text-success-foreground"]},{variant:"ghost",color:"warning",class:[et.ghost.warning,"data-[hover=true]:!bg-warning data-[hover=true]:!text-warning-foreground"]},{variant:"ghost",color:"danger",class:[et.ghost.danger,"data-[hover=true]:!bg-danger data-[hover=true]:!text-danger-foreground"]},{isInGroup:!0,class:"rounded-none first:rounded-s-medium last:rounded-e-medium"},{isInGroup:!0,size:"sm",class:"rounded-none first:rounded-s-small last:rounded-e-small"},{isInGroup:!0,size:"md",class:"rounded-none first:rounded-s-medium last:rounded-e-medium"},{isInGroup:!0,size:"lg",class:"rounded-none first:rounded-s-large last:rounded-e-large"},{isInGroup:!0,isRounded:!0,class:"rounded-none first:rounded-s-full last:rounded-e-full"},{isInGroup:!0,radius:"none",class:"rounded-none first:rounded-s-none last:rounded-e-none"},{isInGroup:!0,radius:"sm",class:"rounded-none first:rounded-s-small last:rounded-e-small"},{isInGroup:!0,radius:"md",class:"rounded-none first:rounded-s-medium last:rounded-e-medium"},{isInGroup:!0,radius:"lg",class:"rounded-none first:rounded-s-large last:rounded-e-large"},{isInGroup:!0,radius:"full",class:"rounded-none first:rounded-s-full last:rounded-e-full"},{isInGroup:!0,variant:["ghost","bordered"],color:"default",className:sf.default},{isInGroup:!0,variant:["ghost","bordered"],color:"primary",className:sf.primary},{isInGroup:!0,variant:["ghost","bordered"],color:"secondary",className:sf.secondary},{isInGroup:!0,variant:["ghost","bordered"],color:"success",className:sf.success},{isInGroup:!0,variant:["ghost","bordered"],color:"warning",className:sf.warning},{isInGroup:!0,variant:["ghost","bordered"],color:"danger",className:sf.danger},{isIconOnly:!0,size:"sm",class:"min-w-8 w-8 h-8"},{isIconOnly:!0,size:"md",class:"min-w-10 w-10 h-10"},{isIconOnly:!0,size:"lg",class:"min-w-12 w-12 h-12"},{variant:["solid","faded","flat","bordered","shadow"],class:"data-[hover=true]:opacity-hover"}]});fr({base:"inline-flex items-center justify-center h-auto",variants:{fullWidth:{true:"w-full"}},defaultVariants:{fullWidth:!1}});var IO=fr({slots:{base:"group relative max-w-fit inline-flex items-center justify-start cursor-pointer tap-highlight-transparent p-2 -m-2 select-none",wrapper:["relative","inline-flex","items-center","justify-center","shrink-0","overflow-hidden","before:content-['']","before:absolute","before:inset-0","before:border-solid","before:border-2","before:box-border","before:border-default","after:content-['']","after:absolute","after:inset-0","after:scale-50","after:opacity-0","after:origin-center","group-data-[selected=true]:after:scale-100","group-data-[selected=true]:after:opacity-100","group-data-[hover=true]:before:bg-default-100",...I_],hiddenInput:kO,icon:"z-10 w-4 h-3 opacity-0 group-data-[selected=true]:opacity-100 pointer-events-none",label:"relative text-foreground select-none"},variants:{color:{default:{wrapper:"after:bg-default after:text-default-foreground text-default-foreground"},primary:{wrapper:"after:bg-primary after:text-primary-foreground text-primary-foreground"},secondary:{wrapper:"after:bg-secondary after:text-secondary-foreground text-secondary-foreground"},success:{wrapper:"after:bg-success after:text-success-foreground text-success-foreground"},warning:{wrapper:"after:bg-warning after:text-warning-foreground text-warning-foreground"},danger:{wrapper:"after:bg-danger after:text-danger-foreground text-danger-foreground"}},size:{sm:{wrapper:["w-4 h-4 me-2","rounded-[calc(var(--heroui-radius-medium)*0.5)]","before:rounded-[calc(var(--heroui-radius-medium)*0.5)]","after:rounded-[calc(var(--heroui-radius-medium)*0.5)]"],label:"text-small",icon:"w-3 h-2"},md:{wrapper:["w-5 h-5 me-2","rounded-[calc(var(--heroui-radius-medium)*0.6)]","before:rounded-[calc(var(--heroui-radius-medium)*0.6)]","after:rounded-[calc(var(--heroui-radius-medium)*0.6)]"],label:"text-medium",icon:"w-4 h-3"},lg:{wrapper:["w-6 h-6 me-2","rounded-[calc(var(--heroui-radius-medium)*0.7)]","before:rounded-[calc(var(--heroui-radius-medium)*0.7)]","after:rounded-[calc(var(--heroui-radius-medium)*0.7)]"],label:"text-large",icon:"w-5 h-4"}},radius:{none:{wrapper:"rounded-none before:rounded-none after:rounded-none"},sm:{wrapper:["rounded-[calc(var(--heroui-radius-medium)*0.5)]","before:rounded-[calc(var(--heroui-radius-medium)*0.5)]","after:rounded-[calc(var(--heroui-radius-medium)*0.5)]"]},md:{wrapper:["rounded-[calc(var(--heroui-radius-medium)*0.6)]","before:rounded-[calc(var(--heroui-radius-medium)*0.6)]","after:rounded-[calc(var(--heroui-radius-medium)*0.6)]"]},lg:{wrapper:["rounded-[calc(var(--heroui-radius-medium)*0.7)]","before:rounded-[calc(var(--heroui-radius-medium)*0.7)]","after:rounded-[calc(var(--heroui-radius-medium)*0.7)]"]},full:{wrapper:"rounded-full before:rounded-full after:rounded-full"}},lineThrough:{true:{label:["inline-flex","items-center","justify-center","before:content-['']","before:absolute","before:bg-foreground","before:w-0","before:h-0.5","group-data-[selected=true]:opacity-60","group-data-[selected=true]:before:w-full"]}},isDisabled:{true:{base:"opacity-disabled pointer-events-none"}},isInvalid:{true:{wrapper:"before:border-danger",label:"text-danger"}},disableAnimation:{true:{wrapper:"transition-none",icon:"transition-none",label:"transition-none"},false:{wrapper:["before:transition-colors","group-data-[pressed=true]:scale-95","transition-transform","after:transition-transform-opacity","after:!ease-linear","after:!duration-200","motion-reduce:transition-none"],icon:"transition-opacity motion-reduce:transition-none",label:"transition-colors-opacity before:transition-width motion-reduce:transition-none"}}},defaultVariants:{color:"primary",size:"md",isDisabled:!1,lineThrough:!1}});fr({slots:{base:"relative flex flex-col gap-2",label:"relative text-medium text-foreground-500",wrapper:"flex flex-col flex-wrap gap-2 data-[orientation=horizontal]:flex-row",description:"text-small text-foreground-400",errorMessage:"text-small text-danger"},variants:{isRequired:{true:{label:"after:content-['*'] after:text-danger after:ml-0.5"}},isInvalid:{true:{description:"text-danger"}},disableAnimation:{true:{},false:{description:"transition-colors !duration-150 motion-reduce:transition-none"}}},defaultVariants:{isInvalid:!1,isRequired:!1}});var $O=fr({base:"px-2",variants:{variant:{light:"",shadow:"px-4 shadow-medium rounded-medium bg-content1",bordered:"px-4 border-medium border-divider rounded-medium",splitted:"flex flex-col gap-2"},fullWidth:{true:"w-full"}},defaultVariants:{variant:"light",fullWidth:!0}}),AO=fr({slots:{base:"",heading:"",trigger:["flex py-4 w-full h-full gap-3 outline-hidden items-center tap-highlight-transparent",...wh],startContent:"shrink-0",indicator:"text-default-400",titleWrapper:"flex-1 flex flex-col text-start",title:"text-foreground text-medium",subtitle:"text-small text-foreground-500 font-normal",content:"py-2"},variants:{variant:{splitted:{base:"px-4 bg-content1 shadow-medium rounded-medium"}},isCompact:{true:{trigger:"py-2",title:"text-medium",subtitle:"text-small",indicator:"text-medium",content:"py-1"}},isDisabled:{true:{base:"opacity-disabled pointer-events-none"}},hideIndicator:{true:{indicator:"hidden"}},disableAnimation:{true:{content:"hidden data-[open=true]:block"},false:{indicator:"transition-transform",trigger:"transition-opacity"}},disableIndicatorAnimation:{true:{indicator:"transition-none"},false:{indicator:"rotate-0 data-[open=true]:-rotate-90 rtl:-rotate-180 rtl:data-[open=true]:-rotate-90"}}},defaultVariants:{size:"md",radius:"lg",isDisabled:!1,hideIndicator:!1,disableIndicatorAnimation:!1}});function $_(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t0){let d=function(h){return Promise.all(h.map(m=>Promise.resolve(m).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),c=l?.nonce||l?.getAttribute("nonce");i=d(n.map(h=>{if(h=DO(h),h in xk)return;xk[h]=!0;const m=h.endsWith(".css"),g=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${g}`))return;const b=document.createElement("link");if(b.rel=m?"stylesheet":MO,m||(b.as="script"),b.crossOrigin="",b.href=h,c&&b.setAttribute("nonce",c),document.head.appendChild(b),m)return new Promise((x,k)=>{b.addEventListener("load",x),b.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${h}`)))})}))}function s(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return i.then(l=>{for(const c of l||[])c.status==="rejected"&&s(c.reason);return t().catch(s)})};function NO(e,t){let{elementType:n="button",isDisabled:r,onPress:i,onPressStart:s,onPressEnd:l,onPressUp:c,onPressChange:d,preventFocusOnPress:h,allowFocusWhenDisabled:m,onClick:g,href:b,target:x,rel:k,type:P="button"}=e,_;n==="button"?_={type:P,disabled:r}:_={role:"button",href:n==="a"&&!r?b:void 0,target:n==="a"?x:void 0,type:n==="input"?P:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?k:void 0};let{pressProps:T,isPressed:$}=wu({onPressStart:s,onPressEnd:l,onPressChange:d,onPress:i,onPressUp:c,onClick:g,isDisabled:r,preventFocusOnPress:h,ref:t}),{focusableProps:L}=xh(e,t);m&&(L.tabIndex=r?-1:L.tabIndex);let z=Pn(L,T,_u(e,{labelable:!0}));return{isPressed:$,buttonProps:Pn(_,z,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"]})}}function FO(e,t,n){let{item:r,isDisabled:i}=e,s=r.key,l=t.selectionManager,c=S.useId(),d=S.useId(),h=t.disabledKeys.has(r.key)||i;S.useEffect(()=>{s===t.focusedKey&&document.activeElement!==n.current&&n.current&&ku(n.current)},[n,s,t.focusedKey]);let m=S.useCallback(P=>{l.canSelectItem(s)&&(l.select(s,P),t.toggleKey(s))},[s,l]);const g=S.useCallback(P=>{l.selectionBehavior==="replace"&&l.extendSelection(P),l.setFocusedKey(P)},[l]),b=S.useCallback(P=>{const T={ArrowDown:()=>{const $=t.collection.getKeyAfter(s);if($&&t.disabledKeys.has($)){const L=t.collection.getKeyAfter($);L&&g(L)}else $&&g($)},ArrowUp:()=>{const $=t.collection.getKeyBefore(s);if($&&t.disabledKeys.has($)){const L=t.collection.getKeyBefore($);L&&g(L)}else $&&g($)},Home:()=>{const $=t.collection.getFirstKey();$&&g($)},End:()=>{const $=t.collection.getLastKey();$&&g($)}}[P.key];T&&(P.preventDefault(),l.canSelectItem(s)&&T(P))},[s,l]);let{buttonProps:x}=NO({id:c,elementType:"button",isDisabled:h,onKeyDown:b,onPress:m},n),k=t.selectionManager.isSelected(r.key);return{buttonProps:{...x,"aria-expanded":k,"aria-controls":k?d:void 0},regionProps:{id:d,role:"region","aria-labelledby":c}}}function wk(e){return aM()?e.altKey:e.ctrlKey}function Lg(e,t){var n,r;let i=`[data-key="${CSS.escape(String(t))}"]`,s=(n=e.current)===null||n===void 0?void 0:n.dataset.collection;return s&&(i=`[data-collection="${CSS.escape(s)}"]${i}`),(r=e.current)===null||r===void 0?void 0:r.querySelector(i)}const A_=new WeakMap;function OO(e){let t=Ef();return A_.set(e,t),t}function zG(e){return A_.get(e)}const zO=1e3;function jO(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:r}=e,i=S.useRef({search:"",timeout:void 0}).current,s=l=>{let c=BO(l.key);if(!(!c||l.ctrlKey||l.metaKey||!l.currentTarget.contains(l.target))){if(c===" "&&i.search.trim().length>0&&(l.preventDefault(),"continuePropagation"in l||l.stopPropagation()),i.search+=c,t.getKeyForSearch!=null){let d=t.getKeyForSearch(i.search,n.focusedKey);d==null&&(d=t.getKeyForSearch(i.search)),d!=null&&(n.setFocusedKey(d),r&&r(d))}clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=""},zO)}};return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?s:void 0}}}function BO(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function VO(e){let{selectionManager:t,keyboardDelegate:n,ref:r,autoFocus:i=!1,shouldFocusWrap:s=!1,disallowEmptySelection:l=!1,disallowSelectAll:c=!1,escapeKeyBehavior:d="clearSelection",selectOnFocus:h=t.selectionBehavior==="replace",disallowTypeAhead:m=!1,shouldUseVirtualFocus:g,allowsTabNavigation:b=!1,isVirtualized:x,scrollRef:k=r,linkBehavior:P="action"}=e,{direction:_}=hh(),T=ax(),$=q=>{var V;if(q.altKey&&q.key==="Tab"&&q.preventDefault(),!(!((V=r.current)===null||V===void 0)&&V.contains(q.target)))return;const se=(_e,mt)=>{if(_e!=null){if(t.isLink(_e)&&P==="selection"&&h&&!wk(q)){LE.flushSync(()=>{t.setFocusedKey(_e,mt)});let pt=Lg(r,_e),Vt=t.getItemProps(_e);pt&&T.open(pt,q,Vt.href,Vt.routerOptions);return}if(t.setFocusedKey(_e,mt),t.isLink(_e)&&P==="override")return;q.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(_e):h&&!wk(q)&&t.replaceSelection(_e)}};switch(q.key){case"ArrowDown":if(n.getKeyBelow){var R,U,ie;let _e=t.focusedKey!=null?(R=n.getKeyBelow)===null||R===void 0?void 0:R.call(n,t.focusedKey):(U=n.getFirstKey)===null||U===void 0?void 0:U.call(n);_e==null&&s&&(_e=(ie=n.getFirstKey)===null||ie===void 0?void 0:ie.call(n,t.focusedKey)),_e!=null&&(q.preventDefault(),se(_e))}break;case"ArrowUp":if(n.getKeyAbove){var O,me,Ce;let _e=t.focusedKey!=null?(O=n.getKeyAbove)===null||O===void 0?void 0:O.call(n,t.focusedKey):(me=n.getLastKey)===null||me===void 0?void 0:me.call(n);_e==null&&s&&(_e=(Ce=n.getLastKey)===null||Ce===void 0?void 0:Ce.call(n,t.focusedKey)),_e!=null&&(q.preventDefault(),se(_e))}break;case"ArrowLeft":if(n.getKeyLeftOf){var ye,Fe,De;let _e=t.focusedKey!=null?(ye=n.getKeyLeftOf)===null||ye===void 0?void 0:ye.call(n,t.focusedKey):null;_e==null&&s&&(_e=_==="rtl"?(Fe=n.getFirstKey)===null||Fe===void 0?void 0:Fe.call(n,t.focusedKey):(De=n.getLastKey)===null||De===void 0?void 0:De.call(n,t.focusedKey)),_e!=null&&(q.preventDefault(),se(_e,_==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){var Te,Xe,lt;let _e=t.focusedKey!=null?(Te=n.getKeyRightOf)===null||Te===void 0?void 0:Te.call(n,t.focusedKey):null;_e==null&&s&&(_e=_==="rtl"?(Xe=n.getLastKey)===null||Xe===void 0?void 0:Xe.call(n,t.focusedKey):(lt=n.getFirstKey)===null||lt===void 0?void 0:lt.call(n,t.focusedKey)),_e!=null&&(q.preventDefault(),se(_e,_==="rtl"?"last":"first"))}break;case"Home":if(n.getFirstKey){if(t.focusedKey===null&&q.shiftKey)return;q.preventDefault();let _e=n.getFirstKey(t.focusedKey,hp(q));t.setFocusedKey(_e),_e!=null&&(hp(q)&&q.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(_e):h&&t.replaceSelection(_e))}break;case"End":if(n.getLastKey){if(t.focusedKey===null&&q.shiftKey)return;q.preventDefault();let _e=n.getLastKey(t.focusedKey,hp(q));t.setFocusedKey(_e),_e!=null&&(hp(q)&&q.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(_e):h&&t.replaceSelection(_e))}break;case"PageDown":if(n.getKeyPageBelow&&t.focusedKey!=null){let _e=n.getKeyPageBelow(t.focusedKey);_e!=null&&(q.preventDefault(),se(_e))}break;case"PageUp":if(n.getKeyPageAbove&&t.focusedKey!=null){let _e=n.getKeyPageAbove(t.focusedKey);_e!=null&&(q.preventDefault(),se(_e))}break;case"a":hp(q)&&t.selectionMode==="multiple"&&c!==!0&&(q.preventDefault(),t.selectAll());break;case"Escape":d==="clearSelection"&&!l&&t.selectedKeys.size!==0&&(q.stopPropagation(),q.preventDefault(),t.clearSelection());break;case"Tab":if(!b){if(q.shiftKey)r.current.focus();else{let _e=Xs(r.current,{tabbable:!0}),mt,pt;do pt=_e.lastChild(),pt&&(mt=pt);while(pt);mt&&!mt.contains(document.activeElement)&&Jl(mt)}break}}},L=S.useRef({top:0,left:0});ag(k,"scroll",x?void 0:()=>{var q,V,se,R;L.current={top:(se=(q=k.current)===null||q===void 0?void 0:q.scrollTop)!==null&&se!==void 0?se:0,left:(R=(V=k.current)===null||V===void 0?void 0:V.scrollLeft)!==null&&R!==void 0?R:0}});let z=q=>{if(t.isFocused){q.currentTarget.contains(q.target)||t.setFocused(!1);return}if(q.currentTarget.contains(q.target)){if(t.setFocused(!0),t.focusedKey==null){var V,se;let ie=me=>{me!=null&&(t.setFocusedKey(me),h&&!t.isSelected(me)&&t.replaceSelection(me))},O=q.relatedTarget;var R,U;O&&q.currentTarget.compareDocumentPosition(O)&Node.DOCUMENT_POSITION_FOLLOWING?ie((R=t.lastSelectedKey)!==null&&R!==void 0?R:(V=n.getLastKey)===null||V===void 0?void 0:V.call(n)):ie((U=t.firstSelectedKey)!==null&&U!==void 0?U:(se=n.getFirstKey)===null||se===void 0?void 0:se.call(n))}else!x&&k.current&&(k.current.scrollTop=L.current.top,k.current.scrollLeft=L.current.left);if(t.focusedKey!=null&&k.current){let ie=Lg(r,t.focusedKey);ie instanceof HTMLElement&&(!ie.contains(document.activeElement)&&!g&&Jl(ie),oh()==="keyboard"&&k1(ie,{containingElement:r.current}))}}},K=q=>{q.currentTarget.contains(q.relatedTarget)||t.setFocused(!1)},M=S.useRef(!1);ag(r,yM,g?q=>{let{detail:V}=q;q.stopPropagation(),t.setFocused(!0),V?.focusStrategy==="first"&&(M.current=!0)}:void 0);let J=jn(()=>{var q,V;let se=(V=(q=n.getFirstKey)===null||q===void 0?void 0:q.call(n))!==null&&V!==void 0?V:null;se==null?(tF(r.current),t.collection.size>0&&(M.current=!1)):(t.setFocusedKey(se),M.current=!1)});x1(()=>{M.current&&J()},[t.collection,J]);let re=jn(()=>{t.collection.size>0&&(M.current=!1)});x1(()=>{re()},[t.focusedKey,re]),ag(r,vM,g?q=>{var V;q.stopPropagation(),t.setFocused(!1),!((V=q.detail)===null||V===void 0)&&V.clearFocusKey&&t.setFocusedKey(null)}:void 0);const ae=S.useRef(i),j=S.useRef(!1);S.useEffect(()=>{if(ae.current){var q,V;let U=null;var se;i==="first"&&(U=(se=(q=n.getFirstKey)===null||q===void 0?void 0:q.call(n))!==null&&se!==void 0?se:null);var R;i==="last"&&(U=(R=(V=n.getLastKey)===null||V===void 0?void 0:V.call(n))!==null&&R!==void 0?R:null);let ie=t.selectedKeys;if(ie.size){for(let O of ie)if(t.canSelectItem(O)){U=O;break}}t.setFocused(!0),t.setFocusedKey(U),U==null&&!g&&r.current&&ku(r.current),t.collection.size>0&&(ae.current=!1,j.current=!0)}});let B=S.useRef(t.focusedKey),Y=S.useRef(null);S.useEffect(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==B.current||j.current)&&k.current&&r.current){let q=oh(),V=Lg(r,t.focusedKey);if(!(V instanceof HTMLElement))return;(q==="keyboard"||j.current)&&(Y.current&&cancelAnimationFrame(Y.current),Y.current=requestAnimationFrame(()=>{k.current&&($E(k.current,V),q!=="virtual"&&k1(V,{containingElement:r.current}))}))}!g&&t.isFocused&&t.focusedKey==null&&B.current!=null&&r.current&&ku(r.current),B.current=t.focusedKey,j.current=!1}),S.useEffect(()=>()=>{Y.current&&cancelAnimationFrame(Y.current)},[]),ag(r,"react-aria-focus-scope-restore",q=>{q.preventDefault(),t.setFocused(!0)});let te={onKeyDown:$,onFocus:z,onBlur:K,onMouseDown(q){k.current===q.target&&q.preventDefault()}},{typeSelectProps:G}=jO({keyboardDelegate:n,selectionManager:t});m||(te=Pn(G,te));let ce;g||(ce=t.focusedKey==null?0:-1);let Z=OO(t.collection);return{collectionProps:Pn(te,{tabIndex:ce,"data-collection":Z})}}class Sk{getItemRect(t){let n=this.ref.current;if(!n)return null;let r=t!=null?Lg(this.ref,t):null;if(!r)return null;let i=n.getBoundingClientRect(),s=r.getBoundingClientRect();return{x:s.left-i.left+n.scrollLeft,y:s.top-i.top+n.scrollTop,width:s.width,height:s.height}}getContentSize(){let t=this.ref.current;var n,r;return{width:(n=t?.scrollWidth)!==null&&n!==void 0?n:0,height:(r=t?.scrollHeight)!==null&&r!==void 0?r:0}}getVisibleRect(){let t=this.ref.current;var n,r,i,s;return{x:(n=t?.scrollLeft)!==null&&n!==void 0?n:0,y:(r=t?.scrollTop)!==null&&r!==void 0?r:0,width:(i=t?.offsetWidth)!==null&&i!==void 0?i:0,height:(s=t?.offsetHeight)!==null&&s!==void 0?s:0}}constructor(t){this.ref=t}}class UO{isDisabled(t){var n;return this.disabledBehavior==="all"&&(((n=t.props)===null||n===void 0?void 0:n.isDisabled)||this.disabledKeys.has(t.key))}findNextNonDisabled(t,n){let r=t;for(;r!=null;){let i=this.collection.getItem(r);if(i?.type==="item"&&!this.isDisabled(i))return r;r=n(r)}return null}getNextKey(t){let n=t;return n=this.collection.getKeyAfter(n),this.findNextNonDisabled(n,r=>this.collection.getKeyAfter(r))}getPreviousKey(t){let n=t;return n=this.collection.getKeyBefore(n),this.findNextNonDisabled(n,r=>this.collection.getKeyBefore(r))}findKey(t,n,r){let i=t,s=this.layoutDelegate.getItemRect(i);if(!s||i==null)return null;let l=s;do{if(i=n(i),i==null)break;s=this.layoutDelegate.getItemRect(i)}while(s&&r(l,s)&&i!=null);return i}isSameRow(t,n){return t.y===n.y||t.x!==n.x}isSameColumn(t,n){return t.x===n.x||t.y!==n.y}getKeyBelow(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,n=>this.getNextKey(n),this.isSameRow):this.getNextKey(t)}getKeyAbove(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,n=>this.getPreviousKey(n),this.isSameRow):this.getPreviousKey(t)}getNextColumn(t,n){return n?this.getPreviousKey(t):this.getNextKey(t)}getKeyRightOf(t){let n=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[n]?(t=this.layoutDelegate[n](t),this.findNextNonDisabled(t,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="rtl"):this.findKey(t,r=>this.getNextColumn(r,this.direction==="rtl"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="rtl"):null}getKeyLeftOf(t){let n=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[n]?(t=this.layoutDelegate[n](t),this.findNextNonDisabled(t,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="ltr"):this.findKey(t,r=>this.getNextColumn(r,this.direction==="ltr"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="ltr"):null}getFirstKey(){let t=this.collection.getFirstKey();return this.findNextNonDisabled(t,n=>this.collection.getKeyAfter(n))}getLastKey(){let t=this.collection.getLastKey();return this.findNextNonDisabled(t,n=>this.collection.getKeyBefore(n))}getKeyPageAbove(t){let n=this.ref.current,r=this.layoutDelegate.getItemRect(t);if(!r)return null;if(n&&!qp(n))return this.getFirstKey();let i=t;if(this.orientation==="horizontal"){let s=Math.max(0,r.x+r.width-this.layoutDelegate.getVisibleRect().width);for(;r&&r.x>s&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}else{let s=Math.max(0,r.y+r.height-this.layoutDelegate.getVisibleRect().height);for(;r&&r.y>s&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}return i??this.getFirstKey()}getKeyPageBelow(t){let n=this.ref.current,r=this.layoutDelegate.getItemRect(t);if(!r)return null;if(n&&!qp(n))return this.getLastKey();let i=t;if(this.orientation==="horizontal"){let s=Math.min(this.layoutDelegate.getContentSize().width,r.y-r.width+this.layoutDelegate.getVisibleRect().width);for(;r&&r.xs||new UO({collection:n,disabledKeys:r,disabledBehavior:d,ref:i,collator:c,layoutDelegate:l}),[s,l,n,r,i,c,d]),{collectionProps:m}=VO({...e,ref:i,selectionManager:t,keyboardDelegate:h});return{listProps:m}}function WO(e,t,n){let{listProps:r}=KO({...e,...t,allowsTabNavigation:!0,disallowSelectAll:!0,ref:n});return delete r.onKeyDownCapture,{accordionProps:{...r,tabIndex:void 0}}}function HO(e){var t,n;const r=si(),{ref:i,as:s,item:l,onFocusChange:c}=e,{state:d,className:h,indicator:m,children:g,title:b,subtitle:x,startContent:k,motionProps:P,focusedKey:_,variant:T,isCompact:$=!1,classNames:L={},isDisabled:z=!1,hideIndicator:K=!1,disableAnimation:M=(t=r?.disableAnimation)!=null?t:!1,keepContentMounted:J=!1,disableIndicatorAnimation:re=!1,HeadingComponent:ae=s||"h2",onPress:j,onPressStart:B,onPressEnd:Y,onPressChange:te,onPressUp:G,onClick:ce,...Z}=e,q=s||"div",V=typeof q=="string",se=Ji(i),R=d.disabledKeys.has(l.key)||z,U=d.selectionManager.isSelected(l.key),{buttonProps:ie,regionProps:O}=FO({item:l,isDisabled:R},{...d,focusedKey:_},se),{onFocus:me,onBlur:Ce,...ye}=ie,{isFocused:Fe,isFocusVisible:De,focusProps:Te}=Af({autoFocus:(n=l.props)==null?void 0:n.autoFocus}),{isHovered:Xe,hoverProps:lt}=Cu({isDisabled:R}),{pressProps:_e,isPressed:mt}=wu({ref:se,isDisabled:R,onPress:j,onPressStart:B,onPressEnd:Y,onPressChange:te,onPressUp:G}),pt=S.useCallback(()=>{c?.(!0,l.key)},[]),Vt=S.useCallback(()=>{c?.(!1,l.key)},[]),Ve=S.useMemo(()=>({...L}),[tl(L)]),it=S.useMemo(()=>AO({isCompact:$,isDisabled:R,hideIndicator:K,disableAnimation:M,disableIndicatorAnimation:re,variant:T}),[$,R,K,M,re,T]),Ut=tn(Ve?.base,h),Zn=S.useCallback((pe={})=>({"data-open":$e(U),"data-disabled":$e(R),"data-slot":"base",className:it.base({class:Ut}),...on(Cf(Z,{enabled:V}),pe)}),[Ut,V,Z,it,l.props,U,R]),ln=(pe={})=>{var Se,Oe;return{ref:se,"data-open":$e(U),"data-focus":$e(Fe),"data-focus-visible":$e(De),"data-disabled":$e(R),"data-hover":$e(Xe),"data-pressed":$e(mt),"data-slot":"trigger",className:it.trigger({class:Ve?.trigger}),onFocus:c1(pt,me,Te.onFocus,Z.onFocus,(Se=l.props)==null?void 0:Se.onFocus),onBlur:c1(Vt,Ce,Te.onBlur,Z.onBlur,(Oe=l.props)==null?void 0:Oe.onBlur),...on(ye,lt,_e,pe,{onClick:Ql(_e.onClick,ce)})}},_t=S.useCallback((pe={})=>({"data-open":$e(U),"data-disabled":$e(R),"data-slot":"content",className:it.content({class:Ve?.content}),...on(O,pe)}),[it,Ve,O,U,R,Ve?.content]),Rt=S.useCallback((pe={})=>({"aria-hidden":$e(!0),"data-open":$e(U),"data-disabled":$e(R),"data-slot":"indicator",className:it.indicator({class:Ve?.indicator}),...pe}),[it,Ve?.indicator,U,R,Ve?.indicator]),Tn=S.useCallback((pe={})=>({"data-open":$e(U),"data-disabled":$e(R),"data-slot":"heading",className:it.heading({class:Ve?.heading}),...pe}),[it,Ve?.heading,U,R,Ve?.heading]),Cr=S.useCallback((pe={})=>({"data-open":$e(U),"data-disabled":$e(R),"data-slot":"title",className:it.title({class:Ve?.title}),...pe}),[it,Ve?.title,U,R,Ve?.title]),Nt=S.useCallback((pe={})=>({"data-open":$e(U),"data-disabled":$e(R),"data-slot":"subtitle",className:it.subtitle({class:Ve?.subtitle}),...pe}),[it,Ve,U,R,Ve?.subtitle]);return{Component:q,HeadingComponent:ae,item:l,slots:it,classNames:Ve,domRef:se,indicator:m,children:g,title:b,subtitle:x,startContent:k,isOpen:U,isDisabled:R,hideIndicator:K,keepContentMounted:J,disableAnimation:M,motionProps:P,getBaseProps:Zn,getHeadingProps:Tn,getButtonProps:ln,getContentProps:_t,getIndicatorProps:Rt,getTitleProps:Cr,getSubtitleProps:Nt}}var kk=e=>D.jsx("svg",{"aria-hidden":"true",fill:"none",focusable:"false",height:"1em",role:"presentation",viewBox:"0 0 24 24",width:"1em",...e,children:D.jsx("path",{d:"M15.5 19l-7-7 7-7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})}),GO=e=>D.jsx("svg",{"aria-hidden":"true",focusable:"false",height:"1em",role:"presentation",viewBox:"0 0 24 24",width:"1em",...e,children:D.jsx("path",{d:"M12 2a10 10 0 1010 10A10.016 10.016 0 0012 2zm3.36 12.3a.754.754 0 010 1.06.748.748 0 01-1.06 0l-2.3-2.3-2.3 2.3a.748.748 0 01-1.06 0 .754.754 0 010-1.06l2.3-2.3-2.3-2.3A.75.75 0 019.7 8.64l2.3 2.3 2.3-2.3a.75.75 0 011.06 1.06l-2.3 2.3z",fill:"currentColor"})}),qO=e=>{const{isSelected:t,isIndeterminate:n,disableAnimation:r,...i}=e;return D.jsx("svg",{"aria-hidden":"true",className:"fill-current",fill:"none",focusable:"false",height:"1em",role:"presentation",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",width:"1em",...i,children:D.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})},Bp={ease:[.36,.66,.4,1]},Jg={scaleSpring:{enter:{transform:"scale(1)",opacity:1,transition:{type:"spring",bounce:0,duration:.2}},exit:{transform:"scale(0.85)",opacity:0,transition:{type:"easeOut",duration:.15}}},scaleSpringOpacity:{initial:{opacity:0,transform:"scale(0.8)"},enter:{opacity:1,transform:"scale(1)",transition:{type:"spring",bounce:0,duration:.3}},exit:{opacity:0,transform:"scale(0.96)",transition:{type:"easeOut",bounce:0,duration:.15}}},fade:{enter:{opacity:1,transition:{duration:.4,ease:Bp.ease}},exit:{opacity:0,transition:{duration:.3,ease:Bp.ease}}},collapse:{enter:{opacity:1,height:"auto",transition:{height:{type:"spring",bounce:0,duration:.3},opacity:{easings:"ease",duration:.4}}},exit:{opacity:0,height:0,transition:{easings:"ease",duration:.3}}}},Ck=()=>no(()=>import("./index-CN_ylOby.js"),[]).then(e=>e.default),R_=li((e,t)=>{const{Component:n,HeadingComponent:r,classNames:i,slots:s,indicator:l,children:c,title:d,subtitle:h,startContent:m,isOpen:g,isDisabled:b,hideIndicator:x,keepContentMounted:k,disableAnimation:P,motionProps:_,getBaseProps:T,getHeadingProps:$,getButtonProps:L,getTitleProps:z,getSubtitleProps:K,getContentProps:M,getIndicatorProps:J}=HO({...e,ref:t}),re=f5(),j=S.useMemo(()=>typeof l=="function"?l({indicator:D.jsx(kk,{}),isOpen:g,isDisabled:b}):l||null,[l,g,b])||D.jsx(kk,{}),B=S.useMemo(()=>{if(P)return k?D.jsx("div",{...M(),children:c}):g&&D.jsx("div",{...M(),children:c});const Y={exit:{...Jg.collapse.exit,overflowY:"hidden"},enter:{...Jg.collapse.enter,overflowY:"unset"}};return k?D.jsx(If,{features:Ck,children:D.jsx($f.section,{animate:g?"enter":"exit",exit:"exit",initial:"exit",style:{willChange:re},variants:Y,onKeyDown:te=>{te.stopPropagation()},..._,children:D.jsx("div",{...M(),children:c})},"accordion-content")}):D.jsx(Au,{initial:!1,children:g&&D.jsx(If,{features:Ck,children:D.jsx($f.section,{animate:"enter",exit:"exit",initial:"exit",style:{willChange:re},variants:Y,onKeyDown:te=>{te.stopPropagation()},..._,children:D.jsx("div",{...M(),children:c})},"accordion-content")})})},[g,P,k,c,_]);return D.jsxs(n,{...T(),children:[D.jsx(r,{...$(),children:D.jsxs("button",{...L(),children:[m&&D.jsx("div",{className:s.startContent({class:i?.startContent}),children:m}),D.jsxs("div",{className:s.titleWrapper({class:i?.titleWrapper}),children:[d&&D.jsx("span",{...z(),children:d}),h&&D.jsx("span",{...K(),children:h})]}),!x&&j&&D.jsx("span",{...J(),children:j})]})}),B]})});R_.displayName="HeroUI.AccordionItem";var YO=R_;class XO{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let n=this.keyMap.get(t);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(t){let n=this.keyMap.get(t);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(t){var n;return(n=this.keyMap.get(t))!==null&&n!==void 0?n:null}at(t){const n=[...this.getKeys()];return this.getItem(n[t])}constructor(t,{expandedKeys:n}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=t,n=n||new Set;let r=c=>{if(this.keyMap.set(c.key,c),c.childNodes&&(c.type==="section"||n.has(c.key)))for(let d of c.childNodes)r(d)};for(let c of t)r(c);let i=null,s=0;for(let[c,d]of this.keyMap)i?(i.nextKey=c,d.prevKey=i.key):(this.firstKey=c,d.prevKey=void 0),d.type==="item"&&(d.index=s++),i=d,i.nextKey=void 0;var l;this.lastKey=(l=i?.key)!==null&&l!==void 0?l:null}}class Co extends Set{constructor(t,n,r){super(t),t instanceof Co?(this.anchorKey=n??t.anchorKey,this.currentKey=r??t.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}}function QO(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function JO(e){let{selectionMode:t="none",disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i="toggle",disabledBehavior:s="all"}=e,l=S.useRef(!1),[,c]=S.useState(!1),d=S.useRef(null),h=S.useRef(null),[,m]=S.useState(null),g=S.useMemo(()=>Ek(e.selectedKeys),[e.selectedKeys]),b=S.useMemo(()=>Ek(e.defaultSelectedKeys,new Co),[e.defaultSelectedKeys]),[x,k]=Iu(g,b,e.onSelectionChange),P=S.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[_,T]=S.useState(i);i==="replace"&&_==="toggle"&&typeof x=="object"&&x.size===0&&T("replace");let $=S.useRef(i);return S.useEffect(()=>{i!==$.current&&(T(i),$.current=i)},[i]),{selectionMode:t,disallowEmptySelection:n,selectionBehavior:_,setSelectionBehavior:T,get isFocused(){return l.current},setFocused(L){l.current=L,c(L)},get focusedKey(){return d.current},get childFocusStrategy(){return h.current},setFocusedKey(L,z="first"){d.current=L,h.current=z,m(L)},selectedKeys:x,setSelectedKeys(L){(r||!QO(L,x))&&k(L)},disabledKeys:P,disabledBehavior:s}}function Ek(e,t){return e?e==="all"?"all":new Co(e):t}function L_(e){return null}L_.getCollectionNode=function*(t,n){let{childItems:r,title:i,children:s}=t,l=t.title||t.children,c=t.textValue||(typeof l=="string"?l:"")||t["aria-label"]||"";!c&&n?.suppressTextValueWarning,yield{type:"item",props:t,rendered:l,textValue:c,"aria-label":t["aria-label"],hasChildNodes:ZO(t),*childNodes(){if(r)for(let d of r)yield{type:"item",value:d};else if(i){let d=[];We.Children.forEach(s,h=>{d.push({type:"item",element:h})}),yield*d}}}};function ZO(e){return e.hasChildItems!=null?e.hasChildItems:!!(e.childItems||e.title&&We.Children.count(e.children)>0)}let e6=L_;class t6{build(t,n){return this.context=n,Pk(()=>this.iterateCollection(t))}*iterateCollection(t){let{children:n,items:r}=t;if(We.isValidElement(n)&&n.type===We.Fragment)yield*this.iterateCollection({children:n.props.children,items:r});else if(typeof n=="function"){if(!r)throw new Error("props.children was a function but props.items is missing");let i=0;for(let s of r)yield*this.getFullNode({value:s,index:i},{renderer:n}),i++}else{let i=[];We.Children.forEach(n,l=>{l&&i.push(l)});let s=0;for(let l of i){let c=this.getFullNode({element:l,index:s},{});for(let d of c)s++,yield d}}}getKey(t,n,r,i){if(t.key!=null)return t.key;if(n.type==="cell"&&n.key!=null)return`${i}${n.key}`;let s=n.value;if(s!=null){var l;let c=(l=s.key)!==null&&l!==void 0?l:s.id;if(c==null)throw new Error("No key found for item");return c}return i?`${i}.${n.index}`:`$.${n.index}`}getChildState(t,n){return{renderer:n.renderer||t.renderer}}*getFullNode(t,n,r,i){if(We.isValidElement(t.element)&&t.element.type===We.Fragment){let _=[];We.Children.forEach(t.element.props.children,$=>{_.push($)});var s;let T=(s=t.index)!==null&&s!==void 0?s:0;for(const $ of _)yield*this.getFullNode({element:$,index:T++},n,r,i);return}let l=t.element;if(!l&&t.value&&n&&n.renderer){let _=this.cache.get(t.value);if(_&&(!_.shouldInvalidate||!_.shouldInvalidate(this.context))){_.index=t.index,_.parentKey=i?i.key:null,yield _;return}l=n.renderer(t.value)}if(We.isValidElement(l)){let _=l.type;if(typeof _!="function"&&typeof _.getCollectionNode!="function"){let z=l.type;throw new Error(`Unknown element <${z}> in collection.`)}let T=_.getCollectionNode(l.props,this.context);var c;let $=(c=t.index)!==null&&c!==void 0?c:0,L=T.next();for(;!L.done&&L.value;){let z=L.value;t.index=$;var d;let K=(d=z.key)!==null&&d!==void 0?d:null;K==null&&(K=z.element?null:this.getKey(l,t,n,r));let J=[...this.getFullNode({...z,key:K,index:$,wrapper:n6(t.wrapper,z.wrapper)},this.getChildState(n,z),r?`${r}${l.key}`:l.key,i)];for(let re of J){var h,m;re.value=(m=(h=z.value)!==null&&h!==void 0?h:t.value)!==null&&m!==void 0?m:null,re.value&&this.cache.set(re.value,re);var g;if(t.type&&re.type!==t.type)throw new Error(`Unsupported type <${h0(re.type)}> in <${h0((g=i?.type)!==null&&g!==void 0?g:"unknown parent type")}>. Only <${h0(t.type)}> is supported.`);$++,yield re}L=T.next(J)}return}if(t.key==null||t.type==null)return;let b=this;var x,k;let P={type:t.type,props:t.props,key:t.key,parentKey:i?i.key:null,value:(x=t.value)!==null&&x!==void 0?x:null,level:i?i.level+1:0,index:t.index,rendered:t.rendered,textValue:(k=t.textValue)!==null&&k!==void 0?k:"","aria-label":t["aria-label"],wrapper:t.wrapper,shouldInvalidate:t.shouldInvalidate,hasChildNodes:t.hasChildNodes||!1,childNodes:Pk(function*(){if(!t.hasChildNodes||!t.childNodes)return;let _=0;for(let T of t.childNodes()){T.key!=null&&(T.key=`${P.key}${T.key}`);let $=b.getFullNode({...T,index:_},b.getChildState(n,T),P.key,P);for(let L of $)_++,yield L}})};yield P}constructor(){this.cache=new WeakMap}}function Pk(e){let t=[],n=null;return{*[Symbol.iterator](){for(let r of t)yield r;n||(n=e());for(let r of n)t.push(r),yield r}}}function n6(e,t){if(e&&t)return n=>e(t(n));if(e)return e;if(t)return t}function h0(e){return e[0].toUpperCase()+e.slice(1)}function r6(e,t,n){let r=S.useMemo(()=>new t6,[]),{children:i,items:s,collection:l}=e;return S.useMemo(()=>{if(l)return l;let d=r.build({children:i,items:s},n);return t(d)},[r,i,s,l,n,t])}function i6(e,t){return typeof t.getChildren=="function"?t.getChildren(e.key):e.childNodes}function o6(e){return s6(e,0)}function s6(e,t){if(t<0)return;let n=0;for(let r of e){if(n===t)return r;n++}}function jG(e){let t;for(let n of e)t=n;return t}function m0(e,t,n){if(t.parentKey===n.parentKey)return t.index-n.index;let r=[...Tk(e,t),t],i=[...Tk(e,n),n],s=r.slice(0,i.length).findIndex((l,c)=>l!==i[c]);return s!==-1?(t=r[s],n=i[s],t.index-n.index):r.findIndex(l=>l===n)>=0?1:(i.findIndex(l=>l===t)>=0,-1)}function Tk(e,t){let n=[],r=t;for(;r?.parentKey!=null;)r=e.getItem(r.parentKey),r&&n.unshift(r);return n}class Qx{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(t){this.state.setSelectionBehavior(t)}get isFocused(){return this.state.isFocused}setFocused(t){this.state.setFocused(t)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(t,n){(t==null||this.collection.getItem(t))&&this.state.setFocusedKey(t,n)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(t){if(this.state.selectionMode==="none")return!1;let n=this.getKey(t);return n==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(n):this.state.selectedKeys.has(n)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let t=this.getSelectAllKeys(),n=this.state.selectedKeys;return this._isSelectAll=t.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let t=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!t||i&&m0(this.collection,i,t)<0)&&(t=i)}var n;return(n=t?.key)!==null&&n!==void 0?n:null}get lastSelectedKey(){let t=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!t||i&&m0(this.collection,i,t)>0)&&(t=i)}var n;return(n=t?.key)!==null&&n!==void 0?n:null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(t);return}let n=this.getKey(t);if(n==null)return;let r;if(this.state.selectedKeys==="all")r=new Co([n],n,n);else{let l=this.state.selectedKeys;var i;let c=(i=l.anchorKey)!==null&&i!==void 0?i:n;r=new Co(l,c,n);var s;for(let d of this.getKeyRange(c,(s=l.currentKey)!==null&&s!==void 0?s:n))r.delete(d);for(let d of this.getKeyRange(n,c))this.canSelectItem(d)&&r.add(d)}this.state.setSelectedKeys(r)}getKeyRange(t,n){let r=this.collection.getItem(t),i=this.collection.getItem(n);return r&&i?m0(this.collection,r,i)<=0?this.getKeyRangeInternal(t,n):this.getKeyRangeInternal(n,t):[]}getKeyRangeInternal(t,n){var r;if(!((r=this.layoutDelegate)===null||r===void 0)&&r.getKeyRange)return this.layoutDelegate.getKeyRange(t,n);let i=[],s=t;for(;s!=null;){let l=this.collection.getItem(s);if(l&&(l.type==="item"||l.type==="cell"&&this.allowsCellSelection)&&i.push(s),s===n)return i;s=this.collection.getKeyAfter(s)}return[]}getKey(t){let n=this.collection.getItem(t);if(!n||n.type==="cell"&&this.allowsCellSelection)return t;for(;n&&n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(t)){this.replaceSelection(t);return}let n=this.getKey(t);if(n==null)return;let r=new Co(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);r.has(n)?r.delete(n):this.canSelectItem(n)&&(r.add(n),r.anchorKey=n,r.currentKey=n),!(this.disallowEmptySelection&&r.size===0)&&this.state.setSelectedKeys(r)}replaceSelection(t){if(this.selectionMode==="none")return;let n=this.getKey(t);if(n==null)return;let r=this.canSelectItem(n)?new Co([n],n,n):new Co;this.state.setSelectedKeys(r)}setSelectedKeys(t){if(this.selectionMode==="none")return;let n=new Co;for(let r of t){let i=this.getKey(r);if(i!=null&&(n.add(i),this.selectionMode==="single"))break}this.state.setSelectedKeys(n)}getSelectAllKeys(){let t=[],n=r=>{for(;r!=null;){if(this.canSelectItem(r)){var i;let l=this.collection.getItem(r);l?.type==="item"&&t.push(r);var s;l?.hasChildNodes&&(this.allowsCellSelection||l.type!=="item")&&n((s=(i=o6(i6(l,this.collection)))===null||i===void 0?void 0:i.key)!==null&&s!==void 0?s:null)}r=this.collection.getKeyAfter(r)}};return n(this.collection.getFirstKey()),t}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new Co)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(t,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(t)&&!this.disallowEmptySelection?this.toggleSelection(t):this.replaceSelection(t):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(t):this.replaceSelection(t))}isSelectionEqual(t){if(t===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(t.size!==n.size)return!1;for(let r of t)if(!n.has(r))return!1;for(let r of n)if(!t.has(r))return!1;return!0}canSelectItem(t){var n;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(t))return!1;let r=this.collection.getItem(t);return!(!r||!(r==null||(n=r.props)===null||n===void 0)&&n.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(t){var n,r;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(t)||!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled))}isLink(t){var n,r;return!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.href)}getItemProps(t){var n;return(n=this.collection.getItem(t))===null||n===void 0?void 0:n.props}withCollection(t){return new Qx(t,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0})}constructor(t,n,r){this.collection=t,this.state=n;var i;this.allowsCellSelection=(i=r?.allowsCellSelection)!==null&&i!==void 0?i:!1,this._isSelectAll=null,this.layoutDelegate=r?.layoutDelegate||null}}function l6(e){let{onExpandedChange:t}=e,[n,r]=Iu(e.expandedKeys?new Set(e.expandedKeys):void 0,e.defaultExpandedKeys?new Set(e.defaultExpandedKeys):new Set,t),i=JO(e),s=S.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),l=r6(e,S.useCallback(d=>new XO(d,{expandedKeys:n}),[n]),null);return S.useEffect(()=>{i.focusedKey!=null&&!l.getItem(i.focusedKey)&&i.setFocusedKey(null)},[l,i.focusedKey]),{collection:l,expandedKeys:n,disabledKeys:s,toggleKey:d=>{r(a6(n,d))},setExpandedKeys:r,selectionManager:new Qx(l,i)}}function a6(e,t){let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}function u6(e){var t;const n=si(),{ref:r,as:i,className:s,items:l,variant:c,motionProps:d,expandedKeys:h,disabledKeys:m,selectedKeys:g,children:b,defaultExpandedKeys:x,selectionMode:k="single",selectionBehavior:P="toggle",keepContentMounted:_=!1,disallowEmptySelection:T,defaultSelectedKeys:$,onExpandedChange:L,onSelectionChange:z,dividerProps:K={},isCompact:M=!1,isDisabled:J=!1,showDivider:re=!0,hideIndicator:ae=!1,disableAnimation:j=(t=n?.disableAnimation)!=null?t:!1,disableIndicatorAnimation:B=!1,itemClasses:Y,...te}=e,[G,ce]=S.useState(null),Z=i||"div",q=typeof Z=="string",V=Ji(r),se=S.useMemo(()=>$O({variant:c,className:s}),[c,s]),U={children:S.useMemo(()=>{let Te=[];return We.Children.map(b,Xe=>{var lt;if(We.isValidElement(Xe)&&typeof((lt=Xe.props)==null?void 0:lt.children)!="string"){const _e=We.cloneElement(Xe,{hasChildItems:!1});Te.push(_e)}else Te.push(Xe)}),Te},[b]),items:l},ie={expandedKeys:h,defaultExpandedKeys:x,onExpandedChange:L},O={disabledKeys:m,selectedKeys:g,selectionMode:k,selectionBehavior:P,disallowEmptySelection:T,defaultSelectedKeys:$??x,onSelectionChange:z,...U,...ie},me=l6(O);me.selectionManager.setFocusedKey=Te=>{ce(Te)};const{accordionProps:Ce}=WO({...U,...ie},me,V),ye=S.useMemo(()=>({state:me,focusedKey:G,motionProps:d,isCompact:M,isDisabled:J,hideIndicator:ae,disableAnimation:j,keepContentMounted:_,disableIndicatorAnimation:B}),[G,M,J,ae,g,j,_,me?.expandedKeys.values,B,me.expandedKeys.size,me.disabledKeys.size,d]),Fe=S.useCallback((Te={})=>({ref:V,className:se,"data-orientation":"vertical",...on(Ce,Cf(te,{enabled:q}),Te)}),[]),De=S.useCallback((Te,Xe)=>{Te&&ce(Xe)},[]);return{Component:Z,values:ye,state:me,focusedKey:G,getBaseProps:Fe,isSplitted:c==="splitted",classNames:se,showDivider:re,dividerProps:K,disableAnimation:j,handleFocusChanged:De,itemClasses:Y}}function c6(e){let t=Cf(e,{enabled:typeof e.elementType=="string"}),n;return e.orientation==="vertical"&&(n="vertical"),e.elementType!=="hr"?{separatorProps:{...t,role:"separator","aria-orientation":n}}:{separatorProps:t}}function f6(e){const{as:t,className:n,orientation:r,...i}=e;let s=t||"hr";s==="hr"&&r==="vertical"&&(s="div");const{separatorProps:l}=c6({elementType:typeof s=="string"?s:"hr",orientation:r}),c=S.useMemo(()=>PO({orientation:r,className:n}),[r,n]),d=S.useCallback((h={})=>({className:c,role:"separator","data-orientation":r,...l,...i,...h}),[c,r,l,i]);return{Component:s,getDividerProps:d}}var M_=li((e,t)=>{const{Component:n,getDividerProps:r}=f6({...e});return D.jsx(n,{ref:t,...r()})});M_.displayName="HeroUI.Divider";var d6=M_,D_=li((e,t)=>{const{Component:n,values:r,state:i,isSplitted:s,showDivider:l,getBaseProps:c,disableAnimation:d,handleFocusChanged:h,itemClasses:m,dividerProps:g}=u6({...e,ref:t}),b=S.useCallback((k,P)=>h(k,P),[h]),x=S.useMemo(()=>[...i.collection].map((k,P)=>{const _={...m,...k.props.classNames||{}};return D.jsxs(S.Fragment,{children:[D.jsx(YO,{item:k,variant:e.variant,onFocusChange:b,...r,...k.props,classNames:_}),!k.props.hidden&&!s&&l&&P{const t={top:{originY:1},bottom:{originY:0},left:{originX:1},right:{originX:0},"top-start":{originX:0,originY:1},"top-end":{originX:1,originY:1},"bottom-start":{originX:0,originY:0},"bottom-end":{originX:1,originY:0},"right-start":{originX:0,originY:0},"right-end":{originX:0,originY:1},"left-start":{originX:1,originY:0},"left-end":{originX:1,originY:1}};return t?.[e]||{}},h6=e=>({top:"top",bottom:"bottom",left:"left",right:"right","top-start":"top start","top-end":"top end","bottom-start":"bottom start","bottom-end":"bottom end","left-start":"left top","left-end":"left bottom","right-start":"right top","right-end":"right bottom"})[e],BG=(e,t)=>{if(t.includes("-")){const[n]=t.split("-");if(n.includes(e))return!1}return!0},Ik=(e,t)=>{if(t.includes("-")){const[,n]=t.split("-");return`${e}-${n}`}return e},m6=e6,bp=m6,Sh=globalThis?.document?S.useLayoutEffect:S.useEffect;function g6(e={}){const{onLoad:t,onError:n,ignoreFallback:r,src:i,crossOrigin:s,srcSet:l,sizes:c,loading:d,shouldBypassImageLoad:h=!1}=e,m=vL(),g=S.useRef(m?new Image:null),[b,x]=S.useState("pending");S.useEffect(()=>{g.current&&(g.current.onload=_=>{k(),x("loaded"),t?.(_)},g.current.onerror=_=>{k(),x("failed"),n?.(_)})},[g.current]);const k=()=>{g.current&&(g.current.onload=null,g.current.onerror=null,g.current=null)},P=S.useCallback(()=>{if(!i)return"pending";if(r||h)return"loaded";const _=new Image;return _.src=i,s&&(_.crossOrigin=s),l&&(_.srcset=l),c&&(_.sizes=c),d&&(_.loading=d),g.current=_,_.complete&&_.naturalWidth?"loaded":"loading"},[i,s,l,c,t,n,d,h]);return Sh(()=>{m&&x(P())},[m,P]),r?"loaded":b}var[VG,v6]=dv({name:"ButtonGroupContext",strict:!1});function N_(e,t){let{elementType:n="button",isDisabled:r,onPress:i,onPressStart:s,onPressEnd:l,onPressUp:c,onPressChange:d,preventFocusOnPress:h,allowFocusWhenDisabled:m,onClick:g,href:b,target:x,rel:k,type:P="button",allowTextSelectionOnPress:_}=e,T;n==="button"?T={type:P,disabled:r}:T={role:"button",href:n==="a"&&!r?b:void 0,target:n==="a"?x:void 0,type:n==="input"?P:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?k:void 0};let{pressProps:$,isPressed:L}=wu({onClick:g,onPressStart:s,onPressEnd:l,onPressUp:c,onPressChange:d,onPress:i,isDisabled:r,preventFocusOnPress:h,allowTextSelectionOnPress:_,ref:t}),{focusableProps:z}=xh(e,t);m&&(z.tabIndex=r?-1:z.tabIndex);let K=Pn(z,$,_u(e,{labelable:!0}));return{isPressed:L,buttonProps:Pn(T,K,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"]})}}var y6=()=>no(()=>import("./index-CN_ylOby.js"),[]).then(e=>e.default),F_=e=>{const{ripples:t=[],motionProps:n,color:r="currentColor",style:i,onClear:s}=e;return D.jsx(D.Fragment,{children:t.map(l=>{const c=dL(.01*l.size,.2,l.size>100?.75:.5);return D.jsx(If,{features:y6,children:D.jsx(Au,{mode:"popLayout",children:D.jsx($f.span,{animate:{transform:"scale(2)",opacity:0},className:"heroui-ripple",exit:{opacity:0},initial:{transform:"scale(0)",opacity:.35},style:{position:"absolute",backgroundColor:r,borderRadius:"100%",transformOrigin:"center",pointerEvents:"none",overflow:"hidden",inset:0,zIndex:0,top:l.y,left:l.x,width:`${l.size}px`,height:`${l.size}px`,...i},transition:{duration:c},onAnimationComplete:()=>{s(l.key)},...n})})},l.key)})})};F_.displayName="HeroUI.Ripple";var b6=F_;function x6(e={}){const[t,n]=S.useState([]),r=S.useCallback(s=>{const l=s.target,c=Math.max(l.clientWidth,l.clientHeight);n(d=>[...d,{key:fL(d.length.toString()),size:c,x:s.x-c/2,y:s.y-c/2}])},[]),i=S.useCallback(s=>{n(l=>l.filter(c=>c.key!==s))},[]);return{ripples:t,onClear:i,onPress:r,...e}}function w6(e){var t,n,r,i,s,l,c,d,h;const m=v6(),g=si(),b=!!m,{ref:x,as:k,children:P,startContent:_,endContent:T,autoFocus:$,className:L,spinner:z,isLoading:K=!1,disableRipple:M=!1,fullWidth:J=(t=m?.fullWidth)!=null?t:!1,radius:re=m?.radius,size:ae=(n=m?.size)!=null?n:"md",color:j=(r=m?.color)!=null?r:"default",variant:B=(i=m?.variant)!=null?i:"solid",disableAnimation:Y=(l=(s=m?.disableAnimation)!=null?s:g?.disableAnimation)!=null?l:!1,isDisabled:te=(c=m?.isDisabled)!=null?c:!1,isIconOnly:G=(d=m?.isIconOnly)!=null?d:!1,spinnerPlacement:ce="start",onPress:Z,onClick:q,...V}=e,se=k||"button",R=typeof se=="string",U=Ji(x),ie=(h=M||g?.disableRipple)!=null?h:Y,{isFocusVisible:O,isFocused:me,focusProps:Ce}=Af({autoFocus:$}),ye=te||K,Fe=S.useMemo(()=>_O({size:ae,color:j,variant:B,radius:re,fullWidth:J,isDisabled:ye,isInGroup:b,disableAnimation:Y,isIconOnly:G,className:L}),[ae,j,B,re,J,ye,b,G,Y,L]),{onPress:De,onClear:Te,ripples:Xe}=x6(),lt=S.useCallback(Rt=>{ie||ye||Y||U.current&&De(Rt)},[ie,ye,Y,U,De]),{buttonProps:_e,isPressed:mt}=N_({elementType:k,isDisabled:ye,onPress:Ql(Z,lt),onClick:q,...V},U),{isHovered:pt,hoverProps:Vt}=Cu({isDisabled:ye}),Ve=S.useCallback((Rt={})=>({"data-disabled":$e(ye),"data-focus":$e(me),"data-pressed":$e(mt),"data-focus-visible":$e(O),"data-hover":$e(pt),"data-loading":$e(K),...on(_e,Ce,Vt,Cf(V,{enabled:R}),Cf(Rt)),className:Fe}),[K,ye,me,mt,R,O,pt,_e,Ce,Vt,V,Fe]),it=Rt=>S.isValidElement(Rt)?S.cloneElement(Rt,{"aria-hidden":!0,focusable:!1}):null,Ut=it(_),Zn=it(T),ln=S.useMemo(()=>({sm:"sm",md:"sm",lg:"md"})[ae],[ae]),_t=S.useCallback(()=>({ripples:Xe,onClear:Te}),[Xe,Te]);return{Component:se,children:P,domRef:U,spinner:z,styles:Fe,startContent:Ut,endContent:Zn,isLoading:K,spinnerPlacement:ce,spinnerSize:ln,disableRipple:ie,getButtonProps:Ve,getRippleProps:_t,isIconOnly:G}}function S6(e){var t,n;const[r,i]=na(e,dk.variantKeys),s=si(),l=(n=(t=e?.variant)!=null?t:s?.spinnerVariant)!=null?n:"default",{children:c,className:d,classNames:h,label:m,...g}=r,b=S.useMemo(()=>dk({...i}),[tl(i)]),x=tn(h?.base,d),k=m||c,P=S.useMemo(()=>k&&typeof k=="string"?k:g["aria-label"]?"":"Loading",[c,k,g["aria-label"]]),_=S.useCallback(()=>({"aria-label":P,className:b.base({class:x}),...g}),[P,b,x,g]);return{label:k,slots:b,classNames:h,variant:l,getSpinnerProps:_}}var O_=li((e,t)=>{const{slots:n,classNames:r,label:i,variant:s,getSpinnerProps:l}=S6({...e});return s==="wave"||s==="dots"?D.jsxs("div",{ref:t,...l(),children:[D.jsx("div",{className:n.wrapper({class:r?.wrapper}),children:[...new Array(3)].map((c,d)=>D.jsx("i",{className:n.dots({class:r?.dots}),style:{"--dot-index":d}},`dot-${d}`))}),i&&D.jsx("span",{className:n.label({class:r?.label}),children:i})]}):s==="simple"?D.jsxs("div",{ref:t,...l(),children:[D.jsxs("svg",{className:n.wrapper({class:r?.wrapper}),fill:"none",viewBox:"0 0 24 24",children:[D.jsx("circle",{className:n.circle1({class:r?.circle1}),cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),D.jsx("path",{className:n.circle2({class:r?.circle2}),d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z",fill:"currentColor"})]}),i&&D.jsx("span",{className:n.label({class:r?.label}),children:i})]}):s==="spinner"?D.jsxs("div",{ref:t,...l(),children:[D.jsx("div",{className:n.wrapper({class:r?.wrapper}),children:[...new Array(12)].map((c,d)=>D.jsx("i",{className:n.spinnerBars({class:r?.spinnerBars}),style:{"--bar-index":d}},`star-${d}`))}),i&&D.jsx("span",{className:n.label({class:r?.label}),children:i})]}):D.jsxs("div",{ref:t,...l(),children:[D.jsxs("div",{className:n.wrapper({class:r?.wrapper}),children:[D.jsx("i",{className:n.circle1({class:r?.circle1})}),D.jsx("i",{className:n.circle2({class:r?.circle2})})]}),i&&D.jsx("span",{className:n.label({class:r?.label}),children:i})]})});O_.displayName="HeroUI.Spinner";var k6=O_,z_=li((e,t)=>{const{Component:n,domRef:r,children:i,spinnerSize:s,spinner:l=D.jsx(k6,{color:"current",size:s}),spinnerPlacement:c,startContent:d,endContent:h,isLoading:m,disableRipple:g,getButtonProps:b,getRippleProps:x,isIconOnly:k}=w6({...e,ref:t});return D.jsxs(n,{ref:r,...b(),children:[d,m&&c==="start"&&l,m&&k?null:i,m&&c==="end"&&l,h,!g&&D.jsx(b6,{...x()})]})});z_.displayName="HeroUI.Button";var To=z_;const j_={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},B_={...j_,customError:!0,valid:!1},cf={isInvalid:!1,validationDetails:j_,validationErrors:[]},V_=S.createContext({}),Zg="__formValidationState"+Date.now();function Jx(e){if(e[Zg]){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:s}=e[Zg];return{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:s}}return C6(e)}function C6(e){let{isInvalid:t,validationState:n,name:r,value:i,builtinValidation:s,validate:l,validationBehavior:c="aria"}=e;n&&(t||(t=n==="invalid"));let d=t!==void 0?{isInvalid:t,validationErrors:[],validationDetails:B_}:null,h=S.useMemo(()=>{if(!l||i==null)return null;let j=E6(l,i);return $k(j)},[l,i]);s?.validationDetails.valid&&(s=void 0);let m=S.useContext(V_),g=S.useMemo(()=>r?Array.isArray(r)?r.flatMap(j=>Ib(m[j])):Ib(m[r]):[],[m,r]),[b,x]=S.useState(m),[k,P]=S.useState(!1);m!==b&&(x(m),P(!1));let _=S.useMemo(()=>$k(k?[]:g),[k,g]),T=S.useRef(cf),[$,L]=S.useState(cf),z=S.useRef(cf),K=()=>{if(!M)return;J(!1);let j=h||s||T.current;g0(j,z.current)||(z.current=j,L(j))},[M,J]=S.useState(!1);return S.useEffect(K),{realtimeValidation:d||_||h||s||cf,displayValidation:c==="native"?d||_||$:d||_||h||s||$,updateValidation(j){c==="aria"&&!g0($,j)?L(j):T.current=j},resetValidation(){let j=cf;g0(j,z.current)||(z.current=j,L(j)),c==="native"&&J(!1),P(!0)},commitValidation(){c==="native"&&J(!0),P(!0)}}}function Ib(e){return e?Array.isArray(e)?e:[e]:[]}function E6(e,t){if(typeof e=="function"){let n=e(t);if(n&&typeof n!="boolean")return Ib(n)}return[]}function $k(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:B_}:null}function g0(e,t){return e===t?!0:!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((n,r)=>n===t.validationErrors[r])&&Object.entries(e.validationDetails).every(([n,r])=>t.validationDetails[n]===r)}function U_(e,t,n){let{validationBehavior:r,focus:i}=e;sn(()=>{if(r==="native"&&n?.current&&!n.current.disabled){let d=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(d),n.current.hasAttribute("title")||(n.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation(T6(n.current))}});let s=jn(()=>{t.resetValidation()}),l=jn(d=>{var h;t.displayValidation.isInvalid||t.commitValidation();let m=n==null||(h=n.current)===null||h===void 0?void 0:h.form;if(!d.defaultPrevented&&n&&m&&_6(m)===n.current){var g;i?i():(g=n.current)===null||g===void 0||g.focus(),F5("keyboard")}d.preventDefault()}),c=jn(()=>{t.commitValidation()});S.useEffect(()=>{let d=n?.current;if(!d)return;let h=d.form;return d.addEventListener("invalid",l),d.addEventListener("change",c),h?.addEventListener("reset",s),()=>{d.removeEventListener("invalid",l),d.removeEventListener("change",c),h?.removeEventListener("reset",s)}},[n,l,c,s,r])}function P6(e){let t=e.validity;return{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing,valid:t.valid}}function T6(e){return{isInvalid:!e.validity.valid,validationDetails:P6(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function _6(e){for(let t=0;t{z.stopPropagation(),t.setSelected(z.target.checked)},{pressProps:x,isPressed:k}=wu({isDisabled:r}),{pressProps:P,isPressed:_}=wu({onPress(){var z;t.toggle(),(z=n.current)===null||z===void 0||z.focus()},isDisabled:r||i}),{focusableProps:T}=xh(e,n),$=Pn(x,T),L=_u(e,{labelable:!0});return RE(n,t.isSelected,t.setSelected),{labelProps:Pn(P,{onClick:z=>z.preventDefault()}),inputProps:Pn(L,{"aria-invalid":g||m==="invalid"||void 0,"aria-errormessage":e["aria-errormessage"],"aria-controls":e["aria-controls"],"aria-readonly":i||void 0,onChange:b,disabled:r,...s==null?{}:{value:s},name:l,type:"checkbox",...$}),isSelected:t.isSelected,isPressed:k||_,isDisabled:r,isReadOnly:i,isInvalid:g||m==="invalid"}}function K_(e,t,n){let r=Jx({...e,value:t.isSelected}),{isInvalid:i,validationErrors:s,validationDetails:l}=r.displayValidation,{labelProps:c,inputProps:d,isSelected:h,isPressed:m,isDisabled:g,isReadOnly:b}=I6({...e,isInvalid:i},t,n);U_(e,r,n);let{isIndeterminate:x,isRequired:k,validationBehavior:P="aria"}=e;S.useEffect(()=>{n.current&&(n.current.indeterminate=!!x)});let{pressProps:_}=wu({isDisabled:g||b,onPress(){let{[Zg]:T}=e,{commitValidation:$}=T||r;$()}});return{labelProps:Pn(c,_),inputProps:{...d,checked:h,"aria-required":k&&P==="aria"||void 0,required:k&&P==="native"},isSelected:h,isPressed:m,isDisabled:g,isReadOnly:b,isInvalid:i,validationErrors:s,validationDetails:l}}const $6=new WeakMap;function W_(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":i,labelElementType:s="label"}=e;t=Ef(t);let l=Ef(),c={};n&&(r=r?`${l} ${r}`:l,c={id:l,htmlFor:s==="label"?t:void 0});let d=TE({id:t,"aria-label":i,"aria-labelledby":r});return{labelProps:c,fieldProps:d}}function A6(e){let{description:t,errorMessage:n,isInvalid:r,validationState:i}=e,{labelProps:s,fieldProps:l}=W_(e),c=K0([!!t,!!n,r,i]),d=K0([!!t,!!n,r,i]);return l=Pn(l,{"aria-describedby":[c,d,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:s,fieldProps:l,descriptionProps:{id:c},errorMessageProps:{id:d}}}function H_(e={}){let{isReadOnly:t}=e,[n,r]=Iu(e.isSelected,e.defaultSelected||!1,e.onChange);function i(l){t||r(l)}function s(){t||r(!n)}return{isSelected:n,setSelected:i,toggle:s}}function R6(e,t,n){const r=H_({isReadOnly:e.isReadOnly||t.isReadOnly,isSelected:t.isSelected(e.value),onChange(_){_?t.addValue(e.value):t.removeValue(e.value),e.onChange&&e.onChange(_)}});let{name:i,descriptionId:s,errorMessageId:l,validationBehavior:c}=$6.get(t);var d;c=(d=e.validationBehavior)!==null&&d!==void 0?d:c;let{realtimeValidation:h}=Jx({...e,value:r.isSelected,name:void 0,validationBehavior:"aria"}),m=S.useRef(cf),g=()=>{t.setInvalid(e.value,h.isInvalid?h:m.current)};S.useEffect(g);let b=t.realtimeValidation.isInvalid?t.realtimeValidation:h,x=c==="native"?t.displayValidation:b;var k;let P=K_({...e,isReadOnly:e.isReadOnly||t.isReadOnly,isDisabled:e.isDisabled||t.isDisabled,name:e.name||i,isRequired:(k=e.isRequired)!==null&&k!==void 0?k:t.isRequired,validationBehavior:c,[Zg]:{realtimeValidation:b,displayValidation:x,resetValidation:t.resetValidation,commitValidation:t.commitValidation,updateValidation(_){m.current=_,g()}}},r,n);return{...P,inputProps:{...P.inputProps,"aria-describedby":[e["aria-describedby"],t.isInvalid?l:null,s].filter(Boolean).join(" ")||void 0}}}var Ak=Symbol("default");function L6(e){const t=S.useRef(null),n=S.useRef(void 0),r=S.useCallback(i=>{if(typeof e=="function"){const s=e,l=s(i);return()=>{typeof l=="function"?l():s(null)}}else if(e)return e.current=i,()=>{e.current=null}},[e]);return S.useMemo(()=>({get current(){return t.current},set current(i){t.current=i,n.current&&(n.current(),n.current=void 0),i!=null&&(n.current=r(i))}}),[r])}function Zx(e,t){let n=S.useContext(e);if(t===null)return null;if(n&&typeof n=="object"&&"slots"in n&&n.slots){let r=new Intl.ListFormat().format(Object.keys(n.slots).map(s=>`"${s}"`));if(!t&&!n.slots[Ak])throw new Error(`A slot prop is required. Valid slot names are ${r}.`);let i=t||Ak;if(!n.slots[i])throw new Error(`Invalid slot "${t}". Valid slot names are ${r}.`);return n.slots[i]}return n}function M6(e,t,n){let r=Zx(n,e.slot)||{},{ref:i,...s}=r,l=L6(S.useMemo(()=>dE(t,i),[t,i])),c=on(s,e);return"style"in s&&s.style&&"style"in e&&e.style&&(typeof s.style=="function"||typeof e.style=="function"?c.style=d=>{let h=typeof s.style=="function"?s.style(d):s.style,m={...d.defaultStyle,...h},g=typeof e.style=="function"?e.style({...d,defaultStyle:m}):e.style;return{...m,...g}}:c.style={...s.style,...e.style}),[c,l]}var ev=S.createContext(null),D6=S.forwardRef(function(t,n){[t,n]=M6(t,n,ev);let{validationErrors:r,validationBehavior:i="native",children:s,className:l,...c}=t;const d=S.useMemo(()=>TO({className:l}),[l]);return D.jsx("form",{noValidate:i!=="native",...c,ref:n,className:d,children:D.jsx(ev.Provider,{value:{...t,validationBehavior:i},children:D.jsx(V_.Provider,{value:r??{},children:s})})})}),N6=S.forwardRef(function(t,n){var r,i;const s=si(),l=(i=(r=t.validationBehavior)!=null?r:s?.validationBehavior)!=null?i:"native";return D.jsx(D6,{...t,ref:n,validationBehavior:l})}),[UG,F6]=dv({name:"CheckboxGroupContext",strict:!1});function O6(e){const{isSelected:t,disableAnimation:n,...r}=e;return D.jsx("svg",{"aria-hidden":"true",fill:"none",role:"presentation",stroke:"currentColor",strokeDasharray:22,strokeDashoffset:t?44:66,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,style:!n&&t?{transition:"stroke-dashoffset 250ms linear 0.2s"}:{},viewBox:"0 0 17 18",...r,children:D.jsx("polyline",{points:"1 9 7 14 15 4"})})}function z6(e){const{isSelected:t,disableAnimation:n,...r}=e;return D.jsx("svg",{stroke:"currentColor",strokeWidth:3,viewBox:"0 0 24 24",...r,children:D.jsx("line",{x1:"21",x2:"3",y1:"12",y2:"12"})})}function j6(e){const{isIndeterminate:t,...n}=e,r=t?z6:O6;return D.jsx(r,{...n})}function $b(e,t=[]){const n=S.useRef(e);return Sh(()=>{n.current=e}),S.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function B6(e={}){var t,n,r,i,s,l,c,d;const h=si(),m=F6(),{validationBehavior:g}=Zx(ev)||{},b=!!m,{as:x,ref:k,value:P="",children:_,icon:T,name:$,isRequired:L,isReadOnly:z=!1,autoFocus:K=!1,isSelected:M,size:J=(t=m?.size)!=null?t:"md",color:re=(n=m?.color)!=null?n:"primary",radius:ae=m?.radius,lineThrough:j=(r=m?.lineThrough)!=null?r:!1,isDisabled:B=(i=m?.isDisabled)!=null?i:!1,disableAnimation:Y=(l=(s=m?.disableAnimation)!=null?s:h?.disableAnimation)!=null?l:!1,validationState:te,isInvalid:G=te?te==="invalid":(c=m?.isInvalid)!=null?c:!1,isIndeterminate:ce=!1,validationBehavior:Z=b?m.validationBehavior:(d=g??h?.validationBehavior)!=null?d:"native",defaultSelected:q,classNames:V,className:se,onValueChange:R,validate:U,...ie}=e,O=x||"label",me=S.useRef(null),Ce=S.useRef(null);let ye=e.onChange;b&&(ye=Ql(()=>{m.groupState.resetValidation()},ye));const Fe=S.useId(),De=S.useMemo(()=>({name:$,value:P,children:_,autoFocus:K,defaultSelected:q,isIndeterminate:ce,isRequired:L,isInvalid:G,isSelected:M,isDisabled:B,isReadOnly:z,"aria-label":fE(ie["aria-label"],_),"aria-labelledby":ie["aria-labelledby"]||Fe,onChange:R}),[$,P,_,K,q,ce,L,G,M,B,z,ie["aria-label"],ie["aria-labelledby"],Fe,R]),Te=H_(De),Xe={isInvalid:G,isRequired:L,validate:U,validationState:te,validationBehavior:Z},{inputProps:lt,isSelected:_e,isDisabled:mt,isReadOnly:pt,isPressed:Vt,isInvalid:Ve}=b?R6({...De,...Xe},m.groupState,Ce):K_({...De,...Xe},Te,Ce),it=mt||pt,Ut=te==="invalid"||G||Ve,Zn=it?!1:Vt,{hoverProps:ln,isHovered:_t}=Cu({isDisabled:lt.disabled}),{focusProps:Rt,isFocused:Tn,isFocusVisible:Cr}=Af({autoFocus:lt.autoFocus}),Nt=S.useMemo(()=>IO({color:re,size:J,radius:ae,isInvalid:Ut,lineThrough:j,isDisabled:mt,disableAnimation:Y}),[re,J,ae,Ut,j,mt,Y]);Sh(()=>{if(!Ce.current)return;const Pt=!!Ce.current.checked;Te.setSelected(Pt)},[Ce.current]);const pe=$b(ye),Se=S.useCallback(Pt=>{if(pt||mt){Pt.preventDefault();return}pe?.(Pt)},[pt,mt,pe]),Oe=tn(V?.base,se),nt=S.useCallback(()=>({ref:me,className:Nt.base({class:Oe}),"data-disabled":$e(mt),"data-selected":$e(_e||ce),"data-invalid":$e(Ut),"data-hover":$e(_t),"data-focus":$e(Tn),"data-pressed":$e(Zn),"data-readonly":$e(lt.readOnly),"data-focus-visible":$e(Cr),"data-indeterminate":$e(ce),...on(ln,ie)}),[Nt,Oe,mt,_e,ce,Ut,_t,Tn,Zn,lt.readOnly,Cr,ln,ie]),at=S.useCallback((Pt={})=>({...Pt,"aria-hidden":!0,className:tn(Nt.wrapper({class:tn(V?.wrapper,Pt?.className)}))}),[Nt,V?.wrapper]),Kt=S.useCallback(()=>({ref:pE(Ce,k),...on(lt,Rt),className:Nt.hiddenInput({class:V?.hiddenInput}),onChange:Ql(lt.onChange,Se)}),[lt,Rt,Se,V?.hiddenInput]),Bn=S.useCallback(()=>({id:Fe,className:Nt.label({class:V?.label})}),[Nt,V?.label,mt,_e,Ut]),Qt=S.useCallback(()=>({isSelected:_e,isIndeterminate:ce,disableAnimation:Y,className:Nt.icon({class:V?.icon})}),[Nt,V?.icon,_e,ce,Y]);return{Component:O,icon:T,children:_,isSelected:_e,isDisabled:mt,isInvalid:Ut,isFocused:Tn,isHovered:_t,isFocusVisible:Cr,getBaseProps:nt,getWrapperProps:at,getInputProps:Kt,getLabelProps:Bn,getIconProps:Qt}}var G_=li((e,t)=>{const{Component:n,children:r,icon:i=D.jsx(j6,{}),getBaseProps:s,getWrapperProps:l,getInputProps:c,getIconProps:d,getLabelProps:h}=B6({...e,ref:t}),m=typeof i=="function"?i(d()):S.cloneElement(i,d());return D.jsxs(n,{...s(),children:[D.jsx("input",{...c()}),D.jsx("span",{...l(),children:m}),r&&D.jsx("span",{...h(),children:r})]})});G_.displayName="HeroUI.Checkbox";var V6=G_;function q_(e){let[t,n]=Iu(e.isOpen,e.defaultOpen||!1,e.onOpenChange);const r=S.useCallback(()=>{n(!0)},[n]),i=S.useCallback(()=>{n(!1)},[n]),s=S.useCallback(()=>{n(!t)},[n,t]);return{isOpen:t,setOpen:n,open:r,close:i,toggle:s}}const U6=1500,Rk=500;let lu={},K6=0,xp=!1,Hs=null,au=null;function W6(e={}){let{delay:t=U6,closeDelay:n=Rk}=e,{isOpen:r,open:i,close:s}=q_(e),l=S.useMemo(()=>`${++K6}`,[]),c=S.useRef(null),d=S.useRef(s),h=()=>{lu[l]=b},m=()=>{for(let k in lu)k!==l&&(lu[k](!0),delete lu[k])},g=()=>{c.current&&clearTimeout(c.current),c.current=null,m(),h(),xp=!0,i(),Hs&&(clearTimeout(Hs),Hs=null),au&&(clearTimeout(au),au=null)},b=k=>{k||n<=0?(c.current&&clearTimeout(c.current),c.current=null,d.current()):c.current||(c.current=setTimeout(()=>{c.current=null,d.current()},n)),Hs&&(clearTimeout(Hs),Hs=null),xp&&(au&&clearTimeout(au),au=setTimeout(()=>{delete lu[l],au=null,xp=!1},Math.max(Rk,n)))},x=()=>{m(),h(),!r&&!Hs&&!xp?Hs=setTimeout(()=>{Hs=null,xp=!0,g()},t):r||g()};return S.useEffect(()=>{d.current=s},[s]),S.useEffect(()=>()=>{c.current&&clearTimeout(c.current),lu[l]&&delete lu[l]},[l]),{isOpen:r,open:k=>{!k&&t>0&&!c.current?x():g()},close:b}}function H6(e,t){let n=_u(e,{labelable:!0}),{hoverProps:r}=Cu({onHoverStart:()=>t?.open(!0),onHoverEnd:()=>t?.close()});return{tooltipProps:Pn(n,r,{role:"tooltip"})}}function G6(e,t,n){let{isDisabled:r,trigger:i}=e,s=Ef(),l=S.useRef(!1),c=S.useRef(!1),d=()=>{(l.current||c.current)&&t.open(c.current)},h=T=>{!l.current&&!c.current&&t.close(T)};S.useEffect(()=>{let T=$=>{n&&n.current&&$.key==="Escape"&&($.stopPropagation(),t.close(!0))};if(t.isOpen)return document.addEventListener("keydown",T,!0),()=>{document.removeEventListener("keydown",T,!0)}},[n,t]);let m=()=>{i!=="focus"&&(oh()==="pointer"?l.current=!0:l.current=!1,d())},g=()=>{i!=="focus"&&(c.current=!1,l.current=!1,h())},b=()=>{c.current=!1,l.current=!1,h(!0)},x=()=>{Gx()&&(c.current=!0,d())},k=()=>{c.current=!1,l.current=!1,h(!0)},{hoverProps:P}=Cu({isDisabled:r,onHoverStart:m,onHoverEnd:g}),{focusableProps:_}=xh({isDisabled:r,onFocus:x,onBlur:k},n);return{triggerProps:{"aria-describedby":t.isOpen?s:void 0,...Pn(_,P,{onPointerDown:b,onKeyDown:b,tabIndex:void 0})},tooltipProps:{id:s}}}var Gs=[];function Y_(e,t){const{disableOutsideEvents:n=!0,isDismissable:r=!1,isKeyboardDismissDisabled:i=!1,isOpen:s,onClose:l,shouldCloseOnBlur:c,shouldCloseOnInteractOutside:d}=e;S.useEffect(()=>(s&&Gs.push(t),()=>{const P=Gs.indexOf(t);P>=0&&Gs.splice(P,1)}),[s,t]);const h=()=>{Gs[Gs.length-1]===t&&l&&l()},m=P=>{(!d||d(P.target))&&(Gs[Gs.length-1]===t&&n&&(P.stopPropagation(),P.preventDefault()),P.pointerType!=="touch"&&h())},g=P=>{P.pointerType==="touch"&&(!d||d(P.target))&&(Gs[Gs.length-1]===t&&n&&(P.stopPropagation(),P.preventDefault()),h())},b=P=>{P.key==="Escape"&&!i&&!P.nativeEvent.isComposing&&(P.stopPropagation(),P.preventDefault(),h())};G5({isDisabled:!(r&&s),onInteractOutside:r&&s?g:void 0,onInteractOutsideStart:m,ref:t});const{focusWithinProps:x}=Sv({isDisabled:!c,onBlurWithin:P=>{!P.relatedTarget||Q5(P.relatedTarget)||(!d||d(P.relatedTarget))&&h()}}),k=P=>{P.target===P.currentTarget&&P.preventDefault()};return{overlayProps:{onKeyDown:b,...x},underlayProps:{onPointerDown:k}}}function q6(e){var t,n;const r=si(),[i,s]=na(e,pk.variantKeys),{ref:l,as:c,isOpen:d,content:h,children:m,defaultOpen:g,onOpenChange:b,isDisabled:x,trigger:k,shouldFlip:P=!0,containerPadding:_=12,placement:T="top",delay:$=0,closeDelay:L=500,showArrow:z=!1,offset:K=7,crossOffset:M=0,isDismissable:J,shouldCloseOnBlur:re=!0,portalContainer:ae,isKeyboardDismissDisabled:j=!1,updatePositionDeps:B=[],shouldCloseOnInteractOutside:Y,className:te,onClose:G,motionProps:ce,classNames:Z,...q}=i,V=c||"div",se=(n=(t=e?.disableAnimation)!=null?t:r?.disableAnimation)!=null?n:!1,R=W6({delay:$,closeDelay:L,isDisabled:x,defaultOpen:g,isOpen:d,onOpenChange:Ve=>{b?.(Ve),Ve||G?.()}}),U=S.useRef(null),ie=S.useRef(null),O=S.useId(),me=R.isOpen&&!x;S.useImperativeHandle(l,()=>oL(ie));const{triggerProps:Ce,tooltipProps:ye}=G6({isDisabled:x,trigger:k},R,U),{tooltipProps:Fe}=H6({isOpen:me,...on(i,ye)},R),{overlayProps:De,placement:Te,updatePosition:Xe}=w5({isOpen:me,targetRef:U,placement:h6(T),overlayRef:ie,offset:z?K+3:K,crossOffset:M,shouldFlip:P,containerPadding:_});Sh(()=>{B.length&&Xe()},B);const{overlayProps:lt}=Y_({isOpen:me,onClose:R.close,isDismissable:J,shouldCloseOnBlur:re,isKeyboardDismissDisabled:j,shouldCloseOnInteractOutside:Y},ie),_e=S.useMemo(()=>{var Ve,it,Ut;return pk({...s,disableAnimation:se,radius:(Ve=e?.radius)!=null?Ve:"md",size:(it=e?.size)!=null?it:"md",shadow:(Ut=e?.shadow)!=null?Ut:"sm"})},[tl(s),se,e?.radius,e?.size,e?.shadow]),mt=S.useCallback((Ve={},it=null)=>({...on(Ce,Ve),ref:pE(it,U),"aria-describedby":me?O:void 0}),[Ce,me,O,R]),pt=S.useCallback(()=>({ref:ie,"data-slot":"base","data-open":$e(me),"data-arrow":$e(z),"data-disabled":$e(x),"data-placement":Ik(Te||"top",T),...on(Fe,lt,q),style:on(De.style,q.style,i.style),className:_e.base({class:Z?.base}),id:O}),[_e,me,z,x,Te,T,Fe,lt,q,De,i,O]),Vt=S.useCallback(()=>({"data-slot":"content","data-open":$e(me),"data-arrow":$e(z),"data-disabled":$e(x),"data-placement":Ik(Te||"top",T),className:_e.content({class:tn(Z?.content,te)})}),[_e,me,z,x,Te,T,Z]);return{Component:V,content:h,children:m,isOpen:me,triggerRef:U,showArrow:z,portalContainer:ae,placement:T,disableAnimation:se,isDisabled:x,motionProps:ce,getTooltipContentProps:Vt,getTriggerProps:mt,getTooltipProps:pt}}var Y6=()=>no(()=>import("./index-CN_ylOby.js"),[]).then(e=>e.default),X_=li((e,t)=>{var n;const{Component:r,children:i,content:s,isOpen:l,portalContainer:c,placement:d,disableAnimation:h,motionProps:m,getTriggerProps:g,getTooltipProps:b,getTooltipContentProps:x}=q6({...e,ref:t});let k;try{if(S.Children.count(i)!==1)throw new Error;if(!S.isValidElement(i))k=D.jsx("p",{...g(),children:i});else{const K=i,M=(n=K.props.ref)!=null?n:K.ref;k=S.cloneElement(K,g(K.props,M))}}catch{k=D.jsx("span",{}),hL("Tooltip must have only one child node. Please, check your code.")}const{ref:P,id:_,style:T,...$}=b(),L=D.jsx("div",{ref:P,id:_,style:T,children:D.jsx($f.div,{animate:"enter",exit:"exit",initial:"exit",variants:Jg.scaleSpring,...on(m,$),style:{...p6(d)},children:D.jsx(r,{...x(),children:s})},`${_}-tooltip-inner`)},`${_}-tooltip-content`);return D.jsxs(D.Fragment,{children:[k,h?l&&D.jsx(rk,{portalContainer:c,children:D.jsx("div",{ref:P,id:_,style:T,...$,children:D.jsx(r,{...x(),children:s})})}):D.jsx(If,{features:Y6,children:D.jsx(Au,{children:l&&D.jsx(rk,{portalContainer:c,children:L})})})]})});X_.displayName="HeroUI.Tooltip";var X6=X_;function Q6(e={}){const{rerender:t=!1,delay:n=0}=e,r=S.useRef(!1),[i,s]=S.useState(!1);return S.useEffect(()=>{r.current=!0;let l=null;return t&&(n>0?l=setTimeout(()=>{s(!0)},n):s(!0)),()=>{r.current=!1,t&&s(!1),l&&clearTimeout(l)}},[t]),[S.useCallback(()=>r.current,[]),i]}function J6(e){let{value:t=0,minValue:n=0,maxValue:r=100,valueLabel:i,isIndeterminate:s,formatOptions:l={style:"percent"}}=e,c=_u(e,{labelable:!0}),{labelProps:d,fieldProps:h}=W_({...e,labelElementType:"span"});t=jg(t,n,r);let m=(t-n)/(r-n),g=EM(l);if(!s&&!i){let b=l.style==="percent"?m:t;i=g.format(b)}return{progressBarProps:Pn(c,{...h,"aria-valuenow":s?void 0:t,"aria-valuemin":n,"aria-valuemax":r,"aria-valuetext":s?void 0:i,role:"progressbar"}),labelProps:d}}function Z6(e){var t,n,r;const i=si(),[s,l]=na(e,hk.variantKeys),{ref:c,as:d,id:h,className:m,classNames:g,label:b,valueLabel:x,value:k=void 0,minValue:P=0,maxValue:_=100,strokeWidth:T,showValueLabel:$=!1,formatOptions:L={style:"percent"},...z}=s,K=d||"div",M=Ji(c),J=tn(g?.base,m),[,re]=Q6({rerender:!0,delay:100}),ae=((t=e.isIndeterminate)!=null?t:!0)&&k===void 0,j=(r=(n=e.disableAnimation)!=null?n:i?.disableAnimation)!=null?r:!1,{progressBarProps:B,labelProps:Y}=J6({id:h,label:b,value:k,minValue:P,maxValue:_,valueLabel:x,formatOptions:L,isIndeterminate:ae,"aria-labelledby":e["aria-labelledby"],"aria-label":e["aria-label"]}),te=S.useMemo(()=>hk({...l,disableAnimation:j,isIndeterminate:ae}),[tl(l),j,ae]),G=j?!0:re,ce=16,Z=T||(e.size==="sm"?2:3),q=16-Z,V=2*q*Math.PI,se=S.useMemo(()=>G?ae?.25:k?pL((k-P)/(_-P),1):0:0,[G,k,P,_,ae]),R=V-se*V,U=S.useCallback((ye={})=>({ref:M,"data-indeterminate":$e(ae),"data-disabled":$e(e.isDisabled),className:te.base({class:J}),...on(B,z,ye)}),[M,te,ae,e.isDisabled,J,B,z]),ie=S.useCallback((ye={})=>({className:te.label({class:g?.label}),...on(Y,ye)}),[te,g,Y]),O=S.useCallback((ye={})=>({viewBox:"0 0 32 32",fill:"none",strokeWidth:Z,className:te.svg({class:g?.svg}),...ye}),[Z,te,g]),me=S.useCallback((ye={})=>({cx:ce,cy:ce,r:q,role:"presentation",strokeDasharray:`${V} ${V}`,strokeDashoffset:R,transform:"rotate(-90 16 16)",strokeLinecap:"round",className:te.indicator({class:g?.indicator}),...ye}),[te,g,R,V,q]),Ce=S.useCallback((ye={})=>({cx:ce,cy:ce,r:q,role:"presentation",strokeDasharray:`${V} ${V}`,strokeDashoffset:0,transform:"rotate(-90 16 16)",strokeLinecap:"round",className:te.track({class:g?.track}),...ye}),[te,g,V,q]);return{Component:K,domRef:M,slots:te,classNames:g,label:b,showValueLabel:$,getProgressBarProps:U,getLabelProps:ie,getSvgProps:O,getIndicatorProps:me,getTrackProps:Ce}}var Q_=li((e,t)=>{const{Component:n,slots:r,classNames:i,label:s,showValueLabel:l,getProgressBarProps:c,getLabelProps:d,getSvgProps:h,getIndicatorProps:m,getTrackProps:g}=Z6({ref:t,...e}),b=c();return D.jsxs(n,{...b,children:[D.jsxs("div",{className:r.svgWrapper({class:i?.svgWrapper}),children:[D.jsxs("svg",{...h(),children:[D.jsx("circle",{...g()}),D.jsx("circle",{...m()})]}),l&&D.jsx("span",{className:r.value({class:i?.value}),children:b["aria-valuetext"]})]}),s&&D.jsx("span",{...d(),children:s})]})});Q_.displayName="HeroUI.CircularProgress";var J_=Q_;function ez(e,t){let{inputElementType:n="input",isDisabled:r=!1,isRequired:i=!1,isReadOnly:s=!1,type:l="text",validationBehavior:c="aria"}=e,[d,h]=Iu(e.value,e.defaultValue||"",e.onChange),{focusableProps:m}=xh(e,t),g=Jx({...e,value:d}),{isInvalid:b,validationErrors:x,validationDetails:k}=g.displayValidation,{labelProps:P,fieldProps:_,descriptionProps:T,errorMessageProps:$}=A6({...e,isInvalid:b,errorMessage:e.errorMessage||x}),L=_u(e,{labelable:!0});const z={type:l,pattern:e.pattern};return RE(t,d,h),U_(e,g,t),S.useEffect(()=>{if(t.current instanceof Zi(t.current).HTMLTextAreaElement){let K=t.current;Object.defineProperty(K,"defaultValue",{get:()=>K.value,set:()=>{},configurable:!0})}},[t]),{labelProps:P,inputProps:Pn(L,n==="input"?z:void 0,{disabled:r,readOnly:s,required:i&&c==="native","aria-required":i&&c==="aria"||void 0,"aria-invalid":b||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],"aria-controls":e["aria-controls"],value:d,onChange:K=>h(K.target.value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,[parseInt(We.version,10)>=17?"enterKeyHint":"enterkeyhint"]:e.enterKeyHint,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...m,..._}),descriptionProps:T,errorMessageProps:$,isInvalid:b,validationErrors:x,validationDetails:k}}function tz(e){var t,n,r,i,s,l,c;const d=si(),{validationBehavior:h}=Zx(ev)||{},[m,g]=na(e,vk.variantKeys),{ref:b,as:x,type:k,label:P,baseRef:_,wrapperRef:T,description:$,className:L,classNames:z,autoFocus:K,startContent:M,endContent:J,onClear:re,onChange:ae,validationState:j,validationBehavior:B=(t=h??d?.validationBehavior)!=null?t:"native",innerWrapperRef:Y,onValueChange:te=()=>{},...G}=m,ce=S.useCallback(Ye=>{te(Ye??"")},[te]),[Z,q]=S.useState(!1),V=x||"div",se=(r=(n=e.disableAnimation)!=null?n:d?.disableAnimation)!=null?r:!1,R=Ji(b),U=Ji(_),ie=Ji(T),O=Ji(Y),[me,Ce]=Iu(m.value,(i=m.defaultValue)!=null?i:"",ce),ye=k==="file",Fe=((c=(l=(s=R?.current)==null?void 0:s.files)==null?void 0:l.length)!=null?c:0)>0,De=["date","time","month","week","range"].includes(k),Te=!aL(me)||De||Fe,Xe=Te||Z,lt=k==="hidden",_e=e.isMultiline,mt=tn(z?.base,L,Te?"is-filled":""),pt=S.useCallback(()=>{var Ye;ye?R.current.value="":Ce(""),re?.(),(Ye=R.current)==null||Ye.focus()},[Ce,re,ye]);Sh(()=>{R.current&&Ce(R.current.value)},[R.current]);const{labelProps:Vt,inputProps:Ve,isInvalid:it,validationErrors:Ut,validationDetails:Zn,descriptionProps:ln,errorMessageProps:_t}=ez({...e,validationBehavior:B,autoCapitalize:e.autoCapitalize,value:me,"aria-label":e.label?e["aria-label"]:fE(e["aria-label"],e.placeholder),inputElementType:_e?"textarea":"input",onChange:Ce},R);ye&&(delete Ve.value,delete Ve.onChange);const{isFocusVisible:Rt,isFocused:Tn,focusProps:Cr}=Af({autoFocus:K,isTextInput:!0}),{isHovered:Nt,hoverProps:pe}=Cu({isDisabled:!!e?.isDisabled}),{isHovered:Se,hoverProps:Oe}=Cu({isDisabled:!!e?.isDisabled}),{focusProps:nt,isFocusVisible:at}=Af(),{focusWithinProps:Kt}=Sv({onFocusWithinChange:q}),{pressProps:Bn}=wu({isDisabled:!!e?.isDisabled||!!e?.isReadOnly,onPress:pt}),Qt=j==="invalid"||it,Pt=xF({labelPlacement:e.labelPlacement,label:P}),Er=typeof m.errorMessage=="function"?m.errorMessage({isInvalid:Qt,validationErrors:Ut,validationDetails:Zn}):m.errorMessage||Ut?.join(" "),Ft=!!re||e.isClearable,er=!!P||!!$||!!Er,an=!!m.placeholder,il=!!P,ps=!!$||!!Er,ui=Pt==="outside-left",ci=Pt==="outside-top",sa=Pt==="outside"||ui||ci,Lu=Pt==="inside",hs=R.current?(!R.current.value||R.current.value===""||!me||me==="")&&an:!1,zr=!!M,la=sa?ui||ci||an||Pt==="outside"&&zr:!1,aa=Pt==="outside"&&!an&&!zr,Jt=S.useMemo(()=>vk({...g,isInvalid:Qt,labelPlacement:Pt,isClearable:Ft,disableAnimation:se}),[tl(g),Qt,Pt,Ft,zr,se]),ms=S.useCallback((Ye={})=>({ref:U,className:Jt.base({class:mt}),"data-slot":"base","data-filled":$e(Te||an||zr||hs||ye),"data-filled-within":$e(Xe||an||zr||hs||ye),"data-focus-within":$e(Z),"data-focus-visible":$e(Rt),"data-readonly":$e(e.isReadOnly),"data-focus":$e(Tn),"data-hover":$e(Nt||Se),"data-required":$e(e.isRequired),"data-invalid":$e(Qt),"data-disabled":$e(e.isDisabled),"data-has-elements":$e(er),"data-has-helper":$e(ps),"data-has-label":$e(il),"data-has-value":$e(!hs),"data-hidden":$e(lt),...Kt,...Ye}),[Jt,mt,Te,Tn,Nt,Se,Qt,ps,il,er,hs,zr,Z,Rt,Xe,an,Kt,lt,e.isReadOnly,e.isRequired,e.isDisabled]),gs=S.useCallback((Ye={})=>({"data-slot":"label",className:Jt.label({class:z?.label}),...on(Vt,Oe,Ye)}),[Jt,Se,Vt,z?.label]),Ao=S.useCallback(Ye=>{Ye.key==="Escape"&&me&&(Ft||re)&&!e.isReadOnly&&(Ce(""),re?.())},[me,Ce,re,Ft,e.isReadOnly]),ua=S.useCallback((Ye={})=>({"data-slot":"input","data-filled":$e(Te),"data-filled-within":$e(Xe),"data-has-start-content":$e(zr),"data-has-end-content":$e(!!J),"data-type":k,className:Jt.input({class:tn(z?.input,Te?"is-filled":"",_e?"pe-0":"",k==="password"?"[&::-ms-reveal]:hidden":"")}),...on(Cr,Ve,Cf(G,{enabled:!0,labelable:!0,omitEventNames:new Set(Object.keys(Ve))}),Ye),"aria-readonly":$e(e.isReadOnly),onChange:Ql(Ve.onChange,ae),onKeyDown:Ql(Ve.onKeyDown,Ye.onKeyDown,Ao),ref:R}),[Jt,me,Cr,Ve,G,Te,Xe,zr,J,z?.input,e.isReadOnly,e.isRequired,ae,Ao]),vs=S.useCallback((Ye={})=>({ref:ie,"data-slot":"input-wrapper","data-hover":$e(Nt||Se),"data-focus-visible":$e(Rt),"data-focus":$e(Tn),className:Jt.inputWrapper({class:tn(z?.inputWrapper,Te?"is-filled":"")}),...on(Ye,pe),onClick:io=>{R.current&&io.currentTarget===io.target&&R.current.focus()},style:{cursor:"text",...Ye.style}}),[Jt,Nt,Se,Rt,Tn,me,z?.inputWrapper]),ol=S.useCallback((Ye={})=>({...Ye,ref:O,"data-slot":"inner-wrapper",onClick:io=>{R.current&&io.currentTarget===io.target&&R.current.focus()},className:Jt.innerWrapper({class:tn(z?.innerWrapper,Ye?.className)})}),[Jt,z?.innerWrapper]),sl=S.useCallback((Ye={})=>({...Ye,"data-slot":"main-wrapper",className:Jt.mainWrapper({class:tn(z?.mainWrapper,Ye?.className)})}),[Jt,z?.mainWrapper]),ca=S.useCallback((Ye={})=>({...Ye,"data-slot":"helper-wrapper",className:Jt.helperWrapper({class:tn(z?.helperWrapper,Ye?.className)})}),[Jt,z?.helperWrapper]),Kf=S.useCallback((Ye={})=>({...Ye,...ln,"data-slot":"description",className:Jt.description({class:tn(z?.description,Ye?.className)})}),[Jt,z?.description]),Wf=S.useCallback((Ye={})=>({...Ye,..._t,"data-slot":"error-message",className:Jt.errorMessage({class:tn(z?.errorMessage,Ye?.className)})}),[Jt,_t,z?.errorMessage]),Hf=S.useCallback((Ye={})=>({...Ye,type:"button",tabIndex:-1,disabled:e.isDisabled,"aria-label":"clear input","data-slot":"clear-button","data-focus-visible":$e(at),className:Jt.clearButton({class:tn(z?.clearButton,Ye?.className)}),...on(Bn,nt)}),[Jt,at,Bn,nt,z?.clearButton]);return{Component:V,classNames:z,domRef:R,label:P,description:$,startContent:M,endContent:J,labelPlacement:Pt,isClearable:Ft,hasHelper:ps,hasStartContent:zr,isLabelOutside:la,isOutsideLeft:ui,isOutsideTop:ci,isLabelOutsideAsPlaceholder:aa,shouldLabelBeOutside:sa,shouldLabelBeInside:Lu,hasPlaceholder:an,isInvalid:Qt,errorMessage:Er,getBaseProps:ms,getLabelProps:gs,getInputProps:ua,getMainWrapperProps:sl,getInputWrapperProps:vs,getInnerWrapperProps:ol,getHelperWrapperProps:ca,getDescriptionProps:Kf,getErrorMessageProps:Wf,getClearButtonProps:Hf}}function Ab(){return Ab=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{Component:d,label:h,description:m,startContent:g,endContent:b,hasHelper:x,shouldLabelBeOutside:k,shouldLabelBeInside:P,isInvalid:_,errorMessage:T,getBaseProps:$,getLabelProps:L,getInputProps:z,getInnerWrapperProps:K,getInputWrapperProps:M,getHelperWrapperProps:J,getDescriptionProps:re,getErrorMessageProps:ae,isClearable:j,getClearButtonProps:B}=tz({...l,ref:c,isMultiline:!0}),[Y,te]=S.useState(t>1),[G,ce]=S.useState(!1),Z=h?D.jsx("label",{...L(),children:h}):null,q=z(),V=(me,Ce)=>{if(t===1&&te(me>=Ce.rowHeight*2),n>t){const ye=me>=n*Ce.rowHeight;ce(ye)}s?.(me,Ce)},se=i?D.jsx("textarea",{...q,style:on(q.style,e??{})}):D.jsx(yz,{...q,cacheMeasurements:r,"data-hide-scroll":$e(!G),maxRows:n,minRows:t,style:on(q.style,e??{}),onHeightChange:V}),R=S.useMemo(()=>j?D.jsx("button",{...B(),children:D.jsx(GO,{})}):null,[j,B]),U=S.useMemo(()=>g||b?D.jsxs("div",{...K(),children:[g,se,b]}):D.jsx("div",{...K(),children:se}),[g,q,b,K]),ie=_&&T,O=ie||m;return D.jsxs(d,{...$(),children:[k?Z:null,D.jsxs("div",{...M(),"data-has-multiple-rows":$e(Y),children:[P?Z:null,U,R]}),x&&O?D.jsx("div",{...J(),children:ie?D.jsx("div",{...ae(),children:T}):D.jsx("div",{...re(),children:m})}):null]})});Z_.displayName="HeroUI.Textarea";var bz=Z_;function xz(e,t){let{role:n="dialog"}=e,r=K0();r=e["aria-label"]?void 0:r;let i=S.useRef(!1);return S.useEffect(()=>{if(t.current&&!t.current.contains(document.activeElement)){ku(t.current);let s=setTimeout(()=>{document.activeElement===t.current&&(i.current=!0,t.current&&(t.current.blur(),ku(t.current)),i.current=!1)},500);return()=>{clearTimeout(s)}}},[t]),p_(),{dialogProps:{..._u(e,{labelable:!0}),role:n,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||r,onBlur:s=>{i.current&&s.stopPropagation()}},titleProps:{id:r}}}function wz(e){var t,n;const r=si(),[i,s]=na(e,bk.variantKeys),{ref:l,as:c,src:d,className:h,classNames:m,loading:g,isBlurred:b,fallbackSrc:x,isLoading:k,disableSkeleton:P=!!x,removeWrapper:_=!1,onError:T,onLoad:$,srcSet:L,sizes:z,crossOrigin:K,...M}=i,J=g6({src:d,loading:g,onError:T,onLoad:$,ignoreFallback:!1,srcSet:L,sizes:z,crossOrigin:K,shouldBypassImageLoad:c!==void 0}),re=(n=(t=e.disableAnimation)!=null?t:r?.disableAnimation)!=null?n:!1,ae=J==="loaded"&&!k,j=J==="loading"||k,B=e.isZoomed,Y=c||"img",te=Ji(l),{w:G,h:ce}=S.useMemo(()=>({w:i.width?typeof i.width=="number"?`${i.width}px`:i.width:"fit-content",h:i.height?typeof i.height=="number"?`${i.height}px`:i.height:"auto"}),[i?.width,i?.height]),Z=(!d||!ae)&&!!x,q=j&&!P,V=S.useMemo(()=>bk({...s,disableAnimation:re,showSkeleton:q}),[tl(s),re,q]),se=tn(h,m?.img),R=(O={})=>{const me=tn(se,O?.className);return{src:d,ref:te,"data-loaded":$e(ae),className:V.img({class:me}),loading:g,srcSet:L,sizes:z,crossOrigin:K,...M,style:{...M?.height&&{height:ce},...O.style,...M.style}}},U=S.useCallback(()=>{const O=Z?{backgroundImage:`url(${x})`}:{};return{className:V.wrapper({class:m?.wrapper}),style:{...O,maxWidth:G}}},[V,Z,x,m?.wrapper,G]),ie=S.useCallback(()=>({src:d,"aria-hidden":$e(!0),className:V.blurredImg({class:m?.blurredImg})}),[V,d,m?.blurredImg]);return{Component:Y,domRef:te,slots:V,classNames:m,isBlurred:b,disableSkeleton:P,fallbackSrc:x,removeWrapper:_,isZoomed:B,isLoading:j,getImgProps:R,getWrapperProps:U,getBlurredImgProps:ie}}var e2=li((e,t)=>{const{Component:n,domRef:r,slots:i,classNames:s,isBlurred:l,isZoomed:c,fallbackSrc:d,removeWrapper:h,disableSkeleton:m,getImgProps:g,getWrapperProps:b,getBlurredImgProps:x}=wz({...e,ref:t}),k=D.jsx(n,{ref:r,...g()});if(h)return k;const P=D.jsx("div",{className:i.zoomedWrapper({class:s?.zoomedWrapper}),children:k});return l?D.jsxs("div",{...b(),children:[c?P:k,S.cloneElement(k,x())]}):c||!m||d?D.jsxs("div",{...b(),children:[" ",c?P:k]}):k});e2.displayName="HeroUI.Image";var v0=e2,[Sz,t2]=dv({name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap all popover components within ` `"}),n2=li((e,t)=>{const{as:n,children:r,className:i,...s}=e,{slots:l,classNames:c,bodyId:d,setBodyMounted:h}=t2(),m=Ji(t),g=n||"div";return S.useEffect(()=>(h(!0),()=>h(!1)),[h]),D.jsx(g,{ref:m,className:l.body({class:tn(c?.body,i)}),id:d,...s,children:r})});n2.displayName="HeroUI.ModalBody";var kz=n2,Cz={enter:{scale:"var(--scale-enter)",y:"var(--slide-enter)",opacity:1,willChange:"auto",transition:{scale:{duration:.4,ease:Bp.ease},opacity:{duration:.4,ease:Bp.ease},y:{type:"spring",bounce:0,duration:.6}}},exit:{scale:"var(--scale-exit)",y:"var(--slide-exit)",opacity:0,willChange:"transform",transition:{duration:.3,ease:Bp.ease}}},ss=typeof document<"u"&&window.visualViewport,Ez=We.createContext(!1);function Pz(){return!1}function Tz(){return!0}function _z(e){return()=>{}}function Iz(){return typeof We.useSyncExternalStore=="function"?We.useSyncExternalStore(_z,Pz,Tz):S.useContext(Ez)}function $z(){let e=Iz(),[t,n]=S.useState(()=>e?{width:0,height:0}:Ok());return S.useEffect(()=>{let r=()=>{n(i=>{let s=Ok();return s.width===i.width&&s.height===i.height?i:s})};return ss?ss.addEventListener("resize",r):window.addEventListener("resize",r),()=>{ss?ss.removeEventListener("resize",r):window.removeEventListener("resize",r)}},[]),t}function Ok(){return{width:ss&&ss?.width||window.innerWidth,height:ss&&ss?.height||window.innerHeight}}var zk=()=>no(()=>import("./index-CN_ylOby.js"),[]).then(e=>e.default),r2=e=>{const{as:t,children:n,role:r="dialog",...i}=e,{Component:s,domRef:l,slots:c,classNames:d,motionProps:h,backdrop:m,closeButton:g,hideCloseButton:b,disableAnimation:x,getDialogProps:k,getBackdropProps:P,getCloseButtonProps:_,onClose:T}=t2(),$=t||s||"div",L=$z(),{dialogProps:z}=xz({role:r},l),K=S.isValidElement(g)?S.cloneElement(g,_()):D.jsx("button",{..._(),children:D.jsx(qO,{})}),M=S.useCallback(Y=>{Y.key==="Tab"&&Y.nativeEvent.isComposing&&(Y.stopPropagation(),Y.preventDefault())},[]),J=k(on(z,i)),re=D.jsxs($,{...J,onKeyDown:Ql(J.onKeyDown,M),children:[D.jsx(ok,{onDismiss:T}),!b&&K,typeof n=="function"?n(T):n,D.jsx(ok,{onDismiss:T})]}),ae=S.useMemo(()=>m==="transparent"?null:x?D.jsx("div",{...P()}):D.jsx(If,{features:zk,children:D.jsx($f.div,{animate:"enter",exit:"exit",initial:"exit",variants:Jg.fade,...P()})}),[m,x,P]),j={"--visual-viewport-height":L.height+"px"},B=x?D.jsx("div",{className:c.wrapper({class:d?.wrapper}),"data-slot":"wrapper",style:j,children:re}):D.jsx(If,{features:zk,children:D.jsx($f.div,{animate:"enter",className:c.wrapper({class:d?.wrapper}),"data-slot":"wrapper",exit:"exit",initial:"exit",variants:Cz,...h,style:j,children:re})});return D.jsxs("div",{tabIndex:-1,children:[ae,B]})};r2.displayName="HeroUI.ModalContent";var Az=r2;function Rz(e={shouldBlockScroll:!0},t,n){let{overlayProps:r,underlayProps:i}=Y_({...e,isOpen:t.isOpen,onClose:t.close},n);return sF({isDisabled:!t.isOpen||!e.shouldBlockScroll}),p_(),S.useEffect(()=>{if(t.isOpen&&n.current)return vF([n.current])},[t.isOpen,n]),{modalProps:Pn(r),underlayProps:i}}function Lz(e){var t,n,r;const i=si(),[s,l]=na(e,yk.variantKeys),{ref:c,as:d,className:h,classNames:m,isOpen:g,defaultOpen:b,onOpenChange:x,motionProps:k,closeButton:P,isDismissable:_=!0,hideCloseButton:T=!1,shouldBlockScroll:$=!0,portalContainer:L,isKeyboardDismissDisabled:z=!1,onClose:K,...M}=s,J=d||"section",re=Ji(c),ae=S.useRef(null),[j,B]=S.useState(!1),[Y,te]=S.useState(!1),G=(n=(t=e.disableAnimation)!=null?t:i?.disableAnimation)!=null?n:!1,ce=S.useId(),Z=S.useId(),q=S.useId(),V=q_({isOpen:g,defaultOpen:b,onOpenChange:Te=>{x?.(Te),Te||K?.()}}),{modalProps:se,underlayProps:R}=Rz({isDismissable:_,shouldBlockScroll:$,isKeyboardDismissDisabled:z},V,re),{buttonProps:U}=N_({onPress:V.close},ae),{isFocusVisible:ie,focusProps:O}=Af(),me=tn(m?.base,h),Ce=S.useMemo(()=>yk({...l,disableAnimation:G}),[tl(l),G]),ye=(Te={},Xe=null)=>{var lt;return{ref:dE(Xe,re),...on(se,M,Te),className:Ce.base({class:tn(me,Te.className)}),id:ce,"data-open":$e(V.isOpen),"data-dismissable":$e(_),"aria-modal":$e(!0),"data-placement":(lt=e?.placement)!=null?lt:"right","aria-labelledby":j?Z:void 0,"aria-describedby":Y?q:void 0}},Fe=S.useCallback((Te={})=>({className:Ce.backdrop({class:m?.backdrop}),...R,...Te}),[Ce,m,R]),De=()=>({role:"button",tabIndex:0,"aria-label":"Close","data-focus-visible":$e(ie),className:Ce.closeButton({class:m?.closeButton}),...on(U,O)});return{Component:J,slots:Ce,domRef:re,headerId:Z,bodyId:q,motionProps:k,classNames:m,isDismissable:_,closeButton:P,hideCloseButton:T,portalContainer:L,shouldBlockScroll:$,backdrop:(r=e.backdrop)!=null?r:"opaque",isOpen:V.isOpen,onClose:V.close,disableAnimation:G,setBodyMounted:te,setHeaderMounted:B,getDialogProps:ye,getBackdropProps:Fe,getCloseButtonProps:De}}var i2=li((e,t)=>{const{children:n,...r}=e,i=Lz({...r,ref:t}),s=D.jsx(yF,{portalContainer:i.portalContainer,children:n});return D.jsx(Sz,{value:i,children:i.disableAnimation&&i.isOpen?s:D.jsx(Au,{children:i.isOpen?s:null})})});i2.displayName="HeroUI.Modal";var Mz=i2;function Dz(e={}){const{id:t,defaultOpen:n,isOpen:r,onClose:i,onOpen:s,onChange:l=()=>{}}=e,c=$b(s),d=$b(i),[h,m]=Iu(r,n||!1,l),g=S.useId(),b=t||g,x=r!==void 0,k=S.useCallback(()=>{x||m(!1),d?.()},[x,d]),P=S.useCallback(()=>{x||m(!0),c?.()},[x,c]),_=S.useCallback(()=>{(h?k:P)()},[h,P,k]);return{isOpen:!!h,onOpen:P,onClose:k,onOpenChange:_,isControlled:x,getButtonProps:(T={})=>({...T,"aria-expanded":h,"aria-controls":b,onClick:Pf(T.onClick,_)}),getDisclosureProps:(T={})=>({...T,hidden:!h,id:b})}}function Nz(e){var t,n;const r=si(),[i,s]=na(e,gk.variantKeys),{as:l,children:c,isLoaded:d=!1,className:h,classNames:m,...g}=i,b=l||"div",x=(n=(t=e.disableAnimation)!=null?t:r?.disableAnimation)!=null?n:!1,k=S.useMemo(()=>gk({...s,disableAnimation:x}),[tl(s),x,c]),P=tn(m?.base,h);return{Component:b,children:c,slots:k,classNames:m,getSkeletonProps:($={})=>({"data-loaded":$e(d),className:k.base({class:tn(P,$?.className)}),...g}),getContentProps:($={})=>({className:k.content({class:tn(m?.content,$?.className)})})}}var o2=li((e,t)=>{const{Component:n,children:r,getSkeletonProps:i,getContentProps:s}=Nz({...e});return D.jsx(n,{ref:t,...i(),children:D.jsx("div",{...s(),children:r})})});o2.displayName="HeroUI.Skeleton";var Fz=o2;function Oz(e={}){const{domRef:t,isEnabled:n=!0,overflowCheck:r="vertical",visibility:i="auto",offset:s=0,onVisibilityChange:l,updateDeps:c=[]}=e,d=S.useRef(i);S.useEffect(()=>{const h=t?.current;if(!h||!n)return;const m=(x,k,P,_,T)=>{if(i==="auto"){const $=`${_}${cL(T)}Scroll`;k&&P?(h.dataset[$]="true",h.removeAttribute(`data-${_}-scroll`),h.removeAttribute(`data-${T}-scroll`)):(h.dataset[`${_}Scroll`]=k.toString(),h.dataset[`${T}Scroll`]=P.toString(),h.removeAttribute(`data-${_}-${T}-scroll`))}else{const $=k&&P?"both":k?_:P?T:"none";$!==d.current&&(l?.($),d.current=$)}},g=()=>{var x,k;const P=[{type:"vertical",prefix:"top",suffix:"bottom"},{type:"horizontal",prefix:"left",suffix:"right"}],_=h.querySelector('ul[data-slot="list"]'),T=+((x=_?.getAttribute("data-virtual-scroll-height"))!=null?x:h.scrollHeight),$=+((k=_?.getAttribute("data-virtual-scroll-top"))!=null?k:h.scrollTop);for(const{type:L,prefix:z,suffix:K}of P)if(r===L||r==="both"){const M=L==="vertical"?$>s:h.scrollLeft>s,J=L==="vertical"?$+h.clientHeight+s{["top","bottom","top-bottom","left","right","left-right"].forEach(x=>{h.removeAttribute(`data-${x}-scroll`)})};return g(),h.addEventListener("scroll",g,!0),i!=="auto"&&(b(),i==="both"?(h.dataset.topBottomScroll=String(r==="vertical"),h.dataset.leftRightScroll=String(r==="horizontal")):(h.dataset.topBottomScroll="false",h.dataset.leftRightScroll="false",["top","bottom","left","right"].forEach(x=>{h.dataset[`${x}Scroll`]=String(i===x)}))),()=>{h.removeEventListener("scroll",g,!0),b()}},[...c,n,i,r,l,t])}function zz(e){var t;const[n,r]=na(e,mk.variantKeys),{ref:i,as:s,children:l,className:c,style:d,size:h=40,offset:m=0,visibility:g="auto",isEnabled:b=!0,onVisibilityChange:x,...k}=n,P=s||"div",_=Ji(i);Oz({domRef:_,offset:m,visibility:g,isEnabled:b,onVisibilityChange:x,updateDeps:[l],overflowCheck:(t=e.orientation)!=null?t:"vertical"});const T=S.useMemo(()=>mk({...r,className:c}),[tl(r),c]);return{Component:P,styles:T,domRef:_,children:l,getBaseProps:(L={})=>{var z;return{ref:_,className:T,"data-orientation":(z=e.orientation)!=null?z:"vertical",style:{"--scroll-shadow-size":`${h}px`,...d,...L.style},...k,...L}}}}var s2=li((e,t)=>{const{Component:n,children:r,getBaseProps:i}=zz({...e,ref:t});return D.jsx(n,{...i(),children:r})});s2.displayName="HeroUI.ScrollShadow";var l2=s2;const KG={Like:"like",Dislike:"dislike"},jz={Start:"START"},wf={User:"user",Assistant:"assistant"},lf={Pending:"pending",InProgress:"in_progress",Completed:"completed"};class a2{constructor(t={}){if(this.chunkQueue=new Map,this.baseUrl=t.baseUrl??"",this.auth=t.auth,this.baseUrl.endsWith("/")&&(this.baseUrl=this.baseUrl.slice(0,-1)),!!this.baseUrl)try{new URL(this.baseUrl)}catch{throw new Error(`Invalid base URL: ${this.baseUrl}. Please provide a valid URL.`)}}getBaseUrl(){return this.baseUrl}_buildApiUrl(t){return`${this.baseUrl}${t}`}async _makeRequest(t,n={}){const i={...{"Content-Type":"application/json"},...this.normalizeHeaders(n.headers)};this.auth?.getToken&&(i.Authorization=`Bearer ${this.auth.getToken()}`);const s=await fetch(t,{...n,headers:i});if(s.status===401&&this.auth?.onUnauthorized?.(),!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return s}async makeRequest(t,...n){const r=n[0],{method:i="GET",body:s,pathParams:l,queryParams:c,headers:d={},...h}=r||{},m={method:i,headers:d,...h};s&&i!=="GET"&&(m.body=typeof s=="string"?s:JSON.stringify(s));let g=t.toString();if(l&&(g=g.replace(/:([^/]+)/g,(x,k)=>{if(k in l){const P=l[k];return encodeURIComponent(String(P))}else throw new Error(`Path parameter ${k} is required`)})),c&&Object.keys(c).length>0){const x=new URLSearchParams;for(const[k,P]of Object.entries(c))P!=null&&x.append(k,String(P));g+=`?${x.toString()}`}return g=this._buildApiUrl(g),(await this._makeRequest(g,m)).json()}makeStreamRequest(t,n,r,i,s){let l=!1;const c=async h=>{const m=h.body?.pipeThrough(new TextDecoderStream).getReader();if(!m)throw new Error("Response body is null");let g="";for(;!l&&!i?.aborted;)try{const{value:b,done:x}=await m.read();if(x){r.onClose?.();break}g+=b;const k=g.split(`
+`);g=k.pop()??"";for(const P of k)if(P.startsWith("data: "))try{const _=P.replace("data: ","").trim(),T=JSON.parse(_);if(T.type==="chunked_content"){this.handleChunkedContent(T,r);continue}await r.onMessage(T),await new Promise($=>setTimeout($,0))}catch(_){console.error("Error parsing JSON:",_),await r.onError(new Error("Error processing server response"))}}catch(b){if(i?.aborted)return;console.error("Stream error:",b),await r.onError(new Error("Error reading stream"));break}},d=async()=>{try{const m={...{"Content-Type":"application/json",Accept:"text/event-stream"},...s};this.auth?.getToken&&(m.Authorization=`Bearer ${this.auth.getToken()}`);const g=await fetch(this._buildApiUrl(t.toString()),{method:"POST",headers:m,body:JSON.stringify(n),signal:i});if(g.status===401&&this.auth?.onUnauthorized?.(),!g.ok)throw new Error(`HTTP error! status: ${g.status}`);await c(g)}catch(h){if(i?.aborted)return;console.error("Request error:",h);const m=h instanceof Error?h.message:"Error connecting to server";await r.onError(new Error(m))}};try{d()}catch(h){const m=h instanceof Error?h.message:"Failed to start stream";r.onError(new Error(m))}return()=>{l=!0}}normalizeHeaders(t){return t?t instanceof Headers?Object.fromEntries(t.entries()):Array.isArray(t)?Object.fromEntries(t):t:{}}async handleChunkedContent(t,n){const i=t.content,{content_type:s,id:l,chunk_index:c,total_chunks:d,mime_type:h,data:m}=i;this.chunkQueue.has(l)||this.chunkQueue.set(l,{chunks:new Map,totalChunks:d,mimeType:h});const g=this.chunkQueue.get(l);if(g.chunks.set(c,m),g.chunks.size!==d)return;const x=Array.from({length:d},(k,P)=>g.chunks.get(P)).join("");try{atob(x)}catch(k){this.chunkQueue.delete(l),console.error("❌ Invalid base64 data: ",k),await n.onError(new Error("Error reading stream"))}if(s==="image"){const k={type:"image",content:{id:l,url:`${g.mimeType},${x}`}};await n.onMessage(k)}this.chunkQueue.delete(l)}}const u2=S.createContext(null);function Bz({children:e,...t}){const n=S.useMemo(()=>new a2(t),[t]),r=S.useMemo(()=>({client:n}),[n]);return D.jsx(u2.Provider,{value:r,children:e})}function c2(){const e=S.useContext(u2);if(!e)throw new Error("useRagbitsContext must be used within a RagbitsProvider");return e}function Vz(e,t){const{client:n}=c2(),[r,i]=S.useState(null),[s,l]=S.useState(null),[c,d]=S.useState(!1),h=S.useRef(null),m=S.useCallback(()=>{if(!h.current)return null;h.current.abort(),h.current=null,d(!1)},[]),g=S.useCallback(async(...x)=>{const k=x[0];h.current&&c&&h.current.abort();const P=new AbortController;h.current=P,d(!0),l(null);try{const T={...{...t,...k||{},headers:{...t?.headers,...k?.headers||{}}},signal:P.signal},$=await n.makeRequest(e,T);return P.signal.aborted||(i($),h.current=null),$}catch(_){if(!P.signal.aborted){const T=_ instanceof Error?_:new Error("API call failed");throw l(T),h.current=null,T}throw _}finally{P.signal.aborted||d(!1)}},[n,e,t,c]),b=S.useCallback(()=>{m(),i(null),l(null),d(!1)},[m]);return{data:r,error:s,isLoading:c,call:g,reset:b,abort:m}}var Eo=(e=>(e.LIGHT="light",e.DARK="dark",e))(Eo||{});const f2=S.createContext(null),Uz="🐰",Kz="Ragbits Chat",Wz="by deepsense.ai",Hz="Loading...",d2="";function Gz(){return window.matchMedia("(prefers-color-scheme: dark)").matches?Eo.DARK:Eo.LIGHT}function jk(){const e=window.localStorage.getItem("theme");return e===Eo.DARK||e===Eo.LIGHT?e:Gz()}function qz(e){return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}const Yz=({children:e})=>{const t=S.useSyncExternalStore(qz,jk,jk),n=S.useRef(!1),r=new a2({baseUrl:d2});S.useEffect(()=>{if(n.current)return;(async()=>{try{const c=r.getBaseUrl(),d=await fetch(`${c}/api/theme`);if(d.ok){const h=await d.text(),m=document.getElementById("heroui-custom-theme");m&&m.remove();const g=document.createElement("style");g.id="heroui-custom-theme",g.textContent=h,document.head.appendChild(g),console.log("Custom HeroUI theme loaded successfully"),n.current=!0}}catch(c){console.warn("No custom theme available:",c),n.current=!0}})()},[]),S.useEffect(()=>{document.documentElement.classList.toggle("dark",t===Eo.DARK)},[t]);const i=S.useCallback(l=>{window.localStorage.setItem("theme",l),window.dispatchEvent(new Event("storage"))},[]),s=S.useMemo(()=>({theme:t,setTheme:i}),[t,i]);return D.jsx(f2.Provider,{value:s,children:e})},p2=Object.freeze({left:0,top:0,width:16,height:16}),tv=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),tw=Object.freeze({...p2,...tv}),Rb=Object.freeze({...tw,body:"",hidden:!1});function Xz(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function Bk(e,t){const n=Xz(e,t);for(const r in Rb)r in tv?r in e&&!(r in n)&&(n[r]=tv[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function Qz(e,t){const n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function s(l){if(n[l])return i[l]=[];if(!(l in i)){i[l]=null;const c=r[l]&&r[l].parent,d=c&&s(c);d&&(i[l]=[c].concat(d))}return i[l]}return Object.keys(n).concat(Object.keys(r)).forEach(s),i}function Jz(e,t,n){const r=e.icons,i=e.aliases||Object.create(null);let s={};function l(c){s=Bk(r[c]||i[c],s)}return l(t),n.forEach(l),Bk(e,s)}function h2(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(i=>{t(i,null),n.push(i)});const r=Qz(e);for(const i in r){const s=r[i];s&&(t(i,Jz(e,i,s)),n.push(i))}return n}const Zz={provider:"",aliases:{},not_found:{},...p2};function y0(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function m2(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!y0(e,Zz))return null;const n=t.icons;for(const i in n){const s=n[i];if(!i||typeof s.body!="string"||!y0(s,Rb))return null}const r=t.aliases||Object.create(null);for(const i in r){const s=r[i],l=s.parent;if(!i||typeof l!="string"||!n[l]&&!r[l]||!y0(s,Rb))return null}return t}const g2=/^[a-z0-9]+(-[a-z0-9]+)*$/,kv=(e,t,n,r="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const c=i.pop(),d=i.pop(),h={provider:i.length>0?i[0]:r,prefix:d,name:c};return t&&!Mg(h)?null:h}const s=i[0],l=s.split("-");if(l.length>1){const c={provider:r,prefix:l.shift(),name:l.join("-")};return t&&!Mg(c)?null:c}if(n&&r===""){const c={provider:r,prefix:"",name:s};return t&&!Mg(c,n)?null:c}return null},Mg=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,Vk=Object.create(null);function e8(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function Rf(e,t){const n=Vk[e]||(Vk[e]=Object.create(null));return n[t]||(n[t]=e8(e,t))}function v2(e,t){return m2(t)?h2(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function t8(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let lh=!1;function y2(e){return typeof e=="boolean"&&(lh=e),lh}function Uk(e){const t=typeof e=="string"?kv(e,!0,lh):e;if(t){const n=Rf(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function n8(e,t){const n=kv(e,!0,lh);if(!n)return!1;const r=Rf(n.provider,n.prefix);return t?t8(r,n.name,t):(r.missing.add(n.name),!0)}function r8(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),lh&&!t&&!e.prefix){let i=!1;return m2(e)&&(e.prefix="",h2(e,(s,l)=>{n8(s,l)&&(i=!0)})),i}const n=e.prefix;if(!Mg({prefix:n,name:"a"}))return!1;const r=Rf(t,n);return!!v2(r,e)}const b2=Object.freeze({width:null,height:null}),x2=Object.freeze({...b2,...tv}),i8=/(-?[0-9.]*[0-9]+[0-9.]*)/g,o8=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Kk(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(i8);if(r===null||!r.length)return e;const i=[];let s=r.shift(),l=o8.test(s);for(;;){if(l){const c=parseFloat(s);isNaN(c)?i.push(s):i.push(Math.ceil(c*t*n)/n)}else i.push(s);if(s=r.shift(),s===void 0)return i.join("");l=!l}}function s8(e,t="defs"){let n="";const r=e.indexOf("<"+t);for(;r>=0;){const i=e.indexOf(">",r),s=e.indexOf(""+t);if(i===-1||s===-1)break;const l=e.indexOf(">",s);if(l===-1)break;n+=e.slice(i+1,s).trim(),e=e.slice(0,r).trim()+e.slice(l+1)}return{defs:n,content:e}}function l8(e,t){return e?""+e+" "+t:t}function a8(e,t,n){const r=s8(e);return l8(r.defs,t+r.content+n)}const u8=e=>e==="unset"||e==="undefined"||e==="none";function c8(e,t){const n={...tw,...e},r={...x2,...t},i={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,r].forEach(P=>{const _=[],T=P.hFlip,$=P.vFlip;let L=P.rotate;T?$?L+=2:(_.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),_.push("scale(-1 1)"),i.top=i.left=0):$&&(_.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),_.push("scale(1 -1)"),i.top=i.left=0);let z;switch(L<0&&(L-=Math.floor(L/4)*4),L=L%4,L){case 1:z=i.height/2+i.top,_.unshift("rotate(90 "+z.toString()+" "+z.toString()+")");break;case 2:_.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:z=i.width/2+i.left,_.unshift("rotate(-90 "+z.toString()+" "+z.toString()+")");break}L%2===1&&(i.left!==i.top&&(z=i.left,i.left=i.top,i.top=z),i.width!==i.height&&(z=i.width,i.width=i.height,i.height=z)),_.length&&(s=a8(s,''," "))});const l=r.width,c=r.height,d=i.width,h=i.height;let m,g;l===null?(g=c===null?"1em":c==="auto"?h:c,m=Kk(g,d/h)):(m=l==="auto"?d:l,g=c===null?Kk(m,h/d):c==="auto"?h:c);const b={},x=(P,_)=>{u8(_)||(b[P]=_.toString())};x("width",m),x("height",g);const k=[i.left,i.top,d,h];return b.viewBox=k.join(" "),{attributes:b,viewBox:k,body:s}}const f8=/\sid="(\S+)"/g,d8="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let p8=0;function h8(e,t=d8){const n=[];let r;for(;r=f8.exec(e);)n.push(r[1]);if(!n.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(s=>{const l=typeof t=="function"?t(s):t+(p8++).toString(),c=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+l+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}const Lb=Object.create(null);function m8(e,t){Lb[e]=t}function Mb(e){return Lb[e]||Lb[""]}function nw(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const rw=Object.create(null),wp=["https://api.simplesvg.com","https://api.unisvg.com"],Dg=[];for(;wp.length>0;)wp.length===1||Math.random()>.5?Dg.push(wp.shift()):Dg.push(wp.pop());rw[""]=nw({resources:["https://api.iconify.design"].concat(Dg)});function g8(e,t){const n=nw(t);return n===null?!1:(rw[e]=n,!0)}function iw(e){return rw[e]}const v8=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Wk=v8();function y8(e,t){const n=iw(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let i=0;n.resources.forEach(l=>{i=Math.max(i,l.length)});const s=t+".json?icons=";r=n.maxURL-i-n.path.length-s.length}return r}function b8(e){return e===404}const x8=(e,t,n)=>{const r=[],i=y8(e,t),s="icons";let l={type:s,provider:e,prefix:t,icons:[]},c=0;return n.forEach((d,h)=>{c+=d.length+1,c>=i&&h>0&&(r.push(l),l={type:s,provider:e,prefix:t,icons:[]},c=d.length),l.icons.push(d)}),r.push(l),r};function w8(e){if(typeof e=="string"){const t=iw(e);if(t)return t.path}return"/"}const S8=(e,t,n)=>{if(!Wk){n("abort",424);return}let r=w8(t.provider);switch(t.type){case"icons":{const s=t.prefix,c=t.icons.join(","),d=new URLSearchParams({icons:c});r+=s+".json?"+d.toString();break}case"custom":{const s=t.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let i=503;Wk(e+r).then(s=>{const l=s.status;if(l!==200){setTimeout(()=>{n(b8(l)?"abort":"next",l)});return}return i=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",i)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",i)})},k8={prepare:x8,send:S8};function C8(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,s)=>i.provider!==s.provider?i.provider.localeCompare(s.provider):i.prefix!==s.prefix?i.prefix.localeCompare(s.prefix):i.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return e.forEach(i=>{if(r.name===i.name&&r.prefix===i.prefix&&r.provider===i.provider)return;r=i;const s=i.provider,l=i.prefix,c=i.name,d=n[s]||(n[s]=Object.create(null)),h=d[l]||(d[l]=Rf(s,l));let m;c in h.icons?m=t.loaded:l===""||h.missing.has(c)?m=t.missing:m=t.pending;const g={provider:s,prefix:l,name:c};m.push(g)}),t}function w2(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(i=>i.id!==t))})}function E8(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,i=e.prefix;t.forEach(s=>{const l=s.icons,c=l.pending.length;l.pending=l.pending.filter(d=>{if(d.prefix!==i)return!0;const h=d.name;if(e.icons[h])l.loaded.push({provider:r,prefix:i,name:h});else if(e.missing.has(h))l.missing.push({provider:r,prefix:i,name:h});else return n=!0,!0;return!1}),l.pending.length!==c&&(n||w2([e],s.id),s.callback(l.loaded.slice(0),l.missing.slice(0),l.pending.slice(0),s.abort))})}))}let P8=0;function T8(e,t,n){const r=P8++,i=w2.bind(null,n,r);if(!t.pending.length)return i;const s={id:r,icons:t,callback:e,abort:i};return n.forEach(l=>{(l.loaderCallbacks||(l.loaderCallbacks=[])).push(s)}),i}function _8(e,t=!0,n=!1){const r=[];return e.forEach(i=>{const s=typeof i=="string"?kv(i,t,n):i;s&&r.push(s)}),r}var I8={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function $8(e,t,n,r){const i=e.resources.length,s=e.random?Math.floor(Math.random()*i):e.index;let l;if(e.random){let M=e.resources.slice(0);for(l=[];M.length>1;){const J=Math.floor(Math.random()*M.length);l.push(M[J]),M=M.slice(0,J).concat(M.slice(J+1))}l=l.concat(M)}else l=e.resources.slice(s).concat(e.resources.slice(0,s));const c=Date.now();let d="pending",h=0,m,g=null,b=[],x=[];typeof r=="function"&&x.push(r);function k(){g&&(clearTimeout(g),g=null)}function P(){d==="pending"&&(d="aborted"),k(),b.forEach(M=>{M.status==="pending"&&(M.status="aborted")}),b=[]}function _(M,J){J&&(x=[]),typeof M=="function"&&x.push(M)}function T(){return{startTime:c,payload:t,status:d,queriesSent:h,queriesPending:b.length,subscribe:_,abort:P}}function $(){d="failed",x.forEach(M=>{M(void 0,m)})}function L(){b.forEach(M=>{M.status==="pending"&&(M.status="aborted")}),b=[]}function z(M,J,re){const ae=J!=="success";switch(b=b.filter(j=>j!==M),d){case"pending":break;case"failed":if(ae||!e.dataAfterTimeout)return;break;default:return}if(J==="abort"){m=re,$();return}if(ae){m=re,b.length||(l.length?K():$());return}if(k(),L(),!e.random){const j=e.resources.indexOf(M.resource);j!==-1&&j!==e.index&&(e.index=j)}d="completed",x.forEach(j=>{j(re)})}function K(){if(d!=="pending")return;k();const M=l.shift();if(M===void 0){if(b.length){g=setTimeout(()=>{k(),d==="pending"&&(L(),$())},e.timeout);return}$();return}const J={status:"pending",resource:M,callback:(re,ae)=>{z(J,re,ae)}};b.push(J),h++,g=setTimeout(K,e.rotate),n(M,t,J.callback)}return setTimeout(K),T}function S2(e){const t={...I8,...e};let n=[];function r(){n=n.filter(c=>c().status==="pending")}function i(c,d,h){const m=$8(t,c,d,(g,b)=>{r(),h&&h(g,b)});return n.push(m),m}function s(c){return n.find(d=>c(d))||null}return{query:i,find:s,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:r}}function Hk(){}const b0=Object.create(null);function A8(e){if(!b0[e]){const t=iw(e);if(!t)return;const n=S2(t),r={config:t,redundancy:n};b0[e]=r}return b0[e]}function R8(e,t,n){let r,i;if(typeof e=="string"){const s=Mb(e);if(!s)return n(void 0,424),Hk;i=s.send;const l=A8(e);l&&(r=l.redundancy)}else{const s=nw(e);if(s){r=S2(s);const l=e.resources?e.resources[0]:"",c=Mb(l);c&&(i=c.send)}}return!r||!i?(n(void 0,424),Hk):r.query(t,i,n)().abort}function Gk(){}function L8(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,E8(e)}))}function M8(e){const t=[],n=[];return e.forEach(r=>{(r.match(g2)?t:n).push(r)}),{valid:t,invalid:n}}function Sp(e,t,n){function r(){const i=e.pendingIcons;t.forEach(s=>{i&&i.delete(s),e.icons[s]||e.missing.add(s)})}if(n&&typeof n=="object")try{if(!v2(e,n).length){r();return}}catch(i){console.error(i)}r(),L8(e)}function qk(e,t){e instanceof Promise?e.then(n=>{t(n)}).catch(()=>{t(null)}):t(e)}function D8(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,i=e.iconsToLoad;if(delete e.iconsToLoad,!i||!i.length)return;const s=e.loadIcon;if(e.loadIcons&&(i.length>1||!s)){qk(e.loadIcons(i,r,n),m=>{Sp(e,i,m)});return}if(s){i.forEach(m=>{const g=s(m,r,n);qk(g,b=>{const x=b?{prefix:r,icons:{[m]:b}}:null;Sp(e,[m],x)})});return}const{valid:l,invalid:c}=M8(i);if(c.length&&Sp(e,c,null),!l.length)return;const d=r.match(g2)?Mb(n):null;if(!d){Sp(e,l,null);return}d.prepare(n,r,l).forEach(m=>{R8(n,m,g=>{Sp(e,m.icons,g)})})}))}const k2=(e,t)=>{const n=_8(e,!0,y2()),r=C8(n);if(!r.pending.length){let d=!0;return t&&setTimeout(()=>{d&&t(r.loaded,r.missing,r.pending,Gk)}),()=>{d=!1}}const i=Object.create(null),s=[];let l,c;return r.pending.forEach(d=>{const{provider:h,prefix:m}=d;if(m===c&&h===l)return;l=h,c=m,s.push(Rf(h,m));const g=i[h]||(i[h]=Object.create(null));g[m]||(g[m]=[])}),r.pending.forEach(d=>{const{provider:h,prefix:m,name:g}=d,b=Rf(h,m),x=b.pendingIcons||(b.pendingIcons=new Set);x.has(g)||(x.add(g),i[h][m].push(g))}),s.forEach(d=>{const h=i[d.provider][d.prefix];h.length&&D8(d,h)}),t?T8(t,r,s):Gk};function N8(e,t){const n={...e};for(const r in t){const i=t[r],s=typeof i;r in b2?(i===null||i&&(s==="string"||s==="number"))&&(n[r]=i):s===typeof n[r]&&(n[r]=r==="rotate"?i%4:i)}return n}const F8=/[\s,]+/;function O8(e,t){t.split(F8).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function z8(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(e);return isNaN(i)?0:r(i)}else if(n!==e){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let s=parseFloat(e.slice(0,e.length-n.length));return isNaN(s)?0:(s=s/i,s%1===0?r(s):0)}}return t}function j8(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'"+e+" "}function B8(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/ /g,"%3E").replace(/\s+/g," ")}function V8(e){return"data:image/svg+xml,"+B8(e)}function U8(e){return'url("'+V8(e)+'")'}let Vp;function K8(){try{Vp=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Vp=null}}function W8(e){return Vp===void 0&&K8(),Vp?Vp.createHTML(e):e}const C2={...x2,inline:!1},H8={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},G8={display:"inline-block"},Db={backgroundColor:"currentColor"},E2={backgroundColor:"transparent"},Yk={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Xk={WebkitMask:Db,mask:Db,background:E2};for(const e in Xk){const t=Xk[e];for(const n in Yk)t[e+n]=Yk[n]}const q8={...C2,inline:!0};function Qk(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const Y8=(e,t,n)=>{const r=t.inline?q8:C2,i=N8(r,t),s=t.mode||"svg",l={},c=t.style||{},d={...s==="svg"?H8:{}};if(n){const _=kv(n,!1,!0);if(_){const T=["iconify"],$=["provider","prefix"];for(const L of $)_[L]&&T.push("iconify--"+_[L]);d.className=T.join(" ")}}for(let _ in t){const T=t[_];if(T!==void 0)switch(_){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":break;case"_ref":d.ref=T;break;case"className":d[_]=(d[_]?d[_]+" ":"")+T;break;case"inline":case"hFlip":case"vFlip":i[_]=T===!0||T==="true"||T===1;break;case"flip":typeof T=="string"&&O8(i,T);break;case"color":l.color=T;break;case"rotate":typeof T=="string"?i[_]=z8(T):typeof T=="number"&&(i[_]=T);break;case"ariaHidden":case"aria-hidden":T!==!0&&T!=="true"&&delete d["aria-hidden"];break;default:r[_]===void 0&&(d[_]=T)}}const h=c8(e,i),m=h.attributes;if(i.inline&&(l.verticalAlign="-0.125em"),s==="svg"){d.style={...l,...c},Object.assign(d,m);let _=0,T=t.id;return typeof T=="string"&&(T=T.replace(/-/g,"_")),d.dangerouslySetInnerHTML={__html:W8(h8(h.body,T?()=>T+"ID"+_++:"iconifyReact"))},S.createElement("svg",d)}const{body:g,width:b,height:x}=e,k=s==="mask"||(s==="bg"?!1:g.indexOf("currentColor")!==-1),P=j8(g,{...m,width:b+"",height:x+""});return d.style={...l,"--svg":U8(P),width:Qk(m.width),height:Qk(m.height),...G8,...k?Db:E2,...c},S.createElement("span",d)};y2(!0);m8("",k8);if(typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!r8(r))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const r="IconifyProviders["+n+"] is invalid.";try{const i=t[n];if(typeof i!="object"||!i||i.resources===void 0)continue;g8(n,i)||console.error(r)}catch{console.error(r)}}}}function P2(e){const[t,n]=S.useState(!!e.ssr),[r,i]=S.useState({});function s(x){if(x){const k=e.icon;if(typeof k=="object")return{name:"",data:k};const P=Uk(k);if(P)return{name:k,data:P}}return{name:""}}const[l,c]=S.useState(s(!!e.ssr));function d(){const x=r.callback;x&&(x(),i({}))}function h(x){if(JSON.stringify(l)!==JSON.stringify(x))return d(),c(x),!0}function m(){var x;const k=e.icon;if(typeof k=="object"){h({name:"",data:k});return}const P=Uk(k);if(h({name:k,data:P}))if(P===void 0){const _=k2([k],m);i({callback:_})}else P&&((x=e.onLoad)===null||x===void 0||x.call(e,k))}S.useEffect(()=>(n(!0),d),[]),S.useEffect(()=>{t&&m()},[e.icon,t]);const{name:g,data:b}=l;return b?Y8({...tw,...b},e,g):e.children?e.children:e.fallback?e.fallback:S.createElement("span",{})}const Ei=S.forwardRef((e,t)=>P2({...e,_ref:t}));S.forwardRef((e,t)=>P2({inline:!0,...e,_ref:t}));var Lp={exports:{}};/**
* @license
* Lodash
* Copyright OpenJS Foundation and other contributors
@@ -79,7 +79,7 @@ __p += '`),xt&&(we+=`' +
function print() { __p += __j.call(arguments, '') }
`:`;
`)+we+`return __p
-}`;var dt=Jw(function(){return wt(F,Ue+"return "+we).apply(n,H)});if(dt.source=we,Ty(dt))throw dt;return dt}function iR(u){return At(u).toLowerCase()}function oR(u){return At(u).toUpperCase()}function sR(u,f,y){if(u=At(u),u&&(y||f===n))return Zh(u);if(!u||!(f=vr(f)))return u;var E=Tr(u),I=Tr(f),F=em(E,I),H=fd(E,I)+1;return vo(E,F,H).join("")}function lR(u,f,y){if(u=At(u),u&&(y||f===n))return u.slice(0,Qu(u)+1);if(!u||!(f=vr(f)))return u;var E=Tr(u),I=fd(E,Tr(f))+1;return vo(E,0,I).join("")}function aR(u,f,y){if(u=At(u),u&&(y||f===n))return u.replace(ua,"");if(!u||!(f=vr(f)))return u;var E=Tr(u),I=em(E,Tr(f));return vo(E,I).join("")}function uR(u,f){var y=j,E=B;if(fn(f)){var I="separator"in f?f.separator:I;y="length"in f?ct(f.length):y,E="omission"in f?vr(f.omission):E}u=At(u);var F=u.length;if(ml(u)){var H=Tr(u);F=H.length}if(y>=F)return u;var Q=y-Ss(E);if(Q<1)return E;var oe=H?vo(H,0,Q).join(""):u.slice(0,Q);if(I===n)return oe+E;if(H&&(Q+=oe.length-Q),_y(I)){if(u.slice(Q).search(I)){var ge,ve=oe;for(I.global||(I=ba(I.source,At(io.exec(I))+"g")),I.lastIndex=0;ge=I.exec(ve);)var we=ge.index;oe=oe.slice(0,we===n?Q:we)}}else if(u.indexOf(vr(I),Q)!=Q){var Ie=oe.lastIndexOf(I);Ie>-1&&(oe=oe.slice(0,Ie))}return oe+E}function cR(u){return u=At(u),u&&sa.test(u)?u.replace(ui,om):u}var fR=Ds(function(u,f,y){return u+(y?" ":"")+f.toUpperCase()}),Ay=Fd("toUpperCase");function Qw(u,f,y){return u=At(u),f=y?n:f,f===n?Jv(u)?ny(u):Yv(u):u.match(f)||[]}var Jw=ut(function(u,f){try{return nr(u,n,f)}catch(y){return Ty(y)?y:new rt(y)}}),dR=Ki(function(u,f){return Vn(f,function(y){y=yi(y),Fi(u,y,ke(u[y],u))}),u});function pR(u){var f=u==null?0:u.length,y=Ge();return u=f?Lt(u,function(E){if(typeof E[1]!="function")throw new Br(l);return[y(E[0]),E[1]]}):[],ut(function(E){for(var I=-1;++IV)return[];var y=U,E=Un(u,U);f=Ge(f),u-=U;for(var I=cd(E,f);++y0||f<0)?new ot(y):(u<0?y=y.takeRight(-u):u&&(y=y.drop(u)),f!==n&&(f=ct(f),y=f<0?y.dropRight(-f):y.take(f-u)),y)},ot.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},ot.prototype.toArray=function(){return this.take(U)},$r(ot.prototype,function(u,f){var y=/^(?:filter|find|map|reject)|While$/.test(f),E=/^(?:head|last)$/.test(f),I=N[E?"take"+(f=="last"?"Right":""):f],F=E||/^find/.test(f);I&&(N.prototype[f]=function(){var H=this.__wrapped__,Q=E?[1]:arguments,oe=H instanceof ot,ge=Q[0],ve=oe||st(H),we=function(gt){var xt=I.apply(N,Fo([gt],Q));return E&&Ie?xt[0]:xt};ve&&y&&typeof ge=="function"&&ge.length!=1&&(oe=ve=!1);var Ie=this.__chain__,Ue=!!this.__actions__.length,Je=F&&!Ie,dt=oe&&!Ue;if(!F&&ve){H=dt?H:new ot(this);var Ze=u.apply(H,Q);return Ze.__actions__.push({func:xi,args:[we],thisArg:n}),new Kn(Ze,Ie)}return Je&&dt?u.apply(this,Q):(Ze=this.thru(we),Je?E?Ze.value()[0]:Ze.value():Ze)})}),Vn(["pop","push","shift","sort","splice","unshift"],function(u){var f=so[u],y=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",E=/^(?:pop|shift)$/.test(u);N.prototype[u]=function(){var I=arguments;if(E&&!this.__chain__){var F=this.value();return f.apply(st(F)?F:[],I)}return this[y](function(H){return f.apply(st(H)?H:[],I)})}}),$r(ot.prototype,function(u,f){var y=N[f];if(y){var E=y.name+"";St.call(Sl,E)||(Sl[E]=[]),Sl[E].push({name:f,func:y})}}),Sl[Fl(n,T).name]=[{name:"wrapper",func:n}],ot.prototype.clone=ac,ot.prototype.reverse=yd,ot.prototype.value=El,N.prototype.at=qc,N.prototype.chain=Bs,N.prototype.commit=Yc,N.prototype.next=lp,N.prototype.plant=xy,N.prototype.reverse=up,N.prototype.toJSON=N.prototype.valueOf=N.prototype.value=wy,N.prototype.first=N.prototype.head,ao&&(N.prototype[ao]=ap),N},gl=ry();Ai?((Ai.exports=gl)._=gl,va._=gl):Ht._=gl}).call(X8)}(Lp,Lp.exports)),Lp.exports}var T2=Q8();class J8{plugins={};activePlugins=[];listeners=new Set;register(t){this.plugins[t.name]={isActivated:!1,config:t},this.notify()}activate(t){const n=this.plugins[t];!n||n.isActivated||(n.isActivated=!0,n.config.onActivate&&n.config.onActivate(),this.produceActivePlugins(),this.notify())}deactivate(t){const n=this.plugins[t];!n||!n.isActivated||(n.isActivated=!1,n.config.onDeactivate&&n.config.onDeactivate(),this.produceActivePlugins(),this.notify())}isPluginActivated(t){const n=this.plugins[t];return!!n&&n.isActivated}getPlugin(t){const n=this.plugins[t];return!n||!n.isActivated?null:n}getActivePlugins(){return this.activePlugins}subscribe(t){return this.listeners.add(t),()=>this.listeners.delete(t)}notify(){this.listeners.forEach(t=>t())}produceActivePlugins(){this.activePlugins=T2.transform(this.plugins,(t,n)=>{n.isActivated&&t.push(n.config)},[])}}const xr=new J8;const _2="FeedbackFormPlugin",I2={name:_2,components:{FeedbackForm:S.lazy(()=>no(()=>import("./FeedbackForm-BPycljsV.js"),__vite__mapDeps([0,1,2,3,4,5,6])))}},$2="ChatOptionsPlugin",A2={name:$2,components:{ChatOptionsForm:S.lazy(()=>no(()=>import("./ChatOptionsForm-x2g6iEPU.js"),__vite__mapDeps([7,1,2,3,4,5,6])))}},R2=S.createContext(void 0),L2="SharePluginName",M2={name:L2,components:{ShareButton:S.lazy(()=>no(()=>import("./ShareButton-DS3Dsf4s.js"),__vite__mapDeps([8,6])))}},Zk=e=>{let t;const n=new Set,r=(h,m)=>{const g=typeof h=="function"?h(t):h;if(!Object.is(g,t)){const b=t;t=m??(typeof g!="object"||g===null)?g:Object.assign({},t,g),n.forEach(x=>x(t,b))}},i=()=>t,c={setState:r,getState:i,getInitialState:()=>d,subscribe:h=>(n.add(h),()=>n.delete(h))},d=t=e(r,i,c);return c},eC=e=>e?Zk(e):Zk,Z8=e=>e;function D2(e,t=Z8){const n=We.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return We.useDebugValue(n),n}const ur=[];for(let e=0;e<256;++e)ur.push((e+256).toString(16).slice(1));function e7(e,t=0){return(ur[e[t+0]]+ur[e[t+1]]+ur[e[t+2]]+ur[e[t+3]]+"-"+ur[e[t+4]]+ur[e[t+5]]+"-"+ur[e[t+6]]+ur[e[t+7]]+"-"+ur[e[t+8]]+ur[e[t+9]]+"-"+ur[e[t+10]]+ur[e[t+11]]+ur[e[t+12]]+ur[e[t+13]]+ur[e[t+14]]+ur[e[t+15]]).toLowerCase()}let x0;const t7=new Uint8Array(16);function n7(){if(!x0){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");x0=crypto.getRandomValues.bind(crypto)}return x0(t7)}const r7=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),tC={randomUUID:r7};function N2(e,t,n){if(tC.randomUUID&&!e)return tC.randomUUID();e=e||{};const r=e.random??e.rng?.()??n7();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,e7(r)}function i7(e){return Object.values(e).map(t=>({role:t.role,content:t.content,extra:t.extra||null}))}var F2=Symbol.for("immer-nothing"),nC=Symbol.for("immer-draftable"),Ti=Symbol.for("immer-state");function Po(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Lf=Object.getPrototypeOf;function Mf(e){return!!e&&!!e[Ti]}function Eu(e){return e?O2(e)||Array.isArray(e)||!!e[nC]||!!e.constructor?.[nC]||Ev(e)||Pv(e):!1}var o7=Object.prototype.constructor.toString();function O2(e){if(!e||typeof e!="object")return!1;const t=Lf(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===o7}function nv(e,t){Cv(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Cv(e){const t=e[Ti];return t?t.type_:Array.isArray(e)?1:Ev(e)?2:Pv(e)?3:0}function Nb(e,t){return Cv(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function z2(e,t,n){const r=Cv(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function s7(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Ev(e){return e instanceof Map}function Pv(e){return e instanceof Set}function fu(e){return e.copy_||e.base_}function Fb(e,t){if(Ev(e))return new Map(e);if(Pv(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=O2(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Ti];let i=Reflect.ownKeys(r);for(let s=0;s1&&(e.set=e.add=e.clear=e.delete=l7),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>ow(r,!0))),e}function l7(){Po(2)}function Tv(e){return Object.isFrozen(e)}var a7={};function Pu(e){const t=a7[e];return t||Po(0,e),t}var ah;function j2(){return ah}function u7(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function rC(e,t){t&&(Pu("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ob(e){zb(e),e.drafts_.forEach(c7),e.drafts_=null}function zb(e){e===ah&&(ah=e.parent_)}function iC(e){return ah=u7(ah,e)}function c7(e){const t=e[Ti];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function oC(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Ti].modified_&&(Ob(t),Po(4)),Eu(e)&&(e=rv(t,e),t.parent_||iv(t,e)),t.patches_&&Pu("Patches").generateReplacementPatches_(n[Ti].base_,e,t.patches_,t.inversePatches_)):e=rv(t,n,[]),Ob(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==F2?e:void 0}function rv(e,t,n){if(Tv(t))return t;const r=t[Ti];if(!r)return nv(t,(i,s)=>sC(e,r,t,i,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return iv(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let s=i,l=!1;r.type_===3&&(s=new Set(i),i.clear(),l=!0),nv(s,(c,d)=>sC(e,r,i,c,d,n,l)),iv(e,i,!1),n&&e.patches_&&Pu("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function sC(e,t,n,r,i,s,l){if(Mf(i)){const c=s&&t&&t.type_!==3&&!Nb(t.assigned_,r)?s.concat(r):void 0,d=rv(e,i,c);if(z2(n,r,d),Mf(d))e.canAutoFreeze_=!1;else return}else l&&n.add(i);if(Eu(i)&&!Tv(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;rv(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&iv(e,i)}}function iv(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ow(t,n)}function f7(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:j2(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,s=sw;n&&(i=[r],s=uh);const{revoke:l,proxy:c}=Proxy.revocable(i,s);return r.draft_=c,r.revoke_=l,c}var sw={get(e,t){if(t===Ti)return e;const n=fu(e);if(!Nb(n,t))return d7(e,n,t);const r=n[t];return e.finalized_||!Eu(r)?r:r===w0(e.base_,t)?(S0(e),e.copy_[t]=Bb(r,e)):r},has(e,t){return t in fu(e)},ownKeys(e){return Reflect.ownKeys(fu(e))},set(e,t,n){const r=B2(fu(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=w0(fu(e),t),s=i?.[Ti];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(s7(n,i)&&(n!==void 0||Nb(e.base_,t)))return!0;S0(e),jb(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return w0(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,S0(e),jb(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=fu(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Po(11)},getPrototypeOf(e){return Lf(e.base_)},setPrototypeOf(){Po(12)}},uh={};nv(sw,(e,t)=>{uh[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});uh.deleteProperty=function(e,t){return uh.set.call(this,e,t,void 0)};uh.set=function(e,t,n){return sw.set.call(this,e[0],t,n,e[0])};function w0(e,t){const n=e[Ti];return(n?fu(n):e)[t]}function d7(e,t,n){const r=B2(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}function B2(e,t){if(!(t in e))return;let n=Lf(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Lf(n)}}function jb(e){e.modified_||(e.modified_=!0,e.parent_&&jb(e.parent_))}function S0(e){e.copy_||(e.copy_=Fb(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var p7=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const s=n;n=t;const l=this;return function(d=s,...h){return l.produce(d,m=>n.call(this,m,...h))}}typeof n!="function"&&Po(6),r!==void 0&&typeof r!="function"&&Po(7);let i;if(Eu(t)){const s=iC(this),l=Bb(t,void 0);let c=!0;try{i=n(l),c=!1}finally{c?Ob(s):zb(s)}return rC(s,r),oC(i,s)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===F2&&(i=void 0),this.autoFreeze_&&ow(i,!0),r){const s=[],l=[];Pu("Patches").generateReplacementPatches_(t,i,s,l),r(s,l)}return i}else Po(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(l,...c)=>this.produceWithPatches(l,d=>t(d,...c));let r,i;return[this.produce(t,n,(l,c)=>{r=l,i=c}),r,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Eu(e)||Po(8),Mf(e)&&(e=h7(e));const t=iC(this),n=Bb(e,void 0);return n[Ti].isManual_=!0,zb(t),n}finishDraft(e,t){const n=e&&e[Ti];(!n||!n.isManual_)&&Po(9);const{scope_:r}=n;return rC(r,t),oC(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=Pu("Patches").applyPatches_;return Mf(e)?r(e,t):this.produce(e,i=>r(i,t))}};function Bb(e,t){const n=Ev(e)?Pu("MapSet").proxyMap_(e,t):Pv(e)?Pu("MapSet").proxySet_(e,t):f7(e,t);return(t?t.scope_:j2()).drafts_.push(n),n}function h7(e){return Mf(e)||Po(10,e),V2(e)}function V2(e){if(!Eu(e)||Tv(e))return e;const t=e[Ti];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Fb(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Fb(e,!0);return nv(n,(r,i)=>{z2(n,r,V2(i))}),t&&(t.finalized_=!1),n}var _i=new p7,kh=_i.produce;_i.produceWithPatches.bind(_i);_i.setAutoFreeze.bind(_i);_i.setUseStrictShallowCopy.bind(_i);_i.applyPatches.bind(_i);_i.createDraft.bind(_i);_i.finishDraft.bind(_i);const m7=e=>(t,n,r)=>(r.setState=(i,s,...l)=>{const c=typeof i=="function"?kh(i):i;return t(c,s,...l)},e(r.setState,n,r)),g7=m7,v7=({content:e},t)=>{t.serverState=e},y7=({content:e},t,n)=>{const r=n.conversationIdRef.current;return t.conversationId=e.conversation_id,n.conversationIdRef.current=e.conversation_id,{originalConversationId:r}},b7=(e,t,{originalConversationId:n,conversationIdRef:r})=>{const i=t.conversations[n];if(!i)throw new Error("Received events for non-existent conversation");t.conversations[r.current]=i,t.currentConversation===n&&(t.currentConversation=r.current),delete t.conversations[n]},x7=({content:e},t)=>{t.followupMessages=e.messages},w7=({content:e},t)=>{t.summary=e.summary},S7=(e,t,n)=>{const r=t.history[n.messageId];r.content+=e.content.text},k7=(e,t,n)=>{const r=t.history[n.messageId];r.references=[...r.references??[],e.content]},C7=(e,t,n)=>{const r=t.history[n.messageId];r.serverId=e.content.message_id},E7=(e,t,n)=>{const r=t.history[n.messageId],{update_id:i,content:s,type:l}=e.content,c=kh(r.liveUpdates??{},d=>{l===jz.Start&&i in d&&console.error(`Got duplicate start event for update_id: ${i}. Ignoring the event.`),d[i]=s});r.liveUpdates=c},P7=(e,t,n)=>{const r=t.history[n.messageId],i=e.content;r.images=kh(r.images??{},s=>{s[i.id]&&console.error(`Got duplicate image event for image_id: ${i.id}. Ignoring the event.`),s[i.id]=i.url})},T7=(e,t,n)=>{const r=t.history[n.messageId];t.history[n.messageId]={id:r.id,role:r.role,content:""}},_7=(e,t,n)=>{const r=t.history[n.messageId];r.usage=e.content.usage},I7=({content:e},t,n)=>{const r=t.history[n.messageId],i=r.tasks??[],s=e.task,l=kh(i,c=>{const d=c.findIndex(h=>h.id===s.id);d===-1?c.push(s):c[d]=s});r.tasks=l};class $7{handlers=new Map;register(t,n){this.handlers.has(t)&&console.warn(`Handler for ${String(t)} already registered - overwriting.`),this.handlers.set(t,n)}get(t){const n=this.handlers.get(t);return n||(console.warn(`No handler registered for type: ${String(t)}`),console.warn("Continuing with empty handler..."),{handle:()=>{},after:()=>{}})}}const Ii=new $7;Ii.register("state_update",{handle:v7});Ii.register("conversation_id",{handle:y7,after:b7});Ii.register("followup_messages",{handle:x7});Ii.register("text",{handle:S7});Ii.register("reference",{handle:k7});Ii.register("message_id",{handle:C7});Ii.register("live_update",{handle:E7});Ii.register("image",{handle:P7});Ii.register("clear_message",{handle:T7});Ii.register("usage",{handle:_7});Ii.register("todo_item",{handle:I7});Ii.register("conversation_summary",{handle:w7});const U2="temp-",K2=()=>`${U2}${N2()}`,Vb=()=>({history:{},followupMessages:null,serverState:null,conversationId:K2(),eventsLog:[],lastMessageId:null,context:void 0,chatOptions:void 0,isLoading:!1,abortController:null}),A7=()=>{const e=Vb();return{conversations:{[e.conversationId]:e},currentConversation:e.conversationId}},is=(e,t)=>n=>{const r=n.conversations[e];if(!r)throw new Error(`Conversation with ID '${e}' does not exist`);t(r)},lC=e=>e.startsWith(U2),aC=g7((e,t)=>({...A7(),computed:{getContext:()=>{const{primitives:{getCurrentConversation:n}}=t(),r=n(),{serverState:i,conversationId:s,chatOptions:l}=r;return{...i??{},...s&&!lC(r.conversationId)?{conversation_id:s}:{},...l?{user_settings:l}:{}}}},_internal:{_hasHydrated:!1,_setHasHydrated:n=>{e(r=>{r._internal._hasHydrated=n})},handleResponse:(n,r,i)=>{let s;const l=Ii.get(i.type);e(is(n.current,c=>{if(!c.history[r])throw new Error(`Message ID ${r} not found in history`);s=l.handle(i,c,{conversationIdRef:n,messageId:r})})),e(c=>{l.after?.(i,c,{conversationIdRef:n,messageId:r,...s})}),e(is(n.current,c=>{c.eventsLog[c.eventsLog.length-1].push(i)}))}},primitives:{getCurrentConversation:()=>{const{currentConversation:n,conversations:r}=t(),i=r[n];if(!i)throw new Error("Tried to get conversation that doesn't exist.");return i},restore:(n,r,i,s)=>{const l=K2(),c={...Vb(),followupMessages:r,chatOptions:i,serverState:s,history:n,conversationId:l},d=Object.values(n).filter(h=>h.role!==wf.User);c.eventsLog=d.map(()=>[]),e(h=>{h.conversations[l]=c,h.currentConversation=l})},addMessage:(n,r)=>{const i=N2(),s={...r,id:i};return e(is(n,l=>{l.followupMessages=null,l.lastMessageId=i,l.history[i]=s})),i},deleteMessage:(n,r)=>{e(is(n,i=>{const{history:s}=i,l=Object.keys(s);l.at(-1)===r&&(i.lastMessageId=l.at(-2)??null),delete i.history[r]}))},stopAnswering:n=>{const r=t().conversations[n];if(!r)throw new Error("Tried to stop answering for conversation that doesn't exist");r.abortController?.abort(),e(is(n,i=>{i.abortController=null,i.isLoading=!1}))}},actions:{selectConversation:n=>{e(r=>{if(r.currentConversation===n)return;if(!r.conversations[n])throw new Error(`Tried to select conversation that doesn't exist, id: ${n}`);r.currentConversation=n})},deleteConversation:n=>{const{actions:{newConversation:r},primitives:{stopAnswering:i},currentConversation:s}=t();if(i(n),e(l=>{delete l.conversations[n]}),n===s)return r()},mergeExtensions:(n,r)=>{const{currentConversation:i}=t();e(is(i,s=>{if(!(n in s.history))throw new Error("Attempted to set extensions for a message that does not exist.");const l=s.history[n];l.extensions={...l.extensions,...r},s.history[n]=l}))},initializeChatOptions:n=>{const{currentConversation:r}=t();e(is(r,i=>{const s=i.chatOptions??{};Object.keys(s).forEach(l=>{l in n||delete s[l]}),Object.keys(n).forEach(l=>{l in s||(s[l]=n[l])}),i.chatOptions=s}))},setConversationProperties:(n,r)=>{e(is(n,i=>{Object.assign(i,r)}))},stopAnswering:()=>{const{currentConversation:n,primitives:{stopAnswering:r}}=t();r(n)},newConversation:()=>{const n=Vb();return e(r=>{r.conversations[n.conversationId]=n,r.currentConversation=n.conversationId,r.conversations=T2.omitBy(r.conversations,i=>lC(i.conversationId)&&i.conversationId!==r.currentConversation)}),n.conversationId},sendMessage:(n,r)=>{const{_internal:{handleResponse:i},primitives:{addMessage:s,getCurrentConversation:l,stopAnswering:c},computed:{getContext:d}}=t(),{history:h,conversationId:m}=l();s(m,{role:wf.User,content:n});const g=s(m,{role:wf.Assistant,content:""}),b={message:n,history:i7(h),context:d()};e(is(m,P=>{P.eventsLog.push([])}));const x=new AbortController,k={current:m};e(is(m,P=>{P.abortController=x,P.isLoading=!0})),r.makeStreamRequest("/api/chat",b,{onMessage:P=>i(k,g,P),onError:P=>{i(k,g,{type:"text",content:{text:P.message}}),c(k.current)},onClose:()=>{c(k.current)}},x.signal)}}}));function W2(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var s;const l=d=>d===null?null:JSON.parse(d,void 0),c=(s=n.getItem(i))!=null?s:null;return c instanceof Promise?c.then(l):l(c)},setItem:(i,s)=>n.setItem(i,JSON.stringify(s,void 0)),removeItem:i=>n.removeItem(i)}}const Ub=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return Ub(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Ub(r)(n)}}}},R7=(e,t)=>(n,r,i)=>{let s={storage:W2(()=>localStorage),partialize:P=>P,version:0,merge:(P,_)=>({..._,...P}),...t},l=!1;const c=new Set,d=new Set;let h=s.storage;if(!h)return e((...P)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),n(...P)},r,i);const m=()=>{const P=s.partialize({...r()});return h.setItem(s.name,{state:P,version:s.version})},g=i.setState;i.setState=(P,_)=>{g(P,_),m()};const b=e((...P)=>{n(...P),m()},r,i);i.getInitialState=()=>b;let x;const k=()=>{var P,_;if(!h)return;l=!1,c.forEach($=>{var L;return $((L=r())!=null?L:b)});const T=((_=s.onRehydrateStorage)==null?void 0:_.call(s,(P=r())!=null?P:b))||void 0;return Ub(h.getItem.bind(h))(s.name).then($=>{if($)if(typeof $.version=="number"&&$.version!==s.version){if(s.migrate){const L=s.migrate($.state,$.version);return L instanceof Promise?L.then(z=>[!0,z]):[!0,L]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,$.state];return[!1,void 0]}).then($=>{var L;const[z,K]=$;if(x=s.merge(K,(L=r())!=null?L:b),n(x,!0),z)return m()}).then(()=>{T?.(x,void 0),x=r(),l=!0,d.forEach($=>$(x))}).catch($=>{T?.(void 0,$)})};return i.persist={setOptions:P=>{s={...s,...P},P.storage&&(h=P.storage)},clearStorage:()=>{h?.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>k(),hasHydrated:()=>l,onHydrate:P=>(c.add(P),()=>{c.delete(P)}),onFinishHydration:P=>(d.add(P),()=>{d.delete(P)})},s.skipHydration||k(),x||b},L7=R7;function _v(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function M7(e,t){let n;const r=()=>{if(n)return n;const i=indexedDB.open(e);return i.onupgradeneeded=()=>i.result.createObjectStore(t),n=_v(i),n.then(s=>{s.onclose=()=>n=void 0},()=>{}),n};return(i,s)=>r().then(l=>s(l.transaction(t,i).objectStore(t)))}let k0;function lw(){return k0||(k0=M7("keyval-store","keyval")),k0}function D7(e,t=lw()){return t("readonly",n=>_v(n.get(e)))}function N7(e,t,n=lw()){return n("readwrite",r=>(r.put(t,e),_v(r.transaction)))}function F7(e,t=lw()){return t("readwrite",n=>(n.delete(e),_v(n.transaction)))}const O7={getItem:async e=>await D7(e)||null,setItem:async(e,t)=>{await N7(e,t)},removeItem:async e=>{await F7(e)}},H2=S.createContext(null);function G2(){return D.jsx("div",{className:yn("bg-background flex h-screen w-screen items-start justify-center"),children:D.jsxs("div",{className:"text-default-900 m-auto flex flex-col items-center gap-4",children:[D.jsx(J_,{size:"lg","aria-label":"Progress indicator"}),D.jsx("p",{children:"Initializing..."})]})})}const uC="ragbits-history-store";function z7(e,t){if(e)return eC(L7(aC,{name:t,partialize:r=>({conversations:r.conversations}),onRehydrateStorage:r=>()=>r._internal._setHasHydrated(!0),merge:(r,i)=>{const s=r?.conversations??{},{conversations:l,currentConversation:c}=i,d=Object.values(s).reduce((h,m)=>(m.conversationId===null||(h[m.conversationId]={...m,isLoading:!1,abortController:null}),h),{});return{...i,currentConversation:c,conversations:{...d,...l}}},storage:W2(()=>O7)}));const n=eC(aC);return n.getState()._internal._setHasHydrated(!0),n}function j7({children:e,shouldStoreHistory:t}){const[n,r]=S.useState(uC),i=S.useMemo(()=>z7(t,n),[t,n]),s=D2(i,d=>d._internal._hasHydrated),l=d=>{r(`${uC}-${d}`)},c=S.useMemo(()=>({store:i,initializeUserStore:l}),[i]);return t&&!s?D.jsx(G2,{}):D.jsx(H2.Provider,{value:c,children:e})}/**
+}`;var dt=Jw(function(){return wt(F,Ue+"return "+we).apply(n,H)});if(dt.source=we,Ty(dt))throw dt;return dt}function iR(u){return At(u).toLowerCase()}function oR(u){return At(u).toUpperCase()}function sR(u,f,y){if(u=At(u),u&&(y||f===n))return Zh(u);if(!u||!(f=vr(f)))return u;var E=Tr(u),I=Tr(f),F=em(E,I),H=fd(E,I)+1;return vo(E,F,H).join("")}function lR(u,f,y){if(u=At(u),u&&(y||f===n))return u.slice(0,Qu(u)+1);if(!u||!(f=vr(f)))return u;var E=Tr(u),I=fd(E,Tr(f))+1;return vo(E,0,I).join("")}function aR(u,f,y){if(u=At(u),u&&(y||f===n))return u.replace(ua,"");if(!u||!(f=vr(f)))return u;var E=Tr(u),I=em(E,Tr(f));return vo(E,I).join("")}function uR(u,f){var y=j,E=B;if(fn(f)){var I="separator"in f?f.separator:I;y="length"in f?ct(f.length):y,E="omission"in f?vr(f.omission):E}u=At(u);var F=u.length;if(ml(u)){var H=Tr(u);F=H.length}if(y>=F)return u;var Q=y-Ss(E);if(Q<1)return E;var oe=H?vo(H,0,Q).join(""):u.slice(0,Q);if(I===n)return oe+E;if(H&&(Q+=oe.length-Q),_y(I)){if(u.slice(Q).search(I)){var ge,ve=oe;for(I.global||(I=ba(I.source,At(io.exec(I))+"g")),I.lastIndex=0;ge=I.exec(ve);)var we=ge.index;oe=oe.slice(0,we===n?Q:we)}}else if(u.indexOf(vr(I),Q)!=Q){var Ie=oe.lastIndexOf(I);Ie>-1&&(oe=oe.slice(0,Ie))}return oe+E}function cR(u){return u=At(u),u&&sa.test(u)?u.replace(ui,om):u}var fR=Ds(function(u,f,y){return u+(y?" ":"")+f.toUpperCase()}),Ay=Fd("toUpperCase");function Qw(u,f,y){return u=At(u),f=y?n:f,f===n?Jv(u)?ny(u):Yv(u):u.match(f)||[]}var Jw=ut(function(u,f){try{return nr(u,n,f)}catch(y){return Ty(y)?y:new rt(y)}}),dR=Ki(function(u,f){return Vn(f,function(y){y=yi(y),Fi(u,y,ke(u[y],u))}),u});function pR(u){var f=u==null?0:u.length,y=Ge();return u=f?Lt(u,function(E){if(typeof E[1]!="function")throw new Br(l);return[y(E[0]),E[1]]}):[],ut(function(E){for(var I=-1;++IV)return[];var y=U,E=Un(u,U);f=Ge(f),u-=U;for(var I=cd(E,f);++y0||f<0)?new ot(y):(u<0?y=y.takeRight(-u):u&&(y=y.drop(u)),f!==n&&(f=ct(f),y=f<0?y.dropRight(-f):y.take(f-u)),y)},ot.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},ot.prototype.toArray=function(){return this.take(U)},$r(ot.prototype,function(u,f){var y=/^(?:filter|find|map|reject)|While$/.test(f),E=/^(?:head|last)$/.test(f),I=N[E?"take"+(f=="last"?"Right":""):f],F=E||/^find/.test(f);I&&(N.prototype[f]=function(){var H=this.__wrapped__,Q=E?[1]:arguments,oe=H instanceof ot,ge=Q[0],ve=oe||st(H),we=function(gt){var xt=I.apply(N,Fo([gt],Q));return E&&Ie?xt[0]:xt};ve&&y&&typeof ge=="function"&&ge.length!=1&&(oe=ve=!1);var Ie=this.__chain__,Ue=!!this.__actions__.length,Je=F&&!Ie,dt=oe&&!Ue;if(!F&&ve){H=dt?H:new ot(this);var Ze=u.apply(H,Q);return Ze.__actions__.push({func:xi,args:[we],thisArg:n}),new Kn(Ze,Ie)}return Je&&dt?u.apply(this,Q):(Ze=this.thru(we),Je?E?Ze.value()[0]:Ze.value():Ze)})}),Vn(["pop","push","shift","sort","splice","unshift"],function(u){var f=so[u],y=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",E=/^(?:pop|shift)$/.test(u);N.prototype[u]=function(){var I=arguments;if(E&&!this.__chain__){var F=this.value();return f.apply(st(F)?F:[],I)}return this[y](function(H){return f.apply(st(H)?H:[],I)})}}),$r(ot.prototype,function(u,f){var y=N[f];if(y){var E=y.name+"";St.call(Sl,E)||(Sl[E]=[]),Sl[E].push({name:f,func:y})}}),Sl[Fl(n,T).name]=[{name:"wrapper",func:n}],ot.prototype.clone=ac,ot.prototype.reverse=yd,ot.prototype.value=El,N.prototype.at=qc,N.prototype.chain=Bs,N.prototype.commit=Yc,N.prototype.next=lp,N.prototype.plant=xy,N.prototype.reverse=up,N.prototype.toJSON=N.prototype.valueOf=N.prototype.value=wy,N.prototype.first=N.prototype.head,ao&&(N.prototype[ao]=ap),N},gl=ry();Ai?((Ai.exports=gl)._=gl,va._=gl):Ht._=gl}).call(X8)}(Lp,Lp.exports)),Lp.exports}var T2=Q8();class J8{plugins={};activePlugins=[];listeners=new Set;register(t){this.plugins[t.name]={isActivated:!1,config:t},this.notify()}activate(t){const n=this.plugins[t];!n||n.isActivated||(n.isActivated=!0,n.config.onActivate&&n.config.onActivate(),this.produceActivePlugins(),this.notify())}deactivate(t){const n=this.plugins[t];!n||!n.isActivated||(n.isActivated=!1,n.config.onDeactivate&&n.config.onDeactivate(),this.produceActivePlugins(),this.notify())}isPluginActivated(t){const n=this.plugins[t];return!!n&&n.isActivated}getPlugin(t){const n=this.plugins[t];return!n||!n.isActivated?null:n}getActivePlugins(){return this.activePlugins}subscribe(t){return this.listeners.add(t),()=>this.listeners.delete(t)}notify(){this.listeners.forEach(t=>t())}produceActivePlugins(){this.activePlugins=T2.transform(this.plugins,(t,n)=>{n.isActivated&&t.push(n.config)},[])}}const xr=new J8;const _2="FeedbackFormPlugin",I2={name:_2,components:{FeedbackForm:S.lazy(()=>no(()=>import("./FeedbackForm-D54-Ucqr.js"),__vite__mapDeps([0,1,2,3,4,5,6])))}},$2="ChatOptionsPlugin",A2={name:$2,components:{ChatOptionsForm:S.lazy(()=>no(()=>import("./ChatOptionsForm-qNtrae8b.js"),__vite__mapDeps([7,1,2,3,4,5,6])))}},R2=S.createContext(void 0),L2="SharePluginName",M2={name:L2,components:{ShareButton:S.lazy(()=>no(()=>import("./ShareButton-DayYwYWS.js"),__vite__mapDeps([8,6])))}},Zk=e=>{let t;const n=new Set,r=(h,m)=>{const g=typeof h=="function"?h(t):h;if(!Object.is(g,t)){const b=t;t=m??(typeof g!="object"||g===null)?g:Object.assign({},t,g),n.forEach(x=>x(t,b))}},i=()=>t,c={setState:r,getState:i,getInitialState:()=>d,subscribe:h=>(n.add(h),()=>n.delete(h))},d=t=e(r,i,c);return c},eC=e=>e?Zk(e):Zk,Z8=e=>e;function D2(e,t=Z8){const n=We.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return We.useDebugValue(n),n}const ur=[];for(let e=0;e<256;++e)ur.push((e+256).toString(16).slice(1));function e7(e,t=0){return(ur[e[t+0]]+ur[e[t+1]]+ur[e[t+2]]+ur[e[t+3]]+"-"+ur[e[t+4]]+ur[e[t+5]]+"-"+ur[e[t+6]]+ur[e[t+7]]+"-"+ur[e[t+8]]+ur[e[t+9]]+"-"+ur[e[t+10]]+ur[e[t+11]]+ur[e[t+12]]+ur[e[t+13]]+ur[e[t+14]]+ur[e[t+15]]).toLowerCase()}let x0;const t7=new Uint8Array(16);function n7(){if(!x0){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");x0=crypto.getRandomValues.bind(crypto)}return x0(t7)}const r7=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),tC={randomUUID:r7};function N2(e,t,n){if(tC.randomUUID&&!e)return tC.randomUUID();e=e||{};const r=e.random??e.rng?.()??n7();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,e7(r)}function i7(e){return Object.values(e).map(t=>({role:t.role,content:t.content,extra:t.extra||null}))}var F2=Symbol.for("immer-nothing"),nC=Symbol.for("immer-draftable"),Ti=Symbol.for("immer-state");function Po(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Lf=Object.getPrototypeOf;function Mf(e){return!!e&&!!e[Ti]}function Eu(e){return e?O2(e)||Array.isArray(e)||!!e[nC]||!!e.constructor?.[nC]||Ev(e)||Pv(e):!1}var o7=Object.prototype.constructor.toString();function O2(e){if(!e||typeof e!="object")return!1;const t=Lf(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===o7}function nv(e,t){Cv(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Cv(e){const t=e[Ti];return t?t.type_:Array.isArray(e)?1:Ev(e)?2:Pv(e)?3:0}function Nb(e,t){return Cv(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function z2(e,t,n){const r=Cv(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function s7(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Ev(e){return e instanceof Map}function Pv(e){return e instanceof Set}function fu(e){return e.copy_||e.base_}function Fb(e,t){if(Ev(e))return new Map(e);if(Pv(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=O2(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Ti];let i=Reflect.ownKeys(r);for(let s=0;s1&&(e.set=e.add=e.clear=e.delete=l7),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>ow(r,!0))),e}function l7(){Po(2)}function Tv(e){return Object.isFrozen(e)}var a7={};function Pu(e){const t=a7[e];return t||Po(0,e),t}var ah;function j2(){return ah}function u7(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function rC(e,t){t&&(Pu("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ob(e){zb(e),e.drafts_.forEach(c7),e.drafts_=null}function zb(e){e===ah&&(ah=e.parent_)}function iC(e){return ah=u7(ah,e)}function c7(e){const t=e[Ti];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function oC(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Ti].modified_&&(Ob(t),Po(4)),Eu(e)&&(e=rv(t,e),t.parent_||iv(t,e)),t.patches_&&Pu("Patches").generateReplacementPatches_(n[Ti].base_,e,t.patches_,t.inversePatches_)):e=rv(t,n,[]),Ob(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==F2?e:void 0}function rv(e,t,n){if(Tv(t))return t;const r=t[Ti];if(!r)return nv(t,(i,s)=>sC(e,r,t,i,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return iv(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let s=i,l=!1;r.type_===3&&(s=new Set(i),i.clear(),l=!0),nv(s,(c,d)=>sC(e,r,i,c,d,n,l)),iv(e,i,!1),n&&e.patches_&&Pu("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function sC(e,t,n,r,i,s,l){if(Mf(i)){const c=s&&t&&t.type_!==3&&!Nb(t.assigned_,r)?s.concat(r):void 0,d=rv(e,i,c);if(z2(n,r,d),Mf(d))e.canAutoFreeze_=!1;else return}else l&&n.add(i);if(Eu(i)&&!Tv(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;rv(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&iv(e,i)}}function iv(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ow(t,n)}function f7(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:j2(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,s=sw;n&&(i=[r],s=uh);const{revoke:l,proxy:c}=Proxy.revocable(i,s);return r.draft_=c,r.revoke_=l,c}var sw={get(e,t){if(t===Ti)return e;const n=fu(e);if(!Nb(n,t))return d7(e,n,t);const r=n[t];return e.finalized_||!Eu(r)?r:r===w0(e.base_,t)?(S0(e),e.copy_[t]=Bb(r,e)):r},has(e,t){return t in fu(e)},ownKeys(e){return Reflect.ownKeys(fu(e))},set(e,t,n){const r=B2(fu(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=w0(fu(e),t),s=i?.[Ti];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(s7(n,i)&&(n!==void 0||Nb(e.base_,t)))return!0;S0(e),jb(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return w0(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,S0(e),jb(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=fu(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Po(11)},getPrototypeOf(e){return Lf(e.base_)},setPrototypeOf(){Po(12)}},uh={};nv(sw,(e,t)=>{uh[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});uh.deleteProperty=function(e,t){return uh.set.call(this,e,t,void 0)};uh.set=function(e,t,n){return sw.set.call(this,e[0],t,n,e[0])};function w0(e,t){const n=e[Ti];return(n?fu(n):e)[t]}function d7(e,t,n){const r=B2(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}function B2(e,t){if(!(t in e))return;let n=Lf(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Lf(n)}}function jb(e){e.modified_||(e.modified_=!0,e.parent_&&jb(e.parent_))}function S0(e){e.copy_||(e.copy_=Fb(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var p7=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const s=n;n=t;const l=this;return function(d=s,...h){return l.produce(d,m=>n.call(this,m,...h))}}typeof n!="function"&&Po(6),r!==void 0&&typeof r!="function"&&Po(7);let i;if(Eu(t)){const s=iC(this),l=Bb(t,void 0);let c=!0;try{i=n(l),c=!1}finally{c?Ob(s):zb(s)}return rC(s,r),oC(i,s)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===F2&&(i=void 0),this.autoFreeze_&&ow(i,!0),r){const s=[],l=[];Pu("Patches").generateReplacementPatches_(t,i,s,l),r(s,l)}return i}else Po(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(l,...c)=>this.produceWithPatches(l,d=>t(d,...c));let r,i;return[this.produce(t,n,(l,c)=>{r=l,i=c}),r,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Eu(e)||Po(8),Mf(e)&&(e=h7(e));const t=iC(this),n=Bb(e,void 0);return n[Ti].isManual_=!0,zb(t),n}finishDraft(e,t){const n=e&&e[Ti];(!n||!n.isManual_)&&Po(9);const{scope_:r}=n;return rC(r,t),oC(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=Pu("Patches").applyPatches_;return Mf(e)?r(e,t):this.produce(e,i=>r(i,t))}};function Bb(e,t){const n=Ev(e)?Pu("MapSet").proxyMap_(e,t):Pv(e)?Pu("MapSet").proxySet_(e,t):f7(e,t);return(t?t.scope_:j2()).drafts_.push(n),n}function h7(e){return Mf(e)||Po(10,e),V2(e)}function V2(e){if(!Eu(e)||Tv(e))return e;const t=e[Ti];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Fb(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Fb(e,!0);return nv(n,(r,i)=>{z2(n,r,V2(i))}),t&&(t.finalized_=!1),n}var _i=new p7,kh=_i.produce;_i.produceWithPatches.bind(_i);_i.setAutoFreeze.bind(_i);_i.setUseStrictShallowCopy.bind(_i);_i.applyPatches.bind(_i);_i.createDraft.bind(_i);_i.finishDraft.bind(_i);const m7=e=>(t,n,r)=>(r.setState=(i,s,...l)=>{const c=typeof i=="function"?kh(i):i;return t(c,s,...l)},e(r.setState,n,r)),g7=m7,v7=({content:e},t)=>{t.serverState=e},y7=({content:e},t,n)=>{const r=n.conversationIdRef.current;return t.conversationId=e.conversation_id,n.conversationIdRef.current=e.conversation_id,{originalConversationId:r}},b7=(e,t,{originalConversationId:n,conversationIdRef:r})=>{const i=t.conversations[n];if(!i)throw new Error("Received events for non-existent conversation");t.conversations[r.current]=i,t.currentConversation===n&&(t.currentConversation=r.current),delete t.conversations[n]},x7=({content:e},t)=>{t.followupMessages=e.messages},w7=({content:e},t)=>{t.summary=e.summary},S7=(e,t,n)=>{const r=t.history[n.messageId];r.content+=e.content.text},k7=(e,t,n)=>{const r=t.history[n.messageId];r.references=[...r.references??[],e.content]},C7=(e,t,n)=>{const r=t.history[n.messageId];r.serverId=e.content.message_id},E7=(e,t,n)=>{const r=t.history[n.messageId],{update_id:i,content:s,type:l}=e.content,c=kh(r.liveUpdates??{},d=>{l===jz.Start&&i in d&&console.error(`Got duplicate start event for update_id: ${i}. Ignoring the event.`),d[i]=s});r.liveUpdates=c},P7=(e,t,n)=>{const r=t.history[n.messageId],i=e.content;r.images=kh(r.images??{},s=>{s[i.id]&&console.error(`Got duplicate image event for image_id: ${i.id}. Ignoring the event.`),s[i.id]=i.url})},T7=(e,t,n)=>{const r=t.history[n.messageId];t.history[n.messageId]={id:r.id,role:r.role,content:""}},_7=(e,t,n)=>{const r=t.history[n.messageId];r.usage=e.content.usage},I7=({content:e},t,n)=>{const r=t.history[n.messageId],i=r.tasks??[],s=e.task,l=kh(i,c=>{const d=c.findIndex(h=>h.id===s.id);d===-1?c.push(s):c[d]=s});r.tasks=l};class $7{handlers=new Map;register(t,n){this.handlers.has(t)&&console.warn(`Handler for ${String(t)} already registered - overwriting.`),this.handlers.set(t,n)}get(t){const n=this.handlers.get(t);return n||(console.warn(`No handler registered for type: ${String(t)}`),console.warn("Continuing with empty handler..."),{handle:()=>{},after:()=>{}})}}const Ii=new $7;Ii.register("state_update",{handle:v7});Ii.register("conversation_id",{handle:y7,after:b7});Ii.register("followup_messages",{handle:x7});Ii.register("text",{handle:S7});Ii.register("reference",{handle:k7});Ii.register("message_id",{handle:C7});Ii.register("live_update",{handle:E7});Ii.register("image",{handle:P7});Ii.register("clear_message",{handle:T7});Ii.register("usage",{handle:_7});Ii.register("todo_item",{handle:I7});Ii.register("conversation_summary",{handle:w7});const U2="temp-",K2=()=>`${U2}${N2()}`,Vb=()=>({history:{},followupMessages:null,serverState:null,conversationId:K2(),eventsLog:[],lastMessageId:null,context:void 0,chatOptions:void 0,isLoading:!1,abortController:null}),A7=()=>{const e=Vb();return{conversations:{[e.conversationId]:e},currentConversation:e.conversationId}},is=(e,t)=>n=>{const r=n.conversations[e];if(!r)throw new Error(`Conversation with ID '${e}' does not exist`);t(r)},lC=e=>e.startsWith(U2),aC=g7((e,t)=>({...A7(),computed:{getContext:()=>{const{primitives:{getCurrentConversation:n}}=t(),r=n(),{serverState:i,conversationId:s,chatOptions:l}=r;return{...i??{},...s&&!lC(r.conversationId)?{conversation_id:s}:{},...l?{user_settings:l}:{}}}},_internal:{_hasHydrated:!1,_setHasHydrated:n=>{e(r=>{r._internal._hasHydrated=n})},handleResponse:(n,r,i)=>{let s;const l=Ii.get(i.type);e(is(n.current,c=>{if(!c.history[r])throw new Error(`Message ID ${r} not found in history`);s=l.handle(i,c,{conversationIdRef:n,messageId:r})})),e(c=>{l.after?.(i,c,{conversationIdRef:n,messageId:r,...s})}),e(is(n.current,c=>{c.eventsLog[c.eventsLog.length-1].push(i)}))}},primitives:{getCurrentConversation:()=>{const{currentConversation:n,conversations:r}=t(),i=r[n];if(!i)throw new Error("Tried to get conversation that doesn't exist.");return i},restore:(n,r,i,s)=>{const l=K2(),c={...Vb(),followupMessages:r,chatOptions:i,serverState:s,history:n,conversationId:l},d=Object.values(n).filter(h=>h.role!==wf.User);c.eventsLog=d.map(()=>[]),e(h=>{h.conversations[l]=c,h.currentConversation=l})},addMessage:(n,r)=>{const i=N2(),s={...r,id:i};return e(is(n,l=>{l.followupMessages=null,l.lastMessageId=i,l.history[i]=s})),i},deleteMessage:(n,r)=>{e(is(n,i=>{const{history:s}=i,l=Object.keys(s);l.at(-1)===r&&(i.lastMessageId=l.at(-2)??null),delete i.history[r]}))},stopAnswering:n=>{const r=t().conversations[n];if(!r)throw new Error("Tried to stop answering for conversation that doesn't exist");r.abortController?.abort(),e(is(n,i=>{i.abortController=null,i.isLoading=!1}))}},actions:{selectConversation:n=>{e(r=>{if(r.currentConversation===n)return;if(!r.conversations[n])throw new Error(`Tried to select conversation that doesn't exist, id: ${n}`);r.currentConversation=n})},deleteConversation:n=>{const{actions:{newConversation:r},primitives:{stopAnswering:i},currentConversation:s}=t();if(i(n),e(l=>{delete l.conversations[n]}),n===s)return r()},mergeExtensions:(n,r)=>{const{currentConversation:i}=t();e(is(i,s=>{if(!(n in s.history))throw new Error("Attempted to set extensions for a message that does not exist.");const l=s.history[n];l.extensions={...l.extensions,...r},s.history[n]=l}))},initializeChatOptions:n=>{const{currentConversation:r}=t();e(is(r,i=>{const s=i.chatOptions??{};Object.keys(s).forEach(l=>{l in n||delete s[l]}),Object.keys(n).forEach(l=>{l in s||(s[l]=n[l])}),i.chatOptions=s}))},setConversationProperties:(n,r)=>{e(is(n,i=>{Object.assign(i,r)}))},stopAnswering:()=>{const{currentConversation:n,primitives:{stopAnswering:r}}=t();r(n)},newConversation:()=>{const n=Vb();return e(r=>{r.conversations[n.conversationId]=n,r.currentConversation=n.conversationId,r.conversations=T2.omitBy(r.conversations,i=>lC(i.conversationId)&&i.conversationId!==r.currentConversation)}),n.conversationId},sendMessage:(n,r)=>{const{_internal:{handleResponse:i},primitives:{addMessage:s,getCurrentConversation:l,stopAnswering:c},computed:{getContext:d}}=t(),{history:h,conversationId:m}=l();s(m,{role:wf.User,content:n});const g=s(m,{role:wf.Assistant,content:""}),b={message:n,history:i7(h),context:d()};e(is(m,P=>{P.eventsLog.push([])}));const x=new AbortController,k={current:m};e(is(m,P=>{P.abortController=x,P.isLoading=!0})),r.makeStreamRequest("/api/chat",b,{onMessage:P=>i(k,g,P),onError:P=>{i(k,g,{type:"text",content:{text:P.message}}),c(k.current)},onClose:()=>{c(k.current)}},x.signal)}}}));function W2(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var s;const l=d=>d===null?null:JSON.parse(d,void 0),c=(s=n.getItem(i))!=null?s:null;return c instanceof Promise?c.then(l):l(c)},setItem:(i,s)=>n.setItem(i,JSON.stringify(s,void 0)),removeItem:i=>n.removeItem(i)}}const Ub=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return Ub(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Ub(r)(n)}}}},R7=(e,t)=>(n,r,i)=>{let s={storage:W2(()=>localStorage),partialize:P=>P,version:0,merge:(P,_)=>({..._,...P}),...t},l=!1;const c=new Set,d=new Set;let h=s.storage;if(!h)return e((...P)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),n(...P)},r,i);const m=()=>{const P=s.partialize({...r()});return h.setItem(s.name,{state:P,version:s.version})},g=i.setState;i.setState=(P,_)=>{g(P,_),m()};const b=e((...P)=>{n(...P),m()},r,i);i.getInitialState=()=>b;let x;const k=()=>{var P,_;if(!h)return;l=!1,c.forEach($=>{var L;return $((L=r())!=null?L:b)});const T=((_=s.onRehydrateStorage)==null?void 0:_.call(s,(P=r())!=null?P:b))||void 0;return Ub(h.getItem.bind(h))(s.name).then($=>{if($)if(typeof $.version=="number"&&$.version!==s.version){if(s.migrate){const L=s.migrate($.state,$.version);return L instanceof Promise?L.then(z=>[!0,z]):[!0,L]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,$.state];return[!1,void 0]}).then($=>{var L;const[z,K]=$;if(x=s.merge(K,(L=r())!=null?L:b),n(x,!0),z)return m()}).then(()=>{T?.(x,void 0),x=r(),l=!0,d.forEach($=>$(x))}).catch($=>{T?.(void 0,$)})};return i.persist={setOptions:P=>{s={...s,...P},P.storage&&(h=P.storage)},clearStorage:()=>{h?.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>k(),hasHydrated:()=>l,onHydrate:P=>(c.add(P),()=>{c.delete(P)}),onFinishHydration:P=>(d.add(P),()=>{d.delete(P)})},s.skipHydration||k(),x||b},L7=R7;function _v(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function M7(e,t){let n;const r=()=>{if(n)return n;const i=indexedDB.open(e);return i.onupgradeneeded=()=>i.result.createObjectStore(t),n=_v(i),n.then(s=>{s.onclose=()=>n=void 0},()=>{}),n};return(i,s)=>r().then(l=>s(l.transaction(t,i).objectStore(t)))}let k0;function lw(){return k0||(k0=M7("keyval-store","keyval")),k0}function D7(e,t=lw()){return t("readonly",n=>_v(n.get(e)))}function N7(e,t,n=lw()){return n("readwrite",r=>(r.put(t,e),_v(r.transaction)))}function F7(e,t=lw()){return t("readwrite",n=>(n.delete(e),_v(n.transaction)))}const O7={getItem:async e=>await D7(e)||null,setItem:async(e,t)=>{await N7(e,t)},removeItem:async e=>{await F7(e)}},H2=S.createContext(null);function G2(){return D.jsx("div",{className:yn("bg-background flex h-screen w-screen items-start justify-center"),children:D.jsxs("div",{className:"text-default-900 m-auto flex flex-col items-center gap-4",children:[D.jsx(J_,{size:"lg","aria-label":"Progress indicator"}),D.jsx("p",{children:"Initializing..."})]})})}const uC="ragbits-history-store";function z7(e,t){if(e)return eC(L7(aC,{name:t,partialize:r=>({conversations:r.conversations}),onRehydrateStorage:r=>()=>r._internal._setHasHydrated(!0),merge:(r,i)=>{const s=r?.conversations??{},{conversations:l,currentConversation:c}=i,d=Object.values(s).reduce((h,m)=>(m.conversationId===null||(h[m.conversationId]={...m,isLoading:!1,abortController:null}),h),{});return{...i,currentConversation:c,conversations:{...d,...l}}},storage:W2(()=>O7)}));const n=eC(aC);return n.getState()._internal._setHasHydrated(!0),n}function j7({children:e,shouldStoreHistory:t}){const[n,r]=S.useState(uC),i=S.useMemo(()=>z7(t,n),[t,n]),s=D2(i,d=>d._internal._hasHydrated),l=d=>{r(`${uC}-${d}`)},c=S.useMemo(()=>({store:i,initializeUserStore:l}),[i]);return t&&!s?D.jsx(G2,{}):D.jsx(H2.Provider,{value:c,children:e})}/**
* react-router v7.7.1
*
* Copyright (c) Remix Software Inc.
@@ -118,8 +118,8 @@ Please change the parent to ",...d.current()})),h+=d.move(">")):(c=n.enter("destinationRaw"),h+=d.move(n.safe(e.url,{before:h,after:e.title?" ":")",...d.current()}))),c(),e.title&&(c=n.enter(`title${s}`),h+=d.move(" "+i),h+=d.move(n.safe(e.title,{before:h,after:i,...d.current()})),h+=d.move(i),c()),h+=d.move(")"),l(),h}function kW(){return"!"}JI.peek=CW;function JI(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let l=n.enter("label");const c=n.createTracker(r);let d=c.move("![");const h=n.safe(e.alt,{before:d,after:"]",...c.current()});d+=c.move(h+"]["),l();const m=n.stack;n.stack=[],l=n.enter("reference");const g=n.safe(n.associationId(e),{before:d,after:"]",...c.current()});return l(),n.stack=m,s(),i==="full"||!h||h!==g?d+=c.move(g+"]"):i==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function CW(){return"!"}ZI.peek=EW;function ZI(e,t,n){let r=e.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s\u007F]/.test(e.url))}t$.peek=PW;function t$(e,t,n,r){const i=Aw(n),s=i==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let c,d;if(e$(e,n)){const m=n.stack;n.stack=[],c=n.enter("autolink");let g=l.move("<");return g+=l.move(n.containerPhrasing(e,{before:g,after:">",...l.current()})),g+=l.move(">"),c(),n.stack=m,g}c=n.enter("link"),d=n.enter("label");let h=l.move("[");return h+=l.move(n.containerPhrasing(e,{before:h,after:"](",...l.current()})),h+=l.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),h+=l.move("<"),h+=l.move(n.safe(e.url,{before:h,after:">",...l.current()})),h+=l.move(">")):(d=n.enter("destinationRaw"),h+=l.move(n.safe(e.url,{before:h,after:e.title?" ":")",...l.current()}))),d(),e.title&&(d=n.enter(`title${s}`),h+=l.move(" "+i),h+=l.move(n.safe(e.title,{before:h,after:i,...l.current()})),h+=l.move(i),d()),h+=l.move(")"),c(),h}function PW(e,t,n){return e$(e,n)?"<":"["}n$.peek=TW;function n$(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let l=n.enter("label");const c=n.createTracker(r);let d=c.move("[");const h=n.containerPhrasing(e,{before:d,after:"]",...c.current()});d+=c.move(h+"]["),l();const m=n.stack;n.stack=[],l=n.enter("reference");const g=n.safe(n.associationId(e),{before:d,after:"]",...c.current()});return l(),n.stack=m,s(),i==="full"||!h||h!==g?d+=c.move(g+"]"):i==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function TW(){return"["}function Rw(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function _W(e){const t=Rw(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function IW(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function r$(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function $W(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let l=e.ordered?IW(n):Rw(n);const c=e.ordered?l==="."?")":".":_W(n);let d=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&m&&(!m.children||!m.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(d=!0),r$(n)===l&&m){let g=-1;for(;++g-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let l=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const c=n.createTracker(r);c.move(s+" ".repeat(l-s.length)),c.shift(l);const d=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,c.current()),m);return d(),h;function m(g,b,x){return b?(x?"":" ".repeat(l))+g:(x?s:s+" ".repeat(l-s.length))+g}}function LW(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),l=n.containerPhrasing(e,r);return s(),i(),l}const MW=Dv(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function DW(e,t,n,r){return(e.children.some(function(l){return MW(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function NW(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}i$.peek=FW;function i$(e,t,n,r){const i=NW(n),s=n.enter("strong"),l=n.createTracker(r),c=l.move(i+i);let d=l.move(n.containerPhrasing(e,{after:i,before:c,...l.current()}));const h=d.charCodeAt(0),m=uv(r.before.charCodeAt(r.before.length-1),h,i);m.inside&&(d=dh(h)+d.slice(1));const g=d.charCodeAt(d.length-1),b=uv(r.after.charCodeAt(0),g,i);b.inside&&(d=d.slice(0,-1)+dh(g));const x=l.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:b.outside,before:m.outside},c+d+x}function FW(e,t,n){return n.options.strong||"*"}function OW(e,t,n,r){return n.safe(e.value,r)}function zW(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function jW(e,t,n){const r=(r$(n)+(n.options.ruleSpaces?" ":"")).repeat(zW(n));return n.options.ruleSpaces?r.slice(0,-1):r}const o$={blockquote:uW,break:eE,code:mW,definition:vW,emphasis:YI,hardBreak:eE,heading:wW,html:XI,image:QI,imageReference:JI,inlineCode:ZI,link:t$,linkReference:n$,list:$W,listItem:RW,paragraph:LW,root:DW,strong:i$,text:OW,thematicBreak:jW};function BW(){return{enter:{table:VW,tableData:tE,tableHeader:tE,tableRow:KW},exit:{codeText:WW,table:UW,tableData:V0,tableHeader:V0,tableRow:V0}}}function VW(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function UW(e){this.exit(e),this.data.inTable=void 0}function KW(e){this.enter({type:"tableRow",children:[]},e)}function V0(e){this.exit(e)}function tE(e){this.enter({type:"tableCell",children:[]},e)}function WW(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,HW));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function HW(e,t){return t==="|"?t:e}function GW(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:l,tableCell:d,tableRow:c}};function l(x,k,P,_){return h(m(x,P,_),x.align)}function c(x,k,P,_){const T=g(x,P,_),$=h([T]);return $.slice(0,$.indexOf(`
-`))}function d(x,k,P,_){const T=P.enter("tableCell"),$=P.enter("phrasing"),L=P.containerPhrasing(x,{..._,before:s,after:s});return $(),T(),L}function h(x,k){return lW(x,{align:k,alignDelimiters:r,padding:n,stringLength:i})}function m(x,k,P){const _=x.children;let T=-1;const $=[],L=k.enter("table");for(;++T<_.length;)$[T]=g(_[T],k,P);return L(),$}function g(x,k,P){const _=x.children;let T=-1;const $=[],L=k.enter("tableRow");for(;++T<_.length;)$[T]=d(_[T],x,k,P);return L(),$}function b(x,k,P){let _=o$.inlineCode(x,k,P);return P.stack.includes("tableCell")&&(_=_.replace(/\|/g,"\\$&")),_}}function qW(){return{exit:{taskListCheckValueChecked:nE,taskListCheckValueUnchecked:nE,paragraph:XW}}}function YW(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:QW}}}function nE(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function XW(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let s=-1,l;for(;++s0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const fH={tokenize:bH,partial:!0};function dH(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:gH,continuation:{tokenize:vH},exit:yH}},text:{91:{name:"gfmFootnoteCall",tokenize:mH},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:pH,resolveTo:hH}}}}function pH(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const d=r.events[i][1];if(d.type==="labelImage"){l=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!l||!l._balanced)return n(d);const h=_o(r.sliceSerialize({start:l.end,end:r.now()}));return h.codePointAt(0)!==94||!s.includes(h.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function hH(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",l,t],["exit",l,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function mH(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,l;return c;function c(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),d}function d(g){return g!==94?n(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(g){if(s>999||g===93&&!l||g===null||g===91||Bt(g))return n(g);if(g===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return i.includes(_o(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(g)}return Bt(g)||(l=!0),s++,e.consume(g),g===92?m:h}function m(g){return g===91||g===92||g===93?(e.consume(g),s++,h):h(g)}}function gH(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,l=0,c;return d;function d(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(k){return k===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):n(k)}function m(k){if(l>999||k===93&&!c||k===null||k===91||Bt(k))return n(k);if(k===93){e.exit("chunkString");const P=e.exit("gfmFootnoteDefinitionLabelString");return s=_o(r.sliceSerialize(P)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return Bt(k)||(c=!0),l++,e.consume(k),k===92?g:m}function g(k){return k===91||k===92||k===93?(e.consume(k),l++,m):m(k)}function b(k){return k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),i.includes(s)||i.push(s),Ct(e,x,"gfmFootnoteDefinitionWhitespace")):n(k)}function x(k){return t(k)}}function vH(e,t,n){return e.check(Th,t,e.attempt(fH,t,n))}function yH(e){e.exit("gfmFootnoteDefinition")}function bH(e,t,n){const r=this;return Ct(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(s):n(s)}}function xH(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,c){let d=-1;for(;++d1?d(k):(l.consume(k),g++,x);if(g<2&&!n)return d(k);const _=l.exit("strikethroughSequenceTemporary"),T=Df(k);return _._open=!T||T===2&&!!P,_._close=!P||P===2&&!!T,c(k)}}}class wH{constructor(){this.map=[]}add(t,n,r){SH(this,t,n,r)}consume(t){if(this.map.sort(function(s,l){return s[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const s of i)t.push(s);i=r.pop()}this.map.length=0}}function SH(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i-1;){const G=r.events[B][1].type;if(G==="lineEnding"||G==="linePrefix")B--;else break}const Y=B>-1?r.events[B][1].type:null,te=Y==="tableHead"||Y==="tableRow"?M:d;return te===M&&r.parser.lazy[r.now().line]?n(j):te(j)}function d(j){return e.enter("tableHead"),e.enter("tableRow"),h(j)}function h(j){return j===124||(l=!0,s+=1),m(j)}function m(j){return j===null?n(j):qe(j)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),x):n(j):vt(j)?Ct(e,m,"whitespace")(j):(s+=1,l&&(l=!1,i+=1),j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),l=!0,m):(e.enter("data"),g(j)))}function g(j){return j===null||j===124||Bt(j)?(e.exit("data"),m(j)):(e.consume(j),j===92?b:g)}function b(j){return j===92||j===124?(e.consume(j),g):g(j)}function x(j){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(j):(e.enter("tableDelimiterRow"),l=!1,vt(j)?Ct(e,k,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):k(j))}function k(j){return j===45||j===58?_(j):j===124?(l=!0,e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),P):K(j)}function P(j){return vt(j)?Ct(e,_,"whitespace")(j):_(j)}function _(j){return j===58?(s+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),T):j===45?(s+=1,T(j)):j===null||qe(j)?z(j):K(j)}function T(j){return j===45?(e.enter("tableDelimiterFiller"),$(j)):K(j)}function $(j){return j===45?(e.consume(j),$):j===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),L):(e.exit("tableDelimiterFiller"),L(j))}function L(j){return vt(j)?Ct(e,z,"whitespace")(j):z(j)}function z(j){return j===124?k(j):j===null||qe(j)?!l||i!==s?K(j):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(j)):K(j)}function K(j){return n(j)}function M(j){return e.enter("tableRow"),J(j)}function J(j){return j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),J):j===null||qe(j)?(e.exit("tableRow"),t(j)):vt(j)?Ct(e,J,"whitespace")(j):(e.enter("data"),re(j))}function re(j){return j===null||j===124||Bt(j)?(e.exit("data"),J(j)):(e.consume(j),j===92?ae:re)}function ae(j){return j===92||j===124?(e.consume(j),re):re(j)}}function PH(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],l=[0,0,0,0],c=!1,d=0,h,m,g;const b=new wH;for(;++nn[2]+1){const k=n[2]+1,P=n[3]-n[2]-1;e.add(k,P,[])}}e.add(n[3]+1,0,[["exit",g,t]])}return i!==void 0&&(s.end=Object.assign({},ff(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function rE(e,t,n,r,i){const s=[],l=ff(t.events,n);i&&(i.end=Object.assign({},l),s.push(["exit",i,t])),r.end=Object.assign({},l),s.push(["exit",r,t]),e.add(n+1,0,s)}function ff(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const TH={name:"tasklistCheck",tokenize:IH};function _H(){return{text:{91:TH}}}function IH(e,t,n){const r=this;return i;function i(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),s)}function s(d){return Bt(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),l):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),l):n(d)}function l(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(d)}function c(d){return qe(d)?t(d):vt(d)?e.check({tokenize:$H},t,n)(d):n(d)}}function $H(e,t,n){return Ct(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function AH(e){return CI([nH(),dH(),xH(e),CH(),_H()])}const RH={};function Gp(e){const t=this,n=e||RH,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(AH(n)),s.push(JW()),l.push(ZW(n))}const iE=e=>Symbol.iterator in e,oE=e=>"entries"in e,sE=(e,t)=>{const n=e instanceof Map?e:new Map(e.entries()),r=t instanceof Map?t:new Map(t.entries());if(n.size!==r.size)return!1;for(const[i,s]of n)if(!Object.is(s,r.get(i)))return!1;return!0},LH=(e,t)=>{const n=e[Symbol.iterator](),r=t[Symbol.iterator]();let i=n.next(),s=r.next();for(;!i.done&&!s.done;){if(!Object.is(i.value,s.value))return!1;i=n.next(),s=r.next()}return!!i.done&&!!s.done};function MH(e,t){return Object.is(e,t)?!0:typeof e!="object"||e===null||typeof t!="object"||t===null||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)?!1:iE(e)&&iE(t)?oE(e)&&oE(t)?sE(e,t):LH(e,t):sE({entries:()=>Object.entries(e)},{entries:()=>Object.entries(t)})}function Ih(e){const t=We.useRef(void 0);return n=>{const r=e(n);return MH(t.current,r)?t.current:t.current=r}}const oa=e=>{const t=S.useContext(H2);if(!t||!t.store)throw new Error("useHistoryStore must be used within a HistoryStoreContextProvider");return D2(t.store,e)},Mw=()=>oa(e=>e.actions),HG=()=>oa(e=>e.primitives),Xl=e=>oa(Ih(t=>e(t.primitives.getCurrentConversation()))),h$=e=>oa(t=>e?t.primitives.getCurrentConversation().history[e]:void 0),DH=()=>oa(Ih(e=>Object.keys(e.primitives.getCurrentConversation().history))),NH=()=>oa(Ih(e=>Object.values(e.primitives.getCurrentConversation().history))),lE=({content:e,classNames:t})=>D.jsx(Hp,{className:yn("markdown-container prose dark:prose-invert text-default-900 max-w-full",t),remarkPlugins:[Gp],components:{pre:({children:n})=>D.jsx("pre",{className:"bg-default text-default-900 mt-2 mb-2 max-w-full overflow-auto rounded p-2 font-mono text-[90%] font-normal",children:n}),code:({children:n})=>D.jsx("code",{className:"bg-default text-default-900 rounded px-1 py-0.5 font-mono text-[85%] font-normal",children:n})},children:e}),FH=2;function OH({duration:e,className:t,children:n}){return D.jsx(yu.div,{className:yn("from-default-600 via-default-200 to-default-600 relative inline-block bg-gradient-to-r bg-clip-text text-transparent",t),initial:{backgroundPosition:"200% 0%"},animate:{backgroundPosition:"-200% 0%"},transition:{duration:e??FH,repeat:1/0,ease:"linear"},style:{backgroundSize:"400% 100%"},children:n})}function zH({shouldShimmer:e,liveUpdates:t,classNames:n}){const[r,i]=S.useState(!1),s=Object.values(t),l=S.useCallback(()=>i(g=>!g),[]),c=s.length>1,d=s[s.length-1],h=s.slice(0,-1),m=Math.max((d.description??"").length,d.label.length)/10;return D.jsxs("div",{className:yn("flex flex-col",c&&"cursor-pointer"),onClick:l,children:[D.jsx(yu.div,{initial:!1,animate:{height:r?"auto":0,opacity:r?1:0,marginBottom:r?"0.5rem":0},transition:{duration:.3,ease:"easeInOut"},style:{overflow:"hidden"},children:D.jsx("div",{className:"flex flex-col gap-2",children:h.map((g,b)=>D.jsxs(yu.div,{initial:{opacity:0,y:-10},animate:{opacity:r?1:0,y:r?0:-10},transition:{duration:.3},style:{pointerEvents:r?"auto":"none"},children:[D.jsx("div",{className:"text-default-500",children:g.label}),D.jsx(Hp,{className:yn("markdown-container prose dark:prose-invert text-default-400 max-w-full text-sm",n?.liveUpdates),remarkPlugins:[Gp],children:g.description})]},b))})}),D.jsxs("div",{className:"flex items-center gap-4",children:[D.jsx("div",{className:"relative overflow-hidden bg-transparent",children:e?D.jsxs(OH,{duration:m,children:[D.jsx("div",{children:d.label}),D.jsx(Hp,{className:yn("markdown-container prose dark:prose-invert max-w-full text-sm",n?.liveUpdates),remarkPlugins:[Gp],children:d.description})]}):D.jsxs(D.Fragment,{children:[D.jsx("div",{className:"text-default-500",children:d.label}),D.jsx(Hp,{className:yn("markdown-container prose dark:prose-invert text-default-400 max-w-full text-sm",n?.liveUpdates),remarkPlugins:[Gp],children:d.description})]})}),c&&D.jsx(To,{variant:"light",isIconOnly:!0,onPress:l,"data-testid":"live-updates-expand",children:D.jsx(yu.div,{initial:{rotate:0},animate:{rotate:r?180:0},transition:{duration:.3},children:D.jsx(Ei,{icon:"heroicons:chevron-down"})})})]})]})}const jH=({images:e})=>{const{isOpen:t,onOpen:n,onClose:r}=Dz(),[i,s]=S.useState(0),l=Object.entries(e).map(([m,g])=>({src:g,alt:m})),c=m=>{s(m),n()},d=S.useCallback(()=>{s(m=>m===0?l.length-1:m-1)},[l.length]),h=S.useCallback(()=>{s(m=>m===l.length-1?0:m+1)},[l.length]);return S.useEffect(()=>{if(!t)return;const m=g=>{switch(g.key){case"ArrowLeft":g.preventDefault(),d();break;case"ArrowRight":g.preventDefault(),h();break;case"Escape":g.preventDefault(),r();break}};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[t,d,h,r]),D.jsxs(D.Fragment,{children:[D.jsx("div",{className:"xs:grid-cols-4 grid grid-cols-3 gap-2 sm:grid-cols-6 md:grid-cols-8 lg:grid-cols-12",children:l.map((m,g)=>D.jsx("div",{className:"relative aspect-square cursor-pointer overflow-hidden rounded-lg",onClick:()=>c(g),children:D.jsx(v0,{src:m.src,alt:m.alt,className:"h-full w-full rounded-lg object-cover transition-transform hover:scale-125",classNames:{wrapper:"h-full w-full",img:"h-full w-full object-cover"}})},m.alt))}),D.jsx(Mz,{isOpen:t,onClose:r,size:"full",hideCloseButton:!0,classNames:{backdrop:"bg-black/90",wrapper:"p-0",base:"bg-transparent shadow-none m-0",body:"p-0"},children:D.jsx(Az,{children:D.jsxs(kz,{className:"relative flex min-h-screen items-center justify-center p-4",children:[D.jsx(To,{isIconOnly:!0,variant:"flat",className:"absolute top-4 right-4 z-50 bg-black/50 text-white",onPress:r,children:D.jsx(Ei,{icon:"heroicons:x-mark",className:"h-6 w-6"})}),l.length>1&&D.jsxs(D.Fragment,{children:[D.jsx(To,{isIconOnly:!0,variant:"flat",className:"absolute top-1/2 left-4 z-50 -translate-y-1/2 bg-black/50 text-white",onPress:d,children:D.jsx(Ei,{icon:"heroicons:chevron-left",className:"h-6 w-6"})}),D.jsx(To,{isIconOnly:!0,variant:"flat",className:"absolute top-1/2 right-4 z-50 -translate-y-1/2 bg-black/50 text-white",onPress:h,children:D.jsx(Ei,{icon:"heroicons:chevron-right",className:"h-6 w-6"})})]}),D.jsx("div",{className:"relative flex max-h-[90vh] max-w-[90vw] items-center justify-center",children:D.jsx(v0,{src:l[i]?.src,alt:l[i]?.alt,className:"max-h-full max-w-full object-contain",classNames:{wrapper:"max-w-full max-h-full",img:"max-w-full max-h-full object-contain"}})}),l.length>1&&D.jsx("div",{className:"absolute bottom-16 left-1/2 flex max-w-[90vw] -translate-x-1/2 gap-2 overflow-x-auto rounded bg-black/30 p-2",children:l.map((m,g)=>D.jsx("button",{onClick:()=>s(g),className:yn("flex-shrink-0 overflow-hidden border-2 border-transparent transition-all",g===i?"z-10 scale-125":"hover:scale-110"),children:D.jsx(v0,{src:m.src,alt:m.alt,className:"h-12 w-12 rounded-lg object-cover",classNames:{wrapper:"w-12 h-12",img:"w-12 h-12 object-cover"}})},m.alt))}),l.length>1&&D.jsx("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 rounded-full bg-black/50 px-4 py-2",children:D.jsxs("span",{className:"text-sm font-medium text-white",children:[i+1," / ",l.length]})})]})})})]})},BH=({references:e})=>D.jsx("div",{className:"text-default-500 text-xs italic",children:D.jsx("ul",{className:"list-disc pl-4",children:e.map((t,n)=>D.jsx("li",{children:D.jsx("a",{href:t.url??void 0,target:"_blank",rel:"noopener noreferrer",className:"hover:underline",children:t.title})},n))})}),zg=e=>D.jsx(X6,{delay:300,closeDelay:0,...e}),m$=e=>{const t=r=>xr.subscribe(r),n=()=>xr.getPlugin(e);return S.useSyncExternalStore(t,n)},kf=({plugin:e,component:t,skeletonSize:n,disableSkeleton:r,componentProps:i})=>{const s=m$(e.name),l=n?{width:n.width,height:n.height}:{};if(!s)return null;const c=s.config.components[t];try{return D.jsx(S.Suspense,{fallback:r?null:D.jsx(Fz,{className:"rounded-lg",style:l}),children:D.jsx(c,{...i||{}})})}catch(d){return console.error(d),null}},g$="UsagePluginName",v$={name:g$,components:{UsageButton:S.lazy(()=>no(()=>import("./UsageButton-Bu-ZOHWk.js"),__vite__mapDeps([9,4,5,6])))}},VH=({content:e,serverId:t,message:n})=>{const[r,i]=S.useState("heroicons:clipboard"),s=S.useRef(null),l=async()=>{await navigator.clipboard.writeText(e),i("heroicons:check"),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{i("heroicons:clipboard")},2e3)};return D.jsxs("div",{className:"flex items-center gap-2",children:[n.usage&&Object.keys(n.usage).length>=1&&D.jsx(kf,{plugin:v$,component:"UsageButton",componentProps:{usage:n.usage},skeletonSize:{width:"88px",height:"40px"}}),D.jsx(zg,{content:"Copy",placement:"bottom",children:D.jsx(To,{isIconOnly:!0,variant:"ghost",className:"p-0","aria-label":"Copy message",onPress:l,children:D.jsx(Ei,{icon:r,"data-testid":"chat-message-copy-icon","data-icon":r})})}),t&&D.jsx(kf,{plugin:I2,component:"FeedbackForm",componentProps:{message:n},skeletonSize:{width:"88px",height:"40px"}})]})},UH=()=>D.jsx("div",{className:"text-default-500 flex items-center gap-2",children:D.jsx(Ei,{icon:"heroicons:arrow-path",className:"animate-spin","data-testid":"loading-indicator"})});class KH{nodes=new Map;roots=[];constructor(t){this.buildTree(t)}buildTree(t){for(const n of t)this.nodes.set(n.id,{...n,children:[]});for(const n of this.nodes.values())if(n.parent_id){const r=this.nodes.get(n.parent_id);r?(r.children.push(n),r.children.sort((i,s)=>i.order-s.order)):(this.roots.push(n),this.roots.sort((i,s)=>i.order-s.order))}else this.roots.push(n),this.roots.sort((r,i)=>r.order-i.order)}*iterate(){function*t(n){for(const r of n)yield r,yield*t(r.children)}yield*t(this.roots)}get(t){return this.nodes.get(t)}update(t,n){const r=this.nodes.get(t);r&&(Object.assign(r,n),n.order!==void 0&&(r.parent_id?this.nodes.get(r.parent_id)?.children.sort((s,l)=>s.order-l.order):this.roots.sort((i,s)=>i.order-s.order)),n.status==="completed"&&this.completeChildren(r))}completeChildren(t){for(const n of t.children)n.status="completed",this.completeChildren(n)}getRoots(){return this.roots}}function y$({tasks:e,depth:t=0}){const n=new KH(e);return D.jsx("div",{className:"space-y-2","data-testid":`todo-list-root-${t}`,children:n.getRoots().map(({id:r,description:i,status:s,summary:l,children:c})=>{const d=D.jsx(J_,{size:"sm",color:"primary","aria-label":"Task is in progress",className:"m-0 p-0",classNames:{svg:"w-4 h-4"}});return D.jsxs("div",{"data-testid":`todo-task-${r}`,children:[D.jsx("div",{children:D.jsxs(V6,{isSelected:s===lf.Completed,disabled:!0,className:"block",icon:s===lf.InProgress?()=>d:void 0,classNames:{hiddenInput:"cursor-default",wrapper:yn(s===lf.InProgress&&"before:border-none"),base:"pointer-events-none hover:bg-transparent",label:yn("transition-colors",s===lf.Completed&&"line-through text-default-400",s===lf.InProgress&&"text-primary italic",s===lf.Pending&&"text-default-900")},children:[i,l&&D.jsx("p",{className:"ml-7",children:l})]})}),c.length>0&&D.jsx("div",{style:{marginLeft:`${(t+1)*.5}rem`},"data-testid":`todo-children-wrapper-${r}`,children:D.jsx(y$,{tasks:c,depth:t+1})})]},`${r}-${s}`)})})}const WH=S.forwardRef(({messageId:e,classNames:t},n)=>{const r=Xl(K=>K.lastMessageId),i=Xl(K=>K.isLoading),s=h$(e);if(!s)throw new Error("Tried to render non-existent message");const{serverId:l,content:c,role:d,references:h,liveUpdates:m,images:g}=s,b=d===wf.User,x=i&&d===wf.Assistant&&e===r,[k,P]=S.useState(!1),_=x&&!m&&!c.length,T=!x,$=!x&&g&&Object.keys(g).length>0,L=!x&&h&&h.length>0,z=m;return D.jsx("div",{ref:n,"data-testid":"chat-message-wrapper",className:yn("flex gap-3",{"flex-row-reverse":b},t?.wrapper),children:D.jsx("div",{className:yn(!k&&"motion-safe:animate-pop-in","flex flex-col gap-4",b&&"max-w-[75%]",!b&&"w-full"),onAnimationEnd:()=>P(!0),children:D.jsx("div",{className:yn("rounded-medium text-default relative px-4 py-3",b&&"bg-default-100",t?.innerWrapper),children:b?D.jsx(lE,{content:c,classNames:t?.content}):D.jsxs("div",{className:"flex flex-col gap-2",children:[_&&D.jsx(UH,{}),z&&D.jsx(zH,{shouldShimmer:x,liveUpdates:m,classNames:{liveUpdates:t?.liveUpdates}}),s.tasks&&s.tasks.length>0&&D.jsx(Au,{children:D.jsxs(yu.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},className:"rounded-medium text-large text-default-900 border-default flex w-fit flex-col gap-2 border p-4",children:[D.jsx("p",{children:"Execution plan"}),D.jsx(y$,{tasks:s.tasks})]},`${s.id}-execution-plan`)}),D.jsx(lE,{content:c,classNames:t?.content}),$&&D.jsx(jH,{images:g}),L&&D.jsx(BH,{references:h}),T&&D.jsx(VH,{content:c,serverId:l,message:s})]})})})})}),HH=S.forwardRef(({classNames:e={},...t},n)=>D.jsx(bz,{ref:n,className:"min-h-[50px]",classNames:e,...t}));function GH({isVisible:e,actions:t,sendMessage:n}){return D.jsx(Au,{children:e&&D.jsx(yu.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{overflow:"hidden",opacity:0,height:0},transition:{type:"tween",ease:"easeInOut",duration:.3},children:D.jsx(l2,{className:yn("flex flex-nowrap gap-2 py-2 transition-all"),orientation:"horizontal",role:"group","aria-label":"Predefined message actions","aria-roledescription":"Horizontal scrollable list","data-testid":"horizontal-actions",children:D.jsx("div",{className:"m-auto flex gap-2",children:t.map((r,i)=>D.jsx(To,{className:"flex",variant:"flat",onPress:()=>n(r),"aria-label":`Send message: ${r}`,children:D.jsx("p",{children:r})},i))})})},"horizontal-actions")})}function qH(){const e=s=>{const l=window.getComputedStyle(s),c=document.createElement("div");return c.style.whiteSpace="pre-wrap",c.style.wordWrap="break-word",c.style.position="absolute",c.style.visibility="hidden",c.style.font=l.font,c.style.lineHeight=l.lineHeight,c.style.padding=l.padding,c.style.border=l.border,c.style.boxSizing=l.boxSizing,c.style.width=`${s.clientWidth}px`,c},t=S.useCallback(s=>{const l=s.value.slice(0,s.selectionStart),c=e(s),d=window.getComputedStyle(s),h=document.createElement("span");h.textContent="",c.textContent=l,c.appendChild(h),document.body.appendChild(c);const m=h.offsetTop,g=parseFloat(d.lineHeight||"16"),b=Math.round(m/g);return document.body.removeChild(c),b},[]),n=S.useCallback(s=>{const l=e(s),c=window.getComputedStyle(s);let d=s.value;(d.endsWith(`
-`)||d==="")&&(d+=""),l.textContent=d,document.body.appendChild(l);const h=l.offsetHeight,m=parseFloat(c.lineHeight||"16"),g=Math.round(h/m);return document.body.removeChild(l),g},[]),r=S.useCallback(s=>t(s)===0,[t]),i=S.useCallback(s=>{const l=t(s),c=n(s);return l===c-1},[t,n]);return{isCaretInFirstLine:r,isCaretInLastLine:i}}const YH=({followupMessages:e,submit:t,stopAnswering:n,isLoading:r,formProps:i,inputProps:s,sendButtonProps:l,customSendIcon:c,customStopIcon:d,history:h})=>{const[m,g]=S.useState(""),[b,x]=S.useState([]),k=S.useRef(null),P=S.useRef(null),{isCaretInFirstLine:_,isCaretInLastLine:T}=qH(),$=S.useRef(Math.max(b.length-1,0)),L=S.useCallback(()=>{const B=b[$.current];g(B)},[b]),z=S.useCallback(()=>{$.current=Math.max($.current-1,0),L()},[L]),K=S.useCallback(()=>{$.current=Math.min(b.length-1,$.current+1),L()},[b,L]),M=S.useCallback(B=>{!m&&!B||(n(),t(B??m),x(Y=>{const te=Y.slice(0,-1);return te.push(B??m),te}),g(""),P?.current?.focus())},[m,n,t]),J=S.useCallback(B=>{B.target===k.current&&(B.preventDefault(),M())},[M]),re=S.useCallback(B=>{if(P.current){if(B.key==="ArrowUp"){if(!_(P.current))return;B.preventDefault(),z()}if(B.key==="ArrowDown"){if(!T(P.current))return;B.preventDefault(),K()}B.key==="Enter"&&!B.shiftKey&&(B.preventDefault(),M())}},[M,_,T,K,z]),ae=S.useCallback(()=>{n(),P?.current?.focus()},[n]),j=S.useCallback(B=>{x(Y=>{const te=[...Y];return te[$.current]=B,te}),g(B)},[]);return S.useEffect(()=>{const B=(h??[]).filter(Y=>Y.role===wf.User).map(Y=>Y.content);b.length-1!==B.length&&(B.push(""),$.current=Math.max(B.length-1,0),x(B))},[h,b.length]),D.jsxs("div",{className:"rounded-medium",children:[D.jsx(GH,{isVisible:!!e,actions:e??[],sendMessage:B=>M(B)}),D.jsxs(N6,{className:"rounded-medium bg-default-100 dark:bg-default-100 flex w-full flex-row items-center pr-2 pl-0",validationBehavior:"native",onSubmit:J,ref:k,...i,children:[D.jsx(HH,{ref:P,"aria-label":"Message to the chat",classNames:{input:"text-medium text-default-foreground",inputWrapper:"!bg-transparent shadow-none group-data-[focus-visible=true]:ring-0 group-data-[focus-visible=true]:ring-offset-0 py-4"},name:"message",placeholder:"Enter a message here",autoFocus:!0,maxRows:16,minRows:1,value:m,onKeyDown:re,onValueChange:j,"data-testid":"prompt-input-input","data-value":m,...s}),D.jsxs("div",{className:"flex items-center gap-2",children:[D.jsx(kf,{plugin:A2,component:"ChatOptionsForm",skeletonSize:{width:"40px",height:"40px"}}),D.jsx(To,{isIconOnly:!0,"aria-label":r?"Stop answering":"Send message to the chat",color:!r&&!m?"default":"primary",isDisabled:!r&&!m,radius:"full",size:"sm",type:r?"button":"submit",onPress:r?ae:void 0,"data-testid":"send-message",...l,children:D.jsxs(D.Fragment,{children:[!r&&(c??D.jsx(Ei,{className:yn(m?"text-primary-foreground":"text-default-600"),icon:"heroicons:arrow-up","data-testid":"prompt-input-send-icon",width:20})),r&&(d??D.jsx(Ei,{className:"text-primary-foreground",icon:"heroicons:stop","data-testid":"prompt-input-stop-icon",width:20}))]})})]})]})]})};function XH({...e}){const t=NH();return D.jsx(YH,{...e,history:t})}const Dw=()=>{const e=S.useContext(R2);if(!e)throw new Error("useChat must be used within a ConfigContextProvider");return e};function nx(){const{config:{customization:e}}=Dw(),t=DH(),n=Xl(K=>K.lastMessageId),r=h$(n),i=Xl(K=>K.isLoading),s=Xl(K=>K.followupMessages),{sendMessage:l,stopAnswering:c}=Mw(),[d,h]=S.useState(!1),[m,g]=S.useState(!0),b=S.useRef(null),x=S.useMemo(()=>t.length>0,[t.length]),{client:k}=c2(),P=K=>{l(K,k)},_=S.useCallback(()=>{if(!b.current)return;const J=b.current,re=J.scrollHeight-J.scrollTop-J.clientHeight;h(re>100),g(!1),re>25?g(!1):g(!0)},[]);S.useEffect(()=>{g(!0),t.length===0&&h(!1)},[t.length]),S.useEffect(()=>{if(b.current&&m){const K=b.current;K.scrollTop=K.scrollHeight}},[_,r,m]),S.useEffect(()=>{const K=b.current;return K?.addEventListener("scroll",_),()=>{K?.removeEventListener("scroll",_)}},[_,x]);const T=S.useCallback(()=>{b.current&&(b.current.scrollTo({top:b.current.scrollHeight,behavior:"smooth"}),g(!0))},[]),$=S.useMemo(()=>D.jsx(l2,{className:"relative flex h-full flex-col gap-6 pb-8",ref:b,children:t.map(K=>D.jsx(WH,{messageId:K},K))}),[t]),L=D.jsx("div",{className:"flex h-full w-full items-center justify-center",children:D.jsxs("div",{className:"flex w-full max-w-[600px] flex-col gap-4",children:[e?.welcome_message&&D.jsx(Hp,{className:"text-large text-default-900 text-center",remarkPlugins:[Gp],children:e?.welcome_message}),D.jsx("div",{className:"text-small text-default-500 text-center",children:"You can start a conversation by typing in the input box below."})]})}),z=x?$:L;return D.jsxs("div",{className:"relative flex h-full flex-col overflow-y-auto p-6 pb-8",children:[z,D.jsxs("div",{className:"relative mt-auto flex max-w-full flex-col gap-2 px-6",children:[D.jsx(To,{variant:"solid",onPress:T,className:yn("absolute -top-16 left-1/2 z-10 -translate-x-1/2 transition-all duration-200 ease-out",d&&x?"opacity-100":"pointer-events-none opacity-0"),tabIndex:-1,startContent:D.jsx(Ei,{icon:"heroicons:arrow-down"}),children:"Scroll to bottom"}),D.jsx(XH,{isLoading:i,submit:P,stopAnswering:c,followupMessages:s})]})]})}function QH(){const t=tI().conversationId;if(!t||typeof t!="string")throw new Error("HistoryRoute expects `conversationId` param to be present in the URL.");return D.jsx(nx,{})}function JH(e){return`/conversation/${e}`}function ZH({children:e}){const t=fw(),n=oa(Ih(c=>Object.keys(c.conversations))),{selectConversation:r}=Mw(),s=tI().conversationId,l=s&&typeof s=="string"&&n.includes(s);return S.useEffect(()=>{if(l){r(s);return}const c=n.at(-1);if(!c)throw new Error("No conversation to navigate to");r(c),t(JH(c),{replace:!0})},[n,l,t,r,s]),e}const Nw="ChatHistoryPlugin",b$={name:Nw,components:{ChatHistory:S.lazy(()=>no(()=>import("./ChatHistory-C7A2uiIQ.js"),__vite__mapDeps([10,3,4,2])))},routes:[{target:"/",path:"/conversation/:conversationId",element:D.jsx(QH,{})}],routeWrappers:[{target:"/",wrapper:e=>D.jsx(ZH,{children:e})}]},eG=S.lazy(()=>no(()=>import("./Login-BWGQs3cn.js"),__vite__mapDeps([11,12,2])));function tG(){return D.jsx(S.Suspense,{children:D.jsx(eG,{})})}const nG=S.lazy(()=>no(()=>import("./AuthGuard-BTxv1Dj_.js"),__vite__mapDeps([13,12])));function rG({children:e}){return D.jsx(S.Suspense,{children:D.jsx(nG,{children:e})})}const x$="AuthPlugin",w$={name:x$,components:{LogoutButton:S.lazy(()=>no(()=>import("./LogoutButton-gJF91B1i.js"),__vite__mapDeps([14,12])))},routes:[{path:"/login",element:D.jsx(tG,{})}],routeWrappers:[{target:"global",wrapper:e=>D.jsx(rG,{children:e})}]};function iG(){return D.jsx("div",{className:yn("bg-background flex h-screen w-screen items-start justify-center"),children:D.jsxs("div",{className:"text-default-900 m-auto flex flex-col items-center gap-4",children:[D.jsx("p",{className:"text-large",children:"Something went wrong during chat initialization."}),D.jsx("p",{className:"text-small text-default-500",children:"Try refreshing the page."})]})})}function oG({children:e}){const{call:t,...n}=Vz("/api/config"),r=S.useMemo(()=>n.data?{config:n.data}:null,[n.data]);return S.useEffect(()=>{if(!n.data)return;const{feedback:i,user_settings:s,conversation_history:l,authentication:c,show_usage:d}=n.data;(i.like.enabled||i.dislike.enabled)&&xr.activate(_2),s.form&&xr.activate($2),l&&xr.activate(Nw),c.enabled&&xr.activate(x$),d&&xr.activate(g$),xr.activate(L2)},[n.data]),!n.data&&!n.error&&!n.isLoading&&t(),S.useEffect(()=>{document.title=Hz},[]),n.isLoading?D.jsx(G2,{}):n.error||!r?D.jsx(iG,{}):D.jsx(R2.Provider,{value:r,children:D.jsx(j7,{shouldStoreHistory:r.config.conversation_history,children:e})})}function sG(e,t){return kh(e,n=>{for(const r of t)for(const i of r.routes??[]){if(!i.target){n.push(i);continue}const s=S$(n,i.target);if(!s){console.warn(`Target route "${i.target}" not found`);continue}s.children||(s.children=[]),s.children.push({path:i.path,element:i.element,children:i.children})}})}function S$(e,t){for(const n of e){if(n.path===t)return n;if(n.children){const r=S$(n.children,t);if(r)return r}}}function lG(e,t){const n=r=>r.map(i=>{const s=i.path??"",l=t.filter(h=>h.target==="global"||h.target===s);let c=i.element;for(const{wrapper:h}of l)c=h(c);const d={...i,element:c};return i.children&&(d.children=n(i.children)),d});return n(e)}function aG(){const e=n=>xr.subscribe(n),t=()=>xr.getActivePlugins();return S.useSyncExternalStore(e,t)}function uG(){const e=S.useContext(f2);if(!e)throw new Error("useThemeContext must be used within a ThemeContextProvider");return e}const cG=e=>typeof e=="boolean"||e instanceof Boolean,fG=e=>typeof e=="number"||e instanceof Number,dG=e=>typeof e=="bigint"||e instanceof BigInt,k$=e=>!!e&&e instanceof Date,pG=e=>typeof e=="string"||e instanceof String,hG=e=>Array.isArray(e),mG=e=>typeof e=="object"&&e!==null,C$=e=>!!e&&e instanceof Object&&typeof e=="function";function cv(e,t){return t===void 0&&(t=!1),!e||t?`"${e}"`:e}function gG(e,t,n){return n?JSON.stringify(e):t?`"${e}"`:e}function E$(e){let{field:t,value:n,data:r,lastElement:i,openBracket:s,closeBracket:l,level:c,style:d,shouldExpandNode:h,clickToExpandNode:m,outerRef:g,beforeExpandChange:b}=e;const x=S.useRef(!1),[k,P]=S.useState(()=>h(c,n,t)),_=S.useRef(null);S.useEffect(()=>{x.current?P(h(c,n,t)):x.current=!0},[h]);const T=S.useId();if(r.length===0)return vG({field:t,openBracket:s,closeBracket:l,lastElement:i,style:d});const $=k?d.collapseIcon:d.expandIcon,L=k?d.ariaLables.collapseJson:d.ariaLables.expandJson,z=c+1,K=r.length-1,M=ae=>{k!==ae&&(!b||b({level:c,value:n,field:t,newExpandValue:ae}))&&P(ae)},J=ae=>{if(ae.key==="ArrowRight"||ae.key==="ArrowLeft")ae.preventDefault(),M(ae.key==="ArrowRight");else if(ae.key==="ArrowUp"||ae.key==="ArrowDown"){ae.preventDefault();const j=ae.key==="ArrowUp"?-1:1;if(!g.current)return;const B=g.current.querySelectorAll("[role=button]");let Y=-1;for(let G=0;G{var ae;M(!k);const j=_.current;if(!j)return;const B=(ae=g.current)===null||ae===void 0?void 0:ae.querySelector('[role=button][tabindex="0"]');B&&(B.tabIndex=-1),j.tabIndex=0,j.focus()};return S.createElement("div",{className:d.basicChildStyle,role:"treeitem","aria-expanded":k,"aria-selected":void 0},S.createElement("span",{className:$,onClick:re,onKeyDown:J,role:"button","aria-label":L,"aria-expanded":k,"aria-controls":k?T:void 0,ref:_,tabIndex:c===0?0:-1}),(t||t==="")&&(m?S.createElement("span",{className:d.clickableLabel,onClick:re,onKeyDown:J},cv(t,d.quotesForFieldNames),":"):S.createElement("span",{className:d.label},cv(t,d.quotesForFieldNames),":")),S.createElement("span",{className:d.punctuation},s),k?S.createElement("ul",{id:T,role:"group",className:d.childFieldsContainer},r.map((ae,j)=>S.createElement(P$,{key:ae[0]||j,field:ae[0],value:ae[1],style:d,lastElement:j===K,level:z,shouldExpandNode:h,clickToExpandNode:m,outerRef:g}))):S.createElement("span",{className:d.collapsedContent,onClick:re,onKeyDown:J}),S.createElement("span",{className:d.punctuation},l),!i&&S.createElement("span",{className:d.punctuation},","))}function vG(e){let{field:t,openBracket:n,closeBracket:r,lastElement:i,style:s}=e;return S.createElement("div",{className:s.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&S.createElement("span",{className:s.label},cv(t,s.quotesForFieldNames),":"),S.createElement("span",{className:s.punctuation},n),S.createElement("span",{className:s.punctuation},r),!i&&S.createElement("span",{className:s.punctuation},","))}function yG(e){let{field:t,value:n,style:r,lastElement:i,shouldExpandNode:s,clickToExpandNode:l,level:c,outerRef:d,beforeExpandChange:h}=e;return E$({field:t,value:n,lastElement:i||!1,level:c,openBracket:"{",closeBracket:"}",style:r,shouldExpandNode:s,clickToExpandNode:l,data:Object.keys(n).map(m=>[m,n[m]]),outerRef:d,beforeExpandChange:h})}function bG(e){let{field:t,value:n,style:r,lastElement:i,level:s,shouldExpandNode:l,clickToExpandNode:c,outerRef:d,beforeExpandChange:h}=e;return E$({field:t,value:n,lastElement:i||!1,level:s,openBracket:"[",closeBracket:"]",style:r,shouldExpandNode:l,clickToExpandNode:c,data:n.map(m=>[void 0,m]),outerRef:d,beforeExpandChange:h})}function xG(e){let{field:t,value:n,style:r,lastElement:i}=e,s,l=r.otherValue;return n===null?(s="null",l=r.nullValue):n===void 0?(s="undefined",l=r.undefinedValue):pG(n)?(s=gG(n,!r.noQuotesForStringValues,r.stringifyStringValues),l=r.stringValue):cG(n)?(s=n?"true":"false",l=r.booleanValue):fG(n)?(s=n.toString(),l=r.numberValue):dG(n)?(s=`${n.toString()}n`,l=r.numberValue):k$(n)?s=n.toISOString():C$(n)?s="function() { }":s=n.toString(),S.createElement("div",{className:r.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&S.createElement("span",{className:r.label},cv(t,r.quotesForFieldNames),":"),S.createElement("span",{className:l},s),!i&&S.createElement("span",{className:r.punctuation},","))}function P$(e){const t=e.value;return hG(t)?S.createElement(bG,Object.assign({},e)):mG(t)&&!k$(t)&&!C$(t)?S.createElement(yG,Object.assign({},e)):S.createElement(xG,Object.assign({},e))}var Dr={"container-light":"_2IvMF _GzYRV","basic-element-style":"_2bkNM","child-fields-container":"_1BXBN","label-light":"_1MGIk","clickable-label-light":"_2YKJg _1MGIk _1MFti","punctuation-light":"_3uHL6 _3eOF8","value-null-light":"_2T6PJ","value-undefined-light":"_1Gho6","value-string-light":"_vGjyY","value-number-light":"_1bQdo","value-boolean-light":"_3zQKs","value-other-light":"_1xvuR","collapse-icon-light":"_oLqym _f10Tu _1MFti _1LId0","expand-icon-light":"_2AXVT _f10Tu _1MFti _1UmXx","collapsed-content-light":"_2KJWg _1pNG9 _1MFti"};const wG={collapseJson:"collapse JSON",expandJson:"expand JSON"},Xi={container:Dr["container-light"],basicChildStyle:Dr["basic-element-style"],childFieldsContainer:Dr["child-fields-container"],label:Dr["label-light"],clickableLabel:Dr["clickable-label-light"],nullValue:Dr["value-null-light"],undefinedValue:Dr["value-undefined-light"],stringValue:Dr["value-string-light"],booleanValue:Dr["value-boolean-light"],numberValue:Dr["value-number-light"],otherValue:Dr["value-other-light"],punctuation:Dr["punctuation-light"],collapseIcon:Dr["collapse-icon-light"],expandIcon:Dr["expand-icon-light"],collapsedContent:Dr["collapsed-content-light"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:wG,stringifyStringValues:!1},Mp=()=>!0,Pg=e=>{let{data:t,style:n=Xi,shouldExpandNode:r=Mp,clickToExpandNode:i=!1,beforeExpandChange:s,...l}=e;const c=S.useRef(null);return S.createElement("div",Object.assign({"aria-label":"JSON view"},l,{className:n.container,ref:c,role:"tree"}),S.createElement(P$,{value:t,style:{...Xi,...n},lastElement:!0,level:0,shouldExpandNode:r,clickToExpandNode:i,outerRef:c,beforeExpandChange:s}))};function SG(e){return typeof e=="string"?e:`map:${String(e)}`}function Yl(e,t=new WeakSet){if(e===null||typeof e!="object")return typeof e=="bigint"?e.toString():typeof e>"u"||typeof e=="function"?void 0:e;if(t.has(e))return"[Circular]";if(t.add(e),e instanceof Date)return e.toISOString();if(e instanceof Map){const r={};for(const[i,s]of e.entries())r[SG(i)]=Yl(s,t);return r}if(e instanceof Set)return Array.from(e).map(r=>Yl(r,t));if(Array.isArray(e))return e.map(r=>Yl(r,t));const n={};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=Yl(e[r],t);i!==void 0&&(n[r]=i)}return n}const Tg={container:"max-w-full overflow-auto rounded bg-default p-2 font-mono font-normal",label:`${Xi.label} !text-default-900`,collapseIcon:`${Xi.collapseIcon} !text-default-900`,expandIcon:`${Xi.expandIcon} !text-default-900`,collapsedContent:`${Xi.collapsedContent} !text-default-900`,punctuation:"!text-default-900",stringValue:`${Xi.stringValue} !text-green-600`,otherValue:`${Xi.otherValue} !text-purple-500`,numberValue:`${Xi.numberValue}`,nullValue:`${Xi.nullValue}`,booleanValue:`${Xi.booleanValue} !text-yellow-600`,undefinedValue:`${Xi.undefinedValue}`};function kG({isOpen:e}){const t=Xl(s=>s.history),n=Xl(s=>s.followupMessages),r=Xl(s=>s.eventsLog),i=oa(Ih(s=>s.computed.getContext()));return D.jsx(Au,{children:e&&D.jsx(yu.div,{initial:{scale:.6,opacity:0,width:0},animate:{scale:1,opacity:1,width:"100%"},exit:{scale:.6,opacity:0,width:0},className:"w-full max-w-[33%] overflow-hidden px-4",children:D.jsxs("div",{className:"rounded-medium border-small border-divider mr-4 h-full overflow-auto","data-testid":"debug-panel",children:[D.jsx("div",{className:"border-b-small border-divider min-h-16 p-4 text-lg font-bold",children:D.jsx("span",{children:"Debug"})}),D.jsxs(_k,{className:"max-h-full",children:[D.jsx(bp,{"aria-label":"Context",title:"Context",children:D.jsx("div",{className:"max-h-[664px] overflow-auto",children:D.jsx(Pg,{data:Yl(i)??{},shouldExpandNode:Mp,style:Tg})})},"context"),D.jsx(bp,{"aria-label":"History",title:"History",children:D.jsx("div",{className:"max-h-[664px] overflow-auto",children:D.jsx(Pg,{data:Yl(t)??{},shouldExpandNode:Mp,style:Tg})})},"history"),D.jsx(bp,{"aria-label":"Followup messages",title:"Followup messages",children:D.jsx("div",{className:"max-h-[664px] overflow-auto",children:D.jsx(Pg,{data:Yl(n)??{},shouldExpandNode:Mp,style:Tg})})},"folowup-messages"),D.jsx(bp,{"aria-label":"Events",title:"Events",children:r.length===0?D.jsx("p",{children:"No events in the log"}):D.jsx(_k,{children:r.map((s,l)=>D.jsx(bp,{"aria-label":`Events for response number ${l+1}`,title:`Events for response number ${l+1}`,children:D.jsx(Pg,{data:Yl(s)??{},shouldExpandNode:Mp,style:Tg})},`events-${l+1}`))})},"events")]})]})})})}function T$(e){return CG(e)?!0:PG(e)&&EG(e)}function CG(e){try{return new URL(e),!0}catch{return!1}}function EG(e){try{const t="http://base.local";return new URL(e,t),!0}catch{return!1}}function PG(e){return/^[./~\w%-][\w./~%-]*$/.test(e)}function TG({children:e,title:t,subTitle:n,logo:r,classNames:i}){const s=m$(Nw),{config:l}=Dw(),{newConversation:c,stopAnswering:d}=Mw(),{setTheme:h,theme:m}=uG(),[g,b]=S.useState(!1),x=()=>{h(m===Eo.DARK?Eo.LIGHT:Eo.DARK)},k=S.useCallback(()=>{d(),c()},[c,d]),P=s?.isActivated;return D.jsxs("div",{className:"flex h-full min-h-[48rem] justify-center py-4",children:[D.jsx(kf,{plugin:b$,component:"ChatHistory",disableSkeleton:!0}),D.jsxs("div",{className:yn("flex grow flex-col px-4 sm:max-w-[1200px]",P&&"pl-0"),children:[D.jsxs("header",{className:yn("border-small border-divider flex h-16 min-h-16 items-center justify-between gap-2 rounded-none px-4 py-3",i?.header,P?"rounded-tr-medium":"rounded-t-medium"),children:[D.jsxs("div",{className:"flex w-full items-center gap-2",children:[T$(r)?D.jsx("img",{src:r,className:"h-8 w-8",width:32,height:32}):D.jsx("div",{className:"bg-foreground flex h-8 w-8 items-center justify-center rounded-full",children:r}),D.jsxs("div",{className:"w-full min-w-[120px] sm:w-auto",children:[D.jsx("div",{className:yn("text-small text-foreground truncate leading-5 font-semibold",i?.title),children:t}),D.jsx("div",{className:yn("text-small text-default-500 truncate leading-5 font-normal",i?.subTitle),children:n})]})]}),D.jsxs("div",{className:"flex items-center gap-2",children:[D.jsx(kf,{plugin:w$,component:"LogoutButton",skeletonSize:{width:"40px",height:"40px"}}),D.jsx(kf,{plugin:M2,component:"ShareButton",skeletonSize:{width:"40px",height:"40px"}}),!P&&D.jsx(zg,{content:"Clear chat",placement:"bottom",children:D.jsx(To,{isIconOnly:!0,"aria-label":"Clear chat",variant:"ghost",onPress:k,"data-testid":"layout-clear-chat-button",children:D.jsx(Ei,{icon:"heroicons:arrow-path"})})}),D.jsx(zg,{content:"Change theme",placement:"bottom",children:D.jsx(To,{isIconOnly:!0,"aria-label":`Change theme to ${m===Eo.DARK?"light":"dark"}`,variant:"ghost",onPress:x,"data-testid":"layout-toggle-theme-button",children:m===Eo.DARK?D.jsx(Ei,{icon:"heroicons:sun"}):D.jsx(Ei,{icon:"heroicons:moon"})})}),l.debug_mode&&D.jsx(zg,{content:"Toggle debug panel",placement:"bottom",children:D.jsxs(To,{isIconOnly:!0,"aria-label":`${g?"Open":"Close"} debug panel`,variant:"ghost",onPress:()=>b(_=>!_),"data-testid":"layout-debug-button",children:[D.jsx(Ei,{icon:"heroicons:bug-ant"}),g&&D.jsx("div",{className:"bg-default-500 absolute top-1/2 right-0 left-0 h-0.5 -rotate-45"})]})})]})]}),D.jsx("main",{className:"flex h-full overflow-hidden",children:D.jsx("div",{className:yn("border-divider flex h-full w-full flex-col gap-4 rounded-none border-0 border-r border-b border-l py-3",i?.container,P?"rounded-br-medium":"rounded-b-medium"),children:e})})]}),D.jsx(kG,{isOpen:g})]})}const aE="generated-favicon";function _G(){const{config:{customization:e}}=Dw(),t=S.useMemo(()=>e?.header?.logo??Uz,[e?.header?.logo]),n=S.useMemo(()=>e?.header?.title??Kz,[e?.header?.title]),r=S.useMemo(()=>e?.header?.subtitle??Wz,[e?.header?.subtitle]),i=S.useMemo(()=>e?.meta?.favicon??t,[e?.meta?.favicon,t]),s=S.useMemo(()=>e?.meta?.page_title??n,[e?.meta?.page_title,n]);S.useLayoutEffect(()=>{document.title=s},[s]);const l=c=>{const d=document.createElement("link");d.rel="icon",d.href=c,d.id=aE,document.head.appendChild(d)};return S.useLayoutEffect(()=>{if(document.querySelectorAll("link[rel*='icon']").forEach(d=>d.remove()),T$(i))l(i);else{const d=`
+`))}function d(x,k,P,_){const T=P.enter("tableCell"),$=P.enter("phrasing"),L=P.containerPhrasing(x,{..._,before:s,after:s});return $(),T(),L}function h(x,k){return lW(x,{align:k,alignDelimiters:r,padding:n,stringLength:i})}function m(x,k,P){const _=x.children;let T=-1;const $=[],L=k.enter("table");for(;++T<_.length;)$[T]=g(_[T],k,P);return L(),$}function g(x,k,P){const _=x.children;let T=-1;const $=[],L=k.enter("tableRow");for(;++T<_.length;)$[T]=d(_[T],x,k,P);return L(),$}function b(x,k,P){let _=o$.inlineCode(x,k,P);return P.stack.includes("tableCell")&&(_=_.replace(/\|/g,"\\$&")),_}}function qW(){return{exit:{taskListCheckValueChecked:nE,taskListCheckValueUnchecked:nE,paragraph:XW}}}function YW(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:QW}}}function nE(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function XW(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let s=-1,l;for(;++s0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const fH={tokenize:bH,partial:!0};function dH(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:gH,continuation:{tokenize:vH},exit:yH}},text:{91:{name:"gfmFootnoteCall",tokenize:mH},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:pH,resolveTo:hH}}}}function pH(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const d=r.events[i][1];if(d.type==="labelImage"){l=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!l||!l._balanced)return n(d);const h=_o(r.sliceSerialize({start:l.end,end:r.now()}));return h.codePointAt(0)!==94||!s.includes(h.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function hH(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",l,t],["exit",l,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function mH(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,l;return c;function c(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),d}function d(g){return g!==94?n(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(g){if(s>999||g===93&&!l||g===null||g===91||Bt(g))return n(g);if(g===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return i.includes(_o(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(g)}return Bt(g)||(l=!0),s++,e.consume(g),g===92?m:h}function m(g){return g===91||g===92||g===93?(e.consume(g),s++,h):h(g)}}function gH(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,l=0,c;return d;function d(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(k){return k===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):n(k)}function m(k){if(l>999||k===93&&!c||k===null||k===91||Bt(k))return n(k);if(k===93){e.exit("chunkString");const P=e.exit("gfmFootnoteDefinitionLabelString");return s=_o(r.sliceSerialize(P)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return Bt(k)||(c=!0),l++,e.consume(k),k===92?g:m}function g(k){return k===91||k===92||k===93?(e.consume(k),l++,m):m(k)}function b(k){return k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),i.includes(s)||i.push(s),Ct(e,x,"gfmFootnoteDefinitionWhitespace")):n(k)}function x(k){return t(k)}}function vH(e,t,n){return e.check(Th,t,e.attempt(fH,t,n))}function yH(e){e.exit("gfmFootnoteDefinition")}function bH(e,t,n){const r=this;return Ct(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(s):n(s)}}function xH(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,c){let d=-1;for(;++d1?d(k):(l.consume(k),g++,x);if(g<2&&!n)return d(k);const _=l.exit("strikethroughSequenceTemporary"),T=Df(k);return _._open=!T||T===2&&!!P,_._close=!P||P===2&&!!T,c(k)}}}class wH{constructor(){this.map=[]}add(t,n,r){SH(this,t,n,r)}consume(t){if(this.map.sort(function(s,l){return s[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const s of i)t.push(s);i=r.pop()}this.map.length=0}}function SH(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i-1;){const G=r.events[B][1].type;if(G==="lineEnding"||G==="linePrefix")B--;else break}const Y=B>-1?r.events[B][1].type:null,te=Y==="tableHead"||Y==="tableRow"?M:d;return te===M&&r.parser.lazy[r.now().line]?n(j):te(j)}function d(j){return e.enter("tableHead"),e.enter("tableRow"),h(j)}function h(j){return j===124||(l=!0,s+=1),m(j)}function m(j){return j===null?n(j):qe(j)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),x):n(j):vt(j)?Ct(e,m,"whitespace")(j):(s+=1,l&&(l=!1,i+=1),j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),l=!0,m):(e.enter("data"),g(j)))}function g(j){return j===null||j===124||Bt(j)?(e.exit("data"),m(j)):(e.consume(j),j===92?b:g)}function b(j){return j===92||j===124?(e.consume(j),g):g(j)}function x(j){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(j):(e.enter("tableDelimiterRow"),l=!1,vt(j)?Ct(e,k,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):k(j))}function k(j){return j===45||j===58?_(j):j===124?(l=!0,e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),P):K(j)}function P(j){return vt(j)?Ct(e,_,"whitespace")(j):_(j)}function _(j){return j===58?(s+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),T):j===45?(s+=1,T(j)):j===null||qe(j)?z(j):K(j)}function T(j){return j===45?(e.enter("tableDelimiterFiller"),$(j)):K(j)}function $(j){return j===45?(e.consume(j),$):j===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),L):(e.exit("tableDelimiterFiller"),L(j))}function L(j){return vt(j)?Ct(e,z,"whitespace")(j):z(j)}function z(j){return j===124?k(j):j===null||qe(j)?!l||i!==s?K(j):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(j)):K(j)}function K(j){return n(j)}function M(j){return e.enter("tableRow"),J(j)}function J(j){return j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),J):j===null||qe(j)?(e.exit("tableRow"),t(j)):vt(j)?Ct(e,J,"whitespace")(j):(e.enter("data"),re(j))}function re(j){return j===null||j===124||Bt(j)?(e.exit("data"),J(j)):(e.consume(j),j===92?ae:re)}function ae(j){return j===92||j===124?(e.consume(j),re):re(j)}}function PH(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],l=[0,0,0,0],c=!1,d=0,h,m,g;const b=new wH;for(;++nn[2]+1){const k=n[2]+1,P=n[3]-n[2]-1;e.add(k,P,[])}}e.add(n[3]+1,0,[["exit",g,t]])}return i!==void 0&&(s.end=Object.assign({},ff(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function rE(e,t,n,r,i){const s=[],l=ff(t.events,n);i&&(i.end=Object.assign({},l),s.push(["exit",i,t])),r.end=Object.assign({},l),s.push(["exit",r,t]),e.add(n+1,0,s)}function ff(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const TH={name:"tasklistCheck",tokenize:IH};function _H(){return{text:{91:TH}}}function IH(e,t,n){const r=this;return i;function i(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),s)}function s(d){return Bt(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),l):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),l):n(d)}function l(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(d)}function c(d){return qe(d)?t(d):vt(d)?e.check({tokenize:$H},t,n)(d):n(d)}}function $H(e,t,n){return Ct(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function AH(e){return CI([nH(),dH(),xH(e),CH(),_H()])}const RH={};function Gp(e){const t=this,n=e||RH,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(AH(n)),s.push(JW()),l.push(ZW(n))}const iE=e=>Symbol.iterator in e,oE=e=>"entries"in e,sE=(e,t)=>{const n=e instanceof Map?e:new Map(e.entries()),r=t instanceof Map?t:new Map(t.entries());if(n.size!==r.size)return!1;for(const[i,s]of n)if(!Object.is(s,r.get(i)))return!1;return!0},LH=(e,t)=>{const n=e[Symbol.iterator](),r=t[Symbol.iterator]();let i=n.next(),s=r.next();for(;!i.done&&!s.done;){if(!Object.is(i.value,s.value))return!1;i=n.next(),s=r.next()}return!!i.done&&!!s.done};function MH(e,t){return Object.is(e,t)?!0:typeof e!="object"||e===null||typeof t!="object"||t===null||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)?!1:iE(e)&&iE(t)?oE(e)&&oE(t)?sE(e,t):LH(e,t):sE({entries:()=>Object.entries(e)},{entries:()=>Object.entries(t)})}function Ih(e){const t=We.useRef(void 0);return n=>{const r=e(n);return MH(t.current,r)?t.current:t.current=r}}const oa=e=>{const t=S.useContext(H2);if(!t||!t.store)throw new Error("useHistoryStore must be used within a HistoryStoreContextProvider");return D2(t.store,e)},Mw=()=>oa(e=>e.actions),HG=()=>oa(e=>e.primitives),Xl=e=>oa(Ih(t=>e(t.primitives.getCurrentConversation()))),h$=e=>oa(t=>e?t.primitives.getCurrentConversation().history[e]:void 0),DH=()=>oa(Ih(e=>Object.keys(e.primitives.getCurrentConversation().history))),NH=()=>oa(Ih(e=>Object.values(e.primitives.getCurrentConversation().history))),lE=({content:e,classNames:t})=>D.jsx(Hp,{className:yn("markdown-container prose dark:prose-invert text-default-900 max-w-full",t),remarkPlugins:[Gp],components:{pre:({children:n})=>D.jsx("pre",{className:"bg-default text-default-900 mt-2 mb-2 max-w-full overflow-auto rounded p-2 font-mono text-[90%] font-normal",children:n}),code:({children:n})=>D.jsx("code",{className:"bg-default text-default-900 rounded px-1 py-0.5 font-mono text-[85%] font-normal",children:n})},children:e}),FH=2;function OH({duration:e,className:t,children:n}){return D.jsx(yu.div,{className:yn("from-default-600 via-default-200 to-default-600 relative inline-block bg-gradient-to-r bg-clip-text text-transparent",t),initial:{backgroundPosition:"200% 0%"},animate:{backgroundPosition:"-200% 0%"},transition:{duration:e??FH,repeat:1/0,ease:"linear"},style:{backgroundSize:"400% 100%"},children:n})}function zH({shouldShimmer:e,liveUpdates:t,classNames:n}){const[r,i]=S.useState(!1),s=Object.values(t),l=S.useCallback(()=>i(g=>!g),[]),c=s.length>1,d=s[s.length-1],h=s.slice(0,-1),m=Math.max((d.description??"").length,d.label.length)/10;return D.jsxs("div",{className:yn("flex flex-col",c&&"cursor-pointer"),onClick:l,children:[D.jsx(yu.div,{initial:!1,animate:{height:r?"auto":0,opacity:r?1:0,marginBottom:r?"0.5rem":0},transition:{duration:.3,ease:"easeInOut"},style:{overflow:"hidden"},children:D.jsx("div",{className:"flex flex-col gap-2",children:h.map((g,b)=>D.jsxs(yu.div,{initial:{opacity:0,y:-10},animate:{opacity:r?1:0,y:r?0:-10},transition:{duration:.3},style:{pointerEvents:r?"auto":"none"},children:[D.jsx("div",{className:"text-default-500",children:g.label}),D.jsx(Hp,{className:yn("markdown-container prose dark:prose-invert text-default-400 max-w-full text-sm",n?.liveUpdates),remarkPlugins:[Gp],children:g.description})]},b))})}),D.jsxs("div",{className:"flex items-center gap-4",children:[D.jsx("div",{className:"relative overflow-hidden bg-transparent",children:e?D.jsxs(OH,{duration:m,children:[D.jsx("div",{children:d.label}),D.jsx(Hp,{className:yn("markdown-container prose dark:prose-invert max-w-full text-sm",n?.liveUpdates),remarkPlugins:[Gp],children:d.description})]}):D.jsxs(D.Fragment,{children:[D.jsx("div",{className:"text-default-500",children:d.label}),D.jsx(Hp,{className:yn("markdown-container prose dark:prose-invert text-default-400 max-w-full text-sm",n?.liveUpdates),remarkPlugins:[Gp],children:d.description})]})}),c&&D.jsx(To,{variant:"light",isIconOnly:!0,onPress:l,"data-testid":"live-updates-expand",children:D.jsx(yu.div,{initial:{rotate:0},animate:{rotate:r?180:0},transition:{duration:.3},children:D.jsx(Ei,{icon:"heroicons:chevron-down"})})})]})]})}const jH=({images:e})=>{const{isOpen:t,onOpen:n,onClose:r}=Dz(),[i,s]=S.useState(0),l=Object.entries(e).map(([m,g])=>({src:g,alt:m})),c=m=>{s(m),n()},d=S.useCallback(()=>{s(m=>m===0?l.length-1:m-1)},[l.length]),h=S.useCallback(()=>{s(m=>m===l.length-1?0:m+1)},[l.length]);return S.useEffect(()=>{if(!t)return;const m=g=>{switch(g.key){case"ArrowLeft":g.preventDefault(),d();break;case"ArrowRight":g.preventDefault(),h();break;case"Escape":g.preventDefault(),r();break}};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[t,d,h,r]),D.jsxs(D.Fragment,{children:[D.jsx("div",{className:"xs:grid-cols-4 grid grid-cols-3 gap-2 sm:grid-cols-6 md:grid-cols-8 lg:grid-cols-12",children:l.map((m,g)=>D.jsx("div",{className:"relative aspect-square cursor-pointer overflow-hidden rounded-lg",onClick:()=>c(g),children:D.jsx(v0,{src:m.src,alt:m.alt,className:"h-full w-full rounded-lg object-cover transition-transform hover:scale-125",classNames:{wrapper:"h-full w-full",img:"h-full w-full object-cover"}})},m.alt))}),D.jsx(Mz,{isOpen:t,onClose:r,size:"full",hideCloseButton:!0,classNames:{backdrop:"bg-black/90",wrapper:"p-0",base:"bg-transparent shadow-none m-0",body:"p-0"},children:D.jsx(Az,{children:D.jsxs(kz,{className:"relative flex min-h-screen items-center justify-center p-4",children:[D.jsx(To,{isIconOnly:!0,variant:"flat",className:"absolute top-4 right-4 z-50 bg-black/50 text-white",onPress:r,children:D.jsx(Ei,{icon:"heroicons:x-mark",className:"h-6 w-6"})}),l.length>1&&D.jsxs(D.Fragment,{children:[D.jsx(To,{isIconOnly:!0,variant:"flat",className:"absolute top-1/2 left-4 z-50 -translate-y-1/2 bg-black/50 text-white",onPress:d,children:D.jsx(Ei,{icon:"heroicons:chevron-left",className:"h-6 w-6"})}),D.jsx(To,{isIconOnly:!0,variant:"flat",className:"absolute top-1/2 right-4 z-50 -translate-y-1/2 bg-black/50 text-white",onPress:h,children:D.jsx(Ei,{icon:"heroicons:chevron-right",className:"h-6 w-6"})})]}),D.jsx("div",{className:"relative flex max-h-[90vh] max-w-[90vw] items-center justify-center",children:D.jsx(v0,{src:l[i]?.src,alt:l[i]?.alt,className:"max-h-full max-w-full object-contain",classNames:{wrapper:"max-w-full max-h-full",img:"max-w-full max-h-full object-contain"}})}),l.length>1&&D.jsx("div",{className:"absolute bottom-16 left-1/2 flex max-w-[90vw] -translate-x-1/2 gap-2 overflow-x-auto rounded bg-black/30 p-2",children:l.map((m,g)=>D.jsx("button",{onClick:()=>s(g),className:yn("flex-shrink-0 overflow-hidden border-2 border-transparent transition-all",g===i?"z-10 scale-125":"hover:scale-110"),children:D.jsx(v0,{src:m.src,alt:m.alt,className:"h-12 w-12 rounded-lg object-cover",classNames:{wrapper:"w-12 h-12",img:"w-12 h-12 object-cover"}})},m.alt))}),l.length>1&&D.jsx("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 rounded-full bg-black/50 px-4 py-2",children:D.jsxs("span",{className:"text-sm font-medium text-white",children:[i+1," / ",l.length]})})]})})})]})},BH=({references:e})=>D.jsx("div",{className:"text-default-500 text-xs italic",children:D.jsx("ul",{className:"list-disc pl-4",children:e.map((t,n)=>D.jsx("li",{children:D.jsx("a",{href:t.url??void 0,target:"_blank",rel:"noopener noreferrer",className:"hover:underline",children:t.title})},n))})}),zg=e=>D.jsx(X6,{delay:300,closeDelay:0,...e}),m$=e=>{const t=r=>xr.subscribe(r),n=()=>xr.getPlugin(e);return S.useSyncExternalStore(t,n)},kf=({plugin:e,component:t,skeletonSize:n,disableSkeleton:r,componentProps:i})=>{const s=m$(e.name),l=n?{width:n.width,height:n.height}:{};if(!s)return null;const c=s.config.components[t];try{return D.jsx(S.Suspense,{fallback:r?null:D.jsx(Fz,{className:"rounded-lg",style:l}),children:D.jsx(c,{...i||{}})})}catch(d){return console.error(d),null}},g$="UsagePluginName",v$={name:g$,components:{UsageButton:S.lazy(()=>no(()=>import("./UsageButton-DstwX8_2.js"),__vite__mapDeps([9,4,5,6])))}},VH=({content:e,serverId:t,message:n})=>{const[r,i]=S.useState("heroicons:clipboard"),s=S.useRef(null),l=async()=>{await navigator.clipboard.writeText(e),i("heroicons:check"),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{i("heroicons:clipboard")},2e3)};return D.jsxs("div",{className:"flex items-center gap-2",children:[n.usage&&Object.keys(n.usage).length>=1&&D.jsx(kf,{plugin:v$,component:"UsageButton",componentProps:{usage:n.usage},skeletonSize:{width:"88px",height:"40px"}}),D.jsx(zg,{content:"Copy",placement:"bottom",children:D.jsx(To,{isIconOnly:!0,variant:"ghost",className:"p-0","aria-label":"Copy message",onPress:l,children:D.jsx(Ei,{icon:r,"data-testid":"chat-message-copy-icon","data-icon":r})})}),t&&D.jsx(kf,{plugin:I2,component:"FeedbackForm",componentProps:{message:n},skeletonSize:{width:"88px",height:"40px"}})]})},UH=()=>D.jsx("div",{className:"text-default-500 flex items-center gap-2",children:D.jsx(Ei,{icon:"heroicons:arrow-path",className:"animate-spin","data-testid":"loading-indicator"})});class KH{nodes=new Map;roots=[];constructor(t){this.buildTree(t)}buildTree(t){for(const n of t)this.nodes.set(n.id,{...n,children:[]});for(const n of this.nodes.values())if(n.parent_id){const r=this.nodes.get(n.parent_id);r?(r.children.push(n),r.children.sort((i,s)=>i.order-s.order)):(this.roots.push(n),this.roots.sort((i,s)=>i.order-s.order))}else this.roots.push(n),this.roots.sort((r,i)=>r.order-i.order)}*iterate(){function*t(n){for(const r of n)yield r,yield*t(r.children)}yield*t(this.roots)}get(t){return this.nodes.get(t)}update(t,n){const r=this.nodes.get(t);r&&(Object.assign(r,n),n.order!==void 0&&(r.parent_id?this.nodes.get(r.parent_id)?.children.sort((s,l)=>s.order-l.order):this.roots.sort((i,s)=>i.order-s.order)),n.status==="completed"&&this.completeChildren(r))}completeChildren(t){for(const n of t.children)n.status="completed",this.completeChildren(n)}getRoots(){return this.roots}}function y$({tasks:e,depth:t=0}){const n=new KH(e);return D.jsx("div",{className:"space-y-2","data-testid":`todo-list-root-${t}`,children:n.getRoots().map(({id:r,description:i,status:s,summary:l,children:c})=>{const d=D.jsx(J_,{size:"sm",color:"primary","aria-label":"Task is in progress",className:"m-0 p-0",classNames:{svg:"w-4 h-4"}});return D.jsxs("div",{"data-testid":`todo-task-${r}`,children:[D.jsx("div",{children:D.jsxs(V6,{isSelected:s===lf.Completed,disabled:!0,className:"block",icon:s===lf.InProgress?()=>d:void 0,classNames:{hiddenInput:"cursor-default",wrapper:yn(s===lf.InProgress&&"before:border-none"),base:"pointer-events-none hover:bg-transparent",label:yn("transition-colors",s===lf.Completed&&"line-through text-default-400",s===lf.InProgress&&"text-primary italic",s===lf.Pending&&"text-default-900")},children:[i,l&&D.jsx("p",{className:"ml-7",children:l})]})}),c.length>0&&D.jsx("div",{style:{marginLeft:`${(t+1)*.5}rem`},"data-testid":`todo-children-wrapper-${r}`,children:D.jsx(y$,{tasks:c,depth:t+1})})]},`${r}-${s}`)})})}const WH=S.forwardRef(({messageId:e,classNames:t},n)=>{const r=Xl(K=>K.lastMessageId),i=Xl(K=>K.isLoading),s=h$(e);if(!s)throw new Error("Tried to render non-existent message");const{serverId:l,content:c,role:d,references:h,liveUpdates:m,images:g}=s,b=d===wf.User,x=i&&d===wf.Assistant&&e===r,[k,P]=S.useState(!1),_=x&&!m&&!c.length,T=!x,$=!x&&g&&Object.keys(g).length>0,L=!x&&h&&h.length>0,z=m;return D.jsx("div",{ref:n,"data-testid":"chat-message-wrapper",className:yn("flex gap-3",{"flex-row-reverse":b},t?.wrapper),children:D.jsx("div",{className:yn(!k&&"motion-safe:animate-pop-in","flex flex-col gap-4",b&&"max-w-[75%]",!b&&"w-full"),onAnimationEnd:()=>P(!0),children:D.jsx("div",{className:yn("rounded-medium text-default relative px-4 py-3",b&&"bg-default-100",t?.innerWrapper),children:b?D.jsx(lE,{content:c,classNames:t?.content}):D.jsxs("div",{className:"flex flex-col gap-2",children:[_&&D.jsx(UH,{}),z&&D.jsx(zH,{shouldShimmer:x,liveUpdates:m,classNames:{liveUpdates:t?.liveUpdates}}),s.tasks&&s.tasks.length>0&&D.jsx(Au,{children:D.jsxs(yu.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},className:"rounded-medium text-large text-default-900 border-default flex w-fit flex-col gap-2 border p-4",children:[D.jsx("p",{children:"Execution plan"}),D.jsx(y$,{tasks:s.tasks})]},`${s.id}-execution-plan`)}),D.jsx(lE,{content:c,classNames:t?.content}),$&&D.jsx(jH,{images:g}),L&&D.jsx(BH,{references:h}),T&&D.jsx(VH,{content:c,serverId:l,message:s})]})})})})}),HH=S.forwardRef(({classNames:e={},...t},n)=>D.jsx(bz,{ref:n,className:"min-h-[50px]",classNames:e,...t}));function GH({isVisible:e,actions:t,sendMessage:n}){return D.jsx(Au,{children:e&&D.jsx(yu.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{overflow:"hidden",opacity:0,height:0},transition:{type:"tween",ease:"easeInOut",duration:.3},children:D.jsx(l2,{className:yn("flex flex-nowrap gap-2 py-2 transition-all"),orientation:"horizontal",role:"group","aria-label":"Predefined message actions","aria-roledescription":"Horizontal scrollable list","data-testid":"horizontal-actions",children:D.jsx("div",{className:"m-auto flex gap-2",children:t.map((r,i)=>D.jsx(To,{className:"flex",variant:"flat",onPress:()=>n(r),"aria-label":`Send message: ${r}`,children:D.jsx("p",{children:r})},i))})})},"horizontal-actions")})}function qH(){const e=s=>{const l=window.getComputedStyle(s),c=document.createElement("div");return c.style.whiteSpace="pre-wrap",c.style.wordWrap="break-word",c.style.position="absolute",c.style.visibility="hidden",c.style.font=l.font,c.style.lineHeight=l.lineHeight,c.style.padding=l.padding,c.style.border=l.border,c.style.boxSizing=l.boxSizing,c.style.width=`${s.clientWidth}px`,c},t=S.useCallback(s=>{const l=s.value.slice(0,s.selectionStart),c=e(s),d=window.getComputedStyle(s),h=document.createElement("span");h.textContent="",c.textContent=l,c.appendChild(h),document.body.appendChild(c);const m=h.offsetTop,g=parseFloat(d.lineHeight||"16"),b=Math.round(m/g);return document.body.removeChild(c),b},[]),n=S.useCallback(s=>{const l=e(s),c=window.getComputedStyle(s);let d=s.value;(d.endsWith(`
+`)||d==="")&&(d+=""),l.textContent=d,document.body.appendChild(l);const h=l.offsetHeight,m=parseFloat(c.lineHeight||"16"),g=Math.round(h/m);return document.body.removeChild(l),g},[]),r=S.useCallback(s=>t(s)===0,[t]),i=S.useCallback(s=>{const l=t(s),c=n(s);return l===c-1},[t,n]);return{isCaretInFirstLine:r,isCaretInLastLine:i}}const YH=({followupMessages:e,submit:t,stopAnswering:n,isLoading:r,formProps:i,inputProps:s,sendButtonProps:l,customSendIcon:c,customStopIcon:d,history:h})=>{const[m,g]=S.useState(""),[b,x]=S.useState([]),k=S.useRef(null),P=S.useRef(null),{isCaretInFirstLine:_,isCaretInLastLine:T}=qH(),$=S.useRef(Math.max(b.length-1,0)),L=S.useCallback(()=>{const B=b[$.current];g(B)},[b]),z=S.useCallback(()=>{$.current=Math.max($.current-1,0),L()},[L]),K=S.useCallback(()=>{$.current=Math.min(b.length-1,$.current+1),L()},[b,L]),M=S.useCallback(B=>{!m&&!B||(n(),t(B??m),x(Y=>{const te=Y.slice(0,-1);return te.push(B??m),te}),g(""),P?.current?.focus())},[m,n,t]),J=S.useCallback(B=>{B.target===k.current&&(B.preventDefault(),M())},[M]),re=S.useCallback(B=>{if(P.current){if(B.key==="ArrowUp"){if(!_(P.current))return;B.preventDefault(),z()}if(B.key==="ArrowDown"){if(!T(P.current))return;B.preventDefault(),K()}B.key==="Enter"&&!B.shiftKey&&(B.preventDefault(),M())}},[M,_,T,K,z]),ae=S.useCallback(()=>{n(),P?.current?.focus()},[n]),j=S.useCallback(B=>{x(Y=>{const te=[...Y];return te[$.current]=B,te}),g(B)},[]);return S.useEffect(()=>{const B=(h??[]).filter(Y=>Y.role===wf.User).map(Y=>Y.content);b.length-1!==B.length&&(B.push(""),$.current=Math.max(B.length-1,0),x(B))},[h,b.length]),D.jsxs("div",{className:"rounded-medium",children:[D.jsx(GH,{isVisible:!!e,actions:e??[],sendMessage:B=>M(B)}),D.jsxs(N6,{className:"rounded-medium bg-default-100 dark:bg-default-100 flex w-full flex-row items-center pr-2 pl-0",validationBehavior:"native",onSubmit:J,ref:k,...i,children:[D.jsx(HH,{ref:P,"aria-label":"Message to the chat",classNames:{input:"text-medium text-default-foreground",inputWrapper:"!bg-transparent shadow-none group-data-[focus-visible=true]:ring-0 group-data-[focus-visible=true]:ring-offset-0 py-4"},name:"message",placeholder:"Enter a message here",autoFocus:!0,maxRows:16,minRows:1,value:m,onKeyDown:re,onValueChange:j,"data-testid":"prompt-input-input","data-value":m,...s}),D.jsxs("div",{className:"flex items-center gap-2",children:[D.jsx(kf,{plugin:A2,component:"ChatOptionsForm",skeletonSize:{width:"40px",height:"40px"}}),D.jsx(To,{isIconOnly:!0,"aria-label":r?"Stop answering":"Send message to the chat",color:!r&&!m?"default":"primary",isDisabled:!r&&!m,radius:"full",size:"sm",type:r?"button":"submit",onPress:r?ae:void 0,"data-testid":"send-message",...l,children:D.jsxs(D.Fragment,{children:[!r&&(c??D.jsx(Ei,{className:yn(m?"text-primary-foreground":"text-default-600"),icon:"heroicons:arrow-up","data-testid":"prompt-input-send-icon",width:20})),r&&(d??D.jsx(Ei,{className:"text-primary-foreground",icon:"heroicons:stop","data-testid":"prompt-input-stop-icon",width:20}))]})})]})]})]})};function XH({...e}){const t=NH();return D.jsx(YH,{...e,history:t})}const Dw=()=>{const e=S.useContext(R2);if(!e)throw new Error("useChat must be used within a ConfigContextProvider");return e};function nx(){const{config:{customization:e}}=Dw(),t=DH(),n=Xl(K=>K.lastMessageId),r=h$(n),i=Xl(K=>K.isLoading),s=Xl(K=>K.followupMessages),{sendMessage:l,stopAnswering:c}=Mw(),[d,h]=S.useState(!1),[m,g]=S.useState(!0),b=S.useRef(null),x=S.useMemo(()=>t.length>0,[t.length]),{client:k}=c2(),P=K=>{l(K,k)},_=S.useCallback(()=>{if(!b.current)return;const J=b.current,re=J.scrollHeight-J.scrollTop-J.clientHeight;h(re>100),g(!1),re>25?g(!1):g(!0)},[]);S.useEffect(()=>{g(!0),t.length===0&&h(!1)},[t.length]),S.useEffect(()=>{if(b.current&&m){const K=b.current;K.scrollTop=K.scrollHeight}},[_,r,m]),S.useEffect(()=>{const K=b.current;return K?.addEventListener("scroll",_),()=>{K?.removeEventListener("scroll",_)}},[_,x]);const T=S.useCallback(()=>{b.current&&(b.current.scrollTo({top:b.current.scrollHeight,behavior:"smooth"}),g(!0))},[]),$=S.useMemo(()=>D.jsx(l2,{className:"relative flex h-full flex-col gap-6 pb-8",ref:b,children:t.map(K=>D.jsx(WH,{messageId:K},K))}),[t]),L=D.jsx("div",{className:"flex h-full w-full items-center justify-center",children:D.jsxs("div",{className:"flex w-full max-w-[600px] flex-col gap-4",children:[e?.welcome_message&&D.jsx(Hp,{className:"text-large text-default-900 text-center",remarkPlugins:[Gp],children:e?.welcome_message}),D.jsx("div",{className:"text-small text-default-500 text-center",children:"You can start a conversation by typing in the input box below."})]})}),z=x?$:L;return D.jsxs("div",{className:"relative flex h-full flex-col overflow-y-auto p-6 pb-8",children:[z,D.jsxs("div",{className:"relative mt-auto flex max-w-full flex-col gap-2 px-6",children:[D.jsx(To,{variant:"solid",onPress:T,className:yn("absolute -top-16 left-1/2 z-10 -translate-x-1/2 transition-all duration-200 ease-out",d&&x?"opacity-100":"pointer-events-none opacity-0"),tabIndex:-1,startContent:D.jsx(Ei,{icon:"heroicons:arrow-down"}),children:"Scroll to bottom"}),D.jsx(XH,{isLoading:i,submit:P,stopAnswering:c,followupMessages:s})]})]})}function QH(){const t=tI().conversationId;if(!t||typeof t!="string")throw new Error("HistoryRoute expects `conversationId` param to be present in the URL.");return D.jsx(nx,{})}function JH(e){return`/conversation/${e}`}function ZH({children:e}){const t=fw(),n=oa(Ih(c=>Object.keys(c.conversations))),{selectConversation:r}=Mw(),s=tI().conversationId,l=s&&typeof s=="string"&&n.includes(s);return S.useEffect(()=>{if(l){r(s);return}const c=n.at(-1);if(!c)throw new Error("No conversation to navigate to");r(c),t(JH(c),{replace:!0})},[n,l,t,r,s]),e}const Nw="ChatHistoryPlugin",b$={name:Nw,components:{ChatHistory:S.lazy(()=>no(()=>import("./ChatHistory-DXJFh5OF.js"),__vite__mapDeps([10,3,4,2])))},routes:[{target:"/",path:"/conversation/:conversationId",element:D.jsx(QH,{})}],routeWrappers:[{target:"/",wrapper:e=>D.jsx(ZH,{children:e})}]},eG=S.lazy(()=>no(()=>import("./Login-Owv53qnj.js"),__vite__mapDeps([11,12,2])));function tG(){return D.jsx(S.Suspense,{children:D.jsx(eG,{})})}const nG=S.lazy(()=>no(()=>import("./AuthGuard-0_PL4fVX.js"),__vite__mapDeps([13,12])));function rG({children:e}){return D.jsx(S.Suspense,{children:D.jsx(nG,{children:e})})}const x$="AuthPlugin",w$={name:x$,components:{LogoutButton:S.lazy(()=>no(()=>import("./LogoutButton-CmhKreNa.js"),__vite__mapDeps([14,12])))},routes:[{path:"/login",element:D.jsx(tG,{})}],routeWrappers:[{target:"global",wrapper:e=>D.jsx(rG,{children:e})}]};function iG(){return D.jsx("div",{className:yn("bg-background flex h-screen w-screen items-start justify-center"),children:D.jsxs("div",{className:"text-default-900 m-auto flex flex-col items-center gap-4",children:[D.jsx("p",{className:"text-large",children:"Something went wrong during chat initialization."}),D.jsx("p",{className:"text-small text-default-500",children:"Try refreshing the page."})]})})}function oG({children:e}){const{call:t,...n}=Vz("/api/config"),r=S.useMemo(()=>n.data?{config:n.data}:null,[n.data]);return S.useEffect(()=>{if(!n.data)return;const{feedback:i,user_settings:s,conversation_history:l,authentication:c,show_usage:d}=n.data;(i.like.enabled||i.dislike.enabled)&&xr.activate(_2),s.form&&xr.activate($2),l&&xr.activate(Nw),c.enabled&&xr.activate(x$),d&&xr.activate(g$),xr.activate(L2)},[n.data]),!n.data&&!n.error&&!n.isLoading&&t(),S.useEffect(()=>{document.title=Hz},[]),n.isLoading?D.jsx(G2,{}):n.error||!r?D.jsx(iG,{}):D.jsx(R2.Provider,{value:r,children:D.jsx(j7,{shouldStoreHistory:r.config.conversation_history,children:e})})}function sG(e,t){return kh(e,n=>{for(const r of t)for(const i of r.routes??[]){if(!i.target){n.push(i);continue}const s=S$(n,i.target);if(!s){console.warn(`Target route "${i.target}" not found`);continue}s.children||(s.children=[]),s.children.push({path:i.path,element:i.element,children:i.children})}})}function S$(e,t){for(const n of e){if(n.path===t)return n;if(n.children){const r=S$(n.children,t);if(r)return r}}}function lG(e,t){const n=r=>r.map(i=>{const s=i.path??"",l=t.filter(h=>h.target==="global"||h.target===s);let c=i.element;for(const{wrapper:h}of l)c=h(c);const d={...i,element:c};return i.children&&(d.children=n(i.children)),d});return n(e)}function aG(){const e=n=>xr.subscribe(n),t=()=>xr.getActivePlugins();return S.useSyncExternalStore(e,t)}function uG(){const e=S.useContext(f2);if(!e)throw new Error("useThemeContext must be used within a ThemeContextProvider");return e}const cG=e=>typeof e=="boolean"||e instanceof Boolean,fG=e=>typeof e=="number"||e instanceof Number,dG=e=>typeof e=="bigint"||e instanceof BigInt,k$=e=>!!e&&e instanceof Date,pG=e=>typeof e=="string"||e instanceof String,hG=e=>Array.isArray(e),mG=e=>typeof e=="object"&&e!==null,C$=e=>!!e&&e instanceof Object&&typeof e=="function";function cv(e,t){return t===void 0&&(t=!1),!e||t?`"${e}"`:e}function gG(e,t,n){return n?JSON.stringify(e):t?`"${e}"`:e}function E$(e){let{field:t,value:n,data:r,lastElement:i,openBracket:s,closeBracket:l,level:c,style:d,shouldExpandNode:h,clickToExpandNode:m,outerRef:g,beforeExpandChange:b}=e;const x=S.useRef(!1),[k,P]=S.useState(()=>h(c,n,t)),_=S.useRef(null);S.useEffect(()=>{x.current?P(h(c,n,t)):x.current=!0},[h]);const T=S.useId();if(r.length===0)return vG({field:t,openBracket:s,closeBracket:l,lastElement:i,style:d});const $=k?d.collapseIcon:d.expandIcon,L=k?d.ariaLables.collapseJson:d.ariaLables.expandJson,z=c+1,K=r.length-1,M=ae=>{k!==ae&&(!b||b({level:c,value:n,field:t,newExpandValue:ae}))&&P(ae)},J=ae=>{if(ae.key==="ArrowRight"||ae.key==="ArrowLeft")ae.preventDefault(),M(ae.key==="ArrowRight");else if(ae.key==="ArrowUp"||ae.key==="ArrowDown"){ae.preventDefault();const j=ae.key==="ArrowUp"?-1:1;if(!g.current)return;const B=g.current.querySelectorAll("[role=button]");let Y=-1;for(let G=0;G{var ae;M(!k);const j=_.current;if(!j)return;const B=(ae=g.current)===null||ae===void 0?void 0:ae.querySelector('[role=button][tabindex="0"]');B&&(B.tabIndex=-1),j.tabIndex=0,j.focus()};return S.createElement("div",{className:d.basicChildStyle,role:"treeitem","aria-expanded":k,"aria-selected":void 0},S.createElement("span",{className:$,onClick:re,onKeyDown:J,role:"button","aria-label":L,"aria-expanded":k,"aria-controls":k?T:void 0,ref:_,tabIndex:c===0?0:-1}),(t||t==="")&&(m?S.createElement("span",{className:d.clickableLabel,onClick:re,onKeyDown:J},cv(t,d.quotesForFieldNames),":"):S.createElement("span",{className:d.label},cv(t,d.quotesForFieldNames),":")),S.createElement("span",{className:d.punctuation},s),k?S.createElement("ul",{id:T,role:"group",className:d.childFieldsContainer},r.map((ae,j)=>S.createElement(P$,{key:ae[0]||j,field:ae[0],value:ae[1],style:d,lastElement:j===K,level:z,shouldExpandNode:h,clickToExpandNode:m,outerRef:g}))):S.createElement("span",{className:d.collapsedContent,onClick:re,onKeyDown:J}),S.createElement("span",{className:d.punctuation},l),!i&&S.createElement("span",{className:d.punctuation},","))}function vG(e){let{field:t,openBracket:n,closeBracket:r,lastElement:i,style:s}=e;return S.createElement("div",{className:s.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&S.createElement("span",{className:s.label},cv(t,s.quotesForFieldNames),":"),S.createElement("span",{className:s.punctuation},n),S.createElement("span",{className:s.punctuation},r),!i&&S.createElement("span",{className:s.punctuation},","))}function yG(e){let{field:t,value:n,style:r,lastElement:i,shouldExpandNode:s,clickToExpandNode:l,level:c,outerRef:d,beforeExpandChange:h}=e;return E$({field:t,value:n,lastElement:i||!1,level:c,openBracket:"{",closeBracket:"}",style:r,shouldExpandNode:s,clickToExpandNode:l,data:Object.keys(n).map(m=>[m,n[m]]),outerRef:d,beforeExpandChange:h})}function bG(e){let{field:t,value:n,style:r,lastElement:i,level:s,shouldExpandNode:l,clickToExpandNode:c,outerRef:d,beforeExpandChange:h}=e;return E$({field:t,value:n,lastElement:i||!1,level:s,openBracket:"[",closeBracket:"]",style:r,shouldExpandNode:l,clickToExpandNode:c,data:n.map(m=>[void 0,m]),outerRef:d,beforeExpandChange:h})}function xG(e){let{field:t,value:n,style:r,lastElement:i}=e,s,l=r.otherValue;return n===null?(s="null",l=r.nullValue):n===void 0?(s="undefined",l=r.undefinedValue):pG(n)?(s=gG(n,!r.noQuotesForStringValues,r.stringifyStringValues),l=r.stringValue):cG(n)?(s=n?"true":"false",l=r.booleanValue):fG(n)?(s=n.toString(),l=r.numberValue):dG(n)?(s=`${n.toString()}n`,l=r.numberValue):k$(n)?s=n.toISOString():C$(n)?s="function() { }":s=n.toString(),S.createElement("div",{className:r.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&S.createElement("span",{className:r.label},cv(t,r.quotesForFieldNames),":"),S.createElement("span",{className:l},s),!i&&S.createElement("span",{className:r.punctuation},","))}function P$(e){const t=e.value;return hG(t)?S.createElement(bG,Object.assign({},e)):mG(t)&&!k$(t)&&!C$(t)?S.createElement(yG,Object.assign({},e)):S.createElement(xG,Object.assign({},e))}var Dr={"container-light":"_2IvMF _GzYRV","basic-element-style":"_2bkNM","child-fields-container":"_1BXBN","label-light":"_1MGIk","clickable-label-light":"_2YKJg _1MGIk _1MFti","punctuation-light":"_3uHL6 _3eOF8","value-null-light":"_2T6PJ","value-undefined-light":"_1Gho6","value-string-light":"_vGjyY","value-number-light":"_1bQdo","value-boolean-light":"_3zQKs","value-other-light":"_1xvuR","collapse-icon-light":"_oLqym _f10Tu _1MFti _1LId0","expand-icon-light":"_2AXVT _f10Tu _1MFti _1UmXx","collapsed-content-light":"_2KJWg _1pNG9 _1MFti"};const wG={collapseJson:"collapse JSON",expandJson:"expand JSON"},Xi={container:Dr["container-light"],basicChildStyle:Dr["basic-element-style"],childFieldsContainer:Dr["child-fields-container"],label:Dr["label-light"],clickableLabel:Dr["clickable-label-light"],nullValue:Dr["value-null-light"],undefinedValue:Dr["value-undefined-light"],stringValue:Dr["value-string-light"],booleanValue:Dr["value-boolean-light"],numberValue:Dr["value-number-light"],otherValue:Dr["value-other-light"],punctuation:Dr["punctuation-light"],collapseIcon:Dr["collapse-icon-light"],expandIcon:Dr["expand-icon-light"],collapsedContent:Dr["collapsed-content-light"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:wG,stringifyStringValues:!1},Mp=()=>!0,Pg=e=>{let{data:t,style:n=Xi,shouldExpandNode:r=Mp,clickToExpandNode:i=!1,beforeExpandChange:s,...l}=e;const c=S.useRef(null);return S.createElement("div",Object.assign({"aria-label":"JSON view"},l,{className:n.container,ref:c,role:"tree"}),S.createElement(P$,{value:t,style:{...Xi,...n},lastElement:!0,level:0,shouldExpandNode:r,clickToExpandNode:i,outerRef:c,beforeExpandChange:s}))};function SG(e){return typeof e=="string"?e:`map:${String(e)}`}function Yl(e,t=new WeakSet){if(e===null||typeof e!="object")return typeof e=="bigint"?e.toString():typeof e>"u"||typeof e=="function"?void 0:e;if(t.has(e))return"[Circular]";if(t.add(e),e instanceof Date)return e.toISOString();if(e instanceof Map){const r={};for(const[i,s]of e.entries())r[SG(i)]=Yl(s,t);return r}if(e instanceof Set)return Array.from(e).map(r=>Yl(r,t));if(Array.isArray(e))return e.map(r=>Yl(r,t));const n={};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=Yl(e[r],t);i!==void 0&&(n[r]=i)}return n}const Tg={container:"max-w-full overflow-auto rounded bg-default p-2 font-mono font-normal",label:`${Xi.label} !text-default-900`,collapseIcon:`${Xi.collapseIcon} !text-default-900`,expandIcon:`${Xi.expandIcon} !text-default-900`,collapsedContent:`${Xi.collapsedContent} !text-default-900`,punctuation:"!text-default-900",stringValue:`${Xi.stringValue} !text-green-600`,otherValue:`${Xi.otherValue} !text-purple-500`,numberValue:`${Xi.numberValue}`,nullValue:`${Xi.nullValue}`,booleanValue:`${Xi.booleanValue} !text-yellow-600`,undefinedValue:`${Xi.undefinedValue}`};function kG({isOpen:e}){const t=Xl(s=>s.history),n=Xl(s=>s.followupMessages),r=Xl(s=>s.eventsLog),i=oa(Ih(s=>s.computed.getContext()));return D.jsx(Au,{children:e&&D.jsx(yu.div,{initial:{scale:.6,opacity:0,width:0},animate:{scale:1,opacity:1,width:"100%"},exit:{scale:.6,opacity:0,width:0},className:"w-full max-w-[33%] overflow-hidden px-4",children:D.jsxs("div",{className:"rounded-medium border-small border-divider mr-4 h-full overflow-auto","data-testid":"debug-panel",children:[D.jsx("div",{className:"border-b-small border-divider min-h-16 p-4 text-lg font-bold",children:D.jsx("span",{children:"Debug"})}),D.jsxs(_k,{className:"max-h-full",children:[D.jsx(bp,{"aria-label":"Context",title:"Context",children:D.jsx("div",{className:"max-h-[664px] overflow-auto",children:D.jsx(Pg,{data:Yl(i)??{},shouldExpandNode:Mp,style:Tg})})},"context"),D.jsx(bp,{"aria-label":"History",title:"History",children:D.jsx("div",{className:"max-h-[664px] overflow-auto",children:D.jsx(Pg,{data:Yl(t)??{},shouldExpandNode:Mp,style:Tg})})},"history"),D.jsx(bp,{"aria-label":"Followup messages",title:"Followup messages",children:D.jsx("div",{className:"max-h-[664px] overflow-auto",children:D.jsx(Pg,{data:Yl(n)??{},shouldExpandNode:Mp,style:Tg})})},"folowup-messages"),D.jsx(bp,{"aria-label":"Events",title:"Events",children:r.length===0?D.jsx("p",{children:"No events in the log"}):D.jsx(_k,{children:r.map((s,l)=>D.jsx(bp,{"aria-label":`Events for response number ${l+1}`,title:`Events for response number ${l+1}`,children:D.jsx(Pg,{data:Yl(s)??{},shouldExpandNode:Mp,style:Tg})},`events-${l+1}`))})},"events")]})]})})})}function T$(e){return CG(e)?!0:PG(e)&&EG(e)}function CG(e){try{return new URL(e),!0}catch{return!1}}function EG(e){try{const t="http://base.local";return new URL(e,t),!0}catch{return!1}}function PG(e){return/^[./~\w%-][\w./~%-]*$/.test(e)}function TG({children:e,title:t,subTitle:n,logo:r,classNames:i}){const s=m$(Nw),{config:l}=Dw(),{newConversation:c,stopAnswering:d}=Mw(),{setTheme:h,theme:m}=uG(),[g,b]=S.useState(!1),x=()=>{h(m===Eo.DARK?Eo.LIGHT:Eo.DARK)},k=S.useCallback(()=>{d(),c()},[c,d]),P=s?.isActivated;return D.jsxs("div",{className:"flex h-full min-h-[48rem] justify-center py-4",children:[D.jsx(kf,{plugin:b$,component:"ChatHistory",disableSkeleton:!0}),D.jsxs("div",{className:yn("flex grow flex-col px-4 sm:max-w-[1200px]",P&&"pl-0"),children:[D.jsxs("header",{className:yn("border-small border-divider flex h-16 min-h-16 items-center justify-between gap-2 rounded-none px-4 py-3",i?.header,P?"rounded-tr-medium":"rounded-t-medium"),children:[D.jsxs("div",{className:"flex w-full items-center gap-2",children:[T$(r)?D.jsx("img",{src:r,className:"h-8 w-8",width:32,height:32}):D.jsx("div",{className:"bg-foreground flex h-8 w-8 items-center justify-center rounded-full",children:r}),D.jsxs("div",{className:"w-full min-w-[120px] sm:w-auto",children:[D.jsx("div",{className:yn("text-small text-foreground truncate leading-5 font-semibold",i?.title),children:t}),D.jsx("div",{className:yn("text-small text-default-500 truncate leading-5 font-normal",i?.subTitle),children:n})]})]}),D.jsxs("div",{className:"flex items-center gap-2",children:[D.jsx(kf,{plugin:w$,component:"LogoutButton",skeletonSize:{width:"40px",height:"40px"}}),D.jsx(kf,{plugin:M2,component:"ShareButton",skeletonSize:{width:"40px",height:"40px"}}),!P&&D.jsx(zg,{content:"Clear chat",placement:"bottom",children:D.jsx(To,{isIconOnly:!0,"aria-label":"Clear chat",variant:"ghost",onPress:k,"data-testid":"layout-clear-chat-button",children:D.jsx(Ei,{icon:"heroicons:arrow-path"})})}),D.jsx(zg,{content:"Change theme",placement:"bottom",children:D.jsx(To,{isIconOnly:!0,"aria-label":`Change theme to ${m===Eo.DARK?"light":"dark"}`,variant:"ghost",onPress:x,"data-testid":"layout-toggle-theme-button",children:m===Eo.DARK?D.jsx(Ei,{icon:"heroicons:sun"}):D.jsx(Ei,{icon:"heroicons:moon"})})}),l.debug_mode&&D.jsx(zg,{content:"Toggle debug panel",placement:"bottom",children:D.jsxs(To,{isIconOnly:!0,"aria-label":`${g?"Open":"Close"} debug panel`,variant:"ghost",onPress:()=>b(_=>!_),"data-testid":"layout-debug-button",children:[D.jsx(Ei,{icon:"heroicons:bug-ant"}),g&&D.jsx("div",{className:"bg-default-500 absolute top-1/2 right-0 left-0 h-0.5 -rotate-45"})]})})]})]}),D.jsx("main",{className:"flex h-full overflow-hidden",children:D.jsx("div",{className:yn("border-divider flex h-full w-full flex-col gap-4 rounded-none border-0 border-r border-b border-l py-3",i?.container,P?"rounded-br-medium":"rounded-b-medium"),children:e})})]}),D.jsx(kG,{isOpen:g})]})}const aE="generated-favicon";function _G(){const{config:{customization:e}}=Dw(),t=S.useMemo(()=>e?.header?.logo??Uz,[e?.header?.logo]),n=S.useMemo(()=>e?.header?.title??Kz,[e?.header?.title]),r=S.useMemo(()=>e?.header?.subtitle??Wz,[e?.header?.subtitle]),i=S.useMemo(()=>e?.meta?.favicon??t,[e?.meta?.favicon,t]),s=S.useMemo(()=>e?.meta?.page_title??n,[e?.meta?.page_title,n]);S.useLayoutEffect(()=>{document.title=s},[s]);const l=c=>{const d=document.createElement("link");d.rel="icon",d.href=c,d.id=aE,document.head.appendChild(d)};return S.useLayoutEffect(()=>{if(document.querySelectorAll("link[rel*='icon']").forEach(d=>d.remove()),T$(i))l(i);else{const d=`
${i}
diff --git a/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/useMenuTriggerState-B-4lUpkM.js b/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/useMenuTriggerState-C6GDlwil.js
similarity index 99%
rename from packages/ragbits-chat/src/ragbits/chat/ui-build/assets/useMenuTriggerState-B-4lUpkM.js
rename to packages/ragbits-chat/src/ragbits/chat/ui-build/assets/useMenuTriggerState-C6GDlwil.js
index 369a6bca8..4f2e56921 100644
--- a/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/useMenuTriggerState-B-4lUpkM.js
+++ b/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/useMenuTriggerState-C6GDlwil.js
@@ -1 +1 @@
-import{r as v,aJ as na,K as ue,t as G,k as da,aK as ca,aL as ia,aM as fa,aN as pa,S as ba,v as O,O as ga,Q as va,aO as ae,R as xa,aP as oe,aQ as ha,W as ma,a0 as ya,Z as _,a1 as Pa,aR as te,a2 as B,aS as $a,aT as Aa,aU as re,aV as Da}from"./index-aPw21Xcf.js";import{a as wa}from"./useSelectableItem-BaL4tj6I.js";function le(a,e,r){let{type:n}=a,{isOpen:u}=e;v.useEffect(()=>{r&&r.current&&na.set(r.current,e.close)});let d;n==="menu"?d=!0:n==="listbox"&&(d="listbox");let c=ue();return{triggerProps:{"aria-haspopup":d,"aria-expanded":u,"aria-controls":u?c:void 0,onPress:e.toggle},overlayProps:{id:c}}}var Ta=G({slots:{base:"w-full relative flex flex-col gap-1 p-1 overflow-clip",list:"w-full flex flex-col gap-0.5 outline-hidden",emptyContent:["h-10","px-2","py-1.5","w-full","h-full","text-foreground-400","text-start"]}}),Ra=G({slots:{base:["flex","group","gap-2","items-center","justify-between","relative","px-2","py-1.5","w-full","h-full","box-border","rounded-small","subpixel-antialiased","outline-hidden","cursor-pointer","tap-highlight-transparent",...da,"data-[focus-visible=true]:dark:ring-offset-background-content1"],wrapper:"w-full flex flex-col items-start justify-center",title:"flex-1 text-small font-normal",description:["w-full","text-tiny","text-foreground-500","group-hover:text-current"],selectedIcon:["text-inherit","w-3","h-3","shrink-0"],shortcut:["px-1","py-0.5","rounded-sm","font-sans","text-foreground-500","text-tiny","border-small","border-default-300","group-hover:border-current"]},variants:{variant:{solid:{base:""},bordered:{base:"border-medium border-transparent bg-transparent"},light:{base:"bg-transparent"},faded:{base:["border-small border-transparent hover:border-default data-[hover=true]:bg-default-100","data-[selectable=true]:focus:border-default data-[selectable=true]:focus:bg-default-100"]},flat:{base:""},shadow:{base:"data-[hover=true]:shadow-lg"}},color:{default:{},primary:{},secondary:{},success:{},warning:{},danger:{}},showDivider:{true:{base:["mb-1.5","after:content-['']","after:absolute","after:-bottom-1","after:left-0","after:right-0","after:h-divider","after:bg-divider"]},false:{}},isDisabled:{true:{base:"opacity-disabled pointer-events-none"}},disableAnimation:{true:{},false:{base:"data-[hover=true]:transition-colors"}},hasTitleTextChild:{true:{title:"truncate"}},hasDescriptionTextChild:{true:{description:"truncate"}}},defaultVariants:{variant:"solid",color:"default",showDivider:!1},compoundVariants:[{variant:"solid",color:"default",class:{base:["data-[hover=true]:bg-default","data-[hover=true]:text-default-foreground","data-[selectable=true]:focus:bg-default","data-[selectable=true]:focus:text-default-foreground"]}},{variant:"solid",color:"primary",class:{base:["data-[hover=true]:bg-primary data-[hover=true]:text-primary-foreground","data-[selectable=true]:focus:bg-primary data-[selectable=true]:focus:text-primary-foreground"]}},{variant:"solid",color:"secondary",class:{base:["data-[hover=true]:bg-secondary data-[hover=true]:text-secondary-foreground","data-[selectable=true]:focus:bg-secondary data-[selectable=true]:focus:text-secondary-foreground"]}},{variant:"solid",color:"success",class:{base:["data-[hover=true]:bg-success data-[hover=true]:text-success-foreground","data-[selectable=true]:focus:bg-success data-[selectable=true]:focus:text-success-foreground"]}},{variant:"solid",color:"warning",class:{base:["data-[hover=true]:bg-warning data-[hover=true]:text-warning-foreground","data-[selectable=true]:focus:bg-warning data-[selectable=true]:focus:text-warning-foreground"]}},{variant:"solid",color:"danger",class:{base:["data-[hover=true]:bg-danger data-[hover=true]:text-danger-foreground","data-[selectable=true]:focus:bg-danger data-[selectable=true]:focus:text-danger-foreground"]}},{variant:"shadow",color:"default",class:{base:["data-[hover=true]:shadow-default/50 data-[hover=true]:bg-default data-[hover=true]:text-default-foreground","data-[selectable=true]:focus:shadow-default/50 data-[selectable=true]:focus:bg-default data-[selectable=true]:focus:text-default-foreground"]}},{variant:"shadow",color:"primary",class:{base:["data-[hover=true]:shadow-primary/30 data-[hover=true]:bg-primary data-[hover=true]:text-primary-foreground","data-[selectable=true]:focus:shadow-primary/30 data-[selectable=true]:focus:bg-primary data-[selectable=true]:focus:text-primary-foreground"]}},{variant:"shadow",color:"secondary",class:{base:["data-[hover=true]:shadow-secondary/30 data-[hover=true]:bg-secondary data-[hover=true]:text-secondary-foreground","data-[selectable=true]:focus:shadow-secondary/30 data-[selectable=true]:focus:bg-secondary data-[selectable=true]:focus:text-secondary-foreground"]}},{variant:"shadow",color:"success",class:{base:["data-[hover=true]:shadow-success/30 data-[hover=true]:bg-success data-[hover=true]:text-success-foreground","data-[selectable=true]:focus:shadow-success/30 data-[selectable=true]:focus:bg-success data-[selectable=true]:focus:text-success-foreground"]}},{variant:"shadow",color:"warning",class:{base:["data-[hover=true]:shadow-warning/30 data-[hover=true]:bg-warning data-[hover=true]:text-warning-foreground","data-[selectable=true]:focus:shadow-warning/30 data-[selectable=true]:focus:bg-warning data-[selectable=true]:focus:text-warning-foreground"]}},{variant:"shadow",color:"danger",class:{base:["data-[hover=true]:shadow-danger/30 data-[hover=true]:bg-danger data-[hover=true]:text-danger-foreground","data-[selectable=true]:focus:shadow-danger/30 data-[selectable=true]:focus:bg-danger data-[selectable=true]:focus:text-danger-foreground"]}},{variant:"bordered",color:"default",class:{base:["data-[hover=true]:border-default","data-[selectable=true]:focus:border-default"]}},{variant:"bordered",color:"primary",class:{base:["data-[hover=true]:border-primary data-[hover=true]:text-primary","data-[selectable=true]:focus:border-primary data-[selectable=true]:focus:text-primary"]}},{variant:"bordered",color:"secondary",class:{base:["data-[hover=true]:border-secondary data-[hover=true]:text-secondary","data-[selectable=true]:focus:border-secondary data-[selectable=true]:focus:text-secondary"]}},{variant:"bordered",color:"success",class:{base:["data-[hover=true]:border-success data-[hover=true]:text-success","data-[selectable=true]:focus:border-success data-[selectable=true]:focus:text-success"]}},{variant:"bordered",color:"warning",class:{base:["data-[hover=true]:border-warning data-[hover=true]:text-warning","data-[selectable=true]:focus:border-warning data-[selectable=true]:focus:text-warning"]}},{variant:"bordered",color:"danger",class:{base:["data-[hover=true]:border-danger data-[hover=true]:text-danger","data-[selectable=true]:focus:border-danger data-[selectable=true]:focus:text-danger"]}},{variant:"flat",color:"default",class:{base:["data-[hover=true]:bg-default/40","data-[hover=true]:text-default-foreground","data-[selectable=true]:focus:bg-default/40","data-[selectable=true]:focus:text-default-foreground"]}},{variant:"flat",color:"primary",class:{base:["data-[hover=true]:bg-primary/20 data-[hover=true]:text-primary","data-[selectable=true]:focus:bg-primary/20 data-[selectable=true]:focus:text-primary"]}},{variant:"flat",color:"secondary",class:{base:["data-[hover=true]:bg-secondary/20 data-[hover=true]:text-secondary","data-[selectable=true]:focus:bg-secondary/20 data-[selectable=true]:focus:text-secondary"]}},{variant:"flat",color:"success",class:{base:["data-[hover=true]:bg-success/20 data-[hover=true]:text-success","data-[selectable=true]:focus:bg-success/20 data-[selectable=true]:focus:text-success"]}},{variant:"flat",color:"warning",class:{base:["data-[hover=true]:bg-warning/20 data-[hover=true]:text-warning","data-[selectable=true]:focus:bg-warning/20 data-[selectable=true]:focus:text-warning"]}},{variant:"flat",color:"danger",class:{base:["data-[hover=true]:bg-danger/20 data-[hover=true]:text-danger","data-[selectable=true]:focus:bg-danger/20 data-[selectable=true]:focus:text-danger"]}},{variant:"faded",color:"default",class:{base:["data-[hover=true]:text-default-foreground","data-[selectable=true]:focus:text-default-foreground"]}},{variant:"faded",color:"primary",class:{base:["data-[hover=true]:text-primary","data-[selectable=true]:focus:text-primary"]}},{variant:"faded",color:"secondary",class:{base:["data-[hover=true]:text-secondary","data-[selectable=true]:focus:text-secondary"]}},{variant:"faded",color:"success",class:{base:["data-[hover=true]:text-success","data-[selectable=true]:focus:text-success"]}},{variant:"faded",color:"warning",class:{base:["data-[hover=true]:text-warning","data-[selectable=true]:focus:text-warning"]}},{variant:"faded",color:"danger",class:{base:["data-[hover=true]:text-danger","data-[selectable=true]:focus:text-danger"]}},{variant:"light",color:"default",class:{base:["data-[hover=true]:text-default-500","data-[selectable=true]:focus:text-default-500"]}},{variant:"light",color:"primary",class:{base:["data-[hover=true]:text-primary","data-[selectable=true]:focus:text-primary"]}},{variant:"light",color:"secondary",class:{base:["data-[hover=true]:text-secondary","data-[selectable=true]:focus:text-secondary"]}},{variant:"light",color:"success",class:{base:["data-[hover=true]:text-success","data-[selectable=true]:focus:text-success"]}},{variant:"light",color:"warning",class:{base:["data-[hover=true]:text-warning","data-[selectable=true]:focus:text-warning"]}},{variant:"light",color:"danger",class:{base:["data-[hover=true]:text-danger","data-[selectable=true]:focus:text-danger"]}}]}),Na=G({slots:{base:"relative mb-2",heading:"pl-1 text-tiny text-foreground-500",group:"data-[has-title=true]:pt-1",divider:"mt-2"}});const se=new WeakMap;function La(a){let e=se.get(a);if(e!=null)return e;let r=0,n=u=>{for(let d of u)d.type==="section"?n(ca(d,a)):d.type==="item"&&r++};return n(a),se.set(a,r),r}var F=new WeakMap,b=[];function Ea(a,e=document.body){let r=new Set(a),n=new Set,u=o=>{for(let i of o.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))r.add(i);let s=i=>{if(r.has(i)||i.parentElement&&n.has(i.parentElement)&&i.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let l of r)if(i.contains(l))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},t=document.createTreeWalker(o,NodeFilter.SHOW_ELEMENT,{acceptNode:s}),p=s(o);if(p===NodeFilter.FILTER_ACCEPT&&d(o),p!==NodeFilter.FILTER_REJECT){let i=t.nextNode();for(;i!=null;)d(i),i=t.nextNode()}},d=o=>{var s;let t=(s=F.get(o))!=null?s:0;o.getAttribute("aria-hidden")==="true"&&t===0||(t===0&&o.setAttribute("aria-hidden","true"),n.add(o),F.set(o,t+1))};b.length&&b[b.length-1].disconnect(),u(e);let c=new MutationObserver(o=>{for(let s of o)if(!(s.type!=="childList"||s.addedNodes.length===0)&&![...r,...n].some(t=>t.contains(s.target))){for(let t of s.removedNodes)t instanceof Element&&(r.delete(t),n.delete(t));for(let t of s.addedNodes)(t instanceof HTMLElement||t instanceof SVGElement)&&(t.dataset.liveAnnouncer==="true"||t.dataset.reactAriaTopLayer==="true")?r.add(t):t instanceof Element&&u(t)}});c.observe(e,{childList:!0,subtree:!0});let x={visibleNodes:r,hiddenNodes:n,observe(){c.observe(e,{childList:!0,subtree:!0})},disconnect(){c.disconnect()}};return b.push(x),()=>{c.disconnect();for(let o of n){let s=F.get(o);s!=null&&(s===1?(o.removeAttribute("aria-hidden"),F.delete(o)):F.set(o,s-1))}x===b[b.length-1]?(b.pop(),b.length&&b[b.length-1].observe()):b.splice(b.indexOf(x),1)}}function Ca(a){let e=b[b.length-1];if(e&&!e.visibleNodes.has(a))return e.visibleNodes.add(a),()=>{e.visibleNodes.delete(a)}}function Ba(a,e){const{groupRef:r,triggerRef:n,popoverRef:u,showArrow:d,offset:c=7,crossOffset:x=0,scrollRef:o,shouldFlip:s,boundaryElement:t,isDismissable:p=!0,shouldCloseOnBlur:i=!0,shouldCloseOnScroll:l=!0,placement:T="top",containerPadding:z,shouldCloseOnInteractOutside:R,isNonModal:N,isKeyboardDismissDisabled:K,updatePositionDeps:k=[],...L}=a,$=N??!0,j=L.trigger==="SubmenuTrigger",{overlayProps:V,underlayProps:H}=ia({isOpen:e.isOpen,onClose:e.close,shouldCloseOnBlur:i,isDismissable:p||j,isKeyboardDismissDisabled:K,shouldCloseOnInteractOutside:R||(D=>{var P;return!((P=n.current)!=null&&P.contains(D))}),disableOutsideEvents:!$},u),{overlayProps:m,arrowProps:U,placement:A,updatePosition:W}=fa({...L,shouldFlip:s,crossOffset:x,targetRef:n,overlayRef:u,isOpen:e.isOpen,scrollRef:o,boundaryElement:t,containerPadding:z,placement:pa(T),offset:d?c+3:c,onClose:$&&!j&&l?e.close:()=>{}});return ba(()=>{k.length&&W()},k),v.useEffect(()=>{var D,P;if(e.isOpen&&u.current)return $?Ca((D=r?.current)!=null?D:u.current):Ea([(P=r?.current)!=null?P:u.current])},[$,e.isOpen,u,r]),{popoverProps:O(V,m),arrowProps:U,underlayProps:H,placement:A}}var ka="top";function ja(a){var e,r,n;const u=ga(),[d,c]=va(a,ae.variantKeys),{as:x,ref:o,children:s,state:t,triggerRef:p,scrollRef:i,defaultOpen:l,onOpenChange:T,isOpen:z,isNonModal:R=!0,shouldFlip:N=!0,containerPadding:K=12,shouldBlockScroll:k=!1,isDismissable:L=!0,shouldCloseOnBlur:$,portalContainer:j,updatePositionDeps:V,dialogProps:H,placement:m=ka,triggerType:U="dialog",showArrow:A=!1,offset:W=7,crossOffset:D=0,boundaryElement:P,isKeyboardDismissDisabled:Ve,shouldCloseOnInteractOutside:He,shouldCloseOnScroll:Ue,motionProps:We,className:Je,classNames:h,onClose:Z,...q}=d,Ge=x||"div",J=xa(o),Ze=v.useRef(null),I=v.useRef(!1),M=p||Ze,qe=(r=(e=a.disableAnimation)!=null?e:u?.disableAnimation)!=null?r:!1,Qe=oe({isOpen:z,defaultOpen:l,onOpenChange:f=>{T?.(f),f||Z?.()}}),g=t||Qe,{popoverProps:Q,underlayProps:X,placement:y}=Ba({triggerRef:M,isNonModal:R,popoverRef:J,placement:m,offset:W,scrollRef:i,isDismissable:L,shouldCloseOnBlur:$,boundaryElement:P,crossOffset:D,shouldFlip:N,containerPadding:K,updatePositionDeps:V,isKeyboardDismissDisabled:Ve,shouldCloseOnScroll:Ue,shouldCloseOnInteractOutside:He},g),Y=v.useMemo(()=>y?ha(y,m)?y:m:null,[y,m]),{triggerProps:w}=le({type:U},g,M),{isFocusVisible:Xe,isFocused:Ye,focusProps:ea}=ma(),E=v.useMemo(()=>ae({...c}),[ya(c)]),aa=_(h?.base,Je);Pa({isDisabled:!(k&&g.isOpen)});const ta=(f={})=>({ref:J,...O(Q,q,f),style:O(Q.style,q.style,f.style)}),ra=(f={})=>({"data-slot":"base","data-open":B(g.isOpen),"data-focus":B(Ye),"data-arrow":B(A),"data-focus-visible":B(Xe),"data-placement":y?te(y,m):void 0,...O(ea,H,f),className:E.base({class:_(aa)}),style:{outline:"none"}}),sa=v.useCallback((f={})=>({"data-slot":"content","data-open":B(g.isOpen),"data-arrow":B(A),"data-placement":y?te(y,m):void 0,className:E.content({class:_(h?.content,f.className)})}),[E,g.isOpen,A,Y,m,h,y]),ee=v.useCallback(f=>{var C;let S;return f.pointerType==="touch"&&(a?.backdrop==="blur"||a?.backdrop==="opaque")?S=setTimeout(()=>{I.current=!0},100):I.current=!0,(C=w.onPress)==null||C.call(w,f),()=>{clearTimeout(S)}},[w?.onPress]),ua=v.useCallback((f={},C=null)=>{const{isDisabled:S,...la}=f;return{"data-slot":"trigger",...O({"aria-haspopup":"dialog"},w,la),onPress:ee,isDisabled:S,className:E.trigger({class:_(h?.trigger,f.className),isTriggerDisabled:S}),ref:$a(C,M)}},[g,w,ee,M]),oa=v.useCallback((f={})=>({"data-slot":"backdrop",className:E.backdrop({class:h?.backdrop}),onClick:C=>{if(!I.current){C.preventDefault();return}g.close(),I.current=!1},...X,...f}),[E,g.isOpen,h,X]);return{state:g,Component:Ge,children:s,classNames:h,showArrow:A,triggerRef:M,placement:Y,isNonModal:R,popoverRef:J,portalContainer:j,isOpen:g.isOpen,onClose:g.close,disableAnimation:qe,shouldBlockScroll:k,backdrop:(n=a.backdrop)!=null?n:"transparent",motionProps:We,getBackdropProps:oa,getPopoverProps:ta,getTriggerProps:ua,getDialogProps:ra,getContentProps:sa}}var ne={};ne={longPressMessage:"اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة"};var de={};de={longPressMessage:"Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто"};var ce={};ce={longPressMessage:"Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku"};var ie={};ie={longPressMessage:"Langt tryk eller tryk på Alt + pil ned for at åbne menuen"};var fe={};fe={longPressMessage:"Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen"};var pe={};pe={longPressMessage:"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού"};var be={};be={longPressMessage:"Long press or press Alt + ArrowDown to open menu"};var ge={};ge={longPressMessage:"Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú"};var ve={};ve={longPressMessage:"Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool"};var xe={};xe={longPressMessage:"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli"};var he={};he={longPressMessage:"Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu."};var me={};me={longPressMessage:"לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט"};var ye={};ye={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"};var Pe={};Pe={longPressMessage:"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához"};var $e={};$e={longPressMessage:"Premere a lungo o premere Alt + Freccia giù per aprire il menu"};var Ae={};Ae={longPressMessage:"長押しまたは Alt+下矢印キーでメニューを開く"};var De={};De={longPressMessage:"길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기"};var we={};we={longPressMessage:"Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“."};var Ee={};Ee={longPressMessage:"Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa"};var Ce={};Ce={longPressMessage:"Langt trykk eller trykk Alt + PilNed for å åpne menyen"};var Be={};Be={longPressMessage:"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"};var ke={};ke={longPressMessage:"Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu"};var Me={};Me={longPressMessage:"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"};var Se={};Se={longPressMessage:"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"};var Fe={};Fe={longPressMessage:"Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul"};var Oe={};Oe={longPressMessage:"Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню"};var Te={};Te={longPressMessage:"Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol"};var Re={};Re={longPressMessage:"Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol"};var Ne={};Ne={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"};var Le={};Le={longPressMessage:"Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn"};var je={};je={longPressMessage:"Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın"};var Ie={};Ie={longPressMessage:"Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню"};var _e={};_e={longPressMessage:"长按或按 Alt + 向下方向键以打开菜单"};var ze={};ze={longPressMessage:"長按或按 Alt+向下鍵以開啟功能表"};var Ke={};Ke={"ar-AE":ne,"bg-BG":de,"cs-CZ":ce,"da-DK":ie,"de-DE":fe,"el-GR":pe,"en-US":be,"es-ES":ge,"et-EE":ve,"fi-FI":xe,"fr-FR":he,"he-IL":me,"hr-HR":ye,"hu-HU":Pe,"it-IT":$e,"ja-JP":Ae,"ko-KR":De,"lt-LT":we,"lv-LV":Ee,"nb-NO":Ce,"nl-NL":Be,"pl-PL":ke,"pt-BR":Me,"pt-PT":Se,"ro-RO":Fe,"ru-RU":Oe,"sk-SK":Te,"sl-SI":Re,"sr-SP":Ne,"sv-SE":Le,"tr-TR":je,"uk-UA":Ie,"zh-CN":_e,"zh-TW":ze};function Ma(a){return a&&a.__esModule?a.default:a}function Ia(a,e,r){let{type:n="menu",isDisabled:u,trigger:d="press"}=a,c=ue(),{triggerProps:x,overlayProps:o}=le({type:n},e,r),s=l=>{if(!u&&!(d==="longPress"&&!l.altKey)&&r&&r.current)switch(l.key){case"Enter":case" ":if(d==="longPress")return;case"ArrowDown":"continuePropagation"in l||l.stopPropagation(),l.preventDefault(),e.toggle("first");break;case"ArrowUp":"continuePropagation"in l||l.stopPropagation(),l.preventDefault(),e.toggle("last");break;default:"continuePropagation"in l&&l.continuePropagation()}},t=Aa(Ma(Ke),"@react-aria/menu"),{longPressProps:p}=wa({isDisabled:u||d!=="longPress",accessibilityDescription:t.format("longPressMessage"),onLongPressStart(){e.close()},onLongPress(){e.open("first")}}),i={preventFocusOnPress:!0,onPressStart(l){l.pointerType!=="touch"&&l.pointerType!=="keyboard"&&!u&&(re(l.target),e.open(l.pointerType==="virtual"?"first":null))},onPress(l){l.pointerType==="touch"&&!u&&(re(l.target),e.toggle())}};return delete x.onPress,{menuTriggerProps:{...x,...d==="press"?i:p,id:c,onKeyDown:s},menuProps:{...o,"aria-labelledby":c,autoFocus:e.focusStrategy||!0,onClose:e.close}}}var Sa=700;function _a(){return Da()||typeof window>"u"?!1:window.screen.width<=Sa}function za(a){let e=oe(a),[r,n]=v.useState(null),[u,d]=v.useState([]),c=()=>{d([]),e.close()};return{focusStrategy:r,...e,open(s=null){n(s),e.open()},toggle(s=null){n(s),e.toggle()},close(){c()},expandedKeysStack:u,openSubmenu:(s,t)=>{d(p=>t>p.length?p:[...p.slice(0,t),s])},closeSubmenu:(s,t)=>{d(p=>p[t]===s?p.slice(0,t):p)}}}export{za as $,Ia as a,La as b,Ra as c,_a as d,Na as e,Ta as m,ja as u};
+import{r as v,aJ as na,K as ue,t as G,k as da,aK as ca,aL as ia,aM as fa,aN as pa,S as ba,v as O,O as ga,Q as va,aO as ae,R as xa,aP as oe,aQ as ha,W as ma,a0 as ya,Z as _,a1 as Pa,aR as te,a2 as B,aS as $a,aT as Aa,aU as re,aV as Da}from"./index-anmhb6wk.js";import{a as wa}from"./useSelectableItem-BIhPf2mL.js";function le(a,e,r){let{type:n}=a,{isOpen:u}=e;v.useEffect(()=>{r&&r.current&&na.set(r.current,e.close)});let d;n==="menu"?d=!0:n==="listbox"&&(d="listbox");let c=ue();return{triggerProps:{"aria-haspopup":d,"aria-expanded":u,"aria-controls":u?c:void 0,onPress:e.toggle},overlayProps:{id:c}}}var Ta=G({slots:{base:"w-full relative flex flex-col gap-1 p-1 overflow-clip",list:"w-full flex flex-col gap-0.5 outline-hidden",emptyContent:["h-10","px-2","py-1.5","w-full","h-full","text-foreground-400","text-start"]}}),Ra=G({slots:{base:["flex","group","gap-2","items-center","justify-between","relative","px-2","py-1.5","w-full","h-full","box-border","rounded-small","subpixel-antialiased","outline-hidden","cursor-pointer","tap-highlight-transparent",...da,"data-[focus-visible=true]:dark:ring-offset-background-content1"],wrapper:"w-full flex flex-col items-start justify-center",title:"flex-1 text-small font-normal",description:["w-full","text-tiny","text-foreground-500","group-hover:text-current"],selectedIcon:["text-inherit","w-3","h-3","shrink-0"],shortcut:["px-1","py-0.5","rounded-sm","font-sans","text-foreground-500","text-tiny","border-small","border-default-300","group-hover:border-current"]},variants:{variant:{solid:{base:""},bordered:{base:"border-medium border-transparent bg-transparent"},light:{base:"bg-transparent"},faded:{base:["border-small border-transparent hover:border-default data-[hover=true]:bg-default-100","data-[selectable=true]:focus:border-default data-[selectable=true]:focus:bg-default-100"]},flat:{base:""},shadow:{base:"data-[hover=true]:shadow-lg"}},color:{default:{},primary:{},secondary:{},success:{},warning:{},danger:{}},showDivider:{true:{base:["mb-1.5","after:content-['']","after:absolute","after:-bottom-1","after:left-0","after:right-0","after:h-divider","after:bg-divider"]},false:{}},isDisabled:{true:{base:"opacity-disabled pointer-events-none"}},disableAnimation:{true:{},false:{base:"data-[hover=true]:transition-colors"}},hasTitleTextChild:{true:{title:"truncate"}},hasDescriptionTextChild:{true:{description:"truncate"}}},defaultVariants:{variant:"solid",color:"default",showDivider:!1},compoundVariants:[{variant:"solid",color:"default",class:{base:["data-[hover=true]:bg-default","data-[hover=true]:text-default-foreground","data-[selectable=true]:focus:bg-default","data-[selectable=true]:focus:text-default-foreground"]}},{variant:"solid",color:"primary",class:{base:["data-[hover=true]:bg-primary data-[hover=true]:text-primary-foreground","data-[selectable=true]:focus:bg-primary data-[selectable=true]:focus:text-primary-foreground"]}},{variant:"solid",color:"secondary",class:{base:["data-[hover=true]:bg-secondary data-[hover=true]:text-secondary-foreground","data-[selectable=true]:focus:bg-secondary data-[selectable=true]:focus:text-secondary-foreground"]}},{variant:"solid",color:"success",class:{base:["data-[hover=true]:bg-success data-[hover=true]:text-success-foreground","data-[selectable=true]:focus:bg-success data-[selectable=true]:focus:text-success-foreground"]}},{variant:"solid",color:"warning",class:{base:["data-[hover=true]:bg-warning data-[hover=true]:text-warning-foreground","data-[selectable=true]:focus:bg-warning data-[selectable=true]:focus:text-warning-foreground"]}},{variant:"solid",color:"danger",class:{base:["data-[hover=true]:bg-danger data-[hover=true]:text-danger-foreground","data-[selectable=true]:focus:bg-danger data-[selectable=true]:focus:text-danger-foreground"]}},{variant:"shadow",color:"default",class:{base:["data-[hover=true]:shadow-default/50 data-[hover=true]:bg-default data-[hover=true]:text-default-foreground","data-[selectable=true]:focus:shadow-default/50 data-[selectable=true]:focus:bg-default data-[selectable=true]:focus:text-default-foreground"]}},{variant:"shadow",color:"primary",class:{base:["data-[hover=true]:shadow-primary/30 data-[hover=true]:bg-primary data-[hover=true]:text-primary-foreground","data-[selectable=true]:focus:shadow-primary/30 data-[selectable=true]:focus:bg-primary data-[selectable=true]:focus:text-primary-foreground"]}},{variant:"shadow",color:"secondary",class:{base:["data-[hover=true]:shadow-secondary/30 data-[hover=true]:bg-secondary data-[hover=true]:text-secondary-foreground","data-[selectable=true]:focus:shadow-secondary/30 data-[selectable=true]:focus:bg-secondary data-[selectable=true]:focus:text-secondary-foreground"]}},{variant:"shadow",color:"success",class:{base:["data-[hover=true]:shadow-success/30 data-[hover=true]:bg-success data-[hover=true]:text-success-foreground","data-[selectable=true]:focus:shadow-success/30 data-[selectable=true]:focus:bg-success data-[selectable=true]:focus:text-success-foreground"]}},{variant:"shadow",color:"warning",class:{base:["data-[hover=true]:shadow-warning/30 data-[hover=true]:bg-warning data-[hover=true]:text-warning-foreground","data-[selectable=true]:focus:shadow-warning/30 data-[selectable=true]:focus:bg-warning data-[selectable=true]:focus:text-warning-foreground"]}},{variant:"shadow",color:"danger",class:{base:["data-[hover=true]:shadow-danger/30 data-[hover=true]:bg-danger data-[hover=true]:text-danger-foreground","data-[selectable=true]:focus:shadow-danger/30 data-[selectable=true]:focus:bg-danger data-[selectable=true]:focus:text-danger-foreground"]}},{variant:"bordered",color:"default",class:{base:["data-[hover=true]:border-default","data-[selectable=true]:focus:border-default"]}},{variant:"bordered",color:"primary",class:{base:["data-[hover=true]:border-primary data-[hover=true]:text-primary","data-[selectable=true]:focus:border-primary data-[selectable=true]:focus:text-primary"]}},{variant:"bordered",color:"secondary",class:{base:["data-[hover=true]:border-secondary data-[hover=true]:text-secondary","data-[selectable=true]:focus:border-secondary data-[selectable=true]:focus:text-secondary"]}},{variant:"bordered",color:"success",class:{base:["data-[hover=true]:border-success data-[hover=true]:text-success","data-[selectable=true]:focus:border-success data-[selectable=true]:focus:text-success"]}},{variant:"bordered",color:"warning",class:{base:["data-[hover=true]:border-warning data-[hover=true]:text-warning","data-[selectable=true]:focus:border-warning data-[selectable=true]:focus:text-warning"]}},{variant:"bordered",color:"danger",class:{base:["data-[hover=true]:border-danger data-[hover=true]:text-danger","data-[selectable=true]:focus:border-danger data-[selectable=true]:focus:text-danger"]}},{variant:"flat",color:"default",class:{base:["data-[hover=true]:bg-default/40","data-[hover=true]:text-default-foreground","data-[selectable=true]:focus:bg-default/40","data-[selectable=true]:focus:text-default-foreground"]}},{variant:"flat",color:"primary",class:{base:["data-[hover=true]:bg-primary/20 data-[hover=true]:text-primary","data-[selectable=true]:focus:bg-primary/20 data-[selectable=true]:focus:text-primary"]}},{variant:"flat",color:"secondary",class:{base:["data-[hover=true]:bg-secondary/20 data-[hover=true]:text-secondary","data-[selectable=true]:focus:bg-secondary/20 data-[selectable=true]:focus:text-secondary"]}},{variant:"flat",color:"success",class:{base:["data-[hover=true]:bg-success/20 data-[hover=true]:text-success","data-[selectable=true]:focus:bg-success/20 data-[selectable=true]:focus:text-success"]}},{variant:"flat",color:"warning",class:{base:["data-[hover=true]:bg-warning/20 data-[hover=true]:text-warning","data-[selectable=true]:focus:bg-warning/20 data-[selectable=true]:focus:text-warning"]}},{variant:"flat",color:"danger",class:{base:["data-[hover=true]:bg-danger/20 data-[hover=true]:text-danger","data-[selectable=true]:focus:bg-danger/20 data-[selectable=true]:focus:text-danger"]}},{variant:"faded",color:"default",class:{base:["data-[hover=true]:text-default-foreground","data-[selectable=true]:focus:text-default-foreground"]}},{variant:"faded",color:"primary",class:{base:["data-[hover=true]:text-primary","data-[selectable=true]:focus:text-primary"]}},{variant:"faded",color:"secondary",class:{base:["data-[hover=true]:text-secondary","data-[selectable=true]:focus:text-secondary"]}},{variant:"faded",color:"success",class:{base:["data-[hover=true]:text-success","data-[selectable=true]:focus:text-success"]}},{variant:"faded",color:"warning",class:{base:["data-[hover=true]:text-warning","data-[selectable=true]:focus:text-warning"]}},{variant:"faded",color:"danger",class:{base:["data-[hover=true]:text-danger","data-[selectable=true]:focus:text-danger"]}},{variant:"light",color:"default",class:{base:["data-[hover=true]:text-default-500","data-[selectable=true]:focus:text-default-500"]}},{variant:"light",color:"primary",class:{base:["data-[hover=true]:text-primary","data-[selectable=true]:focus:text-primary"]}},{variant:"light",color:"secondary",class:{base:["data-[hover=true]:text-secondary","data-[selectable=true]:focus:text-secondary"]}},{variant:"light",color:"success",class:{base:["data-[hover=true]:text-success","data-[selectable=true]:focus:text-success"]}},{variant:"light",color:"warning",class:{base:["data-[hover=true]:text-warning","data-[selectable=true]:focus:text-warning"]}},{variant:"light",color:"danger",class:{base:["data-[hover=true]:text-danger","data-[selectable=true]:focus:text-danger"]}}]}),Na=G({slots:{base:"relative mb-2",heading:"pl-1 text-tiny text-foreground-500",group:"data-[has-title=true]:pt-1",divider:"mt-2"}});const se=new WeakMap;function La(a){let e=se.get(a);if(e!=null)return e;let r=0,n=u=>{for(let d of u)d.type==="section"?n(ca(d,a)):d.type==="item"&&r++};return n(a),se.set(a,r),r}var F=new WeakMap,b=[];function Ea(a,e=document.body){let r=new Set(a),n=new Set,u=o=>{for(let i of o.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))r.add(i);let s=i=>{if(r.has(i)||i.parentElement&&n.has(i.parentElement)&&i.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let l of r)if(i.contains(l))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},t=document.createTreeWalker(o,NodeFilter.SHOW_ELEMENT,{acceptNode:s}),p=s(o);if(p===NodeFilter.FILTER_ACCEPT&&d(o),p!==NodeFilter.FILTER_REJECT){let i=t.nextNode();for(;i!=null;)d(i),i=t.nextNode()}},d=o=>{var s;let t=(s=F.get(o))!=null?s:0;o.getAttribute("aria-hidden")==="true"&&t===0||(t===0&&o.setAttribute("aria-hidden","true"),n.add(o),F.set(o,t+1))};b.length&&b[b.length-1].disconnect(),u(e);let c=new MutationObserver(o=>{for(let s of o)if(!(s.type!=="childList"||s.addedNodes.length===0)&&![...r,...n].some(t=>t.contains(s.target))){for(let t of s.removedNodes)t instanceof Element&&(r.delete(t),n.delete(t));for(let t of s.addedNodes)(t instanceof HTMLElement||t instanceof SVGElement)&&(t.dataset.liveAnnouncer==="true"||t.dataset.reactAriaTopLayer==="true")?r.add(t):t instanceof Element&&u(t)}});c.observe(e,{childList:!0,subtree:!0});let x={visibleNodes:r,hiddenNodes:n,observe(){c.observe(e,{childList:!0,subtree:!0})},disconnect(){c.disconnect()}};return b.push(x),()=>{c.disconnect();for(let o of n){let s=F.get(o);s!=null&&(s===1?(o.removeAttribute("aria-hidden"),F.delete(o)):F.set(o,s-1))}x===b[b.length-1]?(b.pop(),b.length&&b[b.length-1].observe()):b.splice(b.indexOf(x),1)}}function Ca(a){let e=b[b.length-1];if(e&&!e.visibleNodes.has(a))return e.visibleNodes.add(a),()=>{e.visibleNodes.delete(a)}}function Ba(a,e){const{groupRef:r,triggerRef:n,popoverRef:u,showArrow:d,offset:c=7,crossOffset:x=0,scrollRef:o,shouldFlip:s,boundaryElement:t,isDismissable:p=!0,shouldCloseOnBlur:i=!0,shouldCloseOnScroll:l=!0,placement:T="top",containerPadding:z,shouldCloseOnInteractOutside:R,isNonModal:N,isKeyboardDismissDisabled:K,updatePositionDeps:k=[],...L}=a,$=N??!0,j=L.trigger==="SubmenuTrigger",{overlayProps:V,underlayProps:H}=ia({isOpen:e.isOpen,onClose:e.close,shouldCloseOnBlur:i,isDismissable:p||j,isKeyboardDismissDisabled:K,shouldCloseOnInteractOutside:R||(D=>{var P;return!((P=n.current)!=null&&P.contains(D))}),disableOutsideEvents:!$},u),{overlayProps:m,arrowProps:U,placement:A,updatePosition:W}=fa({...L,shouldFlip:s,crossOffset:x,targetRef:n,overlayRef:u,isOpen:e.isOpen,scrollRef:o,boundaryElement:t,containerPadding:z,placement:pa(T),offset:d?c+3:c,onClose:$&&!j&&l?e.close:()=>{}});return ba(()=>{k.length&&W()},k),v.useEffect(()=>{var D,P;if(e.isOpen&&u.current)return $?Ca((D=r?.current)!=null?D:u.current):Ea([(P=r?.current)!=null?P:u.current])},[$,e.isOpen,u,r]),{popoverProps:O(V,m),arrowProps:U,underlayProps:H,placement:A}}var ka="top";function ja(a){var e,r,n;const u=ga(),[d,c]=va(a,ae.variantKeys),{as:x,ref:o,children:s,state:t,triggerRef:p,scrollRef:i,defaultOpen:l,onOpenChange:T,isOpen:z,isNonModal:R=!0,shouldFlip:N=!0,containerPadding:K=12,shouldBlockScroll:k=!1,isDismissable:L=!0,shouldCloseOnBlur:$,portalContainer:j,updatePositionDeps:V,dialogProps:H,placement:m=ka,triggerType:U="dialog",showArrow:A=!1,offset:W=7,crossOffset:D=0,boundaryElement:P,isKeyboardDismissDisabled:Ve,shouldCloseOnInteractOutside:He,shouldCloseOnScroll:Ue,motionProps:We,className:Je,classNames:h,onClose:Z,...q}=d,Ge=x||"div",J=xa(o),Ze=v.useRef(null),I=v.useRef(!1),M=p||Ze,qe=(r=(e=a.disableAnimation)!=null?e:u?.disableAnimation)!=null?r:!1,Qe=oe({isOpen:z,defaultOpen:l,onOpenChange:f=>{T?.(f),f||Z?.()}}),g=t||Qe,{popoverProps:Q,underlayProps:X,placement:y}=Ba({triggerRef:M,isNonModal:R,popoverRef:J,placement:m,offset:W,scrollRef:i,isDismissable:L,shouldCloseOnBlur:$,boundaryElement:P,crossOffset:D,shouldFlip:N,containerPadding:K,updatePositionDeps:V,isKeyboardDismissDisabled:Ve,shouldCloseOnScroll:Ue,shouldCloseOnInteractOutside:He},g),Y=v.useMemo(()=>y?ha(y,m)?y:m:null,[y,m]),{triggerProps:w}=le({type:U},g,M),{isFocusVisible:Xe,isFocused:Ye,focusProps:ea}=ma(),E=v.useMemo(()=>ae({...c}),[ya(c)]),aa=_(h?.base,Je);Pa({isDisabled:!(k&&g.isOpen)});const ta=(f={})=>({ref:J,...O(Q,q,f),style:O(Q.style,q.style,f.style)}),ra=(f={})=>({"data-slot":"base","data-open":B(g.isOpen),"data-focus":B(Ye),"data-arrow":B(A),"data-focus-visible":B(Xe),"data-placement":y?te(y,m):void 0,...O(ea,H,f),className:E.base({class:_(aa)}),style:{outline:"none"}}),sa=v.useCallback((f={})=>({"data-slot":"content","data-open":B(g.isOpen),"data-arrow":B(A),"data-placement":y?te(y,m):void 0,className:E.content({class:_(h?.content,f.className)})}),[E,g.isOpen,A,Y,m,h,y]),ee=v.useCallback(f=>{var C;let S;return f.pointerType==="touch"&&(a?.backdrop==="blur"||a?.backdrop==="opaque")?S=setTimeout(()=>{I.current=!0},100):I.current=!0,(C=w.onPress)==null||C.call(w,f),()=>{clearTimeout(S)}},[w?.onPress]),ua=v.useCallback((f={},C=null)=>{const{isDisabled:S,...la}=f;return{"data-slot":"trigger",...O({"aria-haspopup":"dialog"},w,la),onPress:ee,isDisabled:S,className:E.trigger({class:_(h?.trigger,f.className),isTriggerDisabled:S}),ref:$a(C,M)}},[g,w,ee,M]),oa=v.useCallback((f={})=>({"data-slot":"backdrop",className:E.backdrop({class:h?.backdrop}),onClick:C=>{if(!I.current){C.preventDefault();return}g.close(),I.current=!1},...X,...f}),[E,g.isOpen,h,X]);return{state:g,Component:Ge,children:s,classNames:h,showArrow:A,triggerRef:M,placement:Y,isNonModal:R,popoverRef:J,portalContainer:j,isOpen:g.isOpen,onClose:g.close,disableAnimation:qe,shouldBlockScroll:k,backdrop:(n=a.backdrop)!=null?n:"transparent",motionProps:We,getBackdropProps:oa,getPopoverProps:ta,getTriggerProps:ua,getDialogProps:ra,getContentProps:sa}}var ne={};ne={longPressMessage:"اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة"};var de={};de={longPressMessage:"Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто"};var ce={};ce={longPressMessage:"Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku"};var ie={};ie={longPressMessage:"Langt tryk eller tryk på Alt + pil ned for at åbne menuen"};var fe={};fe={longPressMessage:"Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen"};var pe={};pe={longPressMessage:"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού"};var be={};be={longPressMessage:"Long press or press Alt + ArrowDown to open menu"};var ge={};ge={longPressMessage:"Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú"};var ve={};ve={longPressMessage:"Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool"};var xe={};xe={longPressMessage:"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli"};var he={};he={longPressMessage:"Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu."};var me={};me={longPressMessage:"לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט"};var ye={};ye={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"};var Pe={};Pe={longPressMessage:"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához"};var $e={};$e={longPressMessage:"Premere a lungo o premere Alt + Freccia giù per aprire il menu"};var Ae={};Ae={longPressMessage:"長押しまたは Alt+下矢印キーでメニューを開く"};var De={};De={longPressMessage:"길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기"};var we={};we={longPressMessage:"Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“."};var Ee={};Ee={longPressMessage:"Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa"};var Ce={};Ce={longPressMessage:"Langt trykk eller trykk Alt + PilNed for å åpne menyen"};var Be={};Be={longPressMessage:"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"};var ke={};ke={longPressMessage:"Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu"};var Me={};Me={longPressMessage:"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"};var Se={};Se={longPressMessage:"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"};var Fe={};Fe={longPressMessage:"Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul"};var Oe={};Oe={longPressMessage:"Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню"};var Te={};Te={longPressMessage:"Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol"};var Re={};Re={longPressMessage:"Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol"};var Ne={};Ne={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"};var Le={};Le={longPressMessage:"Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn"};var je={};je={longPressMessage:"Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın"};var Ie={};Ie={longPressMessage:"Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню"};var _e={};_e={longPressMessage:"长按或按 Alt + 向下方向键以打开菜单"};var ze={};ze={longPressMessage:"長按或按 Alt+向下鍵以開啟功能表"};var Ke={};Ke={"ar-AE":ne,"bg-BG":de,"cs-CZ":ce,"da-DK":ie,"de-DE":fe,"el-GR":pe,"en-US":be,"es-ES":ge,"et-EE":ve,"fi-FI":xe,"fr-FR":he,"he-IL":me,"hr-HR":ye,"hu-HU":Pe,"it-IT":$e,"ja-JP":Ae,"ko-KR":De,"lt-LT":we,"lv-LV":Ee,"nb-NO":Ce,"nl-NL":Be,"pl-PL":ke,"pt-BR":Me,"pt-PT":Se,"ro-RO":Fe,"ru-RU":Oe,"sk-SK":Te,"sl-SI":Re,"sr-SP":Ne,"sv-SE":Le,"tr-TR":je,"uk-UA":Ie,"zh-CN":_e,"zh-TW":ze};function Ma(a){return a&&a.__esModule?a.default:a}function Ia(a,e,r){let{type:n="menu",isDisabled:u,trigger:d="press"}=a,c=ue(),{triggerProps:x,overlayProps:o}=le({type:n},e,r),s=l=>{if(!u&&!(d==="longPress"&&!l.altKey)&&r&&r.current)switch(l.key){case"Enter":case" ":if(d==="longPress")return;case"ArrowDown":"continuePropagation"in l||l.stopPropagation(),l.preventDefault(),e.toggle("first");break;case"ArrowUp":"continuePropagation"in l||l.stopPropagation(),l.preventDefault(),e.toggle("last");break;default:"continuePropagation"in l&&l.continuePropagation()}},t=Aa(Ma(Ke),"@react-aria/menu"),{longPressProps:p}=wa({isDisabled:u||d!=="longPress",accessibilityDescription:t.format("longPressMessage"),onLongPressStart(){e.close()},onLongPress(){e.open("first")}}),i={preventFocusOnPress:!0,onPressStart(l){l.pointerType!=="touch"&&l.pointerType!=="keyboard"&&!u&&(re(l.target),e.open(l.pointerType==="virtual"?"first":null))},onPress(l){l.pointerType==="touch"&&!u&&(re(l.target),e.toggle())}};return delete x.onPress,{menuTriggerProps:{...x,...d==="press"?i:p,id:c,onKeyDown:s},menuProps:{...o,"aria-labelledby":c,autoFocus:e.focusStrategy||!0,onClose:e.close}}}var Sa=700;function _a(){return Da()||typeof window>"u"?!1:window.screen.width<=Sa}function za(a){let e=oe(a),[r,n]=v.useState(null),[u,d]=v.useState([]),c=()=>{d([]),e.close()};return{focusStrategy:r,...e,open(s=null){n(s),e.open()},toggle(s=null){n(s),e.toggle()},close(){c()},expandedKeysStack:u,openSubmenu:(s,t)=>{d(p=>t>p.length?p:[...p.slice(0,t),s])},closeSubmenu:(s,t)=>{d(p=>p[t]===s?p.slice(0,t):p)}}}export{za as $,Ia as a,La as b,Ra as c,_a as d,Na as e,Ta as m,ja as u};
diff --git a/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/useSelectableItem-BaL4tj6I.js b/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/useSelectableItem-BIhPf2mL.js
similarity index 98%
rename from packages/ragbits-chat/src/ragbits/chat/ui-build/assets/useSelectableItem-BaL4tj6I.js
rename to packages/ragbits-chat/src/ragbits/chat/ui-build/assets/useSelectableItem-BIhPf2mL.js
index e88edd6f5..c89b37eed 100644
--- a/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/useSelectableItem-BaL4tj6I.js
+++ b/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/useSelectableItem-BIhPf2mL.js
@@ -1 +1 @@
-import{r as P,aX as V,bf as j,U as O,bg as J,aU as N,J as F,ay as X,K as _,b5 as q,bh as z,bi as Q,bj as W,bk as Y,bl as Z}from"./index-aPw21Xcf.js";let ee=0;const E=new Map;function te(r){let[u,t]=P.useState();return V(()=>{if(!r)return;let o=E.get(r);if(o)t(o.element.id);else{let s=`react-aria-description-${ee++}`;t(s);let d=document.createElement("div");d.id=s,d.style.display="none",d.textContent=r,document.body.appendChild(d),o={refCount:0,element:d},E.set(r,o)}return o.refCount++,()=>{o&&--o.refCount===0&&(o.element.remove(),E.delete(r))}},[r]),{"aria-describedby":r?u:void 0}}const oe=500;function re(r){let{isDisabled:u,onLongPressStart:t,onLongPressEnd:o,onLongPress:s,threshold:d=oe,accessibilityDescription:f}=r;const b=P.useRef(void 0);let{addGlobalListener:i,removeGlobalListener:g}=j(),{pressProps:D}=O({isDisabled:u,onPressStart(n){if(n.continuePropagation(),(n.pointerType==="mouse"||n.pointerType==="touch")&&(t&&t({...n,type:"longpressstart"}),b.current=setTimeout(()=>{n.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),J(n.target).activeElement!==n.target&&N(n.target),s&&s({...n,type:"longpress"}),b.current=void 0},d),n.pointerType==="touch")){let l=y=>{y.preventDefault()};i(n.target,"contextmenu",l,{once:!0}),i(window,"pointerup",()=>{setTimeout(()=>{g(n.target,"contextmenu",l)},30)},{once:!0})}},onPressEnd(n){b.current&&clearTimeout(b.current),o&&(n.pointerType==="mouse"||n.pointerType==="touch")&&o({...n,type:"longpressend"})}}),p=te(s&&!u?f:void 0);return{longPressProps:F(D,p)}}function se(r){let{id:u,selectionManager:t,key:o,ref:s,shouldSelectOnPressUp:d,shouldUseVirtualFocus:f,focus:b,isDisabled:i,onAction:g,allowsDifferentPressOrigin:D,linkBehavior:p="action"}=r,n=X();u=_(u);let l=e=>{if(e.pointerType==="keyboard"&&Y(e))t.toggleSelection(o);else{if(t.selectionMode==="none")return;if(t.isLink(o)){if(p==="selection"&&s.current){let v=t.getItemProps(o);n.open(s.current,e,v.href,v.routerOptions),t.setSelectedKeys(t.selectedKeys);return}else if(p==="override"||p==="none")return}t.selectionMode==="single"?t.isSelected(o)&&!t.disallowEmptySelection?t.toggleSelection(o):t.replaceSelection(o):e&&e.shiftKey?t.extendSelection(o):t.selectionBehavior==="toggle"||e&&(Z(e)||e.pointerType==="touch"||e.pointerType==="virtual")?t.toggleSelection(o):t.replaceSelection(o)}};P.useEffect(()=>{o===t.focusedKey&&t.isFocused&&(f?z(s.current):b?b():document.activeElement!==s.current&&s.current&&q(s.current))},[s,o,t.focusedKey,t.childFocusStrategy,t.isFocused,f]),i=i||t.isDisabled(o);let y={};!f&&!i?y={tabIndex:o===t.focusedKey?0:-1,onFocus(e){e.target===s.current&&t.setFocusedKey(o)}}:i&&(y.onMouseDown=e=>{e.preventDefault()});let U=t.isLink(o)&&p==="override",w=t.isLink(o)&&p!=="selection"&&p!=="none",a=!i&&t.canSelectItem(o)&&!U,k=(g||w)&&!i,$=k&&(t.selectionBehavior==="replace"?!a:!a||t.isEmpty),x=k&&a&&t.selectionBehavior==="replace",m=$||x,h=P.useRef(null),S=m&&a,L=P.useRef(!1),K=P.useRef(!1),T=e=>{if(g&&g(),w&&s.current){let v=t.getItemProps(o);n.open(s.current,e,v.href,v.routerOptions)}},c={ref:s};d?(c.onPressStart=e=>{h.current=e.pointerType,L.current=S,e.pointerType==="keyboard"&&(!m||C())&&l(e)},D?(c.onPressUp=$?void 0:e=>{e.pointerType==="mouse"&&a&&l(e)},c.onPress=$?T:e=>{e.pointerType!=="keyboard"&&e.pointerType!=="mouse"&&a&&l(e)}):c.onPress=e=>{if($||x&&e.pointerType!=="mouse"){if(e.pointerType==="keyboard"&&!A())return;T(e)}else e.pointerType!=="keyboard"&&a&&l(e)}):(c.onPressStart=e=>{h.current=e.pointerType,L.current=S,K.current=$,a&&(e.pointerType==="mouse"&&!$||e.pointerType==="keyboard"&&(!k||C()))&&l(e)},c.onPress=e=>{(e.pointerType==="touch"||e.pointerType==="pen"||e.pointerType==="virtual"||e.pointerType==="keyboard"&&m&&A()||e.pointerType==="mouse"&&K.current)&&(m?T(e):a&&l(e))}),y["data-collection"]=Q(t.collection),y["data-key"]=o,c.preventFocusOnPress=f,f&&(c=F(c,{onPressStart(e){e.pointerType!=="touch"&&(t.setFocused(!0),t.setFocusedKey(o))},onPress(e){e.pointerType==="touch"&&(t.setFocused(!0),t.setFocusedKey(o))}}));let{pressProps:M,isPressed:B}=O(c),I=x?e=>{h.current==="mouse"&&(e.stopPropagation(),e.preventDefault(),T(e))}:void 0,{longPressProps:R}=re({isDisabled:!S,onLongPress(e){e.pointerType==="touch"&&(l(e),t.setSelectionBehavior("toggle"))}}),G=e=>{h.current==="touch"&&L.current&&e.preventDefault()},H=t.isLink(o)?e=>{W.isOpening||e.preventDefault()}:void 0;return{itemProps:F(y,a||$||f&&!i?M:{},S?R:{},{onDoubleClick:I,onDragStartCapture:G,onClick:H,id:u},f?{onMouseDown:e=>e.preventDefault()}:void 0),isPressed:B,isSelected:t.isSelected(o),isFocused:t.isFocused&&t.focusedKey===o,isDisabled:i,allowsSelection:a,hasAction:m}}function A(){let r=window.event;return r?.key==="Enter"}function C(){let r=window.event;return r?.key===" "||r?.code==="Space"}export{se as $,re as a,te as b};
+import{r as P,aX as V,bf as j,U as O,bg as J,aU as N,J as F,ay as X,K as _,b5 as q,bh as z,bi as Q,bj as W,bk as Y,bl as Z}from"./index-anmhb6wk.js";let ee=0;const E=new Map;function te(r){let[u,t]=P.useState();return V(()=>{if(!r)return;let o=E.get(r);if(o)t(o.element.id);else{let s=`react-aria-description-${ee++}`;t(s);let d=document.createElement("div");d.id=s,d.style.display="none",d.textContent=r,document.body.appendChild(d),o={refCount:0,element:d},E.set(r,o)}return o.refCount++,()=>{o&&--o.refCount===0&&(o.element.remove(),E.delete(r))}},[r]),{"aria-describedby":r?u:void 0}}const oe=500;function re(r){let{isDisabled:u,onLongPressStart:t,onLongPressEnd:o,onLongPress:s,threshold:d=oe,accessibilityDescription:f}=r;const b=P.useRef(void 0);let{addGlobalListener:i,removeGlobalListener:g}=j(),{pressProps:D}=O({isDisabled:u,onPressStart(n){if(n.continuePropagation(),(n.pointerType==="mouse"||n.pointerType==="touch")&&(t&&t({...n,type:"longpressstart"}),b.current=setTimeout(()=>{n.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),J(n.target).activeElement!==n.target&&N(n.target),s&&s({...n,type:"longpress"}),b.current=void 0},d),n.pointerType==="touch")){let l=y=>{y.preventDefault()};i(n.target,"contextmenu",l,{once:!0}),i(window,"pointerup",()=>{setTimeout(()=>{g(n.target,"contextmenu",l)},30)},{once:!0})}},onPressEnd(n){b.current&&clearTimeout(b.current),o&&(n.pointerType==="mouse"||n.pointerType==="touch")&&o({...n,type:"longpressend"})}}),p=te(s&&!u?f:void 0);return{longPressProps:F(D,p)}}function se(r){let{id:u,selectionManager:t,key:o,ref:s,shouldSelectOnPressUp:d,shouldUseVirtualFocus:f,focus:b,isDisabled:i,onAction:g,allowsDifferentPressOrigin:D,linkBehavior:p="action"}=r,n=X();u=_(u);let l=e=>{if(e.pointerType==="keyboard"&&Y(e))t.toggleSelection(o);else{if(t.selectionMode==="none")return;if(t.isLink(o)){if(p==="selection"&&s.current){let v=t.getItemProps(o);n.open(s.current,e,v.href,v.routerOptions),t.setSelectedKeys(t.selectedKeys);return}else if(p==="override"||p==="none")return}t.selectionMode==="single"?t.isSelected(o)&&!t.disallowEmptySelection?t.toggleSelection(o):t.replaceSelection(o):e&&e.shiftKey?t.extendSelection(o):t.selectionBehavior==="toggle"||e&&(Z(e)||e.pointerType==="touch"||e.pointerType==="virtual")?t.toggleSelection(o):t.replaceSelection(o)}};P.useEffect(()=>{o===t.focusedKey&&t.isFocused&&(f?z(s.current):b?b():document.activeElement!==s.current&&s.current&&q(s.current))},[s,o,t.focusedKey,t.childFocusStrategy,t.isFocused,f]),i=i||t.isDisabled(o);let y={};!f&&!i?y={tabIndex:o===t.focusedKey?0:-1,onFocus(e){e.target===s.current&&t.setFocusedKey(o)}}:i&&(y.onMouseDown=e=>{e.preventDefault()});let U=t.isLink(o)&&p==="override",w=t.isLink(o)&&p!=="selection"&&p!=="none",a=!i&&t.canSelectItem(o)&&!U,k=(g||w)&&!i,$=k&&(t.selectionBehavior==="replace"?!a:!a||t.isEmpty),x=k&&a&&t.selectionBehavior==="replace",m=$||x,h=P.useRef(null),S=m&&a,L=P.useRef(!1),K=P.useRef(!1),T=e=>{if(g&&g(),w&&s.current){let v=t.getItemProps(o);n.open(s.current,e,v.href,v.routerOptions)}},c={ref:s};d?(c.onPressStart=e=>{h.current=e.pointerType,L.current=S,e.pointerType==="keyboard"&&(!m||C())&&l(e)},D?(c.onPressUp=$?void 0:e=>{e.pointerType==="mouse"&&a&&l(e)},c.onPress=$?T:e=>{e.pointerType!=="keyboard"&&e.pointerType!=="mouse"&&a&&l(e)}):c.onPress=e=>{if($||x&&e.pointerType!=="mouse"){if(e.pointerType==="keyboard"&&!A())return;T(e)}else e.pointerType!=="keyboard"&&a&&l(e)}):(c.onPressStart=e=>{h.current=e.pointerType,L.current=S,K.current=$,a&&(e.pointerType==="mouse"&&!$||e.pointerType==="keyboard"&&(!k||C()))&&l(e)},c.onPress=e=>{(e.pointerType==="touch"||e.pointerType==="pen"||e.pointerType==="virtual"||e.pointerType==="keyboard"&&m&&A()||e.pointerType==="mouse"&&K.current)&&(m?T(e):a&&l(e))}),y["data-collection"]=Q(t.collection),y["data-key"]=o,c.preventFocusOnPress=f,f&&(c=F(c,{onPressStart(e){e.pointerType!=="touch"&&(t.setFocused(!0),t.setFocusedKey(o))},onPress(e){e.pointerType==="touch"&&(t.setFocused(!0),t.setFocusedKey(o))}}));let{pressProps:M,isPressed:B}=O(c),I=x?e=>{h.current==="mouse"&&(e.stopPropagation(),e.preventDefault(),T(e))}:void 0,{longPressProps:R}=re({isDisabled:!S,onLongPress(e){e.pointerType==="touch"&&(l(e),t.setSelectionBehavior("toggle"))}}),G=e=>{h.current==="touch"&&L.current&&e.preventDefault()},H=t.isLink(o)?e=>{W.isOpening||e.preventDefault()}:void 0;return{itemProps:F(y,a||$||f&&!i?M:{},S?R:{},{onDoubleClick:I,onDragStartCapture:G,onClick:H,id:u},f?{onMouseDown:e=>e.preventDefault()}:void 0),isPressed:B,isSelected:t.isSelected(o),isFocused:t.isFocused&&t.focusedKey===o,isDisabled:i,allowsSelection:a,hasAction:m}}function A(){let r=window.event;return r?.key==="Enter"}function C(){let r=window.event;return r?.key===" "||r?.code==="Space"}export{se as $,re as a,te as b};
diff --git a/packages/ragbits-chat/src/ragbits/chat/ui-build/index.html b/packages/ragbits-chat/src/ragbits/chat/ui-build/index.html
index 23b2728e5..27303c24f 100644
--- a/packages/ragbits-chat/src/ragbits/chat/ui-build/index.html
+++ b/packages/ragbits-chat/src/ragbits/chat/ui-build/index.html
@@ -3,7 +3,7 @@
-
+
diff --git a/typescript/@ragbits/api-client-react/src/hooks.ts b/typescript/@ragbits/api-client-react/src/hooks.ts
index cace880ba..6f84d898d 100644
--- a/typescript/@ragbits/api-client-react/src/hooks.ts
+++ b/typescript/@ragbits/api-client-react/src/hooks.ts
@@ -7,8 +7,13 @@ import type {
BaseApiEndpoints,
EndpointRequest,
BaseStreamingEndpoints,
+ MakeRequestOptions,
} from '@ragbits/api-client'
-import type { RagbitsCallResult, RagbitsStreamResult } from './types'
+import type {
+ RagbitsCallResult,
+ RagbitsStreamResult,
+ CallFunction,
+} from './types'
import { useRagbitsContext } from './RagbitsContextProvider'
/**
@@ -19,12 +24,13 @@ import { useRagbitsContext } from './RagbitsContextProvider'
*/
export function useRagbitsCall<
Endpoints extends {
- [K in keyof Endpoints]: EndpointDefinition
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ [K in keyof Endpoints]: EndpointDefinition
} = BaseApiEndpoints,
URL extends keyof Endpoints = keyof Endpoints,
>(
endpoint: URL,
- defaultOptions?: RequestOptions
+ defaultOptions?: Partial>
): RagbitsCallResult {
const { client } = useRagbitsContext()
const [data, setData] = useState | null>(
@@ -46,8 +52,10 @@ export function useRagbitsCall<
const call = useCallback(
async (
- options: RequestOptions = {}
+ ...args: MakeRequestOptions
): Promise> => {
+ const options = args[0]
+
// Abort any existing request only if there's one in progress
if (abortControllerRef.current && isLoading) {
abortControllerRef.current.abort()
@@ -62,10 +70,10 @@ export function useRagbitsCall<
try {
const mergedOptions = {
...defaultOptions,
- ...options,
+ ...(options || {}),
headers: {
...defaultOptions?.headers,
- ...options.headers,
+ ...(options?.headers || {}),
},
}
@@ -73,9 +81,9 @@ export function useRagbitsCall<
const requestOptions = {
...mergedOptions,
signal: abortController.signal,
- }
+ } as RequestOptions
- // Now we can use the properly typed makeRequest without casting
+ // Now we can use the properly typed makeRequest
const result = await client.makeRequest(
endpoint,
requestOptions
@@ -108,7 +116,7 @@ export function useRagbitsCall<
}
},
[client, endpoint, defaultOptions, isLoading]
- )
+ ) as CallFunction
const reset = useCallback(() => {
abort()
@@ -134,7 +142,8 @@ export function useRagbitsCall<
*/
export function useRagbitsStream<
Endpoints extends {
- [K in keyof Endpoints]: EndpointDefinition
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ [K in keyof Endpoints]: EndpointDefinition
} = BaseStreamingEndpoints,
URL extends keyof Endpoints = keyof Endpoints,
>(
diff --git a/typescript/@ragbits/api-client-react/src/types.ts b/typescript/@ragbits/api-client-react/src/types.ts
index 771b8bbc0..d0c030076 100644
--- a/typescript/@ragbits/api-client-react/src/types.ts
+++ b/typescript/@ragbits/api-client-react/src/types.ts
@@ -7,22 +7,47 @@ import type {
EndpointRequest,
EndpointResponse,
BaseStreamingEndpoints,
+ HasRequiredParams,
} from '@ragbits/api-client'
+// Re-export BaseApiEndpoints so it can be augmented via @ragbits/api-client-react
+export type {
+ BaseApiEndpoints,
+ BaseStreamingEndpoints,
+ EndpointDefinition,
+} from '@ragbits/api-client'
+
+/**
+ * Call function type - mirrors makeRequest signature
+ */
+export type CallFunction<
+ URL extends keyof Endpoints,
+ Endpoints extends {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ [K in keyof Endpoints]: EndpointDefinition
+ },
+> =
+ HasRequiredParams extends true
+ ? (
+ options: RequestOptions
+ ) => Promise>
+ : (
+ options?: RequestOptions
+ ) => Promise>
+
// React-specific hook result types
export interface RagbitsCallResult<
URL extends keyof Endpoints,
Endpoints extends {
- [K in keyof Endpoints]: EndpointDefinition
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ [K in keyof Endpoints]: EndpointDefinition
} = BaseApiEndpoints,
Err = Error,
> {
data: EndpointResponse | null
error: Err | null
isLoading: boolean
- call: (
- options?: RequestOptions
- ) => Promise>
+ call: CallFunction
reset: () => void
abort: () => void
}
@@ -30,7 +55,8 @@ export interface RagbitsCallResult<
export interface RagbitsStreamResult<
URL extends keyof Endpoints,
Endpoints extends {
- [K in keyof Endpoints]: EndpointDefinition
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ [K in keyof Endpoints]: EndpointDefinition
} = BaseStreamingEndpoints,
Err = Error,
> {
diff --git a/typescript/@ragbits/api-client/__tests__/RagbitsClient.test.ts b/typescript/@ragbits/api-client/__tests__/RagbitsClient.test.ts
index 2e0f67b91..f272e0733 100644
--- a/typescript/@ragbits/api-client/__tests__/RagbitsClient.test.ts
+++ b/typescript/@ragbits/api-client/__tests__/RagbitsClient.test.ts
@@ -1,5 +1,5 @@
import { describe, it, expect, vi, beforeEach } from 'vitest'
-import { RagbitsClient, FeedbackType } from '../src'
+import { RagbitsClient, FeedbackType, ChatResponse } from '../src'
import { server } from './setup'
import { http, HttpResponse } from 'msw'
import type { FeedbackRequest } from '../src'
@@ -145,7 +145,7 @@ describe('RagbitsClient', () => {
describe('makeStreamRequest', () => {
it('should handle streaming response', async () => {
- const messages: unknown[] = []
+ const messages: ChatResponse[] = []
const errors: Error[] = []
let closed = false
@@ -182,19 +182,19 @@ describe('RagbitsClient', () => {
expect(messages).toHaveLength(4)
expect(messages[0]).toEqual({
type: 'text',
- content: 'Hello there!',
+ content: { text: 'Hello there!' },
})
expect(messages[1]).toEqual({
type: 'text',
- content: 'How can I help you?',
+ content: { text: 'How can I help you?' },
})
expect(messages[2]).toEqual({
type: 'message_id',
- content: 'msg-123',
+ content: { message_id: 'msg-123' },
})
expect(messages[3]).toEqual({
type: 'conversation_id',
- content: 'conv-456',
+ content: { conversation_id: 'conv-456' },
})
expect(errors).toHaveLength(0)
expect(closed).toBe(true)
@@ -484,7 +484,10 @@ describe('RagbitsClient', () => {
server.use(
http.post('http://127.0.0.1:8000/api/chat', ({ request }) => {
const customHeader = request.headers.get('X-Custom-Header')
- const message = { type: 'text', content: customHeader }
+ const message = {
+ type: 'text',
+ content: { text: customHeader },
+ }
const encoder = new TextEncoder()
const stream = new ReadableStream({
start(controller) {
@@ -512,7 +515,7 @@ describe('RagbitsClient', () => {
return
}
- messages.push(data.content)
+ messages.push(data.content.text)
},
onError: () => {},
},
diff --git a/typescript/@ragbits/api-client/__tests__/mocks/handlers.ts b/typescript/@ragbits/api-client/__tests__/mocks/handlers.ts
index a7d4bbf3e..d48bd863c 100644
--- a/typescript/@ragbits/api-client/__tests__/mocks/handlers.ts
+++ b/typescript/@ragbits/api-client/__tests__/mocks/handlers.ts
@@ -1,5 +1,6 @@
import { http, HttpResponse } from 'msw'
import { defaultConfigResponse } from '../utils'
+import { ChatResponse } from '../../src'
export const handlers = [
// Config endpoint with conditional error handling
@@ -65,11 +66,14 @@ export const handlers = [
const stream = new ReadableStream({
start(controller) {
- const messages = [
- { type: 'text', content: 'Hello there!' },
- { type: 'text', content: 'How can I help you?' },
- { type: 'message_id', content: 'msg-123' },
- { type: 'conversation_id', content: 'conv-456' },
+ const messages: ChatResponse[] = [
+ { type: 'text', content: { text: 'Hello there!' } },
+ { type: 'text', content: { text: 'How can I help you?' } },
+ { type: 'message_id', content: { message_id: 'msg-123' } },
+ {
+ type: 'conversation_id',
+ content: { conversation_id: 'conv-456' },
+ },
]
messages.forEach((message, index) => {
diff --git a/typescript/@ragbits/api-client/src/index.ts b/typescript/@ragbits/api-client/src/index.ts
index b43767121..6a4426333 100644
--- a/typescript/@ragbits/api-client/src/index.ts
+++ b/typescript/@ragbits/api-client/src/index.ts
@@ -5,9 +5,9 @@ import type {
BaseApiEndpoints,
EndpointDefinition,
EndpointResponse,
- RequestOptions,
BaseStreamingEndpoints,
EndpointRequest,
+ MakeRequestOptions,
} from './types'
/**
@@ -105,16 +105,21 @@ export class RagbitsClient {
*/
async makeRequest<
Endpoints extends {
- [K in keyof Endpoints]: EndpointDefinition
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ [K in keyof Endpoints]: EndpointDefinition
} = BaseApiEndpoints,
URL extends keyof Endpoints = keyof Endpoints,
>(
endpoint: URL,
- options?: RequestOptions
+ ...args: MakeRequestOptions
): Promise> {
+ const options = args[0]
+
const {
method = 'GET',
body,
+ pathParams,
+ queryParams,
headers = {},
...restOptions
} = options || {}
@@ -122,7 +127,7 @@ export class RagbitsClient {
const requestOptions: RequestInit = {
method,
headers,
- ...restOptions, // This will include signal and other fetch options
+ ...restOptions,
}
if (body && method !== 'GET') {
@@ -130,10 +135,37 @@ export class RagbitsClient {
typeof body === 'string' ? body : JSON.stringify(body)
}
- const response = await this._makeRequest(
- this._buildApiUrl(endpoint.toString()),
- requestOptions
- )
+ // Build URL with path parameters
+ let url = endpoint.toString()
+
+ // Replace path parameters (e.g., :id, :userId)
+ if (pathParams) {
+ url = url.replace(/:([^/]+)/g, (_, paramName) => {
+ if (paramName in pathParams) {
+ const value = (pathParams as Record)[
+ paramName
+ ]
+ return encodeURIComponent(String(value))
+ } else {
+ throw new Error(`Path parameter ${paramName} is required`)
+ }
+ })
+ }
+
+ // Add query parameters
+ if (queryParams && Object.keys(queryParams).length > 0) {
+ const searchParams = new URLSearchParams()
+ for (const [key, value] of Object.entries(queryParams)) {
+ if (value !== undefined && value !== null) {
+ searchParams.append(key, String(value))
+ }
+ }
+ url += `?${searchParams.toString()}`
+ }
+
+ url = this._buildApiUrl(url)
+
+ const response = await this._makeRequest(url, requestOptions)
return response.json()
}
@@ -146,7 +178,8 @@ export class RagbitsClient {
*/
makeStreamRequest<
Endpoints extends {
- [K in keyof Endpoints]: EndpointDefinition
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ [K in keyof Endpoints]: EndpointDefinition
} = BaseStreamingEndpoints,
URL extends keyof Endpoints = keyof Endpoints,
>(
diff --git a/typescript/@ragbits/api-client/src/types.ts b/typescript/@ragbits/api-client/src/types.ts
index ea084aca3..8885322b0 100644
--- a/typescript/@ragbits/api-client/src/types.ts
+++ b/typescript/@ragbits/api-client/src/types.ts
@@ -33,11 +33,19 @@ export interface StreamCallbacks {
onClose?: () => void | Promise
}
-// eslint-disable-next-line @typescript-eslint/no-explicit-any
-export interface EndpointDefinition {
+export interface EndpointDefinition<
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ Req = any,
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ Res = any,
+ PathParams = never,
+ QueryParams = never,
+> {
method: string
request: Req
response: Res
+ pathParams: PathParams
+ queryParams: QueryParams
}
/**
@@ -62,7 +70,10 @@ export interface BaseStreamingEndpoints {
* Extract endpoint paths as a union type
*/
export type EndpointPath<
- Endpoints extends { [K in keyof Endpoints]: EndpointDefinition },
+ Endpoints extends {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ [K in keyof Endpoints]: EndpointDefinition
+ },
> = keyof Endpoints
/**
@@ -70,7 +81,10 @@ export type EndpointPath<
*/
export type EndpointRequest<
URL extends keyof Endpoints,
- Endpoints extends { [K in keyof Endpoints]: EndpointDefinition },
+ Endpoints extends {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ [K in keyof Endpoints]: EndpointDefinition
+ },
> = Endpoints[URL]['request']
/**
@@ -78,7 +92,10 @@ export type EndpointRequest<
*/
export type EndpointResponse<
URL extends keyof Endpoints,
- Endpoints extends { [K in keyof Endpoints]: EndpointDefinition },
+ Endpoints extends {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ [K in keyof Endpoints]: EndpointDefinition
+ },
> = Endpoints[URL]['response']
/**
@@ -86,20 +103,99 @@ export type EndpointResponse<
*/
export type EndpointMethod<
URL extends keyof Endpoints,
- Endpoints extends { [K in keyof Endpoints]: EndpointDefinition },
+ Endpoints extends {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ [K in keyof Endpoints]: EndpointDefinition
+ },
> = Endpoints[URL]['method']
/**
- * Generic request options for API endpoints with typed methods and body
+ * Check if an object type has any required properties
+ * - {} extends T means all properties are optional → false
+ * - {} doesn't extend T means at least one property is required → true
*/
-export interface RequestOptions<
+export type HasRequiredKeys = [T] extends [never]
+ ? false
+ : // eslint-disable-next-line @typescript-eslint/no-empty-object-type
+ {} extends T
+ ? false
+ : true
+
+/**
+ * Generic request options for API endpoints with typed methods, path params, query params, and body
+ * - pathParams is REQUIRED when PathParams is not never
+ * - queryParams is REQUIRED when it has required keys inside
+ * - queryParams is OPTIONAL when all keys are optional or it's never
+ * - body is REQUIRED when it's a specific type (not never, not undefined)
+ * - body is OPTIONAL when it's never or undefined
+ */
+export type RequestOptions<
URL extends keyof Endpoints,
- Endpoints extends { [K in keyof Endpoints]: EndpointDefinition },
-> {
+ Endpoints extends {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ [K in keyof Endpoints]: EndpointDefinition
+ },
+> = {
method?: Endpoints[URL]['method']
- body?: Endpoints[URL]['request'] extends never
- ? undefined
- : Endpoints[URL]['request']
headers?: Record
signal?: AbortSignal
-}
+} & (Endpoints[URL]['pathParams'] extends never
+ ? { pathParams?: never }
+ : { pathParams: Endpoints[URL]['pathParams'] }) &
+ (Endpoints[URL]['queryParams'] extends never
+ ? { queryParams?: never }
+ : HasRequiredKeys extends true
+ ? { queryParams: Endpoints[URL]['queryParams'] } // Has required property
+ : { queryParams?: Endpoints[URL]['queryParams'] }) & // All properties optional
+ (Endpoints[URL]['request'] extends never
+ ? { body?: never }
+ : Endpoints[URL]['request'] extends undefined
+ ? { body?: Endpoints[URL]['request'] }
+ : { body: Endpoints[URL]['request'] })
+
+/**
+ * Check if a type is not never and not undefined
+ */
+export type IsRequired = [T] extends [never]
+ ? false
+ : T extends undefined
+ ? false
+ : true
+
+/**
+ * Check if an endpoint has any required parameters
+ * Returns true if any of these conditions are met:
+ * - pathParams is defined (not never), OR
+ * - queryParams has any required keys inside, OR
+ * - body/request is required (not never, not undefined)
+ */
+export type HasRequiredParams<
+ URL extends keyof Endpoints,
+ Endpoints extends {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ [K in keyof Endpoints]: EndpointDefinition
+ },
+> = Endpoints[URL]['pathParams'] extends never
+ ? HasRequiredKeys extends true
+ ? true
+ : IsRequired
+ : true
+
+/**
+ * Conditional options parameter for makeRequest
+ * - Required if endpoint has:
+ * - pathParams, OR
+ * - queryParams with specific type (not undefined), OR
+ * - body with specific type (not undefined)
+ * - Optional otherwise
+ */
+export type MakeRequestOptions<
+ URL extends keyof Endpoints,
+ Endpoints extends {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ [K in keyof Endpoints]: EndpointDefinition
+ },
+> =
+ HasRequiredParams extends true
+ ? [options: RequestOptions]
+ : [options?: RequestOptions]