@enonic/ui 0.13.2 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,26 +1,26 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("preact"),t=require("react"),r=require("@radix-ui/react-slot"),o=require("focus-trap-react"),n=require("react-dom");var a=0;function s(t,r,o,n,s,i){r||(r={});var l,c,d=r;if("ref"in d)for(c in d={},r)"ref"==c?l=r[c]:d[c]=r[c];var u={type:t,props:d,key:o,ref:l,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--a,__i:-1,__u:0,__source:s,__self:i};if("function"==typeof t&&(l=t.defaultProps))for(c in l)void 0===d[c]&&(d[c]=l[c]);return e.options.vnode&&e.options.vnode(u),u}const i=t.createContext(void 0),l=({value:e,children:t})=>s(i.Provider,{value:e,children:t});l.displayName="AvatarProvider";const c=()=>{const e=t.useContext(i);if(!e)throw new Error("useAvatar must be used within an Avatar");return e},d=t.createContext(void 0),u=({value:e,children:t})=>s(d.Provider,{value:e,children:t});u.displayName="ComboboxProvider";const m=()=>{const e=t.useContext(d);if(!e)throw new Error("useCombobox must be used within a ComboboxProvider");return e},f=t.createContext(void 0),p=({value:e,children:t})=>s(f.Provider,{value:e,children:t});p.displayName="DialogProvider";const b=()=>{const e=t.useContext(f);if(!e)throw new Error("useDialog must be used within a DialogProvider");return e},h=t.createContext(void 0),g=({children:e,prefix:t})=>s(h.Provider,{value:{prefix:t},children:e});g.displayName="IdProvider";const v=(e,r)=>{const o=e??t.useId(),n=t.useContext(h);return[n?.prefix,r,o].filter(Boolean).join("-")},x=t.createContext(void 0),w=({value:e,children:t})=>s(x.Provider,{value:e,children:t});w.displayName="ListboxProvider";const y=()=>{const e=t.useContext(x);if(!e)throw new Error("useListbox must be used within a Listbox");return e},k=t.createContext(void 0),N=({value:e,children:t})=>s(k.Provider,{value:e,children:t}),C=()=>{const e=t.useContext(k);if(!e)throw new Error("useMenu must be used within a MenuProvider");return e};function I(e,t){return`${e}-${t}`}function z(e,t,r){return`${e}-${t}-item-${r}`}function D(e){var t,r,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=D(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function S(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=D(e))&&(o&&(o+=" "),o+=t);return o}const R=e=>{const t=A(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:e=>{const r=e.split("-");return""===r[0]&&1!==r.length&&r.shift(),M(r,t)||O(e)},getConflictingClassGroupIds:(e,t)=>{const n=r[e]||[];return t&&o[e]?[...n,...o[e]]:n}}},M=(e,t)=>{if(0===e.length)return t.classGroupId;const r=e[0],o=t.nextPart.get(r),n=o?M(e.slice(1),o):void 0;if(n)return n;if(0===t.validators.length)return;const a=e.join("-");return t.validators.find(({validator:e})=>e(a))?.classGroupId},E=/^\[(.+)\]$/,O=e=>{if(E.test(e)){const t=E.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},A=e=>{const{theme:t,classGroups:r}=e,o={nextPart:new Map,validators:[]};for(const n in r)P(r[n],o,n,t);return o},P=(e,t,r,o)=>{e.forEach(e=>{if("string"==typeof e){return void((""===e?t:L(t,e)).classGroupId=r)}if("function"==typeof e)return j(e)?void P(e(o),t,r,o):void t.validators.push({validator:e,classGroupId:r});Object.entries(e).forEach(([e,n])=>{P(n,L(t,e),r,o)})})},L=(e,t)=>{let r=e;return t.split("-").forEach(e=>{r.nextPart.has(e)||r.nextPart.set(e,{nextPart:new Map,validators:[]}),r=r.nextPart.get(e)}),r},j=e=>e.isThemeGetter,$=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map;const n=(n,a)=>{r.set(n,a),t++,t>e&&(t=0,o=r,r=new Map)};return{get(e){let t=r.get(e);return void 0!==t?t:void 0!==(t=o.get(e))?(n(e,t),t):void 0},set(e,t){r.has(e)?r.set(e,t):n(e,t)}}},V=e=>{const{prefix:t,experimentalParseClassName:r}=e;let o=e=>{const t=[];let r,o=0,n=0,a=0;for(let l=0;l<e.length;l++){let s=e[l];if(0===o&&0===n){if(":"===s){t.push(e.slice(a,l)),a=l+1;continue}if("/"===s){r=l;continue}}"["===s?o++:"]"===s?o--:"("===s?n++:")"===s&&n--}const s=0===t.length?e:e.substring(a),i=T(s);return{modifiers:t,hasImportantModifier:i!==s,baseClassName:i,maybePostfixModifierPosition:r&&r>a?r-a:void 0}};if(t){const e=t+":",r=o;o=t=>t.startsWith(e)?r(t.substring(e.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:t,maybePostfixModifierPosition:void 0}}if(r){const e=o;o=t=>r({className:t,parseClassName:e})}return o},T=e=>e.endsWith("!")?e.substring(0,e.length-1):e.startsWith("!")?e.substring(1):e,_=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(e=>[e,!0]));return e=>{if(e.length<=1)return e;const r=[];let o=[];return e.forEach(e=>{"["===e[0]||t[e]?(r.push(...o.sort(),e),o=[]):o.push(e)}),r.push(...o.sort()),r}},W=/\s+/;function q(){let e,t,r=0,o="";for(;r<arguments.length;)(e=arguments[r++])&&(t=B(e))&&(o&&(o+=" "),o+=t);return o}const B=e=>{if("string"==typeof e)return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=B(e[o]))&&(r&&(r+=" "),r+=t);return r};function F(e,...t){let r,o,n,a=function(i){const l=t.reduce((e,t)=>t(e),e());return r=(e=>({cache:$(e.cacheSize),parseClassName:V(e),sortModifiers:_(e),...R(e)}))(l),o=r.cache.get,n=r.cache.set,a=s,s(i)};function s(e){const t=o(e);if(t)return t;const a=((e,t)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:n,sortModifiers:a}=t,s=[],i=e.trim().split(W);let l="";for(let c=i.length-1;c>=0;c-=1){const e=i[c],{isExternal:t,modifiers:d,hasImportantModifier:u,baseClassName:m,maybePostfixModifierPosition:f}=r(e);if(t){l=e+(l.length>0?" "+l:l);continue}let p=!!f,b=o(p?m.substring(0,f):m);if(!b){if(!p){l=e+(l.length>0?" "+l:l);continue}if(b=o(m),!b){l=e+(l.length>0?" "+l:l);continue}p=!1}const h=a(d).join(":"),g=u?h+"!":h,v=g+b;if(s.includes(v))continue;s.push(v);const x=n(b,p);for(let r=0;r<x.length;++r){const e=x[r];s.push(g+e)}l=e+(l.length>0?" "+l:l)}return l})(e,r);return n(e,a),a}return function(){return a(q.apply(null,arguments))}}const G=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},H=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,K=/^\((?:(\w[\w-]*):)?(.+)\)$/i,X=/^\d+\/\d+$/,Y=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,U=/\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$/,Z=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,J=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Q=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ee=e=>X.test(e),te=e=>!!e&&!Number.isNaN(Number(e)),re=e=>!!e&&Number.isInteger(Number(e)),oe=e=>e.endsWith("%")&&te(e.slice(0,-1)),ne=e=>Y.test(e),ae=()=>!0,se=e=>U.test(e)&&!Z.test(e),ie=()=>!1,le=e=>J.test(e),ce=e=>Q.test(e),de=e=>!me(e)&&!ve(e),ue=e=>Ie(e,Re,ie),me=e=>H.test(e),fe=e=>Ie(e,Me,se),pe=e=>Ie(e,Ee,te),be=e=>Ie(e,De,ie),he=e=>Ie(e,Se,ce),ge=e=>Ie(e,Ae,le),ve=e=>K.test(e),xe=e=>ze(e,Me),we=e=>ze(e,Oe),ye=e=>ze(e,De),ke=e=>ze(e,Re),Ne=e=>ze(e,Se),Ce=e=>ze(e,Ae,!0),Ie=(e,t,r)=>{const o=H.exec(e);return!!o&&(o[1]?t(o[1]):r(o[2]))},ze=(e,t,r=!1)=>{const o=K.exec(e);return!!o&&(o[1]?t(o[1]):r)},De=e=>"position"===e||"percentage"===e,Se=e=>"image"===e||"url"===e,Re=e=>"length"===e||"size"===e||"bg-size"===e,Me=e=>"length"===e,Ee=e=>"number"===e,Oe=e=>"family-name"===e,Ae=e=>"shadow"===e,Pe=F(()=>{const e=G("color"),t=G("font"),r=G("text"),o=G("font-weight"),n=G("tracking"),a=G("leading"),s=G("breakpoint"),i=G("container"),l=G("spacing"),c=G("radius"),d=G("shadow"),u=G("inset-shadow"),m=G("text-shadow"),f=G("drop-shadow"),p=G("blur"),b=G("perspective"),h=G("aspect"),g=G("ease"),v=G("animate"),x=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",ve,me],w=()=>[ve,me,l],y=()=>[ee,"full","auto",...w()],k=()=>[re,"none","subgrid",ve,me],N=()=>["auto",{span:["full",re,ve,me]},re,ve,me],C=()=>[re,"auto",ve,me],I=()=>["auto","min","max","fr",ve,me],z=()=>["auto",...w()],D=()=>[ee,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],S=()=>[e,ve,me],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",ye,be,{position:[ve,me]}],M=()=>["auto","cover","contain",ke,ue,{size:[ve,me]}],E=()=>[oe,xe,fe],O=()=>["","none","full",c,ve,me],A=()=>["",te,xe,fe],P=()=>[te,oe,ye,be],L=()=>["","none",p,ve,me],j=()=>["none",te,ve,me],$=()=>["none",te,ve,me],V=()=>[te,ve,me],T=()=>[ee,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ne],breakpoint:[ne],color:[ae],container:[ne],"drop-shadow":[ne],ease:["in","out","in-out"],font:[de],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ne],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ne],shadow:[ne],spacing:["px",te],text:[ne],"text-shadow":[ne],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ee,me,ve,h]}],container:["container"],columns:[{columns:[te,me,ve,i]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],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:x()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:y()}],"inset-x":[{"inset-x":y()}],"inset-y":[{"inset-y":y()}],start:[{start:y()}],end:[{end:y()}],top:[{top:y()}],right:[{right:y()}],bottom:[{bottom:y()}],left:[{left:y()}],visibility:["visible","invisible","collapse"],z:[{z:[re,"auto",ve,me]}],basis:[{basis:[ee,"full","auto",i,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[te,ee,"auto","initial","none",me]}],grow:[{grow:["",te,ve,me]}],shrink:[{shrink:["",te,ve,me]}],order:[{order:[re,"first","last","none",ve,me]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:N()}],"col-start":[{"col-start":C()}],"col-end":[{"col-end":C()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:N()}],"row-start":[{"row-start":C()}],"row-end":[{"row-end":C()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":I()}],"auto-rows":[{"auto-rows":I()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":w()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":w()}],"space-y-reverse":["space-y-reverse"],size:[{size:D()}],w:[{w:[i,"screen",...D()]}],"min-w":[{"min-w":[i,"screen","none",...D()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[s]},...D()]}],h:[{h:["screen","lh",...D()]}],"min-h":[{"min-h":["screen","lh","none",...D()]}],"max-h":[{"max-h":["screen","lh",...D()]}],"font-size":[{text:["base",r,xe,fe]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,ve,pe]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",oe,me]}],"font-family":[{font:[we,me,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:[n,ve,me]}],"line-clamp":[{"line-clamp":[te,"none",ve,pe]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":["none",ve,me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ve,me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:S()}],"text-color":[{text:S()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[te,"from-font","auto",ve,fe]}],"text-decoration-color":[{decoration:S()}],"underline-offset":[{"underline-offset":[te,"auto",ve,me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:w()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ve,me]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ve,me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:R()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:M()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},re,ve,me],radial:["",ve,me],conic:[re,ve,me]},Ne,he]}],"bg-color":[{bg:S()}],"gradient-from-pos":[{from:E()}],"gradient-via-pos":[{via:E()}],"gradient-to-pos":[{to:E()}],"gradient-from":[{from:S()}],"gradient-via":[{via:S()}],"gradient-to":[{to:S()}],rounded:[{rounded:O()}],"rounded-s":[{"rounded-s":O()}],"rounded-e":[{"rounded-e":O()}],"rounded-t":[{"rounded-t":O()}],"rounded-r":[{"rounded-r":O()}],"rounded-b":[{"rounded-b":O()}],"rounded-l":[{"rounded-l":O()}],"rounded-ss":[{"rounded-ss":O()}],"rounded-se":[{"rounded-se":O()}],"rounded-ee":[{"rounded-ee":O()}],"rounded-es":[{"rounded-es":O()}],"rounded-tl":[{"rounded-tl":O()}],"rounded-tr":[{"rounded-tr":O()}],"rounded-br":[{"rounded-br":O()}],"rounded-bl":[{"rounded-bl":O()}],"border-w":[{border:A()}],"border-w-x":[{"border-x":A()}],"border-w-y":[{"border-y":A()}],"border-w-s":[{"border-s":A()}],"border-w-e":[{"border-e":A()}],"border-w-t":[{"border-t":A()}],"border-w-r":[{"border-r":A()}],"border-w-b":[{"border-b":A()}],"border-w-l":[{"border-l":A()}],"divide-x":[{"divide-x":A()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":A()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:S()}],"border-color-x":[{"border-x":S()}],"border-color-y":[{"border-y":S()}],"border-color-s":[{"border-s":S()}],"border-color-e":[{"border-e":S()}],"border-color-t":[{"border-t":S()}],"border-color-r":[{"border-r":S()}],"border-color-b":[{"border-b":S()}],"border-color-l":[{"border-l":S()}],"divide-color":[{divide:S()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[te,ve,me]}],"outline-w":[{outline:["",te,xe,fe]}],"outline-color":[{outline:S()}],shadow:[{shadow:["","none",d,Ce,ge]}],"shadow-color":[{shadow:S()}],"inset-shadow":[{"inset-shadow":["none",u,Ce,ge]}],"inset-shadow-color":[{"inset-shadow":S()}],"ring-w":[{ring:A()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:S()}],"ring-offset-w":[{"ring-offset":[te,fe]}],"ring-offset-color":[{"ring-offset":S()}],"inset-ring-w":[{"inset-ring":A()}],"inset-ring-color":[{"inset-ring":S()}],"text-shadow":[{"text-shadow":["none",m,Ce,ge]}],"text-shadow-color":[{"text-shadow":S()}],opacity:[{opacity:[te,ve,me]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[te]}],"mask-image-linear-from-pos":[{"mask-linear-from":P()}],"mask-image-linear-to-pos":[{"mask-linear-to":P()}],"mask-image-linear-from-color":[{"mask-linear-from":S()}],"mask-image-linear-to-color":[{"mask-linear-to":S()}],"mask-image-t-from-pos":[{"mask-t-from":P()}],"mask-image-t-to-pos":[{"mask-t-to":P()}],"mask-image-t-from-color":[{"mask-t-from":S()}],"mask-image-t-to-color":[{"mask-t-to":S()}],"mask-image-r-from-pos":[{"mask-r-from":P()}],"mask-image-r-to-pos":[{"mask-r-to":P()}],"mask-image-r-from-color":[{"mask-r-from":S()}],"mask-image-r-to-color":[{"mask-r-to":S()}],"mask-image-b-from-pos":[{"mask-b-from":P()}],"mask-image-b-to-pos":[{"mask-b-to":P()}],"mask-image-b-from-color":[{"mask-b-from":S()}],"mask-image-b-to-color":[{"mask-b-to":S()}],"mask-image-l-from-pos":[{"mask-l-from":P()}],"mask-image-l-to-pos":[{"mask-l-to":P()}],"mask-image-l-from-color":[{"mask-l-from":S()}],"mask-image-l-to-color":[{"mask-l-to":S()}],"mask-image-x-from-pos":[{"mask-x-from":P()}],"mask-image-x-to-pos":[{"mask-x-to":P()}],"mask-image-x-from-color":[{"mask-x-from":S()}],"mask-image-x-to-color":[{"mask-x-to":S()}],"mask-image-y-from-pos":[{"mask-y-from":P()}],"mask-image-y-to-pos":[{"mask-y-to":P()}],"mask-image-y-from-color":[{"mask-y-from":S()}],"mask-image-y-to-color":[{"mask-y-to":S()}],"mask-image-radial":[{"mask-radial":[ve,me]}],"mask-image-radial-from-pos":[{"mask-radial-from":P()}],"mask-image-radial-to-pos":[{"mask-radial-to":P()}],"mask-image-radial-from-color":[{"mask-radial-from":S()}],"mask-image-radial-to-color":[{"mask-radial-to":S()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[te]}],"mask-image-conic-from-pos":[{"mask-conic-from":P()}],"mask-image-conic-to-pos":[{"mask-conic-to":P()}],"mask-image-conic-from-color":[{"mask-conic-from":S()}],"mask-image-conic-to-color":[{"mask-conic-to":S()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:R()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:M()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ve,me]}],filter:[{filter:["","none",ve,me]}],blur:[{blur:L()}],brightness:[{brightness:[te,ve,me]}],contrast:[{contrast:[te,ve,me]}],"drop-shadow":[{"drop-shadow":["","none",f,Ce,ge]}],"drop-shadow-color":[{"drop-shadow":S()}],grayscale:[{grayscale:["",te,ve,me]}],"hue-rotate":[{"hue-rotate":[te,ve,me]}],invert:[{invert:["",te,ve,me]}],saturate:[{saturate:[te,ve,me]}],sepia:[{sepia:["",te,ve,me]}],"backdrop-filter":[{"backdrop-filter":["","none",ve,me]}],"backdrop-blur":[{"backdrop-blur":L()}],"backdrop-brightness":[{"backdrop-brightness":[te,ve,me]}],"backdrop-contrast":[{"backdrop-contrast":[te,ve,me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",te,ve,me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[te,ve,me]}],"backdrop-invert":[{"backdrop-invert":["",te,ve,me]}],"backdrop-opacity":[{"backdrop-opacity":[te,ve,me]}],"backdrop-saturate":[{"backdrop-saturate":[te,ve,me]}],"backdrop-sepia":[{"backdrop-sepia":["",te,ve,me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ve,me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[te,"initial",ve,me]}],ease:[{ease:["linear","initial",g,ve,me]}],delay:[{delay:[te,ve,me]}],animate:[{animate:["none",v,ve,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,ve,me]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:j()}],"rotate-x":[{"rotate-x":j()}],"rotate-y":[{"rotate-y":j()}],"rotate-z":[{"rotate-z":j()}],scale:[{scale:$()}],"scale-x":[{"scale-x":$()}],"scale-y":[{"scale-y":$()}],"scale-z":[{"scale-z":$()}],"scale-3d":["scale-3d"],skew:[{skew:V()}],"skew-x":[{"skew-x":V()}],"skew-y":[{"skew-y":V()}],transform:[{transform:[ve,me,"","none","gpu","cpu"]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:T()}],"translate-x":[{"translate-x":T()}],"translate-y":[{"translate-y":T()}],"translate-z":[{"translate-z":T()}],"translate-none":["translate-none"],accent:[{accent:S()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:S()}],"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",ve,me]}],"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":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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",ve,me]}],fill:[{fill:["none",...S()]}],"stroke-w":[{stroke:[te,xe,fe,pe]}],stroke:[{stroke:["none",...S()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function Le(...e){return Pe(S(e))}function je(e,t){if(e)if("function"==typeof e)e(t);else try{e.current=t}catch{}}function $e(...e){return t.useCallback(t=>{e.forEach(e=>je(e,t))},e)}function Ve(e){return function(e){return!!(e&&"object"==typeof e&&"value"in e&&"peek"in e&&"function"==typeof e.peek&&"subscribe"in e&&"function"==typeof e.subscribe)}(e)?e.value:e}const Te=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,_e=S,We=(e,t)=>r=>{var o;if(null==(null==t?void 0:t.variants))return _e(e,null==r?void 0:r.class,null==r?void 0:r.className);const{variants:n,defaultVariants:a}=t,s=Object.keys(n).map(e=>{const t=null==r?void 0:r[e],o=null==a?void 0:a[e];if(null===t)return null;const s=Te(t)||Te(o);return n[e][s]}),i=r&&Object.entries(r).reduce((e,t)=>{let[r,o]=t;return void 0===o||(e[r]=o),e},{}),l=null==t||null===(o=t.compoundVariants)||void 0===o?void 0:o.reduce((e,t)=>{let{class:r,className:o,...n}=t;return Object.entries(n).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...a,...i}[t]):{...a,...i}[t]===r})?[...e,r,o]:e},[]);return _e(e,s,l,null==r?void 0:r.class,null==r?void 0:r.className)},qe=We("relative flex shrink-0 overflow-hidden",{variants:{size:{sm:"w-6 h-6 text-xs",md:"w-8 h-8 text-sm",lg:"w-12 h-12 text-base"},shape:{circle:"rounded-full",square:"rounded-md"}},defaultVariants:{size:"md",shape:"circle"}}),Be=t.forwardRef(({children:e,className:r,size:o,shape:n,...a},i)=>{const[c,d]=t.useState("idle"),u=t.useCallback(e=>{d(e)},[]),m=t.useMemo(()=>({imageLoadingStatus:c,onImageLoadingStatusChange:u}),[c,u]);return s(l,{value:m,children:s("span",{ref:i,className:Le(qe({size:o,shape:n}),r),...a,children:e})})});Be.displayName="AvatarRoot";const Fe=t.forwardRef(({src:e,alt:r,className:o,onLoadingStatusChange:n,...a},i)=>{const{imageLoadingStatus:l,onImageLoadingStatusChange:d}=c(),[u,m]=t.useState(!1);return t.useEffect(()=>{if(m(!1),!e)return;d("loading"),n?.("loading");const t=new Image,r=()=>{d("loaded"),n?.("loaded")},o=()=>{m(!0),d("error"),n?.("error")};return t.addEventListener("load",r),t.addEventListener("error",o),t.src=e,()=>{t.removeEventListener("load",r),t.removeEventListener("error",o)}},[e,d,n]),!e||u||"error"===l?null:s("img",{ref:i,src:e,alt:r,className:Le("aspect-square h-full w-full object-cover",o),...a})});Fe.displayName="AvatarImage";const Ge=t.forwardRef(({children:e,className:r,delayMs:o=0,...n},a)=>{const{imageLoadingStatus:i}=c(),[l,d]=t.useState(0===o);t.useEffect(()=>{if(0===o)return;const e=setTimeout(()=>{d(!0)},o);return()=>{clearTimeout(e)}},[o]);return l&&("idle"===i||"error"===i)?s("span",{ref:a,className:Le("flex h-full w-full items-center justify-center","bg-surface-secondary text-alt font-medium uppercase cursor-default",r),...n,children:e}):null});Ge.displayName="AvatarFallback";const He=Object.assign(Be,{Root:Be,Image:Fe,Fallback:Ge}),Ke=We(["inline-flex items-center justify-center","text-main font-semibold","box-border rounded-sm transition-highlight","focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-offset-0","disabled:select-none disabled:pointer-events-none disabled:opacity-30","overflow-hidden text-ellipsis whitespace-nowrap cursor-pointer"],{variants:{variant:{text:"bg-btn-primary hover:bg-btn-primary-hover active:bg-btn-active active:text-alt",filled:"bg-btn-secondary hover:bg-btn-secondary-hover active:bg-btn-active active:text-alt",solid:"bg-btn-tertiary text-alt hover:bg-btn-tertiary-hover active:bg-btn-active",outline:"bg-btn-primary hover:bg-btn-primary-hover active:bg-btn-active active:text-alt border border-bdr-strong"},size:{sm:"h-9 px-3.5 gap-2 text-sm",md:"h-10 px-3.5 gap-2.5 text-base",lg:"h-11.5 px-4 gap-3 text-lg"}},defaultVariants:{variant:"text",size:"md"}}),Xe=t.forwardRef(({className:e,variant:t="text",size:r="md",iconSize:o,iconStrokeWidth:n=1.5,startIcon:a,label:i,endIcon:l,title:c,children:d,...u},m)=>{const f=a,p=l,b=o??(e=>{switch(e){case"sm":return 14;case"md":return 20;case"lg":return 24}})(r??"md");return s("button",{ref:m,type:"button",className:Le(Ke({variant:t,size:r}),e),title:c,"aria-label":c??i,"aria-disabled":u.disabled,...u,children:[f&&s(f,{size:b,strokeWidth:n}),d,i,p&&s(p,{size:b,strokeWidth:n})]})});Xe.displayName="Button";const Ye=(e,r)=>{t.useEffect(()=>{if(!e)return;const t=r??document.body,o=t.style.overflow;return t.style.overflow="hidden",()=>{t.style.overflow=o}},[e,r])};function Ue(e,r,o){const[n,a]=t.useState(r),s=void 0!==e;return[s?e:n,t.useCallback(e=>{s||a(e),o?.(e)},[s,o])]}function Ze(){const e=t.useRef(new Map);return{registerItem:t.useCallback((t,r=!1)=>{e.current.set(t,{disabled:r})},[]),unregisterItem:t.useCallback(t=>{e.current.delete(t)},[]),getItems:t.useCallback(()=>Array.from(e.current.keys()),[]),isItemDisabled:t.useCallback(t=>e.current.get(t)?.disabled??!1,[])}}function Je(e){const{getItems:r,isItemDisabled:o,active:n,setActive:a,loop:s=!1,orientation:i="vertical",onSelect:l,onEscape:c}=e,d=t.useCallback(e=>{const t=r();if(!t.length)return;const i=n?t.indexOf(n):-1;let l,c=0;const d=t.length;for(l=-1===i?e>0?0:t.length-1:i+e;c<d;){if(s)l<0?l=t.length-1:l>=t.length&&(l=0);else if(l<0||l>=t.length)return;if(!o(t[l]))return void a(t[l]);l+=e,c++}},[r,n,a,s,o]),u=t.useCallback(e=>{const t=r();if(!t.length)return;const s="vertical"===i,u=s?"ArrowDown":"ArrowRight",m=s?"ArrowUp":"ArrowLeft";switch(e.key){case u:e.preventDefault(),d(1);break;case m:e.preventDefault(),d(-1);break;case"Home":e.preventDefault();{const e=t.find(e=>!o(e));e&&a(e)}break;case"End":e.preventDefault();{const e=[...t].reverse().find(e=>!o(e));e&&a(e)}break;case"Enter":case" ":e.preventDefault(),n&&!o(n)&&l?.(n);break;case"Escape":e.preventDefault(),c?.()}},[r,n,d,a,o,i,l,c]);return{moveActive:d,handleKeyDown:u}}
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("preact"),t=require("react"),r=require("@radix-ui/react-slot"),o=require("focus-trap-react"),a=require("react-dom");var n=0;function s(t,r,o,a,s,i){r||(r={});var l,c,d=r;if("ref"in d)for(c in d={},r)"ref"==c?l=r[c]:d[c]=r[c];var u={type:t,props:d,key:o,ref:l,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--n,__i:-1,__u:0,__source:s,__self:i};if("function"==typeof t&&(l=t.defaultProps))for(c in l)void 0===d[c]&&(d[c]=l[c]);return e.options.vnode&&e.options.vnode(u),u}const i=t.createContext(void 0),l=({value:e,children:t})=>s(i.Provider,{value:e,children:t});l.displayName="AvatarProvider";const c=()=>{const e=t.useContext(i);if(!e)throw new Error("useAvatar must be used within an Avatar");return e},d=t.createContext(void 0),u=({value:e,children:t})=>s(d.Provider,{value:e,children:t});u.displayName="ComboboxProvider";const m=()=>{const e=t.useContext(d);if(!e)throw new Error("useCombobox must be used within a ComboboxProvider");return e},f=t.createContext(void 0),p=({value:e,children:t})=>s(f.Provider,{value:e,children:t});p.displayName="DialogProvider";const b=()=>{const e=t.useContext(f);if(!e)throw new Error("useDialog must be used within a DialogProvider");return e},h=t.createContext(void 0),g=({children:e,prefix:t})=>s(h.Provider,{value:{prefix:t},children:e});g.displayName="IdProvider";const v=(e,r)=>{const o=e??t.useId(),a=t.useContext(h);return[a?.prefix,r,o].filter(Boolean).join("-")},x=t.createContext(void 0),w=({value:e,children:t})=>s(x.Provider,{value:e,children:t});w.displayName="ListboxProvider";const y=()=>{const e=t.useContext(x);if(!e)throw new Error("useListbox must be used within a Listbox");return e},k=t.createContext(void 0),N=({value:e,children:t})=>s(k.Provider,{value:e,children:t}),C=()=>{const e=t.useContext(k);if(!e)throw new Error("useMenu must be used within a MenuProvider");return e},I=t.createContext(void 0),z=({value:e,children:t})=>s(I.Provider,{value:e,children:t}),S=()=>{const e=t.useContext(I);if(!e)throw new Error("useSearchField must be used within a SearchFieldProvider");return e};function R(e,t){return`${e}-${t}`}function D(e,t,r){return`${e}-${t}-item-${r}`}function M(e){var t,r,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=M(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function E(){for(var e,t,r=0,o="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=M(e))&&(o&&(o+=" "),o+=t);return o}const O=e=>{const t=j(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:e=>{const r=e.split("-");return""===r[0]&&1!==r.length&&r.shift(),A(r,t)||L(e)},getConflictingClassGroupIds:(e,t)=>{const a=r[e]||[];return t&&o[e]?[...a,...o[e]]:a}}},A=(e,t)=>{if(0===e.length)return t.classGroupId;const r=e[0],o=t.nextPart.get(r),a=o?A(e.slice(1),o):void 0;if(a)return a;if(0===t.validators.length)return;const n=e.join("-");return t.validators.find(({validator:e})=>e(n))?.classGroupId},P=/^\[(.+)\]$/,L=e=>{if(P.test(e)){const t=P.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},j=e=>{const{theme:t,classGroups:r}=e,o={nextPart:new Map,validators:[]};for(const a in r)$(r[a],o,a,t);return o},$=(e,t,r,o)=>{e.forEach(e=>{if("string"==typeof e){return void((""===e?t:V(t,e)).classGroupId=r)}if("function"==typeof e)return F(e)?void $(e(o),t,r,o):void t.validators.push({validator:e,classGroupId:r});Object.entries(e).forEach(([e,a])=>{$(a,V(t,e),r,o)})})},V=(e,t)=>{let r=e;return t.split("-").forEach(e=>{r.nextPart.has(e)||r.nextPart.set(e,{nextPart:new Map,validators:[]}),r=r.nextPart.get(e)}),r},F=e=>e.isThemeGetter,T=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map;const a=(a,n)=>{r.set(a,n),t++,t>e&&(t=0,o=r,r=new Map)};return{get(e){let t=r.get(e);return void 0!==t?t:void 0!==(t=o.get(e))?(a(e,t),t):void 0},set(e,t){r.has(e)?r.set(e,t):a(e,t)}}},W=e=>{const{prefix:t,experimentalParseClassName:r}=e;let o=e=>{const t=[];let r,o=0,a=0,n=0;for(let l=0;l<e.length;l++){let s=e[l];if(0===o&&0===a){if(":"===s){t.push(e.slice(n,l)),n=l+1;continue}if("/"===s){r=l;continue}}"["===s?o++:"]"===s?o--:"("===s?a++:")"===s&&a--}const s=0===t.length?e:e.substring(n),i=_(s);return{modifiers:t,hasImportantModifier:i!==s,baseClassName:i,maybePostfixModifierPosition:r&&r>n?r-n:void 0}};if(t){const e=t+":",r=o;o=t=>t.startsWith(e)?r(t.substring(e.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:t,maybePostfixModifierPosition:void 0}}if(r){const e=o;o=t=>r({className:t,parseClassName:e})}return o},_=e=>e.endsWith("!")?e.substring(0,e.length-1):e.startsWith("!")?e.substring(1):e,q=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(e=>[e,!0]));return e=>{if(e.length<=1)return e;const r=[];let o=[];return e.forEach(e=>{"["===e[0]||t[e]?(r.push(...o.sort(),e),o=[]):o.push(e)}),r.push(...o.sort()),r}},B=/\s+/;function G(){let e,t,r=0,o="";for(;r<arguments.length;)(e=arguments[r++])&&(t=H(e))&&(o&&(o+=" "),o+=t);return o}const H=e=>{if("string"==typeof e)return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=H(e[o]))&&(r&&(r+=" "),r+=t);return r};function K(e,...t){let r,o,a,n=function(i){const l=t.reduce((e,t)=>t(e),e());return r=(e=>({cache:T(e.cacheSize),parseClassName:W(e),sortModifiers:q(e),...O(e)}))(l),o=r.cache.get,a=r.cache.set,n=s,s(i)};function s(e){const t=o(e);if(t)return t;const n=((e,t)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:a,sortModifiers:n}=t,s=[],i=e.trim().split(B);let l="";for(let c=i.length-1;c>=0;c-=1){const e=i[c],{isExternal:t,modifiers:d,hasImportantModifier:u,baseClassName:m,maybePostfixModifierPosition:f}=r(e);if(t){l=e+(l.length>0?" "+l:l);continue}let p=!!f,b=o(p?m.substring(0,f):m);if(!b){if(!p){l=e+(l.length>0?" "+l:l);continue}if(b=o(m),!b){l=e+(l.length>0?" "+l:l);continue}p=!1}const h=n(d).join(":"),g=u?h+"!":h,v=g+b;if(s.includes(v))continue;s.push(v);const x=a(b,p);for(let r=0;r<x.length;++r){const e=x[r];s.push(g+e)}l=e+(l.length>0?" "+l:l)}return l})(e,r);return a(e,n),n}return function(){return n(G.apply(null,arguments))}}const X=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},Y=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,U=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Z=/^\d+\/\d+$/,J=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Q=/\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$/,ee=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,te=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,re=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,oe=e=>Z.test(e),ae=e=>!!e&&!Number.isNaN(Number(e)),ne=e=>!!e&&Number.isInteger(Number(e)),se=e=>e.endsWith("%")&&ae(e.slice(0,-1)),ie=e=>J.test(e),le=()=>!0,ce=e=>Q.test(e)&&!ee.test(e),de=()=>!1,ue=e=>te.test(e),me=e=>re.test(e),fe=e=>!be(e)&&!ye(e),pe=e=>Re(e,Oe,de),be=e=>Y.test(e),he=e=>Re(e,Ae,ce),ge=e=>Re(e,Pe,ae),ve=e=>Re(e,Me,de),xe=e=>Re(e,Ee,me),we=e=>Re(e,je,ue),ye=e=>U.test(e),ke=e=>De(e,Ae),Ne=e=>De(e,Le),Ce=e=>De(e,Me),Ie=e=>De(e,Oe),ze=e=>De(e,Ee),Se=e=>De(e,je,!0),Re=(e,t,r)=>{const o=Y.exec(e);return!!o&&(o[1]?t(o[1]):r(o[2]))},De=(e,t,r=!1)=>{const o=U.exec(e);return!!o&&(o[1]?t(o[1]):r)},Me=e=>"position"===e||"percentage"===e,Ee=e=>"image"===e||"url"===e,Oe=e=>"length"===e||"size"===e||"bg-size"===e,Ae=e=>"length"===e,Pe=e=>"number"===e,Le=e=>"family-name"===e,je=e=>"shadow"===e,$e=K(()=>{const e=X("color"),t=X("font"),r=X("text"),o=X("font-weight"),a=X("tracking"),n=X("leading"),s=X("breakpoint"),i=X("container"),l=X("spacing"),c=X("radius"),d=X("shadow"),u=X("inset-shadow"),m=X("text-shadow"),f=X("drop-shadow"),p=X("blur"),b=X("perspective"),h=X("aspect"),g=X("ease"),v=X("animate"),x=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",ye,be],w=()=>[ye,be,l],y=()=>[oe,"full","auto",...w()],k=()=>[ne,"none","subgrid",ye,be],N=()=>["auto",{span:["full",ne,ye,be]},ne,ye,be],C=()=>[ne,"auto",ye,be],I=()=>["auto","min","max","fr",ye,be],z=()=>["auto",...w()],S=()=>[oe,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],R=()=>[e,ye,be],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",Ce,ve,{position:[ye,be]}],M=()=>["auto","cover","contain",Ie,pe,{size:[ye,be]}],E=()=>[se,ke,he],O=()=>["","none","full",c,ye,be],A=()=>["",ae,ke,he],P=()=>[ae,se,Ce,ve],L=()=>["","none",p,ye,be],j=()=>["none",ae,ye,be],$=()=>["none",ae,ye,be],V=()=>[ae,ye,be],F=()=>[oe,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ie],breakpoint:[ie],color:[le],container:[ie],"drop-shadow":[ie],ease:["in","out","in-out"],font:[fe],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ie],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ie],shadow:[ie],spacing:["px",ae],text:[ie],"text-shadow":[ie],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",oe,be,ye,h]}],container:["container"],columns:[{columns:[ae,be,ye,i]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],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:x()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:y()}],"inset-x":[{"inset-x":y()}],"inset-y":[{"inset-y":y()}],start:[{start:y()}],end:[{end:y()}],top:[{top:y()}],right:[{right:y()}],bottom:[{bottom:y()}],left:[{left:y()}],visibility:["visible","invisible","collapse"],z:[{z:[ne,"auto",ye,be]}],basis:[{basis:[oe,"full","auto",i,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ae,oe,"auto","initial","none",be]}],grow:[{grow:["",ae,ye,be]}],shrink:[{shrink:["",ae,ye,be]}],order:[{order:[ne,"first","last","none",ye,be]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:N()}],"col-start":[{"col-start":C()}],"col-end":[{"col-end":C()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:N()}],"row-start":[{"row-start":C()}],"row-end":[{"row-end":C()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":I()}],"auto-rows":[{"auto-rows":I()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":w()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":w()}],"space-y-reverse":["space-y-reverse"],size:[{size:S()}],w:[{w:[i,"screen",...S()]}],"min-w":[{"min-w":[i,"screen","none",...S()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[s]},...S()]}],h:[{h:["screen","lh",...S()]}],"min-h":[{"min-h":["screen","lh","none",...S()]}],"max-h":[{"max-h":["screen","lh",...S()]}],"font-size":[{text:["base",r,ke,he]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,ye,ge]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",se,be]}],"font-family":[{font:[Ne,be,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:[a,ye,be]}],"line-clamp":[{"line-clamp":[ae,"none",ye,ge]}],leading:[{leading:[n,...w()]}],"list-image":[{"list-image":["none",ye,be]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ye,be]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:R()}],"text-color":[{text:R()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[ae,"from-font","auto",ye,he]}],"text-decoration-color":[{decoration:R()}],"underline-offset":[{"underline-offset":[ae,"auto",ye,be]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:w()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ye,be]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ye,be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:D()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:M()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ne,ye,be],radial:["",ye,be],conic:[ne,ye,be]},ze,xe]}],"bg-color":[{bg:R()}],"gradient-from-pos":[{from:E()}],"gradient-via-pos":[{via:E()}],"gradient-to-pos":[{to:E()}],"gradient-from":[{from:R()}],"gradient-via":[{via:R()}],"gradient-to":[{to:R()}],rounded:[{rounded:O()}],"rounded-s":[{"rounded-s":O()}],"rounded-e":[{"rounded-e":O()}],"rounded-t":[{"rounded-t":O()}],"rounded-r":[{"rounded-r":O()}],"rounded-b":[{"rounded-b":O()}],"rounded-l":[{"rounded-l":O()}],"rounded-ss":[{"rounded-ss":O()}],"rounded-se":[{"rounded-se":O()}],"rounded-ee":[{"rounded-ee":O()}],"rounded-es":[{"rounded-es":O()}],"rounded-tl":[{"rounded-tl":O()}],"rounded-tr":[{"rounded-tr":O()}],"rounded-br":[{"rounded-br":O()}],"rounded-bl":[{"rounded-bl":O()}],"border-w":[{border:A()}],"border-w-x":[{"border-x":A()}],"border-w-y":[{"border-y":A()}],"border-w-s":[{"border-s":A()}],"border-w-e":[{"border-e":A()}],"border-w-t":[{"border-t":A()}],"border-w-r":[{"border-r":A()}],"border-w-b":[{"border-b":A()}],"border-w-l":[{"border-l":A()}],"divide-x":[{"divide-x":A()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":A()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:R()}],"border-color-x":[{"border-x":R()}],"border-color-y":[{"border-y":R()}],"border-color-s":[{"border-s":R()}],"border-color-e":[{"border-e":R()}],"border-color-t":[{"border-t":R()}],"border-color-r":[{"border-r":R()}],"border-color-b":[{"border-b":R()}],"border-color-l":[{"border-l":R()}],"divide-color":[{divide:R()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[ae,ye,be]}],"outline-w":[{outline:["",ae,ke,he]}],"outline-color":[{outline:R()}],shadow:[{shadow:["","none",d,Se,we]}],"shadow-color":[{shadow:R()}],"inset-shadow":[{"inset-shadow":["none",u,Se,we]}],"inset-shadow-color":[{"inset-shadow":R()}],"ring-w":[{ring:A()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:R()}],"ring-offset-w":[{"ring-offset":[ae,he]}],"ring-offset-color":[{"ring-offset":R()}],"inset-ring-w":[{"inset-ring":A()}],"inset-ring-color":[{"inset-ring":R()}],"text-shadow":[{"text-shadow":["none",m,Se,we]}],"text-shadow-color":[{"text-shadow":R()}],opacity:[{opacity:[ae,ye,be]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ae]}],"mask-image-linear-from-pos":[{"mask-linear-from":P()}],"mask-image-linear-to-pos":[{"mask-linear-to":P()}],"mask-image-linear-from-color":[{"mask-linear-from":R()}],"mask-image-linear-to-color":[{"mask-linear-to":R()}],"mask-image-t-from-pos":[{"mask-t-from":P()}],"mask-image-t-to-pos":[{"mask-t-to":P()}],"mask-image-t-from-color":[{"mask-t-from":R()}],"mask-image-t-to-color":[{"mask-t-to":R()}],"mask-image-r-from-pos":[{"mask-r-from":P()}],"mask-image-r-to-pos":[{"mask-r-to":P()}],"mask-image-r-from-color":[{"mask-r-from":R()}],"mask-image-r-to-color":[{"mask-r-to":R()}],"mask-image-b-from-pos":[{"mask-b-from":P()}],"mask-image-b-to-pos":[{"mask-b-to":P()}],"mask-image-b-from-color":[{"mask-b-from":R()}],"mask-image-b-to-color":[{"mask-b-to":R()}],"mask-image-l-from-pos":[{"mask-l-from":P()}],"mask-image-l-to-pos":[{"mask-l-to":P()}],"mask-image-l-from-color":[{"mask-l-from":R()}],"mask-image-l-to-color":[{"mask-l-to":R()}],"mask-image-x-from-pos":[{"mask-x-from":P()}],"mask-image-x-to-pos":[{"mask-x-to":P()}],"mask-image-x-from-color":[{"mask-x-from":R()}],"mask-image-x-to-color":[{"mask-x-to":R()}],"mask-image-y-from-pos":[{"mask-y-from":P()}],"mask-image-y-to-pos":[{"mask-y-to":P()}],"mask-image-y-from-color":[{"mask-y-from":R()}],"mask-image-y-to-color":[{"mask-y-to":R()}],"mask-image-radial":[{"mask-radial":[ye,be]}],"mask-image-radial-from-pos":[{"mask-radial-from":P()}],"mask-image-radial-to-pos":[{"mask-radial-to":P()}],"mask-image-radial-from-color":[{"mask-radial-from":R()}],"mask-image-radial-to-color":[{"mask-radial-to":R()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[ae]}],"mask-image-conic-from-pos":[{"mask-conic-from":P()}],"mask-image-conic-to-pos":[{"mask-conic-to":P()}],"mask-image-conic-from-color":[{"mask-conic-from":R()}],"mask-image-conic-to-color":[{"mask-conic-to":R()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:D()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:M()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ye,be]}],filter:[{filter:["","none",ye,be]}],blur:[{blur:L()}],brightness:[{brightness:[ae,ye,be]}],contrast:[{contrast:[ae,ye,be]}],"drop-shadow":[{"drop-shadow":["","none",f,Se,we]}],"drop-shadow-color":[{"drop-shadow":R()}],grayscale:[{grayscale:["",ae,ye,be]}],"hue-rotate":[{"hue-rotate":[ae,ye,be]}],invert:[{invert:["",ae,ye,be]}],saturate:[{saturate:[ae,ye,be]}],sepia:[{sepia:["",ae,ye,be]}],"backdrop-filter":[{"backdrop-filter":["","none",ye,be]}],"backdrop-blur":[{"backdrop-blur":L()}],"backdrop-brightness":[{"backdrop-brightness":[ae,ye,be]}],"backdrop-contrast":[{"backdrop-contrast":[ae,ye,be]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ae,ye,be]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ae,ye,be]}],"backdrop-invert":[{"backdrop-invert":["",ae,ye,be]}],"backdrop-opacity":[{"backdrop-opacity":[ae,ye,be]}],"backdrop-saturate":[{"backdrop-saturate":[ae,ye,be]}],"backdrop-sepia":[{"backdrop-sepia":["",ae,ye,be]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ye,be]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ae,"initial",ye,be]}],ease:[{ease:["linear","initial",g,ye,be]}],delay:[{delay:[ae,ye,be]}],animate:[{animate:["none",v,ye,be]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,ye,be]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:j()}],"rotate-x":[{"rotate-x":j()}],"rotate-y":[{"rotate-y":j()}],"rotate-z":[{"rotate-z":j()}],scale:[{scale:$()}],"scale-x":[{"scale-x":$()}],"scale-y":[{"scale-y":$()}],"scale-z":[{"scale-z":$()}],"scale-3d":["scale-3d"],skew:[{skew:V()}],"skew-x":[{"skew-x":V()}],"skew-y":[{"skew-y":V()}],transform:[{transform:[ye,be,"","none","gpu","cpu"]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:F()}],"translate-x":[{"translate-x":F()}],"translate-y":[{"translate-y":F()}],"translate-z":[{"translate-z":F()}],"translate-none":["translate-none"],accent:[{accent:R()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:R()}],"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",ye,be]}],"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":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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",ye,be]}],fill:[{fill:["none",...R()]}],"stroke-w":[{stroke:[ae,ke,he,ge]}],stroke:[{stroke:["none",...R()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function Ve(...e){return $e(E(e))}function Fe(e,t){if(e)if("function"==typeof e)e(t);else try{e.current=t}catch{}}function Te(...e){return t.useCallback(t=>{e.forEach(e=>Fe(e,t))},e)}function We(e){return function(e){return!!(e&&"object"==typeof e&&"value"in e&&"peek"in e&&"function"==typeof e.peek&&"subscribe"in e&&"function"==typeof e.subscribe)}(e)?e.value:e}const _e=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,qe=E,Be=(e,t)=>r=>{var o;if(null==(null==t?void 0:t.variants))return qe(e,null==r?void 0:r.class,null==r?void 0:r.className);const{variants:a,defaultVariants:n}=t,s=Object.keys(a).map(e=>{const t=null==r?void 0:r[e],o=null==n?void 0:n[e];if(null===t)return null;const s=_e(t)||_e(o);return a[e][s]}),i=r&&Object.entries(r).reduce((e,t)=>{let[r,o]=t;return void 0===o||(e[r]=o),e},{}),l=null==t||null===(o=t.compoundVariants)||void 0===o?void 0:o.reduce((e,t)=>{let{class:r,className:o,...a}=t;return Object.entries(a).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...n,...i}[t]):{...n,...i}[t]===r})?[...e,r,o]:e},[]);return qe(e,s,l,null==r?void 0:r.class,null==r?void 0:r.className)},Ge=Be("relative flex shrink-0 overflow-hidden",{variants:{size:{sm:"w-6 h-6 text-xs",md:"w-8 h-8 text-sm",lg:"w-12 h-12 text-base"},shape:{circle:"rounded-full",square:"rounded-md"}},defaultVariants:{size:"md",shape:"circle"}}),He=t.forwardRef(({children:e,className:r,size:o,shape:a,...n},i)=>{const[c,d]=t.useState("idle"),u=t.useCallback(e=>{d(e)},[]),m=t.useMemo(()=>({imageLoadingStatus:c,onImageLoadingStatusChange:u}),[c,u]);return s(l,{value:m,children:s("span",{ref:i,className:Ve(Ge({size:o,shape:a}),r),...n,children:e})})});He.displayName="AvatarRoot";const Ke=t.forwardRef(({src:e,alt:r,className:o,onLoadingStatusChange:a,...n},i)=>{const{imageLoadingStatus:l,onImageLoadingStatusChange:d}=c(),[u,m]=t.useState(!1);return t.useEffect(()=>{if(m(!1),!e)return;d("loading"),a?.("loading");const t=new Image,r=()=>{d("loaded"),a?.("loaded")},o=()=>{m(!0),d("error"),a?.("error")};return t.addEventListener("load",r),t.addEventListener("error",o),t.src=e,()=>{t.removeEventListener("load",r),t.removeEventListener("error",o)}},[e,d,a]),!e||u||"error"===l?null:s("img",{ref:i,src:e,alt:r,className:Ve("aspect-square h-full w-full object-cover",o),...n})});Ke.displayName="AvatarImage";const Xe=t.forwardRef(({children:e,className:r,delayMs:o=0,...a},n)=>{const{imageLoadingStatus:i}=c(),[l,d]=t.useState(0===o);t.useEffect(()=>{if(0===o)return;const e=setTimeout(()=>{d(!0)},o);return()=>{clearTimeout(e)}},[o]);return l&&("idle"===i||"error"===i)?s("span",{ref:n,className:Ve("flex h-full w-full items-center justify-center","bg-surface-secondary text-alt font-medium uppercase cursor-default",r),...a,children:e}):null});Xe.displayName="AvatarFallback";const Ye=Object.assign(He,{Root:He,Image:Ke,Fallback:Xe}),Ue=Be(["inline-flex items-center justify-center","text-main font-semibold","box-border rounded-sm transition-highlight","focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-offset-0","disabled:select-none disabled:pointer-events-none disabled:opacity-30","overflow-hidden text-ellipsis whitespace-nowrap cursor-pointer"],{variants:{variant:{text:"bg-btn-primary hover:bg-btn-primary-hover active:bg-btn-active active:text-alt",filled:"bg-btn-secondary hover:bg-btn-secondary-hover active:bg-btn-active active:text-alt",solid:"bg-btn-tertiary text-alt hover:bg-btn-tertiary-hover active:bg-btn-active",outline:"bg-btn-primary hover:bg-btn-primary-hover active:bg-btn-active active:text-alt border border-bdr-strong"},size:{sm:"h-9 px-3.5 gap-2 text-sm",md:"h-10 px-3.5 gap-2.5 text-base",lg:"h-11.5 px-4 gap-3 text-lg"}},defaultVariants:{variant:"text",size:"md"}}),Ze=t.forwardRef(({className:e,variant:t="text",size:r="md",iconSize:o,iconStrokeWidth:a=1.5,startIcon:n,label:i,endIcon:l,title:c,children:d,...u},m)=>{const f=n,p=l,b=o??(e=>{switch(e){case"sm":return 14;case"md":return 20;case"lg":return 24}})(r??"md");return s("button",{ref:m,type:"button",className:Ve(Ue({variant:t,size:r}),e),title:c,"aria-label":c??i,"aria-disabled":u.disabled,...u,children:[f&&s(f,{size:b,strokeWidth:a}),d,i,p&&s(p,{size:b,strokeWidth:a})]})});Ze.displayName="Button";const Je=(e,r)=>{t.useEffect(()=>{if(!e)return;const t=r??document.body,o=t.style.overflow;return t.style.overflow="hidden",()=>{t.style.overflow=o}},[e,r])};function Qe(e,r,o){const[a,n]=t.useState(r),s=void 0!==e;return[s?e:a,t.useCallback(e=>{s||n(e),o?.(e)},[s,o])]}function et(){const e=t.useRef(new Map);return{registerItem:t.useCallback((t,r=!1)=>{e.current.set(t,{disabled:r})},[]),unregisterItem:t.useCallback(t=>{e.current.delete(t)},[]),getItems:t.useCallback(()=>Array.from(e.current.keys()),[]),isItemDisabled:t.useCallback(t=>e.current.get(t)?.disabled??!1,[])}}function tt(e){const{getItems:r,isItemDisabled:o,active:a,setActive:n,loop:s=!1,orientation:i="vertical",onSelect:l,onEscape:c}=e,d=t.useCallback(e=>{const t=r();if(!t.length)return;const i=a?t.indexOf(a):-1;let l,c=0;const d=t.length;for(l=-1===i?e>0?0:t.length-1:i+e;c<d;){if(s)l<0?l=t.length-1:l>=t.length&&(l=0);else if(l<0||l>=t.length)return;if(!o(t[l]))return void n(t[l]);l+=e,c++}},[r,a,n,s,o]),u=t.useCallback(e=>{const t=r();if(!t.length)return;const s="vertical"===i,u=s?"ArrowDown":"ArrowRight",m=s?"ArrowUp":"ArrowLeft";switch(e.key){case u:e.preventDefault(),d(1);break;case m:e.preventDefault(),d(-1);break;case"Home":e.preventDefault();{const e=t.find(e=>!o(e));e&&n(e)}break;case"End":e.preventDefault();{const e=[...t].reverse().find(e=>!o(e));e&&n(e)}break;case"Enter":case" ":e.preventDefault(),a&&!o(a)&&l?.(a);break;case"Escape":e.preventDefault(),c?.()}},[r,a,d,n,o,i,l,c]);return{moveActive:d,handleKeyDown:u}}
2
2
  /**
3
3
  * @license lucide-react v0.545.0 - ISC
4
4
  *
5
5
  * This source code is licensed under the ISC license.
6
6
  * See the LICENSE file in the root directory of this source tree.
7
- */const Qe=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)},et=(...e)=>e.filter((e,t,r)=>Boolean(e)&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim(),tt=e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};
7
+ */const rt=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)},ot=(...e)=>e.filter((e,t,r)=>Boolean(e)&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim(),at=e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};
8
8
  /**
9
9
  * @license lucide-react v0.545.0 - ISC
10
10
  *
11
11
  * This source code is licensed under the ISC license.
12
12
  * See the LICENSE file in the root directory of this source tree.
13
13
  */
