shadcn-app-dock 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +11 -11
- package/dist/index.mjs +1009 -1247
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require("react"),l=s(c,1);c=s(c);let u=require("framer-motion"),d=require("react/jsx-runtime"),f=require("react-dom");f=s(f,1);let p=require("lucide-react"),m=require("next-themes"),h=require("shadcn-theme-menu");function g(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=g(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function _(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=g(e))&&(r&&(r+=` `),r+=t);return r}var v=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},y=(e,t)=>({classGroupId:e,validator:t}),b=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),x=`-`,S=[],C=`arbitrary..`,w=e=>{let t=D(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return E(e);let n=e.split(x);return T(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?v(i,t):t:i||S}return n[e]||S}}},T=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=T(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(x):e.slice(t).join(x),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},E=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?C+r:void 0})(),D=e=>{let{theme:t,classGroups:n}=e;return O(n,t)},O=(e,t)=>{let n=b();for(let r in e){let i=e[r];k(i,n,r,t)}return n},k=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];A(i,t,n,r)}},A=(e,t,n,r)=>{if(typeof e==`string`){j(e,t,n);return}if(typeof e==`function`){M(e,t,n,r);return}N(e,t,n,r)},j=(e,t,n)=>{let r=e===``?t:P(t,e);r.classGroupId=n},M=(e,t,n,r)=>{if(F(e)){k(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(y(n,e))},N=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];k(o,P(t,a),n,r)}},P=(e,t)=>{let n=e,r=t.split(x),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=b(),n.nextPart.set(t,i)),n=i}return n},F=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,I=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},ee=`!`,te=`:`,ne=[],re=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),L=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===te){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(ee)?(c=s.slice(0,-1),l=!0):s.startsWith(ee)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return re(t,l,c,u)};if(t){let e=t+te,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):re(ne,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},R=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},ie=e=>({cache:I(e.cacheSize),parseClassName:L(e),sortModifiers:R(e),postfixLookupClassGroupIds:ae(e),...w(e)}),ae=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},z=/\s+/,oe=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(z),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+ee:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},se=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=ce(n))&&(i&&(i+=` `),i+=r);return i},ce=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=ce(e[r]))&&(n&&(n+=` `),n+=t);return n},le=(e,...t)=>{let n,r,i,a,o=o=>(n=ie(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=oe(e,n);return i(e,a),a};return a=o,(...e)=>a(se(...e))},ue=[],B=e=>{let t=t=>t[e]||ue;return t.isThemeGetter=!0,t},de=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,fe=/^\((?:(\w[\w-]*):)?(.+)\)$/i,pe=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,me=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,he=/\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$/,ge=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,_e=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ve=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ye=e=>pe.test(e),V=e=>!!e&&!Number.isNaN(Number(e)),H=e=>!!e&&Number.isInteger(Number(e)),be=e=>e.endsWith(`%`)&&V(e.slice(0,-1)),xe=e=>me.test(e),Se=()=>!0,Ce=e=>he.test(e)&&!ge.test(e),we=()=>!1,Te=e=>_e.test(e),Ee=e=>ve.test(e),De=e=>!U(e)&&!W(e),Oe=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),ke=e=>We(e,Je,we),U=e=>de.test(e),Ae=e=>We(e,Ye,Ce),je=e=>We(e,Xe,V),Me=e=>We(e,Qe,Se),Ne=e=>We(e,Ze,we),Pe=e=>We(e,Ke,we),Fe=e=>We(e,qe,Ee),Ie=e=>We(e,$e,Te),W=e=>fe.test(e),Le=e=>Ge(e,Ye),Re=e=>Ge(e,Ze),ze=e=>Ge(e,Ke),Be=e=>Ge(e,Je),Ve=e=>Ge(e,qe),He=e=>Ge(e,$e,!0),Ue=e=>Ge(e,Qe,!0),We=(e,t,n)=>{let r=de.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Ge=(e,t,n=!1)=>{let r=fe.exec(e);return r?r[1]?t(r[1]):n:!1},Ke=e=>e===`position`||e===`percentage`,qe=e=>e===`image`||e===`url`,Je=e=>e===`length`||e===`size`||e===`bg-size`,Ye=e=>e===`length`,Xe=e=>e===`number`,Ze=e=>e===`family-name`,Qe=e=>e===`number`||e===`weight`,$e=e=>e===`shadow`,et=le(()=>{let e=B(`color`),t=B(`font`),n=B(`text`),r=B(`font-weight`),i=B(`tracking`),a=B(`leading`),o=B(`breakpoint`),s=B(`container`),c=B(`spacing`),l=B(`radius`),u=B(`shadow`),d=B(`inset-shadow`),f=B(`text-shadow`),p=B(`drop-shadow`),m=B(`blur`),h=B(`perspective`),g=B(`aspect`),_=B(`ease`),v=B(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),W,U],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[W,U,c],T=()=>[ye,`full`,`auto`,...w()],E=()=>[H,`none`,`subgrid`,W,U],D=()=>[`auto`,{span:[`full`,H,W,U]},H,W,U],O=()=>[H,`auto`,W,U],k=()=>[`auto`,`min`,`max`,`fr`,W,U],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[ye,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[ye,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],F=()=>[ye,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],I=()=>[e,W,U],ee=()=>[...b(),ze,Pe,{position:[W,U]}],te=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ne=()=>[`auto`,`cover`,`contain`,Be,ke,{size:[W,U]}],re=()=>[be,Le,Ae],L=()=>[``,`none`,`full`,l,W,U],R=()=>[``,V,Le,Ae],ie=()=>[`solid`,`dashed`,`dotted`,`double`],ae=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],z=()=>[V,be,ze,Pe],oe=()=>[``,`none`,m,W,U],se=()=>[`none`,V,W,U],ce=()=>[`none`,V,W,U],le=()=>[V,W,U],ue=()=>[ye,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[xe],breakpoint:[xe],color:[Se],container:[xe],"drop-shadow":[xe],ease:[`in`,`out`,`in-out`],font:[De],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[xe],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[xe],shadow:[xe],spacing:[`px`,V],text:[xe],"text-shadow":[xe],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,ye,U,W,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,W,U]}],"container-named":[Oe],columns:[{columns:[V,U,W,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[H,`auto`,W,U]}],basis:[{basis:[ye,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[V,ye,`auto`,`initial`,`none`,U]}],grow:[{grow:[``,V,W,U]}],shrink:[{shrink:[``,V,W,U]}],order:[{order:[H,`first`,`last`,`none`,W,U]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...P()]}],"min-inline-size":[{"min-inline":[`auto`,...P()]}],"max-inline-size":[{"max-inline":[`none`,...P()]}],"block-size":[{block:[`auto`,...F()]}],"min-block-size":[{"min-block":[`auto`,...F()]}],"max-block-size":[{"max-block":[`none`,...F()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,Le,Ae]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Ue,Me]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,be,U]}],"font-family":[{font:[Re,Ne,t]}],"font-features":[{"font-features":[U]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,W,U]}],"line-clamp":[{"line-clamp":[V,`none`,W,je]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,W,U]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,W,U]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...ie(),`wavy`]}],"text-decoration-thickness":[{decoration:[V,`from-font`,`auto`,W,Ae]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[V,`auto`,W,U]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[H,W,U]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,W,U]}],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`,W,U]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ee()}],"bg-repeat":[{bg:te()}],"bg-size":[{bg:ne()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},H,W,U],radial:[``,W,U],conic:[H,W,U]},Ve,Fe]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:re()}],"gradient-via-pos":[{via:re()}],"gradient-to-pos":[{to:re()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:R()}],"border-w-x":[{"border-x":R()}],"border-w-y":[{"border-y":R()}],"border-w-s":[{"border-s":R()}],"border-w-e":[{"border-e":R()}],"border-w-bs":[{"border-bs":R()}],"border-w-be":[{"border-be":R()}],"border-w-t":[{"border-t":R()}],"border-w-r":[{"border-r":R()}],"border-w-b":[{"border-b":R()}],"border-w-l":[{"border-l":R()}],"divide-x":[{"divide-x":R()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":R()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...ie(),`hidden`,`none`]}],"divide-style":[{divide:[...ie(),`hidden`,`none`]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...ie(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[V,W,U]}],"outline-w":[{outline:[``,V,Le,Ae]}],"outline-color":[{outline:I()}],shadow:[{shadow:[``,`none`,u,He,Ie]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":[`none`,d,He,Ie]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:R()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[V,Ae]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":R()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":[`none`,f,He,Ie]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[V,W,U]}],"mix-blend":[{"mix-blend":[...ae(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ae()}],"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":[V]}],"mask-image-linear-from-pos":[{"mask-linear-from":z()}],"mask-image-linear-to-pos":[{"mask-linear-to":z()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":z()}],"mask-image-t-to-pos":[{"mask-t-to":z()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":z()}],"mask-image-r-to-pos":[{"mask-r-to":z()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":z()}],"mask-image-b-to-pos":[{"mask-b-to":z()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":z()}],"mask-image-l-to-pos":[{"mask-l-to":z()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":z()}],"mask-image-x-to-pos":[{"mask-x-to":z()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":z()}],"mask-image-y-to-pos":[{"mask-y-to":z()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[W,U]}],"mask-image-radial-from-pos":[{"mask-radial-from":z()}],"mask-image-radial-to-pos":[{"mask-radial-to":z()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"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":b()}],"mask-image-conic-pos":[{"mask-conic":[V]}],"mask-image-conic-from-pos":[{"mask-conic-from":z()}],"mask-image-conic-to-pos":[{"mask-conic-to":z()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ee()}],"mask-repeat":[{mask:te()}],"mask-size":[{mask:ne()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,W,U]}],filter:[{filter:[``,`none`,W,U]}],blur:[{blur:oe()}],brightness:[{brightness:[V,W,U]}],contrast:[{contrast:[V,W,U]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,He,Ie]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:[``,V,W,U]}],"hue-rotate":[{"hue-rotate":[V,W,U]}],invert:[{invert:[``,V,W,U]}],saturate:[{saturate:[V,W,U]}],sepia:[{sepia:[``,V,W,U]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,W,U]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[V,W,U]}],"backdrop-contrast":[{"backdrop-contrast":[V,W,U]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,V,W,U]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[V,W,U]}],"backdrop-invert":[{"backdrop-invert":[``,V,W,U]}],"backdrop-opacity":[{"backdrop-opacity":[V,W,U]}],"backdrop-saturate":[{"backdrop-saturate":[V,W,U]}],"backdrop-sepia":[{"backdrop-sepia":[``,V,W,U]}],"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`,W,U]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[V,`initial`,W,U]}],ease:[{ease:[`linear`,`initial`,_,W,U]}],delay:[{delay:[V,W,U]}],animate:[{animate:[`none`,v,W,U]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,W,U]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:se()}],"rotate-x":[{"rotate-x":se()}],"rotate-y":[{"rotate-y":se()}],"rotate-z":[{"rotate-z":se()}],scale:[{scale:ce()}],"scale-x":[{"scale-x":ce()}],"scale-y":[{"scale-y":ce()}],"scale-z":[{"scale-z":ce()}],"scale-3d":[`scale-3d`],skew:[{skew:le()}],"skew-x":[{"skew-x":le()}],"skew-y":[{"skew-y":le()}],transform:[{transform:[W,U,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ue()}],"translate-x":[{"translate-x":ue()}],"translate-y":[{"translate-y":ue()}],"translate-z":[{"translate-z":ue()}],"translate-none":[`translate-none`],zoom:[{zoom:[H,W,U]}],accent:[{accent:I()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:I()}],"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`,W,U]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":I()}],"scrollbar-track-color":[{"scrollbar-track":I()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"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-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":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-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":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`,W,U]}],fill:[{fill:[`none`,...I()]}],"stroke-w":[{stroke:[V,Le,Ae,je]}],stroke:[{stroke:[`none`,...I()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`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`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`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-bs`,`border-w-be`,`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-bs`,`border-color-be`,`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-mbs`,`scroll-mbe`,`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-pbs`,`scroll-pbe`,`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`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function G(...e){return et(_(e))}var tt=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,nt=_,rt=(e,t)=>n=>{if(t?.variants==null)return nt(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=tt(t)||tt(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return nt(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},it=60,at=140,ot=rt(`mx-auto w-max mt-4 sm:mt-8 h-[58px] sm:h-[58px] p-1.5 sm:p-2 flex gap-1.5 sm:gap-2 rounded-2xl border supports-backdrop-blur:bg-white/10 supports-backdrop-blur:dark:bg-black/10 backdrop-blur-md`),st=l.default.forwardRef(({className:e,children:t,magnification:n=it,distance:r=at,direction:i=`bottom`},a)=>{let o=(0,u.useMotionValue)(1/0);return(0,d.jsx)(u.motion.div,{ref:a,onMouseMove:e=>o.set(e.pageX),onMouseLeave:()=>o.set(1/0),className:G(ot({className:e}),`overflow-visible`,{"items-start":i===`top`,"items-center":i===`middle`,"items-end":i===`bottom`}),children:l.default.Children.map(t,e=>l.default.isValidElement(e)?l.default.cloneElement(e,{mousex:o,magnification:n,distance:r}):e)})}),ct=({size:e,magnification:t=it,distance:n=at,mousex:r,className:i,children:a,...o})=>{let s=(0,l.useRef)(null),c=(0,u.useMotionValue)(1/0),f=(0,u.useTransform)(r||c,e=>{let t=s.current?.getBoundingClientRect()??{x:0,width:0};return e-t.x-t.width/2}),p=typeof window<`u`&&window.innerWidth<640?Math.min(t,56):t,m=(0,u.useSpring)((0,u.useTransform)(f,[-n,0,n],[40,p,40]),{mass:.1,stiffness:150,damping:12});return(0,d.jsx)(u.motion.div,{ref:s,style:{width:m},className:G(`flex aspect-square cursor-pointer items-center justify-center rounded-full`,i),...o,children:a})};ct.displayName=`DockIcon`;var lt=({className:e,children:t,magnification:n,distance:r,mousex:i,onClick:a,...o})=>(0,d.jsx)(`div`,{onClick:a,className:G(`relative group`,e),...o,children:l.default.Children.map(t,e=>e?.type===ct?l.default.cloneElement(e,{mousex:i,magnification:n,distance:r}):e)});lt.displayName=`DockItem`;var ut=({children:e,className:t})=>(0,d.jsx)(`div`,{className:G(`absolute -bottom-8 left-1/2 -translate-x-1/2 whitespace-nowrap rounded-md bg-gray-800 dark:bg-gray-200 px-2 py-0.5 text-xs text-white dark:text-black opacity-0 transition-opacity duration-200 pointer-events-none group-hover:opacity-100`,t),children:e});ut.displayName=`DockLabel`,typeof window<`u`&&window.document&&window.document.createElement;function K(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)}}function dt(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function ft(...e){return t=>{let n=!1,r=e.map(e=>{let r=dt(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():dt(e[t],null)}}}}function q(...e){return l.useCallback(ft(...e),e)}function pt(e,t=[]){let n=[];function r(t,r){let i=l.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=l.useMemo(()=>o,Object.values(o));return(0,d.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,u=o?.[e]?.[a]||i,d=l.useContext(u);if(d)return d;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>l.createContext(e));return function(n){let r=n?.[e]||t;return l.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,mt(i,...t)]}function mt(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var ht=globalThis?.document?l.useLayoutEffect:()=>{},gt=l.useInsertionEffect||ht;function _t({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=vt({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=l.useRef(e!==void 0);l.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,l.useCallback(t=>{if(s){let n=yt(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function vt({defaultProp:e,onChange:t}){let[n,r]=l.useState(e),i=l.useRef(n),a=l.useRef(t);return gt(()=>{a.current=t},[t]),l.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function yt(e){return typeof e==`function`}function bt(e){let t=l.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];Dt(r)&&typeof jt==`function`&&(r=jt(r._payload)),l.Children.forEach(r,e=>{if(Tt(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;Dt(n)&&typeof jt==`function`&&(n=jt(n._payload)),a=St(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=l.cloneElement(a,void 0,s):!o&&l.Children.count(r)===1&&l.isValidElement(r)&&(a=r);let c=a?wt(a):void 0,u=q(n,c);if(!a){if(r||r===0)throw Error(o?At(e):kt(e));return r}let d=Ct(i,a.props??{});return a.type!==l.Fragment&&(d.ref=n?u:c),l.cloneElement(a,d)});return t.displayName=`${e}.Slot`,t}var xt=Symbol.for(`radix.slottable`),St=(e,t)=>{if(`child`in e.props){let t=e.props.child;return l.isValidElement(t)?l.cloneElement(t,void 0,e.props.children(t.props.children)):null}return l.isValidElement(t)?t:null};function Ct(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function wt(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Tt(e){return l.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===xt}var Et=Symbol.for(`react.lazy`);function Dt(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Et&&`_payload`in e&&Ot(e._payload)}function Ot(e){return typeof e==`object`&&!!e&&`then`in e}var kt=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,At=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,jt=l.use,J=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=bt(`Primitive.${t}`),r=l.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,d.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Mt(e,t){e&&f.flushSync(()=>e.dispatchEvent(t))}function Nt(e){let t=e+`CollectionProvider`,[n,r]=pt(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=l.useRef(null),a=l.useRef(new Map).current;return(0,d.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=bt(s),u=l.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=q(t,a(s,n).collectionRef);return(0,d.jsx)(c,{ref:i,children:r})});u.displayName=s;let f=e+`CollectionItemSlot`,p=`data-radix-collection-item`,m=bt(f),h=l.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=l.useRef(null),s=q(t,o),c=a(f,n);return l.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,d.jsx)(m,{[p]:``,ref:s,children:r})});h.displayName=f;function g(t){let n=a(e+`CollectionConsumer`,t);return l.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${p}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:u,ItemSlot:h},g,r]}var Pt=l.createContext(void 0);function Ft(e){let t=l.useContext(Pt);return e||t||`ltr`}function Y(e){let t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>((...e)=>t.current?.(...e)),[])}var It=`DismissableLayer`,Lt=`dismissableLayer.update`,Rt=`dismissableLayer.pointerDownOutside`,zt=`dismissableLayer.focusOutside`,Bt,Vt=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Ht=l.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...u}=e,f=l.useContext(Vt),[p,m]=l.useState(null),h=p?.ownerDocument??globalThis?.document,[,g]=l.useState({}),_=q(t,m),v=Array.from(f.layers),[y]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),b=y?v.indexOf(y):-1,x=p?v.indexOf(p):-1,S=f.layersWithOutsidePointerEventsDisabled.size>0,C=x>=b,w=l.useRef(!1),T=Kt(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:h,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:w,dismissableSurfaces:f.dismissableSurfaces,shouldHandlePointerDownOutside:l.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...f.branches].some(t=>t.contains(e));return C&&!t},[f.branches,C])}),E=qt(e=>{if(r&&w.current)return;let t=e.target;[...f.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},h),D=p?x===v.length-1:!1,O=Y(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return l.useEffect(()=>{if(D)return h.addEventListener(`keydown`,O,{capture:!0}),()=>h.removeEventListener(`keydown`,O,{capture:!0})},[h,D,O]),l.useEffect(()=>{if(p)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(Bt=h.body.style.pointerEvents,h.body.style.pointerEvents=`none`),f.layersWithOutsidePointerEventsDisabled.add(p)),f.layers.add(p),Jt(),()=>{n&&(f.layersWithOutsidePointerEventsDisabled.delete(p),f.layersWithOutsidePointerEventsDisabled.size===0&&(h.body.style.pointerEvents=Bt))}},[p,h,n,f]),l.useEffect(()=>()=>{p&&(f.layers.delete(p),f.layersWithOutsidePointerEventsDisabled.delete(p),Jt())},[p,f]),l.useEffect(()=>{let e=()=>g({});return document.addEventListener(Lt,e),()=>document.removeEventListener(Lt,e)},[]),(0,d.jsx)(J.div,{...u,ref:_,style:{pointerEvents:S?C?`auto`:`none`:void 0,...e.style},onFocusCapture:K(e.onFocusCapture,E.onFocusCapture),onBlurCapture:K(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:K(e.onPointerDownCapture,T.onPointerDownCapture)})});Ht.displayName=It;var Ut=`DismissableLayerBranch`,Wt=l.forwardRef((e,t)=>{let n=l.useContext(Vt),r=l.useRef(null),i=q(t,r);return l.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,d.jsx)(J.div,{...e,ref:i})});Wt.displayName=Ut;var Gt=()=>!0;function Kt(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=Gt}=t,s=Y(e),c=l.useRef(!1),u=l.useRef(!1),d=l.useRef(new Map),f=l.useRef(()=>{});return l.useEffect(()=>{function e(){u.current=!1,i.current=!1,d.current.clear()}function t(){return Array.from(d.current.values()).some(Boolean)}function l(e){if(!u.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||d.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{u.current&&f.current()},0)}function p(e){u.current&&d.current.set(e.type,!1)}let m=a=>{if(a.target&&!c.current){let l=function(){n.removeEventListener(`click`,f.current);let r=t();e(),r||Yt(Rt,s,p,{discrete:!0})};if(!o(a.target)){n.removeEventListener(`click`,f.current),e(),c.current=!1;return}let p={originalEvent:a};u.current=!0,i.current=r&&a.button===0,d.current.clear(),!r||a.button!==0?l():(n.removeEventListener(`click`,f.current),f.current=l,n.addEventListener(`click`,f.current,{once:!0}))}else n.removeEventListener(`click`,f.current),e();c.current=!1},h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,l,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,f.current);for(let e of h)n.removeEventListener(e,l,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:()=>c.current=!0}}function qt(e,t=globalThis?.document){let n=Y(e),r=l.useRef(!1);return l.useEffect(()=>{let e=e=>{e.target&&!r.current&&Yt(zt,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Jt(){let e=new CustomEvent(Lt);document.dispatchEvent(e)}function Yt(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Mt(i,a):i.dispatchEvent(a)}var Xt=0,Zt=null;function Qt(){l.useEffect(()=>{Zt||={start:$t(),end:$t()};let{start:e,end:t}=Zt;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),Xt++,()=>{Xt===1&&(Zt?.start.remove(),Zt?.end.remove(),Zt=null),Xt=Math.max(0,Xt-1)}},[])}function $t(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var en=`focusScope.autoFocusOnMount`,tn=`focusScope.autoFocusOnUnmount`,nn={bubbles:!1,cancelable:!0},rn=`FocusScope`,an=l.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=l.useState(null),u=Y(i),f=Y(a),p=l.useRef(null),m=q(t,c),h=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let e=function(e){if(h.paused||!s)return;let t=e.target;s.contains(t)?p.current=t:fn(p.current,{select:!0})},t=function(e){if(h.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||fn(p.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&fn(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,h.paused]),l.useEffect(()=>{if(s){pn.add(h);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(en,nn);s.addEventListener(en,u),s.dispatchEvent(t),t.defaultPrevented||(on(gn(cn(s)),{select:!0}),document.activeElement===e&&fn(s))}return()=>{s.removeEventListener(en,u),setTimeout(()=>{let t=new CustomEvent(tn,nn);s.addEventListener(tn,f),s.dispatchEvent(t),t.defaultPrevented||fn(e??document.body,{select:!0}),s.removeEventListener(tn,f),pn.remove(h)},0)}}},[s,u,f,h]);let g=l.useCallback(e=>{if(!n&&!r||h.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=sn(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&fn(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&fn(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,h.paused]);return(0,d.jsx)(J.div,{tabIndex:-1,...o,ref:m,onKeyDown:g})});an.displayName=rn;function on(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(fn(r,{select:t}),document.activeElement!==n)return}function sn(e){let t=cn(e);return[ln(t,e),ln(t.reverse(),e)]}function cn(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ln(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):un(r,{upTo:t})))return r}function un(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function dn(e){return e instanceof HTMLInputElement&&`select`in e}function fn(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&dn(e)&&t&&e.select()}}var pn=mn();function mn(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=hn(e,t),e.unshift(t)},remove(t){e=hn(e,t),e[0]?.resume()}}}function hn(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function gn(e){return e.filter(e=>e.tagName!==`A`)}var _n=l.useId||(()=>void 0),vn=0;function yn(e){let[t,n]=l.useState(_n());return ht(()=>{e||n(e=>e??String(vn++))},[e]),e||(t?`radix-${t}`:``)}var bn=[`top`,`right`,`bottom`,`left`],xn=Math.min,Sn=Math.max,Cn=Math.round,wn=Math.floor,Tn=e=>({x:e,y:e}),En={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Dn(e,t,n){return Sn(e,xn(t,n))}function On(e,t){return typeof e==`function`?e(t):e}function kn(e){return e.split(`-`)[0]}function An(e){return e.split(`-`)[1]}function jn(e){return e===`x`?`y`:`x`}function Mn(e){return e===`y`?`height`:`width`}function X(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Nn(e){return jn(X(e))}function Pn(e,t,n){n===void 0&&(n=!1);let r=An(e),i=Nn(e),a=Mn(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Un(o)),[o,Un(o)]}function Fn(e){let t=Un(e);return[In(e),t,In(t)]}function In(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Ln=[`left`,`right`],Rn=[`right`,`left`],zn=[`top`,`bottom`],Bn=[`bottom`,`top`];function Vn(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Rn:Ln:t?Ln:Rn;case`left`:case`right`:return t?zn:Bn;default:return[]}}function Hn(e,t,n,r){let i=An(e),a=Vn(kn(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(In)))),a}function Un(e){let t=kn(e);return En[t]+e.slice(t.length)}function Wn(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Gn(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Wn(e)}function Kn(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function qn(e,t,n){let{reference:r,floating:i}=e,a=X(t),o=Nn(t),s=Mn(o),c=kn(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=An(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Jn(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=On(t,e),p=Gn(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Kn(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Kn(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Yn=50,Xn=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Jn},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=qn(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Yn&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=qn(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Zn=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=On(e,t)||{};if(l==null)return{};let d=Gn(u),f={x:n,y:r},p=Nn(i),m=Mn(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=xn(d[_],T),D=xn(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=Dn(E,k,O),j=!c.arrow&&An(i)!=null&&k!==A&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,M=j?k<E?k-E:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),Qn=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=On(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=kn(r),_=X(o),v=kn(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Un(o)]:Fn(o)),x=p!==`none`;!d&&x&&b.push(...Hn(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Pn(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==X(t))||T.every(e=>X(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=X(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function $n(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function er(e){return bn.some(t=>e[t]>=0)}var tr=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=On(e,t);switch(i){case`referenceHidden`:{let e=$n(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:er(e)}}}case`escaped`:{let e=$n(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:er(e)}}}default:return{}}}}},nr=new Set([`left`,`top`]);async function rr(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=kn(n),s=An(n),c=X(n)===`y`,l=nr.has(o)?-1:1,u=a&&c?-1:1,d=On(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var ir=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await rr(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},ar=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=On(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=X(i),p=jn(f),m=u[p],h=u[f],g=(e,t)=>Dn(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},or=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=On(e,t),u={x:n,y:r},d=X(i),f=jn(d),p=u[f],m=u[d],h=On(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=nr.has(kn(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},sr=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=On(e,t),c=await i.detectOverflow(t,s),l=kn(n),u=An(n),d=X(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=xn(p-c[m],g),y=xn(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*Sn(c.left,c.right):S=p-2*Sn(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function cr(){return typeof window<`u`}function lr(e){return dr(e)?(e.nodeName||``).toLowerCase():`#document`}function Z(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ur(e){return((dr(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function dr(e){return cr()?e instanceof Node||e instanceof Z(e).Node:!1}function fr(e){return cr()?e instanceof Element||e instanceof Z(e).Element:!1}function pr(e){return cr()?e instanceof HTMLElement||e instanceof Z(e).HTMLElement:!1}function mr(e){return!cr()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Z(e).ShadowRoot}function hr(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Er(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function gr(e){return/^(table|td|th)$/.test(lr(e))}function _r(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var vr=/transform|translate|scale|rotate|perspective|filter/,yr=/paint|layout|strict|content/,br=e=>!!e&&e!==`none`,xr;function Sr(e){let t=fr(e)?Er(e):e;return br(t.transform)||br(t.translate)||br(t.scale)||br(t.rotate)||br(t.perspective)||!wr()&&(br(t.backdropFilter)||br(t.filter))||vr.test(t.willChange||``)||yr.test(t.contain||``)}function Cr(e){let t=Or(e);for(;pr(t)&&!Tr(t);){if(Sr(t))return t;if(_r(t))return null;t=Or(t)}return null}function wr(){return xr??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),xr}function Tr(e){return/^(html|body|#document)$/.test(lr(e))}function Er(e){return Z(e).getComputedStyle(e)}function Dr(e){return fr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Or(e){if(lr(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||mr(e)&&e.host||ur(e);return mr(t)?t.host:t}function kr(e){let t=Or(e);return Tr(t)?(e.ownerDocument||e).body:pr(t)&&hr(t)?t:kr(t)}function Ar(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=kr(e),i=r===e.ownerDocument?.body,a=Z(r);if(i){let e=jr(a);return t.concat(a,a.visualViewport||[],hr(r)?r:[],e&&n?Ar(e):[])}else return t.concat(r,Ar(r,[],n))}function jr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Mr(e){let t=Er(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=pr(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Cn(n)!==a||Cn(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Nr(e){return fr(e)?e:e.contextElement}function Pr(e){let t=Nr(e);if(!pr(t))return Tn(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Mr(t),o=(a?Cn(n.width):n.width)/r,s=(a?Cn(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Fr=Tn(0);function Ir(e){let t=Z(e);return!wr()||!t.visualViewport?Fr:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Lr(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Z(e)}function Rr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Nr(e),o=Tn(1);t&&(r?fr(r)&&(o=Pr(r)):o=Pr(e));let s=Lr(a,n,r)?Ir(a):Tn(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Z(a),t=fr(r)?Z(r):r,n=e,i=jr(n);for(;i&&t!==n;){let e=Pr(i),t=i.getBoundingClientRect(),r=Er(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Z(i),i=jr(n)}}return Kn({width:u,height:d,x:c,y:l})}function zr(e,t){let n=Dr(e).scrollLeft;return t?t.left+n:Rr(ur(e)).left+n}function Br(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-zr(e,n),y:n.top+t.scrollTop}}function Vr(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=ur(r),s=t?_r(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Tn(1),u=Tn(0),d=pr(r);if((d||!a)&&((lr(r)!==`body`||hr(o))&&(c=Dr(r)),d)){let e=Rr(r);l=Pr(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Br(o,c):Tn(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Hr(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Ur(e){let t=Dr(e),n=e.ownerDocument.body,r=Sn(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Sn(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+zr(e),o=-t.scrollTop;return Er(n).direction===`rtl`&&(a+=Sn(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Wr=25;function Gr(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Z(e),a=ur(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!wr()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(zr(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Wr&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Kr(e,t){let n=Rr(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Pr(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function qr(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Gr(e,n,t);else if(t===`document`)r=Ur(ur(e));else if(fr(t))r=Kr(t,n);else{let n=Ir(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Kn(r)}function Jr(e,t){let n=t.get(e);if(n)return n;let r=Ar(e,[],!1).filter(e=>fr(e)&&lr(e)!==`body`),i=null,a=Er(e).position===`fixed`,o=a?Or(e):e;for(;fr(o)&&!Tr(o);){let e=Er(o),t=Sr(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Or(o)}return t.set(e,r),r}function Yr(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?_r(t)?[]:Jr(t,this._c):[].concat(n),r],o=qr(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=qr(t,a[e],i);s=Sn(n.top,s),c=xn(n.right,c),l=xn(n.bottom,l),u=Sn(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Xr(e){let{width:t,height:n}=Mr(e);return{width:t,height:n}}function Zr(e,t,n){let r=pr(t),i=ur(t),a=n===`fixed`,o=Rr(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Tn(0);if((r||!a)&&((lr(t)!==`body`||hr(i))&&(s=Dr(t)),r)){let e=Rr(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=zr(i));let l=i&&!r&&!a?Br(i,s):Tn(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Qr(e){return Er(e).position===`static`}function $r(e,t){if(!pr(e)||Er(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return ur(e)===n&&(n=n.ownerDocument.body),n}function ei(e,t){let n=Z(e);if(_r(e))return n;if(!pr(e)){let t=Or(e);for(;t&&!Tr(t);){if(fr(t)&&!Qr(t))return t;t=Or(t)}return n}let r=$r(e,t);for(;r&&gr(r)&&Qr(r);)r=$r(r,t);return r&&Tr(r)&&Qr(r)&&!Sr(r)?n:r||Cr(e)||n}var ti=async function(e){let t=this.getOffsetParent||ei,n=this.getDimensions,r=await n(e.floating);return{reference:Zr(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ni(e){return Er(e).direction===`rtl`}var ri={convertOffsetParentRelativeRectToViewportRelativeRect:Vr,getDocumentElement:ur,getClippingRect:Yr,getOffsetParent:ei,getElementRects:ti,getClientRects:Hr,getDimensions:Xr,getScale:Pr,isElement:fr,isRTL:ni};function ii(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ai(e,t,n){let r=null,i,a=ur(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=wn(d),h=wn(a.clientWidth-(u+f)),g=wn(a.clientHeight-(d+p)),_=wn(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Sn(0,xn(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!ii(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Z(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function oi(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Nr(e),u=i||a?[...l?Ar(l):[],...t?Ar(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?ai(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Rr(e):null;c&&g();function g(){let t=Rr(e);h&&!ii(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var si=ir,ci=ar,li=Qn,ui=sr,di=tr,fi=Zn,pi=or,mi=(e,t,n)=>{let r=new Map,i=n??{},a={...ri,...i.platform,_c:r};return Xn(e,t,{...i,platform:a})},hi=typeof document<`u`?l.useLayoutEffect:function(){};function gi(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!gi(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!gi(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function _i(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function vi(e,t){let n=_i(e);return Math.round(t*n)/n}function yi(e){let t=l.useRef(e);return hi(()=>{t.current=e}),t}function bi(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:u}=e,[d,p]=l.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=l.useState(r);gi(m,r)||h(r);let[g,_]=l.useState(null),[v,y]=l.useState(null),b=l.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=l.useCallback(e=>{e!==T.current&&(T.current=e,y(e))},[]),S=a||g,C=o||v,w=l.useRef(null),T=l.useRef(null),E=l.useRef(d),D=c!=null,O=yi(c),k=yi(i),A=yi(u),j=l.useCallback(()=>{if(!w.current||!T.current)return;let e={placement:t,strategy:n,middleware:m};k.current&&(e.platform=k.current),mi(w.current,T.current,e).then(e=>{let t={...e,isPositioned:A.current!==!1};M.current&&!gi(E.current,t)&&(E.current=t,f.flushSync(()=>{p(t)}))})},[m,t,n,k,A]);hi(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[u]);let M=l.useRef(!1);hi(()=>(M.current=!0,()=>{M.current=!1}),[]),hi(()=>{if(S&&(w.current=S),C&&(T.current=C),S&&C){if(O.current)return O.current(S,C,j);j()}},[S,C,j,O,D]);let N=l.useMemo(()=>({reference:w,floating:T,setReference:b,setFloating:x}),[b,x]),P=l.useMemo(()=>({reference:S,floating:C}),[S,C]),F=l.useMemo(()=>{let e={position:n,left:0,top:0};if(!P.floating)return e;let t=vi(P.floating,d.x),r=vi(P.floating,d.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,..._i(P.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,P.floating,d.x,d.y]);return l.useMemo(()=>({...d,update:j,refs:N,elements:P,floatingStyles:F}),[d,j,N,P,F])}var xi=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:fi({element:r.current,padding:i}).fn(n):r?fi({element:r,padding:i}).fn(n):{}}}},Si=(e,t)=>{let n=si(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ci=(e,t)=>{let n=ci(e);return{name:n.name,fn:n.fn,options:[e,t]}},wi=(e,t)=>({fn:pi(e).fn,options:[e,t]}),Ti=(e,t)=>{let n=li(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ei=(e,t)=>{let n=ui(e);return{name:n.name,fn:n.fn,options:[e,t]}},Di=(e,t)=>{let n=di(e);return{name:n.name,fn:n.fn,options:[e,t]}},Oi=(e,t)=>{let n=xi(e);return{name:n.name,fn:n.fn,options:[e,t]}},ki=`Arrow`,Ai=l.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,d.jsx)(J.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,d.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});Ai.displayName=ki;var ji=Ai;function Mi(e){let[t,n]=l.useState(void 0);return ht(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var Ni=`Popper`,[Pi,Fi]=pt(Ni),[Ii,Li]=Pi(Ni),Ri=e=>{let{__scopePopper:t,children:n}=e,[r,i]=l.useState(null),[a,o]=l.useState(void 0);return(0,d.jsx)(Ii,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})};Ri.displayName=Ni;var zi=`PopperAnchor`,Bi=l.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=Li(zi,n),o=l.useRef(null),s=a.onAnchorChange,c=q(t,l.useCallback(e=>{o.current=e,e&&s(e)},[s])),u=l.useRef(null);l.useEffect(()=>{if(!r)return;let e=u.current;u.current=r.current,e!==u.current&&s(u.current)});let f=a.placementState&&Xi(a.placementState),p=f?.[0],m=f?.[1];return r?null:(0,d.jsx)(J.div,{"data-radix-popper-side":p,"data-radix-popper-align":m,...i,ref:c})});Bi.displayName=zi;var Vi=`PopperContent`,[Hi,Ui]=Pi(Vi),Wi=l.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:p=`partial`,hideWhenDetached:m=!1,updatePositionStrategy:h=`optimized`,onPlaced:g,..._}=e,v=Li(Vi,n),[y,b]=l.useState(null),x=q(t,b),[S,C]=l.useState(null),w=Mi(S),T=w?.width??0,E=w?.height??0,D=r+(a===`center`?``:`-`+a),O=typeof f==`number`?f:{top:0,right:0,bottom:0,left:0,...f},k=Array.isArray(u)?u:[u],A=k.length>0,j={padding:O,boundary:k.filter(Ji),altBoundary:A},{refs:M,floatingStyles:N,placement:P,isPositioned:F,middlewareData:I}=bi({strategy:`fixed`,placement:D,whileElementsMounted:(...e)=>oi(...e,{animationFrame:h===`always`}),elements:{reference:v.anchor},middleware:[Si({mainAxis:i+E,alignmentAxis:o}),c&&Ci({mainAxis:!0,crossAxis:!1,limiter:p===`partial`?wi():void 0,...j}),c&&Ti({...j}),Ei({...j,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),S&&Oi({element:S,padding:s}),Yi({arrowWidth:T,arrowHeight:E}),m&&Di({strategy:`referenceHidden`,...j,boundary:A?j.boundary:void 0})]}),ee=v.setPlacementState;ht(()=>(ee(P),()=>{ee(void 0)}),[P,ee]);let[te,ne]=Xi(P),re=Y(g);ht(()=>{F&&re?.()},[F,re]);let L=I.arrow?.x,R=I.arrow?.y,ie=I.arrow?.centerOffset!==0,[ae,z]=l.useState();return ht(()=>{y&&z(window.getComputedStyle(y).zIndex)},[y]),(0,d.jsx)(`div`,{ref:M.setFloating,"data-radix-popper-content-wrapper":``,style:{...N,transform:F?N.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:ae,"--radix-popper-transform-origin":[I.transformOrigin?.x,I.transformOrigin?.y].join(` `),...I.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,d.jsx)(Hi,{scope:n,placedSide:te,placedAlign:ne,onArrowChange:C,arrowX:L,arrowY:R,shouldHideArrow:ie,children:(0,d.jsx)(J.div,{"data-side":te,"data-align":ne,..._,ref:x,style:{..._.style,animation:F?void 0:`none`}})})})});Wi.displayName=Vi;var Gi=`PopperArrow`,Ki={top:`bottom`,right:`left`,bottom:`top`,left:`right`},qi=l.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=Ui(Gi,n),a=Ki[i.placedSide];return(0,d.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,d.jsx)(ji,{...r,ref:t,style:{...r.style,display:`block`}})})});qi.displayName=Gi;function Ji(e){return e!==null}var Yi=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Xi(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function Xi(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var Zi=Ri,Qi=Bi,$i=Wi,ea=qi,ta=`Portal`,na=l.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=l.useState(!1);ht(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?f.createPortal((0,d.jsx)(J.div,{...r,ref:t}),o):null});na.displayName=ta;function ra(e,t){return l.useReducer((e,n)=>t[e][n]??e,e)}var ia=e=>{let{present:t,children:n}=e,r=aa(t),i=typeof n==`function`?n({present:r.isPresent}):l.Children.only(n),a=sa(r.ref,la(i));return typeof n==`function`||r.isPresent?l.cloneElement(i,{ref:a}):null};ia.displayName=`Presence`;function aa(e){let[t,n]=l.useState(),r=l.useRef(null),i=l.useRef(e),a=l.useRef(`none`),o=l.useRef(void 0),[s,c]=ra(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return l.useEffect(()=>{s===`mounted`?(a.current=o.current??ca(r.current),o.current=void 0):a.current=`none`},[s]),ht(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=ca(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),ht(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=ca(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},s=e=>{e.target===t&&(a.current=ca(r.current))};return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:l.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=ca(t)}else r.current=null;n(e)},[])}}function oa(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function sa(...e){let t=l.useRef(e);return t.current=e,l.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=oa(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():oa(n[e],null)}}},[])}function ca(e){return e?.animationName||`none`}function la(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ua=!1;function da(){let[e,t]=l.useState(ua);return l.useEffect(()=>{ua||(ua=!0,t(!0))},[]),e}var fa=l.useSyncExternalStore;function pa(){return()=>{}}function ma(){return fa(pa,()=>!0,()=>!1)}var ha=typeof fa==`function`?ma:da,ga=`rovingFocusGroup.onEntryFocus`,_a={bubbles:!1,cancelable:!0},va=`RovingFocusGroup`,[ya,ba,xa]=Nt(va),[Sa,Ca]=pt(va,[xa]),[wa,Ta]=Sa(va),Ea=l.forwardRef((e,t)=>(0,d.jsx)(ya.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,d.jsx)(ya.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,d.jsx)(Da,{...e,ref:t})})}));Ea.displayName=va;var Da=l.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...p}=e,m=l.useRef(null),h=q(t,m),g=Ft(a),[_,v]=_t({prop:o,defaultProp:s??null,onChange:c,caller:va}),[y,b]=l.useState(!1),x=Y(u),S=ba(n),C=l.useRef(!1),[w,T]=l.useState(0);return l.useEffect(()=>{let e=m.current;if(e)return e.addEventListener(ga,x),()=>e.removeEventListener(ga,x)},[x]),(0,d.jsx)(wa,{scope:n,orientation:r,dir:g,loop:i,currentTabStopId:_,onItemFocus:l.useCallback(e=>v(e),[v]),onItemShiftTab:l.useCallback(()=>b(!0),[]),onFocusableItemAdd:l.useCallback(()=>T(e=>e+1),[]),onFocusableItemRemove:l.useCallback(()=>T(e=>e-1),[]),children:(0,d.jsx)(J.div,{tabIndex:y||w===0?-1:0,"data-orientation":r,...p,ref:h,style:{outline:`none`,...e.style},onMouseDown:K(e.onMouseDown,()=>{C.current=!0}),onFocus:K(e.onFocus,e=>{let t=!C.current;if(e.target===e.currentTarget&&t&&!y){let t=new CustomEvent(ga,_a);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=S().filter(e=>e.focusable);Na([e.find(e=>e.active),e.find(e=>e.id===_),...e].filter(Boolean).map(e=>e.ref.current),f)}}C.current=!1}),onBlur:K(e.onBlur,()=>b(!1))})})}),Oa=`RovingFocusGroupItem`,ka=l.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=yn(),u=a||c,f=Ta(Oa,n),p=f.currentTabStopId===u,m=ba(n),{onFocusableItemAdd:h,onFocusableItemRemove:g,currentTabStopId:_}=f,v=ha();return ht(()=>{if(!(!v||!r))return h(),()=>g()},[v,r,h,g]),l.useEffect(()=>{if(!(v||!r))return h(),()=>g()},[v,r,h,g]),(0,d.jsx)(ya.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:(0,d.jsx)(J.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...s,ref:t,onMouseDown:K(e.onMouseDown,e=>{r?f.onItemFocus(u):e.preventDefault()}),onFocus:K(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:K(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){f.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Ma(e,f.orientation,f.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=m().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=f.loop?Pa(n,r+1):n.slice(r+1)}setTimeout(()=>Na(n))}}),children:typeof o==`function`?o({isCurrentTabStop:p,hasTabStop:_!=null}):o})})});ka.displayName=Oa;var Aa={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function ja(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function Ma(e,t,n){let r=ja(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return Aa[r]}function Na(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Pa(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Fa=Ea,Ia=ka,La=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Ra=new WeakMap,za=new WeakMap,Ba={},Va=0,Ha=function(e){return e&&(e.host||Ha(e.parentNode))},Ua=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Ha(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Wa=function(e,t,n,r){var i=Ua(t,Array.isArray(e)?e:[e]);Ba[n]||(Ba[n]=new WeakMap);var a=Ba[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Ra.get(e)||0)+1,l=(a.get(e)||0)+1;Ra.set(e,c),a.set(e,l),o.push(e),c===1&&i&&za.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Va++,function(){o.forEach(function(e){var t=Ra.get(e)-1,i=a.get(e)-1;Ra.set(e,t),a.set(e,i),t||(za.has(e)||e.removeAttribute(r),za.delete(e)),i||e.removeAttribute(n)}),Va--,Va||(Ra=new WeakMap,Ra=new WeakMap,za=new WeakMap,Ba={})}},Ga=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||La(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Wa(r,i,n,`aria-hidden`)):function(){return null}},Ka=function(){return Ka=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ka.apply(this,arguments)};function qa(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Ja(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Ya=`right-scroll-bar-position`,Xa=`width-before-scroll-bar`,Za=`with-scroll-bars-hidden`,Qa=`--removed-body-scroll-bar-size`;function $a(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function eo(e,t){var n=(0,c.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var to=typeof window<`u`?c.useLayoutEffect:c.useEffect,no=new WeakMap;function ro(e,t){var n=eo(t||null,function(t){return e.forEach(function(e){return $a(e,t)})});return to(function(){var t=no.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||$a(e,null)}),i.forEach(function(e){r.has(e)||$a(e,a)})}no.set(n,e)},[e]),n}function io(e){return e}function ao(e,t){t===void 0&&(t=io);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function oo(e){e===void 0&&(e={});var t=ao(null);return t.options=Ka({async:!0,ssr:!1},e),t}var so=function(e){var t=e.sideCar,n=qa(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return c.createElement(r,Ka({},n))};so.isSideCarExport=!0;function co(e,t){return e.useMedium(t),so}var lo=oo(),uo=function(){},fo=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:uo,onWheelCapture:uo,onTouchMoveCapture:uo}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=qa(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=p,C=ro([n,t]),w=Ka(Ka({},x),i);return c.createElement(c.Fragment,null,d&&c.createElement(S,{sideCar:lo,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),o?c.cloneElement(c.Children.only(s),Ka(Ka({},w),{ref:C})):c.createElement(y,Ka({},w,{className:l,ref:C}),s))});fo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},fo.classNames={fullWidth:Xa,zeroRight:Ya};var po,mo=function(){if(po)return po;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function ho(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=mo();return t&&e.setAttribute(`nonce`,t),e}function go(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function _o(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var vo=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ho())&&(go(t,n),_o(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},yo=function(){var e=vo();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},bo=function(){var e=yo();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},xo={left:0,top:0,right:0,gap:0},So=function(e){return parseInt(e||``,10)||0},Co=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[So(n),So(r),So(i)]},wo=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return xo;var t=Co(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},To=bo(),Eo=`data-scroll-locked`,Do=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
2
|
-
.${
|
|
1
|
+
"use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require("react"),l=s(c,1);c=s(c);let u=require("framer-motion"),d=require("react/jsx-runtime"),f=require("react-dom");f=s(f,1);let p=require("lucide-react"),m=require("next-themes"),h=require("shadcn-theme-menu");function g(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=g(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function _(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=g(e))&&(r&&(r+=` `),r+=t);return r}var v=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},y=(e,t)=>({classGroupId:e,validator:t}),b=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),x=`-`,S=[],C=`arbitrary..`,w=e=>{let t=D(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return E(e);let n=e.split(x);return T(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?v(i,t):t:i||S}return n[e]||S}}},T=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=T(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(x):e.slice(t).join(x),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},E=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?C+r:void 0})(),D=e=>{let{theme:t,classGroups:n}=e;return O(n,t)},O=(e,t)=>{let n=b();for(let r in e){let i=e[r];k(i,n,r,t)}return n},k=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];A(i,t,n,r)}},A=(e,t,n,r)=>{if(typeof e==`string`){j(e,t,n);return}if(typeof e==`function`){M(e,t,n,r);return}N(e,t,n,r)},j=(e,t,n)=>{let r=e===``?t:P(t,e);r.classGroupId=n},M=(e,t,n,r)=>{if(F(e)){k(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(y(n,e))},N=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];k(o,P(t,a),n,r)}},P=(e,t)=>{let n=e,r=t.split(x),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=b(),n.nextPart.set(t,i)),n=i}return n},F=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,I=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},ee=`!`,te=`:`,ne=[],re=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),L=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===te){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(ee)?(c=s.slice(0,-1),l=!0):s.startsWith(ee)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return re(t,l,c,u)};if(t){let e=t+te,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):re(ne,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},R=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},ie=e=>({cache:I(e.cacheSize),parseClassName:L(e),sortModifiers:R(e),postfixLookupClassGroupIds:ae(e),...w(e)}),ae=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},z=/\s+/,oe=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(z),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+ee:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},se=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=ce(n))&&(i&&(i+=` `),i+=r);return i},ce=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=ce(e[r]))&&(n&&(n+=` `),n+=t);return n},le=(e,...t)=>{let n,r,i,a,o=o=>(n=ie(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=oe(e,n);return i(e,a),a};return a=o,(...e)=>a(se(...e))},ue=[],B=e=>{let t=t=>t[e]||ue;return t.isThemeGetter=!0,t},de=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,fe=/^\((?:(\w[\w-]*):)?(.+)\)$/i,pe=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,me=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,he=/\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$/,ge=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,_e=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ve=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ye=e=>pe.test(e),V=e=>!!e&&!Number.isNaN(Number(e)),H=e=>!!e&&Number.isInteger(Number(e)),be=e=>e.endsWith(`%`)&&V(e.slice(0,-1)),xe=e=>me.test(e),Se=()=>!0,Ce=e=>he.test(e)&&!ge.test(e),we=()=>!1,Te=e=>_e.test(e),Ee=e=>ve.test(e),De=e=>!U(e)&&!W(e),Oe=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),ke=e=>We(e,Je,we),U=e=>de.test(e),Ae=e=>We(e,Ye,Ce),je=e=>We(e,Xe,V),Me=e=>We(e,Qe,Se),Ne=e=>We(e,Ze,we),Pe=e=>We(e,Ke,we),Fe=e=>We(e,qe,Ee),Ie=e=>We(e,$e,Te),W=e=>fe.test(e),Le=e=>Ge(e,Ye),Re=e=>Ge(e,Ze),ze=e=>Ge(e,Ke),Be=e=>Ge(e,Je),Ve=e=>Ge(e,qe),He=e=>Ge(e,$e,!0),Ue=e=>Ge(e,Qe,!0),We=(e,t,n)=>{let r=de.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Ge=(e,t,n=!1)=>{let r=fe.exec(e);return r?r[1]?t(r[1]):n:!1},Ke=e=>e===`position`||e===`percentage`,qe=e=>e===`image`||e===`url`,Je=e=>e===`length`||e===`size`||e===`bg-size`,Ye=e=>e===`length`,Xe=e=>e===`number`,Ze=e=>e===`family-name`,Qe=e=>e===`number`||e===`weight`,$e=e=>e===`shadow`,et=le(()=>{let e=B(`color`),t=B(`font`),n=B(`text`),r=B(`font-weight`),i=B(`tracking`),a=B(`leading`),o=B(`breakpoint`),s=B(`container`),c=B(`spacing`),l=B(`radius`),u=B(`shadow`),d=B(`inset-shadow`),f=B(`text-shadow`),p=B(`drop-shadow`),m=B(`blur`),h=B(`perspective`),g=B(`aspect`),_=B(`ease`),v=B(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),W,U],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[W,U,c],T=()=>[ye,`full`,`auto`,...w()],E=()=>[H,`none`,`subgrid`,W,U],D=()=>[`auto`,{span:[`full`,H,W,U]},H,W,U],O=()=>[H,`auto`,W,U],k=()=>[`auto`,`min`,`max`,`fr`,W,U],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[ye,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[ye,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],F=()=>[ye,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],I=()=>[e,W,U],ee=()=>[...b(),ze,Pe,{position:[W,U]}],te=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ne=()=>[`auto`,`cover`,`contain`,Be,ke,{size:[W,U]}],re=()=>[be,Le,Ae],L=()=>[``,`none`,`full`,l,W,U],R=()=>[``,V,Le,Ae],ie=()=>[`solid`,`dashed`,`dotted`,`double`],ae=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],z=()=>[V,be,ze,Pe],oe=()=>[``,`none`,m,W,U],se=()=>[`none`,V,W,U],ce=()=>[`none`,V,W,U],le=()=>[V,W,U],ue=()=>[ye,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[xe],breakpoint:[xe],color:[Se],container:[xe],"drop-shadow":[xe],ease:[`in`,`out`,`in-out`],font:[De],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[xe],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[xe],shadow:[xe],spacing:[`px`,V],text:[xe],"text-shadow":[xe],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,ye,U,W,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,W,U]}],"container-named":[Oe],columns:[{columns:[V,U,W,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[H,`auto`,W,U]}],basis:[{basis:[ye,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[V,ye,`auto`,`initial`,`none`,U]}],grow:[{grow:[``,V,W,U]}],shrink:[{shrink:[``,V,W,U]}],order:[{order:[H,`first`,`last`,`none`,W,U]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...P()]}],"min-inline-size":[{"min-inline":[`auto`,...P()]}],"max-inline-size":[{"max-inline":[`none`,...P()]}],"block-size":[{block:[`auto`,...F()]}],"min-block-size":[{"min-block":[`auto`,...F()]}],"max-block-size":[{"max-block":[`none`,...F()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,Le,Ae]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Ue,Me]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,be,U]}],"font-family":[{font:[Re,Ne,t]}],"font-features":[{"font-features":[U]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,W,U]}],"line-clamp":[{"line-clamp":[V,`none`,W,je]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,W,U]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,W,U]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...ie(),`wavy`]}],"text-decoration-thickness":[{decoration:[V,`from-font`,`auto`,W,Ae]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[V,`auto`,W,U]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[H,W,U]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,W,U]}],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`,W,U]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ee()}],"bg-repeat":[{bg:te()}],"bg-size":[{bg:ne()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},H,W,U],radial:[``,W,U],conic:[H,W,U]},Ve,Fe]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:re()}],"gradient-via-pos":[{via:re()}],"gradient-to-pos":[{to:re()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:R()}],"border-w-x":[{"border-x":R()}],"border-w-y":[{"border-y":R()}],"border-w-s":[{"border-s":R()}],"border-w-e":[{"border-e":R()}],"border-w-bs":[{"border-bs":R()}],"border-w-be":[{"border-be":R()}],"border-w-t":[{"border-t":R()}],"border-w-r":[{"border-r":R()}],"border-w-b":[{"border-b":R()}],"border-w-l":[{"border-l":R()}],"divide-x":[{"divide-x":R()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":R()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...ie(),`hidden`,`none`]}],"divide-style":[{divide:[...ie(),`hidden`,`none`]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...ie(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[V,W,U]}],"outline-w":[{outline:[``,V,Le,Ae]}],"outline-color":[{outline:I()}],shadow:[{shadow:[``,`none`,u,He,Ie]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":[`none`,d,He,Ie]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:R()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[V,Ae]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":R()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":[`none`,f,He,Ie]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[V,W,U]}],"mix-blend":[{"mix-blend":[...ae(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ae()}],"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":[V]}],"mask-image-linear-from-pos":[{"mask-linear-from":z()}],"mask-image-linear-to-pos":[{"mask-linear-to":z()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":z()}],"mask-image-t-to-pos":[{"mask-t-to":z()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":z()}],"mask-image-r-to-pos":[{"mask-r-to":z()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":z()}],"mask-image-b-to-pos":[{"mask-b-to":z()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":z()}],"mask-image-l-to-pos":[{"mask-l-to":z()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":z()}],"mask-image-x-to-pos":[{"mask-x-to":z()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":z()}],"mask-image-y-to-pos":[{"mask-y-to":z()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[W,U]}],"mask-image-radial-from-pos":[{"mask-radial-from":z()}],"mask-image-radial-to-pos":[{"mask-radial-to":z()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"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":b()}],"mask-image-conic-pos":[{"mask-conic":[V]}],"mask-image-conic-from-pos":[{"mask-conic-from":z()}],"mask-image-conic-to-pos":[{"mask-conic-to":z()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ee()}],"mask-repeat":[{mask:te()}],"mask-size":[{mask:ne()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,W,U]}],filter:[{filter:[``,`none`,W,U]}],blur:[{blur:oe()}],brightness:[{brightness:[V,W,U]}],contrast:[{contrast:[V,W,U]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,He,Ie]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:[``,V,W,U]}],"hue-rotate":[{"hue-rotate":[V,W,U]}],invert:[{invert:[``,V,W,U]}],saturate:[{saturate:[V,W,U]}],sepia:[{sepia:[``,V,W,U]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,W,U]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[V,W,U]}],"backdrop-contrast":[{"backdrop-contrast":[V,W,U]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,V,W,U]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[V,W,U]}],"backdrop-invert":[{"backdrop-invert":[``,V,W,U]}],"backdrop-opacity":[{"backdrop-opacity":[V,W,U]}],"backdrop-saturate":[{"backdrop-saturate":[V,W,U]}],"backdrop-sepia":[{"backdrop-sepia":[``,V,W,U]}],"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`,W,U]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[V,`initial`,W,U]}],ease:[{ease:[`linear`,`initial`,_,W,U]}],delay:[{delay:[V,W,U]}],animate:[{animate:[`none`,v,W,U]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,W,U]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:se()}],"rotate-x":[{"rotate-x":se()}],"rotate-y":[{"rotate-y":se()}],"rotate-z":[{"rotate-z":se()}],scale:[{scale:ce()}],"scale-x":[{"scale-x":ce()}],"scale-y":[{"scale-y":ce()}],"scale-z":[{"scale-z":ce()}],"scale-3d":[`scale-3d`],skew:[{skew:le()}],"skew-x":[{"skew-x":le()}],"skew-y":[{"skew-y":le()}],transform:[{transform:[W,U,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ue()}],"translate-x":[{"translate-x":ue()}],"translate-y":[{"translate-y":ue()}],"translate-z":[{"translate-z":ue()}],"translate-none":[`translate-none`],zoom:[{zoom:[H,W,U]}],accent:[{accent:I()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:I()}],"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`,W,U]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":I()}],"scrollbar-track-color":[{"scrollbar-track":I()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"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-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":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-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":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`,W,U]}],fill:[{fill:[`none`,...I()]}],"stroke-w":[{stroke:[V,Le,Ae,je]}],stroke:[{stroke:[`none`,...I()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`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`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`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-bs`,`border-w-be`,`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-bs`,`border-color-be`,`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-mbs`,`scroll-mbe`,`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-pbs`,`scroll-pbe`,`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`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function G(...e){return et(_(e))}var tt=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,nt=_,rt=(e,t)=>n=>{if(t?.variants==null)return nt(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=tt(t)||tt(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return nt(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},it=60,at=140,ot=rt(`mx-auto w-max mt-4 sm:mt-8 h-[58px] sm:h-[58px] p-1.5 sm:p-2 flex gap-1.5 sm:gap-2 rounded-2xl border supports-backdrop-blur:bg-white/10 supports-backdrop-blur:dark:bg-black/10 backdrop-blur-md`),st=l.default.forwardRef(({className:e,children:t,magnification:n=it,distance:r=at,direction:i=`bottom`},a)=>{let o=(0,u.useMotionValue)(1/0);return(0,d.jsx)(u.motion.div,{ref:a,onMouseMove:e=>o.set(e.pageX),onMouseLeave:()=>o.set(1/0),className:G(ot({className:e}),`overflow-visible`,{"items-start":i===`top`,"items-center":i===`middle`,"items-end":i===`bottom`}),children:l.default.Children.map(t,e=>l.default.isValidElement(e)?l.default.cloneElement(e,{mousex:o,magnification:n,distance:r}):e)})}),ct=({size:e,magnification:t=it,distance:n=at,mousex:r,className:i,children:a,...o})=>{let s=(0,l.useRef)(null),c=(0,u.useMotionValue)(1/0),f=(0,u.useTransform)(r||c,e=>{let t=s.current?.getBoundingClientRect()??{x:0,width:0};return e-t.x-t.width/2}),p=typeof window<`u`&&window.innerWidth<640?Math.min(t,56):t,m=(0,u.useSpring)((0,u.useTransform)(f,[-n,0,n],[40,p,40]),{mass:.1,stiffness:150,damping:12});return(0,d.jsx)(u.motion.div,{ref:s,style:{width:m},className:G(`flex aspect-square cursor-pointer items-center justify-center rounded-full`,i),...o,children:a})};ct.displayName=`DockIcon`;var lt=({className:e,children:t,magnification:n,distance:r,mousex:i,onClick:a,...o})=>(0,d.jsx)(`div`,{onClick:a,className:G(`relative group`,e),...o,children:l.default.Children.map(t,e=>e?.type===ct?l.default.cloneElement(e,{mousex:i,magnification:n,distance:r}):e)});lt.displayName=`DockItem`;var ut=({children:e,className:t})=>(0,d.jsx)(`div`,{className:G(`absolute -bottom-8 left-1/2 -translate-x-1/2 whitespace-nowrap rounded-md bg-gray-800 dark:bg-gray-200 px-2 py-0.5 text-xs text-white dark:text-black opacity-0 transition-opacity duration-200 pointer-events-none group-hover:opacity-100`,t),children:e});ut.displayName=`DockLabel`;var dt=Object.defineProperty,ft=(e,t)=>dt(e,`name`,{value:t,configurable:!0}),pt=!!(typeof window<`u`&&window.document&&window.document.createElement);function K(e,t,{checkForDefaultPrevented:n=!0}={}){return ft(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}ft(K,`composeEventHandlers`);function mt(e){if(!pt)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}ft(mt,`getOwnerWindow`);function ht(e){if(!pt)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}ft(ht,`getOwnerDocument`);function gt(e,t=!1){let{activeElement:n}=ht(e);if(!n?.nodeName)return null;if(_t(n)&&n.contentDocument)return gt(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=ht(n).getElementById(e);if(t)return t}}return n}ft(gt,`getActiveElement`);function _t(e){return e.tagName===`IFRAME`}ft(_t,`isFrame`);function vt(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function yt(...e){return t=>{let n=!1,r=e.map(e=>{let r=vt(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():vt(e[t],null)}}}}function q(...e){return l.useCallback(yt(...e),e)}function bt(e,t=[]){let n=[];function r(t,r){let i=l.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=l.useMemo(()=>o,Object.values(o));return(0,d.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,u=o?.[e]?.[a]||i,d=l.useContext(u);if(d)return d;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>l.createContext(e));return function(n){let r=n?.[e]||t;return l.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,xt(i,...t)]}function xt(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var J=globalThis?.document?l.useLayoutEffect:()=>{},St=l.useEffectEvent,Ct=l.useInsertionEffect;function wt(e){if(typeof St==`function`)return St(e);let t=l.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof Ct==`function`?Ct(()=>{t.current=e}):J(()=>{t.current=e}),l.useMemo(()=>((...e)=>t.current?.(...e)),[])}var Tt=Object.defineProperty,Et=(e,t)=>Tt(e,`name`,{value:t,configurable:!0}),Dt=l.useInsertionEffect||J;function Ot({prop:e,defaultProp:t,onChange:n=Et(()=>{},`onChange`),caller:r}){let[i,a,o]=kt({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,l.useCallback(t=>{if(s){let n=At(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}Et(Ot,`useControllableState`);function kt({defaultProp:e,onChange:t}){let[n,r]=l.useState(e),i=l.useRef(n),a=l.useRef(t);return Dt(()=>{a.current=t},[t]),l.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}Et(kt,`useUncontrolledState`);function At(e){return typeof e==`function`}Et(At,`isFunction`);var jt=Symbol(`RADIX:SYNC_STATE`);function Mt(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,u=wt(o),d=[{...n,state:a}];r&&d.push(r);let[f,p]=l.useReducer((t,n)=>{if(n.type===jt)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&u(r.state),r},...d),m=f.state,h=l.useRef(m);l.useEffect(()=>{h.current!==m&&(h.current=m,c||u(m))},[m,h,c]);let g=l.useMemo(()=>i===void 0?f:{...f,state:i},[f,i]);return l.useEffect(()=>{c&&!Object.is(i,f.state)&&p({type:jt,state:i})},[i,f.state,c]),[g,p]}Et(Mt,`useControllableStateReducer`);function Nt(e){let t=l.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];Bt(r)&&typeof Wt==`function`&&(r=Wt(r._payload)),l.Children.forEach(r,e=>{if(Rt(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;Bt(n)&&typeof Wt==`function`&&(n=Wt(n._payload)),a=Ft(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=l.cloneElement(a,void 0,s):!o&&l.Children.count(r)===1&&l.isValidElement(r)&&(a=r);let c=a?Lt(a):void 0,u=q(n,c);if(!a){if(r||r===0)throw Error(o?Ut(e):Ht(e));return r}let d=It(i,a.props??{});return a.type!==l.Fragment&&(d.ref=n?u:c),l.cloneElement(a,d)});return t.displayName=`${e}.Slot`,t}var Pt=Symbol.for(`radix.slottable`),Ft=(e,t)=>{if(`child`in e.props){let t=e.props.child;return l.isValidElement(t)?l.cloneElement(t,void 0,e.props.children(t.props.children)):null}return l.isValidElement(t)?t:null};function It(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Lt(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Rt(e){return l.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Pt}var zt=Symbol.for(`react.lazy`);function Bt(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===zt&&`_payload`in e&&Vt(e._payload)}function Vt(e){return typeof e==`object`&&!!e&&`then`in e}var Ht=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,Ut=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,Wt=l.use,Y=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Nt(`Primitive.${t}`),r=l.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,d.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Gt(e,t){e&&f.flushSync(()=>e.dispatchEvent(t))}function Kt(e){let t=e+`CollectionProvider`,[n,r]=bt(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=l.useRef(null),a=l.useRef(new Map).current;return(0,d.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=Nt(s),u=l.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=q(t,a(s,n).collectionRef);return(0,d.jsx)(c,{ref:i,children:r})});u.displayName=s;let f=e+`CollectionItemSlot`,p=`data-radix-collection-item`,m=Nt(f),h=l.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=l.useRef(null),s=q(t,o),c=a(f,n);return l.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,d.jsx)(m,{[p]:``,ref:s,children:r})});h.displayName=f;function g(t){let n=a(e+`CollectionConsumer`,t);return l.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${p}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:u,ItemSlot:h},g,r]}var qt=l.createContext(void 0);function Jt(e){let t=l.useContext(qt);return e||t||`ltr`}function Yt(e){let t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>((...e)=>t.current?.(...e)),[])}var Xt=Object.defineProperty,X=(e,t)=>Xt(e,`name`,{value:t,configurable:!0}),Zt=`dismissableLayer.update`,Qt=`dismissableLayer.pointerDownOutside`,$t=`dismissableLayer.focusOutside`,en,tn=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),nn=l.forwardRef(X(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...u}=e,f=l.useContext(tn),[p,m]=l.useState(null),h=p?.ownerDocument??globalThis?.document,[,g]=l.useState({}),_=q(t,m),v=Array.from(f.layers),[y]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),b=y?v.indexOf(y):-1,x=p?v.indexOf(p):-1,S=f.layersWithOutsidePointerEventsDisabled.size>0,C=x>=b,w=l.useRef(!1),T=on(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:h,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:w,dismissableSurfaces:f.dismissableSurfaces,shouldHandlePointerDownOutside:l.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...f.branches].some(t=>t.contains(e));return C&&!t},[f.branches,C])}),E=sn(e=>{if(r&&w.current)return;let t=e.target;[...f.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},h),D=p?x===v.length-1:!1,O=Yt(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return l.useEffect(()=>{if(D)return h.addEventListener(`keydown`,O,{capture:!0}),()=>h.removeEventListener(`keydown`,O,{capture:!0})},[h,D,O]),l.useEffect(()=>{if(p)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(en=h.body.style.pointerEvents,h.body.style.pointerEvents=`none`),f.layersWithOutsidePointerEventsDisabled.add(p)),f.layers.add(p),cn(),()=>{n&&(f.layersWithOutsidePointerEventsDisabled.delete(p),f.layersWithOutsidePointerEventsDisabled.size===0&&(h.body.style.pointerEvents=en))}},[p,h,n,f]),l.useEffect(()=>()=>{p&&(f.layers.delete(p),f.layersWithOutsidePointerEventsDisabled.delete(p),cn())},[p,f]),l.useEffect(()=>{let e=X(()=>g({}),`handleUpdate`);return document.addEventListener(Zt,e),()=>document.removeEventListener(Zt,e)},[]),(0,d.jsx)(Y.div,{...u,ref:_,style:{pointerEvents:S?C?`auto`:`none`:void 0,...e.style},onFocusCapture:K(e.onFocusCapture,E.onFocusCapture),onBlurCapture:K(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:K(e.onPointerDownCapture,T.onPointerDownCapture)})},`DismissableLayer`));function rn(){let e=l.useContext(tn),[t,n]=l.useState(null);return l.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}X(rn,`useDismissableLayerSurface`);var an=X(()=>!0,`IS_TRUE`);function on(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=an}=t,s=Yt(e),c=l.useRef(!1),u=l.useRef(!1),d=l.useRef(new Map),f=l.useRef(()=>{});return l.useEffect(()=>{function e(){u.current=!1,i.current=!1,d.current.clear()}X(e,`resetOutsideInteraction`);function t(){return Array.from(d.current.values()).some(Boolean)}X(t,`isOutsideInteractionIntercepted`);function l(e){if(!u.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||d.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{u.current&&f.current()},0)}X(l,`handleInteractionCapture`);function p(e){u.current&&d.current.set(e.type,!1)}X(p,`handleInteractionBubble`);let m=X(a=>{if(a.target&&!c.current){let l=function(){n.removeEventListener(`click`,f.current);let r=t();e(),r||ln(Qt,s,p,{discrete:!0})};if(X(l,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,f.current),e(),c.current=!1;return}let p={originalEvent:a};u.current=!0,i.current=r&&a.button===0,d.current.clear(),!r||a.button!==0?l():(n.removeEventListener(`click`,f.current),f.current=l,n.addEventListener(`click`,f.current,{once:!0}))}else n.removeEventListener(`click`,f.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,l,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,f.current);for(let e of h)n.removeEventListener(e,l,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:X(()=>c.current=!0,`onPointerDownCapture`)}}X(on,`usePointerDownOutside`);function sn(e,t=globalThis?.document){let n=Yt(e),r=l.useRef(!1);return l.useEffect(()=>{let e=X(e=>{e.target&&!r.current&&ln($t,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:X(()=>r.current=!0,`onFocusCapture`),onBlurCapture:X(()=>r.current=!1,`onBlurCapture`)}}X(sn,`useFocusOutside`);function cn(){let e=new CustomEvent(Zt);document.dispatchEvent(e)}X(cn,`dispatchUpdate`);function ln(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Gt(i,a):i.dispatchEvent(a)}X(ln,`handleAndDispatchCustomEvent`);var un=0,dn=null;function fn(){l.useEffect(()=>{dn||={start:pn(),end:pn()};let{start:e,end:t}=dn;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),un++,()=>{un===1&&(dn?.start.remove(),dn?.end.remove(),dn=null),un=Math.max(0,un-1)}},[])}function pn(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var mn=Object.defineProperty,Z=(e,t)=>mn(e,`name`,{value:t,configurable:!0}),hn=`focusScope.autoFocusOnMount`,gn=`focusScope.autoFocusOnUnmount`,_n={bubbles:!1,cancelable:!0},vn=l.forwardRef(Z(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=l.useState(null),u=Yt(i),f=Yt(a),p=l.useRef(null),m=q(t,c),h=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let e=function(e){if(h.paused||!s)return;let t=e.target;s.contains(t)?p.current=t:Tn(p.current,{select:!0})},t=function(e){if(h.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Tn(p.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Tn(s)};Z(e,`handleFocusIn`),Z(t,`handleFocusOut`),Z(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,h.paused]),l.useEffect(()=>{if(s){En.add(h);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(hn,_n);s.addEventListener(hn,u),s.dispatchEvent(t),t.defaultPrevented||(yn(kn(xn(s)),{select:!0}),document.activeElement===e&&Tn(s))}return()=>{s.removeEventListener(hn,u),setTimeout(()=>{let t=new CustomEvent(gn,_n);s.addEventListener(gn,f),s.dispatchEvent(t),t.defaultPrevented||Tn(e??document.body,{select:!0}),s.removeEventListener(gn,f),En.remove(h)},0)}}},[s,u,f,h]);let g=l.useCallback(e=>{if(!n&&!r||h.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=bn(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Tn(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Tn(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,h.paused]);return(0,d.jsx)(Y.div,{tabIndex:-1,...o,ref:m,onKeyDown:g})},`FocusScope`));function yn(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Tn(r,{select:t}),document.activeElement!==n)return}Z(yn,`focusFirst`);function bn(e){let t=xn(e);return[Sn(t,e),Sn(t.reverse(),e)]}Z(bn,`getTabbableEdges`);function xn(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Z(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}Z(xn,`getTabbableCandidates`);function Sn(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):Cn(r,{upTo:t})))return r}Z(Sn,`findVisible`);function Cn(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}Z(Cn,`isHidden`);function wn(e){return e instanceof HTMLInputElement&&`select`in e}Z(wn,`isSelectableInput`);function Tn(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&wn(e)&&t&&e.select()}}Z(Tn,`focus`);var En=Dn();function Dn(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=On(e,t),e.unshift(t)},remove(t){e=On(e,t),e[0]?.resume()}}}Z(Dn,`createFocusScopesStack`);function On(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}Z(On,`arrayRemove`);function kn(e){return e.filter(e=>e.tagName!==`A`)}Z(kn,`removeLinks`);var An=l.useId||(()=>void 0),jn=0;function Mn(e){let[t,n]=l.useState(An());return J(()=>{e||n(e=>e??String(jn++))},[e]),e||(t?`radix-${t}`:``)}var Nn=[`top`,`right`,`bottom`,`left`],Pn=Math.min,Fn=Math.max,In=Math.round,Ln=Math.floor,Rn=e=>({x:e,y:e}),zn={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Bn(e,t,n){return Fn(e,Pn(t,n))}function Vn(e,t){return typeof e==`function`?e(t):e}function Hn(e){return e.split(`-`)[0]}function Un(e){return e.split(`-`)[1]}function Wn(e){return e===`x`?`y`:`x`}function Gn(e){return e===`y`?`height`:`width`}function Kn(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function qn(e){return Wn(Kn(e))}function Jn(e,t,n){n===void 0&&(n=!1);let r=Un(e),i=qn(e),a=Gn(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=rr(o)),[o,rr(o)]}function Yn(e){let t=rr(e);return[Xn(e),t,Xn(t)]}function Xn(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Zn=[`left`,`right`],Qn=[`right`,`left`],$n=[`top`,`bottom`],er=[`bottom`,`top`];function tr(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Qn:Zn:t?Zn:Qn;case`left`:case`right`:return t?$n:er;default:return[]}}function nr(e,t,n,r){let i=Un(e),a=tr(Hn(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Xn)))),a}function rr(e){let t=Hn(e);return zn[t]+e.slice(t.length)}function ir(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function ar(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:ir(e)}function or(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function sr(e,t,n){let{reference:r,floating:i}=e,a=Kn(t),o=qn(t),s=Gn(o),c=Hn(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Un(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function cr(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Vn(t,e),p=ar(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=or(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=or(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var lr=50,ur=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:cr},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=sr(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<lr&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=sr(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},dr=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Vn(e,t)||{};if(l==null)return{};let d=ar(u),f={x:n,y:r},p=qn(i),m=Gn(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Pn(d[_],T),D=Pn(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=Bn(E,k,O),j=!c.arrow&&Un(i)!=null&&k!==A&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,M=j?k<E?k-E:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),fr=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Vn(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Hn(r),_=Kn(o),v=Hn(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[rr(o)]:Yn(o)),x=p!==`none`;!d&&x&&b.push(...nr(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Jn(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==Kn(t))||T.every(e=>Kn(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Kn(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function pr(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function mr(e){return Nn.some(t=>e[t]>=0)}var hr=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Vn(e,t);switch(i){case`referenceHidden`:{let e=pr(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:mr(e)}}}case`escaped`:{let e=pr(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:mr(e)}}}default:return{}}}}},gr=new Set([`left`,`top`]);async function _r(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Hn(n),s=Un(n),c=Kn(n)===`y`,l=gr.has(o)?-1:1,u=a&&c?-1:1,d=Vn(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var vr=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await _r(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},yr=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Vn(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Kn(i),p=Wn(f),m=u[p],h=u[f],g=(e,t)=>Bn(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},br=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Vn(e,t),u={x:n,y:r},d=Kn(i),f=Wn(d),p=u[f],m=u[d],h=Vn(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=gr.has(Hn(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},xr=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=Vn(e,t),c=await i.detectOverflow(t,s),l=Hn(n),u=Un(n),d=Kn(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=Pn(p-c[m],g),y=Pn(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*Fn(c.left,c.right):S=p-2*Fn(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function Sr(){return typeof window<`u`}function Cr(e){return Tr(e)?(e.nodeName||``).toLowerCase():`#document`}function Q(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function wr(e){return((Tr(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Tr(e){return Sr()?e instanceof Node||e instanceof Q(e).Node:!1}function Er(e){return Sr()?e instanceof Element||e instanceof Q(e).Element:!1}function Dr(e){return Sr()?e instanceof HTMLElement||e instanceof Q(e).HTMLElement:!1}function Or(e){return!Sr()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Q(e).ShadowRoot}function kr(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Br(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Ar(e){return/^(table|td|th)$/.test(Cr(e))}function jr(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Mr=/transform|translate|scale|rotate|perspective|filter/,Nr=/paint|layout|strict|content/,Pr=e=>!!e&&e!==`none`,Fr;function Ir(e){let t=Er(e)?Br(e):e;return Pr(t.transform)||Pr(t.translate)||Pr(t.scale)||Pr(t.rotate)||Pr(t.perspective)||!Rr()&&(Pr(t.backdropFilter)||Pr(t.filter))||Mr.test(t.willChange||``)||Nr.test(t.contain||``)}function Lr(e){let t=Hr(e);for(;Dr(t)&&!zr(t);){if(Ir(t))return t;if(jr(t))return null;t=Hr(t)}return null}function Rr(){return Fr??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Fr}function zr(e){return/^(html|body|#document)$/.test(Cr(e))}function Br(e){return Q(e).getComputedStyle(e)}function Vr(e){return Er(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Hr(e){if(Cr(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Or(e)&&e.host||wr(e);return Or(t)?t.host:t}function Ur(e){let t=Hr(e);return zr(t)?(e.ownerDocument||e).body:Dr(t)&&kr(t)?t:Ur(t)}function Wr(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Ur(e),i=r===e.ownerDocument?.body,a=Q(r);if(i){let e=Gr(a);return t.concat(a,a.visualViewport||[],kr(r)?r:[],e&&n?Wr(e):[])}else return t.concat(r,Wr(r,[],n))}function Gr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Kr(e){let t=Br(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Dr(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=In(n)!==a||In(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function qr(e){return Er(e)?e:e.contextElement}function Jr(e){let t=qr(e);if(!Dr(t))return Rn(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Kr(t),o=(a?In(n.width):n.width)/r,s=(a?In(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Yr=Rn(0);function Xr(e){let t=Q(e);return!Rr()||!t.visualViewport?Yr:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Zr(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Q(e)}function Qr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=qr(e),o=Rn(1);t&&(r?Er(r)&&(o=Jr(r)):o=Jr(e));let s=Zr(a,n,r)?Xr(a):Rn(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Q(a),t=Er(r)?Q(r):r,n=e,i=Gr(n);for(;i&&t!==n;){let e=Jr(i),t=i.getBoundingClientRect(),r=Br(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Q(i),i=Gr(n)}}return or({width:u,height:d,x:c,y:l})}function $r(e,t){let n=Vr(e).scrollLeft;return t?t.left+n:Qr(wr(e)).left+n}function ei(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-$r(e,n),y:n.top+t.scrollTop}}function ti(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=wr(r),s=t?jr(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Rn(1),u=Rn(0),d=Dr(r);if((d||!a)&&((Cr(r)!==`body`||kr(o))&&(c=Vr(r)),d)){let e=Qr(r);l=Jr(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?ei(o,c):Rn(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function ni(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function ri(e){let t=Vr(e),n=e.ownerDocument.body,r=Fn(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Fn(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+$r(e),o=-t.scrollTop;return Br(n).direction===`rtl`&&(a+=Fn(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var ii=25;function ai(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Q(e),a=wr(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Rr()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if($r(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=ii&&(s-=o)}return{width:s,height:c,x:l,y:u}}function oi(e,t){let n=Qr(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Jr(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function si(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=ai(e,n,t);else if(t===`document`)r=ri(wr(e));else if(Er(t))r=oi(t,n);else{let n=Xr(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return or(r)}function ci(e,t){let n=t.get(e);if(n)return n;let r=Wr(e,[],!1).filter(e=>Er(e)&&Cr(e)!==`body`),i=null,a=Br(e).position===`fixed`,o=a?Hr(e):e;for(;Er(o)&&!zr(o);){let e=Br(o),t=Ir(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Hr(o)}return t.set(e,r),r}function li(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?jr(t)?[]:ci(t,this._c):[].concat(n),r],o=si(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=si(t,a[e],i);s=Fn(n.top,s),c=Pn(n.right,c),l=Pn(n.bottom,l),u=Fn(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function ui(e){let{width:t,height:n}=Kr(e);return{width:t,height:n}}function di(e,t,n){let r=Dr(t),i=wr(t),a=n===`fixed`,o=Qr(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Rn(0);if((r||!a)&&((Cr(t)!==`body`||kr(i))&&(s=Vr(t)),r)){let e=Qr(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=$r(i));let l=i&&!r&&!a?ei(i,s):Rn(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function fi(e){return Br(e).position===`static`}function pi(e,t){if(!Dr(e)||Br(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return wr(e)===n&&(n=n.ownerDocument.body),n}function mi(e,t){let n=Q(e);if(jr(e))return n;if(!Dr(e)){let t=Hr(e);for(;t&&!zr(t);){if(Er(t)&&!fi(t))return t;t=Hr(t)}return n}let r=pi(e,t);for(;r&&Ar(r)&&fi(r);)r=pi(r,t);return r&&zr(r)&&fi(r)&&!Ir(r)?n:r||Lr(e)||n}var hi=async function(e){let t=this.getOffsetParent||mi,n=this.getDimensions,r=await n(e.floating);return{reference:di(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function gi(e){return Br(e).direction===`rtl`}var _i={convertOffsetParentRelativeRectToViewportRelativeRect:ti,getDocumentElement:wr,getClippingRect:li,getOffsetParent:mi,getElementRects:hi,getClientRects:ni,getDimensions:ui,getScale:Jr,isElement:Er,isRTL:gi};function vi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function yi(e,t,n){let r=null,i,a=wr(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=Ln(d),h=Ln(a.clientWidth-(u+f)),g=Ln(a.clientHeight-(d+p)),_=Ln(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Fn(0,Pn(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!vi(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Q(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function bi(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=qr(e),u=i||a?[...l?Wr(l):[],...t?Wr(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?yi(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Qr(e):null;c&&g();function g(){let t=Qr(e);h&&!vi(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var xi=vr,Si=yr,Ci=fr,wi=xr,Ti=hr,Ei=dr,Di=br,Oi=(e,t,n)=>{let r=new Map,i=n??{},a={..._i,...i.platform,_c:r};return ur(e,t,{...i,platform:a})},ki=typeof document<`u`?l.useLayoutEffect:function(){};function Ai(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ai(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Ai(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function ji(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Mi(e,t){let n=ji(e);return Math.round(t*n)/n}function Ni(e){let t=l.useRef(e);return ki(()=>{t.current=e}),t}function Pi(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:u}=e,[d,p]=l.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=l.useState(r);Ai(m,r)||h(r);let[g,_]=l.useState(null),[v,y]=l.useState(null),b=l.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=l.useCallback(e=>{e!==T.current&&(T.current=e,y(e))},[]),S=a||g,C=o||v,w=l.useRef(null),T=l.useRef(null),E=l.useRef(d),D=c!=null,O=Ni(c),k=Ni(i),A=Ni(u),j=l.useCallback(()=>{if(!w.current||!T.current)return;let e={placement:t,strategy:n,middleware:m};k.current&&(e.platform=k.current),Oi(w.current,T.current,e).then(e=>{let t={...e,isPositioned:A.current!==!1};M.current&&!Ai(E.current,t)&&(E.current=t,f.flushSync(()=>{p(t)}))})},[m,t,n,k,A]);ki(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[u]);let M=l.useRef(!1);ki(()=>(M.current=!0,()=>{M.current=!1}),[]),ki(()=>{if(S&&(w.current=S),C&&(T.current=C),S&&C){if(O.current)return O.current(S,C,j);j()}},[S,C,j,O,D]);let N=l.useMemo(()=>({reference:w,floating:T,setReference:b,setFloating:x}),[b,x]),P=l.useMemo(()=>({reference:S,floating:C}),[S,C]),F=l.useMemo(()=>{let e={position:n,left:0,top:0};if(!P.floating)return e;let t=Mi(P.floating,d.x),r=Mi(P.floating,d.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...ji(P.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,P.floating,d.x,d.y]);return l.useMemo(()=>({...d,update:j,refs:N,elements:P,floatingStyles:F}),[d,j,N,P,F])}var Fi=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Ei({element:r.current,padding:i}).fn(n):r?Ei({element:r,padding:i}).fn(n):{}}}},Ii=(e,t)=>{let n=xi(e);return{name:n.name,fn:n.fn,options:[e,t]}},Li=(e,t)=>{let n=Si(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ri=(e,t)=>({fn:Di(e).fn,options:[e,t]}),zi=(e,t)=>{let n=Ci(e);return{name:n.name,fn:n.fn,options:[e,t]}},Bi=(e,t)=>{let n=wi(e);return{name:n.name,fn:n.fn,options:[e,t]}},Vi=(e,t)=>{let n=Ti(e);return{name:n.name,fn:n.fn,options:[e,t]}},Hi=(e,t)=>{let n=Fi(e);return{name:n.name,fn:n.fn,options:[e,t]}};function Ui(e){let[t,n]=l.useState(void 0);return J(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var Wi=Object.defineProperty,Gi=(e,t)=>Wi(e,`name`,{value:t,configurable:!0}),Ki=`Popper`,[qi,Ji]=bt(Ki),[Yi,Xi]=qi(Ki),Zi=Gi(e=>{let{__scopePopper:t,children:n}=e,[r,i]=l.useState(null),[a,o]=l.useState(void 0);return(0,d.jsx)(Yi,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),Qi=`PopperAnchor`,$i=l.forwardRef(Gi(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=Xi(Qi,n),o=l.useRef(null),s=a.onAnchorChange,c=q(t,l.useCallback(e=>{o.current=e,e&&s(e)},[s])),u=l.useRef(null);l.useEffect(()=>{if(!r)return;let e=u.current;u.current=r.current,e!==u.current&&s(u.current)});let f=a.placementState&&oa(a.placementState),p=f?.[0],m=f?.[1];return r?null:(0,d.jsx)(Y.div,{"data-radix-popper-side":p,"data-radix-popper-align":m,...i,ref:c})},`PopperAnchor`)),ea=`PopperContent`,[ta,na]=qi(ea),ra=l.forwardRef(Gi(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:p=`partial`,hideWhenDetached:m=!1,updatePositionStrategy:h=`optimized`,onPlaced:g,..._}=e,v=Xi(ea,n),[y,b]=l.useState(null),x=q(t,b),[S,C]=l.useState(null),w=Ui(S),T=w?.width??0,E=w?.height??0,D=r+(a===`center`?``:`-`+a),O=typeof f==`number`?f:{top:0,right:0,bottom:0,left:0,...f},k=Array.isArray(u)?u:[u],A=k.length>0,j={padding:O,boundary:k.filter(ia),altBoundary:A},{refs:M,floatingStyles:N,placement:P,isPositioned:F,middlewareData:I}=Pi({strategy:`fixed`,placement:D,whileElementsMounted:Gi((...e)=>bi(...e,{animationFrame:h===`always`}),`whileElementsMounted`),elements:{reference:v.anchor},middleware:[Ii({mainAxis:i+E,alignmentAxis:o}),c&&Li({mainAxis:!0,crossAxis:!1,limiter:p===`partial`?Ri():void 0,...j}),c&&zi({...j}),Bi({...j,apply:Gi(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),S&&Hi({element:S,padding:s}),aa({arrowWidth:T,arrowHeight:E}),m&&Vi({strategy:`referenceHidden`,...j,boundary:A?j.boundary:void 0})]}),ee=v.setPlacementState;J(()=>(ee(P),()=>{ee(void 0)}),[P,ee]);let[te,ne]=oa(P),re=Yt(g);J(()=>{F&&re?.()},[F,re]);let L=I.arrow?.x,R=I.arrow?.y,ie=I.arrow?.centerOffset!==0,[ae,z]=l.useState();return J(()=>{y&&z(window.getComputedStyle(y).zIndex)},[y]),(0,d.jsx)(`div`,{ref:M.setFloating,"data-radix-popper-content-wrapper":``,style:{...N,transform:F?N.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:ae,"--radix-popper-transform-origin":[I.transformOrigin?.x,I.transformOrigin?.y].join(` `),...I.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,d.jsx)(ta,{scope:n,placedSide:te,placedAlign:ne,onArrowChange:C,arrowX:L,arrowY:R,shouldHideArrow:ie,children:(0,d.jsx)(Y.div,{"data-side":te,"data-align":ne,..._,ref:x,style:{..._.style,animation:F?_.style?.animation:`none`}})})})},`PopperContent`));function ia(e){return e!==null}Gi(ia,`isNotNull`);var aa=Gi(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=oa(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function oa(e){let[t,n=`center`]=e.split(`-`);return[t,n]}Gi(oa,`getSideAndAlignFromPlacement`);var sa=Zi,ca=$i,la=ra,ua=Object.defineProperty,da=l.forwardRef(((e,t)=>ua(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=l.useState(!1);J(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?f.createPortal((0,d.jsx)(Y.div,{...r,ref:t}),o):null},`Portal`)),fa=Object.defineProperty,pa=(e,t)=>fa(e,`name`,{value:t,configurable:!0});function ma(e,t){return l.useReducer((e,n)=>t[e][n]??e,e)}pa(ma,`useStateMachine`);var ha=pa(e=>{let{present:t,children:n}=e,r=ga(t),i=typeof n==`function`?n({present:r.isPresent}):l.Children.only(n),a=va(r.ref,ba(i));return typeof n==`function`||r.isPresent?l.cloneElement(i,{ref:a}):null},`Presence`);function ga(e){let[t,n]=l.useState(),r=l.useRef(null),i=l.useRef(e),a=l.useRef(`none`),o=l.useRef(void 0),[s,c]=ma(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return l.useEffect(()=>{s===`mounted`?(a.current=o.current??ya(r.current),o.current=void 0):a.current=`none`},[s]),J(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=ya(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),J(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=pa(a=>{let o=ya(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=pa(e=>{e.target===t&&(a.current=ya(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:l.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=ya(t)}else r.current=null;n(e)},[])}}pa(ga,`usePresence`);function _a(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}pa(_a,`setRef`);function va(...e){let t=l.useRef(e);return t.current=e,l.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=_a(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():_a(n[e],null)}}},[])}pa(va,`useStableComposedRefs`);function ya(e){return e?.animationName||`none`}pa(ya,`getAnimationName`);function ba(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}pa(ba,`getElementRef`);var xa=!1;function Sa(){let[e,t]=l.useState(xa);return l.useEffect(()=>{xa||(xa=!0,t(!0))},[]),e}var Ca=l.useSyncExternalStore;function wa(){return()=>{}}function Ta(){return Ca(wa,()=>!0,()=>!1)}var Ea=typeof Ca==`function`?Ta:Sa,Da=Object.defineProperty,Oa=(e,t)=>Da(e,`name`,{value:t,configurable:!0}),ka=`rovingFocusGroup.onEntryFocus`,Aa={bubbles:!1,cancelable:!0},ja=`RovingFocusGroup`,[Ma,Na,Pa]=Kt(ja),[Fa,Ia]=bt(ja,[Pa]),[La,Ra]=Fa(ja),za=l.forwardRef(Oa(function(e,t){return(0,d.jsx)(Ma.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,d.jsx)(Ma.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,d.jsx)(Ba,{...e,ref:t})})})},`RovingFocusGroup`)),Ba=l.forwardRef(Oa(function(e,t){let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...p}=e,m=l.useRef(null),h=q(t,m),g=Jt(a),[_,v]=Ot({prop:o,defaultProp:s??null,onChange:c,caller:ja}),[y,b]=l.useState(!1),x=Yt(u),S=Na(n),C=l.useRef(!1),[w,T]=l.useState(0);return l.useEffect(()=>{let e=m.current;if(e)return e.addEventListener(ka,x),()=>e.removeEventListener(ka,x)},[x]),(0,d.jsx)(La,{scope:n,orientation:r,dir:g,loop:i,currentTabStopId:_,onItemFocus:l.useCallback(e=>v(e),[v]),onItemShiftTab:l.useCallback(()=>b(!0),[]),onFocusableItemAdd:l.useCallback(()=>T(e=>e+1),[]),onFocusableItemRemove:l.useCallback(()=>T(e=>e-1),[]),children:(0,d.jsx)(Y.div,{tabIndex:y||w===0?-1:0,"data-orientation":r,...p,ref:h,style:{outline:`none`,...e.style},onMouseDown:K(e.onMouseDown,()=>{C.current=!0}),onFocus:K(e.onFocus,e=>{let t=!C.current;if(e.target===e.currentTarget&&t&&!y){let t=new CustomEvent(ka,Aa);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=S().filter(e=>e.focusable);Ka([e.find(e=>e.active),e.find(e=>e.id===_),...e].filter(Boolean).map(e=>e.ref.current),f)}}C.current=!1}),onBlur:K(e.onBlur,()=>b(!1))})})},`RovingFocusGroupImpl`)),Va=`RovingFocusGroupItem`,Ha=l.forwardRef(Oa(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=Mn(),u=a||c,f=Ra(Va,n),p=f.currentTabStopId===u,m=Na(n),{onFocusableItemAdd:h,onFocusableItemRemove:g,currentTabStopId:_}=f,v=Ea();return J(()=>{if(!(!v||!r))return h(),()=>g()},[v,r,h,g]),l.useEffect(()=>{if(!(v||!r))return h(),()=>g()},[v,r,h,g]),(0,d.jsx)(Ma.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:(0,d.jsx)(Y.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...s,ref:t,onMouseDown:K(e.onMouseDown,e=>{r?f.onItemFocus(u):e.preventDefault()}),onFocus:K(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:K(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){f.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Ga(e,f.orientation,f.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=m().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=f.loop?qa(n,r+1):n.slice(r+1)}setTimeout(()=>Ka(n))}}),children:typeof o==`function`?o({isCurrentTabStop:p,hasTabStop:_!=null}):o})})},`RovingFocusGroupItem`)),Ua={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Wa(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}Oa(Wa,`getDirectionAwareKey`);function Ga(e,t,n){let r=Wa(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return Ua[r]}Oa(Ga,`getFocusIntent`);function Ka(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}Oa(Ka,`focusFirst`);function qa(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Oa(qa,`wrapArray`);var Ja=za,Ya=Ha,Xa=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Za=new WeakMap,Qa=new WeakMap,$a={},eo=0,to=function(e){return e&&(e.host||to(e.parentNode))},no=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=to(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},ro=function(e,t,n,r){var i=no(t,Array.isArray(e)?e:[e]);$a[n]||($a[n]=new WeakMap);var a=$a[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Za.get(e)||0)+1,l=(a.get(e)||0)+1;Za.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Qa.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),eo++,function(){o.forEach(function(e){var t=Za.get(e)-1,i=a.get(e)-1;Za.set(e,t),a.set(e,i),t||(Qa.has(e)||e.removeAttribute(r),Qa.delete(e)),i||e.removeAttribute(n)}),eo--,eo||(Za=new WeakMap,Za=new WeakMap,Qa=new WeakMap,$a={})}},io=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Xa(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),ro(r,i,n,`aria-hidden`)):function(){return null}},ao=function(){return ao=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ao.apply(this,arguments)};function oo(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function so(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var co=`right-scroll-bar-position`,lo=`width-before-scroll-bar`,uo=`with-scroll-bars-hidden`,fo=`--removed-body-scroll-bar-size`;function po(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function mo(e,t){var n=(0,c.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var ho=typeof window<`u`?c.useLayoutEffect:c.useEffect,go=new WeakMap;function _o(e,t){var n=mo(t||null,function(t){return e.forEach(function(e){return po(e,t)})});return ho(function(){var t=go.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||po(e,null)}),i.forEach(function(e){r.has(e)||po(e,a)})}go.set(n,e)},[e]),n}function vo(e){return e}function yo(e,t){t===void 0&&(t=vo);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function bo(e){e===void 0&&(e={});var t=yo(null);return t.options=ao({async:!0,ssr:!1},e),t}var xo=function(e){var t=e.sideCar,n=oo(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return c.createElement(r,ao({},n))};xo.isSideCarExport=!0;function So(e,t){return e.useMedium(t),xo}var Co=bo(),wo=function(){},To=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:wo,onWheelCapture:wo,onTouchMoveCapture:wo}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=oo(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=p,C=_o([n,t]),w=ao(ao({},x),i);return c.createElement(c.Fragment,null,d&&c.createElement(S,{sideCar:Co,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),o?c.cloneElement(c.Children.only(s),ao(ao({},w),{ref:C})):c.createElement(y,ao({},w,{className:l,ref:C}),s))});To.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},To.classNames={fullWidth:lo,zeroRight:co};var Eo,Do=function(){if(Eo)return Eo;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Oo(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Do();return t&&e.setAttribute(`nonce`,t),e}function ko(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ao(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var jo=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Oo())&&(ko(t,n),Ao(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Mo=function(){var e=jo();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},No=function(){var e=Mo();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Po={left:0,top:0,right:0,gap:0},Fo=function(e){return parseInt(e||``,10)||0},Io=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Fo(n),Fo(r),Fo(i)]},Lo=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Po;var t=Io(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Ro=No(),zo=`data-scroll-locked`,Bo=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
2
|
+
.${uo} {
|
|
3
3
|
overflow: hidden ${r};
|
|
4
4
|
padding-right: ${s}px ${r};
|
|
5
5
|
}
|
|
6
|
-
body[${
|
|
6
|
+
body[${zo}] {
|
|
7
7
|
overflow: hidden ${r};
|
|
8
8
|
overscroll-behavior: contain;
|
|
9
9
|
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
@@ -16,26 +16,26 @@
|
|
|
16
16
|
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
.${
|
|
19
|
+
.${co} {
|
|
20
20
|
right: ${s}px ${r};
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.${
|
|
23
|
+
.${lo} {
|
|
24
24
|
margin-right: ${s}px ${r};
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
.${
|
|
27
|
+
.${co} .${co} {
|
|
28
28
|
right: 0 ${r};
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
.${
|
|
31
|
+
.${lo} .${lo} {
|
|
32
32
|
margin-right: 0 ${r};
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
body[${
|
|
36
|
-
${
|
|
35
|
+
body[${zo}] {
|
|
36
|
+
${fo}: ${s}px;
|
|
37
37
|
}
|
|
38
|
-
`},
|
|
38
|
+
`},Vo=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Ho=function(){c.useEffect(function(){return document.body.setAttribute(zo,(Vo()+1).toString()),function(){var e=Vo()-1;e<=0?document.body.removeAttribute(zo):document.body.setAttribute(zo,e.toString())}},[])},Uo=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;Ho();var a=c.useMemo(function(){return Lo(i)},[i]);return c.createElement(Ro,{styles:Bo(a,!t,i,n?``:`!important`)})},Wo=!1;if(typeof window<`u`)try{var Go=Object.defineProperty({},"passive",{get:function(){return Wo=!0,!0}});window.addEventListener(`test`,Go,Go),window.removeEventListener(`test`,Go,Go)}catch{Wo=!1}var Ko=Wo?{passive:!1}:!1,qo=function(e){return e.tagName===`TEXTAREA`},Jo=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!qo(e)&&n[t]===`visible`)},Yo=function(e){return Jo(e,`overflowY`)},Xo=function(e){return Jo(e,`overflowX`)},Zo=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),es(e,r)){var i=ts(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Qo=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},$o=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},es=function(e,t){return e===`v`?Yo(t):Xo(t)},ts=function(e,t){return e===`v`?Qo(t):$o(t)},ns=function(e,t){return e===`h`&&t===`rtl`?-1:1},rs=function(e,t,n,r,i){var a=ns(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=ts(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&es(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},is=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},as=function(e){return[e.deltaX,e.deltaY]},os=function(e){return e&&`current`in e?e.current:e},ss=function(e,t){return e[0]===t[0]&&e[1]===t[1]},cs=function(e){return`
|
|
39
39
|
.block-interactivity-${e} {pointer-events: none;}
|
|
40
40
|
.allow-interactivity-${e} {pointer-events: all;}
|
|
41
|
-
`},Xo=0,Zo=[];function Qo(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),i=c.useState(Xo++)[0],a=c.useState(bo)[0],o=c.useRef(e);c.useEffect(function(){o.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Ja([e.lockRef.current],(e.shards||[]).map(qo),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=c.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Go(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Ro(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Ro(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Wo(h,t,e,h===`h`?s:c,!0)},[]),l=c.useCallback(function(e){var n=e;if(!(!Zo.length||Zo[Zo.length-1]!==a)){var r=`deltaY`in n?Ko(n):Go(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Jo(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(qo).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),u=c.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:$o(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=c.useCallback(function(e){n.current=Go(e),r.current=void 0},[]),f=c.useCallback(function(t){u(t.type,Ko(t),t.target,s(t,e.lockRef.current))},[]),p=c.useCallback(function(t){u(t.type,Go(t),t.target,s(t,e.lockRef.current))},[]);c.useEffect(function(){return Zo.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener(`wheel`,l,No),document.addEventListener(`touchmove`,l,No),document.addEventListener(`touchstart`,d,No),function(){Zo=Zo.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,l,No),document.removeEventListener(`touchmove`,l,No),document.removeEventListener(`touchstart`,d,No)}},[]);var m=e.removeScrollBar,h=e.inert;return c.createElement(c.Fragment,null,h?c.createElement(a,{styles:Yo(i)}):null,m?c.createElement(Ao,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function $o(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var es=co(lo,Qo),ts=c.forwardRef(function(e,t){return c.createElement(fo,Ka({},e,{ref:t,sideCar:es}))});ts.classNames=fo.classNames;var ns=[`Enter`,` `],rs=[`ArrowDown`,`PageUp`,`Home`],is=[`ArrowUp`,`PageDown`,`End`],as=[...rs,...is],os={ltr:[...ns,`ArrowRight`],rtl:[...ns,`ArrowLeft`]},ss={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},cs=`Menu`,[ls,us,ds]=Nt(cs),[fs,ps]=pt(cs,[ds,Fi,Ca]),ms=Fi(),hs=Ca(),[gs,_s]=fs(cs),[vs,ys]=fs(cs),bs=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=ms(t),[c,u]=l.useState(null),f=l.useRef(!1),p=Y(a),m=Ft(i);return l.useEffect(()=>{let e=()=>{f.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>f.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),l.useEffect(()=>{if(!n)return;let e=()=>p(!1);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,p]),(0,d.jsx)(Zi,{...s,children:(0,d.jsx)(gs,{scope:t,open:n,onOpenChange:p,content:c,onContentChange:u,children:(0,d.jsx)(vs,{scope:t,onClose:l.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:m,modal:o,children:r})})})};bs.displayName=cs;var xs=`MenuAnchor`,Ss=l.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=ms(n);return(0,d.jsx)(Qi,{...i,...r,ref:t})});Ss.displayName=xs;var Cs=`MenuPortal`,[ws,Ts]=fs(Cs,{forceMount:void 0}),Es=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=_s(Cs,t);return(0,d.jsx)(ws,{scope:t,forceMount:n,children:(0,d.jsx)(ia,{present:n||a.open,children:(0,d.jsx)(na,{asChild:!0,container:i,children:r})})})};Es.displayName=Cs;var Q=`MenuContent`,[Ds,Os]=fs(Q),ks=l.forwardRef((e,t)=>{let n=Ts(Q,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=_s(Q,e.__scopeMenu),o=ys(Q,e.__scopeMenu);return(0,d.jsx)(ls.Provider,{scope:e.__scopeMenu,children:(0,d.jsx)(ia,{present:r||a.open,children:(0,d.jsx)(ls.Slot,{scope:e.__scopeMenu,children:o.modal?(0,d.jsx)(As,{...i,ref:t}):(0,d.jsx)(js,{...i,ref:t})})})})}),As=l.forwardRef((e,t)=>{let n=_s(Q,e.__scopeMenu),r=l.useRef(null),i=q(t,r);return l.useEffect(()=>{let e=r.current;if(e)return Ga(e)},[]),(0,d.jsx)(Ns,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:K(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),js=l.forwardRef((e,t)=>{let n=_s(Q,e.__scopeMenu);return(0,d.jsx)(Ns,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Ms=bt(`MenuContent.ScrollLock`),Ns=l.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:m,onDismiss:h,disableOutsideScroll:g,..._}=e,v=_s(Q,n),y=ys(Q,n),b=ms(n),x=hs(n),S=us(n),[C,w]=l.useState(null),T=l.useRef(null),E=q(t,T,v.onContentChange),D=l.useRef(0),O=l.useRef(``),k=l.useRef(0),A=l.useRef(null),j=l.useRef(`right`),M=l.useRef(0),N=g?ts:l.Fragment,P=g?{as:Ms,allowPinchZoom:!0}:void 0,F=e=>{let t=O.current+e,n=S().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=_c(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){O.current=t,window.clearTimeout(D.current),t!==``&&(D.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};l.useEffect(()=>()=>window.clearTimeout(D.current),[]),Qt();let I=l.useCallback(e=>j.current===A.current?.side&&yc(e,A.current?.area),[]);return(0,d.jsx)(Ds,{scope:n,searchRef:O,onItemEnter:l.useCallback(e=>{I(e)&&e.preventDefault()},[I]),onItemLeave:l.useCallback(e=>{I(e)||(T.current?.focus(),w(null))},[I]),onTriggerLeave:l.useCallback(e=>{I(e)&&e.preventDefault()},[I]),pointerGraceTimerRef:k,onPointerGraceIntentChange:l.useCallback(e=>{A.current=e},[]),children:(0,d.jsx)(N,{...P,children:(0,d.jsx)(an,{asChild:!0,trapped:i,onMountAutoFocus:K(a,e=>{e.preventDefault(),T.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,d.jsx)(Ht,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:m,onDismiss:h,children:(0,d.jsx)(Fa,{asChild:!0,...x,dir:y.dir,orientation:`vertical`,loop:r,currentTabStopId:C,onCurrentTabStopIdChange:w,onEntryFocus:K(c,e=>{y.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,d.jsx)($i,{role:`menu`,"aria-orientation":`vertical`,"data-state":fc(v.open),"data-radix-menu-content":``,dir:y.dir,...b,..._,ref:E,style:{outline:`none`,..._.style},onKeyDown:K(_.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&F(e.key));let i=T.current;if(e.target!==i||!as.includes(e.key))return;e.preventDefault();let a=S().filter(e=>!e.disabled).map(e=>e.ref.current);is.includes(e.key)&&a.reverse(),hc(a)}),onBlur:K(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(D.current),O.current=``)}),onPointerMove:K(e.onPointerMove,bc(e=>{let t=e.target,n=M.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>M.current?`right`:`left`;j.current=t,M.current=e.clientX}}))})})})})})})});ks.displayName=Q;var Ps=`MenuGroup`,Fs=l.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,d.jsx)(J.div,{role:`group`,...r,ref:t})});Fs.displayName=Ps;var Is=`MenuLabel`,Ls=l.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,d.jsx)(J.div,{...r,ref:t})});Ls.displayName=Is;var Rs=`MenuItem`,zs=`menu.itemSelect`,Bs=l.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=l.useRef(null),o=ys(Rs,e.__scopeMenu),s=Os(Rs,e.__scopeMenu),c=q(t,a),u=l.useRef(!1),f=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(zs,{bubbles:!0,cancelable:!0});e.addEventListener(zs,e=>r?.(e),{once:!0}),Mt(e,t),t.defaultPrevented?u.current=!1:o.onClose()}};return(0,d.jsx)(Vs,{...i,ref:c,disabled:n,onClick:K(e.onClick,f),onPointerDown:t=>{e.onPointerDown?.(t),u.current=!0},onPointerUp:K(e.onPointerUp,e=>{u.current||e.currentTarget?.click()}),onKeyDown:K(e.onKeyDown,e=>{n||e.target!==e.currentTarget||s.searchRef.current!==``&&e.key===` `||ns.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});Bs.displayName=Rs;var Vs=l.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=Os(Rs,n),s=hs(n),c=l.useRef(null),u=q(t,c),[f,p]=l.useState(!1),[m,h]=l.useState(``);return l.useEffect(()=>{let e=c.current;e&&h((e.textContent??``).trim())},[a.children]),(0,d.jsx)(ls.ItemSlot,{scope:n,disabled:r,textValue:i??m,children:(0,d.jsx)(Ia,{asChild:!0,...s,focusable:!r,children:(0,d.jsx)(J.div,{role:`menuitem`,"data-highlighted":f?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:u,onPointerMove:K(e.onPointerMove,bc(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:K(e.onPointerLeave,bc(e=>o.onItemLeave(e))),onFocus:K(e.onFocus,()=>p(!0)),onBlur:K(e.onBlur,()=>p(!1))})})})}),Hs=`MenuCheckboxItem`,Us=l.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,d.jsx)(Zs,{scope:e.__scopeMenu,checked:n,children:(0,d.jsx)(Bs,{role:`menuitemcheckbox`,"aria-checked":pc(n)?`mixed`:n,...i,ref:t,"data-state":mc(n),onSelect:K(i.onSelect,()=>r?.(pc(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Us.displayName=Hs;var Ws=`MenuRadioGroup`,[Gs,Ks]=fs(Ws,{value:void 0,onValueChange:()=>{}}),qs=l.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=Y(r);return(0,d.jsx)(Gs,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,d.jsx)(Fs,{...i,ref:t})})});qs.displayName=Ws;var Js=`MenuRadioItem`,Ys=l.forwardRef((e,t)=>{let{value:n,...r}=e,i=Ks(Js,e.__scopeMenu),a=n===i.value;return(0,d.jsx)(Zs,{scope:e.__scopeMenu,checked:a,children:(0,d.jsx)(Bs,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":mc(a),onSelect:K(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Ys.displayName=Js;var Xs=`MenuItemIndicator`,[Zs,Qs]=fs(Xs,{checked:!1}),$s=l.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=Qs(Xs,n);return(0,d.jsx)(ia,{present:r||pc(a.checked)||a.checked===!0,children:(0,d.jsx)(J.span,{...i,ref:t,"data-state":mc(a.checked)})})});$s.displayName=Xs;var ec=`MenuSeparator`,tc=l.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,d.jsx)(J.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});tc.displayName=ec;var nc=`MenuArrow`,rc=l.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=ms(n);return(0,d.jsx)(ea,{...i,...r,ref:t})});rc.displayName=nc;var ic=`MenuSub`,[ac,oc]=fs(ic),sc=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=_s(ic,t),o=ms(t),[s,c]=l.useState(null),[u,f]=l.useState(null),p=Y(i);return l.useEffect(()=>(a.open===!1&&p(!1),()=>p(!1)),[a.open,p]),(0,d.jsx)(Zi,{...o,children:(0,d.jsx)(gs,{scope:t,open:r,onOpenChange:p,content:u,onContentChange:f,children:(0,d.jsx)(ac,{scope:t,contentId:yn(),triggerId:yn(),trigger:s,onTriggerChange:c,children:n})})})};sc.displayName=ic;var cc=`MenuSubTrigger`,lc=l.forwardRef((e,t)=>{let n=_s(cc,e.__scopeMenu),r=ys(cc,e.__scopeMenu),i=oc(cc,e.__scopeMenu),a=Os(cc,e.__scopeMenu),o=l.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,u={__scopeMenu:e.__scopeMenu},f=l.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);l.useEffect(()=>f,[f]),l.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),c(null)}},[s,c]);let p=q(t,i.onTriggerChange);return(0,d.jsx)(Ss,{asChild:!0,...u,children:(0,d.jsx)(Vs,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":n.open?i.contentId:void 0,"data-state":fc(n.open),...e,ref:p,onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:K(e.onPointerMove,bc(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:K(e.onPointerLeave,bc(e=>{f();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,c=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:c,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:K(e.onKeyDown,t=>{e.disabled||t.target!==t.currentTarget||a.searchRef.current!==``&&t.key===` `||os[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});lc.displayName=cc;var uc=`MenuSubContent`,dc=l.forwardRef((e,t)=>{let n=Ts(Q,e.__scopeMenu),{forceMount:r=n.forceMount,align:i=`start`,...a}=e,o=_s(Q,e.__scopeMenu),s=ys(Q,e.__scopeMenu),c=oc(uc,e.__scopeMenu),u=l.useRef(null),f=q(t,u);return(0,d.jsx)(ls.Provider,{scope:e.__scopeMenu,children:(0,d.jsx)(ia,{present:r||o.open,children:(0,d.jsx)(ls.Slot,{scope:e.__scopeMenu,children:(0,d.jsx)(Ns,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:f,align:i,side:s.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{s.isUsingKeyboardRef.current&&u.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:K(e.onFocusOutside,e=>{e.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:K(e.onEscapeKeyDown,e=>{s.onClose(),e.preventDefault()}),onKeyDown:K(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=ss[s.dir].includes(e.key);t&&n&&(o.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})});dc.displayName=uc;function fc(e){return e?`open`:`closed`}function pc(e){return e===`indeterminate`}function mc(e){return pc(e)?`indeterminate`:e?`checked`:`unchecked`}function hc(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function gc(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function _c(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=gc(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function vc(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function yc(e,t){return t?vc({x:e.clientX,y:e.clientY},t):!1}function bc(e){return t=>t.pointerType===`mouse`?e(t):void 0}var xc=bs,Sc=Ss,Cc=Es,wc=ks,Tc=Fs,Ec=Ls,Dc=Bs,Oc=Us,kc=qs,Ac=Ys,jc=$s,Mc=tc,Nc=rc,Pc=lc,Fc=dc,Ic=`DropdownMenu`,[Lc,Rc]=pt(Ic,[ps]),$=ps(),[zc,Bc]=Lc(Ic),Vc=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=$(t),u=l.useRef(null),[f,p]=_t({prop:i,defaultProp:a??!1,onChange:o,caller:Ic});return(0,d.jsx)(zc,{scope:t,triggerId:yn(),triggerRef:u,contentId:yn(),open:f,onOpenChange:p,onOpenToggle:l.useCallback(()=>p(e=>!e),[p]),modal:s,children:(0,d.jsx)(xc,{...c,open:f,onOpenChange:p,dir:r,modal:s,children:n})})};Vc.displayName=Ic;var Hc=`DropdownMenuTrigger`,Uc=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=Bc(Hc,n),o=$(n),s=q(t,a.triggerRef);return(0,d.jsx)(Sc,{asChild:!0,...o,children:(0,d.jsx)(J.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:K(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:K(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});Uc.displayName=Hc;var Wc=`DropdownMenuPortal`,Gc=e=>{let{__scopeDropdownMenu:t,...n}=e,r=$(t);return(0,d.jsx)(Cc,{...r,...n})};Gc.displayName=Wc;var Kc=`DropdownMenuContent`,qc=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Bc(Kc,n),a=$(n),o=l.useRef(!1);return(0,d.jsx)(wc,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:K(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:K(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});qc.displayName=Kc;var Jc=`DropdownMenuGroup`,Yc=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,d.jsx)(Tc,{...i,...r,ref:t})});Yc.displayName=Jc;var Xc=`DropdownMenuLabel`,Zc=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,d.jsx)(Ec,{...i,...r,ref:t})});Zc.displayName=Xc;var Qc=`DropdownMenuItem`,$c=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,d.jsx)(Dc,{...i,...r,ref:t})});$c.displayName=Qc;var el=`DropdownMenuCheckboxItem`,tl=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,d.jsx)(Oc,{...i,...r,ref:t})});tl.displayName=el;var nl=`DropdownMenuRadioGroup`,rl=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,d.jsx)(kc,{...i,...r,ref:t})});rl.displayName=nl;var il=`DropdownMenuRadioItem`,al=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,d.jsx)(Ac,{...i,...r,ref:t})});al.displayName=il;var ol=`DropdownMenuItemIndicator`,sl=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,d.jsx)(jc,{...i,...r,ref:t})});sl.displayName=ol;var cl=`DropdownMenuSeparator`,ll=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,d.jsx)(Mc,{...i,...r,ref:t})});ll.displayName=cl;var ul=`DropdownMenuArrow`,dl=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,d.jsx)(Nc,{...i,...r,ref:t})});dl.displayName=ul;var fl=`DropdownMenuSubTrigger`,pl=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,d.jsx)(Pc,{...i,...r,ref:t})});pl.displayName=fl;var ml=`DropdownMenuSubContent`,hl=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$(n);return(0,d.jsx)(Fc,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});hl.displayName=ml;var gl=Vc,_l=Uc,vl=Gc,yl=qc,bl=Zc,xl=$c,Sl=ll;function Cl({...e}){return(0,d.jsx)(gl,{"data-slot":`dropdown-menu`,...e})}function wl({...e}){return(0,d.jsx)(_l,{"data-slot":`dropdown-menu-trigger`,...e})}function Tl({className:e,sideOffset:t=4,...n}){return(0,d.jsx)(vl,{children:(0,d.jsx)(yl,{"data-slot":`dropdown-menu-content`,sideOffset:t,className:G(`bg-card text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-2xl border p-1 shadow-md`,e),...n})})}function El({className:e,inset:t,variant:n=`default`,...r}){return(0,d.jsx)(xl,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":n,className:G(`focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-2xl px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r})}function Dl({className:e,inset:t,...n}){return(0,d.jsx)(bl,{"data-slot":`dropdown-menu-label`,"data-inset":t,className:G(`px-2 py-1.5 text-sm font-medium data-[inset]:pl-8`,e),...n})}function Ol({className:e,...t}){return(0,d.jsx)(Sl,{"data-slot":`dropdown-menu-separator`,className:G(`bg-border -mx-1 my-1 h-px`,e),...t})}var kl=24,Al=(e,t,n)=>(0,d.jsx)(`img`,{src:e,alt:t,width:n,height:n,className:`w-full h-full`});function jl(e,t,n){return typeof e==`string`?n(e,t,kl):e}function Ml({menu:e,side:t,renderImage:n,itemIcon:r,itemLabel:i}){let a=e.triggerIcon??r,o=e.triggerLabel??i;return(0,d.jsxs)(Cl,{children:[(0,d.jsx)(wl,{asChild:!0,children:(0,d.jsxs)(lt,{className:`flex flex-col items-center gap-0.5 rounded-full transition-colors cursor-pointer bg-gray-200 dark:bg-neutral-800`,children:[o&&(0,d.jsx)(ut,{children:o}),(0,d.jsx)(ct,{children:a?jl(a,o??`menu`,n):null})]})}),(0,d.jsx)(Tl,{side:t,align:`end`,className:G(`w-56 max-h-[min(400px,70vh)] overflow-y-auto`,e.contentClassName),collisionPadding:8,children:(0,d.jsx)(Nl,{menu:e,side:t})})]})}function Nl({menu:e,side:t}){return(0,d.jsx)(d.Fragment,{children:e.renderContent({side:t,close:()=>{}})})}function Pl({dockClassName:e,side:t,items:n,renderImage:r}){return(0,d.jsx)(st,{direction:`middle`,className:e,children:n.map(e=>e.menu?(0,d.jsx)(Ml,{menu:e.menu,side:t,renderImage:r,itemIcon:e.icon,itemLabel:e.label},e.key):(0,d.jsxs)(lt,{onClick:e.onClick,className:G(`flex flex-col items-center gap-0.5 rounded-full transition-colors cursor-pointer`,e.active?`bg-primary/20 ring-2 ring-primary`:`bg-gray-200 dark:bg-neutral-800`),children:[(0,d.jsx)(ut,{children:e.label}),(0,d.jsx)(ct,{children:jl(e.icon,e.label,r)})]},e.key))})}function Fl({items:e,renderImage:t=Al,enableKeyboardShortcuts:n=!1,className:r,placements:i}){let a=i?.desktop??!0,o=i?.mobile??!0;return(0,l.useEffect)(()=>{if(!n)return;let t=t=>{if(t.altKey&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey){let n=parseInt(t.key,10);n>=1&&n<=e.length&&(t.preventDefault(),e[n-1].onClick?.())}};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[n,e]),(0,d.jsxs)(d.Fragment,{children:[a&&(0,d.jsx)(`div`,{className:G(`hidden md:block fixed top-0 left-2 z-50`,r),children:(0,d.jsx)(Pl,{dockClassName:`h-[52px] shrink-0 !mt-0 !mx-0`,side:`bottom`,items:e,renderImage:t})}),o&&(0,d.jsx)(`div`,{className:G(`md:hidden fixed bottom-0 left-0 right-0 z-50 pb-safe`,r),children:(0,d.jsx)(Pl,{dockClassName:`h-[52px] shrink-0 !mt-0 mx-auto w-max mb-2 !gap-1 !p-1`,side:`top`,items:e,renderImage:t})})]})}function Il({showAppearance:e=!0,defaultColorTheme:t=`modern-minimal`}={}){let{theme:n,setTheme:r}=(0,m.useTheme)(),[i,a]=(0,l.useState)(t),[o,s]=(0,l.useState)(null);(0,l.useEffect)(()=>{let e=localStorage.getItem(`color-theme`);e&&h.themeNames.includes(e)&&a(e)},[]);let c=e=>{a(e),localStorage.setItem(`color-theme`,e),document.cookie=`color-theme=${e}; path=/; max-age=31536000`,h.themeNames.forEach(e=>document.documentElement.classList.remove(`theme-${e}`)),document.documentElement.classList.add(`theme-${e}`),s(null)},u=e=>{s(e),h.themeNames.forEach(e=>document.documentElement.classList.remove(`theme-${e}`)),document.documentElement.classList.add(`theme-${e}`)},f=()=>{o&&(h.themeNames.forEach(e=>document.documentElement.classList.remove(`theme-${e}`)),document.documentElement.classList.add(`theme-${i}`),s(null))};return(0,d.jsxs)(d.Fragment,{children:[e&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(Dl,{children:`Appearance`}),(0,d.jsx)(Ol,{}),(0,d.jsxs)(El,{onClick:()=>r(`light`),className:`cursor-pointer py-1 h-7`,children:[(0,d.jsx)(p.Sun,{className:`mr-2 h-3.5 w-3.5`}),(0,d.jsx)(`span`,{className:`text-sm`,children:`Light`}),n===`light`&&(0,d.jsx)(`span`,{className:`ml-auto text-xs`,children:`✓`})]}),(0,d.jsxs)(El,{onClick:()=>r(`dark`),className:`cursor-pointer py-1 h-7`,children:[(0,d.jsx)(p.Moon,{className:`mr-2 h-3.5 w-3.5`}),(0,d.jsx)(`span`,{className:`text-sm`,children:`Dark`}),n===`dark`&&(0,d.jsx)(`span`,{className:`ml-auto text-xs`,children:`✓`})]}),(0,d.jsxs)(El,{onClick:()=>r(`system`),className:`cursor-pointer py-1 h-7`,children:[(0,d.jsx)(p.Monitor,{className:`mr-2 h-3.5 w-3.5`}),(0,d.jsx)(`span`,{className:`text-sm`,children:`System`}),n===`system`&&(0,d.jsx)(`span`,{className:`ml-auto text-xs`,children:`✓`})]}),(0,d.jsx)(Ol,{})]}),(0,d.jsx)(Dl,{children:`Color Theme`}),(0,d.jsxs)(`div`,{className:`text-xs text-muted-foreground px-2 py-1.5`,children:[`Current: `,(0,h.formatThemeName)(i)]}),(0,d.jsx)(Ol,{}),h.themeNames.map(e=>{let t=h.themeColors[e];return(0,d.jsx)(El,{onClick:()=>c(e),onMouseEnter:()=>u(e),onMouseLeave:f,className:G(`cursor-pointer`,i===e&&`bg-accent`),children:(0,d.jsxs)(`div`,{className:`flex items-center justify-between w-full`,children:[(0,d.jsxs)(`div`,{className:`flex items-center gap-2`,children:[t&&(0,d.jsxs)(`div`,{className:`flex gap-1`,children:[(0,d.jsx)(`div`,{className:`w-3 h-3 rounded-full border border-border`,style:{backgroundColor:t.primary}}),(0,d.jsx)(`div`,{className:`w-3 h-3 rounded-full border border-border`,style:{backgroundColor:t.secondary}})]}),(0,d.jsx)(`span`,{children:(0,h.formatThemeName)(e)})]}),i===e&&(0,d.jsx)(`span`,{className:`text-xs`,children:`✓`})]})},e)})]})}var Ll=(0,l.createContext)({categoryState:null,register:()=>{},unregister:()=>{},dockHidden:!1,toggleDock:()=>{}});function Rl({children:e}){let[t,n]=(0,l.useState)(null),[r,i]=(0,l.useState)(!1);(0,l.useEffect)(()=>{localStorage.getItem(`dock-hidden`)===`true`&&i(!0)},[]);let a=(0,l.useCallback)(()=>{i(e=>{let t=!e;return localStorage.setItem(`dock-hidden`,String(t)),t})},[]),o=(0,l.useCallback)(e=>{n(e)},[]),s=(0,l.useCallback)(()=>{n(null)},[]);return(0,d.jsx)(Ll.Provider,{value:{categoryState:t,register:o,unregister:s,dockHidden:r,toggleDock:a},children:e})}function zl(e,t){let{register:n,unregister:r}=(0,l.useContext)(Ll);(0,l.useEffect)(()=>{n({currentCategory:e,onCategoryChange:t})},[e,t,n]),(0,l.useEffect)(()=>()=>r(),[r])}function Bl(){return(0,l.useContext)(Ll).categoryState}function Vl(){let{dockHidden:e,toggleDock:t}=(0,l.useContext)(Ll);return{dockHidden:e,toggleDock:t}}exports.CategoryDock=Fl,exports.CategoryDockProvider=Rl,exports.Dock=st,exports.DockIcon=ct,exports.DockItem=lt,exports.DockLabel=ut,exports.DropdownMenuItem=El,exports.DropdownMenuSeparator=Ol,exports.ThemeMenu=Il,exports.dockVariants=ot,exports.useCategoryDock=zl,exports.useCategoryDockState=Bl,exports.useCategoryDockVisibility=Vl;
|
|
41
|
+
`},ls=0,us=[];function ds(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),i=c.useState(ls++)[0],a=c.useState(No)[0],o=c.useRef(e);c.useEffect(function(){o.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=so([e.lockRef.current],(e.shards||[]).map(os),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=c.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=is(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Zo(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Zo(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return rs(h,t,e,h===`h`?s:c,!0)},[]),l=c.useCallback(function(e){var n=e;if(!(!us.length||us[us.length-1]!==a)){var r=`deltaY`in n?as(n):is(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&ss(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(os).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),u=c.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:fs(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=c.useCallback(function(e){n.current=is(e),r.current=void 0},[]),f=c.useCallback(function(t){u(t.type,as(t),t.target,s(t,e.lockRef.current))},[]),p=c.useCallback(function(t){u(t.type,is(t),t.target,s(t,e.lockRef.current))},[]);c.useEffect(function(){return us.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener(`wheel`,l,Ko),document.addEventListener(`touchmove`,l,Ko),document.addEventListener(`touchstart`,d,Ko),function(){us=us.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,l,Ko),document.removeEventListener(`touchmove`,l,Ko),document.removeEventListener(`touchstart`,d,Ko)}},[]);var m=e.removeScrollBar,h=e.inert;return c.createElement(c.Fragment,null,h?c.createElement(a,{styles:cs(i)}):null,m?c.createElement(Uo,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function fs(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var ps=So(Co,ds),ms=c.forwardRef(function(e,t){return c.createElement(To,ao({},e,{ref:t,sideCar:ps}))});ms.classNames=To.classNames;var hs=Object.defineProperty,$=(e,t)=>hs(e,`name`,{value:t,configurable:!0}),gs=[`Enter`,` `],_s=[`ArrowDown`,`PageUp`,`Home`],vs=[`ArrowUp`,`PageDown`,`End`],ys=[..._s,...vs];[...gs],[...gs];var bs=`Menu`,[xs,Ss,Cs]=Kt(bs),[ws,Ts]=bt(bs,[Cs,Ji,Ia]),Es=Ji(),Ds=Ia(),[Os,ks]=ws(bs),[As,js]=ws(bs),Ms=$(e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=Es(t),[c,u]=l.useState(null),f=l.useRef(!1),p=Yt(a),m=Jt(i);return l.useEffect(()=>{let e=$(()=>{f.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},`handleKeyDown`),t=$(()=>f.current=!1,`handlePointer`);return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),l.useEffect(()=>{if(!n)return;let e=$(()=>p(!1),`handleBlur`);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,p]),(0,d.jsx)(sa,{...s,children:(0,d.jsx)(Os,{scope:t,open:n,onOpenChange:p,content:c,onContentChange:u,children:(0,d.jsx)(As,{scope:t,onClose:l.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:m,modal:o,children:r})})})},`Menu`),Ns=l.forwardRef($(function(e,t){let{__scopeMenu:n,...r}=e,i=Es(n);return(0,d.jsx)(ca,{...i,...r,ref:t})},`MenuAnchor`)),Ps=`MenuPortal`,[Fs,Is]=ws(Ps,{forceMount:void 0}),Ls=$(e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=ks(Ps,t);return(0,d.jsx)(Fs,{scope:t,forceMount:n,children:(0,d.jsx)(ha,{present:n||a.open,children:(0,d.jsx)(da,{asChild:!0,container:i,children:r})})})},`MenuPortal`),Rs=`MenuContent`,[zs,Bs]=ws(Rs),Vs=l.forwardRef($(function(e,t){let n=Is(Rs,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=ks(Rs,e.__scopeMenu),o=js(Rs,e.__scopeMenu);return(0,d.jsx)(xs.Provider,{scope:e.__scopeMenu,children:(0,d.jsx)(ha,{present:r||a.open,children:(0,d.jsx)(xs.Slot,{scope:e.__scopeMenu,children:o.modal?(0,d.jsx)(Hs,{...i,ref:t}):(0,d.jsx)(Us,{...i,ref:t})})})})},`MenuContent`)),Hs=l.forwardRef($(function(e,t){let n=ks(Rs,e.__scopeMenu),r=l.useRef(null),i=q(t,r);return l.useEffect(()=>{let e=r.current;if(e)return io(e)},[]),(0,d.jsx)(Gs,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:K(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentModal`)),Us=l.forwardRef($(function(e,t){let n=ks(Rs,e.__scopeMenu);return(0,d.jsx)(Gs,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentNonModal`)),Ws=Nt(`MenuContent.ScrollLock`),Gs=l.forwardRef($(function(e,t){let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:m,onDismiss:h,disableOutsideScroll:g,..._}=e,v=ks(Rs,n),y=js(Rs,n),b=Es(n),x=Ds(n),S=Ss(n),[C,w]=l.useState(null),T=l.useRef(null),E=q(t,T,v.onContentChange),D=l.useRef(0),O=l.useRef(``),k=l.useRef(0),A=l.useRef(null),j=l.useRef(`right`),M=l.useRef(0),N=g?ms:l.Fragment,P=g?{as:Ws,allowPinchZoom:!0}:void 0,F=$(e=>{let t=O.current+e,n=S().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=lc(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;$((function e(t){O.current=t,window.clearTimeout(D.current),t!==``&&(D.current=window.setTimeout(()=>e(``),1e3))}),`updateSearch`)(t),o&&setTimeout(()=>o.focus())},`handleTypeaheadSearch`);l.useEffect(()=>()=>window.clearTimeout(D.current),[]),fn();let I=l.useCallback(e=>j.current===A.current?.side&&dc(e,A.current?.area),[]);return(0,d.jsx)(zs,{scope:n,searchRef:O,onItemEnter:l.useCallback(e=>{I(e)&&e.preventDefault()},[I]),onItemLeave:l.useCallback(e=>{I(e)||(T.current?.focus(),w(null))},[I]),onTriggerLeave:l.useCallback(e=>{I(e)&&e.preventDefault()},[I]),pointerGraceTimerRef:k,onPointerGraceIntentChange:l.useCallback(e=>{A.current=e},[]),children:(0,d.jsx)(N,{...P,children:(0,d.jsx)(vn,{asChild:!0,trapped:i,onMountAutoFocus:K(a,e=>{e.preventDefault(),T.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,d.jsx)(nn,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:m,onDismiss:h,children:(0,d.jsx)(Ja,{asChild:!0,...x,dir:y.dir,orientation:`vertical`,loop:r,currentTabStopId:C,onCurrentTabStopIdChange:w,onEntryFocus:K(c,e=>{y.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,d.jsx)(la,{role:`menu`,"aria-orientation":`vertical`,"data-state":ic(v.open),"data-radix-menu-content":``,dir:y.dir,...b,..._,ref:E,style:{outline:`none`,..._.style},onKeyDown:K(_.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&F(e.key));let i=T.current;if(e.target!==i||!ys.includes(e.key))return;e.preventDefault();let a=S().filter(e=>!e.disabled).map(e=>e.ref.current);vs.includes(e.key)&&a.reverse(),sc(a)}),onBlur:K(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(D.current),O.current=``)}),onPointerMove:K(e.onPointerMove,fc(e=>{let t=e.target,n=M.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>M.current?`right`:`left`;j.current=t,M.current=e.clientX}}))})})})})})})},`MenuContentImpl`)),Ks=l.forwardRef($(function(e,t){let{__scopeMenu:n,...r}=e;return(0,d.jsx)(Y.div,{...r,ref:t})},`MenuLabel`)),qs=`MenuItem`,Js=`menu.itemSelect`,Ys=l.forwardRef($(function(e,t){let{disabled:n=!1,onSelect:r,...i}=e,a=l.useRef(null),o=js(qs,e.__scopeMenu),s=Bs(qs,e.__scopeMenu),c=q(t,a),u=l.useRef(!1),f=$(()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(Js,{bubbles:!0,cancelable:!0});e.addEventListener(Js,e=>r?.(e),{once:!0}),Gt(e,t),t.defaultPrevented?u.current=!1:o.onClose()}},`handleSelect`);return(0,d.jsx)(Xs,{...i,ref:c,disabled:n,onClick:K(e.onClick,f),onPointerDown:t=>{e.onPointerDown?.(t),u.current=!0},onPointerUp:K(e.onPointerUp,e=>{u.current||e.currentTarget?.click()}),onKeyDown:K(e.onKeyDown,e=>{n||e.target!==e.currentTarget||s.searchRef.current!==``&&e.key===` `||gs.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})},`MenuItem`)),Xs=l.forwardRef($(function(e,t){let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=Bs(qs,n),s=Ds(n),c=l.useRef(null),u=q(t,c),[f,p]=l.useState(!1),[m,h]=l.useState(``);return l.useEffect(()=>{let e=c.current;e&&h((e.textContent??``).trim())},[a.children]),(0,d.jsx)(xs.ItemSlot,{scope:n,disabled:r,textValue:i??m,children:(0,d.jsx)(Ya,{asChild:!0,...s,focusable:!r,children:(0,d.jsx)(Y.div,{role:`menuitem`,"data-highlighted":f?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:u,onPointerMove:K(e.onPointerMove,fc(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:K(e.onPointerLeave,fc(e=>o.onItemLeave(e))),onFocus:K(e.onFocus,()=>p(!0)),onBlur:K(e.onBlur,()=>p(!1))})})})},`MenuItemImpl`)),[Zs,Qs]=ws(`MenuRadioGroup`,{value:void 0,onValueChange:$(()=>{},`onValueChange`)}),[$s,ec]=ws(`MenuItemIndicator`,{checked:!1}),tc=l.forwardRef($(function(e,t){let{__scopeMenu:n,...r}=e;return(0,d.jsx)(Y.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})},`MenuSeparator`)),[nc,rc]=ws(`MenuSub`);function ic(e){return e?`open`:`closed`}$(ic,`getOpenState`);function ac(e){return e===`indeterminate`}$(ac,`isIndeterminate`);function oc(e){return ac(e)?`indeterminate`:e?`checked`:`unchecked`}$(oc,`getCheckedState`);function sc(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}$(sc,`focusFirst`);function cc(e,t){return e.map((n,r)=>e[(t+r)%e.length])}$(cc,`wrapArray`);function lc(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=cc(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}$(lc,`getNextMatch`);function uc(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}$(uc,`isPointInPolygon`);function dc(e,t){return t?uc({x:e.clientX,y:e.clientY},t):!1}$(dc,`isPointerInGraceArea`);function fc(e){return t=>t.pointerType===`mouse`?e(t):void 0}$(fc,`whenMouse`);var pc=Ms,mc=Ns,hc=Ls,gc=Vs,_c=Ks,vc=Ys,yc=tc,bc=Object.defineProperty,xc=(e,t)=>bc(e,`name`,{value:t,configurable:!0}),Sc=`DropdownMenu`,[Cc,wc]=bt(Sc,[Ts]),Tc=Ts(),[Ec,Dc]=Cc(Sc),Oc=xc(e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=Tc(t),u=l.useRef(null),[f,p]=Ot({prop:i,defaultProp:a??!1,onChange:o,caller:Sc});return(0,d.jsx)(Ec,{scope:t,triggerId:Mn(),triggerRef:u,contentId:Mn(),open:f,onOpenChange:p,onOpenToggle:l.useCallback(()=>p(e=>!e),[p]),modal:s,children:(0,d.jsx)(pc,{...c,open:f,onOpenChange:p,dir:r,modal:s,children:n})})},`DropdownMenu`),kc=`DropdownMenuTrigger`,Ac=l.forwardRef(xc(function(e,t){let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=Dc(kc,n),o=Tc(n),s=q(t,a.triggerRef);return(0,d.jsx)(mc,{asChild:!0,...o,children:(0,d.jsx)(Y.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:K(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:K(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})},`DropdownMenuTrigger`)),jc=xc(e=>{let{__scopeDropdownMenu:t,...n}=e,r=Tc(t);return(0,d.jsx)(hc,{...r,...n})},`DropdownMenuPortal`),Mc=`DropdownMenuContent`,Nc=l.forwardRef(xc(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Dc(Mc,n),a=Tc(n),o=l.useRef(!1);return(0,d.jsx)(gc,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:K(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:K(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})},`DropdownMenuContent`)),Pc=l.forwardRef(xc(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Tc(n);return(0,d.jsx)(_c,{...i,...r,ref:t})},`DropdownMenuLabel`)),Fc=l.forwardRef(xc(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Tc(n);return(0,d.jsx)(vc,{...i,...r,ref:t})},`DropdownMenuItem`)),Ic=l.forwardRef(xc(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Tc(n);return(0,d.jsx)(yc,{...i,...r,ref:t})},`DropdownMenuSeparator`)),Lc=Oc,Rc=Ac,zc=jc,Bc=Nc,Vc=Pc,Hc=Fc,Uc=Ic;function Wc({...e}){return(0,d.jsx)(Lc,{"data-slot":`dropdown-menu`,...e})}function Gc({...e}){return(0,d.jsx)(Rc,{"data-slot":`dropdown-menu-trigger`,...e})}function Kc({className:e,sideOffset:t=4,...n}){return(0,d.jsx)(zc,{children:(0,d.jsx)(Bc,{"data-slot":`dropdown-menu-content`,sideOffset:t,className:G(`bg-card text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-2xl border p-1 shadow-md`,e),...n})})}function qc({className:e,inset:t,variant:n=`default`,...r}){return(0,d.jsx)(Hc,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":n,className:G(`focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-2xl px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r})}function Jc({className:e,inset:t,...n}){return(0,d.jsx)(Vc,{"data-slot":`dropdown-menu-label`,"data-inset":t,className:G(`px-2 py-1.5 text-sm font-medium data-[inset]:pl-8`,e),...n})}function Yc({className:e,...t}){return(0,d.jsx)(Uc,{"data-slot":`dropdown-menu-separator`,className:G(`bg-border -mx-1 my-1 h-px`,e),...t})}var Xc=24,Zc=(e,t,n)=>(0,d.jsx)(`img`,{src:e,alt:t,width:n,height:n,className:`w-full h-full`});function Qc(e,t,n){return typeof e==`string`?n(e,t,Xc):e}function $c({menu:e,side:t,renderImage:n,itemIcon:r,itemLabel:i}){let a=e.triggerIcon??r,o=e.triggerLabel??i;return(0,d.jsxs)(Wc,{children:[(0,d.jsx)(Gc,{asChild:!0,children:(0,d.jsxs)(lt,{className:`flex flex-col items-center gap-0.5 rounded-full transition-colors cursor-pointer bg-gray-200 dark:bg-neutral-800`,children:[o&&(0,d.jsx)(ut,{children:o}),(0,d.jsx)(ct,{children:a?Qc(a,o??`menu`,n):null})]})}),(0,d.jsx)(Kc,{side:t,align:`end`,className:G(`w-56 max-h-[min(400px,70vh)] overflow-y-auto`,e.contentClassName),collisionPadding:8,children:(0,d.jsx)(el,{menu:e,side:t})})]})}function el({menu:e,side:t}){return(0,d.jsx)(d.Fragment,{children:e.renderContent({side:t,close:()=>{}})})}function tl({dockClassName:e,side:t,items:n,renderImage:r}){return(0,d.jsx)(st,{direction:`middle`,className:e,children:n.map(e=>e.menu?(0,d.jsx)($c,{menu:e.menu,side:t,renderImage:r,itemIcon:e.icon,itemLabel:e.label},e.key):(0,d.jsxs)(lt,{onClick:e.onClick,className:G(`flex flex-col items-center gap-0.5 rounded-full transition-colors cursor-pointer`,e.active?`bg-primary/20 ring-2 ring-primary`:`bg-gray-200 dark:bg-neutral-800`),children:[(0,d.jsx)(ut,{children:e.label}),(0,d.jsx)(ct,{children:Qc(e.icon,e.label,r)})]},e.key))})}function nl({items:e,renderImage:t=Zc,enableKeyboardShortcuts:n=!1,className:r,placements:i}){let a=i?.desktop??!0,o=i?.mobile??!0;return(0,l.useEffect)(()=>{if(!n)return;let t=t=>{if(t.altKey&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey){let n=parseInt(t.key,10);n>=1&&n<=e.length&&(t.preventDefault(),e[n-1].onClick?.())}};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[n,e]),(0,d.jsxs)(d.Fragment,{children:[a&&(0,d.jsx)(`div`,{className:G(`hidden md:block fixed top-0 left-2 z-50`,r),children:(0,d.jsx)(tl,{dockClassName:`h-[52px] shrink-0 !mt-0 !mx-0`,side:`bottom`,items:e,renderImage:t})}),o&&(0,d.jsx)(`div`,{className:G(`md:hidden fixed bottom-0 left-0 right-0 z-50 pb-safe`,r),children:(0,d.jsx)(tl,{dockClassName:`h-[52px] shrink-0 !mt-0 mx-auto w-max mb-2 !gap-1 !p-1`,side:`top`,items:e,renderImage:t})})]})}function rl({showAppearance:e=!0,defaultColorTheme:t=`modern-minimal`}={}){let{theme:n,setTheme:r}=(0,m.useTheme)(),[i,a]=(0,l.useState)(t),[o,s]=(0,l.useState)(null);(0,l.useEffect)(()=>{let e=localStorage.getItem(`color-theme`);e&&h.themeNames.includes(e)&&a(e)},[]);let c=e=>{a(e),localStorage.setItem(`color-theme`,e),document.cookie=`color-theme=${e}; path=/; max-age=31536000`,h.themeNames.forEach(e=>document.documentElement.classList.remove(`theme-${e}`)),document.documentElement.classList.add(`theme-${e}`),s(null)},u=e=>{s(e),h.themeNames.forEach(e=>document.documentElement.classList.remove(`theme-${e}`)),document.documentElement.classList.add(`theme-${e}`)},f=()=>{o&&(h.themeNames.forEach(e=>document.documentElement.classList.remove(`theme-${e}`)),document.documentElement.classList.add(`theme-${i}`),s(null))};return(0,d.jsxs)(d.Fragment,{children:[e&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(Jc,{children:`Appearance`}),(0,d.jsx)(Yc,{}),(0,d.jsxs)(qc,{onClick:()=>r(`light`),className:`cursor-pointer py-1 h-7`,children:[(0,d.jsx)(p.Sun,{className:`mr-2 h-3.5 w-3.5`}),(0,d.jsx)(`span`,{className:`text-sm`,children:`Light`}),n===`light`&&(0,d.jsx)(`span`,{className:`ml-auto text-xs`,children:`✓`})]}),(0,d.jsxs)(qc,{onClick:()=>r(`dark`),className:`cursor-pointer py-1 h-7`,children:[(0,d.jsx)(p.Moon,{className:`mr-2 h-3.5 w-3.5`}),(0,d.jsx)(`span`,{className:`text-sm`,children:`Dark`}),n===`dark`&&(0,d.jsx)(`span`,{className:`ml-auto text-xs`,children:`✓`})]}),(0,d.jsxs)(qc,{onClick:()=>r(`system`),className:`cursor-pointer py-1 h-7`,children:[(0,d.jsx)(p.Monitor,{className:`mr-2 h-3.5 w-3.5`}),(0,d.jsx)(`span`,{className:`text-sm`,children:`System`}),n===`system`&&(0,d.jsx)(`span`,{className:`ml-auto text-xs`,children:`✓`})]}),(0,d.jsx)(Yc,{})]}),(0,d.jsx)(Jc,{children:`Color Theme`}),(0,d.jsxs)(`div`,{className:`text-xs text-muted-foreground px-2 py-1.5`,children:[`Current: `,(0,h.formatThemeName)(i)]}),(0,d.jsx)(Yc,{}),h.themeNames.map(e=>{let t=h.themeColors[e];return(0,d.jsx)(qc,{onClick:()=>c(e),onMouseEnter:()=>u(e),onMouseLeave:f,className:G(`cursor-pointer`,i===e&&`bg-accent`),children:(0,d.jsxs)(`div`,{className:`flex items-center justify-between w-full`,children:[(0,d.jsxs)(`div`,{className:`flex items-center gap-2`,children:[t&&(0,d.jsxs)(`div`,{className:`flex gap-1`,children:[(0,d.jsx)(`div`,{className:`w-3 h-3 rounded-full border border-border`,style:{backgroundColor:t.primary}}),(0,d.jsx)(`div`,{className:`w-3 h-3 rounded-full border border-border`,style:{backgroundColor:t.secondary}})]}),(0,d.jsx)(`span`,{children:(0,h.formatThemeName)(e)})]}),i===e&&(0,d.jsx)(`span`,{className:`text-xs`,children:`✓`})]})},e)})]})}var il=(0,l.createContext)({categoryState:null,register:()=>{},unregister:()=>{},dockHidden:!1,toggleDock:()=>{}});function al({children:e}){let[t,n]=(0,l.useState)(null),[r,i]=(0,l.useState)(!1);(0,l.useEffect)(()=>{localStorage.getItem(`dock-hidden`)===`true`&&i(!0)},[]);let a=(0,l.useCallback)(()=>{i(e=>{let t=!e;return localStorage.setItem(`dock-hidden`,String(t)),t})},[]),o=(0,l.useCallback)(e=>{n(e)},[]),s=(0,l.useCallback)(()=>{n(null)},[]);return(0,d.jsx)(il.Provider,{value:{categoryState:t,register:o,unregister:s,dockHidden:r,toggleDock:a},children:e})}function ol(e,t){let{register:n,unregister:r}=(0,l.useContext)(il);(0,l.useEffect)(()=>{n({currentCategory:e,onCategoryChange:t})},[e,t,n]),(0,l.useEffect)(()=>()=>r(),[r])}function sl(){return(0,l.useContext)(il).categoryState}function cl(){let{dockHidden:e,toggleDock:t}=(0,l.useContext)(il);return{dockHidden:e,toggleDock:t}}exports.CategoryDock=nl,exports.CategoryDockProvider=al,exports.Dock=st,exports.DockIcon=ct,exports.DockItem=lt,exports.DockLabel=ut,exports.DropdownMenuItem=qc,exports.DropdownMenuSeparator=Yc,exports.ThemeMenu=rl,exports.dockVariants=ot,exports.useCategoryDock=ol,exports.useCategoryDockState=sl,exports.useCategoryDockVisibility=cl;
|