14
- var rt={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};
14
+ var nt={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};
15
15
  /**
16
16
  * @license lucide-react v0.545.0 - ISC
17
17
  *
18
18
  * This source code is licensed under the ISC license.
19
19
  * See the LICENSE file in the root directory of this source tree.
20
- */const ot=t.forwardRef(({color:e="currentColor",size:r=24,strokeWidth:o=2,absoluteStrokeWidth:n,className:a="",children:s,iconNode:i,...l},c)=>t.createElement("svg",{ref:c,...rt,width:r,height:r,stroke:e,strokeWidth:n?24*Number(o)/Number(r):o,className:et("lucide",a),...!s&&!tt(l)&&{"aria-hidden":"true"},...l},[...i.map(([e,r])=>t.createElement(e,r)),...Array.isArray(s)?s:[s]])),nt=(e,r)=>{const o=t.forwardRef(({className:o,...n},a)=>{return t.createElement(ot,{ref:a,iconNode:r,className:et(`lucide-${s=Qe(e),s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,o),...n});var s});return o.displayName=Qe(e),o},at=nt("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),st=nt("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),it=nt("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),lt=nt("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]),ct=nt("lock-keyhole",[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]]),dt=nt("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]),ut=nt("octagon-alert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]]),mt=nt("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),ft=nt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),pt=We(["inline-block","flex-shrink-0 flex items-center justify-center","h-3.5 w-3.5","border-[1.5px] rounded-xs","bg-transparent","transition-highlight"],{variants:{editable:{true:["peer-focus-visible:outline-none peer-focus-visible:ring-3 peer-focus-visible:ring-ring/50 peer-focus-visible:ring-offset-0","peer-hover:outline-none peer-hover:ring-3 peer-hover:ring-ring/50 peer-hover:ring-offset-0"],false:"opacity-30"},state:{default:["border-main","peer-checked:bg-main peer-checked:border-main","peer-indeterminate:bg-main peer-indeterminate:border-main","group-data-[tone=inverse]:border-alt","group-data-[tone=inverse]:peer-checked:bg-alt","group-data-[tone=inverse]:peer-checked:border-alt","group-data-[tone=inverse]:peer-indeterminate:bg-alt","group-data-[tone=inverse]:peer-indeterminate:border-alt"],error:["border-error","peer-checked:bg-error peer-checked:border-error","peer-indeterminate:bg-error peer-indeterminate:border-error","peer-focus-visible:border-error peer-focus-visible:ring-error/50","peer-hover:border-error peer-hover:ring-error/50"]}},defaultVariants:{state:"default",editable:!0}}),bt=t.forwardRef(({id:e,className:t,name:r,label:o,defaultChecked:n=!1,checked:a,align:i="left",error:l,disabled:c,readOnly:d,required:u,value:m="on",onCheckedChange:f,errorMessage:p,...b},h)=>{const g=v(Ve(e)),x=l?"error":"default",w=!c&&!d,[y,k]=Ue(a,n,f),N="indeterminate"===y,C=!0===y;return s("div",{children:[s("label",{htmlFor:g,className:Le("relative flex items-center select-none gap-2","right"===i&&"flex-row-reverse justify-end",w?"cursor-pointer":"cursor-default",t),children:[s("input",{ref:e=>{"function"==typeof h?h(e):h&&(h.current=e),e&&(e.indeterminate=N)},...b,id:g,type:"checkbox",className:"peer sr-only",checked:C,disabled:d??c,required:u,name:r,value:m,"aria-checked":N?"mixed":C,"aria-disabled":c,"aria-invalid":l,"aria-readonly":d,"data-state":N?"indeterminate":C?"checked":"unchecked","data-disabled":c?"":void 0,onChange:e=>{if(!w)return;let t;t=!N&&e.currentTarget.checked,k(t)}}),s("span",{className:Le(pt({state:x,editable:w})),"aria-hidden":"true",children:N?s(dt,{size:10,className:Le("text-rev",!l&&"group-data-[tone=inverse]:text-alt-rev"),strokeWidth:4}):C?s(st,{size:10,className:Le("text-rev",!l&&"group-data-[tone=inverse]:text-alt-rev"),strokeWidth:4}):null}),o&&s("span",{className:Le("text-main group-data-[tone=inverse]:text-alt",c&&"opacity-30"),children:o})]}),"error"===x&&p&&s("div",{className:Le("flex items-center gap-2 mt-1 text-error leading-5",c&&"opacity-30"),children:[s(ut,{size:14,strokeWidth:2.5}),p]})]})});
20
+ */const st=t.forwardRef(({color:e="currentColor",size:r=24,strokeWidth:o=2,absoluteStrokeWidth:a,className:n="",children:s,iconNode:i,...l},c)=>t.createElement("svg",{ref:c,...nt,width:r,height:r,stroke:e,strokeWidth:a?24*Number(o)/Number(r):o,className:ot("lucide",n),...!s&&!at(l)&&{"aria-hidden":"true"},...l},[...i.map(([e,r])=>t.createElement(e,r)),...Array.isArray(s)?s:[s]])),it=(e,r)=>{const o=t.forwardRef(({className:o,...a},n)=>{return t.createElement(st,{ref:n,iconNode:r,className:ot(`lucide-${s=rt(e),s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,o),...a});var s});return o.displayName=rt(e),o},lt=it("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),ct=it("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),dt=it("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),ut=it("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]),mt=it("lock-keyhole",[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]]),ft=it("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]),pt=it("octagon-alert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]]),bt=it("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),ht=it("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),gt=Be(["inline-block","flex-shrink-0 flex items-center justify-center","h-3.5 w-3.5","border-[1.5px] rounded-xs","bg-transparent","transition-highlight"],{variants:{editable:{true:["peer-focus-visible:outline-none peer-focus-visible:ring-3 peer-focus-visible:ring-ring/50 peer-focus-visible:ring-offset-0","peer-hover:outline-none peer-hover:ring-3 peer-hover:ring-ring/50 peer-hover:ring-offset-0"],false:"opacity-30"},state:{default:["border-main","peer-checked:bg-main peer-checked:border-main","peer-indeterminate:bg-main peer-indeterminate:border-main","group-data-[tone=inverse]:border-alt","group-data-[tone=inverse]:peer-checked:bg-alt","group-data-[tone=inverse]:peer-checked:border-alt","group-data-[tone=inverse]:peer-indeterminate:bg-alt","group-data-[tone=inverse]:peer-indeterminate:border-alt"],error:["border-error","peer-checked:bg-error peer-checked:border-error","peer-indeterminate:bg-error peer-indeterminate:border-error","peer-focus-visible:border-error peer-focus-visible:ring-error/50","peer-hover:border-error peer-hover:ring-error/50"]}},defaultVariants:{state:"default",editable:!0}}),vt=t.forwardRef(({id:e,className:t,name:r,label:o,defaultChecked:a=!1,checked:n,align:i="left",error:l,disabled:c,readOnly:d,required:u,value:m="on",onCheckedChange:f,errorMessage:p,...b},h)=>{const g=v(We(e)),x=l?"error":"default",w=!c&&!d,[y,k]=Qe(n,a,f),N="indeterminate"===y,C=!0===y;return s("div",{children:[s("label",{htmlFor:g,className:Ve("relative flex items-center select-none gap-2","right"===i&&"flex-row-reverse justify-end",w?"cursor-pointer":"cursor-default",t),children:[s("input",{ref:e=>{"function"==typeof h?h(e):h&&(h.current=e),e&&(e.indeterminate=N)},...b,id:g,type:"checkbox",className:"peer sr-only",checked:C,disabled:d??c,required:u,name:r,value:m,"aria-checked":N?"mixed":C,"aria-disabled":c,"aria-invalid":l,"aria-readonly":d,"data-state":N?"indeterminate":C?"checked":"unchecked","data-disabled":c?"":void 0,onChange:e=>{if(!w)return;let t;t=!N&&e.currentTarget.checked,k(t)}}),s("span",{className:Ve(gt({state:x,editable:w})),"aria-hidden":"true",children:N?s(ft,{size:10,className:Ve("text-rev",!l&&"group-data-[tone=inverse]:text-alt-rev"),strokeWidth:4}):C?s(ct,{size:10,className:Ve("text-rev",!l&&"group-data-[tone=inverse]:text-alt-rev"),strokeWidth:4}):null}),o&&s("span",{className:Ve("text-main group-data-[tone=inverse]:text-alt",c&&"opacity-30"),children:o})]}),"error"===x&&p&&s("div",{className:Ve("flex items-center gap-2 mt-1 text-error leading-5",c&&"opacity-30"),children:[s(pt,{size:14,strokeWidth:2.5}),p]})]})});
21
21
  /**
22
22
  * @license lucide-react v0.545.0 - ISC
23
23
  *
24
24
  * This source code is licensed under the ISC license.
25
25
  * See the LICENSE file in the root directory of this source tree.
26
- */bt.displayName="Checkbox";const ht=We(["p-0"],{variants:{size:{sm:"h-9 w-9",md:"h-10 w-10",lg:"h-11.5 w-11.5"},shape:{square:"rounded-sm",round:"rounded-full"}},defaultVariants:{size:"md",shape:"square"}}),gt=t.forwardRef(({className:e,variant:t="text",size:r="md",shape:o="square",icon:n,...a},i)=>s(Xe,{ref:i,className:Le(ht({size:r,shape:o}),e),variant:t,size:r,startIcon:n,label:"",...a}));gt.displayName="IconButton";const vt=[],xt=({children:e,open:r,defaultOpen:o=!1,onOpenChange:n,closeOnBlur:a=!0,value:i,defaultValue:l="",onChange:c,disabled:d=!1,error:m=!1,selectionMode:f="single",selection:p,defaultSelection:b=vt,onSelectionChange:h,active:g,defaultActive:x,setActive:w})=>{const y=v(),[k,N]=Ue(r,o,n),[C,I]=Ue(i,l,c),[z,D]=t.useState(()=>new Set(b)),S=void 0!==p,R=t.useMemo(()=>S?new Set(p):z,[S,p,z]),M=t.useCallback(e=>{const t=new Set(e);S||D(t),h?.(e),"single"===f&&N(!1)},[S,f,N,h]),[E,O]=Ue(g,x,w),{registerItem:A,unregisterItem:P,getItems:L,isItemDisabled:j}=Ze(),$=t.useCallback(e=>{I(e),N(!0)},[I,N]),V=t.useCallback(e=>{N(e)},[N]),{handleKeyDown:T}=Je({getItems:L,isItemDisabled:j,active:E,setActive:O,loop:!1,orientation:"vertical",onSelect:e=>{const t="multiple"===f?R.has(e)?Array.from(R).filter(t=>t!==e):[...Array.from(R),e]:[e];M(t)}}),_=t.useCallback(e=>{if(!d){if("ArrowDown"!==e.key&&"ArrowUp"!==e.key||k||(e.preventDefault(),N(!0)),"Escape"===e.key)return e.preventDefault(),void N(!1);T(e)}},[d,k,N,T]);t.useEffect(()=>{if(k&&void 0===E){const e=L();e.length>0&&O(e[0])}},[k,E,L,O]);const W=t.useMemo(()=>({open:k,setOpen:V,inputValue:C,setInputValue:$,baseId:y,active:E,disabled:d,error:m,closeOnBlur:a,keyHandler:_,selection:R}),[k,V,a,_,C,$,E,y,d,m,R]);return s(u,{value:W,children:s(nr.Root,{selectionMode:f,selection:Array.from(R),onSelectionChange:M,disabled:d,active:E,focusable:!1,baseId:y,setActive:O,keyHandler:_,registerItem:A,unregisterItem:P,getItems:L,isItemDisabled:j,children:e})})};xt.displayName="Combobox.Root";const wt=t.forwardRef(({className:e,children:r},o)=>{const n=t.useRef(null),{setOpen:a,baseId:i,closeOnBlur:l}=m();return s("div",{onFocusOut:l?t.useCallback(e=>{const t=e.relatedTarget;t&&n.current?.contains(t)||a(!1)},[i,a]):void 0,ref:$e(o,n),className:e,children:r})});wt.displayName="Combobox.Content";const yt=We(["flex items-center","h-12 rounded-sm border bg-surface-neutral","focus-within:outline-none focus-within:ring-3 focus-within:ring-ring/50 focus-within:ring-offset-0","transition-highlight"],{variants:{error:{true:"border-error focus-within:border-error focus-within:ring-error/50",false:"border-bdr-subtle focus-within:border-bdr-strong"},open:{true:"border-bdr-strong",false:null},disabled:{true:"pointer-events-none select-none opacity-30",false:null}},defaultVariants:{error:!1,open:!1,disabled:!1}}),kt=({children:e,className:t})=>{const{open:r,disabled:o,error:n}=m();return s("div",{className:Le(yt({error:n,open:r,disabled:o}),t),"data-open":r?"true":void 0,children:e})};kt.displayName="Combobox.Control";const Nt=t.forwardRef(({className:e,placeholder:r,...o},n)=>{const a=t.useRef(null),{inputValue:i,setInputValue:l,open:c,keyHandler:d,selection:u,baseId:f,active:p,disabled:b,error:h}=m();return t.useEffect(()=>{c&&!b&&a.current?.focus()},[c,u,b]),s(pr,{ref:$e(n,a),id:`${f}-input`,className:"border-none focus:outline-none focus-within:outline-none h-auto focus-within:ring-0 grow",value:i,onChange:l,onKeyDown:d,placeholder:r,disabled:b,"aria-disabled":b,"aria-invalid":h??void 0,role:"combobox","aria-autocomplete":"list","aria-expanded":c,"aria-haspopup":"listbox","aria-controls":`${f}-listbox`,"aria-activedescendant":p?`${f}-listbox-option-${p}`:void 0,showClearButton:!1,...o})});Nt.displayName="Combobox.Input";const Ct=({className:e})=>{const{open:t,setOpen:r,disabled:o}=m();return s(gt,{type:"button",variant:"text",size:"md",icon:it,"aria-label":"Toggle",onClick:()=>{o||r(!t)},disabled:o,tabIndex:-1,className:Le("h-10 w-10 text-subtle transition-transform hover:bg-surface-primary-hover mr-1",t&&"rotate-180",e)})};Ct.displayName="Combobox.Toggle";const It=({children:e,className:t})=>{const{open:r}=m();return r?s("div",{className:Le("absolute left-0 right-0 z-50 mt-1 rounded-sm bg-surface-neutral shadow-lg ring-1 ring-bdr-subtle",t),children:e}):null};It.displayName="Combobox.Popup";const zt=Object.assign(xt,{Root:xt,Content:wt,Control:kt,Input:Nt,Toggle:Ct,Popup:It}),Dt=({open:e,defaultOpen:r=!1,onOpenChange:o,children:n})=>{const[a,i]=Ue(e,r,o),l=t.useMemo(()=>({open:a,setOpen:i}),[a,i]);return s(p,{value:l,children:n})};Dt.displayName="Dialog.Root";const St=t.forwardRef(({asChild:e,children:t,onClick:o,...n},a)=>{const{setOpen:i}=b();return s(e?r.Slot:"button",{ref:a,type:e?void 0:"button",onClick:e=>{o?.(e),i(!0)},...n,children:t})});St.displayName="Dialog.Trigger";const Rt=({children:e,container:r,forceMount:o})=>{const{open:a}=b(),[s,i]=t.useState(!1);return t.useEffect(()=>{i(!0)},[]),s&&(o||a)?n.createPortal(e,r??document.body):null};Rt.displayName="Dialog.Portal";const Mt=t.forwardRef(({className:e,forceMount:t,...r},o)=>{const{open:n}=b();return t||n?s("div",{ref:o,"data-state":n?"open":"closed",className:Le("fixed inset-0 z-30 bg-overlay backdrop-blur-xs","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...r}):null});Mt.displayName="Dialog.Overlay";const Et=t.forwardRef(({children:e,className:r,forceMount:n,onEscapeKeyDown:a,onPointerDownOutside:i,onInteractOutside:l,onOpenAutoFocus:c,onCloseAutoFocus:d,...u},m)=>{const{open:f,setOpen:p}=b(),h=t.useRef(null),g=t.useId(),v=t.useId();t.useEffect(()=>{"function"==typeof m?m(h.current):m&&(m.current=h.current)},[m]),Ye(f);const x=t.useCallback(e=>{"Escape"===e.key&&(a?.(e),e.defaultPrevented||p(!1))},[a,p]);t.useEffect(()=>{if(f)return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[f,x]);const w=t.useCallback(e=>{const t=e.target;h.current&&!h.current.contains(t)&&(i?.(e),l?.(e),e.defaultPrevented||p(!1))},[i,l,p]);return t.useEffect(()=>{if(f)return document.addEventListener("pointerdown",w),()=>document.removeEventListener("pointerdown",w)},[f,w]),n||f?s(o.FocusTrap,{active:f,focusTrapOptions:{initialFocus:!1,fallbackFocus:()=>h.current??document.body,escapeDeactivates:!1,clickOutsideDeactivates:!1,returnFocusOnDeactivate:!0,allowOutsideClick:!0,preventScroll:!1,onActivate:()=>{requestAnimationFrame(()=>{const e=new Event("openautofocus",{bubbles:!0,cancelable:!0});c?.(e),!e.defaultPrevented&&h.current&&h.current.focus()})},onDeactivate:()=>{requestAnimationFrame(()=>{const e=new Event("closeautofocus",{bubbles:!0,cancelable:!0});d?.(e)})}},children:s("div",{className:"fixed inset-0 z-40 flex items-center justify-center p-4",children:s("div",{ref:h,role:"dialog","aria-modal":"true","aria-labelledby":g,"aria-describedby":v,"data-state":f?"open":"closed",tabIndex:-1,className:Le("relative rounded-lg shadow-xl bg-surface-neutral","flex flex-col max-w-lg w-full max-h-[90vh] gap-10 p-10","border border-bdr-subtle outline-none overflow-hidden","focus:outline-none focus:ring-0","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",r),...u,children:e})})}):null});Et.displayName="Dialog.Content";const Ot=t.forwardRef(({className:e,children:t,...r},o)=>s("header",{ref:o,className:Le("relative grid gap-2.5 self-stretch",e),...r,children:t}));Ot.displayName="Dialog.Header";const At=t.forwardRef(({children:e,asChild:o,onClick:n,...a},i)=>{const{setOpen:l}=b(),c=t.useCallback(e=>{n?.(e),e.defaultPrevented||l(!1)},[n,l]);return s(o?r.Slot:"button",{ref:i,type:o?void 0:"button",onClick:c,...a,children:e})});At.displayName="Dialog.Close";const Pt=t.forwardRef(({children:e,className:t,asChild:o,...n},a)=>s(o?r.Slot:"h2",{ref:a,className:Le("text-2xl font-semibold",t),...n,children:e}));Pt.displayName="Dialog.Title";const Lt=t.forwardRef(({children:e,className:t,asChild:o,...n},a)=>s(o?r.Slot:"p",{ref:a,className:Le("",t),...n,children:e}));Lt.displayName="Dialog.Description";const jt=t.forwardRef(({className:e,children:t,...r},o)=>s("div",{ref:o,className:Le("min-h-0 flex-1 overflow-y-auto",e),...r,children:t}));jt.displayName="Dialog.Body";const $t=t.forwardRef(({className:e,children:t,...r},o)=>s("footer",{ref:o,className:Le("flex justify-end gap-2.5",e),...r,children:t}));$t.displayName="Dialog.Footer";const Vt=t.forwardRef((e,t)=>s(At,{asChild:!0,ref:t,...e,children:s(gt,{"aria-label":"Close","data-area":"close",icon:ft,size:"lg",iconSize:36,iconStrokeWidth:1,shape:"round",variant:"filled"})}));Vt.displayName="Dialog.DefaultClose";const Tt=t.forwardRef(({title:e,description:t,withClose:r,className:o,children:n,...a},i)=>s(Ot,{ref:i,className:Le(r&&"grid-cols-[minmax(0,1fr)_auto]",o),...a,children:[s(Pt,{className:Le(r&&"col-start-1 row-start-1 min-w-0"),children:e}),r&&s(Vt,{className:"col-start-2 row-start-1 row-span-2 self-start justify-self-end"}),t&&s(Lt,{className:Le(r&&"row-start-2"),children:t}),n]}));Tt.displayName="Dialog.DefaultHeader";const _t=Object.assign(Dt,{Root:Dt,Trigger:St,Portal:Rt,Overlay:Mt,Content:Et,Header:Ot,Close:At,Title:Pt,Description:Lt,Body:jt,Footer:$t,DefaultClose:Vt,DefaultHeader:Tt}),Wt=We(["relative flex rounded-sm overflow-hidden","h-12 border focus-within:border-bdr-solid","focus-within:outline-none focus-within:ring-3 focus-within:ring-ring/50 focus-within:ring-offset-0","transition-highlight"],{variants:{state:{default:"border-bdr-subtle focus-within:border-bdr-strong",error:"border-error focus-within:border-error focus-within:ring-error/50"},disabled:{true:"select-none"}},defaultVariants:{state:"default",disabled:!1}}),qt=({children:e,error:t})=>s("div",{className:Le("flex items-center justify-center shrink-0 min-w-12 px-4","text-sm text-subtle bg-surface-primary","first:rounded-l-sm first:border-r first:border-bdr-subtle","last:rounded-r-sm last:border-l last:border-bdr-subtle",t&&"first:border-error last:border-error"),children:e}),Bt=t.forwardRef(({className:e,label:t,description:r,error:o,startAddon:n,endAddon:a,id:i,disabled:l,readOnly:c,...d},u)=>{const m=v(Ve(i)),f=o?"error":"default",p="error"===f;return s("div",{className:Le("w-full",l&&"opacity-30",e),children:[(!!t||!!r)&&s("div",{className:"mb-2",children:[t&&s("label",{htmlFor:m,className:Le("block text-base font-semibold text-main",l&&"opacity-30"),children:s("div",{className:"flex items-center gap-2",children:[c&&s(ct,{size:16,strokeWidth:2.5}),t]})}),r&&s("div",{className:Le("text-sm text-subtle",l&&"opacity-30"),children:r})]}),s("div",{className:Le(Wt({state:f,disabled:l})),children:[n&&s(qt,{error:p,children:n}),s("input",{ref:u,id:m,className:Le("flex-1 w-full px-4.5 text-base","text-main bg-surface-neutral placeholder:text-subtle","border-0 focus:outline-none","disabled:select-none read-only:bg-surface-primary",n&&"rounded-l-none",a&&"rounded-r-none"),disabled:l,readOnly:c,...d}),a&&s(qt,{error:p,children:a})]}),o&&s("div",{className:"flex items-center gap-2 mt-2 leading-5 text-error",children:[s(ut,{size:16,strokeWidth:2.5}),o]})]})});function Ft(e,t,r=!1){return"function"==typeof e?e:!0===e||void 0===e&&r?t:void 0}Bt.displayName="Input";const Gt=t.forwardRef(({className:e,href:t,external:r="auto",newTab:o,leftIcon:n,rightIcon:a,children:i,rel:l,...c},d)=>{const u="auto"===r?function(e){try{if(e.startsWith("mailto:")||e.startsWith("tel:"))return!0;const t="undefined"!=typeof window?window.location:void 0;return!t||new URL(e,t.origin).origin!==t.origin}catch{return!0}}(t):r,m=o??u?"_blank":void 0,f=Ft(n,at),p=Ft(a,lt,u);return s("a",{ref:d,href:t,className:Le("inline-flex items-center align-baseline gap-1","text-sm font-normal underline underline-offset-3 decoration-1","visited:text-link-visited hover:text-main-hover",e),target:m,rel:o||u?"noopener noreferrer":"noreferrer",...c,children:[f&&s(f,{className:"inline-block flex-none w-3.5 h-3.5",strokeWidth:1.5,"aria-hidden":"true"}),i,p&&s(p,{className:"inline-block flex-none w-3.5 h-3.5",strokeWidth:1.5,"aria-hidden":"true"})]})});function Ht(e,r){return t.Children.toArray(e).find(e=>function(e,r){return t.isValidElement(e)&&e.type===r}(e,r))}Gt.displayName="Link";const Kt=({children:e,className:t,...r})=>s("div",{className:Le("flex items-center gap-2.5 flex-shrink-0",t),...r,children:e}),Xt=({className:e,children:t,...r})=>s("div",{className:Le("flex-1 min-w-0",e),...r,children:t});Xt.displayName="ListItem.Content";const Yt=({className:e,label:t,description:r,metadata:o,icon:n})=>s(Xt,{className:Le(n&&"grid grid-cols-[auto_1fr] gap-2.5 items-center",e),children:[n&&s("div",{className:"flex items-center justify-center flex-shrink-0 group-data-[tone=inverse]:text-alt",children:n}),s("div",{className:"min-w-0 text-left",children:[t&&s("h1",{className:"truncate font-semibold group-data-[tone=inverse]:text-alt",children:t}),r&&s("p",{className:"truncate text-sm text-subtle group-data-[tone=inverse]:text-alt",children:r}),o&&s("p",{className:"text-xs text-subtle group-data-[tone=inverse]:text-alt",children:o})]})]}),Ut=({children:e,className:t,...r})=>s("div",{className:Le("flex items-center gap-5 flex-shrink-0",t),...r,children:e});Ut.displayName="ListItem.Right";const Zt=({children:e,className:t,selected:r,...o})=>{const n=Ht(e,Kt),a=Ht(e,Xt)??Ht(e,Yt),i=Ht(e,Ut);return s("div",{className:Le("group flex items-center px-2.5 py-1 gap-2.5",r&&"bg-surface-primary-selected text-alt",t),"data-tone":r&&"inverse",role:"listitem",...o,children:[n,a,i]})};Zt.displayName="ListItem";const Jt=Object.assign(Zt,{Left:Kt,Content:Xt,DefaultContent:Yt,Right:Ut}),Qt=[],er=({baseId:e,selection:r,defaultSelection:o=Qt,onSelectionChange:n,active:a,defaultActive:i,setActive:l,selectionMode:c="single",focusable:d=!0,disabled:u,children:m,keyHandler:f,registerItem:p,unregisterItem:b,getItems:h,isItemDisabled:g})=>{const x=e??v(),[y,k]=t.useState(()=>new Set(o)),N=void 0!==r,C=t.useMemo(()=>N?new Set(r):y,[N,r,y]),[I,z]=Ue(a,i,l),D=Ze(),S=p??D.registerItem,R=b??D.unregisterItem,M=h??D.getItems,E=g??D.isItemDisabled,O=t.useCallback(e=>{const t=C.has(e),r=new Set(C);"single"===c?(r.clear(),t||r.add(e)):t?r.delete(e):r.add(e),N||k(r),n?.(Array.from(r)),z(e)},[C,c,N,n,z]),A=t.useMemo(()=>({active:I,selection:C,selectionMode:c,focusable:d,disabled:u,setActive:z,toggleValue:O,baseId:x,keyHandler:f,registerItem:S,unregisterItem:R,getItems:M,isItemDisabled:E}),[I,C,c,d,u,z,O,x,f,S,R,M,E]);return s(w,{value:A,children:m})};er.displayName="ListboxRoot";const tr=t.forwardRef(({className:e,label:r,children:o,...n},a)=>{const i=t.useRef(null),{active:l,disabled:c,setActive:d,toggleValue:u,baseId:m,selectionMode:f,keyHandler:p,focusable:b=!0,getItems:h,isItemDisabled:g}=y(),{handleKeyDown:v}=Je({getItems:h,isItemDisabled:g,active:l,setActive:d,loop:!1,orientation:"vertical",onSelect:e=>{u(e)}}),x=p??v;return t.useEffect(()=>{if(!l||!i.current)return;const e=i.current.querySelector(`#${m}-listbox-option-${l}`);e&&e.scrollIntoView({block:"nearest",behavior:"auto"})},[l,m]),s("div",{ref:$e(a,i),id:`${m}-listbox`,className:Le("flex flex-col items-start grow shrink-0 basis-0","max-h-100 overflow-y-auto","focus-within:outline-none focus-within:ring-3 focus-within:ring-ring/50",c&&"pointer-events-none select-none opacity-30",e),role:"listbox","aria-disabled":c,"aria-label":r,"aria-multiselectable":"multiple"===f||void 0,"aria-activedescendant":l?`${m}-listbox-option-${l}`:void 0,tabIndex:b&&!c?0:-1,onKeyDown:x,...n,children:o})});tr.displayName="ListboxContent";const rr=We("flex w-full items-center px-4.5 py-1 gap-x-2.5 cursor-pointer",{variants:{selected:{true:"bg-surface-primary-selected text-alt hover:bg-surface-primary-selected-hover",false:"hover:bg-surface-primary-hover"},active:{true:"bg-surface-primary-hover",false:""},disabled:{true:"opacity-30 cursor-not-allowed pointer-events-none",false:""}},compoundVariants:[{selected:!0,active:!0,class:"bg-surface-primary-selected-hover"}],defaultVariants:{selected:!1,active:!1,disabled:!1}}),or=({value:e,disabled:r=!1,children:o,className:n,...a})=>{const i=y(),{disabled:l,toggleValue:c,baseId:d,registerItem:u,unregisterItem:m}=i,f=i.selection.has(e),p=i.active===e,b=r||l;t.useEffect(()=>(u(e,b),()=>m(e)),[e,b,u,m]);const h=t.useCallback(()=>{b||c(e)},[b,c,e]);return s("div",{id:`${d}-listbox-option-${e}`,className:Le(rr({selected:f,active:p,disabled:b}),n),role:"option","aria-selected":f,"aria-disabled":b??void 0,"data-value":e,"data-active":p||void 0,onClick:h,...a,children:o})};or.displayName="ListboxItem";const nr=Object.assign(er,{Root:er,Content:tr,Item:or}),ar=({open:e,defaultOpen:r=!1,onOpenChange:o,children:n})=>{const a=t.useRef(null),i=v(void 0,"menu-trigger"),l=v(void 0,"menu"),[c,d]=Ue(e,r,o),[u,m]=t.useState(void 0),{registerItem:f,unregisterItem:p,getItems:b,isItemDisabled:h}=Ze(),g=t.useMemo(()=>({open:c,setOpen:d,active:u,setActive:m,registerItem:f,unregisterItem:p,getItems:b,isItemDisabled:h,triggerId:i,menuId:l,triggerRef:a}),[c,d,u,m,f,p,b,h,i,l]);return t.useEffect(()=>{!c&&a.current&&a.current.focus()},[c]),s(N,{value:g,children:n})};ar.displayName="Menu.Root";const sr=t.forwardRef(({asChild:e,onClick:t,onKeyDown:o,className:n,children:a,...i},l)=>{const{open:c,setOpen:d,triggerId:u,menuId:m,triggerRef:f}=C();return s(e?r.Slot:"button",{ref:$e(l,f),id:u,type:e?void 0:"button","aria-haspopup":"menu","aria-expanded":c,"aria-controls":c?m:void 0,onClick:e=>{t?.(e),d(!c)},onKeyDown:e=>{o?.(e),"ArrowDown"!==e.key||c||(e.preventDefault(),d(!0))},className:n,...i,children:a})});sr.displayName="Menu.Trigger";const ir=({container:e,forceMount:r,children:o})=>{const{open:a}=C(),[s,i]=t.useState(!1);return t.useEffect(()=>{i(!0)},[]),s&&(r||a)?n.createPortal(o,e??document.body):null};ir.displayName="Menu.Portal";const lr=t.forwardRef(({forceMount:e,align:r="start",loop:o=!0,onEscapeKeyDown:n,onPointerDownOutside:a,onInteractOutside:i,className:l,children:c,...d},u)=>{const{open:m,setOpen:f,active:p,setActive:b,getItems:h,isItemDisabled:g,menuId:v,triggerRef:x}=C(),w=t.useRef(null),y=$e(u,w),[k,N]=t.useState(void 0);t.useEffect(()=>{if(!m||!x?.current||!w.current)return;const e=()=>{if(!x.current||!w.current)return;const e=x.current.getBoundingClientRect(),t=w.current.getBoundingClientRect(),o=window.innerWidth,n=window.innerHeight;let a=e.bottom;if(a+t.height>n&&(a=e.top-t.height),a<0&&(a=10),"start"===r){let r=e.left;r+t.width>o&&(r=e.right-t.width),r<0&&(r=10),N({top:a,left:r})}else{let r=o-e.right;e.right-t.width<0&&(r=o-(e.left+t.width)),r<0&&(r=10),N({top:a,right:r})}};return e(),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0)}},[m,x,r]),t.useEffect(()=>{if(m&&w.current){w.current.focus();const e=h().find(e=>!g(e));e&&b(e)}},[m,h,g,b]);const{handleKeyDown:I}=Je({getItems:h,isItemDisabled:g,active:p,setActive:b,loop:o,orientation:"vertical",onSelect:e=>{const t=document.getElementById(e);t&&t.click()}}),z=t.useCallback(e=>{if("Tab"!==e.key)return"Escape"===e.key?(e.preventDefault(),n?.(e),void f(!1)):void I(e);f(!1)},[I,f,n]),D=t.useCallback(e=>{const t=e.target;t instanceof Node&&(x?.current?.contains(t)||w.current&&!w.current.contains(t)&&(a?.(e),i?.(e),e.defaultPrevented||f(!1)))},[a,i,f,x]);return t.useEffect(()=>{if(m)return document.addEventListener("pointerdown",D),()=>document.removeEventListener("pointerdown",D)},[m,D]),t.useEffect(()=>{if(!p||!w.current)return;const e=w.current.querySelector(`#${p}`);e&&e.scrollIntoView({block:"nearest",behavior:"auto"})},[p]),e||m?s("div",{ref:y,id:v,role:"menu","aria-orientation":"vertical","aria-activedescendant":p,tabIndex:-1,"data-state":m?"open":"closed",className:Le("fixed z-40 flex flex-col items-start w-fit py-2.5 mt-2.5 overflow-hidden","rounded-sm border border-bdr-subtle bg-surface-neutral shadow-lg outline-none","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",!k&&"opacity-0 pointer-events-none",l),style:{...k},onKeyDown:z,...d,children:c}):null});lr.displayName="Menu.Content";const cr=We("flex w-full items-center px-4.5 py-2.5 gap-x-1.25 cursor-pointer text-sm outline-none",{variants:{active:{true:"bg-surface-primary-selected",false:""},disabled:{true:"hover:bg-transparent opacity-30 select-none pointer-events-none",false:""}},compoundVariants:[{active:!0,disabled:!1,class:"text-alt outline-none ring-3 ring-inset ring-bdr-strong"}],defaultVariants:{active:!1,disabled:!1}}),dr=({id:e,asChild:o=!1,disabled:n=!1,onSelect:a,className:i,children:l,...c})=>{const d=v(e,e?void 0:"menu-item"),{active:u,setActive:m,setOpen:f,registerItem:p,unregisterItem:b}=C(),h=u===d,g=n;t.useEffect(()=>(p(d,n),()=>b(d)),[d,n,p,b]);const x=t.useCallback(()=>{if(g)return;const e=new Event("select",{bubbles:!0,cancelable:!0});a?.(e),e.defaultPrevented||f(!1)},[g,a,f]),w=t.useCallback(()=>{h||m(d)},[h,m,d]),y=t.useCallback(()=>{m(void 0)},[m]);return s(o?r.Slot:"div",{id:d,role:"menuitem","aria-disabled":g,"data-active":h||void 0,"data-disabled":g||void 0,className:Le(cr({active:h,disabled:g}),i),onClick:x,onPointerMove:w,onPointerLeave:y,...c,children:l})};dr.displayName="Menu.Item";const ur=t.forwardRef(({className:e,children:t,...r},o)=>s("div",{ref:o,className:Le("px-3 py-1.5 text-xs font-semibold text-subtle",e),...r,children:t}));ur.displayName="Menu.Label";const mr=t.forwardRef(({className:e,...t},r)=>s("div",{ref:r,role:"separator","aria-orientation":"horizontal",className:Le("my-1 h-px bg-bdr-subtle",e),...t}));mr.displayName="Menu.Separator";const fr=Object.assign(ar,{Root:ar,Trigger:sr,Portal:ir,Content:lr,Item:dr,Label:ur,Separator:mr}),pr=t.forwardRef(({id:e,value:r,defaultValue:o="",placeholder:n="Search",clearLabel:a="Clear",onChange:i,disabled:l,readOnly:c,showSearchIcon:d=!0,showClearButton:u=!0,className:m,...f},p)=>{const b=v(Ve(e)),h=t.useRef(null),[g,x]=Ue(r,o,i),w=g.length>0,y=u&&w&&!l&&!c;return s("div",{className:Le("relative flex items-center rounded-sm overflow-hidden","h-12 border border-bdr-subtle focus-within:border-bdr-strong","focus-within:outline-none focus-within:ring-3 focus-within:ring-ring/50 focus-within:ring-offset-0","transition-highlight",l&&"pointer-events-none select-none opacity-30",m),children:[d&&s(mt,{className:"flex items-center justify-center shrink-0 w-10 text-subtle pointer-events-none",size:20,strokeWidth:1.5}),s("input",{ref:$e(p,h),id:b,className:Le("w-full text-base border-0","text-main bg-surface-neutral","placeholder:text-subtle","focus:outline-none focus:ring-0","read-only:bg-surface-primary",!d&&"pl-4.5","pr-4"),value:g,onChange:e=>{const t=e.currentTarget.value;x(t)},readOnly:c,disabled:l,placeholder:n,"aria-label":"Search","aria-disabled":l,...f}),y&&s(gt,{className:"flex items-center justify-center shrink-0 h-10 w-10 mr-1 text-subtle",size:"lg",icon:ft,title:a,onClick:()=>{x(""),h.current?.focus()},disabled:l})]})});pr.displayName="SearchInput";const br=({className:e,selected:t,children:r,label:o,description:n,metadata:a,icon:i,readOnly:l,checked:c,defaultChecked:d,onCheckedChange:u,...m})=>s(Jt,{className:Le(!t&&"hover:bg-surface-primary-hover",e),selected:t,role:"row","aria-selected":t,...m,children:[s(Jt.Left,{children:s(bt,{checked:c,defaultChecked:d,onCheckedChange:u,readOnly:l})}),s(Jt.DefaultContent,{label:o,description:n,metadata:a,icon:i}),s(Jt.Right,{children:r})]});br.displayName="SelectableListItem";const hr=({className:e,label:t,decorative:r=!1,...o})=>{const n=r?"true":void 0;return t?s("div",{role:"separator","aria-orientation":"horizontal","aria-hidden":n,className:Le("inline-flex w-full gap-2.5",e),...o,children:[s("span",{className:"min-w-0 truncate text-subtle uppercase",children:t}),s("span",{className:"min-w-6 flex-1 border-b-1 border-bdr-subtle"})]}):s("hr",{"aria-hidden":n,className:Le("w-full border-bdr-subtle",e)})};hr.displayName="Separator";const gr={top:"bottom",bottom:"top",left:"right",right:"left"};function vr({children:e,asChild:t,triggerRef:o,isOpen:n,onMouseEnter:a,onMouseLeave:i,onFocus:l,onBlur:c}){return s(t?r.Root:"div",{ref:o,className:t?void 0:"inline-flex",onMouseEnter:a,onMouseLeave:i,onFocus:l,onBlur:c,"aria-describedby":n?"tooltip":void 0,role:t?void 0:"button",tabIndex:t?void 0:0,children:e})}function xr({children:e,actualSide:t,className:r,position:o,tooltipRef:n}){return s("div",{ref:n,role:"tooltip",className:Le("fixed z-50 pointer-events-none select-none",!o.transformOrigin&&"opacity-0"),style:{top:`${o.top}px`,left:`${o.left}px`,transformOrigin:o.transformOrigin},children:s("div",{className:Le("relative w-fit rounded-xs px-2 py-1 text-xs","bg-tooltip text-tooltip-foreground shadow-md","animate-in fade-in-0 zoom-in-95","top"===t&&"slide-in-from-top-2","bottom"===t&&"slide-in-from-bottom-2","left"===t&&"slide-in-from-left-2","right"===t&&"slide-in-from-right-2",r),children:[e,s("div",{className:Le("absolute size-2 rotate-45","top"===t&&"bottom-0 left-1/2 -translate-x-1/2 translate-y-1/2","bottom"===t&&"top-0 left-1/2 -translate-x-1/2 -translate-y-1/2","left"===t&&"right-0 top-1/2 -translate-y-1/2 translate-x-1/2","right"===t&&"left-0 top-1/2 -translate-y-1/2 -translate-x-1/2"),style:{backgroundColor:"inherit"}})]})})}exports.Avatar=He,exports.AvatarProvider=l,exports.Button=Xe,exports.Checkbox=bt,exports.Combobox=zt,exports.ComboboxProvider=u,exports.Dialog=_t,exports.DialogProvider=p,exports.IconButton=gt,exports.IdProvider=g,exports.Input=Bt,exports.Link=Gt,exports.ListItem=Jt,exports.Listbox=nr,exports.ListboxProvider=w,exports.Menu=fr,exports.MenuProvider=N,exports.SearchInput=pr,exports.SelectableListItem=br,exports.Separator=hr,exports.Tooltip=function({className:r,children:o,value:n,side:a="bottom",asChild:i=!0,delay:l=0}){const[c,d]=t.useState(!1),u=t.useRef(null),m=t.useRef(null),f=t.useRef(),p=null!=n&&""!==n,b=function(e,r,o,n){const[a,s]=t.useState({top:0,left:0,transformOrigin:"",actualSide:r});return t.useEffect(()=>{if(!e||!o.current||!n.current)return;const t=o.current.getBoundingClientRect(),a=n.current.getBoundingClientRect(),i=e=>{let r=0,o=0,n="";switch(e){case"top":r=t.top+window.scrollY-a.height-8,o=t.left+window.scrollX+(t.width-a.width)/2,n="bottom center";break;case"bottom":r=t.bottom+window.scrollY+8,o=t.left+window.scrollX+(t.width-a.width)/2,n="top center";break;case"left":r=t.top+window.scrollY+(t.height-a.height)/2,o=t.left+window.scrollX-a.width-8,n="center right";break;case"right":r=t.top+window.scrollY+(t.height-a.height)/2,o=t.right+window.scrollX+8,n="center left"}return{top:r,left:o,transformOrigin:n,actualSide:e}},l=({top:e,left:t})=>{const r=window.scrollY+8,o=window.scrollY+window.innerHeight-a.height-8,n=window.scrollX+8,s=window.scrollX+window.innerWidth-a.width-8;return e>=r&&e<=o&&t>=n&&t<=s};let c=i(r);if(!l(c)){const e=i(gr[r]);l(e)&&(c=e)}s(c)},[e,r]),a}(c&&p,a,u,m);t.useEffect(()=>()=>{f.current&&clearTimeout(f.current)},[]);const h=t.useCallback(()=>{p&&(f.current&&clearTimeout(f.current),l>0?f.current=window.setTimeout(()=>d(!0),l):d(!0))},[l,p]),g=t.useCallback(()=>{f.current&&clearTimeout(f.current),d(!1)},[]),v=t.useCallback(()=>{p&&d(!0)},[p]),x=t.useCallback(()=>d(!1),[]);return s(e.Fragment,{children:[s(vr,{asChild:i,triggerRef:u,isOpen:c,onMouseEnter:h,onMouseLeave:g,onFocus:v,onBlur:x,children:o}),c&&p&&t.createPortal(s(xr,{actualSide:b.actualSide,className:r,position:b,tooltipRef:m,children:n}),document.body)]})},exports.cn=Le,exports.generateAriaId=I,exports.generateAriaIds=function(e,t){return t.reduce((t,r)=>(t[r]=I(e,r),t),{})},exports.generateItemId=z,exports.getActiveDescendantId=function(e,t,r){if(r)return z(e,t,r)},exports.setRef=je,exports.unwrap=Ve,exports.useAvatar=c,exports.useCombobox=m,exports.useComposedRefs=$e,exports.useControlledState=Ue,exports.useDialog=b,exports.useItemRegistry=Ze,exports.useKeyboardNavigation=Je,exports.useListbox=y,exports.useMenu=C,exports.usePrefixedId=v,exports.useScrollLock=Ye;
26
+ */vt.displayName="Checkbox";const xt=Be(["p-0"],{variants:{size:{sm:"h-9 w-9",md:"h-10 w-10",lg:"h-11.5 w-11.5"},shape:{square:"rounded-sm",round:"rounded-full"}},defaultVariants:{size:"md",shape:"square"}}),wt=t.forwardRef(({className:e,variant:t="text",size:r="md",shape:o="square",icon:a,...n},i)=>s(Ze,{ref:i,className:Ve(xt({size:r,shape:o}),e),variant:t,size:r,startIcon:a,label:"",...n}));function yt(e,t,r="any"){if(e===t)return!0;if(null==e||null==t)return!1;if(e.length!==t.length)return!1;const o="any"===r?[...e].sort():e,a="any"===r?[...t].sort():t;for(let n=0;n<o.length;n+=1)if(o[n]!==a[n])return!1;return!0}wt.displayName="IconButton";const kt=[],Nt=e=>t=>yt(t,e)?t:e,Ct=({children:e,open:r,defaultOpen:o=!1,onOpenChange:a,closeOnBlur:n=!0,value:i,defaultValue:l="",onChange:c,disabled:d=!1,error:m=!1,selectionMode:f="single",selection:p,defaultSelection:b=kt,onSelectionChange:h,active:g,defaultActive:x,setActive:w})=>{const y=v(),[k,N]=Qe(r,o,a),[C,I]=Qe(i,l,c),z="single"!==f,S="staged"===f,[R,D]=t.useState(()=>new Set(b)),M=void 0!==p,E=t.useMemo(()=>M?new Set(p):R,[M,p,R]),O=t.useMemo(()=>Array.from(E),[E]),[A,P]=t.useState(O);t.useEffect(()=>{P(S?Nt(O):O)},[O,S]);const L=S?A:O,j=t.useMemo(()=>new Set(L),[L]),$=t.useMemo(()=>S&&!yt(A,O),[S,A,O]),V=t.useCallback(()=>{S&&P(Nt(O))},[S,O]),[F,T]=Qe(g,x,w),{registerItem:W,unregisterItem:_,getItems:q,isItemDisabled:B}=et(),G=t.useCallback(e=>{I(e),N(!0)},[I,N]),H=t.useCallback(e=>{N(e),e||V()},[N,V]),K=t.useCallback(e=>{const t=new Set(e);M||D(t),h?.(e),"single"===f&&N(!1)},[M,h,f,N]),X=t.useCallback(e=>{S?P(e):K(e)},[S,K]),Y=t.useCallback(()=>{S&&(yt(A,O)||K(A),N(!1))},[S,A,O,K,N]),{handleKeyDown:U}=tt({getItems:q,isItemDisabled:B,active:F,setActive:T,loop:!1,orientation:"vertical",onSelect:e=>{let t;t=z?L.includes(e)?L.filter(t=>t!==e):[...L,e]:[e],X(t)}}),Z=t.useCallback(e=>{if(!d){if("ArrowDown"!==e.key&&"ArrowUp"!==e.key||k||(e.preventDefault(),N(!0)),"Escape"===e.key)return e.preventDefault(),void H(!1);U(e)}},[d,k,N,H,U]);t.useEffect(()=>{if(k&&void 0===F){const e=q();e.length>0&&T(e[0])}},[k,F,q,T]);const J=t.useMemo(()=>({open:k,setOpen:H,inputValue:C,setInputValue:G,baseId:y,active:F,disabled:d,error:m,closeOnBlur:n,keyHandler:Z,selection:j,appliedSelection:O,stagedSelection:A,stagingEnabled:S,hasStagedChanges:$,applyStagedSelection:Y,resetStagedSelection:V}),[k,H,n,Z,C,G,F,y,d,m,j,O,A,S,$,Y,V]);return s(u,{value:J,children:s(ur.Root,{selectionMode:z?"multiple":"single",selection:L,onSelectionChange:X,disabled:d,active:F,focusable:!1,baseId:y,setActive:T,keyHandler:Z,registerItem:W,unregisterItem:_,getItems:q,isItemDisabled:B,children:e})})};Ct.displayName="Combobox.Root";const It=t.forwardRef(({className:e,children:r,...o},a)=>{const n=t.useRef(null),{setOpen:i,closeOnBlur:l}=m(),c=l?t.useCallback(e=>{const t=e.relatedTarget;t&&n.current?.contains(t)||i(!1)},[i]):void 0;return s("div",{ref:Te(a,n),className:e,onBlur:c,...o,children:r})});It.displayName="Combobox.Content";const zt=Be(["flex gap-2.5 items-center","h-12 rounded-sm border bg-surface-neutral","focus-within:outline-none focus-within:ring-3 focus-within:ring-ring/50 focus-within:ring-offset-0","transition-highlight"],{variants:{error:{true:"border-error focus-within:border-error focus-within:ring-error/50",false:"border-bdr-subtle focus-within:border-bdr-strong"},open:{true:"border-bdr-strong",false:null},disabled:{true:"pointer-events-none select-none opacity-30",false:null}},defaultVariants:{error:!1,open:!1,disabled:!1}}),St=({className:e,children:t,...r})=>{const{open:o,disabled:a,error:n}=m();return s("div",{className:Ve(zt({error:n,open:o,disabled:a}),e),"data-open":o?"true":void 0,...r,children:t})};St.displayName="Combobox.Control";const Rt=t.forwardRef(({placeholder:e,...r},o)=>{const a=t.useRef(null),{open:n,keyHandler:i,baseId:l,active:c,disabled:d,error:u}=m();return t.useEffect(()=>{n&&!d&&a.current?.focus()},[n,d]),s(Ir.Input,{ref:Te(o,a),id:`${l}-input`,onKeyDown:i,"aria-disabled":d,"aria-invalid":u??void 0,role:"combobox","aria-autocomplete":"list","aria-expanded":n,"aria-haspopup":"listbox","aria-controls":`${l}-listbox`,"aria-activedescendant":c?`${l}-listbox-option-${c}`:void 0,...r})});Rt.displayName="Combobox.Input";const Dt=({children:e,className:t,...r})=>{const{inputValue:o,setInputValue:a}=m();return s(Ir.Root,{value:o,onChange:a,className:Ve("w-full pr-0","border-0 focus-within:border-0 focus-within:ring-0 focus-within:ring-offset-0",t),...r,children:e})};Dt.displayName="Combobox.Search";const Mt=({className:e,...t})=>{const{open:r,setOpen:o,disabled:a}=m();return s(wt,{type:"button",variant:"text",size:"lg",icon:dt,"aria-label":"Toggle",onClick:()=>{a||o(!r)},disabled:a,tabIndex:-1,className:Ve("shrink-0 text-subtle transition-transform hover:bg-surface-primary-hover",r&&"rotate-180",e),...t})};Mt.displayName="Combobox.Toggle";const Et=({className:e,label:t="Apply",...r})=>{const{stagingEnabled:o,hasStagedChanges:a,applyStagedSelection:n}=m();return o&&a?s(Ze,{className:Ve("h-7 px-2.5 min-w-14 gap-2 text-xs",e),type:"button",label:t,variant:"outline",onClick:n,...r}):null};Et.displayName="Combobox.Apply";const Ot=({children:e,className:t,...r})=>{const{open:o}=m();return o?s("div",{className:Ve("absolute left-0 right-0 z-50 mt-1 rounded-sm bg-surface-neutral shadow-lg ring-1 ring-bdr-subtle",t),...r,children:e}):null};Ot.displayName="Combobox.Popup";const At=Object.assign(Ct,{Root:Ct,Content:It,Control:St,Search:Dt,Input:Rt,SearchIcon:Ir.Icon,Toggle:Mt,Apply:Et,Popup:Ot}),Pt=({open:e,defaultOpen:r=!1,onOpenChange:o,children:a})=>{const[n,i]=Qe(e,r,o),l=t.useMemo(()=>({open:n,setOpen:i}),[n,i]);return s(p,{value:l,children:a})};Pt.displayName="Dialog.Root";const Lt=t.forwardRef(({asChild:e,children:t,onClick:o,...a},n)=>{const{setOpen:i}=b();return s(e?r.Slot:"button",{ref:n,type:e?void 0:"button",onClick:e=>{o?.(e),i(!0)},...a,children:t})});Lt.displayName="Dialog.Trigger";const jt=({children:e,container:r,forceMount:o})=>{const{open:n}=b(),[s,i]=t.useState(!1);return t.useEffect(()=>{i(!0)},[]),s&&(o||n)?a.createPortal(e,r??document.body):null};jt.displayName="Dialog.Portal";const $t=t.forwardRef(({className:e,forceMount:t,...r},o)=>{const{open:a}=b();return t||a?s("div",{ref:o,"data-state":a?"open":"closed",className:Ve("fixed inset-0 z-30 bg-overlay backdrop-blur-xs","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...r}):null});$t.displayName="Dialog.Overlay";const Vt=t.forwardRef(({children:e,className:r,forceMount:a,onEscapeKeyDown:n,onPointerDownOutside:i,onInteractOutside:l,onOpenAutoFocus:c,onCloseAutoFocus:d,...u},m)=>{const{open:f,setOpen:p}=b(),h=t.useRef(null),g=t.useId(),v=t.useId();t.useEffect(()=>{"function"==typeof m?m(h.current):m&&(m.current=h.current)},[m]),Je(f);const x=t.useCallback(e=>{"Escape"===e.key&&(n?.(e),e.defaultPrevented||p(!1))},[n,p]);t.useEffect(()=>{if(f)return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[f,x]);const w=t.useCallback(e=>{const t=e.target;h.current&&!h.current.contains(t)&&(i?.(e),l?.(e),e.defaultPrevented||p(!1))},[i,l,p]);return t.useEffect(()=>{if(f)return document.addEventListener("pointerdown",w),()=>document.removeEventListener("pointerdown",w)},[f,w]),a||f?s(o.FocusTrap,{active:f,focusTrapOptions:{initialFocus:!1,fallbackFocus:()=>h.current??document.body,escapeDeactivates:!1,clickOutsideDeactivates:!1,returnFocusOnDeactivate:!0,allowOutsideClick:!0,preventScroll:!1,onActivate:()=>{requestAnimationFrame(()=>{const e=new Event("openautofocus",{bubbles:!0,cancelable:!0});c?.(e),!e.defaultPrevented&&h.current&&h.current.focus()})},onDeactivate:()=>{requestAnimationFrame(()=>{const e=new Event("closeautofocus",{bubbles:!0,cancelable:!0});d?.(e)})}},children:s("div",{className:"fixed inset-0 z-40 flex items-center justify-center p-4",children:s("div",{ref:h,role:"dialog","aria-modal":"true","aria-labelledby":g,"aria-describedby":v,"data-state":f?"open":"closed",tabIndex:-1,className:Ve("relative rounded-lg shadow-xl bg-surface-neutral","flex flex-col max-w-lg w-full max-h-[90vh] gap-10 p-10","border border-bdr-subtle outline-none overflow-hidden","focus:outline-none focus:ring-0","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",r),...u,children:e})})}):null});Vt.displayName="Dialog.Content";const Ft=t.forwardRef(({className:e,children:t,...r},o)=>s("header",{ref:o,className:Ve("relative grid gap-2.5 self-stretch",e),...r,children:t}));Ft.displayName="Dialog.Header";const Tt=t.forwardRef(({children:e,asChild:o,onClick:a,...n},i)=>{const{setOpen:l}=b(),c=t.useCallback(e=>{a?.(e),e.defaultPrevented||l(!1)},[a,l]);return s(o?r.Slot:"button",{ref:i,type:o?void 0:"button",onClick:c,...n,children:e})});Tt.displayName="Dialog.Close";const Wt=t.forwardRef(({children:e,className:t,asChild:o,...a},n)=>s(o?r.Slot:"h2",{ref:n,className:Ve("text-2xl font-semibold",t),...a,children:e}));Wt.displayName="Dialog.Title";const _t=t.forwardRef(({children:e,className:t,asChild:o,...a},n)=>s(o?r.Slot:"p",{ref:n,className:Ve("",t),...a,children:e}));_t.displayName="Dialog.Description";const qt=t.forwardRef(({className:e,children:t,...r},o)=>s("div",{ref:o,className:Ve("min-h-0 flex-1 overflow-y-auto",e),...r,children:t}));qt.displayName="Dialog.Body";const Bt=t.forwardRef(({className:e,children:t,...r},o)=>s("footer",{ref:o,className:Ve("flex justify-end gap-2.5",e),...r,children:t}));Bt.displayName="Dialog.Footer";const Gt=t.forwardRef((e,t)=>s(Tt,{asChild:!0,ref:t,...e,children:s(wt,{"aria-label":"Close","data-area":"close",icon:ht,size:"lg",iconSize:36,iconStrokeWidth:1,shape:"round",variant:"filled"})}));Gt.displayName="Dialog.DefaultClose";const Ht=t.forwardRef(({title:e,description:t,withClose:r,className:o,children:a,...n},i)=>s(Ft,{ref:i,className:Ve(r&&"grid-cols-[minmax(0,1fr)_auto]",o),...n,children:[s(Wt,{className:Ve(r&&"col-start-1 row-start-1 min-w-0"),children:e}),r&&s(Gt,{className:"col-start-2 row-start-1 row-span-2 self-start justify-self-end"}),t&&s(_t,{className:Ve(r&&"row-start-2"),children:t}),a]}));Ht.displayName="Dialog.DefaultHeader";const Kt=Object.assign(Pt,{Root:Pt,Trigger:Lt,Portal:jt,Overlay:$t,Content:Vt,Header:Ft,Close:Tt,Title:Wt,Description:_t,Body:qt,Footer:Bt,DefaultClose:Gt,DefaultHeader:Ht}),Xt=Be(["relative flex rounded-sm overflow-hidden","h-12 border focus-within:border-bdr-solid","focus-within:outline-none focus-within:ring-3 focus-within:ring-ring/50 focus-within:ring-offset-0","transition-highlight"],{variants:{state:{default:"border-bdr-subtle focus-within:border-bdr-strong",error:"border-error focus-within:border-error focus-within:ring-error/50"},disabled:{true:"select-none"}},defaultVariants:{state:"default",disabled:!1}}),Yt=({children:e,error:t})=>s("div",{className:Ve("flex items-center justify-center shrink-0 min-w-12 px-4","text-sm text-subtle bg-surface-primary","first:rounded-l-sm first:border-r first:border-bdr-subtle","last:rounded-r-sm last:border-l last:border-bdr-subtle",t&&"first:border-error last:border-error"),children:e}),Ut=t.forwardRef(({className:e,label:t,description:r,error:o,startAddon:a,endAddon:n,id:i,disabled:l,readOnly:c,...d},u)=>{const m=v(We(i)),f=o?"error":"default",p="error"===f;return s("div",{className:Ve("w-full",l&&"opacity-30",e),children:[(!!t||!!r)&&s("div",{className:"mb-2",children:[t&&s("label",{htmlFor:m,className:"block text-base font-semibold text-main",children:s("div",{className:"flex items-center gap-2",children:[c&&s(mt,{size:16,strokeWidth:2.5}),t]})}),r&&s("div",{className:"text-sm text-subtle",children:r})]}),s("div",{className:Ve(Xt({state:f,disabled:l})),children:[a&&s(Yt,{error:p,children:a}),s("input",{ref:u,id:m,className:Ve("flex-1 w-full px-4.5 text-base","text-main bg-surface-neutral placeholder:text-subtle","border-0 focus:outline-none","disabled:select-none enabled:read-only:bg-surface-primary",a&&"rounded-l-none",n&&"rounded-r-none"),disabled:l,readOnly:c,...d}),n&&s(Yt,{error:p,children:n})]}),o&&s("div",{className:"flex items-center gap-2 mt-2 leading-5 text-error",children:[s(pt,{size:16,strokeWidth:2.5}),o]})]})});function Zt(e,t,r=!1){return"function"==typeof e?e:!0===e||void 0===e&&r?t:void 0}Ut.displayName="Input";const Jt=t.forwardRef(({className:e,href:t,external:r="auto",newTab:o,leftIcon:a,rightIcon:n,children:i,rel:l,...c},d)=>{const u="auto"===r?function(e){try{if(e.startsWith("mailto:")||e.startsWith("tel:"))return!0;const t="undefined"!=typeof window?window.location:void 0;return!t||new URL(e,t.origin).origin!==t.origin}catch{return!0}}(t):r,m=o??u?"_blank":void 0,f=Zt(a,lt),p=Zt(n,ut,u);return s("a",{ref:d,href:t,className:Ve("inline-flex items-center align-baseline gap-1","text-sm font-normal underline underline-offset-3 decoration-1","visited:text-link-visited hover:text-main-hover",e),target:m,rel:o||u?"noopener noreferrer":"noreferrer",...c,children:[f&&s(f,{className:"inline-block flex-none w-3.5 h-3.5",strokeWidth:1.5,"aria-hidden":"true"}),i,p&&s(p,{className:"inline-block flex-none w-3.5 h-3.5",strokeWidth:1.5,"aria-hidden":"true"})]})});function Qt(e,r){return t.Children.toArray(e).find(e=>function(e,r){return t.isValidElement(e)&&e.type===r}(e,r))}Jt.displayName="Link";const er=({children:e,className:t,...r})=>s("div",{className:Ve("flex items-center gap-2.5 flex-shrink-0",t),...r,children:e}),tr=({className:e,children:t,...r})=>s("div",{className:Ve("flex-1 min-w-0",e),...r,children:t});tr.displayName="ListItem.Content";const rr=({className:e,label:t,description:r,metadata:o,icon:a})=>s(tr,{className:Ve(a&&"grid grid-cols-[auto_1fr] gap-2.5 items-center",e),children:[a&&s("div",{className:"flex items-center justify-center flex-shrink-0 group-data-[tone=inverse]:text-alt",children:a}),s("div",{className:"min-w-0 text-left",children:[t&&s("h1",{className:"truncate font-semibold group-data-[tone=inverse]:text-alt",children:t}),r&&s("p",{className:"truncate text-sm text-subtle group-data-[tone=inverse]:text-alt",children:r}),o&&s("p",{className:"text-xs text-subtle group-data-[tone=inverse]:text-alt",children:o})]})]}),or=({children:e,className:t,...r})=>s("div",{className:Ve("flex items-center gap-5 flex-shrink-0",t),...r,children:e});or.displayName="ListItem.Right";const ar=({children:e,className:t,selected:r,...o})=>{const a=Qt(e,er),n=Qt(e,tr)??Qt(e,rr),i=Qt(e,or);return s("div",{className:Ve("group flex items-center px-2.5 py-1 gap-2.5",r&&"bg-surface-primary-selected text-alt",t),"data-tone":r&&"inverse",role:"listitem",...o,children:[a,n,i]})};ar.displayName="ListItem";const nr=Object.assign(ar,{Left:er,Content:tr,DefaultContent:rr,Right:or}),sr=[],ir=({baseId:e,selection:r,defaultSelection:o=sr,onSelectionChange:a,active:n,defaultActive:i,setActive:l,selectionMode:c="single",focusable:d=!0,disabled:u,children:m,keyHandler:f,registerItem:p,unregisterItem:b,getItems:h,isItemDisabled:g})=>{const x=e??v(),[y,k]=t.useState(()=>new Set(o)),N=void 0!==r,C=t.useMemo(()=>N?new Set(r):y,[N,r,y]),[I,z]=Qe(n,i,l),S=et(),R=p??S.registerItem,D=b??S.unregisterItem,M=h??S.getItems,E=g??S.isItemDisabled,O=t.useCallback(e=>{const t=C.has(e),r=new Set(C);"single"===c?(r.clear(),t||r.add(e)):t?r.delete(e):r.add(e),N||k(r),a?.(Array.from(r)),z(e)},[C,c,N,a,z]),A=t.useMemo(()=>({active:I,selection:C,selectionMode:c,focusable:d,disabled:u,setActive:z,toggleValue:O,baseId:x,keyHandler:f,registerItem:R,unregisterItem:D,getItems:M,isItemDisabled:E}),[I,C,c,d,u,z,O,x,f,R,D,M,E]);return s(w,{value:A,children:m})};ir.displayName="ListboxRoot";const lr=t.forwardRef(({className:e,label:r,children:o,...a},n)=>{const i=t.useRef(null),{active:l,disabled:c,setActive:d,toggleValue:u,baseId:m,selectionMode:f,keyHandler:p,focusable:b=!0,getItems:h,isItemDisabled:g}=y(),{handleKeyDown:v}=tt({getItems:h,isItemDisabled:g,active:l,setActive:d,loop:!1,orientation:"vertical",onSelect:e=>{u(e)}}),x=p??v;return t.useEffect(()=>{if(!l||!i.current)return;const e=i.current.querySelector(`#${m}-listbox-option-${l}`);e&&e.scrollIntoView({block:"nearest",behavior:"auto"})},[l,m]),s("div",{ref:Te(n,i),id:`${m}-listbox`,className:Ve("flex flex-col items-start grow shrink-0 basis-0","max-h-100 overflow-y-auto","focus-within:outline-none focus-within:ring-3 focus-within:ring-ring/50",c&&"pointer-events-none select-none opacity-30",e),role:"listbox","aria-disabled":c,"aria-label":r,"aria-multiselectable":"multiple"===f||void 0,"aria-activedescendant":l?`${m}-listbox-option-${l}`:void 0,tabIndex:b&&!c?0:-1,onKeyDown:x,...a,children:o})});lr.displayName="ListboxContent";const cr=Be("group flex w-full items-center px-4.5 py-1 gap-x-2.5 cursor-pointer",{variants:{selected:{true:"bg-surface-primary-selected text-alt hover:bg-surface-primary-selected-hover",false:"hover:bg-surface-primary-hover"},active:{true:"bg-surface-primary-hover",false:""},disabled:{true:"opacity-30 cursor-not-allowed pointer-events-none",false:""}},compoundVariants:[{selected:!0,active:!0,class:"bg-surface-primary-selected-hover"}],defaultVariants:{selected:!1,active:!1,disabled:!1}}),dr=({value:e,disabled:r=!1,children:o,className:a,...n})=>{const i=y(),{disabled:l,toggleValue:c,baseId:d,registerItem:u,unregisterItem:m}=i,f=i.selection.has(e),p=i.active===e,b=r||l;t.useEffect(()=>(u(e,b),()=>m(e)),[e,b,u,m]);const h=t.useCallback(()=>{b||c(e)},[b,c,e]);return s("div",{id:`${d}-listbox-option-${e}`,className:Ve(cr({selected:f,active:p,disabled:b}),a),role:"option","aria-selected":f,"aria-disabled":b??void 0,"data-value":e,"data-active":p||void 0,"data-tone":f&&"inverse",onClick:h,...n,children:o})};dr.displayName="ListboxItem";const ur=Object.assign(ir,{Root:ir,Content:lr,Item:dr}),mr=({open:e,defaultOpen:r=!1,onOpenChange:o,children:a})=>{const n=t.useRef(null),i=v(void 0,"menu-trigger"),l=v(void 0,"menu"),[c,d]=Qe(e,r,o),[u,m]=t.useState(void 0),{registerItem:f,unregisterItem:p,getItems:b,isItemDisabled:h}=et(),g=t.useMemo(()=>({open:c,setOpen:d,active:u,setActive:m,registerItem:f,unregisterItem:p,getItems:b,isItemDisabled:h,triggerId:i,menuId:l,triggerRef:n}),[c,d,u,m,f,p,b,h,i,l]);return t.useEffect(()=>{!c&&n.current&&n.current.focus()},[c]),s(N,{value:g,children:a})};mr.displayName="Menu.Root";const fr=t.forwardRef(({asChild:e,onClick:t,onKeyDown:o,className:a,children:n,...i},l)=>{const{open:c,setOpen:d,triggerId:u,menuId:m,triggerRef:f}=C();return s(e?r.Slot:"button",{ref:Te(l,f),id:u,type:e?void 0:"button","aria-haspopup":"menu","aria-expanded":c,"aria-controls":c?m:void 0,onClick:e=>{t?.(e),d(!c)},onKeyDown:e=>{o?.(e),"ArrowDown"!==e.key||c||(e.preventDefault(),d(!0))},className:a,...i,children:n})});fr.displayName="Menu.Trigger";const pr=({container:e,forceMount:r,children:o})=>{const{open:n}=C(),[s,i]=t.useState(!1);return t.useEffect(()=>{i(!0)},[]),s&&(r||n)?a.createPortal(o,e??document.body):null};pr.displayName="Menu.Portal";const br=t.forwardRef(({forceMount:e,align:r="start",loop:o=!0,onEscapeKeyDown:a,onPointerDownOutside:n,onInteractOutside:i,className:l,children:c,...d},u)=>{const{open:m,setOpen:f,active:p,setActive:b,getItems:h,isItemDisabled:g,menuId:v,triggerRef:x}=C(),w=t.useRef(null),y=Te(u,w),[k,N]=t.useState(void 0);t.useEffect(()=>{if(!m||!x?.current||!w.current)return;const e=()=>{if(!x.current||!w.current)return;const e=x.current.getBoundingClientRect(),t=w.current.getBoundingClientRect(),o=window.innerWidth,a=window.innerHeight;let n=e.bottom;if(n+t.height>a&&(n=e.top-t.height),n<0&&(n=10),"start"===r){let r=e.left;r+t.width>o&&(r=e.right-t.width),r<0&&(r=10),N({top:n,left:r})}else{let r=o-e.right;e.right-t.width<0&&(r=o-(e.left+t.width)),r<0&&(r=10),N({top:n,right:r})}};return e(),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0)}},[m,x,r]),t.useEffect(()=>{if(m&&w.current){w.current.focus();const e=h().find(e=>!g(e));e&&b(e)}},[m,h,g,b]);const{handleKeyDown:I}=tt({getItems:h,isItemDisabled:g,active:p,setActive:b,loop:o,orientation:"vertical",onSelect:e=>{const t=document.getElementById(e);t&&t.click()}}),z=t.useCallback(e=>{if("Tab"!==e.key)return"Escape"===e.key?(e.preventDefault(),a?.(e),void f(!1)):void I(e);f(!1)},[I,f,a]),S=t.useCallback(e=>{const t=e.target;t instanceof Node&&(x?.current?.contains(t)||w.current&&!w.current.contains(t)&&(n?.(e),i?.(e),e.defaultPrevented||f(!1)))},[n,i,f,x]);return t.useEffect(()=>{if(m)return document.addEventListener("pointerdown",S),()=>document.removeEventListener("pointerdown",S)},[m,S]),t.useEffect(()=>{if(!p||!w.current)return;const e=w.current.querySelector(`#${p}`);e&&e.scrollIntoView({block:"nearest",behavior:"auto"})},[p]),e||m?s("div",{ref:y,id:v,role:"menu","aria-orientation":"vertical","aria-activedescendant":p,tabIndex:-1,"data-state":m?"open":"closed",className:Ve("fixed z-40 flex flex-col items-start w-fit py-2.5 mt-2.5 overflow-hidden","rounded-sm border border-bdr-subtle bg-surface-neutral shadow-lg outline-none","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",!k&&"opacity-0 pointer-events-none",l),style:{...k},onKeyDown:z,...d,children:c}):null});br.displayName="Menu.Content";const hr=Be("flex w-full items-center px-4.5 py-2.5 gap-x-1.25 cursor-pointer text-sm outline-none",{variants:{active:{true:"bg-surface-primary-selected",false:""},disabled:{true:"hover:bg-transparent opacity-30 select-none pointer-events-none",false:""}},compoundVariants:[{active:!0,disabled:!1,class:"text-alt outline-none ring-3 ring-inset ring-bdr-strong"}],defaultVariants:{active:!1,disabled:!1}}),gr=({id:e,asChild:o=!1,disabled:a=!1,onSelect:n,className:i,children:l,...c})=>{const d=v(e,e?void 0:"menu-item"),{active:u,setActive:m,setOpen:f,registerItem:p,unregisterItem:b}=C(),h=u===d,g=a;t.useEffect(()=>(p(d,a),()=>b(d)),[d,a,p,b]);const x=t.useCallback(()=>{if(g)return;const e=new Event("select",{bubbles:!0,cancelable:!0});n?.(e),e.defaultPrevented||f(!1)},[g,n,f]),w=t.useCallback(()=>{h||m(d)},[h,m,d]),y=t.useCallback(()=>{m(void 0)},[m]);return s(o?r.Slot:"div",{id:d,role:"menuitem","aria-disabled":g,"data-active":h||void 0,"data-disabled":g||void 0,className:Ve(hr({active:h,disabled:g}),i),onClick:x,onPointerMove:w,onPointerLeave:y,...c,children:l})};gr.displayName="Menu.Item";const vr=t.forwardRef(({className:e,children:t,...r},o)=>s("div",{ref:o,className:Ve("px-3 py-1.5 text-xs font-semibold text-subtle",e),...r,children:t}));vr.displayName="Menu.Label";const xr=t.forwardRef(({className:e,...t},r)=>s("div",{ref:r,role:"separator","aria-orientation":"horizontal",className:Ve("my-1 h-px bg-bdr-subtle",e),...t}));xr.displayName="Menu.Separator";const wr=Object.assign(mr,{Root:mr,Trigger:fr,Portal:pr,Content:br,Item:gr,Label:vr,Separator:xr}),yr=({id:e,value:r,defaultValue:o="",onChange:a,placeholder:n="Search",clearLabel:i="Clear",disabled:l,readOnly:c,children:d,className:u,...m})=>{const f=v(We(e)),p=t.useRef(null),[b,h]=Qe(r,o,a),g=t.useMemo(()=>({id:f,value:b,disabled:l,readOnly:c,placeholder:n,clearLabel:i,setValue:h,inputRef:p}),[f,b,l,c,n,i,h]);return s(z,{value:g,children:s("div",{className:Ve("relative flex gap-2.5 items-center rounded-sm overflow-hidden","h-11.5 px-4.5 py-3","border border-bdr-subtle focus-within:border-bdr-strong","focus-within:outline-none focus-within:ring-3 focus-within:ring-ring/50 focus-within:ring-offset-0","transition-highlight",c?"bg-surface-primary":"bg-surface-neutral",l&&"pointer-events-none select-none opacity-30",u),...m,children:d})})};yr.displayName="SearchFieldRoot";const kr=({className:e})=>s(bt,{className:Ve("flex items-center justify-center shrink-0 size-5.5 text-subtle",e),strokeWidth:1.5});kr.displayName="SearchFieldIcon";const Nr=t.forwardRef(({className:e,...t},r)=>{const{id:o,value:a,disabled:n,readOnly:i,placeholder:l,setValue:c,inputRef:d}=S();return s("input",{ref:Te(r,d),id:o,className:Ve("h-5.5 w-full text-base border-0","text-main bg-surface-neutral","placeholder:text-subtle","focus:outline-none","enabled:read-only:bg-surface-primary",e),value:a,onChange:e=>{c(e.currentTarget.value)},readOnly:i,disabled:n,placeholder:l,"aria-label":"Search","aria-disabled":n,...t})});Nr.displayName="SearchFieldInput";const Cr=({className:e,...t})=>{const{value:r,disabled:o,readOnly:a,clearLabel:n,setValue:i,inputRef:l}=S();if(!r||o||a)return null;return s(wt,{className:Ve("flex items-center justify-center shrink-0 size-7 -mx-1.5 text-subtle",e),icon:ht,title:n,onClick:()=>{i(""),l.current?.focus()},disabled:o,iconSize:28,iconStrokeWidth:1.25,...t})};Cr.displayName="SearchFieldClear";const Ir=Object.assign(yr,{Root:yr,Icon:kr,Input:Nr,Clear:Cr}),zr=({className:e,selected:t,children:r,label:o,description:a,metadata:n,icon:i,readOnly:l,checked:c,defaultChecked:d,onCheckedChange:u,...m})=>s(nr,{className:Ve(!t&&"hover:bg-surface-primary-hover",e),selected:t,role:"row","aria-selected":t,...m,children:[s(nr.Left,{children:s(vt,{checked:c,defaultChecked:d,onCheckedChange:u,readOnly:l})}),s(nr.DefaultContent,{label:o,description:a,metadata:n,icon:i}),s(nr.Right,{children:r})]});zr.displayName="SelectableListItem";const Sr=({className:e,label:t,decorative:r=!1,...o})=>{const a=r?"true":void 0;return t?s("div",{role:"separator","aria-orientation":"horizontal","aria-hidden":a,className:Ve("inline-flex w-full gap-2.5",e),...o,children:[s("span",{className:"min-w-0 truncate text-subtle uppercase",children:t}),s("span",{className:"min-w-6 flex-1 border-b-1 border-bdr-subtle"})]}):s("hr",{"aria-hidden":a,className:Ve("w-full border-bdr-subtle",e)})};Sr.displayName="Separator";const Rr={top:"bottom",bottom:"top",left:"right",right:"left"};function Dr({children:e,asChild:t,triggerRef:o,isOpen:a,onMouseEnter:n,onMouseLeave:i,onFocus:l,onBlur:c}){return s(t?r.Root:"div",{ref:o,className:t?void 0:"inline-flex",onMouseEnter:n,onMouseLeave:i,onFocus:l,onBlur:c,"aria-describedby":a?"tooltip":void 0,role:t?void 0:"button",tabIndex:t?void 0:0,children:e})}function Mr({children:e,actualSide:t,className:r,position:o,tooltipRef:a}){return s("div",{ref:a,role:"tooltip",className:Ve("fixed z-50 pointer-events-none select-none",!o.transformOrigin&&"opacity-0"),style:{top:`${o.top}px`,left:`${o.left}px`,transformOrigin:o.transformOrigin},children:s("div",{className:Ve("relative w-fit rounded-xs px-2 py-1 text-xs","bg-tooltip text-tooltip-foreground shadow-md","animate-in fade-in-0 zoom-in-95","top"===t&&"slide-in-from-top-2","bottom"===t&&"slide-in-from-bottom-2","left"===t&&"slide-in-from-left-2","right"===t&&"slide-in-from-right-2",r),children:[e,s("div",{className:Ve("absolute size-2 rotate-45","top"===t&&"bottom-0 left-1/2 -translate-x-1/2 translate-y-1/2","bottom"===t&&"top-0 left-1/2 -translate-x-1/2 -translate-y-1/2","left"===t&&"right-0 top-1/2 -translate-y-1/2 translate-x-1/2","right"===t&&"left-0 top-1/2 -translate-y-1/2 -translate-x-1/2"),style:{backgroundColor:"inherit"}})]})})}exports.Avatar=Ye,exports.AvatarProvider=l,exports.Button=Ze,exports.Checkbox=vt,exports.Combobox=At,exports.ComboboxProvider=u,exports.Dialog=Kt,exports.DialogProvider=p,exports.IconButton=wt,exports.IdProvider=g,exports.Input=Ut,exports.Link=Jt,exports.ListItem=nr,exports.Listbox=ur,exports.ListboxProvider=w,exports.Menu=wr,exports.MenuProvider=N,exports.SearchField=Ir,exports.SearchFieldProvider=z,exports.SelectableListItem=zr,exports.Separator=Sr,exports.Tooltip=function({className:r,children:o,value:a,side:n="bottom",asChild:i=!0,delay:l=0}){const[c,d]=t.useState(!1),u=t.useRef(null),m=t.useRef(null),f=t.useRef(),p=null!=a&&""!==a,b=function(e,r,o,a){const[n,s]=t.useState({top:0,left:0,transformOrigin:"",actualSide:r});return t.useEffect(()=>{if(!e||!o.current||!a.current)return;const t=o.current.getBoundingClientRect(),n=a.current.getBoundingClientRect(),i=e=>{let r=0,o=0,a="";switch(e){case"top":r=t.top+window.scrollY-n.height-8,o=t.left+window.scrollX+(t.width-n.width)/2,a="bottom center";break;case"bottom":r=t.bottom+window.scrollY+8,o=t.left+window.scrollX+(t.width-n.width)/2,a="top center";break;case"left":r=t.top+window.scrollY+(t.height-n.height)/2,o=t.left+window.scrollX-n.width-8,a="center right";break;case"right":r=t.top+window.scrollY+(t.height-n.height)/2,o=t.right+window.scrollX+8,a="center left"}return{top:r,left:o,transformOrigin:a,actualSide:e}},l=({top:e,left:t})=>{const r=window.scrollY+8,o=window.scrollY+window.innerHeight-n.height-8,a=window.scrollX+8,s=window.scrollX+window.innerWidth-n.width-8;return e>=r&&e<=o&&t>=a&&t<=s};let c=i(r);if(!l(c)){const e=i(Rr[r]);l(e)&&(c=e)}s(c)},[e,r]),n}(c&&p,n,u,m);t.useEffect(()=>()=>{f.current&&clearTimeout(f.current)},[]);const h=t.useCallback(()=>{p&&(f.current&&clearTimeout(f.current),l>0?f.current=window.setTimeout(()=>d(!0),l):d(!0))},[l,p]),g=t.useCallback(()=>{f.current&&clearTimeout(f.current),d(!1)},[]),v=t.useCallback(()=>{p&&d(!0)},[p]),x=t.useCallback(()=>d(!1),[]);return s(e.Fragment,{children:[s(Dr,{asChild:i,triggerRef:u,isOpen:c,onMouseEnter:h,onMouseLeave:g,onFocus:v,onBlur:x,children:o}),c&&p&&t.createPortal(s(Mr,{actualSide:b.actualSide,className:r,position:b,tooltipRef:m,children:a}),document.body)]})},exports.cn=Ve,exports.generateAriaId=R,exports.generateAriaIds=function(e,t){return t.reduce((t,r)=>(t[r]=R(e,r),t),{})},exports.generateItemId=D,exports.getActiveDescendantId=function(e,t,r){if(r)return D(e,t,r)},exports.setRef=Fe,exports.unwrap=We,exports.useAvatar=c,exports.useCombobox=m,exports.useComposedRefs=Te,exports.useControlledState=Qe,exports.useDialog=b,exports.useItemRegistry=et,exports.useKeyboardNavigation=tt,exports.useListbox=y,exports.useMenu=C,exports.usePrefixedId=v,exports.useScrollLock=Je,exports.useSearchField=S;