@swopstar/react-ui 0.2606.1
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/README.md +100 -0
- package/dist/index.cjs +194 -0
- package/dist/index.d.ts +734 -0
- package/dist/index.js +29532 -0
- package/dist/style.css +4 -0
- package/package.json +75 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
"use strict";var tS=Object.defineProperty;var Tf=e=>{throw TypeError(e)};var nS=(e,t,n)=>t in e?tS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var lt=(e,t,n)=>nS(e,typeof t!="symbol"?t+"":t,n),If=(e,t,n)=>t.has(e)||Tf("Cannot "+n);var Qo=(e,t,n)=>(If(e,t,"read from private field"),n?n.call(e):t.get(e)),_f=(e,t,n)=>t.has(e)?Tf("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Of=(e,t,n,r)=>(If(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),P=require("react"),th=require("react-dom");function nh(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const f=nh(P),jn=nh(th),rh=(e,t)=>{if(typeof e=="number"){if(t===3)return{mode:"rgb",r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|e&240)/255,b:(e&15|e<<4&240)/255};if(t===4)return{mode:"rgb",r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|e&240)/255,alpha:(e&15|e<<4&240)/255};if(t===6)return{mode:"rgb",r:(e>>16&255)/255,g:(e>>8&255)/255,b:(e&255)/255};if(t===8)return{mode:"rgb",r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(e&255)/255}}},rS={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},oS=e=>rh(rS[e.toLowerCase()],6),aS=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,sS=e=>{let t;return(t=e.match(aS))?rh(parseInt(t[1],16),t[1].length):void 0},dr="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",fa=`${dr}%`,vu=`(?:${dr}%|${dr})`,iS=`(?:${dr}(deg|grad|rad|turn)|${dr})`,Oo="\\s*,\\s*",lS=new RegExp(`^rgba?\\(\\s*${dr}${Oo}${dr}${Oo}${dr}\\s*(?:,\\s*${vu}\\s*)?\\)$`),cS=new RegExp(`^rgba?\\(\\s*${fa}${Oo}${fa}${Oo}${fa}\\s*(?:,\\s*${vu}\\s*)?\\)$`),uS=e=>{let t={mode:"rgb"},n;if(n=e.match(lS))n[1]!==void 0&&(t.r=n[1]/255),n[2]!==void 0&&(t.g=n[2]/255),n[3]!==void 0&&(t.b=n[3]/255);else if(n=e.match(cS))n[1]!==void 0&&(t.r=n[1]/100),n[2]!==void 0&&(t.g=n[2]/100),n[3]!==void 0&&(t.b=n[3]/100);else return;return n[4]!==void 0?t.alpha=Math.max(0,Math.min(1,n[4]/100)):n[5]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+n[5]))),t},ha=(e,t)=>e===void 0?void 0:typeof e!="object"?ih(e):e.mode!==void 0?e:t?{...e,mode:t}:void 0,Hr=(e="rgb")=>t=>(t=ha(t,e))!==void 0?t.mode===e?t:Tn[t.mode][e]?Tn[t.mode][e](t):e==="rgb"?Tn[t.mode].rgb(t):Tn.rgb[e](Tn[t.mode].rgb(t)):void 0,Tn={},oh={},Fs=[],ah={},dS=e=>e,Je=e=>(Tn[e.mode]={...Tn[e.mode],...e.toMode},Object.keys(e.fromMode||{}).forEach(t=>{Tn[t]||(Tn[t]={}),Tn[t][e.mode]=e.fromMode[t]}),e.ranges||(e.ranges={}),e.difference||(e.difference={}),e.channels.forEach(t=>{if(e.ranges[t]===void 0&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw new Error(`Missing interpolator for: ${t}`);typeof e.interpolate[t]=="function"&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=dS)}),oh[e.mode]=e,(e.parse||[]).forEach(t=>{fS(t,e.mode)}),Hr(e.mode)),Ia=e=>oh[e],fS=(e,t)=>{if(typeof e=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");ah[e]=t}else typeof e=="function"&&Fs.indexOf(e)<0&&Fs.push(e)},Ac=/[^\x00-\x7F]|[a-zA-Z_]/,pS=/[^\x00-\x7F]|[-\w]/,ne={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"};let ze=0;function ls(e){let t=e[ze],n=e[ze+1];return t==="-"||t==="+"?/\d/.test(n)||n==="."&&/\d/.test(e[ze+2]):t==="."?/\d/.test(n):/\d/.test(t)}function jc(e){if(ze>=e.length)return!1;let t=e[ze];if(Ac.test(t))return!0;if(t==="-"){if(e.length-ze<2)return!1;let n=e[ze+1];return!!(n==="-"||Ac.test(n))}return!1}const mS={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function Jo(e){let t="";if((e[ze]==="-"||e[ze]==="+")&&(t+=e[ze++]),t+=cs(e),e[ze]==="."&&/\d/.test(e[ze+1])&&(t+=e[ze++]+cs(e)),(e[ze]==="e"||e[ze]==="E")&&((e[ze+1]==="-"||e[ze+1]==="+")&&/\d/.test(e[ze+2])?t+=e[ze++]+e[ze++]+cs(e):/\d/.test(e[ze+1])&&(t+=e[ze++]+cs(e))),jc(e)){let n=Vs(e);return n==="deg"||n==="rad"||n==="turn"||n==="grad"?{type:ne.Hue,value:t*mS[n]}:void 0}return e[ze]==="%"?(ze++,{type:ne.Percentage,value:+t}):{type:ne.Number,value:+t}}function cs(e){let t="";for(;/\d/.test(e[ze]);)t+=e[ze++];return t}function Vs(e){let t="";for(;ze<e.length&&pS.test(e[ze]);)t+=e[ze++];return t}function hS(e){let t=Vs(e);return e[ze]==="("?(ze++,{type:ne.Function,value:t}):t==="none"?{type:ne.None,value:void 0}:{type:ne.Ident,value:t}}function gS(e=""){let t=e.trim(),n=[],r;for(ze=0;ze<t.length;){if(r=t[ze++],r===`
|
|
2
|
+
`||r===" "||r===" "){for(;ze<t.length&&(t[ze]===`
|
|
3
|
+
`||t[ze]===" "||t[ze]===" ");)ze++;continue}if(r===",")return;if(r===")"){n.push({type:ne.ParenClose});continue}if(r==="+"){if(ze--,ls(t)){n.push(Jo(t));continue}return}if(r==="-"){if(ze--,ls(t)){n.push(Jo(t));continue}if(jc(t)){n.push({type:ne.Ident,value:Vs(t)});continue}return}if(r==="."){if(ze--,ls(t)){n.push(Jo(t));continue}return}if(r==="/"){for(;ze<t.length&&(t[ze]===`
|
|
4
|
+
`||t[ze]===" "||t[ze]===" ");)ze++;let o;if(ls(t)&&(o=Jo(t),o.type!==ne.Hue)){n.push({type:ne.Alpha,value:o});continue}if(jc(t)&&Vs(t)==="none"){n.push({type:ne.Alpha,value:{type:ne.None,value:void 0}});continue}return}if(/\d/.test(r)){ze--,n.push(Jo(t));continue}if(Ac.test(r)){ze--,n.push(hS(t));continue}return}return n}function bS(e){e._i=0;let t=e[e._i++];if(!t||t.type!==ne.Function||t.value!=="color"||(t=e[e._i++],t.type!==ne.Ident))return;const n=ah[t.value];if(!n)return;const r={mode:n},o=sh(e,!1);if(!o)return;const a=Ia(n).channels;for(let s=0,i,l;s<a.length;s++)i=o[s],l=a[s],i.type!==ne.None&&(r[l]=i.type===ne.Number?i.value:i.value/100,l==="alpha"&&(r[l]=Math.max(0,Math.min(1,r[l]))));return r}function sh(e,t){const n=[];let r;for(;e._i<e.length;){if(r=e[e._i++],r.type===ne.None||r.type===ne.Number||r.type===ne.Alpha||r.type===ne.Percentage||t&&r.type===ne.Hue){n.push(r);continue}if(r.type===ne.ParenClose){if(e._i<e.length)return;continue}return}if(!(n.length<3||n.length>4)){if(n.length===4){if(n[3].type!==ne.Alpha)return;n[3]=n[3].value}return n.length===3&&n.push({type:ne.None,value:void 0}),n.every(o=>o.type!==ne.Alpha)?n:void 0}}function vS(e,t){e._i=0;let n=e[e._i++];if(!n||n.type!==ne.Function)return;let r=sh(e,t);if(r)return r.unshift(n.value),r}const ih=e=>{if(typeof e!="string")return;const t=gS(e),n=t?vS(t,!0):void 0;let r,o=0,a=Fs.length;for(;o<a;)if((r=Fs[o++](e,n))!==void 0)return r;return t?bS(t):void 0};function xS(e,t){if(!t||t[0]!=="rgb"&&t[0]!=="rgba")return;const n={mode:"rgb"},[,r,o,a,s]=t;if(!(r.type===ne.Hue||o.type===ne.Hue||a.type===ne.Hue))return r.type!==ne.None&&(n.r=r.type===ne.Number?r.value/255:r.value/100),o.type!==ne.None&&(n.g=o.type===ne.Number?o.value/255:o.value/100),a.type!==ne.None&&(n.b=a.type===ne.Number?a.value/255:a.value/100),s.type!==ne.None&&(n.alpha=Math.min(1,Math.max(0,s.type===ne.Number?s.value:s.value/100))),n}const yS=e=>e==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,wS=(e,t,n)=>e+n*(t-e),CS=e=>{let t=[];for(let n=0;n<e.length-1;n++){let r=e[n],o=e[n+1];r===void 0&&o===void 0?t.push(void 0):r!==void 0&&o!==void 0?t.push([r,o]):t.push(r!==void 0?[r,r]:[o,o])}return t},SS=e=>t=>{let n=CS(t);return r=>{let o=r*n.length,a=r>=1?n.length-1:Math.max(Math.floor(o),0),s=n[a];return s===void 0?void 0:e(s[0],s[1],o-a)}},ue=SS(wS),Tt=e=>{let t=!1,n=e.map(r=>r!==void 0?(t=!0,r):1);return t?n:e},Vo={mode:"rgb",channels:["r","g","b","alpha"],parse:[xS,sS,uS,oS,yS,"srgb"],serialize:"srgb",interpolate:{r:ue,g:ue,b:ue,alpha:{use:ue,fixup:Tt}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},_l=(e=0)=>Math.pow(Math.abs(e),563/256)*Math.sign(e),Df=e=>{let t=_l(e.r),n=_l(e.g),r=_l(e.b),o={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*n+.1882286462349947*r,y:.297344975250536*t+.6273635662554661*n+.0752914584939979*r,z:.0270313613864123*t+.0706888525358272*n+.9913375368376386*r};return e.alpha!==void 0&&(o.alpha=e.alpha),o},Ol=e=>Math.pow(Math.abs(e),256/563)*Math.sign(e),Af=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o={mode:"a98",r:Ol(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*n),g:Ol(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*n),b:Ol(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*n)};return r!==void 0&&(o.alpha=r),o},Dl=(e=0)=>{const t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},Wo=({r:e,g:t,b:n,alpha:r})=>{let o={mode:"lrgb",r:Dl(e),g:Dl(t),b:Dl(n)};return r!==void 0&&(o.alpha=r),o},Jr=e=>{let{r:t,g:n,b:r,alpha:o}=Wo(e),a={mode:"xyz65",x:.4123907992659593*t+.357584339383878*n+.1804807884018343*r,y:.2126390058715102*t+.715168678767756*n+.0721923153607337*r,z:.0193308187155918*t+.119194779794626*n+.9505321522496607*r};return o!==void 0&&(a.alpha=o),a},Al=(e=0)=>{const t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,1/2.4)-.055):e*12.92},Bo=({r:e,g:t,b:n,alpha:r},o="rgb")=>{let a={mode:o,r:Al(e),g:Al(t),b:Al(n)};return r!==void 0&&(a.alpha=r),a},eo=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=Bo({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*n,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*n,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*n});return r!==void 0&&(o.alpha=r),o},ES={...Vo,mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>Af(Jr(e)),xyz65:Af},toMode:{rgb:e=>eo(Df(e)),xyz65:Df}},Ot=e=>(e=e%360)<0?e+360:e,MS=(e,t)=>e.map((n,r,o)=>{if(n===void 0)return n;let a=Ot(n);return r===0||e[r-1]===void 0?a:t(a-Ot(o[r-1]))}).reduce((n,r)=>!n.length||r===void 0||n[n.length-1]===void 0?(n.push(r),n):(n.push(r+n[n.length-1]),n),[]),Jn=e=>MS(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t)),_t=[-.14861,1.78277,-.29227,-.90649,1.97294,0],RS=Math.PI/180,kS=180/Math.PI;let jf=_t[3]*_t[4],zf=_t[1]*_t[4],$f=_t[1]*_t[2]-_t[0]*_t[3];const PS=({r:e,g:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=($f*n+e*jf-t*zf)/($f+jf-zf),a=n-o,s=(_t[4]*(t-o)-_t[2]*a)/_t[3],i={mode:"cubehelix",l:o,s:o===0||o===1?void 0:Math.sqrt(a*a+s*s)/(_t[4]*o*(1-o))};return i.s&&(i.h=Math.atan2(s,a)*kS-120),r!==void 0&&(i.alpha=r),i},NS=({h:e,s:t,l:n,alpha:r})=>{let o={mode:"rgb"};e=(e===void 0?0:e+120)*RS,n===void 0&&(n=0);let a=t===void 0?0:t*n*(1-n),s=Math.cos(e),i=Math.sin(e);return o.r=n+a*(_t[0]*s+_t[1]*i),o.g=n+a*(_t[2]*s+_t[3]*i),o.b=n+a*(_t[4]*s+_t[5]*i),r!==void 0&&(o.alpha=r),o},hi=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let n=Ot(e.h),r=Ot(t.h),o=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*o},TS=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let n=Ot(e.h),r=Ot(t.h);return Math.abs(r-n)>180?n-(r-360*Math.sign(r-n)):r-n},gi=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let n=Ot(e.h),r=Ot(t.h),o=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*o},er=e=>{let t=e.reduce((r,o)=>{if(o!==void 0){let a=o*Math.PI/180;r.sin+=Math.sin(a),r.cos+=Math.cos(a)}return r},{sin:0,cos:0}),n=Math.atan2(t.sin,t.cos)*180/Math.PI;return n<0?360+n:n},IS={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:PS},toMode:{rgb:NS},interpolate:{h:{use:ue,fixup:Jn},s:ue,l:ue,alpha:{use:ue,fixup:Tt}},difference:{h:hi},average:{h:er}},gr=({l:e,a:t,b:n,alpha:r},o="lch")=>{t===void 0&&(t=0),n===void 0&&(n=0);let a=Math.sqrt(t*t+n*n),s={mode:o,l:e,c:a};return a&&(s.h=Ot(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(s.alpha=r),s},br=({l:e,c:t,h:n,alpha:r},o="lab")=>{n===void 0&&(n=0);let a={mode:o,l:e,a:t?t*Math.cos(n/180*Math.PI):0,b:t?t*Math.sin(n/180*Math.PI):0};return r!==void 0&&(a.alpha=r),a},lh=Math.pow(29,3)/Math.pow(3,3),ch=Math.pow(6,3)/Math.pow(29,3),St={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},Mo={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329};let jl=e=>Math.pow(e,3)>ch?Math.pow(e,3):(116*e-16)/lh;const uh=({l:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=(e+16)/116,a=t/500+o,s=o-n/200,i={mode:"xyz65",x:jl(a)*Mo.X,y:jl(o)*Mo.Y,z:jl(s)*Mo.Z};return r!==void 0&&(i.alpha=r),i},bi=e=>eo(uh(e)),zl=e=>e>ch?Math.cbrt(e):(lh*e+16)/116,dh=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=zl(e/Mo.X),a=zl(t/Mo.Y),s=zl(n/Mo.Z),i={mode:"lab65",l:116*a-16,a:500*(o-a),b:200*(a-s)};return r!==void 0&&(i.alpha=r),i},vi=e=>{let t=dh(Jr(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},Ws=1,fh=1,ga=26/180*Math.PI,Bs=Math.cos(ga),Hs=Math.sin(ga),ph=100/Math.log(139/100),zc=({l:e,c:t,h:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o={mode:"lab65",l:(Math.exp(e*Ws/ph)-1)/.0039},a=(Math.exp(.0435*t*fh*Ws)-1)/.075,s=a*Math.cos(n/180*Math.PI-ga),i=a*Math.sin(n/180*Math.PI-ga);return o.a=s*Bs-i/.83*Hs,o.b=s*Hs+i/.83*Bs,r!==void 0&&(o.alpha=r),o},$c=({l:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=t*Bs+n*Hs,a=.83*(n*Bs-t*Hs),s=Math.sqrt(o*o+a*a),i={mode:"dlch",l:ph/Ws*Math.log(1+.0039*e),c:Math.log(1+.075*s)/(.0435*fh*Ws)};return i.c&&(i.h=Ot((Math.atan2(a,o)+ga)/Math.PI*180)),r!==void 0&&(i.alpha=r),i},Lf=e=>zc(gr(e,"dlch")),Ff=e=>br($c(e),"dlab"),_S={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:Lf,rgb:e=>bi(Lf(e))},fromMode:{lab65:Ff,rgb:e=>Ff(vi(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:ue,a:ue,b:ue,alpha:{use:ue,fixup:Tt}}},OS={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:zc,dlab:e=>br(e,"dlab"),rgb:e=>bi(zc(e))},fromMode:{lab65:$c,dlab:e=>gr(e,"dlch"),rgb:e=>$c(vi(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:ue,c:ue,h:{use:ue,fixup:Jn},alpha:{use:ue,fixup:Tt}},difference:{h:gi},average:{h:er}};function DS({h:e,s:t,i:n,alpha:r}){e=Ot(e!==void 0?e:0),t===void 0&&(t=0),n===void 0&&(n=0);let o=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r:n*(1+t*(3/(2-o)-1)),g:n*(1+t*(3*(1-o)/(2-o)-1)),b:n*(1-t)};break;case 1:a={r:n*(1+t*(3*(1-o)/(2-o)-1)),g:n*(1+t*(3/(2-o)-1)),b:n*(1-t)};break;case 2:a={r:n*(1-t),g:n*(1+t*(3/(2-o)-1)),b:n*(1+t*(3*(1-o)/(2-o)-1))};break;case 3:a={r:n*(1-t),g:n*(1+t*(3*(1-o)/(2-o)-1)),b:n*(1+t*(3/(2-o)-1))};break;case 4:a={r:n*(1+t*(3*(1-o)/(2-o)-1)),g:n*(1-t),b:n*(1+t*(3/(2-o)-1))};break;case 5:a={r:n*(1+t*(3/(2-o)-1)),g:n*(1-t),b:n*(1+t*(3*(1-o)/(2-o)-1))};break;default:a={r:n*(1-t),g:n*(1-t),b:n*(1-t)}}return a.mode="rgb",r!==void 0&&(a.alpha=r),a}function AS({r:e,g:t,b:n,alpha:r}){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=Math.max(e,t,n),a=Math.min(e,t,n),s={mode:"hsi",s:e+t+n===0?0:1-3*a/(e+t+n),i:(e+t+n)/3};return o-a!==0&&(s.h=(o===e?(t-n)/(o-a)+(t<n)*6:o===t?(n-e)/(o-a)+2:(e-t)/(o-a)+4)*60),r!==void 0&&(s.alpha=r),s}const jS={mode:"hsi",toMode:{rgb:DS},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:AS},channels:["h","s","i","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:ue,fixup:Jn},s:ue,i:ue,alpha:{use:ue,fixup:Tt}},difference:{h:hi},average:{h:er}};function zS({h:e,s:t,l:n,alpha:r}){e=Ot(e!==void 0?e:0),t===void 0&&(t=0),n===void 0&&(n=0);let o=n+t*(n<.5?n:1-n),a=o-(o-n)*2*Math.abs(e/60%2-1),s;switch(Math.floor(e/60)){case 0:s={r:o,g:a,b:2*n-o};break;case 1:s={r:a,g:o,b:2*n-o};break;case 2:s={r:2*n-o,g:o,b:a};break;case 3:s={r:2*n-o,g:a,b:o};break;case 4:s={r:a,g:2*n-o,b:o};break;case 5:s={r:o,g:2*n-o,b:a};break;default:s={r:2*n-o,g:2*n-o,b:2*n-o}}return s.mode="rgb",r!==void 0&&(s.alpha=r),s}function $S({r:e,g:t,b:n,alpha:r}){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=Math.max(e,t,n),a=Math.min(e,t,n),s={mode:"hsl",s:o===a?0:(o-a)/(1-Math.abs(o+a-1)),l:.5*(o+a)};return o-a!==0&&(s.h=(o===e?(t-n)/(o-a)+(t<n)*6:o===t?(n-e)/(o-a)+2:(e-t)/(o-a)+4)*60),r!==void 0&&(s.alpha=r),s}const LS=(e,t)=>{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return e*360}},FS=new RegExp(`^hsla?\\(\\s*${iS}${Oo}${fa}${Oo}${fa}\\s*(?:,\\s*${vu}\\s*)?\\)$`),VS=e=>{let t=e.match(FS);if(!t)return;let n={mode:"hsl"};return t[3]!==void 0?n.h=+t[3]:t[1]!==void 0&&t[2]!==void 0&&(n.h=LS(t[1],t[2])),t[4]!==void 0&&(n.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(n.l=Math.min(Math.max(0,t[5]/100),1)),t[6]!==void 0?n.alpha=Math.max(0,Math.min(1,t[6]/100)):t[7]!==void 0&&(n.alpha=Math.max(0,Math.min(1,+t[7]))),n};function WS(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;const n={mode:"hsl"},[,r,o,a,s]=t;if(r.type!==ne.None){if(r.type===ne.Percentage)return;n.h=r.value}if(o.type!==ne.None){if(o.type===ne.Hue)return;n.s=o.value/100}if(a.type!==ne.None){if(a.type===ne.Hue)return;n.l=a.value/100}return s.type!==ne.None&&(n.alpha=Math.min(1,Math.max(0,s.type===ne.Number?s.value:s.value/100))),n}const mh={mode:"hsl",toMode:{rgb:zS},fromMode:{rgb:$S},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[WS,VS],serialize:e=>`hsl(${e.h!==void 0?e.h:"none"} ${e.s!==void 0?e.s*100+"%":"none"} ${e.l!==void 0?e.l*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:ue,fixup:Jn},s:ue,l:ue,alpha:{use:ue,fixup:Tt}},difference:{h:hi},average:{h:er}};function hh({h:e,s:t,v:n,alpha:r}){e=Ot(e!==void 0?e:0),t===void 0&&(t=0),n===void 0&&(n=0);let o=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r:n,g:n*(1-t*o),b:n*(1-t)};break;case 1:a={r:n*(1-t*o),g:n,b:n*(1-t)};break;case 2:a={r:n*(1-t),g:n,b:n*(1-t*o)};break;case 3:a={r:n*(1-t),g:n*(1-t*o),b:n};break;case 4:a={r:n*(1-t*o),g:n*(1-t),b:n};break;case 5:a={r:n,g:n*(1-t),b:n*(1-t*o)};break;default:a={r:n*(1-t),g:n*(1-t),b:n*(1-t)}}return a.mode="rgb",r!==void 0&&(a.alpha=r),a}function gh({r:e,g:t,b:n,alpha:r}){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=Math.max(e,t,n),a=Math.min(e,t,n),s={mode:"hsv",s:o===0?0:1-a/o,v:o};return o-a!==0&&(s.h=(o===e?(t-n)/(o-a)+(t<n)*6:o===t?(n-e)/(o-a)+2:(e-t)/(o-a)+4)*60),r!==void 0&&(s.alpha=r),s}const bh={mode:"hsv",toMode:{rgb:hh},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:gh},channels:["h","s","v","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:ue,fixup:Jn},s:ue,v:ue,alpha:{use:ue,fixup:Tt}},difference:{h:hi},average:{h:er}};function BS({h:e,w:t,b:n,alpha:r}){if(t===void 0&&(t=0),n===void 0&&(n=0),t+n>1){let o=t+n;t/=o,n/=o}return hh({h:e,s:n===1?1:1-t/(1-n),v:1-n,alpha:r})}function HS(e){let t=gh(e);if(t===void 0)return;let n=t.s!==void 0?t.s:0,r=t.v!==void 0?t.v:0,o={mode:"hwb",w:(1-n)*r,b:1-r};return t.h!==void 0&&(o.h=t.h),t.alpha!==void 0&&(o.alpha=t.alpha),o}function GS(e,t){if(!t||t[0]!=="hwb")return;const n={mode:"hwb"},[,r,o,a,s]=t;if(r.type!==ne.None){if(r.type===ne.Percentage)return;n.h=r.value}if(o.type!==ne.None){if(o.type===ne.Hue)return;n.w=o.value/100}if(a.type!==ne.None){if(a.type===ne.Hue)return;n.b=a.value/100}return s.type!==ne.None&&(n.alpha=Math.min(1,Math.max(0,s.type===ne.Number?s.value:s.value/100))),n}const YS={mode:"hwb",toMode:{rgb:BS},fromMode:{rgb:HS},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[GS],serialize:e=>`hwb(${e.h!==void 0?e.h:"none"} ${e.w!==void 0?e.w*100+"%":"none"} ${e.b!==void 0?e.b*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:ue,fixup:Jn},w:ue,b:ue,alpha:{use:ue,fixup:Tt}},difference:{h:TS},average:{h:er}},vh=203,xi=.1593017578125,xh=78.84375,yi=.8359375,wi=18.8515625,Ci=18.6875;function $l(e){if(e<0)return 0;const t=Math.pow(e,1/xh);return 1e4*Math.pow(Math.max(0,t-yi)/(wi-Ci*t),1/xi)}function Ll(e){if(e<0)return 0;const t=Math.pow(e/1e4,xi);return Math.pow((yi+wi*t)/(1+Ci*t),xh)}const Fl=e=>Math.max(e/vh,0),Vf=({i:e,t,p:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);const o=$l(e+.008609037037932761*t+.11102962500302593*n),a=$l(e-.00860903703793275*t-.11102962500302599*n),s=$l(e+.5600313357106791*t-.32062717498731885*n),i={mode:"xyz65",x:Fl(2.070152218389422*o-1.3263473389671556*a+.2066510476294051*s),y:Fl(.3647385209748074*o+.680566024947227*a-.0453045459220346*s),z:Fl(-.049747207535812*o-.0492609666966138*a+1.1880659249923042*s)};return r!==void 0&&(i.alpha=r),i},Vl=(e=0)=>Math.max(e*vh,0),Wf=({x:e,y:t,z:n,alpha:r})=>{const o=Vl(e),a=Vl(t),s=Vl(n),i=Ll(.3592832590121217*o+.6976051147779502*a-.0358915932320289*s),l=Ll(-.1920808463704995*o+1.1004767970374323*a+.0753748658519118*s),c=Ll(.0070797844607477*o+.0748396662186366*a+.8433265453898765*s),d=.5*i+.5*l,u=1.61376953125*i-3.323486328125*l+1.709716796875*c,m=4.378173828125*i-4.24560546875*l-.132568359375*c,g={mode:"itp",i:d,t:u,p:m};return r!==void 0&&(g.alpha=r),g},US={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:Vf,rgb:e=>eo(Vf(e))},fromMode:{xyz65:Wf,rgb:e=>Wf(Jr(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:ue,t:ue,p:ue,alpha:{use:ue,fixup:Tt}}},KS=134.03437499999998,qS=16295499532821565e-27,Wl=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,xi);return Math.pow((yi+wi*t)/(1+Ci*t),KS)},Bl=(e=0)=>Math.max(e*203,0),yh=({x:e,y:t,z:n,alpha:r})=>{e=Bl(e),t=Bl(t),n=Bl(n);let o=1.15*e-.15*n,a=.66*t+.34*e,s=Wl(.41478972*o+.579999*a+.014648*n),i=Wl(-.20151*o+1.120649*a+.0531008*n),l=Wl(-.0166008*o+.2648*a+.6684799*n),c=(s+i)/2,d={mode:"jab",j:.44*c/(1-.56*c)-qS,a:3.524*s-4.066708*i+.542708*l,b:.199076*s+1.096799*i-1.295875*l};return r!==void 0&&(d.alpha=r),d},XS=134.03437499999998,Bf=16295499532821565e-27,Hl=e=>{if(e<0)return 0;let t=Math.pow(e,1/XS);return 1e4*Math.pow((yi-t)/(Ci*t-wi),1/xi)},Gl=e=>e/203,wh=({j:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=(e+Bf)/(.44+.56*(e+Bf)),a=Hl(o+.13860504*t+.058047316*n),s=Hl(o-.13860504*t-.058047316*n),i=Hl(o-.096019242*t-.8118919*n),l={mode:"xyz65",x:Gl(1.661373024652174*a-.914523081304348*s+.23136208173913045*i),y:Gl(-.3250758611844533*a+1.571847026732543*s-.21825383453227928*i),z:Gl(-.090982811*a-.31272829*s+1.5227666*i)};return r!==void 0&&(l.alpha=r),l},Ch=e=>{let t=yh(Jr(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},Sh=e=>eo(wh(e)),ZS={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:Ch,xyz65:yh},toMode:{rgb:Sh,xyz65:wh},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:ue,a:ue,b:ue,alpha:{use:ue,fixup:Tt}}},Hf=({j:e,a:t,b:n,alpha:r})=>{t===void 0&&(t=0),n===void 0&&(n=0);let o=Math.sqrt(t*t+n*n),a={mode:"jch",j:e,c:o};return o&&(a.h=Ot(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(a.alpha=r),a},Gf=({j:e,c:t,h:n,alpha:r})=>{n===void 0&&(n=0);let o={mode:"jab",j:e,a:t?t*Math.cos(n/180*Math.PI):0,b:t?t*Math.sin(n/180*Math.PI):0};return r!==void 0&&(o.alpha=r),o},QS={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Gf,rgb:e=>Sh(Gf(e))},fromMode:{rgb:e=>Hf(Ch(e)),jab:Hf},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:ue,fixup:Jn},c:ue,j:ue,alpha:{use:ue,fixup:Tt}},difference:{h:gi},average:{h:er}},Si=Math.pow(29,3)/Math.pow(3,3),xu=Math.pow(6,3)/Math.pow(29,3);let Yl=e=>Math.pow(e,3)>xu?Math.pow(e,3):(116*e-16)/Si;const yu=({l:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=(e+16)/116,a=t/500+o,s=o-n/200,i={mode:"xyz50",x:Yl(a)*St.X,y:Yl(o)*St.Y,z:Yl(s)*St.Z};return r!==void 0&&(i.alpha=r),i},_a=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=Bo({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*n,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*n,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*n});return r!==void 0&&(o.alpha=r),o},Eh=e=>_a(yu(e)),Oa=e=>{let{r:t,g:n,b:r,alpha:o}=Wo(e),a={mode:"xyz50",x:.436065742824811*t+.3851514688337912*n+.14307845442264197*r,y:.22249319175623702*t+.7168870538238823*n+.06061979053616537*r,z:.013923904500943465*t+.09708128566574634*n+.7140993584005155*r};return o!==void 0&&(a.alpha=o),a},Ul=e=>e>xu?Math.cbrt(e):(Si*e+16)/116,wu=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=Ul(e/St.X),a=Ul(t/St.Y),s=Ul(n/St.Z),i={mode:"lab",l:116*a-16,a:500*(o-a),b:200*(a-s)};return r!==void 0&&(i.alpha=r),i},Mh=e=>{let t=wu(Oa(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t};function JS(e,t){if(!t||t[0]!=="lab")return;const n={mode:"lab"},[,r,o,a,s]=t;if(!(r.type===ne.Hue||o.type===ne.Hue||a.type===ne.Hue))return r.type!==ne.None&&(n.l=Math.min(Math.max(0,r.value),100)),o.type!==ne.None&&(n.a=o.type===ne.Number?o.value:o.value*125/100),a.type!==ne.None&&(n.b=a.type===ne.Number?a.value:a.value*125/100),s.type!==ne.None&&(n.alpha=Math.min(1,Math.max(0,s.type===ne.Number?s.value:s.value/100))),n}const Cu={mode:"lab",toMode:{xyz50:yu,rgb:Eh},fromMode:{xyz50:wu,rgb:Mh},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[JS],serialize:e=>`lab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:ue,a:ue,b:ue,alpha:{use:ue,fixup:Tt}}},eE={...Cu,mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:uh,rgb:bi},fromMode:{xyz65:dh,rgb:vi},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}};function tE(e,t){if(!t||t[0]!=="lch")return;const n={mode:"lch"},[,r,o,a,s]=t;if(r.type!==ne.None){if(r.type===ne.Hue)return;n.l=Math.min(Math.max(0,r.value),100)}if(o.type!==ne.None&&(n.c=Math.max(0,o.type===ne.Number?o.value:o.value*150/100)),a.type!==ne.None){if(a.type===ne.Percentage)return;n.h=a.value}return s.type!==ne.None&&(n.alpha=Math.min(1,Math.max(0,s.type===ne.Number?s.value:s.value/100))),n}const Su={mode:"lch",toMode:{lab:br,rgb:e=>Eh(br(e))},fromMode:{rgb:e=>gr(Mh(e)),lab:gr},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[tE],serialize:e=>`lch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:ue,fixup:Jn},c:ue,l:ue,alpha:{use:ue,fixup:Tt}},difference:{h:gi},average:{h:er}},nE={...Su,mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>br(e,"lab65"),rgb:e=>bi(br(e,"lab65"))},fromMode:{rgb:e=>gr(vi(e),"lch65"),lab65:e=>gr(e,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}},Rh=({l:e,u:t,v:n,alpha:r})=>{t===void 0&&(t=0),n===void 0&&(n=0);let o=Math.sqrt(t*t+n*n),a={mode:"lchuv",l:e,c:o};return o&&(a.h=Ot(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(a.alpha=r),a},kh=({l:e,c:t,h:n,alpha:r})=>{n===void 0&&(n=0);let o={mode:"luv",l:e,u:t?t*Math.cos(n/180*Math.PI):0,v:t?t*Math.sin(n/180*Math.PI):0};return r!==void 0&&(o.alpha=r),o},Ph=(e,t,n)=>4*e/(e+15*t+3*n),Nh=(e,t,n)=>9*t/(e+15*t+3*n),rE=Ph(St.X,St.Y,St.Z),oE=Nh(St.X,St.Y,St.Z),aE=e=>e<=xu?Si*e:116*Math.cbrt(e)-16,Lc=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=aE(t/St.Y),a=Ph(e,t,n),s=Nh(e,t,n);!isFinite(a)||!isFinite(s)?o=a=s=0:(a=13*o*(a-rE),s=13*o*(s-oE));let i={mode:"luv",l:o,u:a,v:s};return r!==void 0&&(i.alpha=r),i},sE=(e,t,n)=>4*e/(e+15*t+3*n),iE=(e,t,n)=>9*t/(e+15*t+3*n),lE=sE(St.X,St.Y,St.Z),cE=iE(St.X,St.Y,St.Z),Fc=({l:e,u:t,v:n,alpha:r})=>{if(e===void 0&&(e=0),e===0)return{mode:"xyz50",x:0,y:0,z:0};t===void 0&&(t=0),n===void 0&&(n=0);let o=t/(13*e)+lE,a=n/(13*e)+cE,s=St.Y*(e<=8?e/Si:Math.pow((e+16)/116,3)),i=s*(9*o)/(4*a),l=s*(12-3*o-20*a)/(4*a),c={mode:"xyz50",x:i,y:s,z:l};return r!==void 0&&(c.alpha=r),c},uE=e=>Rh(Lc(Oa(e))),dE=e=>_a(Fc(kh(e))),fE={mode:"lchuv",toMode:{luv:kh,rgb:dE},fromMode:{rgb:uE,luv:Rh},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:ue,fixup:Jn},c:ue,l:ue,alpha:{use:ue,fixup:Tt}},difference:{h:gi},average:{h:er}},pE={...Vo,mode:"lrgb",toMode:{rgb:Bo},fromMode:{rgb:Wo},parse:["srgb-linear"],serialize:"srgb-linear"},mE={mode:"luv",toMode:{xyz50:Fc,rgb:e=>_a(Fc(e))},fromMode:{xyz50:Lc,rgb:e=>Lc(Oa(e))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:ue,u:ue,v:ue,alpha:{use:ue,fixup:Tt}}},Th=({r:e,g:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=Math.cbrt(.412221469470763*e+.5363325372617348*t+.0514459932675022*n),a=Math.cbrt(.2119034958178252*e+.6806995506452344*t+.1073969535369406*n),s=Math.cbrt(.0883024591900564*e+.2817188391361215*t+.6299787016738222*n),i={mode:"oklab",l:.210454268309314*o+.7936177747023054*a-.0040720430116193*s,a:1.9779985324311684*o-2.42859224204858*a+.450593709617411*s,b:.0259040424655478*o+.7827717124575296*a-.8086757549230774*s};return r!==void 0&&(i.alpha=r),i},Ei=e=>{let t=Th(Wo(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},Da=({l:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=Math.pow(e+.3963377773761749*t+.2158037573099136*n,3),a=Math.pow(e-.1055613458156586*t-.0638541728258133*n,3),s=Math.pow(e-.0894841775298119*t-1.2914855480194092*n,3),i={mode:"lrgb",r:4.076741636075957*o-3.3077115392580616*a+.2309699031821044*s,g:-1.2684379732850317*o+2.6097573492876887*a-.3413193760026573*s,b:-.0041960761386756*o-.7034186179359362*a+1.7076146940746117*s};return r!==void 0&&(i.alpha=r),i},Mi=e=>Bo(Da(e));function Vc(e){const r=1.170873786407767;return .5*(r*e-.206+Math.sqrt((r*e-.206)*(r*e-.206)+4*.03*r*e))}function Gs(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function hE(e,t){let n,r,o,a,s,i,l,c;-1.88170328*e-.80936493*t>1?(n=1.19086277,r=1.76576728,o=.59662641,a=.75515197,s=.56771245,i=4.0767416621,l=-3.3077115913,c=.2309699292):1.81444104*e-1.19445276*t>1?(n=.73956515,r=-.45954404,o=.08285427,a=.1254107,s=.14503204,i=-1.2684380046,l=2.6097574011,c=-.3413193965):(n=1.35733652,r=-.00915799,o=-1.1513021,a=-.50559606,s=.00692167,i=-.0041960863,l=-.7034186147,c=1.707614701);let d=n+r*e+o*t+a*e*e+s*e*t,u=.3963377774*e+.2158037573*t,m=-.1055613458*e-.0638541728*t,g=-.0894841775*e-1.291485548*t;{let b=1+d*u,h=1+d*m,x=1+d*g,v=b*b*b,w=h*h*h,y=x*x*x,C=3*u*b*b,E=3*m*h*h,S=3*g*x*x,M=6*u*u*b,R=6*m*m*h,I=6*g*g*x,O=i*v+l*w+c*y,_=i*C+l*E+c*S,T=i*M+l*R+c*I;d=d-O*_/(_*_-.5*O*T)}return d}function Eu(e,t){let n=hE(e,t),r=Da({l:1,a:n*e,b:n*t}),o=Math.cbrt(1/Math.max(r.r,r.g,r.b)),a=o*n;return[o,a]}function gE(e,t,n,r,o,a=null){a||(a=Eu(e,t));let s;if((n-o)*a[1]-(a[0]-o)*r<=0)s=a[1]*o/(r*a[0]+a[1]*(o-n));else{s=a[1]*(o-1)/(r*(a[0]-1)+a[1]*(o-n));{let i=n-o,l=r,c=.3963377774*e+.2158037573*t,d=-.1055613458*e-.0638541728*t,u=-.0894841775*e-1.291485548*t,m=i+l*c,g=i+l*d,b=i+l*u;{let h=o*(1-s)+s*n,x=s*r,v=h+x*c,w=h+x*d,y=h+x*u,C=v*v*v,E=w*w*w,S=y*y*y,M=3*m*v*v,R=3*g*w*w,I=3*b*y*y,O=6*m*m*v,_=6*g*g*w,T=6*b*b*y,k=4.0767416621*C-3.3077115913*E+.2309699292*S-1,j=4.0767416621*M-3.3077115913*R+.2309699292*I,V=4.0767416621*O-3.3077115913*_+.2309699292*T,z=j/(j*j-.5*k*V),$=-k*z,F=-1.2684380046*C+2.6097574011*E-.3413193965*S-1,L=-1.2684380046*M+2.6097574011*R-.3413193965*I,D=-1.2684380046*O+2.6097574011*_-.3413193965*T,re=L/(L*L-.5*F*D),pe=-F*re,G=-.0041960863*C-.7034186147*E+1.707614701*S-1,B=-.0041960863*M-.7034186147*R+1.707614701*I,J=-.0041960863*O-.7034186147*_+1.707614701*T,oe=B/(B*B-.5*G*J),U=-G*oe;$=z>=0?$:1e6,pe=re>=0?pe:1e6,U=oe>=0?U:1e6,s+=Math.min($,Math.min(pe,U))}}}return s}function Mu(e,t,n=null){n||(n=Eu(e,t));let r=n[0],o=n[1];return[o/r,o/(1-r)]}function Ih(e,t,n){let r=Eu(t,n),o=gE(t,n,e,1,e,r),a=Mu(t,n,r),s=.11516993+1/(7.4477897+4.1590124*n+t*(-2.19557347+1.75198401*n+t*(-2.13704948-10.02301043*n+t*(-4.24894561+5.38770819*n+4.69891013*t)))),i=.11239642+1/(1.6132032-.68124379*n+t*(.40370612+.90148123*n+t*(-.27087943+.6122399*n+t*(.00299215-.45399568*n-.14661872*t)))),l=o/Math.min(e*a[0],(1-e)*a[1]),c=e*s,d=(1-e)*i,u=.9*l*Math.sqrt(Math.sqrt(1/(1/(c*c*c*c)+1/(d*d*d*d))));return c=e*.4,d=(1-e)*.8,[Math.sqrt(1/(1/(c*c)+1/(d*d))),u,o]}function Yf(e){const t=e.l!==void 0?e.l:0,n=e.a!==void 0?e.a:0,r=e.b!==void 0?e.b:0,o={mode:"okhsl",l:Vc(t)};e.alpha!==void 0&&(o.alpha=e.alpha);let a=Math.sqrt(n*n+r*r);if(!a)return o.s=0,o;let[s,i,l]=Ih(t,n/a,r/a),c;if(a<i){let d=0,u=.8*s,m=1-u/i;c=(a-d)/(u+m*(a-d))*.8}else{let d=i,u=.2*i*i*1.25*1.25/s,m=1-u/(l-i);c=.8+.2*((a-d)/(u+m*(a-d)))}return c&&(o.s=c,o.h=Ot(Math.atan2(r,n)*180/Math.PI)),o}function Uf(e){let t=e.h!==void 0?e.h:0,n=e.s!==void 0?e.s:0,r=e.l!==void 0?e.l:0;const o={mode:"oklab",l:Gs(r)};if(e.alpha!==void 0&&(o.alpha=e.alpha),!n||r===1)return o.a=o.b=0,o;let a=Math.cos(t/180*Math.PI),s=Math.sin(t/180*Math.PI),[i,l,c]=Ih(o.l,a,s),d,u,m,g;n<.8?(d=1.25*n,u=0,m=.8*i,g=1-m/l):(d=5*(n-.8),u=l,m=.2*l*l*1.25*1.25/i,g=1-m/(c-l));let b=u+d*m/(1-g*d);return o.a=b*a,o.b=b*s,o}const bE={...mh,mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:Yf,rgb:e=>Yf(Ei(e))},toMode:{oklab:Uf,rgb:e=>Mi(Uf(e))}};function Kf(e){let t=e.l!==void 0?e.l:0,n=e.a!==void 0?e.a:0,r=e.b!==void 0?e.b:0,o=Math.sqrt(n*n+r*r),a=o?n/o:1,s=o?r/o:1,[i,l]=Mu(a,s),c=.5,d=1-c/i,u=l/(o+t*l),m=u*t,g=u*o,b=Gs(m),h=g*b/m,x=Da({l:b,a:a*h,b:s*h}),v=Math.cbrt(1/Math.max(x.r,x.g,x.b,0));t=t/v,o=o/v*Vc(t)/t,t=Vc(t);const w={mode:"okhsv",s:o?(c+l)*g/(l*c+l*d*g):0,v:t?t/m:0};return w.s&&(w.h=Ot(Math.atan2(r,n)*180/Math.PI)),e.alpha!==void 0&&(w.alpha=e.alpha),w}function qf(e){const t={mode:"oklab"};e.alpha!==void 0&&(t.alpha=e.alpha);const n=e.h!==void 0?e.h:0,r=e.s!==void 0?e.s:0,o=e.v!==void 0?e.v:0,a=Math.cos(n/180*Math.PI),s=Math.sin(n/180*Math.PI),[i,l]=Mu(a,s),c=.5,d=1-c/i,u=1-r*c/(c+l-l*d*r),m=r*l*c/(c+l-l*d*r),g=Gs(u),b=m*g/u,h=Da({l:g,a:a*b,b:s*b}),x=Math.cbrt(1/Math.max(h.r,h.g,h.b,0)),v=Gs(o*u),w=m*v/u;return t.l=v*x,t.a=w*a*x,t.b=w*s*x,t}const vE={...bh,mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:Kf,rgb:e=>Kf(Ei(e))},toMode:{oklab:qf,rgb:e=>Mi(qf(e))}};function xE(e,t){if(!t||t[0]!=="oklab")return;const n={mode:"oklab"},[,r,o,a,s]=t;if(!(r.type===ne.Hue||o.type===ne.Hue||a.type===ne.Hue))return r.type!==ne.None&&(n.l=Math.min(Math.max(0,r.type===ne.Number?r.value:r.value/100),1)),o.type!==ne.None&&(n.a=o.type===ne.Number?o.value:o.value*.4/100),a.type!==ne.None&&(n.b=a.type===ne.Number?a.value:a.value*.4/100),s.type!==ne.None&&(n.alpha=Math.min(1,Math.max(0,s.type===ne.Number?s.value:s.value/100))),n}const yE={...Cu,mode:"oklab",toMode:{lrgb:Da,rgb:Mi},fromMode:{lrgb:Th,rgb:Ei},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[xE],serialize:e=>`oklab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`};function wE(e,t){if(!t||t[0]!=="oklch")return;const n={mode:"oklch"},[,r,o,a,s]=t;if(r.type!==ne.None){if(r.type===ne.Hue)return;n.l=Math.min(Math.max(0,r.type===ne.Number?r.value:r.value/100),1)}if(o.type!==ne.None&&(n.c=Math.max(0,o.type===ne.Number?o.value:o.value*.4/100)),a.type!==ne.None){if(a.type===ne.Percentage)return;n.h=a.value}return s.type!==ne.None&&(n.alpha=Math.min(1,Math.max(0,s.type===ne.Number?s.value:s.value/100))),n}const CE={...Su,mode:"oklch",toMode:{oklab:e=>br(e,"oklab"),rgb:e=>Mi(br(e,"oklab"))},fromMode:{rgb:e=>gr(Ei(e),"oklch"),oklab:e=>gr(e,"oklch")},parse:[wE],serialize:e=>`oklch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}},Xf=e=>{let{r:t,g:n,b:r,alpha:o}=Wo(e),a={mode:"xyz65",x:.486570948648216*t+.265667693169093*n+.1982172852343625*r,y:.2289745640697487*t+.6917385218365062*n+.079286914093745*r,z:0*t+.0451133818589026*n+1.043944368900976*r};return o!==void 0&&(a.alpha=o),a},Zf=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=Bo({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*n,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*n,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*n},"p3");return r!==void 0&&(o.alpha=r),o},SE={...Vo,mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>Zf(Jr(e)),xyz65:Zf},toMode:{rgb:e=>eo(Xf(e)),xyz65:Xf}},Kl=e=>{let t=Math.abs(e);return t>=1/512?Math.sign(e)*Math.pow(t,1/1.8):16*e},Qf=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o={mode:"prophoto",r:Kl(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*n),g:Kl(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*n),b:Kl(e*0+t*0+1.2119675456389452*n)};return r!==void 0&&(o.alpha=r),o},ql=(e=0)=>{let t=Math.abs(e);return t>=16/512?Math.sign(e)*Math.pow(t,1.8):e/16},Jf=e=>{let t=ql(e.r),n=ql(e.g),r=ql(e.b),o={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*n+.0313477341283922*r,y:.2880748288194013*t+.7118352342418731*n+899369387256e-16*r,z:0*t+0*n+.8251046025104602*r};return e.alpha!==void 0&&(o.alpha=e.alpha),o},EE={...Vo,mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:Qf,rgb:e=>Qf(Oa(e))},toMode:{xyz50:Jf,rgb:e=>_a(Jf(e))}},ep=1.09929682680944,ME=.018053968510807,Xl=e=>{const t=Math.abs(e);return t>ME?(Math.sign(e)||1)*(ep*Math.pow(t,.45)-(ep-1)):4.5*e},tp=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o={mode:"rec2020",r:Xl(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*n),g:Xl(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*n),b:Xl(e*.0176398574453108-t*.0427706132578085+.9421031212354739*n)};return r!==void 0&&(o.alpha=r),o},np=1.09929682680944,RE=.018053968510807,Zl=(e=0)=>{let t=Math.abs(e);return t<RE*4.5?e/4.5:(Math.sign(e)||1)*Math.pow((t+np-1)/np,1/.45)},rp=e=>{let t=Zl(e.r),n=Zl(e.g),r=Zl(e.b),o={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*n+.1688809751641721*r,y:.262700212011267*t+.6779980715188708*n+.059301716469862*r,z:0*t+.0280726930490874*n+1.0609850577107909*r};return e.alpha!==void 0&&(o.alpha=e.alpha),o},kE={...Vo,mode:"rec2020",fromMode:{xyz65:tp,rgb:e=>tp(Jr(e))},toMode:{xyz65:rp,rgb:e=>eo(rp(e))},parse:["rec2020"],serialize:"rec2020"},Br=.0037930732552754493,_h=Math.cbrt(Br),Ql=e=>Math.cbrt(e)-_h,PE=e=>{const{r:t,g:n,b:r,alpha:o}=Wo(e),a=Ql(.3*t+.622*n+.078*r+Br),s=Ql(.23*t+.692*n+.078*r+Br),i=Ql(.2434226892454782*t+.2047674442449682*n+.5518098665095535*r+Br),l={mode:"xyb",x:(a-s)/2,y:(a+s)/2,b:i-(a+s)/2};return o!==void 0&&(l.alpha=o),l},Jl=e=>Math.pow(e+_h,3),NE=({x:e,y:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);const o=Jl(e+t)-Br,a=Jl(t-e)-Br,s=Jl(n+t)-Br,i=Bo({r:11.031566904639861*o-9.866943908131562*a-.16462299650829934*s,g:-3.2541473810744237*o+4.418770377582723*a-.16462299650829934*s,b:-3.6588512867136815*o+2.7129230459360922*a+1.9459282407775895*s});return r!==void 0&&(i.alpha=r),i},TE={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:NE},fromMode:{rgb:PE},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:ue,y:ue,b:ue,alpha:{use:ue,fixup:Tt}}},IE={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:_a,lab:wu},fromMode:{rgb:Oa,lab:yu},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:ue,y:ue,z:ue,alpha:{use:ue,fixup:Tt}}},_E=e=>{let{x:t,y:n,z:r,alpha:o}=e;t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=0);let a={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*n-.0501922295431356*r,y:.0296278156881593*t+.990434484573249*n-.0170738250293851*r,z:-.0092430581525912*t+.0150551448965779*n+.7518742899580008*r};return o!==void 0&&(a.alpha=o),a},OE=e=>{let{x:t,y:n,z:r,alpha:o}=e;t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=0);let a={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*n+.0632593086610217*r,y:-.0283697069632081*t+1.0099954580058226*n+.021041398966943*r,z:.0123140016883199*t-.0205076964334779*n+1.3303659366080753*r};return o!==void 0&&(a.alpha=o),a},DE={mode:"xyz65",toMode:{rgb:eo,xyz50:_E},fromMode:{rgb:Jr,xyz50:OE},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:ue,y:ue,z:ue,alpha:{use:ue,fixup:Tt}}},AE=({r:e,g:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);const o={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*n,i:.59597799*e-.2741761*t-.32180189*n,q:.21147017*e-.52261711*t+.31114694*n};return r!==void 0&&(o.alpha=r),o},jE=({y:e,i:t,q:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);const o={mode:"rgb",r:e+.95608445*t+.6208885*n,g:e-.27137664*t-.6486059*n,b:e-1.10561724*t+1.70250126*n};return r!==void 0&&(o.alpha=r),o},zE={mode:"yiq",toMode:{rgb:jE},fromMode:{rgb:AE},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:ue,i:ue,q:ue,alpha:{use:ue,fixup:Tt}}},$E=e=>{const t=ha(e);if(!t)return;const n=Ia(t.mode);if(!n.serialize||typeof n.serialize=="string"){let r=`color(${n.serialize||`--${t.mode}`} `;return n.channels.forEach((o,a)=>{o!=="alpha"&&(r+=(a?" ":"")+(t[o]!==void 0?t[o]:"none"))}),t.alpha!==void 0&&t.alpha<1&&(r+=` / ${t.alpha}`),r+")"}if(typeof n.serialize=="function")return n.serialize(t)},Oh=Hr("rgb"),Dh=e=>{const t={mode:e.mode,r:Math.max(0,Math.min(e.r!==void 0?e.r:0,1)),g:Math.max(0,Math.min(e.g!==void 0?e.g:0,1)),b:Math.max(0,Math.min(e.b!==void 0?e.b:0,1))};return e.alpha!==void 0&&(t.alpha=e.alpha),t},LE=e=>Dh(Oh(e)),Ah=e=>e!==void 0&&(e.r===void 0||e.r>=0&&e.r<=1)&&(e.g===void 0||e.g>=0&&e.g<=1)&&(e.b===void 0||e.b>=0&&e.b<=1);function FE(e){return Ah(Oh(e))}function jh(e="rgb"){const{gamut:t}=Ia(e);if(!t)return r=>!0;const n=Hr(typeof t=="string"?t:e);return r=>Ah(n(r))}function VE(e="rgb"){const{gamut:t}=Ia(e);if(!t)return a=>ha(a);const n=typeof t=="string"?t:e,r=Hr(n),o=jh(n);return a=>{const s=ha(a);if(!s)return;const i=r(s);if(o(i))return s;const l=Dh(i);return s.mode===l.mode?l:Hr(s.mode)(l)}}function zh(e,t="lch",n="rgb"){e=ha(e);let r=n==="rgb"?FE:jh(n),o=n==="rgb"?LE:VE(n);if(e===void 0||r(e))return e;let a=Hr(e.mode);e=Hr(t)(e);let s={...e,c:0};if(!r(s))return a(o(s));let i=0,l=e.c!==void 0?e.c:0,c=Ia(t).ranges.c,d=(c[1]-c[0])/Math.pow(2,13),u=s.c;for(;l-i>d;)s.c=i+(l-i)*.5,r(s)?(u=s.c,i=s.c):l=s.c;return a(r(s)?s:{...s,c:u})}Je(ES);Je(IS);Je(_S);Je(OS);Je(jS);Je(mh);Je(bh);Je(YS);Je(US);Je(ZS);Je(QS);Je(Cu);Je(eE);Je(Su);Je(nE);Je(fE);Je(pE);Je(mE);Je(bE);Je(vE);Je(yE);const WE=Je(CE);Je(SE);Je(EE);Je(kE);Je(Vo);Je(TE);Je(IE);Je(DE);Je(zE);const BE={destructive:"oklch(0.52 0.22 25)","destructive-foreground":"oklch(0.99 0 0)","destructive-edge":"oklch(0.40 0.25 25)",positive:"oklch(0.46 0.18 145)","positive-foreground":"oklch(0.99 0 0)","positive-edge":"oklch(0.34 0.20 145)",warning:"oklch(0.80 0.19 75)","warning-foreground":"oklch(0.14 0 0)","warning-edge":"oklch(0.57 0.23 75)",confirm:"oklch(0.55 0.18 255)","confirm-foreground":"oklch(0.99 0 0)","confirm-edge":"oklch(0.41 0.20 255)"},HE={destructive:"oklch(0.52 0.22 25)","destructive-foreground":"oklch(0.99 0 0)","destructive-edge":"oklch(0.70 0.20 25)",positive:"oklch(0.46 0.18 145)","positive-foreground":"oklch(0.99 0 0)","positive-edge":"oklch(0.65 0.16 145)",warning:"oklch(0.50 0.20 75)","warning-foreground":"oklch(0.99 0 0)","warning-edge":"oklch(0.68 0.22 75)",confirm:"oklch(0.50 0.18 255)","confirm-foreground":"oklch(0.99 0 0)","confirm-edge":"oklch(0.68 0.16 255)"};function GE(e){const t=ih(e);if(!t)throw new Error(`Invalid seed color: "${e}"`);const n=WE(t);if(!n)throw new Error(`Could not convert "${e}" to oklch`);return zh(n,"oklch","rgb")}function be(e,t,n){const o=zh({mode:"oklch",l:e,c:t,h:n??0},"oklch","rgb");return $E(o)??`oklch(${e} ${t} ${n??0})`}function YE(e,t){const n=e.h,r=e.c??0,o=Math.min(Math.max(e.l,.35),.5);return{...BE,background:be(.99,0,0),foreground:be(.14,0,0),card:be(.97,0,0),"card-foreground":be(.14,0,0),popover:be(.99,0,0),"popover-foreground":be(.14,0,0),primary:be(o,r,n),"primary-foreground":be(.99,0,0),"primary-edge":be(Math.max(o-.12,.12),r,n),surface:be(.95,r*.12,n),edge:be(.82,r*.22,n),"edge-active":be(.65,r*.4,n),secondary:be(.94,0,0),"secondary-foreground":be(.22,0,0),muted:be(.95,0,0),"muted-foreground":be(.5,0,0),accent:be(.93,0,0),"accent-foreground":be(.2,0,0),border:be(.88,0,0),"background-elevated":be(.94,0,0),input:be(.88,0,0),ring:be(o,r,n),radius:`${t}rem`,sidebar:be(.94,0,0),"sidebar-foreground":be(.14,0,0),"sidebar-primary":be(o,r,n),"sidebar-primary-foreground":be(.99,0,0),"sidebar-accent":be(.93,0,0),"sidebar-accent-foreground":be(.2,0,0),"sidebar-border":be(.88,0,0),"sidebar-ring":be(o,r,n),"chart-1":be(.65,Math.max(r*1.1,.12),n),"chart-2":be(.58,Math.max(r*1,.11),(n??0)+40),"chart-3":be(.52,Math.max(r*.9,.1),(n??0)+80),"chart-4":be(.72,Math.max(r*1,.12),(n??0)-40),"chart-5":be(.6,Math.max(r*.9,.11),(n??0)+160)}}function UE(e,t){const n=e.h,r=e.c??0,o=Math.min(Math.max(e.l,.35),.5);return{...HE,background:be(.1,0,0),foreground:be(.97,0,0),card:be(.15,0,0),"card-foreground":be(.97,0,0),popover:be(.15,0,0),"popover-foreground":be(.97,0,0),primary:be(o,r,n),"primary-foreground":be(.99,0,0),"primary-edge":be(Math.min(o+.2,.85),r,n),surface:be(.22,r*.18,n),edge:be(.42,r*.32,n),"edge-active":be(.58,r*.48,n),secondary:be(.22,0,0),"secondary-foreground":be(.97,0,0),muted:be(.2,0,0),"muted-foreground":be(.6,0,0),accent:be(.2,0,0),"accent-foreground":be(.97,0,0),border:"oklch(1 0 0 / 12%)","background-elevated":be(.22,0,0),input:"oklch(1 0 0 / 15%)",ring:be(o,r,n),radius:`${t}rem`,sidebar:be(.22,0,0),"sidebar-foreground":be(.97,0,0),"sidebar-primary":be(o,r,n),"sidebar-primary-foreground":be(.99,0,0),"sidebar-accent":be(.28,0,0),"sidebar-accent-foreground":be(.8,0,0),"sidebar-border":"oklch(1 0 0 / 12%)","sidebar-ring":be(o,r,n),"chart-1":be(.65,Math.max(r*1.1,.14),n),"chart-2":be(.6,Math.max(r*1,.13),(n??0)+40),"chart-3":be(.55,Math.max(r*.9,.12),(n??0)+80),"chart-4":be(.7,Math.max(r*1,.13),(n??0)-40),"chart-5":be(.62,Math.max(r*.9,.12),(n??0)+160)}}function $h(e,t={},n=.875){const r=GE(e),o={...YE(r,n),...t},a={...UE(r,n),...t};return{light:o,dark:a}}function Lh(e){return Object.fromEntries(Object.entries(e).map(([t,n])=>[`--${t}`,n]))}function Fh(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Fh(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Vh(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Fh(e))&&(r&&(r+=" "),r+=t);return r}const KE=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},qE=(e,t)=>({classGroupId:e,validator:t}),Wh=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Ys="-",op=[],XE="arbitrary..",ZE=e=>{const t=JE(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return QE(s);const i=s.split(Ys),l=i[0]===""&&i.length>1?1:0;return Bh(i,l,t)},getConflictingClassGroupIds:(s,i)=>{if(i){const l=r[s],c=n[s];return l?c?KE(c,l):l:c||op}return n[s]||op}}},Bh=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],a=n.nextPart.get(o);if(a){const c=Bh(e,t+1,a);if(c)return c}const s=n.validators;if(s===null)return;const i=t===0?e.join(Ys):e.slice(t).join(Ys),l=s.length;for(let c=0;c<l;c++){const d=s[c];if(d.validator(i))return d.classGroupId}},QE=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?XE+r:void 0})(),JE=e=>{const{theme:t,classGroups:n}=e;return eM(n,t)},eM=(e,t)=>{const n=Wh();for(const r in e){const o=e[r];Ru(o,n,r,t)}return n},Ru=(e,t,n,r)=>{const o=e.length;for(let a=0;a<o;a++){const s=e[a];tM(s,t,n,r)}},tM=(e,t,n,r)=>{if(typeof e=="string"){nM(e,t,n);return}if(typeof e=="function"){rM(e,t,n,r);return}oM(e,t,n,r)},nM=(e,t,n)=>{const r=e===""?t:Hh(t,e);r.classGroupId=n},rM=(e,t,n,r)=>{if(aM(e)){Ru(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(qE(n,e))},oM=(e,t,n,r)=>{const o=Object.entries(e),a=o.length;for(let s=0;s<a;s++){const[i,l]=o[s];Ru(l,Hh(t,i),n,r)}},Hh=(e,t)=>{let n=e;const r=t.split(Ys),o=r.length;for(let a=0;a<o;a++){const s=r[a];let i=n.nextPart.get(s);i||(i=Wh(),n.nextPart.set(s,i)),n=i}return n},aM=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,sM=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(a,s)=>{n[a]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(a){let s=n[a];if(s!==void 0)return s;if((s=r[a])!==void 0)return o(a,s),s},set(a,s){a in n?n[a]=s:o(a,s)}}},Wc="!",ap=":",iM=[],sp=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),lM=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const a=[];let s=0,i=0,l=0,c;const d=o.length;for(let h=0;h<d;h++){const x=o[h];if(s===0&&i===0){if(x===ap){a.push(o.slice(l,h)),l=h+1;continue}if(x==="/"){c=h;continue}}x==="["?s++:x==="]"?s--:x==="("?i++:x===")"&&i--}const u=a.length===0?o:o.slice(l);let m=u,g=!1;u.endsWith(Wc)?(m=u.slice(0,-1),g=!0):u.startsWith(Wc)&&(m=u.slice(1),g=!0);const b=c&&c>l?c-l:void 0;return sp(a,g,m,b)};if(t){const o=t+ap,a=r;r=s=>s.startsWith(o)?a(s.slice(o.length)):sp(iM,!1,s,void 0,!0)}if(n){const o=r;r=a=>n({className:a,parseClassName:o})}return r},cM=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let a=0;a<n.length;a++){const s=n[a],i=s[0]==="[",l=t.has(s);i||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},uM=e=>({cache:sM(e.cacheSize),parseClassName:lM(e),sortModifiers:cM(e),postfixLookupClassGroupIds:dM(e),...ZE(e)}),dM=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)t[n[r]]=!0;return t},fM=/\s+/,pM=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:a,postfixLookupClassGroupIds:s}=t,i=[],l=e.trim().split(fM);let c="";for(let d=l.length-1;d>=0;d-=1){const u=l[d],{isExternal:m,modifiers:g,hasImportantModifier:b,baseClassName:h,maybePostfixModifierPosition:x}=n(u);if(m){c=u+(c.length>0?" "+c:c);continue}let v=!!x,w;if(v){const M=h.substring(0,x);w=r(M);const R=w&&s[w]?r(h):void 0;R&&R!==w&&(w=R,v=!1)}else w=r(h);if(!w){if(!v){c=u+(c.length>0?" "+c:c);continue}if(w=r(h),!w){c=u+(c.length>0?" "+c:c);continue}v=!1}const y=g.length===0?"":g.length===1?g[0]:a(g).join(":"),C=b?y+Wc:y,E=C+w;if(i.indexOf(E)>-1)continue;i.push(E);const S=o(w,v);for(let M=0;M<S.length;++M){const R=S[M];i.push(C+R)}c=u+(c.length>0?" "+c:c)}return c},mM=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=Gh(n))&&(o&&(o+=" "),o+=r);return o},Gh=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Gh(e[r]))&&(n&&(n+=" "),n+=t);return n},hM=(e,...t)=>{let n,r,o,a;const s=l=>{const c=t.reduce((d,u)=>u(d),e());return n=uM(c),r=n.cache.get,o=n.cache.set,a=i,i(l)},i=l=>{const c=r(l);if(c)return c;const d=pM(l,n);return o(l,d),d};return a=s,(...l)=>a(mM(...l))},gM=[],Rt=e=>{const t=n=>n[e]||gM;return t.isThemeGetter=!0,t},Yh=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Uh=/^\((?:(\w[\w-]*):)?(.+)\)$/i,bM=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,vM=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,xM=/\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$/,yM=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,wM=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,CM=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,sr=e=>bM.test(e),Ye=e=>!!e&&!Number.isNaN(Number(e)),En=e=>!!e&&Number.isInteger(Number(e)),ec=e=>e.endsWith("%")&&Ye(e.slice(0,-1)),Bn=e=>vM.test(e),Kh=()=>!0,SM=e=>xM.test(e)&&!yM.test(e),ku=()=>!1,EM=e=>wM.test(e),MM=e=>CM.test(e),RM=e=>!ge(e)&&!ve(e),kM=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)),PM=e=>Cr(e,Zh,ku),ge=e=>Yh.test(e),zr=e=>Cr(e,Qh,SM),ip=e=>Cr(e,jM,Ye),NM=e=>Cr(e,eg,Kh),TM=e=>Cr(e,Jh,ku),lp=e=>Cr(e,qh,ku),IM=e=>Cr(e,Xh,MM),us=e=>Cr(e,tg,EM),ve=e=>Uh.test(e),ea=e=>to(e,Qh),_M=e=>to(e,Jh),cp=e=>to(e,qh),OM=e=>to(e,Zh),DM=e=>to(e,Xh),ds=e=>to(e,tg,!0),AM=e=>to(e,eg,!0),Cr=(e,t,n)=>{const r=Yh.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},to=(e,t,n=!1)=>{const r=Uh.exec(e);return r?r[1]?t(r[1]):n:!1},qh=e=>e==="position"||e==="percentage",Xh=e=>e==="image"||e==="url",Zh=e=>e==="length"||e==="size"||e==="bg-size",Qh=e=>e==="length",jM=e=>e==="number",Jh=e=>e==="family-name",eg=e=>e==="number"||e==="weight",tg=e=>e==="shadow",zM=()=>{const e=Rt("color"),t=Rt("font"),n=Rt("text"),r=Rt("font-weight"),o=Rt("tracking"),a=Rt("leading"),s=Rt("breakpoint"),i=Rt("container"),l=Rt("spacing"),c=Rt("radius"),d=Rt("shadow"),u=Rt("inset-shadow"),m=Rt("text-shadow"),g=Rt("drop-shadow"),b=Rt("blur"),h=Rt("perspective"),x=Rt("aspect"),v=Rt("ease"),w=Rt("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...C(),ve,ge],S=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto","contain","none"],R=()=>[ve,ge,l],I=()=>[sr,"full","auto",...R()],O=()=>[En,"none","subgrid",ve,ge],_=()=>["auto",{span:["full",En,ve,ge]},En,ve,ge],T=()=>[En,"auto",ve,ge],k=()=>["auto","min","max","fr",ve,ge],j=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...R()],$=()=>[sr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],F=()=>[sr,"screen","full","dvw","lvw","svw","min","max","fit",...R()],L=()=>[sr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...R()],D=()=>[e,ve,ge],re=()=>[...C(),cp,lp,{position:[ve,ge]}],pe=()=>["no-repeat",{repeat:["","x","y","space","round"]}],G=()=>["auto","cover","contain",OM,PM,{size:[ve,ge]}],B=()=>[ec,ea,zr],J=()=>["","none","full",c,ve,ge],oe=()=>["",Ye,ea,zr],U=()=>["solid","dashed","dotted","double"],H=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],te=()=>[Ye,ec,cp,lp],xe=()=>["","none",b,ve,ge],Re=()=>["none",Ye,ve,ge],Y=()=>["none",Ye,ve,ge],we=()=>[Ye,ve,ge],he=()=>[sr,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Bn],breakpoint:[Bn],color:[Kh],container:[Bn],"drop-shadow":[Bn],ease:["in","out","in-out"],font:[RM],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Bn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Bn],shadow:[Bn],spacing:["px",Ye],text:[Bn],"text-shadow":[Bn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",sr,ge,ve,x]}],container:["container"],"container-type":[{"@container":["","normal","size",ve,ge]}],"container-named":[kM],columns:[{columns:[Ye,ge,ve,i]}],"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:E()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{"inset-s":I(),start:I()}],end:[{"inset-e":I(),end:I()}],"inset-bs":[{"inset-bs":I()}],"inset-be":[{"inset-be":I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[En,"auto",ve,ge]}],basis:[{basis:[sr,"full","auto",i,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ye,sr,"auto","initial","none",ge]}],grow:[{grow:["",Ye,ve,ge]}],shrink:[{shrink:["",Ye,ve,ge]}],order:[{order:[En,"first","last","none",ve,ge]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:_()}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:_()}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...j(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...j()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":j()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pbs:[{pbs:R()}],pbe:[{pbe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mbs:[{mbs:z()}],mbe:[{mbe:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:$()}],"inline-size":[{inline:["auto",...F()]}],"min-inline-size":[{"min-inline":["auto",...F()]}],"max-inline-size":[{"max-inline":["none",...F()]}],"block-size":[{block:["auto",...L()]}],"min-block-size":[{"min-block":["auto",...L()]}],"max-block-size":[{"max-block":["none",...L()]}],w:[{w:[i,"screen",...$()]}],"min-w":[{"min-w":[i,"screen","none",...$()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[s]},...$()]}],h:[{h:["screen","lh",...$()]}],"min-h":[{"min-h":["screen","lh","none",...$()]}],"max-h":[{"max-h":["screen","lh",...$()]}],"font-size":[{text:["base",n,ea,zr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,AM,NM]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ec,ge]}],"font-family":[{font:[_M,TM,t]}],"font-features":[{"font-features":[ge]}],"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:[o,ve,ge]}],"line-clamp":[{"line-clamp":[Ye,"none",ve,ip]}],leading:[{leading:[a,...R()]}],"list-image":[{"list-image":["none",ve,ge]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ve,ge]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ye,"from-font","auto",ve,zr]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[Ye,"auto",ve,ge]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"tab-size":[{tab:[En,ve,ge]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ve,ge]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ve,ge]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:re()}],"bg-repeat":[{bg:pe()}],"bg-size":[{bg:G()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},En,ve,ge],radial:["",ve,ge],conic:[En,ve,ge]},DM,IM]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:B()}],"gradient-via-pos":[{via:B()}],"gradient-to-pos":[{to:B()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:J()}],"rounded-s":[{"rounded-s":J()}],"rounded-e":[{"rounded-e":J()}],"rounded-t":[{"rounded-t":J()}],"rounded-r":[{"rounded-r":J()}],"rounded-b":[{"rounded-b":J()}],"rounded-l":[{"rounded-l":J()}],"rounded-ss":[{"rounded-ss":J()}],"rounded-se":[{"rounded-se":J()}],"rounded-ee":[{"rounded-ee":J()}],"rounded-es":[{"rounded-es":J()}],"rounded-tl":[{"rounded-tl":J()}],"rounded-tr":[{"rounded-tr":J()}],"rounded-br":[{"rounded-br":J()}],"rounded-bl":[{"rounded-bl":J()}],"border-w":[{border:oe()}],"border-w-x":[{"border-x":oe()}],"border-w-y":[{"border-y":oe()}],"border-w-s":[{"border-s":oe()}],"border-w-e":[{"border-e":oe()}],"border-w-bs":[{"border-bs":oe()}],"border-w-be":[{"border-be":oe()}],"border-w-t":[{"border-t":oe()}],"border-w-r":[{"border-r":oe()}],"border-w-b":[{"border-b":oe()}],"border-w-l":[{"border-l":oe()}],"divide-x":[{"divide-x":oe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":oe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...U(),"hidden","none"]}],"divide-style":[{divide:[...U(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-bs":[{"border-bs":D()}],"border-color-be":[{"border-be":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...U(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ye,ve,ge]}],"outline-w":[{outline:["",Ye,ea,zr]}],"outline-color":[{outline:D()}],shadow:[{shadow:["","none",d,ds,us]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",u,ds,us]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:oe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[Ye,zr]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":oe()}],"inset-ring-color":[{"inset-ring":D()}],"text-shadow":[{"text-shadow":["none",m,ds,us]}],"text-shadow-color":[{"text-shadow":D()}],opacity:[{opacity:[Ye,ve,ge]}],"mix-blend":[{"mix-blend":[...H(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":H()}],"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":[Ye]}],"mask-image-linear-from-pos":[{"mask-linear-from":te()}],"mask-image-linear-to-pos":[{"mask-linear-to":te()}],"mask-image-linear-from-color":[{"mask-linear-from":D()}],"mask-image-linear-to-color":[{"mask-linear-to":D()}],"mask-image-t-from-pos":[{"mask-t-from":te()}],"mask-image-t-to-pos":[{"mask-t-to":te()}],"mask-image-t-from-color":[{"mask-t-from":D()}],"mask-image-t-to-color":[{"mask-t-to":D()}],"mask-image-r-from-pos":[{"mask-r-from":te()}],"mask-image-r-to-pos":[{"mask-r-to":te()}],"mask-image-r-from-color":[{"mask-r-from":D()}],"mask-image-r-to-color":[{"mask-r-to":D()}],"mask-image-b-from-pos":[{"mask-b-from":te()}],"mask-image-b-to-pos":[{"mask-b-to":te()}],"mask-image-b-from-color":[{"mask-b-from":D()}],"mask-image-b-to-color":[{"mask-b-to":D()}],"mask-image-l-from-pos":[{"mask-l-from":te()}],"mask-image-l-to-pos":[{"mask-l-to":te()}],"mask-image-l-from-color":[{"mask-l-from":D()}],"mask-image-l-to-color":[{"mask-l-to":D()}],"mask-image-x-from-pos":[{"mask-x-from":te()}],"mask-image-x-to-pos":[{"mask-x-to":te()}],"mask-image-x-from-color":[{"mask-x-from":D()}],"mask-image-x-to-color":[{"mask-x-to":D()}],"mask-image-y-from-pos":[{"mask-y-from":te()}],"mask-image-y-to-pos":[{"mask-y-to":te()}],"mask-image-y-from-color":[{"mask-y-from":D()}],"mask-image-y-to-color":[{"mask-y-to":D()}],"mask-image-radial":[{"mask-radial":[ve,ge]}],"mask-image-radial-from-pos":[{"mask-radial-from":te()}],"mask-image-radial-to-pos":[{"mask-radial-to":te()}],"mask-image-radial-from-color":[{"mask-radial-from":D()}],"mask-image-radial-to-color":[{"mask-radial-to":D()}],"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":C()}],"mask-image-conic-pos":[{"mask-conic":[Ye]}],"mask-image-conic-from-pos":[{"mask-conic-from":te()}],"mask-image-conic-to-pos":[{"mask-conic-to":te()}],"mask-image-conic-from-color":[{"mask-conic-from":D()}],"mask-image-conic-to-color":[{"mask-conic-to":D()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:re()}],"mask-repeat":[{mask:pe()}],"mask-size":[{mask:G()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ve,ge]}],filter:[{filter:["","none",ve,ge]}],blur:[{blur:xe()}],brightness:[{brightness:[Ye,ve,ge]}],contrast:[{contrast:[Ye,ve,ge]}],"drop-shadow":[{"drop-shadow":["","none",g,ds,us]}],"drop-shadow-color":[{"drop-shadow":D()}],grayscale:[{grayscale:["",Ye,ve,ge]}],"hue-rotate":[{"hue-rotate":[Ye,ve,ge]}],invert:[{invert:["",Ye,ve,ge]}],saturate:[{saturate:[Ye,ve,ge]}],sepia:[{sepia:["",Ye,ve,ge]}],"backdrop-filter":[{"backdrop-filter":["","none",ve,ge]}],"backdrop-blur":[{"backdrop-blur":xe()}],"backdrop-brightness":[{"backdrop-brightness":[Ye,ve,ge]}],"backdrop-contrast":[{"backdrop-contrast":[Ye,ve,ge]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ye,ve,ge]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ye,ve,ge]}],"backdrop-invert":[{"backdrop-invert":["",Ye,ve,ge]}],"backdrop-opacity":[{"backdrop-opacity":[Ye,ve,ge]}],"backdrop-saturate":[{"backdrop-saturate":[Ye,ve,ge]}],"backdrop-sepia":[{"backdrop-sepia":["",Ye,ve,ge]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ve,ge]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ye,"initial",ve,ge]}],ease:[{ease:["linear","initial",v,ve,ge]}],delay:[{delay:[Ye,ve,ge]}],animate:[{animate:["none",w,ve,ge]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,ve,ge]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:Re()}],"rotate-x":[{"rotate-x":Re()}],"rotate-y":[{"rotate-y":Re()}],"rotate-z":[{"rotate-z":Re()}],scale:[{scale:Y()}],"scale-x":[{"scale-x":Y()}],"scale-y":[{"scale-y":Y()}],"scale-z":[{"scale-z":Y()}],"scale-3d":["scale-3d"],skew:[{skew:we()}],"skew-x":[{"skew-x":we()}],"skew-y":[{"skew-y":we()}],transform:[{transform:[ve,ge,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:he()}],"translate-x":[{"translate-x":he()}],"translate-y":[{"translate-y":he()}],"translate-z":[{"translate-z":he()}],"translate-none":["translate-none"],zoom:[{zoom:[En,ve,ge]}],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ve,ge]}],"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":D()}],"scrollbar-track-color":[{"scrollbar-track":D()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mbs":[{"scroll-mbs":R()}],"scroll-mbe":[{"scroll-mbe":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pbs":[{"scroll-pbs":R()}],"scroll-pbe":[{"scroll-pbe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ve,ge]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[Ye,ea,zr,ip]}],stroke:[{stroke:["none",...D()]}],"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"]}},$M=hM(zM);function N(...e){return $M(Vh(e))}const ng=P.createContext(null);function up(){return typeof window<"u"?window.matchMedia("(prefers-color-scheme: dark)").matches:!1}function LM({seedColor:e,tokens:t,mode:n="auto",radius:r=.875,children:o,className:a,style:s}){const{light:i,dark:l}=P.useMemo(()=>$h(e,t,r),[e,t,r]),[c,d]=P.useState(()=>n==="dark"?!0:n==="light"?!1:up());P.useEffect(()=>{if(n==="dark"){d(!0);return}if(n==="light"){d(!1);return}d(up());const b=window.matchMedia("(prefers-color-scheme: dark)"),h=x=>d(x.matches);return b.addEventListener("change",h),()=>b.removeEventListener("change",h)},[n]);const u=c?l:i,m=P.useMemo(()=>Lh(u),[u]);P.useEffect(()=>{const b=document.documentElement;return Object.entries(m).forEach(([h,x])=>b.style.setProperty(h,x)),b.classList.toggle("dark",c),()=>{Object.keys(m).forEach(h=>b.style.removeProperty(h)),b.classList.remove("dark")}},[m,c]);const g=P.useMemo(()=>({light:i,dark:l,activeTokens:u,seedColor:e,isDark:c}),[i,l,u,e,c]);return p.jsx(ng.Provider,{value:g,children:p.jsx("div",{className:N(c?"dark":"",a),style:{...m,...s},children:o})})}function FM(){const e=P.useContext(ng);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e}const dp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,fp=Vh,wn=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return fp(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(c=>{const d=n==null?void 0:n[c],u=a==null?void 0:a[c];if(d===null)return null;const m=dp(d)||dp(u);return o[c][m]}),i=n&&Object.entries(n).reduce((c,d)=>{let[u,m]=d;return m===void 0||(c[u]=m),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,d)=>{let{class:u,className:m,...g}=d;return Object.entries(g).every(b=>{let[h,x]=b;return Array.isArray(x)?x.includes({...a,...i}[h]):{...a,...i}[h]===x})?[...c,u,m]:c},[]);return fp(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)};function pp(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Pu(...e){return t=>{let n=!1;const r=e.map(o=>{const a=pp(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():pp(e[o],null)}}}}function _e(...e){return f.useCallback(Pu(...e),e)}function vr(e){const t=f.forwardRef((n,r)=>{let{children:o,...a}=n,s=null,i=!1;const l=[];mp(o)&&typeof fs=="function"&&(o=fs(o._payload)),f.Children.forEach(o,m=>{var g;if(HM(m)){i=!0;const b=m;let h="child"in b.props?b.props.child:b.props.children;mp(h)&&typeof fs=="function"&&(h=fs(h._payload)),s=VM(b,h),l.push((g=s==null?void 0:s.props)==null?void 0:g.children)}else l.push(m)}),s?s=f.cloneElement(s,void 0,l):!i&&f.Children.count(o)===1&&f.isValidElement(o)&&(s=o);const c=s?BM(s):void 0,d=_e(r,c);if(!s){if(o||o===0)throw new Error(i?KM(e):UM(e));return o}const u=WM(a,s.props??{});return s.type!==f.Fragment&&(u.ref=r?d:c),f.cloneElement(s,u)});return t.displayName=`${e}.Slot`,t}var zn=vr("Slot"),rg=Symbol.for("radix.slottable");function og(e){const t=n=>"child"in n?n.children(n.child):n.children;return t.displayName=`${e}.Slottable`,t.__radixId=rg,t}var VM=(e,t)=>{if("child"in e.props){const n=e.props.child;return f.isValidElement(n)?f.cloneElement(n,void 0,e.props.children(n.props.children)):null}return f.isValidElement(t)?t:null};function WM(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...i)=>{const l=a(...i);return o(...i),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function BM(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function HM(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===rg}var GM=Symbol.for("react.lazy");function mp(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===GM&&"_payload"in e&&YM(e._payload)}function YM(e){return typeof e=="object"&&e!==null&&"then"in e}var UM=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,KM=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,fs=f[" use ".trim().toString()],qM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],de=qM.reduce((e,t)=>{const n=vr(`Primitive.${t}`),r=f.forwardRef((o,a)=>{const{asChild:s,...i}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...i,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function ag(e,t){e&&jn.flushSync(()=>e.dispatchEvent(t))}var sg=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),XM="VisuallyHidden",ig=f.forwardRef((e,t)=>p.jsx(de.span,{...e,ref:t,style:{...sg,...e.style}}));ig.displayName=XM;var ZM=ig;function QM(e,t){const n=f.createContext(t);n.displayName=e+"Context";const r=a=>{const{children:s,...i}=a,l=f.useMemo(()=>i,Object.values(i));return p.jsx(n.Provider,{value:l,children:s})};r.displayName=e+"Provider";function o(a){const s=f.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function ht(e,t=[]){let n=[];function r(a,s){const i=f.createContext(s);i.displayName=a+"Context";const l=n.length;n=[...n,s];const c=u=>{var v;const{scope:m,children:g,...b}=u,h=((v=m==null?void 0:m[e])==null?void 0:v[l])||i,x=f.useMemo(()=>b,Object.values(b));return p.jsx(h.Provider,{value:x,children:g})};c.displayName=a+"Provider";function d(u,m){var h;const g=((h=m==null?void 0:m[e])==null?void 0:h[l])||i,b=f.useContext(g);if(b)return b;if(s!==void 0)return s;throw new Error(`\`${u}\` must be used within \`${a}\``)}return[c,d]}const o=()=>{const a=n.map(s=>f.createContext(s));return function(i){const l=(i==null?void 0:i[e])||a;return f.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return o.scopeName=e,[r,JM(o,...t)]}function JM(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=r.reduce((i,{useScope:l,scopeName:c})=>{const u=l(a)[`__scope${c}`];return{...i,...u}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Ri(e){const t=e+"CollectionProvider",[n,r]=ht(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=h=>{const{scope:x,children:v}=h,w=f.useRef(null),y=f.useRef(new Map).current;return p.jsx(o,{scope:x,itemMap:y,collectionRef:w,children:v})};s.displayName=t;const i=e+"CollectionSlot",l=vr(i),c=f.forwardRef((h,x)=>{const{scope:v,children:w}=h,y=a(i,v),C=_e(x,y.collectionRef);return p.jsx(l,{ref:C,children:w})});c.displayName=i;const d=e+"CollectionItemSlot",u="data-radix-collection-item",m=vr(d),g=f.forwardRef((h,x)=>{const{scope:v,children:w,...y}=h,C=f.useRef(null),E=_e(x,C),S=a(d,v);return f.useEffect(()=>(S.itemMap.set(C,{ref:C,...y}),()=>void S.itemMap.delete(C))),p.jsx(m,{[u]:"",ref:E,children:w})});g.displayName=d;function b(h){const x=a(e+"CollectionConsumer",h);return f.useCallback(()=>{const w=x.collectionRef.current;if(!w)return[];const y=Array.from(w.querySelectorAll(`[${u}]`));return Array.from(x.itemMap.values()).sort((S,M)=>y.indexOf(S.ref.current)-y.indexOf(M.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:s,Slot:c,ItemSlot:g},b,r]}function Q(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var mt=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{},eR=f[" useInsertionEffect ".trim().toString()]||mt;function Nt({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,s]=tR({defaultProp:t,onChange:n}),i=e!==void 0,l=i?e:o;{const d=f.useRef(e!==void 0);f.useEffect(()=>{const u=d.current;u!==i&&console.warn(`${r} is changing from ${u?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=i},[i,r])}const c=f.useCallback(d=>{var u;if(i){const m=nR(d)?d(e):d;m!==e&&((u=s.current)==null||u.call(s,m))}else a(d)},[i,e,a,s]);return[l,c]}function tR({defaultProp:e,onChange:t}){const[n,r]=f.useState(e),o=f.useRef(n),a=f.useRef(t);return eR(()=>{a.current=t},[t]),f.useEffect(()=>{var s;o.current!==n&&((s=a.current)==null||s.call(a,n),o.current=n)},[n,o]),[n,r,a]}function nR(e){return typeof e=="function"}function rR(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var yt=e=>{const{present:t,children:n}=e,r=oR(t),o=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),a=aR(r.ref,sR(o));return typeof n=="function"||r.isPresent?f.cloneElement(o,{ref:a}):null};yt.displayName="Presence";function oR(e){const[t,n]=f.useState(),r=f.useRef(null),o=f.useRef(e),a=f.useRef("none"),s=e?"mounted":"unmounted",[i,l]=rR(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const c=ps(r.current);a.current=i==="mounted"?c:"none"},[i]),mt(()=>{const c=r.current,d=o.current;if(d!==e){const m=a.current,g=ps(c);e?l("MOUNT"):g==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&m!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),mt(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,u=g=>{const h=ps(r.current).includes(CSS.escape(g.animationName));if(g.target===t&&h&&(l("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},m=g=>{g.target===t&&(a.current=ps(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:f.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function hp(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function aR(...e){const t=f.useRef(e);return t.current=e,f.useCallback(n=>{const r=t.current;let o=!1;const a=r.map(s=>{const i=hp(s,n);return!o&&typeof i=="function"&&(o=!0),i});if(o)return()=>{for(let s=0;s<a.length;s++){const i=a[s];typeof i=="function"?i():hp(r[s],null)}}},[])}function ps(e){return(e==null?void 0:e.animationName)||"none"}function sR(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var iR=f[" useId ".trim().toString()]||(()=>{}),lR=0;function Yt(e){const[t,n]=f.useState(iR());return mt(()=>{n(r=>r??String(lR++))},[e]),e||(t?`radix-${t}`:"")}var ki="Collapsible",[cR]=ht(ki),[uR,Nu]=cR(ki),lg=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:s,...i}=e,[l,c]=Nt({prop:r,defaultProp:o??!1,onChange:s,caller:ki});return p.jsx(uR,{scope:n,disabled:a,contentId:Yt(),open:l,onOpenToggle:f.useCallback(()=>c(d=>!d),[c]),children:p.jsx(de.div,{"data-state":Iu(l),"data-disabled":a?"":void 0,...i,ref:t})})});lg.displayName=ki;var cg="CollapsibleTrigger",ug=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Nu(cg,n);return p.jsx(de.button,{type:"button","aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open||!1,"data-state":Iu(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:Q(e.onClick,o.onOpenToggle)})});ug.displayName=cg;var Tu="CollapsibleContent",dg=f.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Nu(Tu,e.__scopeCollapsible);return p.jsx(yt,{present:n||o.open,children:({present:a})=>p.jsx(dR,{...r,ref:t,present:a})})});dg.displayName=Tu;var dR=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,s=Nu(Tu,n),[i,l]=f.useState(r),c=f.useRef(null),d=_e(t,c),u=f.useRef(0),m=u.current,g=f.useRef(0),b=g.current,h=s.open||i,x=f.useRef(h),v=f.useRef(void 0);return f.useEffect(()=>{const w=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(w)},[]),mt(()=>{const w=c.current;if(w){v.current=v.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const y=w.getBoundingClientRect();u.current=y.height,g.current=y.width,x.current||(w.style.transitionDuration=v.current.transitionDuration,w.style.animationName=v.current.animationName),l(r)}},[s.open,r]),p.jsx(de.div,{"data-state":Iu(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!h,...a,ref:d,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:h&&o})});function Iu(e){return e?"open":"closed"}var fR=lg,pR=f.createContext(void 0);function Sr(e){const t=f.useContext(pR);return e||t||"ltr"}function kt(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>((...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)}),[])}function mR(e,t=globalThis==null?void 0:globalThis.document){const n=kt(e);f.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var hR="DismissableLayer",Bc="dismissableLayer.update",gR="dismissableLayer.pointerDownOutside",bR="dismissableLayer.focusOutside",gp,fg=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ho=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...l}=e,c=f.useContext(fg),[d,u]=f.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=f.useState({}),b=_e(t,M=>u(M)),h=Array.from(c.layers),[x]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=h.indexOf(x),w=d?h.indexOf(d):-1,y=c.layersWithOutsidePointerEventsDisabled.size>0,C=w>=v,E=yR(M=>{const R=M.target,I=[...c.branches].some(O=>O.contains(R));!C||I||(o==null||o(M),s==null||s(M),M.defaultPrevented||i==null||i())},m),S=wR(M=>{const R=M.target;[...c.branches].some(O=>O.contains(R))||(a==null||a(M),s==null||s(M),M.defaultPrevented||i==null||i())},m);return mR(M=>{w===c.layers.size-1&&(r==null||r(M),!M.defaultPrevented&&i&&(M.preventDefault(),i()))},m),f.useEffect(()=>{if(d)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(gp=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),bp(),()=>{n&&(c.layersWithOutsidePointerEventsDisabled.delete(d),c.layersWithOutsidePointerEventsDisabled.size===0&&(m.body.style.pointerEvents=gp))}},[d,m,n,c]),f.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),bp())},[d,c]),f.useEffect(()=>{const M=()=>g({});return document.addEventListener(Bc,M),()=>document.removeEventListener(Bc,M)},[]),p.jsx(de.div,{...l,ref:b,style:{pointerEvents:y?C?"auto":"none":void 0,...e.style},onFocusCapture:Q(e.onFocusCapture,S.onFocusCapture),onBlurCapture:Q(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:Q(e.onPointerDownCapture,E.onPointerDownCapture)})});Ho.displayName=hR;var vR="DismissableLayerBranch",xR=f.forwardRef((e,t)=>{const n=f.useContext(fg),r=f.useRef(null),o=_e(t,r);return f.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),p.jsx(de.div,{...e,ref:o})});xR.displayName=vR;function yR(e,t=globalThis==null?void 0:globalThis.document){const n=kt(e),r=f.useRef(!1),o=f.useRef(()=>{});return f.useEffect(()=>{const a=i=>{if(i.target&&!r.current){let l=function(){pg(gR,n,c,{discrete:!0})};const c={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function wR(e,t=globalThis==null?void 0:globalThis.document){const n=kt(e),r=f.useRef(!1);return f.useEffect(()=>{const o=a=>{a.target&&!r.current&&pg(bR,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function bp(){const e=new CustomEvent(Bc);document.dispatchEvent(e)}function pg(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?ag(o,a):o.dispatchEvent(a)}var tc="focusScope.autoFocusOnMount",nc="focusScope.autoFocusOnUnmount",vp={bubbles:!1,cancelable:!0},CR="FocusScope",Aa=f.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,l]=f.useState(null),c=kt(o),d=kt(a),u=f.useRef(null),m=_e(t,h=>l(h)),g=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(r){let h=function(y){if(g.paused||!i)return;const C=y.target;i.contains(C)?u.current=C:lr(u.current,{select:!0})},x=function(y){if(g.paused||!i)return;const C=y.relatedTarget;C!==null&&(i.contains(C)||lr(u.current,{select:!0}))},v=function(y){if(document.activeElement===document.body)for(const E of y)E.removedNodes.length>0&&lr(i)};document.addEventListener("focusin",h),document.addEventListener("focusout",x);const w=new MutationObserver(v);return i&&w.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",x),w.disconnect()}}},[r,i,g.paused]),f.useEffect(()=>{if(i){yp.add(g);const h=document.activeElement;if(!i.contains(h)){const v=new CustomEvent(tc,vp);i.addEventListener(tc,c),i.dispatchEvent(v),v.defaultPrevented||(SR(PR(mg(i)),{select:!0}),document.activeElement===h&&lr(i))}return()=>{i.removeEventListener(tc,c),setTimeout(()=>{const v=new CustomEvent(nc,vp);i.addEventListener(nc,d),i.dispatchEvent(v),v.defaultPrevented||lr(h??document.body,{select:!0}),i.removeEventListener(nc,d),yp.remove(g)},0)}}},[i,c,d,g]);const b=f.useCallback(h=>{if(!n&&!r||g.paused)return;const x=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,v=document.activeElement;if(x&&v){const w=h.currentTarget,[y,C]=ER(w);y&&C?!h.shiftKey&&v===C?(h.preventDefault(),n&&lr(y,{select:!0})):h.shiftKey&&v===y&&(h.preventDefault(),n&&lr(C,{select:!0})):v===w&&h.preventDefault()}},[n,r,g.paused]);return p.jsx(de.div,{tabIndex:-1,...s,ref:m,onKeyDown:b})});Aa.displayName=CR;function SR(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(lr(r,{select:t}),document.activeElement!==n)return}function ER(e){const t=mg(e),n=xp(t,e),r=xp(t.reverse(),e);return[n,r]}function mg(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function xp(e,t){for(const n of e)if(!MR(n,{upTo:t}))return n}function MR(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 RR(e){return e instanceof HTMLInputElement&&"select"in e}function lr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&RR(e)&&t&&e.select()}}var yp=kR();function kR(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=wp(e,t),e.unshift(t)},remove(t){var n;e=wp(e,t),(n=e[0])==null||n.resume()}}}function wp(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function PR(e){return e.filter(t=>t.tagName!=="A")}var NR="Portal",Go=f.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,a]=f.useState(!1);mt(()=>a(!0),[]);const s=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?jn.createPortal(p.jsx(de.div,{...r,ref:t}),s):null});Go.displayName=NR;var ms=0,Mn=null;function Pi(){f.useEffect(()=>{Mn||(Mn={start:Cp(),end:Cp()});const{start:e,end:t}=Mn;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),ms++,()=>{ms===1&&(Mn==null||Mn.start.remove(),Mn==null||Mn.end.remove(),Mn=null),ms=Math.max(0,ms-1)}},[])}function Cp(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var In=function(){return In=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},In.apply(this,arguments)};function hg(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 o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function TR(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Os="right-scroll-bar-position",Ds="width-before-scroll-bar",IR="with-scroll-bars-hidden",_R="--removed-body-scroll-bar-size";function rc(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function OR(e,t){var n=P.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var DR=typeof window<"u"?f.useLayoutEffect:f.useEffect,Sp=new WeakMap;function AR(e,t){var n=OR(null,function(r){return e.forEach(function(o){return rc(o,r)})});return DR(function(){var r=Sp.get(n);if(r){var o=new Set(r),a=new Set(e),s=n.current;o.forEach(function(i){a.has(i)||rc(i,null)}),a.forEach(function(i){o.has(i)||rc(i,s)})}Sp.set(n,e)},[e]),n}function jR(e){return e}function zR(e,t){t===void 0&&(t=jR);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var s=t(a,r);return n.push(s),function(){n=n.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(r=!0;n.length;){var s=n;n=[],s.forEach(a)}n={push:function(i){return a(i)},filter:function(){return n}}},assignMedium:function(a){r=!0;var s=[];if(n.length){var i=n;n=[],i.forEach(a),s=n}var l=function(){var d=s;s=[],d.forEach(a)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(d){s.push(d),c()},filter:function(d){return s=s.filter(d),n}}}};return o}function $R(e){e===void 0&&(e={});var t=zR(null);return t.options=In({async:!0,ssr:!1},e),t}var gg=function(e){var t=e.sideCar,n=hg(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return f.createElement(r,In({},n))};gg.isSideCarExport=!0;function LR(e,t){return e.useMedium(t),gg}var bg=$R(),oc=function(){},Ni=f.forwardRef(function(e,t){var n=f.useRef(null),r=f.useState({onScrollCapture:oc,onWheelCapture:oc,onTouchMoveCapture:oc}),o=r[0],a=r[1],s=e.forwardProps,i=e.children,l=e.className,c=e.removeScrollBar,d=e.enabled,u=e.shards,m=e.sideCar,g=e.noRelative,b=e.noIsolation,h=e.inert,x=e.allowPinchZoom,v=e.as,w=v===void 0?"div":v,y=e.gapMode,C=hg(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=m,S=AR([n,t]),M=In(In({},C),o);return f.createElement(f.Fragment,null,d&&f.createElement(E,{sideCar:bg,removeScrollBar:c,shards:u,noRelative:g,noIsolation:b,inert:h,setCallbacks:a,allowPinchZoom:!!x,lockRef:n,gapMode:y}),s?f.cloneElement(f.Children.only(i),In(In({},M),{ref:S})):f.createElement(w,In({},M,{className:l,ref:S}),i))});Ni.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ni.classNames={fullWidth:Ds,zeroRight:Os};var FR=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function VR(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=FR();return t&&e.setAttribute("nonce",t),e}function WR(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function BR(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var HR=function(){var e=0,t=null;return{add:function(n){e==0&&(t=VR())&&(WR(t,n),BR(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},GR=function(){var e=HR();return function(t,n){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},vg=function(){var e=GR(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},YR={left:0,top:0,right:0,gap:0},ac=function(e){return parseInt(e||"",10)||0},UR=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[ac(n),ac(r),ac(o)]},KR=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return YR;var t=UR(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])}},qR=vg(),Ro="data-scroll-locked",XR=function(e,t,n,r){var o=e.left,a=e.top,s=e.right,i=e.gap;return n===void 0&&(n="margin"),`
|
|
5
|
+
.`.concat(IR,` {
|
|
6
|
+
overflow: hidden `).concat(r,`;
|
|
7
|
+
padding-right: `).concat(i,"px ").concat(r,`;
|
|
8
|
+
}
|
|
9
|
+
body[`).concat(Ro,`] {
|
|
10
|
+
overflow: hidden `).concat(r,`;
|
|
11
|
+
overscroll-behavior: contain;
|
|
12
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
13
|
+
padding-left: `.concat(o,`px;
|
|
14
|
+
padding-top: `).concat(a,`px;
|
|
15
|
+
padding-right: `).concat(s,`px;
|
|
16
|
+
margin-left:0;
|
|
17
|
+
margin-top:0;
|
|
18
|
+
margin-right: `).concat(i,"px ").concat(r,`;
|
|
19
|
+
`),n==="padding"&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.`).concat(Os,` {
|
|
23
|
+
right: `).concat(i,"px ").concat(r,`;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.`).concat(Ds,` {
|
|
27
|
+
margin-right: `).concat(i,"px ").concat(r,`;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.`).concat(Os," .").concat(Os,` {
|
|
31
|
+
right: 0 `).concat(r,`;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.`).concat(Ds," .").concat(Ds,` {
|
|
35
|
+
margin-right: 0 `).concat(r,`;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
body[`).concat(Ro,`] {
|
|
39
|
+
`).concat(_R,": ").concat(i,`px;
|
|
40
|
+
}
|
|
41
|
+
`)},Ep=function(){var e=parseInt(document.body.getAttribute(Ro)||"0",10);return isFinite(e)?e:0},ZR=function(){f.useEffect(function(){return document.body.setAttribute(Ro,(Ep()+1).toString()),function(){var e=Ep()-1;e<=0?document.body.removeAttribute(Ro):document.body.setAttribute(Ro,e.toString())}},[])},QR=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;ZR();var a=f.useMemo(function(){return KR(o)},[o]);return f.createElement(qR,{styles:XR(a,!t,o,n?"":"!important")})},Hc=!1;if(typeof window<"u")try{var hs=Object.defineProperty({},"passive",{get:function(){return Hc=!0,!0}});window.addEventListener("test",hs,hs),window.removeEventListener("test",hs,hs)}catch{Hc=!1}var mo=Hc?{passive:!1}:!1,JR=function(e){return e.tagName==="TEXTAREA"},xg=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!JR(e)&&n[t]==="visible")},ek=function(e){return xg(e,"overflowY")},tk=function(e){return xg(e,"overflowX")},Mp=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=yg(e,r);if(o){var a=wg(e,r),s=a[1],i=a[2];if(s>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},nk=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},rk=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},yg=function(e,t){return e==="v"?ek(t):tk(t)},wg=function(e,t){return e==="v"?nk(t):rk(t)},ok=function(e,t){return e==="h"&&t==="rtl"?-1:1},ak=function(e,t,n,r,o){var a=ok(e,window.getComputedStyle(t).direction),s=a*r,i=n.target,l=t.contains(i),c=!1,d=s>0,u=0,m=0;do{if(!i)break;var g=wg(e,i),b=g[0],h=g[1],x=g[2],v=h-x-a*b;(b||v)&&yg(e,i)&&(u+=v,m+=b);var w=i.parentNode;i=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!l&&i!==document.body||l&&(t.contains(i)||t===i));return(d&&Math.abs(u)<1||!d&&Math.abs(m)<1)&&(c=!0),c},gs=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Rp=function(e){return[e.deltaX,e.deltaY]},kp=function(e){return e&&"current"in e?e.current:e},sk=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ik=function(e){return`
|
|
42
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
43
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
44
|
+
`)},lk=0,ho=[];function ck(e){var t=f.useRef([]),n=f.useRef([0,0]),r=f.useRef(),o=f.useState(lk++)[0],a=f.useState(vg)[0],s=f.useRef(e);f.useEffect(function(){s.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=TR([e.lockRef.current],(e.shards||[]).map(kp),!0).filter(Boolean);return h.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=f.useCallback(function(h,x){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!s.current.allowPinchZoom;var v=gs(h),w=n.current,y="deltaX"in h?h.deltaX:w[0]-v[0],C="deltaY"in h?h.deltaY:w[1]-v[1],E,S=h.target,M=Math.abs(y)>Math.abs(C)?"h":"v";if("touches"in h&&M==="h"&&S.type==="range")return!1;var R=window.getSelection(),I=R&&R.anchorNode,O=I?I===S||I.contains(S):!1;if(O)return!1;var _=Mp(M,S);if(!_)return!0;if(_?E=M:(E=M==="v"?"h":"v",_=Mp(M,S)),!_)return!1;if(!r.current&&"changedTouches"in h&&(y||C)&&(r.current=E),!E)return!0;var T=r.current||E;return ak(T,x,h,T==="h"?y:C)},[]),l=f.useCallback(function(h){var x=h;if(!(!ho.length||ho[ho.length-1]!==a)){var v="deltaY"in x?Rp(x):gs(x),w=t.current.filter(function(E){return E.name===x.type&&(E.target===x.target||x.target===E.shadowParent)&&sk(E.delta,v)})[0];if(w&&w.should){x.cancelable&&x.preventDefault();return}if(!w){var y=(s.current.shards||[]).map(kp).filter(Boolean).filter(function(E){return E.contains(x.target)}),C=y.length>0?i(x,y[0]):!s.current.noIsolation;C&&x.cancelable&&x.preventDefault()}}},[]),c=f.useCallback(function(h,x,v,w){var y={name:h,delta:x,target:v,should:w,shadowParent:uk(v)};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(C){return C!==y})},1)},[]),d=f.useCallback(function(h){n.current=gs(h),r.current=void 0},[]),u=f.useCallback(function(h){c(h.type,Rp(h),h.target,i(h,e.lockRef.current))},[]),m=f.useCallback(function(h){c(h.type,gs(h),h.target,i(h,e.lockRef.current))},[]);f.useEffect(function(){return ho.push(a),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:m}),document.addEventListener("wheel",l,mo),document.addEventListener("touchmove",l,mo),document.addEventListener("touchstart",d,mo),function(){ho=ho.filter(function(h){return h!==a}),document.removeEventListener("wheel",l,mo),document.removeEventListener("touchmove",l,mo),document.removeEventListener("touchstart",d,mo)}},[]);var g=e.removeScrollBar,b=e.inert;return f.createElement(f.Fragment,null,b?f.createElement(a,{styles:ik(o)}):null,g?f.createElement(QR,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function uk(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const dk=LR(bg,ck);var ja=f.forwardRef(function(e,t){return f.createElement(Ni,In({},e,{ref:t,sideCar:dk}))});ja.classNames=Ni.classNames;var fk=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},go=new WeakMap,bs=new WeakMap,vs={},sc=0,Cg=function(e){return e&&(e.host||Cg(e.parentNode))},pk=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Cg(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},mk=function(e,t,n,r){var o=pk(t,Array.isArray(e)?e:[e]);vs[n]||(vs[n]=new WeakMap);var a=vs[n],s=[],i=new Set,l=new Set(o),c=function(u){!u||i.has(u)||(i.add(u),c(u.parentNode))};o.forEach(c);var d=function(u){!u||l.has(u)||Array.prototype.forEach.call(u.children,function(m){if(i.has(m))d(m);else try{var g=m.getAttribute(r),b=g!==null&&g!=="false",h=(go.get(m)||0)+1,x=(a.get(m)||0)+1;go.set(m,h),a.set(m,x),s.push(m),h===1&&b&&bs.set(m,!0),x===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",m,v)}})};return d(t),i.clear(),sc++,function(){s.forEach(function(u){var m=go.get(u)-1,g=a.get(u)-1;go.set(u,m),a.set(u,g),m||(bs.has(u)||u.removeAttribute(r),bs.delete(u)),g||u.removeAttribute(n)}),sc--,sc||(go=new WeakMap,go=new WeakMap,bs=new WeakMap,vs={})}},Ti=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=fk(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),mk(r,o,n,"aria-hidden")):function(){return null}},Ii="Dialog",[Sg,Eg]=ht(Ii),[hk,Cn]=Sg(Ii),Mg=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,i=f.useRef(null),l=f.useRef(null),[c,d]=Nt({prop:r,defaultProp:o??!1,onChange:a,caller:Ii});return p.jsx(hk,{scope:t,triggerRef:i,contentRef:l,contentId:Yt(),titleId:Yt(),descriptionId:Yt(),open:c,onOpenChange:d,onOpenToggle:f.useCallback(()=>d(u=>!u),[d]),modal:s,children:n})};Mg.displayName=Ii;var Rg="DialogTrigger",kg=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Cn(Rg,n),a=_e(t,o.triggerRef);return p.jsx(de.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":Du(o.open),...r,ref:a,onClick:Q(e.onClick,o.onOpenToggle)})});kg.displayName=Rg;var _u="DialogPortal",[gk,Pg]=Sg(_u,{forceMount:void 0}),Ng=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=Cn(_u,t);return p.jsx(gk,{scope:t,forceMount:n,children:f.Children.map(r,s=>p.jsx(yt,{present:n||a.open,children:p.jsx(Go,{asChild:!0,container:o,children:s})}))})};Ng.displayName=_u;var Us="DialogOverlay",Tg=f.forwardRef((e,t)=>{const n=Pg(Us,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Cn(Us,e.__scopeDialog);return a.modal?p.jsx(yt,{present:r||a.open,children:p.jsx(vk,{...o,ref:t})}):null});Tg.displayName=Us;var bk=vr("DialogOverlay.RemoveScroll"),vk=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Cn(Us,n);return p.jsx(ja,{as:bk,allowPinchZoom:!0,shards:[o.contentRef],children:p.jsx(de.div,{"data-state":Du(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Gr="DialogContent",Ig=f.forwardRef((e,t)=>{const n=Pg(Gr,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Cn(Gr,e.__scopeDialog);return p.jsx(yt,{present:r||a.open,children:a.modal?p.jsx(xk,{...o,ref:t}):p.jsx(yk,{...o,ref:t})})});Ig.displayName=Gr;var xk=f.forwardRef((e,t)=>{const n=Cn(Gr,e.__scopeDialog),r=f.useRef(null),o=_e(t,n.contentRef,r);return f.useEffect(()=>{const a=r.current;if(a)return Ti(a)},[]),p.jsx(_g,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:Q(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:Q(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,i=s.button===0&&s.ctrlKey===!0;(s.button===2||i)&&a.preventDefault()}),onFocusOutside:Q(e.onFocusOutside,a=>a.preventDefault())})}),yk=f.forwardRef((e,t)=>{const n=Cn(Gr,e.__scopeDialog),r=f.useRef(!1),o=f.useRef(!1);return p.jsx(_g,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,i;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(i=n.triggerRef.current)==null||i.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((c=n.triggerRef.current)==null?void 0:c.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),_g=f.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...s}=e,i=Cn(Gr,n),l=f.useRef(null),c=_e(t,l);return Pi(),p.jsxs(p.Fragment,{children:[p.jsx(Aa,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:p.jsx(Ho,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Du(i.open),...s,ref:c,onDismiss:()=>i.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(Ck,{titleId:i.titleId}),p.jsx(Ek,{contentRef:l,descriptionId:i.descriptionId})]})]})}),Ou="DialogTitle",Og=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Cn(Ou,n);return p.jsx(de.h2,{id:o.titleId,...r,ref:t})});Og.displayName=Ou;var Dg="DialogDescription",Ag=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Cn(Dg,n);return p.jsx(de.p,{id:o.descriptionId,...r,ref:t})});Ag.displayName=Dg;var jg="DialogClose",zg=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Cn(jg,n);return p.jsx(de.button,{type:"button",...r,ref:t,onClick:Q(e.onClick,()=>o.onOpenChange(!1))})});zg.displayName=jg;function Du(e){return e?"open":"closed"}var $g="DialogTitleWarning",[wk,Lg]=QM($g,{contentName:Gr,titleName:Ou,docsSlug:"dialog"}),Ck=({titleId:e})=>{const t=Lg($g),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
45
|
+
|
|
46
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
47
|
+
|
|
48
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return f.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Sk="DialogDescriptionWarning",Ek=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Lg(Sk).contentName}}.`;return f.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Au=Mg,ju=kg,zu=Ng,$u=Tg,Lu=Ig,Fu=Og,Vu=Ag,no=zg,Fg="AlertDialog",[Mk]=ht(Fg,[Eg]),tr=Eg(),Vg=e=>{const{__scopeAlertDialog:t,...n}=e,r=tr(t);return p.jsx(Au,{...r,...n,modal:!0})};Vg.displayName=Fg;var Rk="AlertDialogTrigger",Wg=f.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=tr(n);return p.jsx(ju,{...o,...r,ref:t})});Wg.displayName=Rk;var kk="AlertDialogPortal",Bg=e=>{const{__scopeAlertDialog:t,...n}=e,r=tr(t);return p.jsx(zu,{...r,...n})};Bg.displayName=kk;var Pk="AlertDialogOverlay",Hg=f.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=tr(n);return p.jsx($u,{...o,...r,ref:t})});Hg.displayName=Pk;var ko="AlertDialogContent",[Nk,Tk]=Mk(ko),Ik=og("AlertDialogContent"),Gg=f.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...o}=e,a=tr(n),s=f.useRef(null),i=_e(t,s),l=f.useRef(null);return p.jsx(wk,{contentName:ko,titleName:Yg,docsSlug:"alert-dialog",children:p.jsx(Nk,{scope:n,cancelRef:l,children:p.jsxs(Lu,{role:"alertdialog",...a,...o,ref:i,onOpenAutoFocus:Q(o.onOpenAutoFocus,c=>{var d;c.preventDefault(),(d=l.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:c=>c.preventDefault(),onInteractOutside:c=>c.preventDefault(),children:[p.jsx(Ik,{children:r}),p.jsx(Ok,{contentRef:s})]})})})});Gg.displayName=ko;var Yg="AlertDialogTitle",Ug=f.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=tr(n);return p.jsx(Fu,{...o,...r,ref:t})});Ug.displayName=Yg;var Kg="AlertDialogDescription",qg=f.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=tr(n);return p.jsx(Vu,{...o,...r,ref:t})});qg.displayName=Kg;var _k="AlertDialogAction",Xg=f.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=tr(n);return p.jsx(no,{...o,...r,ref:t})});Xg.displayName=_k;var Zg="AlertDialogCancel",Qg=f.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=Tk(Zg,n),a=tr(n),s=_e(t,o);return p.jsx(no,{...a,...r,ref:s})});Qg.displayName=Zg;var Ok=({contentRef:e})=>{const t=`\`${ko}\` requires a description for the component to be accessible for screen reader users.
|
|
49
|
+
|
|
50
|
+
You can add a description to the \`${ko}\` by passing a \`${Kg}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
51
|
+
|
|
52
|
+
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${ko}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
53
|
+
|
|
54
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return f.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},Dk=Vg,Ak=Wg,jk=Bg,zk=Hg,$k=Gg,Lk=Xg,Fk=Qg,Vk=Ug,Wk=qg,Bk="AspectRatio",Jg=f.forwardRef((e,t)=>{const{ratio:n=1/1,style:r,...o}=e;return p.jsx("div",{style:{position:"relative",width:"100%",paddingBottom:`${100/n}%`},"data-radix-aspect-ratio-wrapper":"",children:p.jsx(de.div,{...o,ref:t,style:{...r,position:"absolute",top:0,right:0,bottom:0,left:0}})})});Jg.displayName=Bk;var Hk=Jg,ic=!1;function Gk(){const[e,t]=f.useState(ic);return f.useEffect(()=>{ic||(ic=!0,t(!0))},[]),e}var eb=f[" useSyncExternalStore ".trim().toString()];function Yk(){return()=>{}}function Uk(){return eb(Yk,()=>!0,()=>!1)}var Kk=typeof eb=="function"?Uk:Gk,Wu="Avatar",[qk]=ht(Wu),[Xk,tb]=qk(Wu),nb=f.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,a]=f.useState("idle");return p.jsx(Xk,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:p.jsx(de.span,{...r,ref:t})})});nb.displayName=Wu;var rb="AvatarImage",ob=f.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...a}=e,s=tb(rb,n),i=Zk(r,a),l=kt(c=>{o(c),s.onImageLoadingStatusChange(c)});return mt(()=>{i!=="idle"&&l(i)},[i,l]),i==="loaded"?p.jsx(de.img,{...a,ref:t,src:r}):null});ob.displayName=rb;var ab="AvatarFallback",sb=f.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,a=tb(ab,n),[s,i]=f.useState(r===void 0);return f.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>i(!0),r);return()=>window.clearTimeout(l)}},[r]),s&&a.imageLoadingStatus!=="loaded"?p.jsx(de.span,{...o,ref:t}):null});sb.displayName=ab;function Pp(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function Zk(e,{referrerPolicy:t,crossOrigin:n}){const r=Kk(),o=f.useRef(null),a=r?(o.current||(o.current=new window.Image),o.current):null,[s,i]=f.useState(()=>Pp(a,e));return mt(()=>{i(Pp(a,e))},[a,e]),mt(()=>{const l=u=>()=>{i(u)};if(!a)return;const c=l("loaded"),d=l("error");return a.addEventListener("load",c),a.addEventListener("error",d),t&&(a.referrerPolicy=t),typeof n=="string"&&(a.crossOrigin=n),()=>{a.removeEventListener("load",c),a.removeEventListener("error",d)}},[a,n,t]),s}var Qk=nb,Jk=ob,eP=sb;function za(e){const t=f.useRef({value:e,previous:e});return f.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function $a(e){const[t,n]=f.useState(void 0);return mt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,i;if("borderBoxSize"in a){const l=a.borderBoxSize,c=Array.isArray(l)?l[0]:l;s=c.inlineSize,i=c.blockSize}else s=e.offsetWidth,i=e.offsetHeight;n({width:s,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var _i="Checkbox",[tP]=ht(_i),[nP,Bu]=tP(_i);function rP(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:a,form:s,name:i,onCheckedChange:l,required:c,value:d="on",internal_do_not_use_render:u}=e,[m,g]=Nt({prop:n,defaultProp:o??!1,onChange:l,caller:_i}),[b,h]=f.useState(null),[x,v]=f.useState(null),w=f.useRef(!1),y=b?!!s||!!b.closest("form"):!0,C={checked:m,disabled:a,setChecked:g,control:b,setControl:h,name:i,form:s,value:d,hasConsumerStoppedPropagationRef:w,required:c,defaultChecked:fr(o)?!1:o,isFormControl:y,bubbleInput:x,setBubbleInput:v};return p.jsx(nP,{scope:t,...C,children:oP(u)?u(C):r})}var ib="CheckboxTrigger",lb=f.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:a,value:s,disabled:i,checked:l,required:c,setControl:d,setChecked:u,hasConsumerStoppedPropagationRef:m,isFormControl:g,bubbleInput:b}=Bu(ib,e),h=_e(o,d),x=f.useRef(l);return f.useEffect(()=>{const v=a==null?void 0:a.form;if(v){const w=()=>u(x.current);return v.addEventListener("reset",w),()=>v.removeEventListener("reset",w)}},[a,u]),p.jsx(de.button,{type:"button",role:"checkbox","aria-checked":fr(l)?"mixed":l,"aria-required":c,"data-state":mb(l),"data-disabled":i?"":void 0,disabled:i,value:s,...r,ref:h,onKeyDown:Q(t,v=>{v.key==="Enter"&&v.preventDefault()}),onClick:Q(n,v=>{u(w=>fr(w)?!0:!w),b&&g&&(m.current=v.isPropagationStopped(),m.current||v.stopPropagation())})})});lb.displayName=ib;var cb=f.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:s,disabled:i,value:l,onCheckedChange:c,form:d,...u}=e;return p.jsx(rP,{__scopeCheckbox:n,checked:o,defaultChecked:a,disabled:i,required:s,onCheckedChange:c,name:r,form:d,value:l,internal_do_not_use_render:({isFormControl:m})=>p.jsxs(p.Fragment,{children:[p.jsx(lb,{...u,ref:t,__scopeCheckbox:n}),m&&p.jsx(pb,{__scopeCheckbox:n})]})})});cb.displayName=_i;var ub="CheckboxIndicator",db=f.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=Bu(ub,n);return p.jsx(yt,{present:r||fr(a.checked)||a.checked===!0,children:p.jsx(de.span,{"data-state":mb(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});db.displayName=ub;var fb="CheckboxBubbleInput",pb=f.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:s,required:i,disabled:l,name:c,value:d,form:u,bubbleInput:m,setBubbleInput:g}=Bu(fb,e),b=_e(n,g),h=za(a),x=$a(r);f.useEffect(()=>{const w=m;if(!w)return;const y=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(y,"checked").set,S=!o.current;if(h!==a&&E){const M=new Event("click",{bubbles:S});w.indeterminate=fr(a),E.call(w,fr(a)?!1:a),w.dispatchEvent(M)}},[m,h,a,o]);const v=f.useRef(fr(a)?!1:a);return p.jsx(de.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??v.current,required:i,disabled:l,name:c,value:d,form:u,...t,tabIndex:-1,ref:b,style:{...t.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});pb.displayName=fb;function oP(e){return typeof e=="function"}function fr(e){return e==="indeterminate"}function mb(e){return fr(e)?"indeterminate":e?"checked":"unchecked"}const aP=["top","right","bottom","left"],xr=Math.min,rn=Math.max,Ks=Math.round,Wr=Math.floor,Dn=e=>({x:e,y:e}),sP={left:"right",right:"left",bottom:"top",top:"bottom"};function qs(e,t,n){return rn(e,xr(t,n))}function An(e,t){return typeof e=="function"?e(t):e}function an(e){return e.split("-")[0]}function nr(e){return e.split("-")[1]}function Hu(e){return e==="x"?"y":"x"}function Oi(e){return e==="y"?"height":"width"}function un(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Di(e){return Hu(un(e))}function iP(e,t,n){n===void 0&&(n=!1);const r=nr(e),o=Di(e),a=Oi(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Xs(s)),[s,Xs(s)]}function lP(e){const t=Xs(e);return[Gc(e),t,Gc(t)]}function Gc(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Np=["left","right"],Tp=["right","left"],cP=["top","bottom"],uP=["bottom","top"];function dP(e,t,n){switch(e){case"top":case"bottom":return n?t?Tp:Np:t?Np:Tp;case"left":case"right":return t?cP:uP;default:return[]}}function fP(e,t,n,r){const o=nr(e);let a=dP(an(e),n==="start",r);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(Gc)))),a}function Xs(e){const t=an(e);return sP[t]+e.slice(t.length)}function pP(e){return{top:0,right:0,bottom:0,left:0,...e}}function Gu(e){return typeof e!="number"?pP(e):{top:e,right:e,bottom:e,left:e}}function Zs(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Ip(e,t,n){let{reference:r,floating:o}=e;const a=un(t),s=Di(t),i=Oi(s),l=an(t),c=a==="y",d=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,m=r[i]/2-o[i]/2;let g;switch(l){case"top":g={x:d,y:r.y-o.height};break;case"bottom":g={x:d,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:u};break;case"left":g={x:r.x-o.width,y:u};break;default:g={x:r.x,y:r.y}}switch(nr(t)){case"start":g[s]-=m*(n&&c?-1:1);break;case"end":g[s]+=m*(n&&c?-1:1);break}return g}async function mP(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:s,elements:i,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:g=0}=An(t,e),b=Gu(g),x=i[m?u==="floating"?"reference":"floating":u],v=Zs(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(x)))==null||n?x:x.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:c,rootBoundary:d,strategy:l})),w=u==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,y=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),C=await(a.isElement==null?void 0:a.isElement(y))?await(a.getScale==null?void 0:a.getScale(y))||{x:1,y:1}:{x:1,y:1},E=Zs(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:w,offsetParent:y,strategy:l}):w);return{top:(v.top-E.top+b.top)/C.y,bottom:(E.bottom-v.bottom+b.bottom)/C.y,left:(v.left-E.left+b.left)/C.x,right:(E.right-v.right+b.right)/C.x}}const hP=50,gP=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:s}=n,i=s.detectOverflow?s:{...s,detectOverflow:mP},l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=Ip(c,r,l),m=r,g=0;const b={};for(let h=0;h<a.length;h++){const x=a[h];if(!x)continue;const{name:v,fn:w}=x,{x:y,y:C,data:E,reset:S}=await w({x:d,y:u,initialPlacement:r,placement:m,strategy:o,middlewareData:b,rects:c,platform:i,elements:{reference:e,floating:t}});d=y??d,u=C??u,b[v]={...b[v],...E},S&&g<hP&&(g++,typeof S=="object"&&(S.placement&&(m=S.placement),S.rects&&(c=S.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:d,y:u}=Ip(c,m,l)),h=-1)}return{x:d,y:u,placement:m,strategy:o,middlewareData:b}},bP=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:s,elements:i,middlewareData:l}=t,{element:c,padding:d=0}=An(e,t)||{};if(c==null)return{};const u=Gu(d),m={x:n,y:r},g=Di(o),b=Oi(g),h=await s.getDimensions(c),x=g==="y",v=x?"top":"left",w=x?"bottom":"right",y=x?"clientHeight":"clientWidth",C=a.reference[b]+a.reference[g]-m[g]-a.floating[b],E=m[g]-a.reference[g],S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let M=S?S[y]:0;(!M||!await(s.isElement==null?void 0:s.isElement(S)))&&(M=i.floating[y]||a.floating[b]);const R=C/2-E/2,I=M/2-h[b]/2-1,O=xr(u[v],I),_=xr(u[w],I),T=O,k=M-h[b]-_,j=M/2-h[b]/2+R,V=qs(T,j,k),z=!l.arrow&&nr(o)!=null&&j!==V&&a.reference[b]/2-(j<T?O:_)-h[b]/2<0,$=z?j<T?j-T:j-k:0;return{[g]:m[g]+$,data:{[g]:V,centerOffset:j-V-$,...z&&{alignmentOffset:$}},reset:z}}}),vP=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:s,initialPlacement:i,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:h=!0,...x}=An(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const v=an(o),w=un(i),y=an(i)===i,C=await(l.isRTL==null?void 0:l.isRTL(c.floating)),E=m||(y||!h?[Xs(i)]:lP(i)),S=b!=="none";!m&&S&&E.push(...fP(i,h,b,C));const M=[i,...E],R=await l.detectOverflow(t,x),I=[];let O=((r=a.flip)==null?void 0:r.overflows)||[];if(d&&I.push(R[v]),u){const j=iP(o,s,C);I.push(R[j[0]],R[j[1]])}if(O=[...O,{placement:o,overflows:I}],!I.every(j=>j<=0)){var _,T;const j=(((_=a.flip)==null?void 0:_.index)||0)+1,V=M[j];if(V&&(!(u==="alignment"?w!==un(V):!1)||O.every(F=>un(F.placement)===w?F.overflows[0]>0:!0)))return{data:{index:j,overflows:O},reset:{placement:V}};let z=(T=O.filter($=>$.overflows[0]<=0).sort(($,F)=>$.overflows[1]-F.overflows[1])[0])==null?void 0:T.placement;if(!z)switch(g){case"bestFit":{var k;const $=(k=O.filter(F=>{if(S){const L=un(F.placement);return L===w||L==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(L=>L>0).reduce((L,D)=>L+D,0)]).sort((F,L)=>F[1]-L[1])[0])==null?void 0:k[0];$&&(z=$);break}case"initialPlacement":z=i;break}if(o!==z)return{reset:{placement:z}}}return{}}}};function _p(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Op(e){return aP.some(t=>e[t]>=0)}const xP=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...a}=An(e,t);switch(o){case"referenceHidden":{const s=await r.detectOverflow(t,{...a,elementContext:"reference"}),i=_p(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Op(i)}}}case"escaped":{const s=await r.detectOverflow(t,{...a,altBoundary:!0}),i=_p(s,n.floating);return{data:{escapedOffsets:i,escaped:Op(i)}}}default:return{}}}}},hb=new Set(["left","top"]);async function yP(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=an(n),i=nr(n),l=un(n)==="y",c=hb.has(s)?-1:1,d=a&&l?-1:1,u=An(t,e);let{mainAxis:m,crossAxis:g,alignmentAxis:b}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return i&&typeof b=="number"&&(g=i==="end"?b*-1:b),l?{x:g*d,y:m*c}:{x:m*c,y:g*d}}const wP=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:s,middlewareData:i}=t,l=await yP(t,e);return s===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:s}}}}},CP=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:a}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:l={fn:v=>{let{x:w,y}=v;return{x:w,y}}},...c}=An(e,t),d={x:n,y:r},u=await a.detectOverflow(t,c),m=un(an(o)),g=Hu(m);let b=d[g],h=d[m];if(s){const v=g==="y"?"top":"left",w=g==="y"?"bottom":"right",y=b+u[v],C=b-u[w];b=qs(y,b,C)}if(i){const v=m==="y"?"top":"left",w=m==="y"?"bottom":"right",y=h+u[v],C=h-u[w];h=qs(y,h,C)}const x=l.fn({...t,[g]:b,[m]:h});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[g]:s,[m]:i}}}}}},SP=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:l=!0,crossAxis:c=!0}=An(e,t),d={x:n,y:r},u=un(o),m=Hu(u);let g=d[m],b=d[u];const h=An(i,t),x=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const y=m==="y"?"height":"width",C=a.reference[m]-a.floating[y]+x.mainAxis,E=a.reference[m]+a.reference[y]-x.mainAxis;g<C?g=C:g>E&&(g=E)}if(c){var v,w;const y=m==="y"?"width":"height",C=hb.has(an(o)),E=a.reference[u]-a.floating[y]+(C&&((v=s.offset)==null?void 0:v[u])||0)+(C?0:x.crossAxis),S=a.reference[u]+a.reference[y]+(C?0:((w=s.offset)==null?void 0:w[u])||0)-(C?x.crossAxis:0);b<E?b=E:b>S&&(b=S)}return{[m]:g,[u]:b}}}},EP=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:s,elements:i}=t,{apply:l=()=>{},...c}=An(e,t),d=await s.detectOverflow(t,c),u=an(o),m=nr(o),g=un(o)==="y",{width:b,height:h}=a.floating;let x,v;u==="top"||u==="bottom"?(x=u,v=m===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(v=u,x=m==="end"?"top":"bottom");const w=h-d.top-d.bottom,y=b-d.left-d.right,C=xr(h-d[x],w),E=xr(b-d[v],y),S=!t.middlewareData.shift;let M=C,R=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(M=w),S&&!m){const O=rn(d.left,0),_=rn(d.right,0),T=rn(d.top,0),k=rn(d.bottom,0);g?R=b-2*(O!==0||_!==0?O+_:rn(d.left,d.right)):M=h-2*(T!==0||k!==0?T+k:rn(d.top,d.bottom))}await l({...t,availableWidth:R,availableHeight:M});const I=await s.getDimensions(i.floating);return b!==I.width||h!==I.height?{reset:{rects:!0}}:{}}}};function Ai(){return typeof window<"u"}function zt(e){return Yu(e)?(e.nodeName||"").toLowerCase():"#document"}function Pt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function $n(e){var t;return(t=(Yu(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Yu(e){return Ai()?e instanceof Node||e instanceof Pt(e).Node:!1}function ut(e){return Ai()?e instanceof Element||e instanceof Pt(e).Element:!1}function ct(e){return Ai()?e instanceof HTMLElement||e instanceof Pt(e).HTMLElement:!1}function Do(e){return!Ai()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Pt(e).ShadowRoot}function Er(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Xt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function MP(e){return/^(table|td|th)$/.test(zt(e))}function ji(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const RP=/transform|translate|scale|rotate|perspective|filter/,kP=/paint|layout|strict|content/,$r=e=>!!e&&e!=="none";let lc;function Uu(e){const t=ut(e)?Xt(e):e;return $r(t.transform)||$r(t.translate)||$r(t.scale)||$r(t.rotate)||$r(t.perspective)||!zi()&&($r(t.backdropFilter)||$r(t.filter))||RP.test(t.willChange||"")||kP.test(t.contain||"")}function PP(e){let t=Zn(e);for(;ct(t)&&!Xn(t);){if(Uu(t))return t;if(ji(t))return null;t=Zn(t)}return null}function zi(){return lc==null&&(lc=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),lc}function Xn(e){return/^(html|body|#document)$/.test(zt(e))}function Xt(e){return Pt(e).getComputedStyle(e)}function $i(e){return ut(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Zn(e){if(zt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Do(e)&&e.host||$n(e);return Do(t)?t.host:t}function gb(e){const t=Zn(e);return Xn(t)?e.ownerDocument?e.ownerDocument.body:e.body:ct(t)&&Er(t)?t:gb(t)}function ba(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=gb(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),s=Pt(o);if(a){const i=Yc(s);return t.concat(s,s.visualViewport||[],Er(o)?o:[],i&&n?ba(i):[])}else return t.concat(o,ba(o,[],n))}function Yc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function bb(e){const t=Xt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ct(e),a=o?e.offsetWidth:n,s=o?e.offsetHeight:r,i=Ks(n)!==a||Ks(r)!==s;return i&&(n=a,r=s),{width:n,height:r,$:i}}function Ku(e){return ut(e)?e:e.contextElement}function Po(e){const t=Ku(e);if(!ct(t))return Dn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=bb(t);let s=(a?Ks(n.width):n.width)/r,i=(a?Ks(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const NP=Dn(0);function vb(e){const t=Pt(e);return!zi()||!t.visualViewport?NP:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function TP(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Pt(e)?!1:t}function Yr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Ku(e);let s=Dn(1);t&&(r?ut(r)&&(s=Po(r)):s=Po(e));const i=TP(a,n,r)?vb(a):Dn(0);let l=(o.left+i.x)/s.x,c=(o.top+i.y)/s.y,d=o.width/s.x,u=o.height/s.y;if(a){const m=Pt(a),g=r&&ut(r)?Pt(r):r;let b=m,h=Yc(b);for(;h&&r&&g!==b;){const x=Po(h),v=h.getBoundingClientRect(),w=Xt(h),y=v.left+(h.clientLeft+parseFloat(w.paddingLeft))*x.x,C=v.top+(h.clientTop+parseFloat(w.paddingTop))*x.y;l*=x.x,c*=x.y,d*=x.x,u*=x.y,l+=y,c+=C,b=Pt(h),h=Yc(b)}}return Zs({width:d,height:u,x:l,y:c})}function Li(e,t){const n=$i(e).scrollLeft;return t?t.left+n:Yr($n(e)).left+n}function xb(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Li(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function IP(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",s=$n(r),i=t?ji(t.floating):!1;if(r===s||i&&a)return n;let l={scrollLeft:0,scrollTop:0},c=Dn(1);const d=Dn(0),u=ct(r);if((u||!u&&!a)&&((zt(r)!=="body"||Er(s))&&(l=$i(r)),u)){const g=Yr(r);c=Po(r),d.x=g.x+r.clientLeft,d.y=g.y+r.clientTop}const m=s&&!u&&!a?xb(s,l):Dn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+m.x,y:n.y*c.y-l.scrollTop*c.y+d.y+m.y}}function _P(e){return Array.from(e.getClientRects())}function OP(e){const t=$n(e),n=$i(e),r=e.ownerDocument.body,o=rn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=rn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Li(e);const i=-n.scrollTop;return Xt(r).direction==="rtl"&&(s+=rn(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:s,y:i}}const Dp=25;function DP(e,t){const n=Pt(e),r=$n(e),o=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,i=0,l=0;if(o){a=o.width,s=o.height;const d=zi();(!d||d&&t==="fixed")&&(i=o.offsetLeft,l=o.offsetTop)}const c=Li(r);if(c<=0){const d=r.ownerDocument,u=d.body,m=getComputedStyle(u),g=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,b=Math.abs(r.clientWidth-u.clientWidth-g);b<=Dp&&(a-=b)}else c<=Dp&&(a+=c);return{width:a,height:s,x:i,y:l}}function AP(e,t){const n=Yr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=ct(e)?Po(e):Dn(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,l=o*a.x,c=r*a.y;return{width:s,height:i,x:l,y:c}}function Ap(e,t,n){let r;if(t==="viewport")r=DP(e,n);else if(t==="document")r=OP($n(e));else if(ut(t))r=AP(t,n);else{const o=vb(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Zs(r)}function yb(e,t){const n=Zn(e);return n===t||!ut(n)||Xn(n)?!1:Xt(n).position==="fixed"||yb(n,t)}function jP(e,t){const n=t.get(e);if(n)return n;let r=ba(e,[],!1).filter(i=>ut(i)&&zt(i)!=="body"),o=null;const a=Xt(e).position==="fixed";let s=a?Zn(e):e;for(;ut(s)&&!Xn(s);){const i=Xt(s),l=Uu(s);!l&&i.position==="fixed"&&(o=null),(a?!l&&!o:!l&&i.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Er(s)&&!l&&yb(e,s))?r=r.filter(d=>d!==s):o=i,s=Zn(s)}return t.set(e,r),r}function zP(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?ji(t)?[]:jP(t,this._c):[].concat(n),r],i=Ap(t,s[0],o);let l=i.top,c=i.right,d=i.bottom,u=i.left;for(let m=1;m<s.length;m++){const g=Ap(t,s[m],o);l=rn(g.top,l),c=xr(g.right,c),d=xr(g.bottom,d),u=rn(g.left,u)}return{width:c-u,height:d-l,x:u,y:l}}function $P(e){const{width:t,height:n}=bb(e);return{width:t,height:n}}function LP(e,t,n){const r=ct(t),o=$n(t),a=n==="fixed",s=Yr(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const l=Dn(0);function c(){l.x=Li(o)}if(r||!r&&!a)if((zt(t)!=="body"||Er(o))&&(i=$i(t)),r){const g=Yr(t,!0,a,t);l.x=g.x+t.clientLeft,l.y=g.y+t.clientTop}else o&&c();a&&!r&&o&&c();const d=o&&!r&&!a?xb(o,i):Dn(0),u=s.left+i.scrollLeft-l.x-d.x,m=s.top+i.scrollTop-l.y-d.y;return{x:u,y:m,width:s.width,height:s.height}}function cc(e){return Xt(e).position==="static"}function jp(e,t){if(!ct(e)||Xt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return $n(e)===n&&(n=n.ownerDocument.body),n}function wb(e,t){const n=Pt(e);if(ji(e))return n;if(!ct(e)){let o=Zn(e);for(;o&&!Xn(o);){if(ut(o)&&!cc(o))return o;o=Zn(o)}return n}let r=jp(e,t);for(;r&&MP(r)&&cc(r);)r=jp(r,t);return r&&Xn(r)&&cc(r)&&!Uu(r)?n:r||PP(e)||n}const FP=async function(e){const t=this.getOffsetParent||wb,n=this.getDimensions,r=await n(e.floating);return{reference:LP(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function VP(e){return Xt(e).direction==="rtl"}const WP={convertOffsetParentRelativeRectToViewportRelativeRect:IP,getDocumentElement:$n,getClippingRect:zP,getOffsetParent:wb,getElementRects:FP,getClientRects:_P,getDimensions:$P,getScale:Po,isElement:ut,isRTL:VP};function Cb(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function BP(e,t){let n=null,r;const o=$n(e);function a(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function s(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),a();const c=e.getBoundingClientRect(),{left:d,top:u,width:m,height:g}=c;if(i||t(),!m||!g)return;const b=Wr(u),h=Wr(o.clientWidth-(d+m)),x=Wr(o.clientHeight-(u+g)),v=Wr(d),y={rootMargin:-b+"px "+-h+"px "+-x+"px "+-v+"px",threshold:rn(0,xr(1,l))||1};let C=!0;function E(S){const M=S[0].intersectionRatio;if(M!==l){if(!C)return s();M?s(!1,M):r=setTimeout(()=>{s(!1,1e-7)},1e3)}M===1&&!Cb(c,e.getBoundingClientRect())&&s(),C=!1}try{n=new IntersectionObserver(E,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,y)}n.observe(e)}return s(!0),a}function Uc(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Ku(e),d=o||a?[...c?ba(c):[],...t?ba(t):[]]:[];d.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),a&&v.addEventListener("resize",n)});const u=c&&i?BP(c,n):null;let m=-1,g=null;s&&(g=new ResizeObserver(v=>{let[w]=v;w&&w.target===c&&g&&t&&(g.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var y;(y=g)==null||y.observe(t)})),n()}),c&&!l&&g.observe(c),t&&g.observe(t));let b,h=l?Yr(e):null;l&&x();function x(){const v=Yr(e);h&&!Cb(h,v)&&n(),h=v,b=requestAnimationFrame(x)}return n(),()=>{var v;d.forEach(w=>{o&&w.removeEventListener("scroll",n),a&&w.removeEventListener("resize",n)}),u==null||u(),(v=g)==null||v.disconnect(),g=null,l&&cancelAnimationFrame(b)}}const HP=wP,GP=CP,YP=vP,UP=EP,KP=xP,zp=bP,qP=SP,XP=(e,t,n)=>{const r=new Map,o={platform:WP,...n},a={...o.platform,_c:r};return gP(e,t,{...o,platform:a})};var ZP=typeof document<"u",QP=function(){},As=ZP?P.useLayoutEffect:QP;function Qs(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,o;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(!Qs(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const a=o[r];if(!(a==="_owner"&&e.$$typeof)&&!Qs(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Sb(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function $p(e,t){const n=Sb(e);return Math.round(t*n)/n}function uc(e){const t=f.useRef(e);return As(()=>{t.current=e}),t}function Eb(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:l,open:c}=e,[d,u]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,g]=f.useState(r);Qs(m,r)||g(r);const[b,h]=f.useState(null),[x,v]=f.useState(null),w=f.useCallback(F=>{F!==S.current&&(S.current=F,h(F))},[]),y=f.useCallback(F=>{F!==M.current&&(M.current=F,v(F))},[]),C=a||b,E=s||x,S=f.useRef(null),M=f.useRef(null),R=f.useRef(d),I=l!=null,O=uc(l),_=uc(o),T=uc(c),k=f.useCallback(()=>{if(!S.current||!M.current)return;const F={placement:t,strategy:n,middleware:m};_.current&&(F.platform=_.current),XP(S.current,M.current,F).then(L=>{const D={...L,isPositioned:T.current!==!1};j.current&&!Qs(R.current,D)&&(R.current=D,jn.flushSync(()=>{u(D)}))})},[m,t,n,_,T]);As(()=>{c===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,u(F=>({...F,isPositioned:!1})))},[c]);const j=f.useRef(!1);As(()=>(j.current=!0,()=>{j.current=!1}),[]),As(()=>{if(C&&(S.current=C),E&&(M.current=E),C&&E){if(O.current)return O.current(C,E,k);k()}},[C,E,k,O,I]);const V=f.useMemo(()=>({reference:S,floating:M,setReference:w,setFloating:y}),[w,y]),z=f.useMemo(()=>({reference:C,floating:E}),[C,E]),$=f.useMemo(()=>{const F={position:n,left:0,top:0};if(!z.floating)return F;const L=$p(z.floating,d.x),D=$p(z.floating,d.y);return i?{...F,transform:"translate("+L+"px, "+D+"px)",...Sb(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:D}},[n,i,z.floating,d.x,d.y]);return f.useMemo(()=>({...d,update:k,refs:V,elements:z,floatingStyles:$}),[d,k,V,z,$])}const JP=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?zp({element:r.current,padding:o}).fn(n):{}:r?zp({element:r,padding:o}).fn(n):{}}}},Mb=(e,t)=>{const n=HP(e);return{name:n.name,fn:n.fn,options:[e,t]}},Rb=(e,t)=>{const n=GP(e);return{name:n.name,fn:n.fn,options:[e,t]}},kb=(e,t)=>({fn:qP(e).fn,options:[e,t]}),Pb=(e,t)=>{const n=YP(e);return{name:n.name,fn:n.fn,options:[e,t]}},Nb=(e,t)=>{const n=UP(e);return{name:n.name,fn:n.fn,options:[e,t]}},Tb=(e,t)=>{const n=KP(e);return{name:n.name,fn:n.fn,options:[e,t]}},eN=(e,t)=>{const n=JP(e);return{name:n.name,fn:n.fn,options:[e,t]}};var tN="Arrow",Ib=f.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return p.jsx(de.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ib.displayName=tN;var nN=Ib,qu="Popper",[_b,Mr]=ht(qu),[rN,Ob]=_b(qu),Db=e=>{const{__scopePopper:t,children:n}=e,[r,o]=f.useState(null),[a,s]=f.useState(void 0);return p.jsx(rN,{scope:t,anchor:r,onAnchorChange:o,placementState:a,setPlacementState:s,children:n})};Db.displayName=qu;var Ab="PopperAnchor",jb=f.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Ob(Ab,n),s=f.useRef(null),i=a.onAnchorChange,l=f.useCallback(b=>{s.current=b,b&&i(b)},[i]),c=_e(t,l),d=f.useRef(null);f.useEffect(()=>{if(!r)return;const b=d.current;d.current=r.current,b!==d.current&&i(d.current)});const u=a.placementState&&Zu(a.placementState),m=u==null?void 0:u[0],g=u==null?void 0:u[1];return r?null:p.jsx(de.div,{"data-radix-popper-side":m,"data-radix-popper-align":g,...o,ref:c})});jb.displayName=Ab;var Xu="PopperContent",[oN,aN]=_b(Xu),zb=f.forwardRef((e,t)=>{var H,te,xe,Re,Y,we;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:l=!0,collisionBoundary:c,collisionPadding:d=0,sticky:u="partial",hideWhenDetached:m=!1,updatePositionStrategy:g="optimized",onPlaced:b,...h}=e,x=Ob(Xu,n),[v,w]=f.useState(null),y=_e(t,he=>w(he)),[C,E]=f.useState(null),S=$a(C),M=(S==null?void 0:S.width)??0,R=(S==null?void 0:S.height)??0,I=r+(a!=="center"?"-"+a:""),O=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},_=c?Array.isArray(c)?c:[c]:void 0,T=_!==void 0&&_.length>0,k={padding:O,boundary:_==null?void 0:_.filter(iN),altBoundary:T},{refs:j,floatingStyles:V,placement:z,isPositioned:$,middlewareData:F}=Eb({strategy:"fixed",placement:I,whileElementsMounted:(...he)=>Uc(...he,{animationFrame:g==="always"}),elements:{reference:x.anchor},middleware:[Mb({mainAxis:o+R,alignmentAxis:s}),l&&Rb({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?kb():void 0,...k}),l&&Pb({...k}),Nb({...k,apply:({elements:he,rects:Ne,availableWidth:Me,availableHeight:fe})=>{const{width:Oe,height:se}=Ne.reference,Ae=he.floating.style;Ae.setProperty("--radix-popper-available-width",`${Me}px`),Ae.setProperty("--radix-popper-available-height",`${fe}px`),Ae.setProperty("--radix-popper-anchor-width",`${Oe}px`),Ae.setProperty("--radix-popper-anchor-height",`${se}px`)}}),C&&eN({element:C,padding:i}),lN({arrowWidth:M,arrowHeight:R}),m&&Tb({strategy:"referenceHidden",...k})]}),L=x.setPlacementState;mt(()=>(L(z),()=>{L(void 0)}),[z,L]);const[D,re]=Zu(z),pe=kt(b);mt(()=>{$&&(pe==null||pe())},[$,pe]);const G=(H=F.arrow)==null?void 0:H.x,B=(te=F.arrow)==null?void 0:te.y,J=((xe=F.arrow)==null?void 0:xe.centerOffset)!==0,[oe,U]=f.useState();return mt(()=>{v&&U(window.getComputedStyle(v).zIndex)},[v]),p.jsx("div",{ref:j.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:$?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:oe,"--radix-popper-transform-origin":[(Re=F.transformOrigin)==null?void 0:Re.x,(Y=F.transformOrigin)==null?void 0:Y.y].join(" "),...((we=F.hide)==null?void 0:we.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(oN,{scope:n,placedSide:D,placedAlign:re,onArrowChange:E,arrowX:G,arrowY:B,shouldHideArrow:J,children:p.jsx(de.div,{"data-side":D,"data-align":re,...h,ref:y,style:{...h.style,animation:$?void 0:"none"}})})})});zb.displayName=Xu;var $b="PopperArrow",sN={top:"bottom",right:"left",bottom:"top",left:"right"},Lb=f.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=aN($b,r),s=sN[a.placedSide];return p.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:p.jsx(nN,{...o,ref:n,style:{...o.style,display:"block"}})})});Lb.displayName=$b;function iN(e){return e!==null}var lN=e=>({name:"transformOrigin",options:e,fn(t){var x,v,w;const{placement:n,rects:r,middlewareData:o}=t,s=((x=o.arrow)==null?void 0:x.centerOffset)!==0,i=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[c,d]=Zu(n),u={start:"0%",center:"50%",end:"100%"}[d],m=(((v=o.arrow)==null?void 0:v.x)??0)+i/2,g=(((w=o.arrow)==null?void 0:w.y)??0)+l/2;let b="",h="";return c==="bottom"?(b=s?u:`${m}px`,h=`${-l}px`):c==="top"?(b=s?u:`${m}px`,h=`${r.floating.height+l}px`):c==="right"?(b=`${-l}px`,h=s?u:`${g}px`):c==="left"&&(b=`${r.floating.width+l}px`,h=s?u:`${g}px`),{data:{x:b,y:h}}}});function Zu(e){const[t,n="center"]=e.split("-");return[t,n]}var La=Db,Fa=jb,Fi=zb,Vi=Lb,dc="rovingFocusGroup.onEntryFocus",cN={bubbles:!1,cancelable:!0},Va="RovingFocusGroup",[Kc,Fb,uN]=Ri(Va),[dN,Rr]=ht(Va,[uN]),[fN,pN]=dN(Va),Vb=f.forwardRef((e,t)=>p.jsx(Kc.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Kc.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(mN,{...e,ref:t})})}));Vb.displayName=Va;var mN=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...u}=e,m=f.useRef(null),g=_e(t,m),b=Sr(a),[h,x]=Nt({prop:s,defaultProp:i??null,onChange:l,caller:Va}),[v,w]=f.useState(!1),y=kt(c),C=Fb(n),E=f.useRef(!1),[S,M]=f.useState(0);return f.useEffect(()=>{const R=m.current;if(R)return R.addEventListener(dc,y),()=>R.removeEventListener(dc,y)},[y]),p.jsx(fN,{scope:n,orientation:r,dir:b,loop:o,currentTabStopId:h,onItemFocus:f.useCallback(R=>x(R),[x]),onItemShiftTab:f.useCallback(()=>w(!0),[]),onFocusableItemAdd:f.useCallback(()=>M(R=>R+1),[]),onFocusableItemRemove:f.useCallback(()=>M(R=>R-1),[]),children:p.jsx(de.div,{tabIndex:v||S===0?-1:0,"data-orientation":r,...u,ref:g,style:{outline:"none",...e.style},onMouseDown:Q(e.onMouseDown,()=>{E.current=!0}),onFocus:Q(e.onFocus,R=>{const I=!E.current;if(R.target===R.currentTarget&&I&&!v){const O=new CustomEvent(dc,cN);if(R.currentTarget.dispatchEvent(O),!O.defaultPrevented){const _=C().filter(z=>z.focusable),T=_.find(z=>z.active),k=_.find(z=>z.id===h),V=[T,k,..._].filter(Boolean).map(z=>z.ref.current);Hb(V,d)}}E.current=!1}),onBlur:Q(e.onBlur,()=>w(!1))})})}),Wb="RovingFocusGroupItem",Bb=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:s,...i}=e,l=Yt(),c=a||l,d=pN(Wb,n),u=d.currentTabStopId===c,m=Fb(n),{onFocusableItemAdd:g,onFocusableItemRemove:b,currentTabStopId:h}=d;return f.useEffect(()=>{if(r)return g(),()=>b()},[r,g,b]),p.jsx(Kc.ItemSlot,{scope:n,id:c,focusable:r,active:o,children:p.jsx(de.span,{tabIndex:u?0:-1,"data-orientation":d.orientation,...i,ref:t,onMouseDown:Q(e.onMouseDown,x=>{r?d.onItemFocus(c):x.preventDefault()}),onFocus:Q(e.onFocus,()=>d.onItemFocus(c)),onKeyDown:Q(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){d.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const v=bN(x,d.orientation,d.dir);if(v!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let y=m().filter(C=>C.focusable).map(C=>C.ref.current);if(v==="last")y.reverse();else if(v==="prev"||v==="next"){v==="prev"&&y.reverse();const C=y.indexOf(x.currentTarget);y=d.loop?vN(y,C+1):y.slice(C+1)}setTimeout(()=>Hb(y))}}),children:typeof s=="function"?s({isCurrentTabStop:u,hasTabStop:h!=null}):s})})});Bb.displayName=Wb;var hN={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function gN(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function bN(e,t,n){const r=gN(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return hN[r]}function Hb(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function vN(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Wi=Vb,Bi=Bb,qc=["Enter"," "],xN=["ArrowDown","PageUp","Home"],Gb=["ArrowUp","PageDown","End"],yN=[...xN,...Gb],wN={ltr:[...qc,"ArrowRight"],rtl:[...qc,"ArrowLeft"]},CN={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Wa="Menu",[va,SN,EN]=Ri(Wa),[ro,Hi]=ht(Wa,[EN,Mr,Rr]),Ba=Mr(),Yb=Rr(),[Ub,kr]=ro(Wa),[MN,Ha]=ro(Wa),Kb=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:s=!0}=e,i=Ba(t),[l,c]=f.useState(null),d=f.useRef(!1),u=kt(a),m=Sr(o);return f.useEffect(()=>{const g=()=>{d.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>d.current=!1;return document.addEventListener("keydown",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),p.jsx(La,{...i,children:p.jsx(Ub,{scope:t,open:n,onOpenChange:u,content:l,onContentChange:c,children:p.jsx(MN,{scope:t,onClose:f.useCallback(()=>u(!1),[u]),isUsingKeyboardRef:d,dir:m,modal:s,children:r})})})};Kb.displayName=Wa;var RN="MenuAnchor",Qu=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Ba(n);return p.jsx(Fa,{...o,...r,ref:t})});Qu.displayName=RN;var Ju="MenuPortal",[kN,qb]=ro(Ju,{forceMount:void 0}),Xb=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=kr(Ju,t);return p.jsx(kN,{scope:t,forceMount:n,children:p.jsx(yt,{present:n||a.open,children:p.jsx(Go,{asChild:!0,container:o,children:r})})})};Xb.displayName=Ju;var dn="MenuContent",[PN,ed]=ro(dn),Zb=f.forwardRef((e,t)=>{const n=qb(dn,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=kr(dn,e.__scopeMenu),s=Ha(dn,e.__scopeMenu);return p.jsx(va.Provider,{scope:e.__scopeMenu,children:p.jsx(yt,{present:r||a.open,children:p.jsx(va.Slot,{scope:e.__scopeMenu,children:s.modal?p.jsx(NN,{...o,ref:t}):p.jsx(TN,{...o,ref:t})})})})}),NN=f.forwardRef((e,t)=>{const n=kr(dn,e.__scopeMenu),r=f.useRef(null),o=_e(t,r);return f.useEffect(()=>{const a=r.current;if(a)return Ti(a)},[]),p.jsx(td,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Q(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),TN=f.forwardRef((e,t)=>{const n=kr(dn,e.__scopeMenu);return p.jsx(td,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),IN=vr("MenuContent.ScrollLock"),td=f.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:u,onInteractOutside:m,onDismiss:g,disableOutsideScroll:b,...h}=e,x=kr(dn,n),v=Ha(dn,n),w=Ba(n),y=Yb(n),C=SN(n),[E,S]=f.useState(null),M=f.useRef(null),R=_e(t,M,x.onContentChange),I=f.useRef(0),O=f.useRef(""),_=f.useRef(0),T=f.useRef(null),k=f.useRef("right"),j=f.useRef(0),V=b?ja:f.Fragment,z=b?{as:IN,allowPinchZoom:!0}:void 0,$=L=>{var U,H;const D=O.current+L,re=C().filter(te=>!te.disabled),pe=document.activeElement,G=(U=re.find(te=>te.ref.current===pe))==null?void 0:U.textValue,B=re.map(te=>te.textValue),J=BN(B,D,G),oe=(H=re.find(te=>te.textValue===J))==null?void 0:H.ref.current;(function te(xe){O.current=xe,window.clearTimeout(I.current),xe!==""&&(I.current=window.setTimeout(()=>te(""),1e3))})(D),oe&&setTimeout(()=>oe.focus())};f.useEffect(()=>()=>window.clearTimeout(I.current),[]),Pi();const F=f.useCallback(L=>{var re,pe;return k.current===((re=T.current)==null?void 0:re.side)&&GN(L,(pe=T.current)==null?void 0:pe.area)},[]);return p.jsx(PN,{scope:n,searchRef:O,onItemEnter:f.useCallback(L=>{F(L)&&L.preventDefault()},[F]),onItemLeave:f.useCallback(L=>{var D;F(L)||((D=M.current)==null||D.focus(),S(null))},[F]),onTriggerLeave:f.useCallback(L=>{F(L)&&L.preventDefault()},[F]),pointerGraceTimerRef:_,onPointerGraceIntentChange:f.useCallback(L=>{T.current=L},[]),children:p.jsx(V,{...z,children:p.jsx(Aa,{asChild:!0,trapped:o,onMountAutoFocus:Q(a,L=>{var D;L.preventDefault(),(D=M.current)==null||D.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:p.jsx(Ho,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:u,onInteractOutside:m,onDismiss:g,children:p.jsx(Wi,{asChild:!0,...y,dir:v.dir,orientation:"vertical",loop:r,currentTabStopId:E,onCurrentTabStopIdChange:S,onEntryFocus:Q(l,L=>{v.isUsingKeyboardRef.current||L.preventDefault()}),preventScrollOnEntryFocus:!0,children:p.jsx(Fi,{role:"menu","aria-orientation":"vertical","data-state":mv(x.open),"data-radix-menu-content":"",dir:v.dir,...w,...h,ref:R,style:{outline:"none",...h.style},onKeyDown:Q(h.onKeyDown,L=>{const re=L.target.closest("[data-radix-menu-content]")===L.currentTarget,pe=L.ctrlKey||L.altKey||L.metaKey,G=L.key.length===1;re&&(L.key==="Tab"&&L.preventDefault(),!pe&&G&&$(L.key));const B=M.current;if(L.target!==B||!yN.includes(L.key))return;L.preventDefault();const oe=C().filter(U=>!U.disabled).map(U=>U.ref.current);Gb.includes(L.key)&&oe.reverse(),VN(oe)}),onBlur:Q(e.onBlur,L=>{L.currentTarget.contains(L.target)||(window.clearTimeout(I.current),O.current="")}),onPointerMove:Q(e.onPointerMove,xa(L=>{const D=L.target,re=j.current!==L.clientX;if(L.currentTarget.contains(D)&&re){const pe=L.clientX>j.current?"right":"left";k.current=pe,j.current=L.clientX}}))})})})})})})});Zb.displayName=dn;var _N="MenuGroup",nd=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(de.div,{role:"group",...r,ref:t})});nd.displayName=_N;var ON="MenuLabel",Qb=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(de.div,{...r,ref:t})});Qb.displayName=ON;var Js="MenuItem",Lp="menu.itemSelect",Gi=f.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=f.useRef(null),s=Ha(Js,e.__scopeMenu),i=ed(Js,e.__scopeMenu),l=_e(t,a),c=f.useRef(!1),d=()=>{const u=a.current;if(!n&&u){const m=new CustomEvent(Lp,{bubbles:!0,cancelable:!0});u.addEventListener(Lp,g=>r==null?void 0:r(g),{once:!0}),ag(u,m),m.defaultPrevented?c.current=!1:s.onClose()}};return p.jsx(Jb,{...o,ref:l,disabled:n,onClick:Q(e.onClick,d),onPointerDown:u=>{var m;(m=e.onPointerDown)==null||m.call(e,u),c.current=!0},onPointerUp:Q(e.onPointerUp,u=>{var m;c.current||(m=u.currentTarget)==null||m.click()}),onKeyDown:Q(e.onKeyDown,u=>{const m=i.searchRef.current!=="";n||m&&u.key===" "||qc.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})})});Gi.displayName=Js;var Jb=f.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,s=ed(Js,n),i=Yb(n),l=f.useRef(null),c=_e(t,l),[d,u]=f.useState(!1),[m,g]=f.useState("");return f.useEffect(()=>{const b=l.current;b&&g((b.textContent??"").trim())},[a.children]),p.jsx(va.ItemSlot,{scope:n,disabled:r,textValue:o??m,children:p.jsx(Bi,{asChild:!0,...i,focusable:!r,children:p.jsx(de.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:c,onPointerMove:Q(e.onPointerMove,xa(b=>{r?s.onItemLeave(b):(s.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Q(e.onPointerLeave,xa(b=>s.onItemLeave(b))),onFocus:Q(e.onFocus,()=>u(!0)),onBlur:Q(e.onBlur,()=>u(!1))})})})}),DN="MenuCheckboxItem",ev=f.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return p.jsx(av,{scope:e.__scopeMenu,checked:n,children:p.jsx(Gi,{role:"menuitemcheckbox","aria-checked":ei(n)?"mixed":n,...o,ref:t,"data-state":ad(n),onSelect:Q(o.onSelect,()=>r==null?void 0:r(ei(n)?!0:!n),{checkForDefaultPrevented:!1})})})});ev.displayName=DN;var tv="MenuRadioGroup",[AN,jN]=ro(tv,{value:void 0,onValueChange:()=>{}}),nv=f.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=kt(r);return p.jsx(AN,{scope:e.__scopeMenu,value:n,onValueChange:a,children:p.jsx(nd,{...o,ref:t})})});nv.displayName=tv;var rv="MenuRadioItem",ov=f.forwardRef((e,t)=>{const{value:n,...r}=e,o=jN(rv,e.__scopeMenu),a=n===o.value;return p.jsx(av,{scope:e.__scopeMenu,checked:a,children:p.jsx(Gi,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":ad(a),onSelect:Q(r.onSelect,()=>{var s;return(s=o.onValueChange)==null?void 0:s.call(o,n)},{checkForDefaultPrevented:!1})})})});ov.displayName=rv;var rd="MenuItemIndicator",[av,zN]=ro(rd,{checked:!1}),sv=f.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=zN(rd,n);return p.jsx(yt,{present:r||ei(a.checked)||a.checked===!0,children:p.jsx(de.span,{...o,ref:t,"data-state":ad(a.checked)})})});sv.displayName=rd;var $N="MenuSeparator",iv=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(de.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});iv.displayName=$N;var LN="MenuArrow",lv=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Ba(n);return p.jsx(Vi,{...o,...r,ref:t})});lv.displayName=LN;var od="MenuSub",[FN,cv]=ro(od),uv=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=kr(od,t),s=Ba(t),[i,l]=f.useState(null),[c,d]=f.useState(null),u=kt(o);return f.useEffect(()=>(a.open===!1&&u(!1),()=>u(!1)),[a.open,u]),p.jsx(La,{...s,children:p.jsx(Ub,{scope:t,open:r,onOpenChange:u,content:c,onContentChange:d,children:p.jsx(FN,{scope:t,contentId:Yt(),triggerId:Yt(),trigger:i,onTriggerChange:l,children:n})})})};uv.displayName=od;var ia="MenuSubTrigger",dv=f.forwardRef((e,t)=>{const n=kr(ia,e.__scopeMenu),r=Ha(ia,e.__scopeMenu),o=cv(ia,e.__scopeMenu),a=ed(ia,e.__scopeMenu),s=f.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:l}=a,c={__scopeMenu:e.__scopeMenu},d=f.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return f.useEffect(()=>d,[d]),f.useEffect(()=>{const u=i.current;return()=>{window.clearTimeout(u),l(null)}},[i,l]),p.jsx(Qu,{asChild:!0,...c,children:p.jsx(Jb,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":n.open?o.contentId:void 0,"data-state":mv(n.open),...e,ref:Pu(t,o.onTriggerChange),onClick:u=>{var m;(m=e.onClick)==null||m.call(e,u),!(e.disabled||u.defaultPrevented)&&(u.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Q(e.onPointerMove,xa(u=>{a.onItemEnter(u),!u.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(a.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:Q(e.onPointerLeave,xa(u=>{var g,b;d();const m=(g=n.content)==null?void 0:g.getBoundingClientRect();if(m){const h=(b=n.content)==null?void 0:b.dataset.side,x=h==="right",v=x?-5:5,w=m[x?"left":"right"],y=m[x?"right":"left"];a.onPointerGraceIntentChange({area:[{x:u.clientX+v,y:u.clientY},{x:w,y:m.top},{x:y,y:m.top},{x:y,y:m.bottom},{x:w,y:m.bottom}],side:h}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(u),u.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:Q(e.onKeyDown,u=>{var g;const m=a.searchRef.current!=="";e.disabled||m&&u.key===" "||wN[r.dir].includes(u.key)&&(n.onOpenChange(!0),(g=n.content)==null||g.focus(),u.preventDefault())})})})});dv.displayName=ia;var fv="MenuSubContent",pv=f.forwardRef((e,t)=>{const n=qb(dn,e.__scopeMenu),{forceMount:r=n.forceMount,align:o="start",...a}=e,s=kr(dn,e.__scopeMenu),i=Ha(dn,e.__scopeMenu),l=cv(fv,e.__scopeMenu),c=f.useRef(null),d=_e(t,c);return p.jsx(va.Provider,{scope:e.__scopeMenu,children:p.jsx(yt,{present:r||s.open,children:p.jsx(va.Slot,{scope:e.__scopeMenu,children:p.jsx(td,{id:l.contentId,"aria-labelledby":l.triggerId,...a,ref:d,align:o,side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{var m;i.isUsingKeyboardRef.current&&((m=c.current)==null||m.focus()),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:Q(e.onFocusOutside,u=>{u.target!==l.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:Q(e.onEscapeKeyDown,u=>{i.onClose(),u.preventDefault()}),onKeyDown:Q(e.onKeyDown,u=>{var b;const m=u.currentTarget.contains(u.target),g=CN[i.dir].includes(u.key);m&&g&&(s.onOpenChange(!1),(b=l.trigger)==null||b.focus(),u.preventDefault())})})})})})});pv.displayName=fv;function mv(e){return e?"open":"closed"}function ei(e){return e==="indeterminate"}function ad(e){return ei(e)?"indeterminate":e?"checked":"unchecked"}function VN(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function WN(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function BN(e,t,n){const o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=WN(e,Math.max(a,0));o.length===1&&(s=s.filter(c=>c!==n));const l=s.find(c=>c.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function HN(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],l=t[s],c=i.x,d=i.y,u=l.x,m=l.y;d>r!=m>r&&n<(u-c)*(r-d)/(m-d)+c&&(o=!o)}return o}function GN(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return HN(n,t)}function xa(e){return t=>t.pointerType==="mouse"?e(t):void 0}var hv=Kb,gv=Qu,bv=Xb,vv=Zb,xv=nd,yv=Qb,wv=Gi,Cv=ev,Sv=nv,Ev=ov,Mv=sv,Rv=iv,kv=lv,Pv=uv,Nv=dv,Tv=pv,Yi="ContextMenu",[YN]=ht(Yi,[Hi]),$t=Hi(),[UN,Iv]=YN(Yi),_v=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,open:o,dir:a,modal:s=!0}=e,i=f.useRef(!1);{const u=f.useRef(!1);f.useEffect(()=>{o===!0&&!i.current&&!u.current&&(u.current=!0,console.warn("ContextMenu: The `open` prop has been set to `true` before the user has interacted with the trigger, so its position is indeterminate. This is likely unintended and will result in the menu being anchored to the top-left corner of the viewport."))},[o])}const[l,c]=Nt({prop:o,defaultProp:!1,onChange:r,caller:Yi}),d=$t(t);return p.jsx(UN,{scope:t,open:l,onOpenChange:c,modal:s,hasInteractedRef:i,children:p.jsx(hv,{...d,dir:a,open:l,onOpenChange:c,modal:s,children:n})})};_v.displayName=Yi;var Ov="ContextMenuTrigger",Dv=f.forwardRef((e,t)=>{const{__scopeContextMenu:n,disabled:r=!1,...o}=e,a=Iv(Ov,n),s=$t(n),i=f.useRef({x:0,y:0}),l=f.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...i.current})}),c=f.useRef(0),d=f.useCallback(()=>window.clearTimeout(c.current),[]),u=m=>{a.hasInteractedRef.current=!0,i.current={x:m.clientX,y:m.clientY},a.onOpenChange(!0)};return f.useEffect(()=>d,[d]),f.useEffect(()=>void(r&&d()),[r,d]),p.jsxs(p.Fragment,{children:[p.jsx(gv,{...s,virtualRef:l}),p.jsx(de.span,{"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,...o,ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:r?e.onContextMenu:Q(e.onContextMenu,m=>{d(),u(m),m.preventDefault()}),onPointerDown:r?e.onPointerDown:Q(e.onPointerDown,xs(m=>{d(),a.open&&a.onOpenChange(!1),c.current=window.setTimeout(()=>u(m),700)})),onPointerMove:r?e.onPointerMove:Q(e.onPointerMove,xs(d)),onPointerCancel:r?e.onPointerCancel:Q(e.onPointerCancel,xs(d)),onPointerUp:r?e.onPointerUp:Q(e.onPointerUp,xs(d))})]})});Dv.displayName=Ov;var KN="ContextMenuPortal",Av=e=>{const{__scopeContextMenu:t,...n}=e,r=$t(t);return p.jsx(bv,{...r,...n})};Av.displayName=KN;var jv="ContextMenuContent",zv=f.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=Iv(jv,n),a=$t(n),s=f.useRef(!1);return p.jsx(vv,{...a,...r,ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:i=>{var l;(l=e.onCloseAutoFocus)==null||l.call(e,i),!i.defaultPrevented&&s.current&&i.preventDefault(),s.current=!1},onInteractOutside:i=>{var l;(l=e.onInteractOutside)==null||l.call(e,i),!i.defaultPrevented&&!o.modal&&(s.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});zv.displayName=jv;var qN="ContextMenuGroup",$v=f.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=$t(n);return p.jsx(xv,{...o,...r,ref:t})});$v.displayName=qN;var XN="ContextMenuLabel",Lv=f.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=$t(n);return p.jsx(yv,{...o,...r,ref:t})});Lv.displayName=XN;var ZN="ContextMenuItem",Fv=f.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=$t(n);return p.jsx(wv,{...o,...r,ref:t})});Fv.displayName=ZN;var QN="ContextMenuCheckboxItem",Vv=f.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=$t(n);return p.jsx(Cv,{...o,...r,ref:t})});Vv.displayName=QN;var JN="ContextMenuRadioGroup",Wv=f.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=$t(n);return p.jsx(Sv,{...o,...r,ref:t})});Wv.displayName=JN;var eT="ContextMenuRadioItem",Bv=f.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=$t(n);return p.jsx(Ev,{...o,...r,ref:t})});Bv.displayName=eT;var tT="ContextMenuItemIndicator",Hv=f.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=$t(n);return p.jsx(Mv,{...o,...r,ref:t})});Hv.displayName=tT;var nT="ContextMenuSeparator",Gv=f.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=$t(n);return p.jsx(Rv,{...o,...r,ref:t})});Gv.displayName=nT;var rT="ContextMenuArrow",oT=f.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=$t(n);return p.jsx(kv,{...o,...r,ref:t})});oT.displayName=rT;var Yv="ContextMenuSub",Uv=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,open:o,defaultOpen:a}=e,s=$t(t),[i,l]=Nt({prop:o,defaultProp:a??!1,onChange:r,caller:Yv});return p.jsx(Pv,{...s,open:i,onOpenChange:l,children:n})};Uv.displayName=Yv;var aT="ContextMenuSubTrigger",Kv=f.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=$t(n);return p.jsx(Nv,{...o,...r,ref:t})});Kv.displayName=aT;var sT="ContextMenuSubContent",qv=f.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=$t(n);return p.jsx(Tv,{...o,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});qv.displayName=sT;function xs(e){return t=>t.pointerType!=="mouse"?e(t):void 0}var iT=_v,lT=Dv,Xv=Av,cT=zv,uT=$v,dT=Lv,fT=Fv,pT=Vv,mT=Wv,hT=Bv,Zv=Hv,gT=Gv,bT=Uv,vT=Kv,xT=qv,Ui="DropdownMenu",[yT]=ht(Ui,[Hi]),Lt=Hi(),[wT,Qv]=yT(Ui),Jv=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:s,modal:i=!0}=e,l=Lt(t),c=f.useRef(null),[d,u]=Nt({prop:o,defaultProp:a??!1,onChange:s,caller:Ui});return p.jsx(wT,{scope:t,triggerId:Yt(),triggerRef:c,contentId:Yt(),open:d,onOpenChange:u,onOpenToggle:f.useCallback(()=>u(m=>!m),[u]),modal:i,children:p.jsx(hv,{...l,open:d,onOpenChange:u,dir:r,modal:i,children:n})})};Jv.displayName=Ui;var e0="DropdownMenuTrigger",t0=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=Qv(e0,n),s=Lt(n);return p.jsx(gv,{asChild:!0,...s,children:p.jsx(de.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,...o,ref:Pu(t,a.triggerRef),onPointerDown:Q(e.onPointerDown,i=>{!r&&i.button===0&&i.ctrlKey===!1&&(a.onOpenToggle(),a.open||i.preventDefault())}),onKeyDown:Q(e.onKeyDown,i=>{r||(["Enter"," "].includes(i.key)&&a.onOpenToggle(),i.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});t0.displayName=e0;var CT="DropdownMenuPortal",n0=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Lt(t);return p.jsx(bv,{...r,...n})};n0.displayName=CT;var r0="DropdownMenuContent",o0=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Qv(r0,n),a=Lt(n),s=f.useRef(!1);return p.jsx(vv,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:Q(e.onCloseAutoFocus,i=>{var l;s.current||(l=o.triggerRef.current)==null||l.focus(),s.current=!1,i.preventDefault()}),onInteractOutside:Q(e.onInteractOutside,i=>{const l=i.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,d=l.button===2||c;(!o.modal||d)&&(s.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)"}})});o0.displayName=r0;var ST="DropdownMenuGroup",a0=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Lt(n);return p.jsx(xv,{...o,...r,ref:t})});a0.displayName=ST;var ET="DropdownMenuLabel",s0=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Lt(n);return p.jsx(yv,{...o,...r,ref:t})});s0.displayName=ET;var MT="DropdownMenuItem",i0=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Lt(n);return p.jsx(wv,{...o,...r,ref:t})});i0.displayName=MT;var RT="DropdownMenuCheckboxItem",l0=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Lt(n);return p.jsx(Cv,{...o,...r,ref:t})});l0.displayName=RT;var kT="DropdownMenuRadioGroup",c0=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Lt(n);return p.jsx(Sv,{...o,...r,ref:t})});c0.displayName=kT;var PT="DropdownMenuRadioItem",u0=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Lt(n);return p.jsx(Ev,{...o,...r,ref:t})});u0.displayName=PT;var NT="DropdownMenuItemIndicator",d0=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Lt(n);return p.jsx(Mv,{...o,...r,ref:t})});d0.displayName=NT;var TT="DropdownMenuSeparator",f0=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Lt(n);return p.jsx(Rv,{...o,...r,ref:t})});f0.displayName=TT;var IT="DropdownMenuArrow",_T=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Lt(n);return p.jsx(kv,{...o,...r,ref:t})});_T.displayName=IT;var OT=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,s=Lt(t),[i,l]=Nt({prop:r,defaultProp:a??!1,onChange:o,caller:"DropdownMenuSub"});return p.jsx(Pv,{...s,open:i,onOpenChange:l,children:n})},DT="DropdownMenuSubTrigger",p0=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Lt(n);return p.jsx(Nv,{...o,...r,ref:t})});p0.displayName=DT;var AT="DropdownMenuSubContent",m0=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Lt(n);return p.jsx(Tv,{...o,...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)"}})});m0.displayName=AT;var jT=Jv,zT=t0,h0=n0,$T=o0,LT=a0,FT=s0,VT=i0,WT=l0,BT=c0,HT=u0,g0=d0,GT=f0,YT=OT,UT=p0,KT=m0,qT="Label",b0=f.forwardRef((e,t)=>p.jsx(de.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));b0.displayName=qT;var XT=b0;function ya(e,[t,n]){return Math.min(n,Math.max(t,e))}var Ki="Popover",[v0]=ht(Ki,[Mr]),Ga=Mr(),[ZT,Pr]=v0(Ki),x0=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!1}=e,i=Ga(t),l=f.useRef(null),[c,d]=f.useState(!1),[u,m]=Nt({prop:r,defaultProp:o??!1,onChange:a,caller:Ki});return p.jsx(La,{...i,children:p.jsx(ZT,{scope:t,contentId:Yt(),triggerRef:l,open:u,onOpenChange:m,onOpenToggle:f.useCallback(()=>m(g=>!g),[m]),hasCustomAnchor:c,onCustomAnchorAdd:f.useCallback(()=>d(!0),[]),onCustomAnchorRemove:f.useCallback(()=>d(!1),[]),modal:s,children:n})})};x0.displayName=Ki;var y0="PopoverAnchor",w0=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Pr(y0,n),a=Ga(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:i}=o;return f.useEffect(()=>(s(),()=>i()),[s,i]),p.jsx(Fa,{...a,...r,ref:t})});w0.displayName=y0;var C0="PopoverTrigger",S0=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Pr(C0,n),a=Ga(n),s=_e(t,o.triggerRef),i=p.jsx(de.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":P0(o.open),...r,ref:s,onClick:Q(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:p.jsx(Fa,{asChild:!0,...a,children:i})});S0.displayName=C0;var sd="PopoverPortal",[QT,JT]=v0(sd,{forceMount:void 0}),E0=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=Pr(sd,t);return p.jsx(QT,{scope:t,forceMount:n,children:p.jsx(yt,{present:n||a.open,children:p.jsx(Go,{asChild:!0,container:o,children:r})})})};E0.displayName=sd;var Ao="PopoverContent",M0=f.forwardRef((e,t)=>{const n=JT(Ao,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=Pr(Ao,e.__scopePopover);return p.jsx(yt,{present:r||a.open,children:a.modal?p.jsx(tI,{...o,ref:t}):p.jsx(nI,{...o,ref:t})})});M0.displayName=Ao;var eI=vr("PopoverContent.RemoveScroll"),tI=f.forwardRef((e,t)=>{const n=Pr(Ao,e.__scopePopover),r=f.useRef(null),o=_e(t,r),a=f.useRef(!1);return f.useEffect(()=>{const s=r.current;if(s)return Ti(s)},[]),p.jsx(ja,{as:eI,allowPinchZoom:!0,children:p.jsx(R0,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Q(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),a.current||(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:Q(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0,c=i.button===2||l;a.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:Q(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),nI=f.forwardRef((e,t)=>{const n=Pr(Ao,e.__scopePopover),r=f.useRef(!1),o=f.useRef(!1);return p.jsx(R0,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,i;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(i=n.triggerRef.current)==null||i.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((c=n.triggerRef.current)==null?void 0:c.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),R0=f.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:d,...u}=e,m=Pr(Ao,n),g=Ga(n);return Pi(),p.jsx(Aa,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:p.jsx(Ho,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:d,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>m.onOpenChange(!1),children:p.jsx(Fi,{"data-state":P0(m.open),role:"dialog",id:m.contentId,...g,...u,ref:t,style:{...u.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),k0="PopoverClose",rI=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Pr(k0,n);return p.jsx(de.button,{type:"button",...r,ref:t,onClick:Q(e.onClick,()=>o.onOpenChange(!1))})});rI.displayName=k0;var oI="PopoverArrow",aI=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ga(n);return p.jsx(Vi,{...o,...r,ref:t})});aI.displayName=oI;function P0(e){return e?"open":"closed"}var sI=x0,iI=w0,lI=S0,cI=E0,uI=M0,id="Progress",ld=100,[dI]=ht(id),[fI,pI]=dI(id),N0=f.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:a=mI,...s}=e;(o||o===0)&&!Fp(o)&&console.error(hI(`${o}`,"Progress"));const i=Fp(o)?o:ld;r!==null&&!Vp(r,i)&&console.error(gI(`${r}`,"Progress"));const l=Vp(r,i)?r:null,c=ti(l)?a(l,i):void 0;return p.jsx(fI,{scope:n,value:l,max:i,children:p.jsx(de.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":ti(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":_0(l,i),"data-value":l??void 0,"data-max":i,...s,ref:t})})});N0.displayName=id;var T0="ProgressIndicator",I0=f.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=pI(T0,n);return p.jsx(de.div,{"data-state":_0(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});I0.displayName=T0;function mI(e,t){return`${Math.round(e/t*100)}%`}function _0(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function ti(e){return typeof e=="number"}function Fp(e){return ti(e)&&!isNaN(e)&&e>0}function Vp(e,t){return ti(e)&&!isNaN(e)&&e<=t&&e>=0}function hI(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${ld}\`.`}function gI(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
55
|
+
- a positive number
|
|
56
|
+
- less than the value passed to \`max\` (or ${ld} if no \`max\` prop is set)
|
|
57
|
+
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
58
|
+
|
|
59
|
+
Defaulting to \`null\`.`}var bI=N0,vI=I0,cd="Radio",[xI,O0]=ht(cd),[yI,qi]=xI(cd);function D0(e){const{__scopeRadio:t,checked:n=!1,children:r,disabled:o,form:a,name:s,onCheck:i,required:l,value:c="on",internal_do_not_use_render:d}=e,[u,m]=f.useState(null),[g,b]=f.useState(null),h=f.useRef(!1),x=u?!!a||!!u.closest("form"):!0,v={checked:n,disabled:o,required:l,name:s,form:a,value:c,control:u,setControl:m,hasConsumerStoppedPropagationRef:h,isFormControl:x,bubbleInput:g,setBubbleInput:b,onCheck:()=>i==null?void 0:i()};return p.jsx(yI,{scope:t,...v,children:CI(d)?d(v):r})}var A0="RadioTrigger",ud=f.forwardRef(({__scopeRadio:e,onClick:t,...n},r)=>{const{checked:o,disabled:a,value:s,setControl:i,onCheck:l,hasConsumerStoppedPropagationRef:c,isFormControl:d,bubbleInput:u}=qi(A0,e),m=_e(r,i);return p.jsx(de.button,{type:"button",role:"radio","aria-checked":o,"data-state":L0(o),"data-disabled":a?"":void 0,disabled:a,value:s,...n,ref:m,onClick:Q(t,g=>{o||l(),u&&d&&(c.current=g.isPropagationStopped(),c.current||g.stopPropagation())})})});ud.displayName=A0;var wI=f.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o,required:a,disabled:s,value:i,onCheck:l,form:c,...d}=e;return p.jsx(D0,{__scopeRadio:n,checked:o,disabled:s,required:a,onCheck:l,name:r,form:c,value:i,internal_do_not_use_render:({isFormControl:u})=>p.jsxs(p.Fragment,{children:[p.jsx(ud,{...d,ref:t,__scopeRadio:n}),u&&p.jsx(dd,{__scopeRadio:n})]})})});wI.displayName=cd;var j0="RadioIndicator",z0=f.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=qi(j0,n);return p.jsx(yt,{present:r||a.checked,children:p.jsx(de.span,{"data-state":L0(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});z0.displayName=j0;var $0="RadioBubbleInput",dd=f.forwardRef(({__scopeRadio:e,...t},n)=>{const{control:r,checked:o,required:a,disabled:s,name:i,value:l,form:c,bubbleInput:d,setBubbleInput:u,hasConsumerStoppedPropagationRef:m}=qi($0,e),g=_e(n,u),b=za(o),h=$a(r);f.useEffect(()=>{const v=d;if(!v)return;const w=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(w,"checked").set,E=!m.current;if(b!==o&&C){const S=new Event("click",{bubbles:E});C.call(v,o),v.dispatchEvent(S)}},[d,b,o,m]);const x=f.useRef(o);return p.jsx(de.input,{type:"radio","aria-hidden":!0,defaultChecked:x.current,required:a,disabled:s,name:i,value:l,form:c,...t,tabIndex:-1,ref:g,style:{...t.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});dd.displayName=$0;function CI(e){return typeof e=="function"}function L0(e){return e?"checked":"unchecked"}var SI=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Xi="RadioGroup",[EI]=ht(Xi,[Rr,O0]),F0=Rr(),Zi=O0(),[MI,RI]=EI(Xi),V0=f.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:s=!1,disabled:i=!1,orientation:l,dir:c,loop:d=!0,onValueChange:u,...m}=e,g=F0(n),b=Sr(c),[h,x]=Nt({prop:a,defaultProp:o??null,onChange:u,caller:Xi});return p.jsx(MI,{scope:n,name:r,required:s,disabled:i,value:h,onValueChange:x,children:p.jsx(Wi,{asChild:!0,...g,orientation:l,dir:b,loop:d,children:p.jsx(de.div,{role:"radiogroup","aria-required":s,"aria-orientation":l,"data-disabled":i?"":void 0,dir:b,...m,ref:t})})})});V0.displayName=Xi;var kI="RadioGroupItem",PI="RadioGroupItemProvider",W0="RadioGroupItemTrigger",NI="RadioGroupItemBubbleInput";function TI(e){const{__scopeRadioGroup:t,value:n,disabled:r,children:o,internal_do_not_use_render:a}=e,s=RI(PI,t),i=Zi(t),l=s.disabled||r;return p.jsx(D0,{...i,checked:s.value===n,disabled:l,required:s.required,name:s.name,value:n,onCheck:()=>s.onValueChange(n),internal_do_not_use_render:a,children:o})}var B0=f.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=F0(n),a=Zi(n),{checked:s,disabled:i}=qi(W0,a.__scopeRadio),l=f.useRef(null),c=_e(t,l),d=f.useRef(!1);return f.useEffect(()=>{const u=g=>{SI.includes(g.key)&&(d.current=!0)},m=()=>d.current=!1;return document.addEventListener("keydown",u),document.addEventListener("keyup",m),()=>{document.removeEventListener("keydown",u),document.removeEventListener("keyup",m)}},[]),p.jsx(Bi,{asChild:!0,...o,focusable:!i,active:s,children:p.jsx(ud,{...a,...r,ref:c,onKeyDown:Q(r.onKeyDown,u=>{u.key==="Enter"&&u.preventDefault()}),onFocus:Q(r.onFocus,()=>{var u;d.current&&((u=l.current)==null||u.click())})})})});B0.displayName=W0;var H0=f.forwardRef((e,t)=>{const{__scopeRadioGroup:n,value:r,disabled:o,...a}=e;return p.jsx(TI,{__scopeRadioGroup:n,value:r,disabled:o,internal_do_not_use_render:({isFormControl:s})=>p.jsxs(p.Fragment,{children:[p.jsx(B0,{...a,ref:t,__scopeRadioGroup:n}),s&&p.jsx(G0,{__scopeRadioGroup:n})]})})});H0.displayName=kI;var G0=f.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=Zi(n);return p.jsx(dd,{...o,...r,ref:t})});G0.displayName=NI;var II="RadioGroupIndicator",Y0=f.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=Zi(n);return p.jsx(z0,{...o,...r,ref:t})});Y0.displayName=II;function _I(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var fd="ScrollArea",[U0]=ht(fd),[OI,pn]=U0(fd),K0=f.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:a=600,...s}=e,[i,l]=f.useState(null),[c,d]=f.useState(null),[u,m]=f.useState(null),[g,b]=f.useState(null),[h,x]=f.useState(null),[v,w]=f.useState(0),[y,C]=f.useState(0),[E,S]=f.useState(!1),[M,R]=f.useState(!1),I=_e(t,_=>l(_)),O=Sr(o);return p.jsx(OI,{scope:n,type:r,dir:O,scrollHideDelay:a,scrollArea:i,viewport:c,onViewportChange:d,content:u,onContentChange:m,scrollbarX:g,onScrollbarXChange:b,scrollbarXEnabled:E,onScrollbarXEnabledChange:S,scrollbarY:h,onScrollbarYChange:x,scrollbarYEnabled:M,onScrollbarYEnabledChange:R,onCornerWidthChange:w,onCornerHeightChange:C,children:p.jsx(de.div,{dir:O,...s,ref:I,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":y+"px",...e.style}})})});K0.displayName=fd;var q0="ScrollAreaViewport",X0=f.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...a}=e,s=pn(q0,n),i=f.useRef(null),l=_e(t,i,s.onViewportChange);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),p.jsx(de.div,{"data-radix-scroll-area-viewport":"",...a,ref:l,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:p.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});X0.displayName=q0;var Ln="ScrollAreaScrollbar",Z0=f.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=pn(Ln,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:s}=o,i=e.orientation==="horizontal";return f.useEffect(()=>(i?a(!0):s(!0),()=>{i?a(!1):s(!1)}),[i,a,s]),o.type==="hover"?p.jsx(DI,{...r,ref:t,forceMount:n}):o.type==="scroll"?p.jsx(AI,{...r,ref:t,forceMount:n}):o.type==="auto"?p.jsx(Q0,{...r,ref:t,forceMount:n}):o.type==="always"?p.jsx(pd,{...r,ref:t,"data-state":"visible"}):null});Z0.displayName=Ln;var DI=f.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=pn(Ln,e.__scopeScrollArea),[a,s]=f.useState(!1);return f.useEffect(()=>{const i=o.scrollArea;let l=0;if(i){const c=()=>{window.clearTimeout(l),s(!0)},d=()=>{l=window.setTimeout(()=>s(!1),o.scrollHideDelay)};return i.addEventListener("pointerenter",c),i.addEventListener("pointerleave",d),()=>{window.clearTimeout(l),i.removeEventListener("pointerenter",c),i.removeEventListener("pointerleave",d)}}},[o.scrollArea,o.scrollHideDelay]),p.jsx(yt,{present:n||a,children:p.jsx(Q0,{"data-state":a?"visible":"hidden",...r,ref:t})})}),AI=f.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=pn(Ln,e.__scopeScrollArea),a=e.orientation==="horizontal",s=Ji(()=>l("SCROLL_END"),100),[i,l]=_I("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return f.useEffect(()=>{if(i==="idle"){const c=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(c)}},[i,o.scrollHideDelay,l]),f.useEffect(()=>{const c=o.viewport,d=a?"scrollLeft":"scrollTop";if(c){let u=c[d];const m=()=>{const g=c[d];u!==g&&(l("SCROLL"),s()),u=g};return c.addEventListener("scroll",m),()=>c.removeEventListener("scroll",m)}},[o.viewport,a,l,s]),p.jsx(yt,{present:n||i!=="hidden",children:p.jsx(pd,{"data-state":i==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Q(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:Q(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),Q0=f.forwardRef((e,t)=>{const n=pn(Ln,e.__scopeScrollArea),{forceMount:r,...o}=e,[a,s]=f.useState(!1),i=e.orientation==="horizontal",l=Ji(()=>{if(n.viewport){const c=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;s(i?c:d)}},10);return jo(n.viewport,l),jo(n.content,l),p.jsx(yt,{present:r||a,children:p.jsx(pd,{"data-state":a?"visible":"hidden",...o,ref:t})})}),pd=f.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=pn(Ln,e.__scopeScrollArea),a=f.useRef(null),s=f.useRef(0),[i,l]=f.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=rx(i.viewport,i.content),d={...r,sizes:i,onSizesChange:l,hasThumb:c>0&&c<1,onThumbChange:m=>a.current=m,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:m=>s.current=m};function u(m,g){return VI(m,s.current,i,g)}return n==="horizontal"?p.jsx(jI,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const m=o.viewport.scrollLeft,g=Wp(m,i,o.dir);a.current.style.transform=`translate3d(${g}px, 0, 0)`}},onWheelScroll:m=>{o.viewport&&(o.viewport.scrollLeft=m)},onDragScroll:m=>{o.viewport&&(o.viewport.scrollLeft=u(m,o.dir))}}):n==="vertical"?p.jsx(zI,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const m=o.viewport.scrollTop,g=Wp(m,i);a.current.style.transform=`translate3d(0, ${g}px, 0)`}},onWheelScroll:m=>{o.viewport&&(o.viewport.scrollTop=m)},onDragScroll:m=>{o.viewport&&(o.viewport.scrollTop=u(m))}}):null}),jI=f.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=pn(Ln,e.__scopeScrollArea),[s,i]=f.useState(),l=f.useRef(null),c=_e(t,l,a.onScrollbarXChange);return f.useEffect(()=>{l.current&&i(getComputedStyle(l.current))},[l]),p.jsx(ex,{"data-orientation":"horizontal",...o,ref:c,sizes:n,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Qi(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,u)=>{if(a.viewport){const m=a.viewport.scrollLeft+d.deltaX;e.onWheelScroll(m),ax(m,u)&&d.preventDefault()}},onResize:()=>{l.current&&a.viewport&&s&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:ri(s.paddingLeft),paddingEnd:ri(s.paddingRight)}})}})}),zI=f.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=pn(Ln,e.__scopeScrollArea),[s,i]=f.useState(),l=f.useRef(null),c=_e(t,l,a.onScrollbarYChange);return f.useEffect(()=>{l.current&&i(getComputedStyle(l.current))},[l]),p.jsx(ex,{"data-orientation":"vertical",...o,ref:c,sizes:n,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Qi(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,u)=>{if(a.viewport){const m=a.viewport.scrollTop+d.deltaY;e.onWheelScroll(m),ax(m,u)&&d.preventDefault()}},onResize:()=>{l.current&&a.viewport&&s&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:ri(s.paddingTop),paddingEnd:ri(s.paddingBottom)}})}})}),[$I,J0]=U0(Ln),ex=f.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:a,onThumbPointerUp:s,onThumbPointerDown:i,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:d,onResize:u,...m}=e,g=pn(Ln,n),[b,h]=f.useState(null),x=_e(t,I=>h(I)),v=f.useRef(null),w=f.useRef(""),y=g.viewport,C=r.content-r.viewport,E=kt(d),S=kt(l),M=Ji(u,10);function R(I){if(v.current){const O=I.clientX-v.current.left,_=I.clientY-v.current.top;c({x:O,y:_})}}return f.useEffect(()=>{const I=O=>{const _=O.target;(b==null?void 0:b.contains(_))&&E(O,C)};return document.addEventListener("wheel",I,{passive:!1}),()=>document.removeEventListener("wheel",I,{passive:!1})},[y,b,C,E]),f.useEffect(S,[r,S]),jo(b,M),jo(g.content,M),p.jsx($I,{scope:n,scrollbar:b,hasThumb:o,onThumbChange:kt(a),onThumbPointerUp:kt(s),onThumbPositionChange:S,onThumbPointerDown:kt(i),children:p.jsx(de.div,{...m,ref:x,style:{position:"absolute",...m.style},onPointerDown:Q(e.onPointerDown,I=>{I.button===0&&(I.target.setPointerCapture(I.pointerId),v.current=b.getBoundingClientRect(),w.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",g.viewport&&(g.viewport.style.scrollBehavior="auto"),R(I))}),onPointerMove:Q(e.onPointerMove,R),onPointerUp:Q(e.onPointerUp,I=>{const O=I.target;O.hasPointerCapture(I.pointerId)&&O.releasePointerCapture(I.pointerId),document.body.style.webkitUserSelect=w.current,g.viewport&&(g.viewport.style.scrollBehavior=""),v.current=null})})})}),ni="ScrollAreaThumb",tx=f.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=J0(ni,e.__scopeScrollArea);return p.jsx(yt,{present:n||o.hasThumb,children:p.jsx(LI,{ref:t,...r})})}),LI=f.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,a=pn(ni,n),s=J0(ni,n),{onThumbPositionChange:i}=s,l=_e(t,u=>s.onThumbChange(u)),c=f.useRef(void 0),d=Ji(()=>{c.current&&(c.current(),c.current=void 0)},100);return f.useEffect(()=>{const u=a.viewport;if(u){const m=()=>{if(d(),!c.current){const g=WI(u,i);c.current=g,i()}};return i(),u.addEventListener("scroll",m),()=>u.removeEventListener("scroll",m)}},[a.viewport,d,i]),p.jsx(de.div,{"data-state":s.hasThumb?"visible":"hidden",...o,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Q(e.onPointerDownCapture,u=>{const g=u.target.getBoundingClientRect(),b=u.clientX-g.left,h=u.clientY-g.top;s.onThumbPointerDown({x:b,y:h})}),onPointerUp:Q(e.onPointerUp,s.onThumbPointerUp)})});tx.displayName=ni;var md="ScrollAreaCorner",nx=f.forwardRef((e,t)=>{const n=pn(md,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?p.jsx(FI,{...e,ref:t}):null});nx.displayName=md;var FI=f.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=pn(md,n),[a,s]=f.useState(0),[i,l]=f.useState(0),c=!!(a&&i);return jo(o.scrollbarX,()=>{var u;const d=((u=o.scrollbarX)==null?void 0:u.offsetHeight)||0;o.onCornerHeightChange(d),l(d)}),jo(o.scrollbarY,()=>{var u;const d=((u=o.scrollbarY)==null?void 0:u.offsetWidth)||0;o.onCornerWidthChange(d),s(d)}),c?p.jsx(de.div,{...r,ref:t,style:{width:a,height:i,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function ri(e){return e?parseInt(e,10):0}function rx(e,t){const n=e/t;return isNaN(n)?0:n}function Qi(e){const t=rx(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function VI(e,t,n,r="ltr"){const o=Qi(n),a=o/2,s=t||a,i=o-s,l=n.scrollbar.paddingStart+s,c=n.scrollbar.size-n.scrollbar.paddingEnd-i,d=n.content-n.viewport,u=r==="ltr"?[0,d]:[d*-1,0];return ox([l,c],u)(e)}function Wp(e,t,n="ltr"){const r=Qi(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-o,s=t.content-t.viewport,i=a-r,l=n==="ltr"?[0,s]:[s*-1,0],c=ya(e,l);return ox([0,s],[0,i])(c)}function ox(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function ax(e,t){return e>0&&e<t}var WI=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function o(){const a={left:e.scrollLeft,top:e.scrollTop},s=n.left!==a.left,i=n.top!==a.top;(s||i)&&t(),n=a,r=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(r)};function Ji(e,t){const n=kt(e),r=f.useRef(0);return f.useEffect(()=>()=>window.clearTimeout(r.current),[]),f.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function jo(e,t){const n=kt(t);mt(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}var BI=K0,HI=X0,GI=nx,YI=[" ","Enter","ArrowUp","ArrowDown"],UI=[" ","Enter"],Ur="Select",[el,tl,KI]=Ri(Ur),[oo]=ht(Ur,[KI,Mr]),nl=Mr(),[qI,Nr]=oo(Ur),[XI,ZI]=oo(Ur),QI="SelectProvider";function sx(e){const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:s,defaultValue:i,onValueChange:l,dir:c,name:d,autoComplete:u,disabled:m,required:g,form:b,internal_do_not_use_render:h}=e,x=nl(t),[v,w]=f.useState(null),[y,C]=f.useState(null),[E,S]=f.useState(!1),M=Sr(c),[R,I]=Nt({prop:r,defaultProp:o??!1,onChange:a,caller:Ur}),[O,_]=Nt({prop:s,defaultProp:i,onChange:l,caller:Ur}),T=f.useRef(null),k=v?!!b||!!v.closest("form"):!0,[j,V]=f.useState(new Set),z=Yt(),$=Array.from(j).map(re=>re.props.value).join(";"),F=f.useCallback(re=>{V(pe=>new Set(pe).add(re))},[]),L=f.useCallback(re=>{V(pe=>{const G=new Set(pe);return G.delete(re),G})},[]),D={required:g,trigger:v,onTriggerChange:w,valueNode:y,onValueNodeChange:C,valueNodeHasChildren:E,onValueNodeHasChildrenChange:S,contentId:z,value:O,onValueChange:_,open:R,onOpenChange:I,dir:M,triggerPointerDownPosRef:T,disabled:m,name:d,autoComplete:u,form:b,nativeOptions:j,nativeSelectKey:$,isFormControl:k};return p.jsx(La,{...x,children:p.jsx(qI,{scope:t,...D,children:p.jsx(el.Provider,{scope:t,children:p.jsx(XI,{scope:t,onNativeOptionAdd:F,onNativeOptionRemove:L,children:f_(h)?h(D):n})})})})}sx.displayName=QI;var ix=e=>{const{__scopeSelect:t,children:n,...r}=e;return p.jsx(sx,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:o})=>p.jsxs(p.Fragment,{children:[n,o?p.jsx(jx,{__scopeSelect:t}):null]})})};ix.displayName=Ur;var lx="SelectTrigger",cx=f.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=nl(n),s=Nr(lx,n),i=s.disabled||r,l=_e(t,s.onTriggerChange),c=tl(n),d=f.useRef("touch"),[u,m,g]=zx(h=>{const x=c().filter(y=>!y.disabled),v=x.find(y=>y.value===s.value),w=$x(x,h,v);w!==void 0&&s.onValueChange(w.value)}),b=h=>{i||(s.onOpenChange(!0),g()),h&&(s.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return p.jsx(Fa,{asChild:!0,...a,children:p.jsx(de.button,{type:"button",role:"combobox","aria-controls":s.open?s.contentId:void 0,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":gd(s.value)?"":void 0,...o,ref:l,onClick:Q(o.onClick,h=>{h.currentTarget.focus(),d.current!=="mouse"&&b(h)}),onPointerDown:Q(o.onPointerDown,h=>{d.current=h.pointerType;const x=h.target;x.hasPointerCapture(h.pointerId)&&x.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(b(h),h.preventDefault())}),onKeyDown:Q(o.onKeyDown,h=>{const x=u.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&m(h.key),!(x&&h.key===" ")&&YI.includes(h.key)&&(b(),h.preventDefault())})})})});cx.displayName=lx;var ux="SelectValue",dx=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:s="",...i}=e,l=Nr(ux,n),{onValueNodeHasChildrenChange:c}=l,d=a!==void 0,u=_e(t,l.onValueNodeChange);mt(()=>{c(d)},[c,d]);const m=gd(l.value);return p.jsx(de.span,{...i,asChild:m?!1:i.asChild,ref:u,style:{pointerEvents:"none"},children:p.jsx(f.Fragment,{children:m?s:a},m?"placeholder":"value")})});dx.displayName=ux;var JI="SelectIcon",fx=f.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return p.jsx(de.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});fx.displayName=JI;var px="SelectPortal",[e_,t_]=oo(px,{forceMount:void 0}),mx=e=>{const{__scopeSelect:t,forceMount:n,...r}=e;return p.jsx(e_,{scope:e.__scopeSelect,forceMount:n,children:p.jsx(Go,{asChild:!0,...r})})};mx.displayName=px;var yr="SelectContent",hx=f.forwardRef((e,t)=>{const n=t_(yr,e.__scopeSelect),{forceMount:r=n.forceMount,...o}=e,a=Nr(yr,e.__scopeSelect),[s,i]=f.useState();return mt(()=>{i(new DocumentFragment)},[]),p.jsx(yt,{present:r||a.open,children:({present:l})=>l?p.jsx(vx,{...o,ref:t}):p.jsx(gx,{...o,fragment:s})})});hx.displayName=yr;var gx=f.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,fragment:o}=e;return o?jn.createPortal(p.jsx(bx,{scope:n,children:p.jsx(el.Slot,{scope:n,children:p.jsx("div",{ref:t,children:r})})}),o):null});gx.displayName="SelectContentFragment";var vn=10,[bx,Tr]=oo(yr),n_="SelectContentImpl",r_=vr("SelectContent.RemoveScroll"),vx=f.forwardRef((e,t)=>{const{__scopeSelect:n}=e,{position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:s,side:i,sideOffset:l,align:c,alignOffset:d,arrowPadding:u,collisionBoundary:m,collisionPadding:g,sticky:b,hideWhenDetached:h,avoidCollisions:x,...v}=e,w=Nr(yr,n),[y,C]=f.useState(null),[E,S]=f.useState(null),M=_e(t,U=>C(U)),[R,I]=f.useState(null),[O,_]=f.useState(null),T=tl(n),[k,j]=f.useState(!1),V=f.useRef(!1);f.useEffect(()=>{if(y)return Ti(y)},[y]),Pi();const z=f.useCallback(U=>{const[H,...te]=T().map(Y=>Y.ref.current),[xe]=te.slice(-1),Re=document.activeElement;for(const Y of U)if(Y===Re||(Y==null||Y.scrollIntoView({block:"nearest"}),Y===H&&E&&(E.scrollTop=0),Y===xe&&E&&(E.scrollTop=E.scrollHeight),Y==null||Y.focus(),document.activeElement!==Re))return},[T,E]),$=f.useCallback(()=>z([R,y]),[z,R,y]);f.useEffect(()=>{k&&$()},[k,$]);const{onOpenChange:F,triggerPointerDownPosRef:L}=w;f.useEffect(()=>{if(y){let U={x:0,y:0};const H=xe=>{var Re,Y;U={x:Math.abs(Math.round(xe.pageX)-(((Re=L.current)==null?void 0:Re.x)??0)),y:Math.abs(Math.round(xe.pageY)-(((Y=L.current)==null?void 0:Y.y)??0))}},te=xe=>{U.x<=10&&U.y<=10?xe.preventDefault():xe.composedPath().includes(y)||F(!1),document.removeEventListener("pointermove",H),L.current=null};return L.current!==null&&(document.addEventListener("pointermove",H),document.addEventListener("pointerup",te,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",H),document.removeEventListener("pointerup",te,{capture:!0})}}},[y,F,L]),f.useEffect(()=>{const U=()=>F(!1);return window.addEventListener("blur",U),window.addEventListener("resize",U),()=>{window.removeEventListener("blur",U),window.removeEventListener("resize",U)}},[F]);const[D,re]=zx(U=>{const H=T().filter(Re=>!Re.disabled),te=H.find(Re=>Re.ref.current===document.activeElement),xe=$x(H,U,te);xe&&setTimeout(()=>xe.ref.current.focus())}),pe=f.useCallback((U,H,te)=>{const xe=!V.current&&!te;(w.value!==void 0&&w.value===H||xe)&&(I(U),xe&&(V.current=!0))},[w.value]),G=f.useCallback(()=>y==null?void 0:y.focus(),[y]),B=f.useCallback((U,H,te)=>{const xe=!V.current&&!te;(w.value!==void 0&&w.value===H||xe)&&_(U)},[w.value]),J=r==="popper"?Xc:xx,oe=J===Xc?{side:i,sideOffset:l,align:c,alignOffset:d,arrowPadding:u,collisionBoundary:m,collisionPadding:g,sticky:b,hideWhenDetached:h,avoidCollisions:x}:{};return p.jsx(bx,{scope:n,content:y,viewport:E,onViewportChange:S,itemRefCallback:pe,selectedItem:R,onItemLeave:G,itemTextRefCallback:B,focusSelectedItem:$,selectedItemText:O,position:r,isPositioned:k,searchRef:D,children:p.jsx(ja,{as:r_,allowPinchZoom:!0,children:p.jsx(Aa,{asChild:!0,trapped:w.open,onMountAutoFocus:U=>{U.preventDefault()},onUnmountAutoFocus:Q(o,U=>{var H;(H=w.trigger)==null||H.focus({preventScroll:!0}),U.preventDefault()}),children:p.jsx(Ho,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:U=>U.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:p.jsx(J,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:U=>U.preventDefault(),...v,...oe,onPlaced:()=>j(!0),ref:M,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:Q(v.onKeyDown,U=>{const H=U.ctrlKey||U.altKey||U.metaKey;if(U.key==="Tab"&&U.preventDefault(),!H&&U.key.length===1&&re(U.key),["ArrowUp","ArrowDown","Home","End"].includes(U.key)){let xe=T().filter(Re=>!Re.disabled).map(Re=>Re.ref.current);if(["ArrowUp","End"].includes(U.key)&&(xe=xe.slice().reverse()),["ArrowUp","ArrowDown"].includes(U.key)){const Re=U.target,Y=xe.indexOf(Re);xe=xe.slice(Y+1)}setTimeout(()=>z(xe)),U.preventDefault()}})})})})})})});vx.displayName=n_;var o_="SelectItemAlignedPosition",xx=f.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=Nr(yr,n),s=Tr(yr,n),[i,l]=f.useState(null),[c,d]=f.useState(null),u=_e(t,M=>d(M)),m=tl(n),g=f.useRef(!1),b=f.useRef(!0),{viewport:h,selectedItem:x,selectedItemText:v,focusSelectedItem:w}=s,y=f.useCallback(()=>{if(a.trigger&&a.valueNode&&i&&c&&h&&x&&v){const M=a.trigger.getBoundingClientRect(),R=c.getBoundingClientRect(),I=a.valueNode.getBoundingClientRect(),O=v.getBoundingClientRect();if(a.dir!=="rtl"){const Re=O.left-R.left,Y=I.left-Re,we=M.left-Y,he=M.width+we,Ne=Math.max(he,R.width),Me=window.innerWidth-vn,fe=ya(Y,[vn,Math.max(vn,Me-Ne)]);i.style.minWidth=he+"px",i.style.left=fe+"px"}else{const Re=R.right-O.right,Y=window.innerWidth-I.right-Re,we=window.innerWidth-M.right-Y,he=M.width+we,Ne=Math.max(he,R.width),Me=window.innerWidth-vn,fe=ya(Y,[vn,Math.max(vn,Me-Ne)]);i.style.minWidth=he+"px",i.style.right=fe+"px"}const _=m(),T=window.innerHeight-vn*2,k=h.scrollHeight,j=window.getComputedStyle(c),V=parseInt(j.borderTopWidth,10),z=parseInt(j.paddingTop,10),$=parseInt(j.borderBottomWidth,10),F=parseInt(j.paddingBottom,10),L=V+z+k+F+$,D=Math.min(x.offsetHeight*5,L),re=window.getComputedStyle(h),pe=parseInt(re.paddingTop,10),G=parseInt(re.paddingBottom,10),B=M.top+M.height/2-vn,J=T-B,oe=x.offsetHeight/2,U=x.offsetTop+oe,H=V+z+U,te=L-H;if(H<=B){const Re=_.length>0&&x===_[_.length-1].ref.current;i.style.bottom="0px";const Y=c.clientHeight-h.offsetTop-h.offsetHeight,we=Math.max(J,oe+(Re?G:0)+Y+$),he=H+we;i.style.height=he+"px"}else{const Re=_.length>0&&x===_[0].ref.current;i.style.top="0px";const we=Math.max(B,V+h.offsetTop+(Re?pe:0)+oe)+te;i.style.height=we+"px",h.scrollTop=H-B+h.offsetTop}i.style.margin=`${vn}px 0`,i.style.minHeight=D+"px",i.style.maxHeight=T+"px",r==null||r(),requestAnimationFrame(()=>g.current=!0)}},[m,a.trigger,a.valueNode,i,c,h,x,v,a.dir,r]);mt(()=>y(),[y]);const[C,E]=f.useState();mt(()=>{c&&E(window.getComputedStyle(c).zIndex)},[c]);const S=f.useCallback(M=>{M&&b.current===!0&&(y(),w==null||w(),b.current=!1)},[y,w]);return p.jsx(s_,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:g,onScrollButtonChange:S,children:p.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:p.jsx(de.div,{...o,ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});xx.displayName=o_;var a_="SelectPopperPosition",Xc=f.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=vn,...a}=e,s=nl(n);return p.jsx(Fi,{...s,...a,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Xc.displayName=a_;var[s_,hd]=oo(yr,{}),Zc="SelectViewport",yx=f.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=Tr(Zc,n),s=hd(Zc,n),i=_e(t,a.onViewportChange),l=f.useRef(0);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),p.jsx(el.Slot,{scope:n,children:p.jsx(de.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:Q(o.onScroll,c=>{const d=c.currentTarget,{contentWrapper:u,shouldExpandOnScrollRef:m}=s;if(m!=null&&m.current&&u){const g=Math.abs(l.current-d.scrollTop);if(g>0){const b=window.innerHeight-vn*2,h=parseFloat(u.style.minHeight),x=parseFloat(u.style.height),v=Math.max(h,x);if(v<b){const w=v+g,y=Math.min(b,w),C=w-y;u.style.height=y+"px",u.style.bottom==="0px"&&(d.scrollTop=C>0?C:0,u.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});yx.displayName=Zc;var wx="SelectGroup",[i_,l_]=oo(wx),Cx=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Yt();return p.jsx(i_,{scope:n,id:o,children:p.jsx(de.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Cx.displayName=wx;var Sx="SelectLabel",Ex=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=l_(Sx,n);return p.jsx(de.div,{id:o.id,...r,ref:t})});Ex.displayName=Sx;var oi="SelectItem",[c_,Mx]=oo(oi),Rx=f.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...s}=e,i=Nr(oi,n),l=Tr(oi,n),c=i.value===r,[d,u]=f.useState(a??""),[m,g]=f.useState(!1),b=_e(t,w=>{var y;return(y=l.itemRefCallback)==null?void 0:y.call(l,w,r,o)}),h=Yt(),x=f.useRef("touch"),v=()=>{o||(i.onValueChange(r),i.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return p.jsx(c_,{scope:n,value:r,disabled:o,textId:h,isSelected:c,onItemTextChange:f.useCallback(w=>{u(y=>y||((w==null?void 0:w.textContent)??"").trim())},[]),children:p.jsx(el.ItemSlot,{scope:n,value:r,disabled:o,textValue:d,children:p.jsx(de.div,{role:"option","aria-labelledby":h,"data-highlighted":m?"":void 0,"aria-selected":c&&m,"data-state":c?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:b,onFocus:Q(s.onFocus,()=>g(!0)),onBlur:Q(s.onBlur,()=>g(!1)),onClick:Q(s.onClick,()=>{x.current!=="mouse"&&v()}),onPointerUp:Q(s.onPointerUp,()=>{x.current==="mouse"&&v()}),onPointerDown:Q(s.onPointerDown,w=>{x.current=w.pointerType}),onPointerMove:Q(s.onPointerMove,w=>{var y;x.current=w.pointerType,o?(y=l.onItemLeave)==null||y.call(l):x.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Q(s.onPointerLeave,w=>{var y;w.currentTarget===document.activeElement&&((y=l.onItemLeave)==null||y.call(l))}),onKeyDown:Q(s.onKeyDown,w=>{var C;((C=l.searchRef)==null?void 0:C.current)!==""&&w.key===" "||(UI.includes(w.key)&&v(),w.key===" "&&w.preventDefault())})})})})});Rx.displayName=oi;var la="SelectItemText",kx=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,s=Nr(la,n),i=Tr(la,n),l=Mx(la,n),c=ZI(la,n),[d,u]=f.useState(null),m=_e(t,v=>u(v),l.onItemTextChange,v=>{var w;return(w=i.itemTextRefCallback)==null?void 0:w.call(i,v,l.value,l.disabled)}),g=d==null?void 0:d.textContent,b=f.useMemo(()=>p.jsx("option",{value:l.value,disabled:l.disabled,children:g},l.value),[l.disabled,l.value,g]),{onNativeOptionAdd:h,onNativeOptionRemove:x}=c;return mt(()=>(h(b),()=>x(b)),[h,x,b]),p.jsxs(p.Fragment,{children:[p.jsx(de.span,{id:l.textId,...a,ref:m}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?jn.createPortal(a.children,s.valueNode):null]})});kx.displayName=la;var Px="SelectItemIndicator",Nx=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Mx(Px,n).isSelected?p.jsx(de.span,{"aria-hidden":!0,...r,ref:t}):null});Nx.displayName=Px;var Qc="SelectScrollUpButton",Tx=f.forwardRef((e,t)=>{const n=Tr(Qc,e.__scopeSelect),r=hd(Qc,e.__scopeSelect),[o,a]=f.useState(!1),s=_e(t,r.onScrollButtonChange);return mt(()=>{if(n.viewport&&n.isPositioned){let i=function(){const c=l.scrollTop>0;a(c)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?p.jsx(_x,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});Tx.displayName=Qc;var Jc="SelectScrollDownButton",Ix=f.forwardRef((e,t)=>{const n=Tr(Jc,e.__scopeSelect),r=hd(Jc,e.__scopeSelect),[o,a]=f.useState(!1),s=_e(t,r.onScrollButtonChange);return mt(()=>{if(n.viewport&&n.isPositioned){let i=function(){const c=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<c;a(d)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?p.jsx(_x,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});Ix.displayName=Jc;var _x=f.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=Tr("SelectScrollButton",n),s=f.useRef(null),i=tl(n),l=f.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return f.useEffect(()=>()=>l(),[l]),mt(()=>{var d;const c=i().find(u=>u.ref.current===document.activeElement);(d=c==null?void 0:c.ref.current)==null||d.scrollIntoView({block:"nearest"})},[i]),p.jsx(de.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:Q(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:Q(o.onPointerMove,()=>{var c;(c=a.onItemLeave)==null||c.call(a),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:Q(o.onPointerLeave,()=>{l()})})}),u_="SelectSeparator",Ox=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return p.jsx(de.div,{"aria-hidden":!0,...r,ref:t})});Ox.displayName=u_;var Dx="SelectArrow",d_=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=nl(n);return Tr(Dx,n).position==="popper"?p.jsx(Vi,{...o,...r,ref:t}):null});d_.displayName=Dx;var Ax="SelectBubbleInput",jx=f.forwardRef(({__scopeSelect:e,...t},n)=>{const r=Nr(Ax,e),{value:o,onValueChange:a,required:s,disabled:i,name:l,autoComplete:c,form:d}=r,{nativeOptions:u,nativeSelectKey:m}=r,g=f.useRef(null),b=_e(n,g),h=o??"",x=za(h);return f.useEffect(()=>{const v=g.current;if(!v)return;const w=window.HTMLSelectElement.prototype,C=Object.getOwnPropertyDescriptor(w,"value").set;if(x!==h&&C){const E=new Event("change",{bubbles:!0});C.call(v,h),v.dispatchEvent(E)}},[x,h]),p.jsxs(de.select,{"aria-hidden":!0,required:s,tabIndex:-1,name:l,autoComplete:c,disabled:i,form:d,onChange:v=>a(v.target.value),...t,style:{...sg,...t.style},ref:b,defaultValue:h,children:[gd(o)?p.jsx("option",{value:""}):null,Array.from(u)]},m)});jx.displayName=Ax;function f_(e){return typeof e=="function"}function gd(e){return e===""||e===void 0}function zx(e){const t=kt(e),n=f.useRef(""),r=f.useRef(0),o=f.useCallback(s=>{const i=n.current+s;t(i),(function l(c){n.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>l(""),1e3))})(i)},[t]),a=f.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return f.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function $x(e,t,n){const o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=p_(e,Math.max(a,0));o.length===1&&(s=s.filter(c=>c!==n));const l=s.find(c=>c.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function p_(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var m_="Separator",Bp="horizontal",h_=["horizontal","vertical"],Lx=f.forwardRef((e,t)=>{const{decorative:n,orientation:r=Bp,...o}=e,a=g_(r)?r:Bp,i=n?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return p.jsx(de.div,{"data-orientation":a,...i,...o,ref:t})});Lx.displayName=m_;function g_(e){return h_.includes(e)}var b_=Lx,Fx=["PageUp","PageDown"],Vx=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Wx={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Yo="Slider",[eu,v_,x_]=Ri(Yo),[bd]=ht(Yo,[x_]),[y_,Ya]=bd(Yo),Bx=f.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:a=1,orientation:s="horizontal",disabled:i=!1,minStepsBetweenThumbs:l=0,defaultValue:c=[r],value:d,onValueChange:u=()=>{},onValueCommit:m=()=>{},inverted:g=!1,form:b,...h}=e,x=f.useRef(new Set),v=f.useRef(0),w=f.useRef(!1),C=s==="horizontal"?w_:C_,[E=[],S]=Nt({prop:d,defaultProp:c,onChange:T=>{var j;(j=[...x.current][v.current])==null||j.focus({preventScroll:!0,focusVisible:w.current}),w.current=!1,u(T)}}),M=f.useRef(E);function R(T){const k=R_(E,T);_(T,k)}function I(T){_(T,v.current)}function O(){const T=M.current[v.current];E[v.current]!==T&&m(E)}function _(T,k,{commit:j}={commit:!1}){const V=T_(a),z=I_(Math.round((T-r)/a)*a+r,V),$=ya(z,[r,o]);S((F=[])=>{const L=E_(F,$,k);if(N_(L,l*a)){v.current=L.indexOf($);const D=String(L)!==String(F);return D&&j&&m(L),D?L:F}else return F})}return p.jsx(y_,{scope:e.__scopeSlider,name:n,disabled:i,min:r,max:o,valueIndexToChangeRef:v,thumbs:x.current,values:E,orientation:s,form:b,children:p.jsx(eu.Provider,{scope:e.__scopeSlider,children:p.jsx(eu.Slot,{scope:e.__scopeSlider,children:p.jsx(C,{"aria-disabled":i,"data-disabled":i?"":void 0,...h,ref:t,onPointerDown:Q(h.onPointerDown,()=>{i||(M.current=E,w.current=!1)}),min:r,max:o,inverted:g,onSlideStart:i?void 0:R,onSlideMove:i?void 0:I,onSlideEnd:i?void 0:O,onHomeKeyDown:()=>{i||(w.current=!0,_(r,0,{commit:!0}))},onEndKeyDown:()=>{i||(w.current=!0,_(o,E.length-1,{commit:!0}))},onStepKeyDown:({event:T,direction:k})=>{if(!i){w.current=!0;const z=Fx.includes(T.key)||T.shiftKey&&Vx.includes(T.key)?10:1,$=v.current,F=E[$],L=a*z*k;_(F+L,$,{commit:!0})}}})})})})});Bx.displayName=Yo;var[Hx,Gx]=bd(Yo,{startEdge:"left",endEdge:"right",size:"width",direction:1}),w_=f.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:a,onSlideStart:s,onSlideMove:i,onSlideEnd:l,onStepKeyDown:c,...d}=e,[u,m]=f.useState(null),g=_e(t,y=>m(y)),b=f.useRef(void 0),h=Sr(o),x=h==="ltr",v=x&&!a||!x&&a;function w(y){const C=b.current||u.getBoundingClientRect(),E=[0,C.width],M=vd(E,v?[n,r]:[r,n]);return b.current=C,M(y-C.left)}return p.jsx(Hx,{scope:e.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:p.jsx(Yx,{dir:h,"data-orientation":"horizontal",...d,ref:g,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:y=>{const C=w(y.clientX);s==null||s(C)},onSlideMove:y=>{const C=w(y.clientX);i==null||i(C)},onSlideEnd:()=>{b.current=void 0,l==null||l()},onStepKeyDown:y=>{const E=Wx[v?"from-left":"from-right"].includes(y.key);c==null||c({event:y,direction:E?-1:1})}})})}),C_=f.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:a,onSlideMove:s,onSlideEnd:i,onStepKeyDown:l,...c}=e,d=f.useRef(null),u=_e(t,d),m=f.useRef(void 0),g=!o;function b(h){const x=m.current||d.current.getBoundingClientRect(),v=[0,x.height],y=vd(v,g?[r,n]:[n,r]);return m.current=x,y(h-x.top)}return p.jsx(Hx,{scope:e.__scopeSlider,startEdge:g?"bottom":"top",endEdge:g?"top":"bottom",size:"height",direction:g?1:-1,children:p.jsx(Yx,{"data-orientation":"vertical",...c,ref:u,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:h=>{const x=b(h.clientY);a==null||a(x)},onSlideMove:h=>{const x=b(h.clientY);s==null||s(x)},onSlideEnd:()=>{m.current=void 0,i==null||i()},onStepKeyDown:h=>{const v=Wx[g?"from-bottom":"from-top"].includes(h.key);l==null||l({event:h,direction:v?-1:1})}})})}),Yx=f.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:a,onHomeKeyDown:s,onEndKeyDown:i,onStepKeyDown:l,...c}=e,d=Ya(Yo,n);return p.jsx(de.span,{...c,ref:t,onKeyDown:Q(e.onKeyDown,u=>{u.key==="Home"?(s(u),u.preventDefault()):u.key==="End"?(i(u),u.preventDefault()):Fx.concat(Vx).includes(u.key)&&(l(u),u.preventDefault())}),onPointerDown:Q(e.onPointerDown,u=>{const m=u.target;m.setPointerCapture(u.pointerId),u.preventDefault(),d.thumbs.has(m)?m.focus({preventScroll:!0,focusVisible:!1}):r(u)}),onPointerMove:Q(e.onPointerMove,u=>{u.target.hasPointerCapture(u.pointerId)&&o(u)}),onPointerUp:Q(e.onPointerUp,u=>{const m=u.target;m.hasPointerCapture(u.pointerId)&&(m.releasePointerCapture(u.pointerId),a(u))})})}),Ux="SliderTrack",Kx=f.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=Ya(Ux,n);return p.jsx(de.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});Kx.displayName=Ux;var tu="SliderRange",qx=f.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=Ya(tu,n),a=Gx(tu,n),s=f.useRef(null),i=_e(t,s),l=o.values.length,c=o.values.map(m=>oy(m,o.min,o.max)),d=l>1?Math.min(...c):0,u=100-Math.max(...c);return p.jsx(de.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:i,style:{...e.style,[a.startEdge]:d+"%",[a.endEdge]:u+"%"}})});qx.displayName=tu;var Xx="SliderThumb",[S_,Zx]=bd(Xx),Qx="SliderThumbProvider";function Jx(e){const{__scopeSlider:t,name:n,children:r,internal_do_not_use_render:o}=e,a=Ya(Qx,t),s=v_(t),[i,l]=f.useState(null),c=f.useMemo(()=>i?s().findIndex(x=>x.ref.current===i):-1,[s,i]),d=$a(i),u=i?!!a.form||!!i.closest("form"):!0,m=a.values[c],g=n??(a.name?a.name+(a.values.length>1?"[]":""):void 0),b=m===void 0?0:oy(m,a.min,a.max);f.useEffect(()=>{if(i)return a.thumbs.add(i),()=>{a.thumbs.delete(i)}},[i,a.thumbs]);const h={value:m,name:g,form:a.form,isFormControl:u,index:c,thumb:i,onThumbChange:l,percent:b,size:d};return p.jsx(S_,{scope:t,...h,children:__(o)?o(h):r})}Jx.displayName=Qx;var js="SliderThumbTrigger",ey=f.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=Ya(js,n),a=Gx(js,n),{index:s,value:i,percent:l,size:c,onThumbChange:d}=Zx(js,n),u=_e(t,h=>d(h)),m=M_(s,o.values.length),g=c==null?void 0:c[a.size],b=g?k_(g,l,a.direction):0;return p.jsx("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${l}% + ${b}px)`},children:p.jsx(eu.ItemSlot,{scope:n,children:p.jsx(de.span,{role:"slider","aria-label":e["aria-label"]||m,"aria-valuemin":o.min,"aria-valuenow":i,"aria-valuemax":o.max,"aria-orientation":o.orientation,"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,tabIndex:o.disabled?void 0:0,...r,ref:u,style:i===void 0?{display:"none"}:e.style,onFocus:Q(e.onFocus,()=>{o.valueIndexToChangeRef.current=s})})})})});ey.displayName=js;var ty=f.forwardRef((e,t)=>{const{__scopeSlider:n,name:r,...o}=e;return p.jsx(Jx,{__scopeSlider:n,name:r,internal_do_not_use_render:({index:a,isFormControl:s})=>p.jsxs(p.Fragment,{children:[p.jsx(ey,{...o,ref:t,__scopeSlider:n}),s?p.jsx(ry,{__scopeSlider:n},a):null]})})});ty.displayName=Xx;var ny="SliderBubbleInput",ry=f.forwardRef(({__scopeSlider:e,...t},n)=>{const{value:r,name:o,form:a}=Zx(ny,e),s=f.useRef(null),i=_e(s,n),l=za(r);return f.useEffect(()=>{const c=s.current;if(!c)return;const d=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(d,"value").set;if(l!==r&&m){const g=new Event("input",{bubbles:!0});m.call(c,r),c.dispatchEvent(g)}},[l,r]),p.jsx(de.input,{style:{display:"none"},name:o,form:a,...t,ref:i,defaultValue:r})});ry.displayName=ny;function E_(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,a)=>o-a)}function oy(e,t,n){const a=100/(n-t)*(e-t);return ya(a,[0,100])}function M_(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function R_(e,t){if(e.length===1)return 0;const n=e.map(o=>Math.abs(o-t)),r=Math.min(...n);return n.indexOf(r)}function k_(e,t,n){const r=e/2,a=vd([0,50],[0,r]);return(r-a(t)*n)*n}function P_(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function N_(e,t){if(t>0){const n=P_(e);return Math.min(...n)>=t}return!0}function vd(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function T_(e){if(!Number.isFinite(e))return 0;const t=e.toString();if(t.includes("e")){const[r,o]=t.split("e"),a=r.split(".")[1]||"",s=Number(o);return Math.max(0,a.length-s)}const n=t.split(".")[1];return n?n.length:0}function I_(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}function __(e){return typeof e=="function"}var rl="Switch",[O_]=ht(rl),[D_,xd]=O_(rl);function A_(e){const{__scopeSwitch:t,checked:n,children:r,defaultChecked:o,disabled:a,form:s,name:i,onCheckedChange:l,required:c,value:d="on",internal_do_not_use_render:u}=e,[m,g]=Nt({prop:n,defaultProp:o??!1,onChange:l,caller:rl}),[b,h]=f.useState(null),[x,v]=f.useState(null),w=f.useRef(!1),y=b?!!s||!!b.closest("form"):!0,C={checked:m,setChecked:g,disabled:a,control:b,setControl:h,name:i,form:s,value:d,hasConsumerStoppedPropagationRef:w,required:c,defaultChecked:o,isFormControl:y,bubbleInput:x,setBubbleInput:v};return p.jsx(D_,{scope:t,...C,children:j_(u)?u(C):r})}var ay="SwitchTrigger",sy=f.forwardRef(({__scopeSwitch:e,onClick:t,...n},r)=>{const{value:o,disabled:a,checked:s,required:i,setControl:l,setChecked:c,hasConsumerStoppedPropagationRef:d,isFormControl:u,bubbleInput:m}=xd(ay,e),g=_e(r,l);return p.jsx(de.button,{type:"button",role:"switch","aria-checked":s,"aria-required":i,"data-state":fy(s),"data-disabled":a?"":void 0,disabled:a,value:o,...n,ref:g,onClick:Q(t,b=>{c(h=>!h),m&&u&&(d.current=b.isPropagationStopped(),d.current||b.stopPropagation())})})});sy.displayName=ay;var iy=f.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:s,disabled:i,value:l,onCheckedChange:c,form:d,...u}=e;return p.jsx(A_,{__scopeSwitch:n,checked:o,defaultChecked:a,disabled:i,required:s,onCheckedChange:c,name:r,form:d,value:l,internal_do_not_use_render:({isFormControl:m})=>p.jsxs(p.Fragment,{children:[p.jsx(sy,{...u,ref:t,__scopeSwitch:n}),m&&p.jsx(dy,{__scopeSwitch:n})]})})});iy.displayName=rl;var ly="SwitchThumb",cy=f.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=xd(ly,n);return p.jsx(de.span,{"data-state":fy(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});cy.displayName=ly;var uy="SwitchBubbleInput",dy=f.forwardRef(({__scopeSwitch:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:s,required:i,disabled:l,name:c,value:d,form:u,bubbleInput:m,setBubbleInput:g}=xd(uy,e),b=_e(n,g),h=za(a),x=$a(r);f.useEffect(()=>{const w=m;if(!w)return;const y=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(y,"checked").set,S=!o.current;if(h!==a&&E){const M=new Event("click",{bubbles:S});E.call(w,a),w.dispatchEvent(M)}},[m,h,a,o]);const v=f.useRef(a);return p.jsx(de.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??v.current,required:i,disabled:l,name:c,value:d,form:u,...t,tabIndex:-1,ref:b,style:{...t.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});dy.displayName=uy;function j_(e){return typeof e=="function"}function fy(e){return e?"checked":"unchecked"}var ol="Tabs",[z_]=ht(ol,[Rr]),py=Rr(),[$_,yd]=z_(ol),my=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",dir:i,activationMode:l="automatic",...c}=e,d=Sr(i),[u,m]=Nt({prop:r,onChange:o,defaultProp:a??"",caller:ol});return p.jsx($_,{scope:n,baseId:Yt(),value:u,onValueChange:m,orientation:s,dir:d,activationMode:l,children:p.jsx(de.div,{dir:d,"data-orientation":s,...c,ref:t})})});my.displayName=ol;var hy="TabsList",gy=f.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=yd(hy,n),s=py(n);return p.jsx(Wi,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:r,children:p.jsx(de.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});gy.displayName=hy;var by="TabsTrigger",vy=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,s=yd(by,n),i=py(n),l=wy(s.baseId,r),c=Cy(s.baseId,r),d=r===s.value;return p.jsx(Bi,{asChild:!0,...i,focusable:!o,active:d,children:p.jsx(de.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":c,"data-state":d?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...a,ref:t,onMouseDown:Q(e.onMouseDown,u=>{!o&&u.button===0&&u.ctrlKey===!1?s.onValueChange(r):u.preventDefault()}),onKeyDown:Q(e.onKeyDown,u=>{[" ","Enter"].includes(u.key)&&s.onValueChange(r)}),onFocus:Q(e.onFocus,()=>{const u=s.activationMode!=="manual";!d&&!o&&u&&s.onValueChange(r)})})})});vy.displayName=by;var xy="TabsContent",yy=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...s}=e,i=yd(xy,n),l=wy(i.baseId,r),c=Cy(i.baseId,r),d=r===i.value,u=f.useRef(d);return f.useEffect(()=>{const m=requestAnimationFrame(()=>u.current=!1);return()=>cancelAnimationFrame(m)},[]),p.jsx(yt,{present:o||d,children:({present:m})=>p.jsx(de.div,{"data-state":d?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!m,id:c,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:u.current?"0s":void 0},children:m&&a})})});yy.displayName=xy;function wy(e,t){return`${e}-trigger-${t}`}function Cy(e,t){return`${e}-content-${t}`}var L_=my,F_=gy,V_=vy,W_=yy,Sy="Toggle",wd=f.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:o,...a}=e,[s,i]=Nt({prop:n,onChange:o,defaultProp:r??!1,caller:Sy});return p.jsx(de.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:Q(e.onClick,()=>{e.disabled||i(!s)})})});wd.displayName=Sy;var B_=wd,Ir="ToggleGroup",[Ey]=ht(Ir,[Rr]),My=Rr(),Cd=f.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const o=r;return p.jsx(H_,{...o,ref:t})}if(n==="multiple"){const o=r;return p.jsx(G_,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${Ir}\``)});Cd.displayName=Ir;var[Ry,ky]=Ey(Ir),H_=f.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[s,i]=Nt({prop:n,defaultProp:r??"",onChange:o,caller:Ir});return p.jsx(Ry,{scope:e.__scopeToggleGroup,type:"single",value:f.useMemo(()=>s?[s]:[],[s]),onItemActivate:i,onItemDeactivate:f.useCallback(()=>i(""),[i]),children:p.jsx(Py,{...a,ref:t})})}),G_=f.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[s,i]=Nt({prop:n,defaultProp:r??[],onChange:o,caller:Ir}),l=f.useCallback(d=>i((u=[])=>[...u,d]),[i]),c=f.useCallback(d=>i((u=[])=>u.filter(m=>m!==d)),[i]);return p.jsx(Ry,{scope:e.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:l,onItemDeactivate:c,children:p.jsx(Py,{...a,ref:t})})});Cd.displayName=Ir;var[Y_,U_]=Ey(Ir),Py=f.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:a,dir:s,loop:i=!0,...l}=e,c=My(n),d=Sr(s),u={role:"group",dir:d,...l};return p.jsx(Y_,{scope:n,rovingFocus:o,disabled:r,children:o?p.jsx(Wi,{asChild:!0,...c,orientation:a,dir:d,loop:i,children:p.jsx(de.div,{...u,ref:t})}):p.jsx(de.div,{...u,ref:t})})}),ai="ToggleGroupItem",Ny=f.forwardRef((e,t)=>{const n=ky(ai,e.__scopeToggleGroup),r=U_(ai,e.__scopeToggleGroup),o=My(e.__scopeToggleGroup),a=n.value.includes(e.value),s=r.disabled||e.disabled,i={...e,pressed:a,disabled:s},l=f.useRef(null);return r.rovingFocus?p.jsx(Bi,{asChild:!0,...o,focusable:!s,active:a,ref:l,children:p.jsx(Hp,{...i,ref:t})}):p.jsx(Hp,{...i,ref:t})});Ny.displayName=ai;var Hp=f.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,a=ky(ai,n),s={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},i=a.type==="single"?s:void 0;return p.jsx(wd,{...i,...o,ref:t,onPressedChange:l=>{l?a.onItemActivate(r):a.onItemDeactivate(r)}})}),K_=Cd,q_=Ny,[al]=ht("Tooltip",[Mr]),sl=Mr(),Ty="TooltipProvider",X_=700,nu="tooltip.open",[Z_,Sd]=al(Ty),Iy=e=>{const{__scopeTooltip:t,delayDuration:n=X_,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,s=f.useRef(!0),i=f.useRef(!1),l=f.useRef(0);return f.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),p.jsx(Z_,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:f.useCallback(()=>{r<=0||(window.clearTimeout(l.current),s.current=!1)},[r]),onClose:f.useCallback(()=>{r<=0||(window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r))},[r]),isPointerInTransitRef:i,onPointerInTransitChange:f.useCallback(c=>{i.current=c},[]),disableHoverableContent:o,children:a})};Iy.displayName=Ty;var wa="Tooltip",[Q_,Ua]=al(wa),_y=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,l=Sd(wa,e.__scopeTooltip),c=sl(t),[d,u]=f.useState(null),m=Yt(),g=f.useRef(0),b=s??l.disableHoverableContent,h=i??l.delayDuration,x=f.useRef(!1),[v,w]=Nt({prop:r,defaultProp:o??!1,onChange:M=>{M?(l.onOpen(),document.dispatchEvent(new CustomEvent(nu))):l.onClose(),a==null||a(M)},caller:wa}),y=f.useMemo(()=>v?x.current?"delayed-open":"instant-open":"closed",[v]),C=f.useCallback(()=>{window.clearTimeout(g.current),g.current=0,x.current=!1,w(!0)},[w]),E=f.useCallback(()=>{window.clearTimeout(g.current),g.current=0,w(!1)},[w]),S=f.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{x.current=!0,w(!0),g.current=0},h)},[h,w]);return f.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),p.jsx(La,{...c,children:p.jsx(Q_,{scope:t,contentId:m,open:v,stateAttribute:y,trigger:d,onTriggerChange:u,onTriggerEnter:f.useCallback(()=>{l.isOpenDelayedRef.current?S():C()},[l.isOpenDelayedRef,S,C]),onTriggerLeave:f.useCallback(()=>{b?E():(window.clearTimeout(g.current),g.current=0)},[E,b]),onOpen:C,onClose:E,disableHoverableContent:b,children:n})})};_y.displayName=wa;var ru="TooltipTrigger",Oy=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ua(ru,n),a=Sd(ru,n),s=sl(n),i=f.useRef(null),l=_e(t,i,o.onTriggerChange),c=f.useRef(!1),d=f.useRef(!1),u=f.useCallback(()=>c.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",u),[u]),p.jsx(Fa,{asChild:!0,...s,children:p.jsx(de.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:Q(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:Q(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:Q(e.onPointerDown,()=>{o.open&&o.onClose(),c.current=!0,document.addEventListener("pointerup",u,{once:!0})}),onFocus:Q(e.onFocus,()=>{c.current||o.onOpen()}),onBlur:Q(e.onBlur,o.onClose),onClick:Q(e.onClick,o.onClose)})})});Oy.displayName=ru;var Ed="TooltipPortal",[J_,eO]=al(Ed,{forceMount:void 0}),Dy=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=Ua(Ed,t);return p.jsx(J_,{scope:t,forceMount:n,children:p.jsx(yt,{present:n||a.open,children:p.jsx(Go,{asChild:!0,container:o,children:r})})})};Dy.displayName=Ed;var zo="TooltipContent",Ay=f.forwardRef((e,t)=>{const n=eO(zo,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,s=Ua(zo,e.__scopeTooltip);return p.jsx(yt,{present:r||s.open,children:s.disableHoverableContent?p.jsx(jy,{side:o,...a,ref:t}):p.jsx(tO,{side:o,...a,ref:t})})}),tO=f.forwardRef((e,t)=>{const n=Ua(zo,e.__scopeTooltip),r=Sd(zo,e.__scopeTooltip),o=f.useRef(null),a=_e(t,o),[s,i]=f.useState(null),{trigger:l,onClose:c}=n,d=o.current,{onPointerInTransitChange:u}=r,m=f.useCallback(()=>{i(null),u(!1)},[u]),g=f.useCallback((b,h)=>{const x=b.currentTarget,v={x:b.clientX,y:b.clientY},w=aO(v,x.getBoundingClientRect()),y=sO(v,w),C=iO(h.getBoundingClientRect()),E=cO([...y,...C]);i(E),u(!0)},[u]);return f.useEffect(()=>()=>m(),[m]),f.useEffect(()=>{if(l&&d){const b=x=>g(x,d),h=x=>g(x,l);return l.addEventListener("pointerleave",b),d.addEventListener("pointerleave",h),()=>{l.removeEventListener("pointerleave",b),d.removeEventListener("pointerleave",h)}}},[l,d,g,m]),f.useEffect(()=>{if(s){const b=h=>{const x=h.target,v={x:h.clientX,y:h.clientY},w=(l==null?void 0:l.contains(x))||(d==null?void 0:d.contains(x)),y=!lO(v,s);w?m():y&&(m(),c())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[l,d,s,c,m]),p.jsx(jy,{...e,ref:a})}),[nO,rO]=al(wa,{isInside:!1}),oO=og("TooltipContent"),jy=f.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,l=Ua(zo,n),c=sl(n),{onClose:d}=l;return f.useEffect(()=>(document.addEventListener(nu,d),()=>document.removeEventListener(nu,d)),[d]),f.useEffect(()=>{if(l.trigger){const u=m=>{m.target instanceof Node&&m.target.contains(l.trigger)&&d()};return window.addEventListener("scroll",u,{capture:!0}),()=>window.removeEventListener("scroll",u,{capture:!0})}},[l.trigger,d]),p.jsx(Ho,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:u=>u.preventDefault(),onDismiss:d,children:p.jsxs(Fi,{"data-state":l.stateAttribute,...c,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(oO,{children:r}),p.jsx(nO,{scope:n,isInside:!0,children:p.jsx(ZM,{id:l.contentId,role:"tooltip",children:o||r})})]})})});Ay.displayName=zo;var zy="TooltipArrow",$y=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=sl(n);return rO(zy,n).isInside?null:p.jsx(Vi,{...o,...r,ref:t})});$y.displayName=zy;function aO(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function sO(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function iO(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function lO(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],l=t[s],c=i.x,d=i.y,u=l.x,m=l.y;d>r!=m>r&&n<(u-c)*(r-d)/(m-d)+c&&(o=!o)}return o}function cO(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),uO(t)}function uO(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],s=n[n.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var dO=Iy,fO=_y,pO=Oy,mO=Dy,hO=Ay,gO=$y;const Ca=wn("inline-flex shrink-0 cursor-default items-center justify-center gap-2 rounded-md border text-sm font-medium whitespace-nowrap outline-none focus-visible:[outline:1px_solid_var(--ring)] focus-visible:outline-offset-0 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-secondary border-border text-secondary-foreground hover:[outline:1px_solid_var(--border)] hover:outline-offset-0 active:[outline:1px_solid_var(--border)] active:outline-offset-0 active:bg-border",primary:"bg-primary text-primary-foreground border-primary-edge hover:[outline:1px_solid_var(--primary-edge)] hover:outline-offset-0 active:[outline:1px_solid_var(--primary-edge)] active:outline-offset-0 active:bg-primary-edge",destructive:"bg-destructive text-destructive-foreground border-destructive-edge hover:[outline:1px_solid_var(--destructive-edge)] hover:outline-offset-0 active:[outline:1px_solid_var(--destructive-edge)] active:outline-offset-0 active:bg-destructive-edge",positive:"bg-positive text-positive-foreground border-positive-edge hover:[outline:1px_solid_var(--positive-edge)] hover:outline-offset-0 active:[outline:1px_solid_var(--positive-edge)] active:outline-offset-0 active:bg-positive-edge",warning:"bg-warning text-warning-foreground border-warning-edge hover:[outline:1px_solid_var(--warning-edge)] hover:outline-offset-0 active:[outline:1px_solid_var(--warning-edge)] active:outline-offset-0 active:bg-warning-edge",confirm:"bg-confirm text-confirm-foreground border-confirm-edge hover:[outline:1px_solid_var(--confirm-edge)] hover:outline-offset-0 active:[outline:1px_solid_var(--confirm-edge)] active:outline-offset-0 active:bg-confirm-edge",outline:"bg-transparent border-border text-foreground hover:bg-accent hover:text-accent-foreground active:bg-accent",ghost:"border-transparent bg-transparent text-foreground hover:bg-accent hover:text-accent-foreground active:bg-accent",link:"cursor-pointer border-transparent text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Fn({className:e,variant:t="default",size:n="default",asChild:r=!1,...o}){const a=r?zn:"button";return p.jsx(a,{"data-slot":"button","data-variant":t,"data-size":n,className:N(Ca({variant:t,size:n,className:e})),...o})}function Md({className:e,type:t,...n}){return p.jsx("input",{type:t,"data-slot":"input",className:N("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base transition-colors outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","hover:outline hover:outline-1 hover:outline-ring hover:outline-offset-2","focus-visible:outline focus-visible:outline-1 focus-visible:outline-ring","aria-invalid:border-destructive",e),...n})}function bO({className:e,...t}){return p.jsx("div",{"data-slot":"card",className:N("flex flex-col gap-6 rounded-xl bg-background-elevated py-6 text-foreground",e),...t})}function vO({className:e,...t}){return p.jsx("div",{"data-slot":"card-header",className:N("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function xO({className:e,...t}){return p.jsx("div",{"data-slot":"card-title",style:{fontVariationSettings:"'wght' 800, 'YTLC' 540"},className:N("leading-none",e),...t})}function yO({className:e,...t}){return p.jsx("div",{"data-slot":"card-description",className:N("text-sm",e),...t})}function wO({className:e,...t}){return p.jsx("div",{"data-slot":"card-action",className:N("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...t})}function CO({className:e,...t}){return p.jsx("div",{"data-slot":"card-content",className:N("px-6",e),...t})}function SO({className:e,...t}){return p.jsx("div",{"data-slot":"card-footer",className:N("flex items-center px-6 [.border-t]:pt-6",e),...t})}const Ly=wn("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-colors aria-invalid:border-destructive [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function EO({className:e,variant:t="default",asChild:n=!1,...r}){const o=n?zn:"span";return p.jsx(o,{"data-slot":"badge","data-variant":t,className:N(Ly({variant:t}),e),...r})}/**
|
|
60
|
+
* @license lucide-react v0.511.0 - ISC
|
|
61
|
+
*
|
|
62
|
+
* This source code is licensed under the ISC license.
|
|
63
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
64
|
+
*/const MO=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),RO=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Gp=e=>{const t=RO(e);return t.charAt(0).toUpperCase()+t.slice(1)},Fy=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),kO=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
65
|
+
* @license lucide-react v0.511.0 - ISC
|
|
66
|
+
*
|
|
67
|
+
* This source code is licensed under the ISC license.
|
|
68
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
69
|
+
*/var PO={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
70
|
+
* @license lucide-react v0.511.0 - ISC
|
|
71
|
+
*
|
|
72
|
+
* This source code is licensed under the ISC license.
|
|
73
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
74
|
+
*/const NO=P.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:s,...i},l)=>P.createElement("svg",{ref:l,...PO,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Fy("lucide",o),...!a&&!kO(i)&&{"aria-hidden":"true"},...i},[...s.map(([c,d])=>P.createElement(c,d)),...Array.isArray(a)?a:[a]]));/**
|
|
75
|
+
* @license lucide-react v0.511.0 - ISC
|
|
76
|
+
*
|
|
77
|
+
* This source code is licensed under the ISC license.
|
|
78
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
79
|
+
*/const Ft=(e,t)=>{const n=P.forwardRef(({className:r,...o},a)=>P.createElement(NO,{ref:a,iconNode:t,className:Fy(`lucide-${MO(Gp(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Gp(e),n};/**
|
|
80
|
+
* @license lucide-react v0.511.0 - ISC
|
|
81
|
+
*
|
|
82
|
+
* This source code is licensed under the ISC license.
|
|
83
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
84
|
+
*/const TO=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],IO=Ft("calendar",TO);/**
|
|
85
|
+
* @license lucide-react v0.511.0 - ISC
|
|
86
|
+
*
|
|
87
|
+
* This source code is licensed under the ISC license.
|
|
88
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
89
|
+
*/const _O=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ao=Ft("check",_O);/**
|
|
90
|
+
* @license lucide-react v0.511.0 - ISC
|
|
91
|
+
*
|
|
92
|
+
* This source code is licensed under the ISC license.
|
|
93
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
94
|
+
*/const OO=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],il=Ft("chevron-down",OO);/**
|
|
95
|
+
* @license lucide-react v0.511.0 - ISC
|
|
96
|
+
*
|
|
97
|
+
* This source code is licensed under the ISC license.
|
|
98
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
99
|
+
*/const DO=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Vy=Ft("chevron-left",DO);/**
|
|
100
|
+
* @license lucide-react v0.511.0 - ISC
|
|
101
|
+
*
|
|
102
|
+
* This source code is licensed under the ISC license.
|
|
103
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
104
|
+
*/const AO=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ka=Ft("chevron-right",AO);/**
|
|
105
|
+
* @license lucide-react v0.511.0 - ISC
|
|
106
|
+
*
|
|
107
|
+
* This source code is licensed under the ISC license.
|
|
108
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
109
|
+
*/const jO=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],zO=Ft("chevron-up",jO);/**
|
|
110
|
+
* @license lucide-react v0.511.0 - ISC
|
|
111
|
+
*
|
|
112
|
+
* This source code is licensed under the ISC license.
|
|
113
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
114
|
+
*/const $O=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],LO=Ft("circle-check",$O);/**
|
|
115
|
+
* @license lucide-react v0.511.0 - ISC
|
|
116
|
+
*
|
|
117
|
+
* This source code is licensed under the ISC license.
|
|
118
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
119
|
+
*/const FO=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],VO=Ft("circle",FO);/**
|
|
120
|
+
* @license lucide-react v0.511.0 - ISC
|
|
121
|
+
*
|
|
122
|
+
* This source code is licensed under the ISC license.
|
|
123
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
124
|
+
*/const WO=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Wy=Ft("ellipsis",WO);/**
|
|
125
|
+
* @license lucide-react v0.511.0 - ISC
|
|
126
|
+
*
|
|
127
|
+
* This source code is licensed under the ISC license.
|
|
128
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
129
|
+
*/const BO=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],HO=Ft("grip-vertical",BO);/**
|
|
130
|
+
* @license lucide-react v0.511.0 - ISC
|
|
131
|
+
*
|
|
132
|
+
* This source code is licensed under the ISC license.
|
|
133
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
134
|
+
*/const GO=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],YO=Ft("info",GO);/**
|
|
135
|
+
* @license lucide-react v0.511.0 - ISC
|
|
136
|
+
*
|
|
137
|
+
* This source code is licensed under the ISC license.
|
|
138
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
139
|
+
*/const UO=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],By=Ft("loader-circle",UO);/**
|
|
140
|
+
* @license lucide-react v0.511.0 - ISC
|
|
141
|
+
*
|
|
142
|
+
* This source code is licensed under the ISC license.
|
|
143
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
144
|
+
*/const KO=[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]],qO=Ft("menu",KO);/**
|
|
145
|
+
* @license lucide-react v0.511.0 - ISC
|
|
146
|
+
*
|
|
147
|
+
* This source code is licensed under the ISC license.
|
|
148
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
149
|
+
*/const XO=[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],ZO=Ft("octagon-x",XO);/**
|
|
150
|
+
* @license lucide-react v0.511.0 - ISC
|
|
151
|
+
*
|
|
152
|
+
* This source code is licensed under the ISC license.
|
|
153
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
154
|
+
*/const QO=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],JO=Ft("triangle-alert",QO);/**
|
|
155
|
+
* @license lucide-react v0.511.0 - ISC
|
|
156
|
+
*
|
|
157
|
+
* This source code is licensed under the ISC license.
|
|
158
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
159
|
+
*/const eD=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ll=Ft("x",eD);function tD({...e}){return p.jsx(Au,{"data-slot":"dialog",...e})}function nD({...e}){return p.jsx(ju,{"data-slot":"dialog-trigger",...e})}function Hy({...e}){return p.jsx(zu,{"data-slot":"dialog-portal",...e})}function rD({...e}){return p.jsx(no,{"data-slot":"dialog-close",...e})}function Gy({className:e,...t}){return p.jsx($u,{"data-slot":"dialog-overlay",className:N("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",e),...t})}function oD({className:e,children:t,showCloseButton:n=!0,...r}){return p.jsxs(Hy,{"data-slot":"dialog-portal",children:[p.jsx(Gy,{}),p.jsxs(Lu,{"data-slot":"dialog-content",className:N("fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg bg-background p-6 duration-100 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-98 data-[state=closed]:ease-linear data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-98 data-[state=open]:ease-linear sm:max-w-lg",e),...r,children:[t,n&&p.jsx(Fn,{size:"icon-sm",asChild:!0,className:"absolute top-4 right-4",children:p.jsxs(no,{"data-slot":"dialog-close",children:[p.jsx(ll,{}),p.jsx("span",{className:"sr-only",children:"Close"})]})})]})]})}function aD({className:e,...t}){return p.jsx("div",{"data-slot":"dialog-header",className:N("flex flex-col gap-2 text-center sm:text-left",e),...t})}function sD({className:e,showCloseButton:t=!1,children:n,...r}){return p.jsxs("div",{"data-slot":"dialog-footer",className:N("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...r,children:[n,t&&p.jsx(no,{children:p.jsx(Fn,{variant:"destructive",children:"Close"})})]})}function iD({className:e,...t}){return p.jsx(Fu,{"data-slot":"dialog-title",style:{fontVariationSettings:"'wght' 800, 'YTLC' 540"},className:N("text-lg leading-none",e),...t})}function lD({className:e,...t}){return p.jsx(Vu,{"data-slot":"dialog-description",className:N("text-sm",e),...t})}function Yy({...e}){return p.jsx(sI,{"data-slot":"popover",...e})}function Uy({...e}){return p.jsx(lI,{"data-slot":"popover-trigger",...e})}function Ky({className:e,align:t="center",sideOffset:n=4,...r}){return p.jsx(cI,{children:p.jsx(uI,{"data-slot":"popover-content",align:t,sideOffset:n,className:N("z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border border-border bg-popover p-4 text-popover-foreground outline-hidden 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",e),...r})})}function cD({...e}){return p.jsx(iI,{"data-slot":"popover-anchor",...e})}function uD({...e}){return p.jsx(ix,{"data-slot":"select",...e})}function dD({...e}){return p.jsx(Cx,{"data-slot":"select-group",...e})}function fD({...e}){return p.jsx(dx,{"data-slot":"select-value",...e})}function pD({className:e,size:t="default",children:n,...r}){return p.jsxs(cx,{"data-slot":"select-trigger","data-size":t,className:N("flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap transition-colors outline-none hover:outline hover:outline-1 hover:outline-ring hover:outline-offset-2 focus-visible:outline focus-visible:outline-1 focus-visible:outline-ring disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",e),...r,children:[n,p.jsx(fx,{asChild:!0,children:p.jsx(il,{className:"size-4 opacity-50"})})]})}function mD({className:e,children:t,position:n="item-aligned",align:r="center",...o}){return p.jsx(mx,{children:p.jsxs(hx,{"data-slot":"select-content",className:N("relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-border bg-popover text-popover-foreground 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,align:r,...o,children:[p.jsx(qy,{}),p.jsx(yx,{className:N("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),p.jsx(Xy,{})]})})}function hD({className:e,...t}){return p.jsx(Ex,{"data-slot":"select-label",className:N("px-2 py-1.5 text-xs text-muted-foreground",e),...t})}function gD({className:e,children:t,...n}){return p.jsxs(Rx,{"data-slot":"select-item",className:N("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[p.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:p.jsx(Nx,{children:p.jsx(ao,{className:"size-4"})})}),p.jsx(kx,{children:t})]})}function bD({className:e,...t}){return p.jsx(Ox,{"data-slot":"select-separator",className:N("pointer-events-none -mx-1 my-1 h-px bg-border",e),...t})}function qy({className:e,...t}){return p.jsx(Tx,{"data-slot":"select-scroll-up-button",className:N("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(zO,{className:"size-4"})})}function Xy({className:e,...t}){return p.jsx(Ix,{"data-slot":"select-scroll-down-button",className:N("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(il,{className:"size-4"})})}function vD({className:e,...t}){return p.jsx(cb,{"data-slot":"checkbox",className:N("peer size-4 shrink-0 rounded-[4px] border border-input outline-none hover:outline hover:outline-1 hover:outline-ring hover:outline-offset-[3px] focus-visible:outline focus-visible:outline-1 focus-visible:outline-ring focus-visible:outline-offset-[3px] disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30",e),...t,children:p.jsx(db,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none",children:p.jsx(ao,{className:"size-3.5"})})})}function xD({className:e,...t}){return p.jsx(XT,{"data-slot":"label",className:N("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function cl({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return p.jsx(b_,{"data-slot":"separator",decorative:n,orientation:t,className:N("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...r})}function Zy({delayDuration:e=0,...t}){return p.jsx(dO,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function Qy({...e}){return p.jsx(fO,{"data-slot":"tooltip",...e})}function Jy({...e}){return p.jsx(pO,{"data-slot":"tooltip-trigger",...e})}function ew({className:e,sideOffset:t=0,children:n,...r}){return p.jsx(mO,{children:p.jsxs(hO,{"data-slot":"tooltip-content",sideOffset:t,className:N("z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-foreground px-3 py-1.5 text-xs text-balance text-background fade-in-0 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",e),...r,children:[n,p.jsx(gO,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]})})}function yD({...e}){return p.jsx(jT,{"data-slot":"dropdown-menu",...e})}function wD({...e}){return p.jsx(h0,{"data-slot":"dropdown-menu-portal",...e})}function CD({...e}){return p.jsx(zT,{"data-slot":"dropdown-menu-trigger",...e})}function SD({className:e,sideOffset:t=4,...n}){return p.jsx(h0,{children:p.jsx($T,{"data-slot":"dropdown-menu-content",sideOffset:t,className:N("z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-border bg-popover p-1 text-popover-foreground 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",e),...n})})}function ED({...e}){return p.jsx(LT,{"data-slot":"dropdown-menu-group",...e})}function MD({className:e,inset:t,variant:n="default",...r}){return p.jsx(VT,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:N("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!",e),...r})}function RD({className:e,children:t,checked:n,...r}){return p.jsxs(WT,{"data-slot":"dropdown-menu-checkbox-item",className:N("relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...r,children:[p.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:p.jsx(g0,{children:p.jsx(ao,{className:"size-4"})})}),t]})}function kD({...e}){return p.jsx(BT,{"data-slot":"dropdown-menu-radio-group",...e})}function PD({className:e,children:t,...n}){return p.jsxs(HT,{"data-slot":"dropdown-menu-radio-item",className:N("relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[p.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:p.jsx(g0,{children:p.jsx(ao,{className:"size-4"})})}),t]})}function ND({className:e,inset:t,...n}){return p.jsx(FT,{"data-slot":"dropdown-menu-label","data-inset":t,style:{fontVariationSettings:"'wght' 800, 'YTLC' 540"},className:N("px-2 py-1.5 text-xs text-muted-foreground data-[inset]:pl-8",e),...n})}function TD({className:e,...t}){return p.jsx(GT,{"data-slot":"dropdown-menu-separator",className:N("-mx-1 my-1 h-px bg-border",e),...t})}function ID({className:e,...t}){return p.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:N("ml-auto text-xs tracking-widest text-muted-foreground",e),...t})}function _D({...e}){return p.jsx(YT,{"data-slot":"dropdown-menu-sub",...e})}function OD({className:e,inset:t,children:n,...r}){return p.jsxs(UT,{"data-slot":"dropdown-menu-sub-trigger","data-inset":t,className:N("flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",e),...r,children:[n,p.jsx(Ka,{className:"ml-auto size-4"})]})}function DD({className:e,...t}){return p.jsx(KT,{"data-slot":"dropdown-menu-sub-content",className:N("z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",e),...t})}function AD({className:e,orientation:t="horizontal",...n}){return p.jsx(L_,{"data-slot":"tabs","data-orientation":t,orientation:t,className:N("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",e),...n})}const tw=wn("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function jD({className:e,variant:t="default",...n}){return p.jsx(F_,{"data-slot":"tabs-list","data-variant":t,className:N(tw({variant:t}),e),...n})}function zD({className:e,...t}){return p.jsx(V_,{"data-slot":"tabs-trigger",className:N("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-border px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground hover:outline hover:outline-1 hover:outline-ring hover:outline-offset-2 focus-visible:outline focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent","data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100",e),...t})}function $D({className:e,...t}){return p.jsx(W_,{"data-slot":"tabs-content",className:N("flex-1 outline-none",e),...t})}const LD=wn("relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 has-[[data-slot=alert-action]]:grid-cols-[0_1fr_auto] has-[>svg]:has-[[data-slot=alert-action]]:grid-cols-[calc(var(--spacing)*4)_1fr_auto] [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-destructive text-destructive-foreground",positive:"bg-positive text-positive-foreground",warning:"bg-warning text-warning-foreground",confirm:"bg-confirm text-confirm-foreground"}},defaultVariants:{variant:"default"}});function FD({className:e,variant:t,...n}){return p.jsx("div",{"data-slot":"alert",role:"alert",className:N(LD({variant:t}),e),...n})}function VD({className:e,...t}){return p.jsx("div",{"data-slot":"alert-title",style:{fontVariationSettings:"'wght' 800, 'YTLC' 540"},className:N("col-start-2 line-clamp-1 min-h-4",e),...t})}function WD({className:e,...t}){return p.jsx("div",{"data-slot":"alert-description",className:N("col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",e),...t})}function BD({className:e,...t}){return p.jsx("div",{"data-slot":"alert-action",className:N("col-start-3 row-span-full self-center pl-4",e),...t})}function HD({...e}){return p.jsx(Dk,{"data-slot":"alert-dialog",...e})}function GD({...e}){return p.jsx(Ak,{"data-slot":"alert-dialog-trigger",...e})}function nw({...e}){return p.jsx(jk,{"data-slot":"alert-dialog-portal",...e})}function rw({className:e,...t}){return p.jsx(zk,{"data-slot":"alert-dialog-overlay",className:N("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",e),...t})}function YD({className:e,size:t="default",...n}){return p.jsxs(nw,{children:[p.jsx(rw,{}),p.jsx($k,{"data-slot":"alert-dialog-content","data-size":t,className:N("group/alert-dialog-content fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg bg-background p-6 shadow-lg duration-100 data-[size=sm]:max-w-xs data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-98 data-[state=closed]:ease-linear data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-98 data-[state=open]:ease-linear data-[size=default]:sm:max-w-lg",e),...n})]})}function UD({className:e,...t}){return p.jsx("div",{"data-slot":"alert-dialog-header",className:N("grid grid-rows-[auto_1fr] place-items-start gap-1.5 text-left has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...t})}function KD({className:e,...t}){return p.jsx("div",{"data-slot":"alert-dialog-footer",className:N("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...t})}function qD({className:e,...t}){return p.jsx(Vk,{"data-slot":"alert-dialog-title",style:{fontVariationSettings:"'wght' 800, 'YTLC' 540"},className:N("text-lg sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...t})}function XD({className:e,...t}){return p.jsx(Wk,{"data-slot":"alert-dialog-description",className:N("text-sm",e),...t})}function ZD({className:e,...t}){return p.jsx("div",{"data-slot":"alert-dialog-media",className:N("mb-2 inline-flex size-16 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-8",e),...t})}function QD({className:e,variant:t="default",size:n="default",...r}){return p.jsx(Fn,{variant:t,size:n,asChild:!0,children:p.jsx(Lk,{"data-slot":"alert-dialog-action",className:N(e),...r})})}function JD({className:e,variant:t="default",size:n="default",...r}){return p.jsx(Fn,{variant:t,size:n,asChild:!0,children:p.jsx(Fk,{"data-slot":"alert-dialog-cancel",className:N(e),...r})})}function e2({...e}){return p.jsx(Hk,{"data-slot":"aspect-ratio",...e})}function t2({className:e,size:t="default",...n}){return p.jsx(Qk,{"data-slot":"avatar","data-size":t,className:N("group/avatar relative flex size-8 shrink-0 overflow-hidden rounded-full select-none data-[size=lg]:size-10 data-[size=sm]:size-6",e),...n})}function n2({className:e,...t}){return p.jsx(Jk,{"data-slot":"avatar-image",className:N("aspect-square size-full",e),...t})}function r2({className:e,...t}){return p.jsx(eP,{"data-slot":"avatar-fallback",className:N("flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",e),...t})}function o2({className:e,...t}){return p.jsx("span",{"data-slot":"avatar-badge",className:N("absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground ring-2 ring-background select-none","group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden","group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2","group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2",e),...t})}function a2({className:e,...t}){return p.jsx("div",{"data-slot":"avatar-group",className:N("group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background",e),...t})}function s2({className:e,...t}){return p.jsx("div",{"data-slot":"avatar-group-count",className:N("relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-muted-foreground ring-2 ring-background group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3",e),...t})}function i2({...e}){return p.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...e})}function l2({className:e,...t}){return p.jsx("ol",{"data-slot":"breadcrumb-list",className:N("flex flex-wrap items-center gap-1.5 text-sm break-words text-muted-foreground sm:gap-2.5",e),...t})}function c2({className:e,...t}){return p.jsx("li",{"data-slot":"breadcrumb-item",className:N("inline-flex items-center gap-1.5",e),...t})}function u2({asChild:e,className:t,...n}){const r=e?zn:"a";return p.jsx(r,{"data-slot":"breadcrumb-link",className:N("transition-colors hover:text-foreground",t),...n})}function d2({className:e,...t}){return p.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:N("font-normal text-foreground",e),...t})}function f2({children:e,className:t,...n}){return p.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:N("[&>svg]:size-3.5",t),...n,children:e??p.jsx(Ka,{})})}function p2({className:e,...t}){return p.jsxs("span",{"data-slot":"breadcrumb-ellipsis",role:"presentation","aria-hidden":"true",className:N("flex size-9 items-center justify-center",e),...t,children:[p.jsx(Wy,{className:"size-4"}),p.jsx("span",{className:"sr-only",children:"More"})]})}const ow=wn("flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",{variants:{orientation:{horizontal:"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",vertical:"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"}},defaultVariants:{orientation:"horizontal"}});function m2({className:e,orientation:t,...n}){return p.jsx("div",{role:"group","data-slot":"button-group","data-orientation":t,className:N(ow({orientation:t}),e),...n})}function h2({className:e,asChild:t=!1,...n}){const r=t?zn:"div";return p.jsx(r,{className:N("flex items-center gap-2 rounded-md border bg-muted px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",e),...n})}function g2({className:e,orientation:t="vertical",...n}){return p.jsx(cl,{"data-slot":"button-group-separator",orientation:t,className:N("relative m-0! self-stretch bg-input data-[orientation=vertical]:h-auto",e),...n})}function b2(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}const fc={},ca={};function Un(e,t){try{const r=(fc[e]||(fc[e]=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format))(t).split("GMT")[1];return r in ca?ca[r]:Yp(r,r.split(":"))}catch{if(e in ca)return ca[e];const n=e==null?void 0:e.match(v2);return n?Yp(e,n.slice(1)):NaN}}const v2=/([+-]\d\d):?(\d\d)?/;function Yp(e,t){const n=+(t[0]||0),r=+(t[1]||0),o=+(t[2]||0)/60;return ca[e]=n*60+r>0?n*60+r+o:n*60-r-o}class _n extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Un(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),aw(this,t)):this.setTime(Date.now())}static tz(t,...n){return n.length?new _n(...n,t):new _n(Date.now(),t)}withTimeZone(t){return new _n(+this,t)}getTimezoneOffset(){const t=-Un(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),si(this),+this}[Symbol.for("constructDateFrom")](t){return new _n(+new Date(t),this.timeZone)}}const Up=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!Up.test(e))return;const t=e.replace(Up,"$1UTC");_n.prototype[t]&&(e.startsWith("get")?_n.prototype[e]=function(){return this.internal[t]()}:(_n.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),x2(this),+this},_n.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),si(this),+this}))});function si(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-Un(e.timeZone,e)*60))}function x2(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),aw(e)}function aw(e,t){const n=Array.isArray(t)?y2(t):+e.internal,r=Un(e.timeZone,e),o=r>0?Math.floor(r):Math.ceil(r),a=new Date(+e);a.setUTCHours(a.getUTCHours()-1);const s=-new Date(+e).getTimezoneOffset(),i=-new Date(+a).getTimezoneOffset(),l=s-i;let c=s;if(l&&s!==o){const I=Date.prototype.getHours.apply(e),O=Array.isArray(t)?t[3]||0:e.internal.getUTCHours();if(I!==O){const _=new Date(+e),T=s-o;T&&_.setUTCMinutes(_.getUTCMinutes()+T);const k=Un(e.timeZone,_);(k>0?Math.floor(k):Math.ceil(k))===o&&(c=i)}}const d=c-o;d&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+d);const u=new Date(+e);u.setUTCSeconds(0);const m=s>0?u.getSeconds():(u.getSeconds()-60)%60,g=Math.round(-(Un(e.timeZone,e)*60))%60;(g||m)&&Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+g+m);const b=Un(e.timeZone,e),h=b>0?Math.floor(b):Math.ceil(b),v=-new Date(+e).getTimezoneOffset()-h,w=h!==o,y=v-d,C=h-o,E=n-h*60*1e3,S=C>0&&Kp(e)-n===C*60*1e3&&Kp(e,E)!==n;if(w&&y&&!S){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+y);const I=Un(e.timeZone,e),O=I>0?Math.floor(I):Math.ceil(I),_=h-O;_&&y<0&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+_)}si(e);const R=(t?n:n+g*1e3)-+e.internal;R&&Math.abs(R)<1800*1e3&&(Date.prototype.setTime.call(e,+e+R),si(e))}function y2(e){return Date.UTC(e[0],e.length>1?e[1]:0,e.length>2?e[2]:1,...e.slice(3))}function Kp(e,t){const n=new Date(t??+e);return n.setUTCSeconds(n.getUTCSeconds()-Math.round(-Un(e.timeZone,n)*60)),+n}class jt extends _n{static tz(t,...n){return n.length?new jt(...n,t):new jt(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),o=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,o]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${r} ${n} ${o}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,o]=this.tzComponents();return`${t} GMT${n}${r}${o} (${b2(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[n,r,o]}withTimeZone(t){return new jt(+this,t)}[Symbol.for("constructDateFrom")](t){return new jt(+new Date(t),this.timeZone)}}const sw=6048e5,w2=864e5,qp=Symbol.for("constructDateFrom");function Et(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&qp in e?e[qp](t):e instanceof Date?new e.constructor(t):new Date(t)}function rt(e,t){return Et(t||e,e)}function iw(e,t,n){const r=rt(e,n==null?void 0:n.in);return isNaN(t)?Et(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function lw(e,t,n){const r=rt(e,n==null?void 0:n.in);if(isNaN(t))return Et(e,NaN);if(!t)return r;const o=r.getDate(),a=Et(e,r.getTime());a.setMonth(r.getMonth()+t+1,0);const s=a.getDate();return o>=s?a:(r.setFullYear(a.getFullYear(),a.getMonth(),o),r)}let C2={};function qa(){return C2}function $o(e,t){var i,l,c,d;const n=qa(),r=(t==null?void 0:t.weekStartsOn)??((l=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((d=(c=n.locale)==null?void 0:c.options)==null?void 0:d.weekStartsOn)??0,o=rt(e,t==null?void 0:t.in),a=o.getDay(),s=(a<r?7:0)+a-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function Sa(e,t){return $o(e,{...t,weekStartsOn:1})}function cw(e,t){const n=rt(e,t==null?void 0:t.in),r=n.getFullYear(),o=Et(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=Sa(o),s=Et(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const i=Sa(s);return n.getTime()>=a.getTime()?r+1:n.getTime()>=i.getTime()?r:r-1}function Xp(e){const t=rt(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Uo(e,...t){const n=Et.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Ea(e,t){const n=rt(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function Rd(e,t,n){const[r,o]=Uo(n==null?void 0:n.in,e,t),a=Ea(r),s=Ea(o),i=+a-Xp(a),l=+s-Xp(s);return Math.round((i-l)/w2)}function S2(e,t){const n=cw(e,t),r=Et(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Sa(r)}function E2(e,t,n){return iw(e,t*7,n)}function M2(e,t,n){return lw(e,t*12,n)}function R2(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=Et.bind(null,o));const a=rt(o,r);(!n||n<a||isNaN(+a))&&(n=a)}),Et(r,n||NaN)}function k2(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=Et.bind(null,o));const a=rt(o,r);(!n||n>a||isNaN(+a))&&(n=a)}),Et(r,n||NaN)}function P2(e,t,n){const[r,o]=Uo(n==null?void 0:n.in,e,t);return+Ea(r)==+Ea(o)}function uw(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function N2(e){return!(!uw(e)&&typeof e!="number"||isNaN(+rt(e)))}function dw(e,t,n){const[r,o]=Uo(n==null?void 0:n.in,e,t),a=r.getFullYear()-o.getFullYear(),s=r.getMonth()-o.getMonth();return a*12+s}function T2(e,t){const n=rt(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function fw(e,t){const[n,r]=Uo(e,t.start,t.end);return{start:n,end:r}}function I2(e,t){const{start:n,end:r}=fw(t==null?void 0:t.in,e);let o=+n>+r;const a=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0),s.setDate(1);let i=1;const l=[];for(;+s<=a;)l.push(Et(n,s)),s.setMonth(s.getMonth()+i);return o?l.reverse():l}function _2(e,t){const n=rt(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function O2(e,t){const n=rt(e,t==null?void 0:t.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function pw(e,t){const n=rt(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function D2(e,t){const{start:n,end:r}=fw(t==null?void 0:t.in,e);let o=+n>+r;const a=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0),s.setMonth(0,1);let i=1;const l=[];for(;+s<=a;)l.push(Et(n,s)),s.setFullYear(s.getFullYear()+i);return o?l.reverse():l}function mw(e,t){var i,l,c,d;const n=qa(),r=(t==null?void 0:t.weekStartsOn)??((l=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((d=(c=n.locale)==null?void 0:c.options)==null?void 0:d.weekStartsOn)??0,o=rt(e,t==null?void 0:t.in),a=o.getDay(),s=(a<r?-7:0)+6-(a-r);return o.setDate(o.getDate()+s),o.setHours(23,59,59,999),o}function A2(e,t){return mw(e,{...t,weekStartsOn:1})}const j2={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},z2=(e,t,n)=>{let r;const o=j2[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function pc(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const $2={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},L2={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},F2={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},V2={date:pc({formats:$2,defaultWidth:"full"}),time:pc({formats:L2,defaultWidth:"full"}),dateTime:pc({formats:F2,defaultWidth:"full"})},W2={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},B2=(e,t,n,r)=>W2[e];function ta(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,i=n!=null&&n.width?String(n.width):s;o=e.formattingValues[i]||e.formattingValues[s]}else{const s=e.defaultWidth,i=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[i]||e.values[s]}const a=e.argumentCallback?e.argumentCallback(t):t;return o[a]}}const H2={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},G2={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Y2={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},U2={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},K2={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},q2={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},X2=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Z2={ordinalNumber:X2,era:ta({values:H2,defaultWidth:"wide"}),quarter:ta({values:G2,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ta({values:Y2,defaultWidth:"wide"}),day:ta({values:U2,defaultWidth:"wide"}),dayPeriod:ta({values:K2,defaultWidth:"wide",formattingValues:q2,defaultFormattingWidth:"wide"})};function na(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const s=a[0],i=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(i)?J2(i,u=>u.test(s)):Q2(i,u=>u.test(s));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const d=t.slice(s.length);return{value:c,rest:d}}}function Q2(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function J2(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function eA(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],a=t.match(e.parsePattern);if(!a)return null;let s=e.valueCallback?e.valueCallback(a[0]):a[0];s=n.valueCallback?n.valueCallback(s):s;const i=t.slice(o.length);return{value:s,rest:i}}}const tA=/^(\d+)(th|st|nd|rd)?/i,nA=/\d+/i,rA={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},oA={any:[/^b/i,/^(a|c)/i]},aA={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},sA={any:[/1/i,/2/i,/3/i,/4/i]},iA={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},lA={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},cA={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},uA={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},dA={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},fA={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},pA={ordinalNumber:eA({matchPattern:tA,parsePattern:nA,valueCallback:e=>parseInt(e,10)}),era:na({matchPatterns:rA,defaultMatchWidth:"wide",parsePatterns:oA,defaultParseWidth:"any"}),quarter:na({matchPatterns:aA,defaultMatchWidth:"wide",parsePatterns:sA,defaultParseWidth:"any",valueCallback:e=>e+1}),month:na({matchPatterns:iA,defaultMatchWidth:"wide",parsePatterns:lA,defaultParseWidth:"any"}),day:na({matchPatterns:cA,defaultMatchWidth:"wide",parsePatterns:uA,defaultParseWidth:"any"}),dayPeriod:na({matchPatterns:dA,defaultMatchWidth:"any",parsePatterns:fA,defaultParseWidth:"any"})},yo={code:"en-US",formatDistance:z2,formatLong:V2,formatRelative:B2,localize:Z2,match:pA,options:{weekStartsOn:0,firstWeekContainsDate:1}};function mA(e,t){const n=rt(e,t==null?void 0:t.in);return Rd(n,pw(n))+1}function kd(e,t){const n=rt(e,t==null?void 0:t.in),r=+Sa(n)-+S2(n);return Math.round(r/sw)+1}function hw(e,t){var d,u,m,g;const n=rt(e,t==null?void 0:t.in),r=n.getFullYear(),o=qa(),a=(t==null?void 0:t.firstWeekContainsDate)??((u=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:u.firstWeekContainsDate)??o.firstWeekContainsDate??((g=(m=o.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??1,s=Et((t==null?void 0:t.in)||e,0);s.setFullYear(r+1,0,a),s.setHours(0,0,0,0);const i=$o(s,t),l=Et((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const c=$o(l,t);return+n>=+i?r+1:+n>=+c?r:r-1}function hA(e,t){var i,l,c,d;const n=qa(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((d=(c=n.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??1,o=hw(e,t),a=Et((t==null?void 0:t.in)||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),$o(a,t)}function Pd(e,t){const n=rt(e,t==null?void 0:t.in),r=+$o(n,t)-+hA(n,t);return Math.round(r/sw)+1}function et(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const ir={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return et(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):et(n+1,2)},d(e,t){return et(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return et(e.getHours()%12||12,t.length)},H(e,t){return et(e.getHours(),t.length)},m(e,t){return et(e.getMinutes(),t.length)},s(e,t){return et(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return et(o,t.length)}},bo={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Zp={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return ir.y(e,t)},Y:function(e,t,n,r){const o=hw(e,r),a=o>0?o:1-o;if(t==="YY"){const s=a%100;return et(s,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):et(a,t.length)},R:function(e,t){const n=cw(e);return et(n,t.length)},u:function(e,t){const n=e.getFullYear();return et(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return et(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return et(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return ir.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return et(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=Pd(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):et(o,t.length)},I:function(e,t,n){const r=kd(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):et(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):ir.d(e,t)},D:function(e,t,n){const r=mA(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):et(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return et(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return et(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return et(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=bo.noon:r===0?o=bo.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=bo.evening:r>=12?o=bo.afternoon:r>=4?o=bo.morning:o=bo.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return ir.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):ir.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):et(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):et(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):ir.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):ir.s(e,t)},S:function(e,t){return ir.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Jp(r);case"XXXX":case"XX":return Vr(r);case"XXXXX":case"XXX":default:return Vr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Jp(r);case"xxxx":case"xx":return Vr(r);case"xxxxx":case"xxx":default:return Vr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Qp(r,":");case"OOOO":default:return"GMT"+Vr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Qp(r,":");case"zzzz":default:return"GMT"+Vr(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return et(r,t.length)},T:function(e,t,n){return et(+e,t.length)}};function Qp(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),a=r%60;return a===0?n+String(o):n+String(o)+t+et(a,2)}function Jp(e,t){return e%60===0?(e>0?"-":"+")+et(Math.abs(e)/60,2):Vr(e,t)}function Vr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=et(Math.trunc(r/60),2),a=et(r%60,2);return n+o+t+a}const em=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},gw=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},gA=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return em(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",em(r,t)).replace("{{time}}",gw(o,t))},bA={p:gw,P:gA},vA=/^D+$/,xA=/^Y+$/,yA=["D","DD","YY","YYYY"];function wA(e){return vA.test(e)}function CA(e){return xA.test(e)}function SA(e,t,n){const r=EA(e,t,n);if(console.warn(r),yA.includes(e))throw new RangeError(r)}function EA(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const MA=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,RA=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,kA=/^'([^]*?)'?$/,PA=/''/g,NA=/[a-zA-Z]/;function wo(e,t,n){var d,u,m,g,b,h,x,v;const r=qa(),o=(n==null?void 0:n.locale)??r.locale??yo,a=(n==null?void 0:n.firstWeekContainsDate)??((u=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:u.firstWeekContainsDate)??r.firstWeekContainsDate??((g=(m=r.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??1,s=(n==null?void 0:n.weekStartsOn)??((h=(b=n==null?void 0:n.locale)==null?void 0:b.options)==null?void 0:h.weekStartsOn)??r.weekStartsOn??((v=(x=r.locale)==null?void 0:x.options)==null?void 0:v.weekStartsOn)??0,i=rt(e,n==null?void 0:n.in);if(!N2(i))throw new RangeError("Invalid time value");let l=t.match(RA).map(w=>{const y=w[0];if(y==="p"||y==="P"){const C=bA[y];return C(w,o.formatLong)}return w}).join("").match(MA).map(w=>{if(w==="''")return{isToken:!1,value:"'"};const y=w[0];if(y==="'")return{isToken:!1,value:TA(w)};if(Zp[y])return{isToken:!0,value:w};if(y.match(NA))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");return{isToken:!1,value:w}});o.localize.preprocessor&&(l=o.localize.preprocessor(i,l));const c={firstWeekContainsDate:a,weekStartsOn:s,locale:o};return l.map(w=>{if(!w.isToken)return w.value;const y=w.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&CA(y)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&wA(y))&&SA(y,t,String(e));const C=Zp[y[0]];return C(i,y,o.localize,c)}).join("")}function TA(e){const t=e.match(kA);return t?t[1].replace(PA,"'"):e}function IA(e,t){const n=rt(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),a=Et(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function _A(e,t){return rt(e,t==null?void 0:t.in).getMonth()}function OA(e,t){return rt(e,t==null?void 0:t.in).getFullYear()}function DA(e,t){return+rt(e)>+rt(t)}function AA(e,t){return+rt(e)<+rt(t)}function jA(e,t,n){const[r,o]=Uo(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function zA(e,t,n){const[r,o]=Uo(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function $A(e,t,n){const r=rt(e,n==null?void 0:n.in),o=r.getFullYear(),a=r.getDate(),s=Et(e,0);s.setFullYear(o,t,15),s.setHours(0,0,0,0);const i=IA(s);return r.setMonth(t,Math.min(a,i)),r}function LA(e,t,n){const r=rt(e,n==null?void 0:n.in);return isNaN(+r)?Et(e,NaN):(r.setFullYear(t),r)}const tm=5,FA=4;function VA(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),a=t.addDays(o,tm*7-1);return t.getMonth(e)===t.getMonth(a)?tm:FA}function bw(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-6):t.addDays(n,-1*(r-1))}function WA(e,t){const n=bw(e,t),r=VA(e,t);return t.addDays(n,r*7-1)}const vw={...yo,labels:{labelDayButton:(e,t,n,r)=>{let o;r&&typeof r.format=="function"?o=r.format.bind(r):o=(s,i)=>wo(s,i,{locale:yo,...n});let a=o(e,"PPPP");return t.today&&(a=`Today, ${a}`),t.selected&&(a=`${a}, selected`),a},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:"Choose the Year",labelGrid:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(o,a)=>wo(o,a,{locale:yo,...t}),r(e,"LLLL yyyy")},labelGridcell:(e,t,n,r)=>{let o;r&&typeof r.format=="function"?o=r.format.bind(r):o=(s,i)=>wo(s,i,{locale:yo,...n});let a=o(e,"PPPP");return t!=null&&t.today&&(a=`Today, ${a}`),a},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(o,a)=>wo(o,a,{locale:yo,...t}),r(e,"cccc")}}};class sn{constructor(t,n){this.today=()=>{var o;if((o=this.overrides)!=null&&o.today)return this.overrides.today();if(this.options.timeZone)return jt.tz(this.options.timeZone);const r=this.options.Date??Date;return new r},this.newDate=(r,o,a)=>{var s;return(s=this.overrides)!=null&&s.newDate?this.overrides.newDate(r,o,a):this.options.timeZone?new jt(r,o,a,this.options.timeZone):new Date(r,o,a)},this.addDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addDays?this.overrides.addDays(r,o):iw(r,o)},this.addMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addMonths?this.overrides.addMonths(r,o):lw(r,o)},this.addWeeks=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addWeeks?this.overrides.addWeeks(r,o):E2(r,o)},this.addYears=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addYears?this.overrides.addYears(r,o):M2(r,o)},this.differenceInCalendarDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):Rd(r,o)},this.differenceInCalendarMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):dw(r,o)},this.eachMonthOfInterval=r=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):I2(r)},this.eachYearOfInterval=r=>{var i;const o=(i=this.overrides)!=null&&i.eachYearOfInterval?this.overrides.eachYearOfInterval(r):D2(r),a=new Set(o.map(l=>this.getYear(l)));if(a.size===o.length)return o;const s=[];return a.forEach(l=>{s.push(new Date(l,0,1))}),s},this.endOfBroadcastWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):WA(r,this)},this.endOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(r):A2(r)},this.endOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(r):T2(r)},this.endOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.endOfWeek?this.overrides.endOfWeek(r,o):mw(r,this.options)},this.endOfYear=r=>{var o;return(o=this.overrides)!=null&&o.endOfYear?this.overrides.endOfYear(r):O2(r)},this.format=(r,o,a)=>{var i;const s=(i=this.overrides)!=null&&i.format?this.overrides.format(r,o,this.options):wo(r,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(s):s},this.getISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.getISOWeek?this.overrides.getISOWeek(r):kd(r)},this.getMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getMonth?this.overrides.getMonth(r,this.options):_A(r,this.options)},this.getYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getYear?this.overrides.getYear(r,this.options):OA(r,this.options)},this.getWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getWeek?this.overrides.getWeek(r,this.options):Pd(r,this.options)},this.isAfter=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isAfter?this.overrides.isAfter(r,o):DA(r,o)},this.isBefore=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isBefore?this.overrides.isBefore(r,o):AA(r,o)},this.isDate=r=>{var o;return(o=this.overrides)!=null&&o.isDate?this.overrides.isDate(r):uw(r)},this.isSameDay=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameDay?this.overrides.isSameDay(r,o):P2(r,o)},this.isSameMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameMonth?this.overrides.isSameMonth(r,o):jA(r,o)},this.isSameYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameYear?this.overrides.isSameYear(r,o):zA(r,o)},this.max=r=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(r):R2(r)},this.min=r=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(r):k2(r)},this.setMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setMonth?this.overrides.setMonth(r,o):$A(r,o)},this.setYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setYear?this.overrides.setYear(r,o):LA(r,o)},this.startOfBroadcastWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):bw(r,this)},this.startOfDay=r=>{var o;return(o=this.overrides)!=null&&o.startOfDay?this.overrides.startOfDay(r):Ea(r)},this.startOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.startOfISOWeek?this.overrides.startOfISOWeek(r):Sa(r)},this.startOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.startOfMonth?this.overrides.startOfMonth(r):_2(r)},this.startOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfWeek?this.overrides.startOfWeek(r,this.options):$o(r,this.options)},this.startOfYear=r=>{var o;return(o=this.overrides)!=null&&o.startOfYear?this.overrides.startOfYear(r):pw(r)},this.options={locale:vw,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let o=0;o<10;o++)r[o.toString()]=n.format(o);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}getMonthYearOrder(){var n;const t=(n=this.options.locale)==null?void 0:n.code;return t&&sn.yearFirstLocales.has(t)?"year-first":"month-first"}formatMonthYear(t){const{locale:n,timeZone:r,numerals:o}=this.options,a=n==null?void 0:n.code;if(a&&sn.yearFirstLocales.has(a))try{return new Intl.DateTimeFormat(a,{month:"long",year:"numeric",timeZone:r,numberingSystem:o}).format(t)}catch{}const s=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(t,s)}}sn.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const Vn=new sn;class xw{constructor(t,n,r=Vn){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r,this.isoDate=r.format(t,"yyyy-MM-dd"),this.displayMonthId=r.format(n,"yyyy-MM"),this.dateMonthId=r.format(t,"yyyy-MM")}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class BA{constructor(t,n){this.date=t,this.weeks=n}}class HA{constructor(t,n){this.days=n,this.weekNumber=t}}function GA(e){return P.createElement("span",{...e})}function YA(e){const{size:t=24,orientation:n="left",className:r,style:o}=e;return P.createElement("svg",{className:r,style:o,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&P.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&P.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&P.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&P.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function UA(e){const{day:t,modifiers:n,...r}=e;return P.createElement("td",{...r})}function KA(e){const{day:t,modifiers:n,...r}=e,o=P.useRef(null);return P.useEffect(()=>{var a;n.focused&&((a=o.current)==null||a.focus())},[n.focused]),P.createElement("button",{ref:o,...r})}var me;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(me||(me={}));var ft;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(ft||(ft={}));var yn;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(yn||(yn={}));var nn;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(nn||(nn={}));const yw=P.createContext(void 0);function ul(){const e=P.useContext(yw);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function qA(e){const{options:t,className:n,...r}=e,{classNames:o,components:a,styles:s}=ul(),i=[o[me.Dropdown],n].join(" "),l=t==null?void 0:t.find(({value:c})=>c===r.value);return P.createElement("span",{"data-disabled":r.disabled,className:o[me.DropdownRoot],style:s==null?void 0:s[me.DropdownRoot]},P.createElement(a.Select,{className:i,...r},t==null?void 0:t.map(({value:c,label:d,disabled:u})=>P.createElement(a.Option,{key:c,value:c,disabled:u},d))),P.createElement("span",{className:o[me.CaptionLabel],style:s==null?void 0:s[me.CaptionLabel],"aria-hidden":!0},l==null?void 0:l.label,P.createElement(a.Chevron,{orientation:"down",size:18,className:o[me.Chevron],style:s==null?void 0:s[me.Chevron]})))}function XA(e){return P.createElement("div",{...e})}function ZA(e){return P.createElement("div",{...e})}function QA(e){const{calendarMonth:t,displayIndex:n,...r}=e;return P.createElement("div",{...r},e.children)}function JA(e){const{calendarMonth:t,displayIndex:n,...r}=e;return P.createElement("div",{...r})}function e5(e){return P.createElement("table",{...e})}function t5(e){return P.createElement("div",{...e})}function n5(e){const{components:t}=ul();return P.createElement(t.Dropdown,{...e})}function r5(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...a}=e,{components:s,classNames:i,styles:l,labels:{labelPrevious:c,labelNext:d}}=ul(),u=P.useCallback(g=>{o&&(n==null||n(g))},[o,n]),m=P.useCallback(g=>{r&&(t==null||t(g))},[r,t]);return P.createElement("nav",{...a},P.createElement(s.PreviousMonthButton,{type:"button",className:i[me.PreviousMonthButton],style:l==null?void 0:l[me.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":c(r),onClick:m},P.createElement(s.Chevron,{disabled:r?void 0:!0,className:i[me.Chevron],style:l==null?void 0:l[me.Chevron],orientation:"left"})),P.createElement(s.NextMonthButton,{type:"button",className:i[me.NextMonthButton],style:l==null?void 0:l[me.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":d(o),onClick:u},P.createElement(s.Chevron,{disabled:o?void 0:!0,orientation:"right",className:i[me.Chevron],style:l==null?void 0:l[me.Chevron]})))}function o5(e){return P.createElement("button",{...e})}function a5(e){return P.createElement("option",{...e})}function s5(e){return P.createElement("button",{...e})}function i5(e){const{rootRef:t,...n}=e;return P.createElement("div",{...n,ref:t})}function l5(e){return P.createElement("select",{...e})}function c5(e){const{week:t,...n}=e;return P.createElement("tr",{...n})}function u5(e){return P.createElement("th",{...e})}function d5(e){return P.createElement("thead",{"aria-hidden":!0},P.createElement("tr",{...e}))}function f5(e){const{week:t,...n}=e;return P.createElement("th",{...n})}function p5(e){return P.createElement("th",{...e})}function m5(e){return P.createElement("tbody",{...e})}function h5(e){const{components:t}=ul();return P.createElement(t.Dropdown,{...e})}const g5=Object.freeze(Object.defineProperty({__proto__:null,CaptionLabel:GA,Chevron:YA,Day:UA,DayButton:KA,Dropdown:qA,DropdownNav:XA,Footer:ZA,Month:QA,MonthCaption:JA,MonthGrid:e5,Months:t5,MonthsDropdown:n5,Nav:r5,NextMonthButton:o5,Option:a5,PreviousMonthButton:s5,Root:i5,Select:l5,Week:c5,WeekNumber:f5,WeekNumberHeader:p5,Weekday:u5,Weekdays:d5,Weeks:m5,YearsDropdown:h5},Symbol.toStringTag,{value:"Module"}));function Kn(e,t,n=!1,r=Vn){let{from:o,to:a}=e;const{differenceInCalendarDays:s,isSameDay:i}=r;return o&&a?(s(a,o)<0&&([o,a]=[a,o]),s(t,o)>=(n?1:0)&&s(a,t)>=(n?1:0)):!n&&a?i(a,t):!n&&o?i(o,t):!1}function Nd(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function dl(e){return!!(e&&typeof e=="object"&&"from"in e)}function Td(e){return!!(e&&typeof e=="object"&&"after"in e)}function Id(e){return!!(e&&typeof e=="object"&&"before"in e)}function ww(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function Cw(e,t){return Array.isArray(e)&&e.every(t.isDate)}function qn(e,t,n=Vn){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:a,isAfter:s}=n;return r.some(i=>{if(typeof i=="boolean")return i;if(n.isDate(i))return o(e,i);if(Cw(i,n))return i.some(l=>o(e,l));if(dl(i))return Kn(i,e,!1,n);if(ww(i))return Array.isArray(i.dayOfWeek)?i.dayOfWeek.includes(e.getDay()):i.dayOfWeek===e.getDay();if(Nd(i)){const l=a(i.before,e),c=a(i.after,e),d=l>0,u=c<0;return s(i.before,i.after)?u&&d:d||u}return Td(i)?a(e,i.after)>0:Id(i)?a(i.before,e)>0:typeof i=="function"?i(e):!1})}function b5(e,t,n,r,o){const{disabled:a,hidden:s,modifiers:i,showOutsideDays:l,broadcastCalendar:c,today:d=o.today()}=t,{isSameDay:u,isSameMonth:m,startOfMonth:g,isBefore:b,endOfMonth:h,isAfter:x}=o,v=n&&g(n),w=r&&h(r),y={[ft.focused]:[],[ft.outside]:[],[ft.disabled]:[],[ft.hidden]:[],[ft.today]:[]},C={};for(const E of e){const{date:S,displayMonth:M}=E,R=!!(M&&!m(S,M)),I=!!(v&&b(S,v)),O=!!(w&&x(S,w)),_=!!(a&&qn(S,a,o)),T=!!(s&&qn(S,s,o))||I||O||!c&&!l&&R||c&&l===!1&&R,k=u(S,d);R&&y.outside.push(E),_&&y.disabled.push(E),T&&y.hidden.push(E),k&&y.today.push(E),i&&Object.keys(i).forEach(j=>{const V=i==null?void 0:i[j];V&&qn(S,V,o)&&(C[j]?C[j].push(E):C[j]=[E])})}return E=>{const S={[ft.focused]:!1,[ft.disabled]:!1,[ft.hidden]:!1,[ft.outside]:!1,[ft.today]:!1},M={};for(const R in y){const I=y[R];S[R]=I.some(O=>O===E)}for(const R in C)M[R]=C[R].some(I=>I===E);return{...S,...M}}}function v5(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[a])=>(n[a]?o.push(n[a]):t[ft[a]]?o.push(t[ft[a]]):t[yn[a]]&&o.push(t[yn[a]]),o),[t[me.Day]])}function x5(e){return{...g5,...e}}function y5(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function _d(){const e={};for(const t in me)e[me[t]]=`rdp-${me[t]}`;for(const t in ft)e[ft[t]]=`rdp-${ft[t]}`;for(const t in yn)e[yn[t]]=`rdp-${yn[t]}`;for(const t in nn)e[nn[t]]=`rdp-${nn[t]}`;return e}function w5(e,t,n){return(n??new sn(t)).formatMonthYear(e)}function C5(e,t,n){return(n??new sn(t)).format(e,"d")}function S5(e,t=Vn){return t.format(e,"LLLL")}function E5(e,t,n){return(n??new sn(t)).format(e,"cccccc")}function M5(e,t=Vn){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function R5(){return""}function k5(e,t=Vn){return t.format(e,"yyyy")}const P5=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:w5,formatDay:C5,formatMonthDropdown:S5,formatWeekNumber:M5,formatWeekNumberHeader:R5,formatWeekdayName:E5,formatYearDropdown:k5},Symbol.toStringTag,{value:"Module"}));function N5(e){return{...P5,...e}}function Sw(e,t,n,r){let o=(r??new sn(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}function Ew(e,t,n){return(n??new sn(t)).formatMonthYear(e)}function Mw(e,t,n,r){let o=(r??new sn(n)).format(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o}function Rw(e){return"Choose the Month"}function kw(){return""}const T5="Go to the Next Month";function Pw(e,t){return T5}function Nw(e){return"Go to the Previous Month"}function Tw(e,t,n){return(n??new sn(t)).format(e,"cccc")}function Iw(e,t){return`Week ${e}`}function _w(e){return"Week Number"}function Ow(e){return"Choose the Year"}const I5=Object.freeze(Object.defineProperty({__proto__:null,labelDayButton:Sw,labelGrid:Ew,labelGridcell:Mw,labelMonthDropdown:Rw,labelNav:kw,labelNext:Pw,labelPrevious:Nw,labelWeekNumber:Iw,labelWeekNumberHeader:_w,labelWeekday:Tw,labelYearDropdown:Ow},Symbol.toStringTag,{value:"Module"})),bn=(e,t,n)=>t||(n?typeof n=="function"?n:(...r)=>n:e);function _5(e,t){var r;const n=((r=t.locale)==null?void 0:r.labels)??{};return{...I5,...e??{},labelDayButton:bn(Sw,e==null?void 0:e.labelDayButton,n.labelDayButton),labelMonthDropdown:bn(Rw,e==null?void 0:e.labelMonthDropdown,n.labelMonthDropdown),labelNext:bn(Pw,e==null?void 0:e.labelNext,n.labelNext),labelPrevious:bn(Nw,e==null?void 0:e.labelPrevious,n.labelPrevious),labelWeekNumber:bn(Iw,e==null?void 0:e.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:bn(Ow,e==null?void 0:e.labelYearDropdown,n.labelYearDropdown),labelGrid:bn(Ew,e==null?void 0:e.labelGrid,n.labelGrid),labelGridcell:bn(Mw,e==null?void 0:e.labelGridcell,n.labelGridcell),labelNav:bn(kw,e==null?void 0:e.labelNav,n.labelNav),labelWeekNumberHeader:bn(_w,e==null?void 0:e.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:bn(Tw,e==null?void 0:e.labelWeekday,n.labelWeekday)}}function O5(e,t,n,r,o){const{startOfMonth:a,startOfYear:s,endOfYear:i,eachMonthOfInterval:l,getMonth:c}=o;return l({start:s(e),end:i(e)}).map(m=>{const g=r.formatMonthDropdown(m,o),b=c(m),h=t&&m<a(t)||n&&m>a(n)||!1;return{value:b,label:g,disabled:h}})}function D5(e,t={},n={}){let r={...t==null?void 0:t[me.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n==null?void 0:n[o]}}),r}function A5(e,t,n,r){const o=r??e.today(),a=n?e.startOfBroadcastWeek(o,e):t?e.startOfISOWeek(o):e.startOfWeek(o),s=[];for(let i=0;i<7;i++){const l=e.addDays(a,i);s.push(l)}return s}function j5(e,t,n,r,o=!1){if(!e||!t)return;const{startOfYear:a,endOfYear:s,eachYearOfInterval:i,getYear:l}=r,c=a(e),d=s(t),u=i({start:c,end:d});return o&&u.reverse(),u.map(m=>{const g=n.formatYearDropdown(m,r);return{value:l(m),label:g,disabled:!1}})}function z5(e,t={}){var i;const{weekStartsOn:n,locale:r}=t,o=n??((i=r==null?void 0:r.options)==null?void 0:i.weekStartsOn)??0,a=l=>{const c=typeof l=="number"||typeof l=="string"?new Date(l):l;return new jt(c.getFullYear(),c.getMonth(),c.getDate(),12,0,0,e)},s=l=>{const c=a(l);return new Date(c.getFullYear(),c.getMonth(),c.getDate(),0,0,0,0)};return{today:()=>a(jt.tz(e)),newDate:(l,c,d)=>new jt(l,c,d,12,0,0,e),startOfDay:l=>a(l),startOfWeek:(l,c)=>{const d=a(l),u=(c==null?void 0:c.weekStartsOn)??o,m=(d.getDay()-u+7)%7;return d.setDate(d.getDate()-m),d},startOfISOWeek:l=>{const c=a(l),d=(c.getDay()-1+7)%7;return c.setDate(c.getDate()-d),c},startOfMonth:l=>{const c=a(l);return c.setDate(1),c},startOfYear:l=>{const c=a(l);return c.setMonth(0,1),c},endOfWeek:(l,c)=>{const d=a(l),g=((((c==null?void 0:c.weekStartsOn)??o)+6)%7-d.getDay()+7)%7;return d.setDate(d.getDate()+g),d},endOfISOWeek:l=>{const c=a(l),d=(7-c.getDay())%7;return c.setDate(c.getDate()+d),c},endOfMonth:l=>{const c=a(l);return c.setMonth(c.getMonth()+1,0),c},endOfYear:l=>{const c=a(l);return c.setMonth(11,31),c},eachMonthOfInterval:l=>{const c=a(l.start),d=a(l.end),u=[],m=new jt(c.getFullYear(),c.getMonth(),1,12,0,0,e),g=d.getFullYear()*12+d.getMonth();for(;m.getFullYear()*12+m.getMonth()<=g;)u.push(new jt(m,e)),m.setMonth(m.getMonth()+1,1);return u},addDays:(l,c)=>{const d=a(l);return d.setDate(d.getDate()+c),d},addWeeks:(l,c)=>{const d=a(l);return d.setDate(d.getDate()+c*7),d},addMonths:(l,c)=>{const d=a(l);return d.setMonth(d.getMonth()+c),d},addYears:(l,c)=>{const d=a(l);return d.setFullYear(d.getFullYear()+c),d},eachYearOfInterval:l=>{const c=a(l.start),d=a(l.end),u=[],m=new jt(c.getFullYear(),0,1,12,0,0,e);for(;m.getFullYear()<=d.getFullYear();)u.push(new jt(m,e)),m.setFullYear(m.getFullYear()+1,0,1);return u},getWeek:(l,c)=>{var u;const d=s(l);return Pd(d,{weekStartsOn:(c==null?void 0:c.weekStartsOn)??o,firstWeekContainsDate:(c==null?void 0:c.firstWeekContainsDate)??((u=r==null?void 0:r.options)==null?void 0:u.firstWeekContainsDate)??1})},getISOWeek:l=>{const c=s(l);return kd(c)},differenceInCalendarDays:(l,c)=>{const d=s(l),u=s(c);return Rd(d,u)},differenceInCalendarMonths:(l,c)=>{const d=s(l),u=s(c);return dw(d,u)}}}const Xa=e=>e instanceof HTMLElement?e:null,mc=e=>[...e.querySelectorAll("[data-animated-month]")??[]],$5=e=>Xa(e.querySelector("[data-animated-month]")),hc=e=>Xa(e.querySelector("[data-animated-caption]")),gc=e=>Xa(e.querySelector("[data-animated-weeks]")),L5=e=>Xa(e.querySelector("[data-animated-nav]")),F5=e=>Xa(e.querySelector("[data-animated-weekdays]"));function V5(e,t,{classNames:n,months:r,focused:o,dateLib:a}){const s=P.useRef(null),i=P.useRef(r),l=P.useRef(!1);P.useLayoutEffect(()=>{const c=i.current;if(i.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||c.length===0||r.length!==c.length)return;const d=a.isSameMonth(r[0].date,c[0].date),u=a.isAfter(r[0].date,c[0].date),m=u?n[nn.caption_after_enter]:n[nn.caption_before_enter],g=u?n[nn.weeks_after_enter]:n[nn.weeks_before_enter],b=s.current,h=e.current.cloneNode(!0);if(h instanceof HTMLElement?(mc(h).forEach(y=>{if(!(y instanceof HTMLElement))return;const C=$5(y);C&&y.contains(C)&&y.removeChild(C);const E=hc(y);E&&E.classList.remove(m);const S=gc(y);S&&S.classList.remove(g)}),s.current=h):s.current=null,l.current||d||o)return;const x=b instanceof HTMLElement?mc(b):[],v=mc(e.current);if(v!=null&&v.every(w=>w instanceof HTMLElement)&&(x!=null&&x.every(w=>w instanceof HTMLElement))){l.current=!0,e.current.style.isolation="isolate";const w=L5(e.current);w&&(w.style.zIndex="1"),v.forEach((y,C)=>{const E=x[C];if(!E)return;y.style.position="relative",y.style.overflow="hidden";const S=hc(y);S&&S.classList.add(m);const M=gc(y);M&&M.classList.add(g);const R=()=>{l.current=!1,e.current&&(e.current.style.isolation=""),w&&(w.style.zIndex=""),S&&S.classList.remove(m),M&&M.classList.remove(g),y.style.position="",y.style.overflow="",y.contains(E)&&y.removeChild(E)};E.style.pointerEvents="none",E.style.position="absolute",E.style.overflow="hidden",E.setAttribute("aria-hidden","true");const I=F5(E);I&&(I.style.opacity="0");const O=hc(E);O&&(O.classList.add(u?n[nn.caption_before_exit]:n[nn.caption_after_exit]),O.addEventListener("animationend",R));const _=gc(E);_&&_.classList.add(u?n[nn.weeks_before_exit]:n[nn.weeks_after_exit]),y.insertBefore(E,y.firstChild)})}})}function W5(e,t,n,r){const o=e[0],a=e[e.length-1],{ISOWeek:s,fixedWeeks:i,broadcastCalendar:l}=n??{},{addDays:c,differenceInCalendarDays:d,differenceInCalendarMonths:u,endOfBroadcastWeek:m,endOfISOWeek:g,endOfMonth:b,endOfWeek:h,isAfter:x,startOfBroadcastWeek:v,startOfISOWeek:w,startOfWeek:y}=r,C=l?v(o,r):s?w(o):y(o),E=l?m(a):s?g(b(a)):h(b(a)),S=t&&(l?m(t):s?g(t):h(t)),M=S&&x(E,S)?S:E,R=d(M,C),I=u(a,o)+1,O=[];for(let k=0;k<=R;k++){const j=c(C,k);O.push(j)}const T=(l?35:42)*I;if(i&&O.length<T){const k=T-O.length;for(let j=0;j<k;j++){const V=c(O[O.length-1],1);O.push(V)}}return O}function B5(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((a,s)=>a.concat(s.days.slice()),t.slice());return n.concat(o.slice())},t.slice())}function H5(e,t,n,r){const{numberOfMonths:o=1}=n,a=[];for(let s=0;s<o;s++){const i=r.addMonths(e,s);if(t&&i>t)break;a.push(i)}return a}function nm(e,t,n,r){const{month:o,defaultMonth:a,today:s=r.today(),numberOfMonths:i=1}=e;let l=o||a||s;const{differenceInCalendarMonths:c,addMonths:d,startOfMonth:u}=r;if(n&&c(n,l)<i-1){const m=-1*(i-1);l=d(n,m)}return t&&c(l,t)<0&&(l=t),u(l)}function G5(e,t,n,r){const{addDays:o,endOfBroadcastWeek:a,endOfISOWeek:s,endOfMonth:i,endOfWeek:l,getISOWeek:c,getWeek:d,startOfBroadcastWeek:u,startOfISOWeek:m,startOfWeek:g}=r,b=e.reduce((h,x)=>{const v=n.broadcastCalendar?u(x,r):n.ISOWeek?m(x):g(x),w=n.broadcastCalendar?a(x):n.ISOWeek?s(i(x)):l(i(x)),y=t.filter(M=>M>=v&&M<=w),C=n.broadcastCalendar?35:42;if(n.fixedWeeks&&y.length<C){const M=t.filter(R=>{const I=C-y.length;return R>w&&R<=o(w,I)});y.push(...M)}const E=y.reduce((M,R)=>{const I=n.ISOWeek?c(R):d(R),O=M.find(T=>T.weekNumber===I),_=new xw(R,x,r);return O?O.days.push(_):M.push(new HA(I,[_])),M},[]),S=new BA(x,E);return h.push(S),h},[]);return n.reverseMonths?b.reverse():b}function Y5(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:a,startOfMonth:s,endOfMonth:i,addYears:l,endOfYear:c,today:d}=t,u=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=s(n):!n&&u&&(n=o(l(e.today??d(),-100))),r?r=i(r):!r&&u&&(r=c(e.today??d())),[n&&a(n),r&&a(r)]}function U5(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a=1}=n,{startOfMonth:s,addMonths:i,differenceInCalendarMonths:l}=r,c=o?a:1,d=s(e);if(!t)return i(d,c);if(!(l(t,e)<a))return i(d,c)}function K5(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a}=n,{startOfMonth:s,addMonths:i,differenceInCalendarMonths:l}=r,c=o?a??1:1,d=s(e);if(!t)return i(d,-c);if(!(l(d,t)<=0))return i(d,-c)}function q5(e){const t=[];return e.reduce((n,r)=>n.concat(r.weeks.slice()),t.slice())}function fl(e,t){const[n,r]=P.useState(e);return[t===void 0?n:t,r]}function X5(e,t){var C;const[n,r]=Y5(e,t),{startOfMonth:o,endOfMonth:a}=t,s=nm(e,n,r,t),[i,l]=fl(s,e.month?s:void 0);P.useEffect(()=>{const E=nm(e,n,r,t);l(E)},[e.timeZone]);const{months:c,weeks:d,days:u,previousMonth:m,nextMonth:g}=P.useMemo(()=>{const E=H5(i,r,{numberOfMonths:e.numberOfMonths},t),S=W5(E,e.endMonth?a(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),M=G5(E,S,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),R=q5(M),I=B5(M),O=K5(i,n,e,t),_=U5(i,r,e,t);return{months:M,weeks:R,days:I,previousMonth:O,nextMonth:_}},[t,i.getTime(),r==null?void 0:r.getTime(),n==null?void 0:n.getTime(),e.disableNavigation,e.broadcastCalendar,(C=e.endMonth)==null?void 0:C.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:b,onMonthChange:h}=e,x=E=>d.some(S=>S.days.some(M=>M.isEqualTo(E))),v=E=>{if(b)return;let S=o(E);n&&S<o(n)&&(S=o(n)),r&&S>o(r)&&(S=o(r)),l(S),h==null||h(S)};return{months:c,weeks:d,days:u,navStart:n,navEnd:r,previousMonth:m,nextMonth:g,goToMonth:v,goToDay:E=>{x(E)||v(E.date)}}}var kn;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(kn||(kn={}));function rm(e){return!e[ft.disabled]&&!e[ft.hidden]&&!e[ft.outside]}function Z5(e,t,n,r){let o,a=-1;for(const s of e){const i=t(s);rm(i)&&(i[ft.focused]&&a<kn.FocusedModifier?(o=s,a=kn.FocusedModifier):r!=null&&r.isEqualTo(s)&&a<kn.LastFocused?(o=s,a=kn.LastFocused):n(s.date)&&a<kn.Selected?(o=s,a=kn.Selected):i[ft.today]&&a<kn.Today&&(o=s,a=kn.Today))}return o||(o=e.find(s=>rm(t(s)))),o}function Q5(e,t,n,r,o,a,s){const{ISOWeek:i,broadcastCalendar:l}=a,{addDays:c,addMonths:d,addWeeks:u,addYears:m,endOfBroadcastWeek:g,endOfISOWeek:b,endOfWeek:h,max:x,min:v,startOfBroadcastWeek:w,startOfISOWeek:y,startOfWeek:C}=s;let S={day:c,week:u,month:d,year:m,startOfWeek:M=>l?w(M,s):i?y(M):C(M),endOfWeek:M=>l?g(M):i?b(M):h(M)}[e](n,t==="after"?1:-1);return t==="before"&&r?S=x([r,S]):t==="after"&&o&&(S=v([o,S])),S}function Dw(e,t,n,r,o,a,s,i=0){if(i>365)return;const l=Q5(e,t,n.date,r,o,a,s),c=!!(a.disabled&&qn(l,a.disabled,s)),d=!!(a.hidden&&qn(l,a.hidden,s)),u=l,m=new xw(l,u,s);return!c&&!d?m:Dw(e,t,m,r,o,a,s,i+1)}function J5(e,t,n,r,o){const{autoFocus:a}=e,[s,i]=P.useState(),l=Z5(t.days,n,r||(()=>!1),s),[c,d]=P.useState(a?l:void 0);return{isFocusTarget:h=>!!(l!=null&&l.isEqualTo(h)),setFocused:d,focused:c,blur:()=>{i(c),d(void 0)},moveFocus:(h,x)=>{if(!c)return;const v=Dw(h,x,c,t.navStart,t.navEnd,e,o);v&&(e.disableNavigation&&!t.days.some(y=>y.isEqualTo(v))||(t.goToDay(v),d(v)))}}}function ej(e,t){const{selected:n,required:r,onSelect:o}=e,[a,s]=fl(n,o?n:void 0),i=o?n:a,{isSameDay:l}=t,c=g=>(i==null?void 0:i.some(b=>l(b,g)))??!1,{min:d,max:u}=e;return{selected:i,select:(g,b,h)=>{let x=[...i??[]];if(c(g)){if((i==null?void 0:i.length)===d||r&&(i==null?void 0:i.length)===1)return;x=i==null?void 0:i.filter(v=>!l(v,g))}else(i==null?void 0:i.length)===u?x=[g]:x=[...x,g];return o||s(x),o==null||o(x,g,b,h),x},isSelected:c}}function tj(e,t,n=0,r=0,o=!1,a=Vn){const{from:s,to:i}=t||{},{isSameDay:l,isAfter:c,isBefore:d}=a;let u;if(!s&&!i)u={from:e,to:n>0?void 0:e};else if(s&&!i)l(s,e)?n===0?u={from:s,to:e}:o?u={from:s,to:void 0}:u=void 0:d(e,s)?u={from:e,to:s}:u={from:s,to:e};else if(s&&i)if(l(s,e)&&l(i,e))o?u={from:s,to:i}:u=void 0;else if(l(s,e))u={from:s,to:n>0?void 0:e};else if(l(i,e))u={from:e,to:n>0?void 0:e};else if(d(e,s))u={from:e,to:i};else if(c(e,s))u={from:s,to:e};else if(c(e,i))u={from:s,to:e};else throw new Error("Invalid range");if(u!=null&&u.from&&(u!=null&&u.to)){const m=a.differenceInCalendarDays(u.to,u.from);r>0&&m>r?u={from:e,to:void 0}:n>1&&m<n&&(u={from:e,to:void 0})}return u}function nj(e,t,n=Vn){const r=Array.isArray(t)?t:[t];let o=e.from;const a=n.differenceInCalendarDays(e.to,e.from),s=Math.min(a,6);for(let i=0;i<=s;i++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function om(e,t,n=Vn){return Kn(e,t.from,!1,n)||Kn(e,t.to,!1,n)||Kn(t,e.from,!1,n)||Kn(t,e.to,!1,n)}function rj(e,t,n=Vn){const r=Array.isArray(t)?t:[t];if(r.filter(i=>typeof i!="function").some(i=>typeof i=="boolean"?i:n.isDate(i)?Kn(e,i,!1,n):Cw(i,n)?i.some(l=>Kn(e,l,!1,n)):dl(i)?i.from&&i.to?om(e,{from:i.from,to:i.to},n):!1:ww(i)?nj(e,i.dayOfWeek,n):Nd(i)?n.isAfter(i.before,i.after)?om(e,{from:n.addDays(i.after,1),to:n.addDays(i.before,-1)},n):qn(e.from,i,n)||qn(e.to,i,n):Td(i)||Id(i)?qn(e.from,i,n)||qn(e.to,i,n):!1))return!0;const s=r.filter(i=>typeof i=="function");if(s.length){let i=e.from;const l=n.differenceInCalendarDays(e.to,e.from);for(let c=0;c<=l;c++){if(s.some(d=>d(i)))return!0;i=n.addDays(i,1)}}return!1}function oj(e,t){const{disabled:n,excludeDisabled:r,resetOnSelect:o,selected:a,required:s,onSelect:i}=e,[l,c]=fl(a,i?a:void 0),d=i?a:l;return{selected:d,select:(g,b,h)=>{const{min:x,max:v}=e;let w;if(g){const y=d==null?void 0:d.from,C=d==null?void 0:d.to,E=!!y&&!!C,S=!!y&&!!C&&t.isSameDay(y,C)&&t.isSameDay(g,y);o&&(E||!(d!=null&&d.from))?!s&&S?w=void 0:w={from:g,to:void 0}:w=tj(g,d,x,v,s,t)}return r&&n&&(w!=null&&w.from)&&w.to&&rj({from:w.from,to:w.to},n,t)&&(w.from=g,w.to=void 0),i||c(w),i==null||i(w,g,b,h),w},isSelected:g=>d&&Kn(d,g,!1,t)}}function aj(e,t){const{selected:n,required:r,onSelect:o}=e,[a,s]=fl(n,o?n:void 0),i=o?n:a,{isSameDay:l}=t;return{selected:i,select:(u,m,g)=>{let b=u;return!r&&i&&i&&l(u,i)&&(b=void 0),o||s(b),o==null||o(b,u,m,g),b},isSelected:u=>i?l(i,u):!1}}function sj(e,t){const n=aj(e,t),r=ej(e,t),o=oj(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function ln(e,t){return e instanceof jt&&e.timeZone===t?e:new jt(e,t)}function vo(e,t,n){return ln(e,t)}function am(e,t,n){return typeof e=="boolean"||typeof e=="function"?e:e instanceof Date?vo(e,t):Array.isArray(e)?e.map(r=>r instanceof Date?vo(r,t):r):dl(e)?{...e,from:e.from?ln(e.from,t):e.from,to:e.to?ln(e.to,t):e.to}:Nd(e)?{before:vo(e.before,t),after:vo(e.after,t)}:Td(e)?{after:vo(e.after,t)}:Id(e)?{before:vo(e.before,t)}:e}function bc(e,t,n){return e&&(Array.isArray(e)?e.map(r=>am(r,t)):am(e,t))}function ij(e){var bt;let t=e;const n=t.timeZone;if(n&&(t={...e,timeZone:n},t.today&&(t.today=ln(t.today,n)),t.month&&(t.month=ln(t.month,n)),t.defaultMonth&&(t.defaultMonth=ln(t.defaultMonth,n)),t.startMonth&&(t.startMonth=ln(t.startMonth,n)),t.endMonth&&(t.endMonth=ln(t.endMonth,n)),t.mode==="single"&&t.selected?t.selected=ln(t.selected,n):t.mode==="multiple"&&t.selected?t.selected=(bt=t.selected)==null?void 0:bt.map(ie=>ln(ie,n)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?ln(t.selected.from,n):t.selected.from,to:t.selected.to?ln(t.selected.to,n):t.selected.to}),t.disabled!==void 0&&(t.disabled=bc(t.disabled,n)),t.hidden!==void 0&&(t.hidden=bc(t.hidden,n)),t.modifiers)){const ie={};Object.keys(t.modifiers).forEach(ye=>{var Se;ie[ye]=bc((Se=t.modifiers)==null?void 0:Se[ye],n)}),t.modifiers=ie}const{components:r,formatters:o,labels:a,dateLib:s,locale:i,classNames:l}=P.useMemo(()=>{const ie={...vw,...t.locale},ye=t.broadcastCalendar?1:t.weekStartsOn,Se=t.noonSafe&&t.timeZone?z5(t.timeZone,{weekStartsOn:ye,locale:ie}):void 0,ee=t.dateLib&&Se?{...Se,...t.dateLib}:t.dateLib??Se,q=new sn({locale:ie,weekStartsOn:ye,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},ee);return{dateLib:q,components:x5(t.components),formatters:N5(t.formatters),labels:_5(t.labels,q.options),locale:ie,classNames:{..._d(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.noonSafe,t.components,t.formatters,t.labels,t.classNames]);t.today||(t={...t,today:s.today()});const{captionLayout:c,mode:d,navLayout:u,numberOfMonths:m=1,onDayBlur:g,onDayClick:b,onDayFocus:h,onDayKeyDown:x,onDayMouseEnter:v,onDayMouseLeave:w,onNextClick:y,onPrevClick:C,showWeekNumber:E,styles:S}=t,{formatCaption:M,formatDay:R,formatMonthDropdown:I,formatWeekNumber:O,formatWeekNumberHeader:_,formatWeekdayName:T,formatYearDropdown:k}=o,j=X5(t,s),{days:V,months:z,navStart:$,navEnd:F,previousMonth:L,nextMonth:D,goToMonth:re}=j,pe=b5(V,t,$,F,s),{isSelected:G,select:B,selected:J}=sj(t,s)??{},{blur:oe,focused:U,isFocusTarget:H,moveFocus:te,setFocused:xe}=J5(t,j,pe,G??(()=>!1),s),{labelDayButton:Re,labelGridcell:Y,labelGrid:we,labelMonthDropdown:he,labelNav:Ne,labelPrevious:Me,labelNext:fe,labelWeekday:Oe,labelWeekNumber:se,labelWeekNumberHeader:Ae,labelYearDropdown:Ke}=a,je=P.useMemo(()=>A5(s,t.ISOWeek,t.broadcastCalendar,t.today),[s,t.ISOWeek,t.broadcastCalendar,t.today]),Pe=d!==void 0||b!==void 0,ae=P.useCallback(()=>{L&&(re(L),C==null||C(L))},[L,re,C]),A=P.useCallback(()=>{D&&(re(D),y==null||y(D))},[re,D,y]),W=P.useCallback((ie,ye)=>Se=>{Se.preventDefault(),Se.stopPropagation(),xe(ie),!ye.disabled&&(B==null||B(ie.date,ye,Se),b==null||b(ie.date,ye,Se))},[B,b,xe]),X=P.useCallback((ie,ye)=>Se=>{xe(ie),h==null||h(ie.date,ye,Se)},[h,xe]),le=P.useCallback((ie,ye)=>Se=>{oe(),g==null||g(ie.date,ye,Se)},[oe,g]),Te=P.useCallback((ie,ye)=>Se=>{const ee={ArrowLeft:[Se.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[Se.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[Se.shiftKey?"year":"week","after"],ArrowUp:[Se.shiftKey?"year":"week","before"],PageUp:[Se.shiftKey?"year":"month","before"],PageDown:[Se.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(ee[Se.key]){Se.preventDefault(),Se.stopPropagation();const[q,We]=ee[Se.key];te(q,We)}x==null||x(ie.date,ye,Se)},[te,x,t.dir]),Le=P.useCallback((ie,ye)=>Se=>{v==null||v(ie.date,ye,Se)},[v]),tt=P.useCallback((ie,ye)=>Se=>{w==null||w(ie.date,ye,Se)},[w]),Fe=P.useCallback((ie,ye)=>Se=>{const ee=Number(Se.target.value),q=s.setMonth(s.startOfMonth(ie),ee);re(s.addMonths(q,-ye))},[s,re]),Ie=P.useCallback((ie,ye)=>Se=>{const ee=Number(Se.target.value),q=s.setYear(s.startOfMonth(ie),ee);re(s.addMonths(q,-ye))},[s,re]),{className:Ze,style:at}=P.useMemo(()=>({className:[l[me.Root],t.className].filter(Boolean).join(" "),style:{...S==null?void 0:S[me.Root],...t.style}}),[l,t.className,t.style,S]),Qt=y5(t),wt=ie=>{const ye=S==null?void 0:S[me.Dropdown],Se=S==null?void 0:S[ie];if(!(!ye&&!Se))return{...ye,...Se}},gt=P.useRef(null);V5(gt,!!t.animate,{classNames:l,months:z,focused:U,dateLib:s});const Qe={dayPickerProps:t,selected:J,select:B,isSelected:G,months:z,nextMonth:D,previousMonth:L,goToMonth:re,getModifiers:pe,components:r,classNames:l,styles:S,labels:a,formatters:o};return P.createElement(yw.Provider,{value:Qe},P.createElement(r.Root,{rootRef:t.animate?gt:void 0,className:Ze,style:at,dir:t.dir,id:t.id,lang:t.lang??i.code,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],"aria-labelledby":t["aria-labelledby"],...Qt},P.createElement(r.Months,{className:l[me.Months],style:S==null?void 0:S[me.Months]},!t.hideNavigation&&!u&&P.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[me.Nav],style:S==null?void 0:S[me.Nav],"aria-label":Ne(),onPreviousClick:ae,onNextClick:A,previousMonth:L,nextMonth:D}),z.map((ie,ye)=>{const Se=t.reverseMonths?z.length-1-ye:ye;return P.createElement(r.Month,{"data-animated-month":t.animate?"true":void 0,className:l[me.Month],style:S==null?void 0:S[me.Month],key:ye,displayIndex:ye,calendarMonth:ie},u==="around"&&!t.hideNavigation&&ye===0&&P.createElement(r.PreviousMonthButton,{type:"button",className:l[me.PreviousMonthButton],style:S==null?void 0:S[me.PreviousMonthButton],tabIndex:L?void 0:-1,"aria-disabled":L?void 0:!0,"aria-label":Me(L),onClick:ae,"data-animated-button":t.animate?"true":void 0},P.createElement(r.Chevron,{disabled:L?void 0:!0,className:l[me.Chevron],style:S==null?void 0:S[me.Chevron],orientation:t.dir==="rtl"?"right":"left"})),P.createElement(r.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:l[me.MonthCaption],style:S==null?void 0:S[me.MonthCaption],calendarMonth:ie,displayIndex:ye},c!=null&&c.startsWith("dropdown")?P.createElement(r.DropdownNav,{className:l[me.Dropdowns],style:S==null?void 0:S[me.Dropdowns]},(()=>{const ee=c==="dropdown"||c==="dropdown-months"?P.createElement(r.MonthsDropdown,{key:"month",className:l[me.MonthsDropdown],"aria-label":he(),disabled:!!t.disableNavigation,onChange:Fe(ie.date,Se),options:O5(ie.date,$,F,o,s),style:wt(me.MonthsDropdown),value:s.getMonth(ie.date)}):P.createElement("span",{key:"month"},I(ie.date,s)),q=c==="dropdown"||c==="dropdown-years"?P.createElement(r.YearsDropdown,{key:"year",className:l[me.YearsDropdown],"aria-label":Ke(s.options),disabled:!!t.disableNavigation,onChange:Ie(ie.date,Se),options:j5($,F,o,s,!!t.reverseYears),style:wt(me.YearsDropdown),value:s.getYear(ie.date)}):P.createElement("span",{key:"year"},k(ie.date,s));return s.getMonthYearOrder()==="year-first"?[q,ee]:[ee,q]})(),P.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},M(ie.date,s.options,s))):P.createElement(r.CaptionLabel,{className:l[me.CaptionLabel],style:S==null?void 0:S[me.CaptionLabel],role:"status","aria-live":"polite"},M(ie.date,s.options,s))),u==="around"&&!t.hideNavigation&&ye===m-1&&P.createElement(r.NextMonthButton,{type:"button",className:l[me.NextMonthButton],style:S==null?void 0:S[me.NextMonthButton],tabIndex:D?void 0:-1,"aria-disabled":D?void 0:!0,"aria-label":fe(D),onClick:A,"data-animated-button":t.animate?"true":void 0},P.createElement(r.Chevron,{disabled:D?void 0:!0,className:l[me.Chevron],style:S==null?void 0:S[me.Chevron],orientation:t.dir==="rtl"?"left":"right"})),ye===m-1&&u==="after"&&!t.hideNavigation&&P.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[me.Nav],style:S==null?void 0:S[me.Nav],"aria-label":Ne(),onPreviousClick:ae,onNextClick:A,previousMonth:L,nextMonth:D}),P.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":d==="multiple"||d==="range","aria-label":we(ie.date,s.options,s)||void 0,className:l[me.MonthGrid],style:S==null?void 0:S[me.MonthGrid]},!t.hideWeekdays&&P.createElement(r.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:l[me.Weekdays],style:S==null?void 0:S[me.Weekdays]},E&&P.createElement(r.WeekNumberHeader,{"aria-label":Ae(s.options),className:l[me.WeekNumberHeader],style:S==null?void 0:S[me.WeekNumberHeader],scope:"col"},_()),je.map(ee=>P.createElement(r.Weekday,{"aria-label":Oe(ee,s.options,s),className:l[me.Weekday],key:String(ee),style:S==null?void 0:S[me.Weekday],scope:"col"},T(ee,s.options,s)))),P.createElement(r.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:l[me.Weeks],style:S==null?void 0:S[me.Weeks]},ie.weeks.map(ee=>P.createElement(r.Week,{className:l[me.Week],key:ee.weekNumber,style:S==null?void 0:S[me.Week],week:ee},E&&P.createElement(r.WeekNumber,{week:ee,style:S==null?void 0:S[me.WeekNumber],"aria-label":se(ee.weekNumber,{locale:i}),className:l[me.WeekNumber],scope:"row",role:"rowheader"},O(ee.weekNumber,s)),ee.days.map(q=>{const{date:We}=q,Ee=pe(q);if(Ee[ft.focused]=!Ee.hidden&&!!(U!=null&&U.isEqualTo(q)),Ee[yn.selected]=(G==null?void 0:G(We))||Ee.selected,dl(J)){const{from:qe,to:vt}=J;Ee[yn.range_start]=!!(qe&&vt&&s.isSameDay(We,qe)),Ee[yn.range_end]=!!(qe&&vt&&s.isSameDay(We,vt)),Ee[yn.range_middle]=Kn(J,We,!0,s)}const Dt=D5(Ee,S,t.modifiersStyles),Ve=v5(Ee,l,t.modifiersClassNames),Ct=!Pe&&!Ee.hidden?Y(We,Ee,s.options,s):void 0;return P.createElement(r.Day,{key:`${q.isoDate}_${q.displayMonthId}`,day:q,modifiers:Ee,className:Ve.join(" "),style:Dt,role:"gridcell","aria-selected":Ee.selected||void 0,"aria-label":Ct,"data-day":q.isoDate,"data-month":q.outside?q.dateMonthId:void 0,"data-selected":Ee.selected||void 0,"data-disabled":Ee.disabled||void 0,"data-hidden":Ee.hidden||void 0,"data-outside":q.outside||void 0,"data-focused":Ee.focused||void 0,"data-today":Ee.today||void 0},!Ee.hidden&&Pe?P.createElement(r.DayButton,{className:l[me.DayButton],style:S==null?void 0:S[me.DayButton],type:"button",day:q,modifiers:Ee,disabled:!Ee.focused&&Ee.disabled||void 0,"aria-disabled":Ee.focused&&Ee.disabled||void 0,tabIndex:H(q)?0:-1,"aria-label":Re(We,Ee,s.options,s),onClick:W(q,Ee),onBlur:le(q,Ee),onFocus:X(q,Ee),onKeyDown:Te(q,Ee),onMouseEnter:Le(q,Ee),onMouseLeave:tt(q,Ee)},R(We,s.options,s)):!Ee.hidden&&R(q.date,s.options,s))}))))))})),t.footer&&P.createElement(r.Footer,{className:l[me.Footer],style:S==null?void 0:S[me.Footer],role:"status","aria-live":"polite"},t.footer)))}function Aw({className:e,classNames:t,showOutsideDays:n=!0,captionLayout:r="label",buttonVariant:o="ghost",formatters:a,components:s,...i}){const l=_d();return p.jsx(ij,{showOutsideDays:n,className:N("group/calendar bg-background p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:r,formatters:{formatMonthDropdown:c=>c.toLocaleString("default",{month:"short"}),...a},classNames:{root:N("w-fit",l.root),months:N("relative flex flex-col gap-4 md:flex-row",l.months),month:N("flex w-full flex-col gap-4",l.month),nav:N("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",l.nav),button_previous:N(Ca({variant:o}),"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",l.button_previous),button_next:N(Ca({variant:o}),"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",l.button_next),month_caption:N("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",l.month_caption),dropdowns:N("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",l.dropdowns),dropdown_root:N("relative rounded-md border border-input shadow-xs has-focus:border-ring has-focus:ring-[3px] has-focus:ring-ring/50",l.dropdown_root),dropdown:N("absolute inset-0 bg-popover opacity-0",l.dropdown),caption_label:N("font-medium select-none",r==="label"?"text-sm":"flex h-8 items-center gap-1 rounded-md pr-1 pl-2 text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground",l.caption_label),weekdays:N("flex",l.weekdays),weekday:N("flex-1 rounded-md text-[0.8rem] font-normal text-muted-foreground select-none",l.weekday),week:N("mt-2 flex w-full",l.week),week_number_header:N("w-(--cell-size) select-none",l.week_number_header),week_number:N("text-[0.8rem] text-muted-foreground select-none",l.week_number),day:N("group/day relative aspect-square h-full w-full p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-md",i.showWeekNumber?"[&:nth-child(2)[data-selected=true]_button]:rounded-l-md":"[&:first-child[data-selected=true]_button]:rounded-l-md",l.day),range_start:N("rounded-l-md bg-accent",l.range_start),range_middle:N("rounded-none",l.range_middle),range_end:N("rounded-r-md bg-accent",l.range_end),today:N("rounded-md bg-accent text-accent-foreground data-[selected=true]:rounded-none",l.today),outside:N("text-muted-foreground aria-selected:text-muted-foreground",l.outside),disabled:N("text-muted-foreground opacity-50",l.disabled),hidden:N("invisible",l.hidden),...t},components:{Root:({className:c,rootRef:d,...u})=>p.jsx("div",{"data-slot":"calendar",ref:d,className:N(c),...u}),Chevron:({className:c,orientation:d,...u})=>d==="left"?p.jsx(Vy,{className:N("size-4",c),...u}):d==="right"?p.jsx(Ka,{className:N("size-4",c),...u}):p.jsx(il,{className:N("size-4",c),...u}),DayButton:jw,WeekNumber:({children:c,...d})=>p.jsx("td",{...d,children:p.jsx("div",{className:"flex size-(--cell-size) items-center justify-center text-center",children:c})}),...s},...i})}function jw({className:e,day:t,modifiers:n,...r}){const o=_d(),a=f.useRef(null);return f.useEffect(()=>{var s;n.focused&&((s=a.current)==null||s.focus())},[n.focused]),p.jsx(Fn,{ref:a,variant:"ghost",size:"icon","data-day":t.date.toLocaleDateString(),"data-selected-single":n.selected&&!n.range_start&&!n.range_end&&!n.range_middle,"data-range-start":n.range_start,"data-range-end":n.range_end,"data-range-middle":n.range_middle,className:N("flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70",o.day,e),...r})}function lj({...e}){return p.jsx(fR,{"data-slot":"collapsible",...e})}function cj({...e}){return p.jsx(ug,{"data-slot":"collapsible-trigger",...e})}function uj({...e}){return p.jsx(dg,{"data-slot":"collapsible-content",...e})}let ou;process.env.NODE_ENV!=="production"&&(ou=new Set);function ii(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");ou.has(t)||(ou.add(t),console.error(`Base UI: ${t}`))}}function vc({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=f.useRef(e!==void 0),[a,s]=f.useState(t),i=o?e:a;if(process.env.NODE_ENV!=="production"){f.useEffect(()=>{o!==(e!==void 0)&&ii([`A component is changing the ${o?"":"un"}controlled ${r} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
|
160
|
+
`))},[r,n,e]);const{current:c}=f.useRef(t);f.useEffect(()=>{!o&&sm(c)!==sm(t)&&ii([`A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
|
|
161
|
+
`))},[t])}const l=f.useCallback(c=>{o||s(c)},[]);return[i,l]}function sm(e){let t=0;const n=new WeakMap;try{return JSON.stringify(e,function(a,s){if(!(a==="_owner"&&this!=null&&typeof this=="object"&&"$$typeof"in this)){if(typeof s=="bigint")return`__bigint__:${s}`;if(s!==null&&typeof s=="object"){const i=n.get(s);if(i!==void 0)return`__object__:${i}`;n.set(s,t),t+=1}return s}})??`__top__:${typeof e}`}catch{return"__unserializable__"}}const Yn={...f},im={};function fn(e,t){const n=f.useRef(im);return n.current===im&&(n.current=e(t)),n}const xc=Yn.useInsertionEffect,dj=xc&&xc!==Yn.useLayoutEffect?xc:e=>e();function De(e){const t=fn(fj).current;return t.next=e,dj(t.effect),t.trampoline}function fj(){const e={next:void 0,callback:pj,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function pj(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}const mj=()=>{},ke=typeof document<"u"?f.useLayoutEffect:mj;let au;process.env.NODE_ENV!=="production"&&(au=new Set);function hj(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");au.has(t)||(au.add(t),console.warn(`Base UI: ${t}`))}}const Od=f.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});process.env.NODE_ENV!=="production"&&(Od.displayName="CompositeListContext");function gj(){return f.useContext(Od)}function zw(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,a=De(o),s=f.useRef(0),i=fn(vj).current,l=fn(bj).current,[c,d]=f.useState(0),u=f.useRef(c),m=De((v,w)=>{l.set(v,w??null),u.current+=1,d(u.current)}),g=De(v=>{l.delete(v),u.current+=1,d(u.current)}),b=f.useMemo(()=>{const v=new Map;return Array.from(l.keys()).filter(y=>y.isConnected).sort(xj).forEach((y,C)=>{const E=l.get(y)??{};v.set(y,{...E,index:C})}),v},[l,c]);ke(()=>{if(typeof MutationObserver!="function"||b.size===0)return;const v=new MutationObserver(w=>{const y=new Set,C=E=>y.has(E)?y.delete(E):y.add(E);w.forEach(E=>{E.removedNodes.forEach(C),E.addedNodes.forEach(C)}),y.size===0&&(u.current+=1,d(u.current))});return b.forEach((w,y)=>{y.parentElement&&v.observe(y.parentElement,{childList:!0})}),()=>{v.disconnect()}},[b]),ke(()=>{u.current===c&&(n.current.length!==b.size&&(n.current.length=b.size),r&&r.current.length!==b.size&&(r.current.length=b.size),s.current=b.size),a(b)},[a,b,n,r,c]),ke(()=>()=>{n.current=[]},[n]),ke(()=>()=>{r&&(r.current=[])},[r]);const h=De(v=>(i.add(v),()=>{i.delete(v)}));ke(()=>{i.forEach(v=>v(b))},[i,b]);const x=f.useMemo(()=>({register:m,unregister:g,subscribeMapChange:h,elementsRef:n,labelsRef:r,nextIndexRef:s}),[m,g,h,n,r,s]);return p.jsx(Od.Provider,{value:x,children:t})}function bj(){return new Map}function vj(){return new Set}function xj(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const $w=f.createContext(void 0);process.env.NODE_ENV!=="production"&&($w.displayName="DirectionContext");function pl(){const e=f.useContext($w);return(e==null?void 0:e.direction)??"ltr"}function yj(e,t){return function(r,...o){const a=new URL(e);return a.searchParams.set("code",r.toString()),o.forEach(s=>a.searchParams.append("args[]",s)),`${t} error #${r}; visit ${a} for the full message.`}}const mn=yj("https://base-ui.com/production-error","Base UI");function Lo(e,t,n,r){const o=fn(Lw).current;return Cj(o,e,t,n,r)&&Fw(o,[e,t,n,r]),o.callback}function wj(e){const t=fn(Lw).current;return Sj(t,e)&&Fw(t,e),t.callback}function Lw(){return{callback:null,cleanup:null,refs:[]}}function Cj(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function Sj(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function Fw(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const a=t[o];if(a!=null)switch(typeof a){case"function":{const s=a(n);typeof s=="function"&&(r[o]=s);break}case"object":{a.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const a=t[o];if(a!=null)switch(typeof a){case"function":{const s=r[o];typeof s=="function"?s():a(null);break}case"object":{a.current=null;break}}}}}}}const Ej=parseInt(f.version,10);function Dd(e){return Ej>=e}function lm(e){if(!f.isValidElement(e))return null;const t=e,n=t.props;return(Dd(19)?n==null?void 0:n.ref:t.ref)??null}function su(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function st(){}const ys=Object.freeze([]),Ht=Object.freeze({});function Mj(e,t){const n={};for(const r in e){const o=e[r];if(t!=null&&t.hasOwnProperty(r)){const a=t[r](o);a!=null&&Object.assign(n,a);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function Rj(e,t){return typeof e=="function"?e(t):e}function kj(e,t){return typeof e=="function"?e(t):e}const Ad={};function Ma(e,t,n,r,o){if(!n&&!r&&!e)return li(t);let a=li(e);return t&&(a=zs(a,t)),n&&(a=zs(a,n)),r&&(a=zs(a,r)),a}function Pj(e){if(e.length===0)return Ad;if(e.length===1)return li(e[0]);let t=li(e[0]);for(let n=1;n<e.length;n+=1)t=zs(t,e[n]);return t}function li(e){return jd(e)?{...Ww(e,Ad)}:Nj(e)}function zs(e,t){return jd(t)?Ww(t,e):Tj(e,t)}function Nj(e){const t={...e};for(const n in t){const r=t[n];Vw(n,r)&&(t[n]=Bw(r))}return t}function Tj(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=su(e.style,r);break}case"className":{e[n]=Hw(e.className,r);break}default:Vw(n,r)?e[n]=Ij(e[n],r):e[n]=r}}return e}function Vw(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function jd(e){return typeof e=="function"}function Ww(e,t){return jd(e)?e(t):e??Ad}function Ij(e,t){return t?e?(...n)=>{const r=n[0];if(Gw(r)){const a=r;ci(a);const s=t(...n);return a.baseUIHandlerPrevented||e==null||e(...n),s}const o=t(...n);return e==null||e(...n),o}:Bw(t):e}function Bw(e){return e&&((...t)=>{const n=t[0];return Gw(n)&&ci(n),e(...t)})}function ci(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Hw(e,t){return t?e?t+" "+e:t:e}function Gw(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Vt(e,t,n={}){const r=t.render,o=_j(t,n);if(n.enabled===!1)return null;const a=n.state??Ht;return zj(e,r,o,a)}function _j(e,t={}){const{className:n,style:r,render:o}=e,{state:a=Ht,ref:s,props:i,stateAttributesMapping:l,enabled:c=!0}=t,d=c?Rj(n,a):void 0,u=c?kj(r,a):void 0,m=c?Mj(a,l):Ht,g=c&&i?Oj(i):void 0,b=c?su(m,g)??{}:Ht;return typeof document<"u"&&(c?Array.isArray(s)?b.ref=wj([b.ref,lm(o),...s]):b.ref=Lo(b.ref,lm(o),s):Lo(null,null)),c?(d!==void 0&&(b.className=Hw(b.className,d)),u!==void 0&&(b.style=su(b.style,u)),b):Ht}function Oj(e){return Array.isArray(e)?Pj(e):Ma(void 0,e)}const Dj=Symbol.for("react.lazy"),Aj=/^[A-Z][A-Za-z0-9$]*$/,jj=/[a-z]/;function zj(e,t,n,r){if(t){if(typeof t=="function")return process.env.NODE_ENV!=="production"&&$j(t),t(n,r);const o=Ma(n,t.props);o.ref=n.ref;let a=t;if((a==null?void 0:a.$$typeof)===Dj&&(a=f.Children.toArray(t)[0]),process.env.NODE_ENV!=="production"&&!f.isValidElement(a))throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.","A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.","https://base-ui.com/r/invalid-render-prop"].join(`
|
|
162
|
+
`));return f.cloneElement(a,o)}if(e&&typeof e=="string")return Lj(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":mn(8))}function $j(e){const t=e.name;t.length!==0&&Aj.test(t)&&jj.test(t)&&hj(`The \`render\` prop received a function named \`${t}\` that starts with an uppercase letter.`,"This usually means a React component was passed directly as `render={Component}`.","Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.","If this is an intentional render callback, rename it to start with a lowercase letter.","Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.","https://base-ui.com/r/invalid-render-prop")}function Lj(e,t){return e==="button"?P.createElement("button",{type:"button",...t,key:t.key}):e==="img"?P.createElement("img",{alt:"",...t,key:t.key}):f.createElement(e,t)}const xn="none",Yw="trigger-press",Fj="trigger-hover",zd="outside-press",Vj="item-press",Wj="close-press",cm="clear-press",Bj="chip-remove-press",Co="input-change",Gn="input-clear",Uw="input-press",ml="focus-out",Kw="escape-key",ui="list-navigation";function Ge(e,t,n,r){let o=!1,a=!1;const s=Ht;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){a=!0},get isCanceled(){return o},get isPropagationAllowed(){return a},trigger:n,...s}}function ra(e,t,n){const r=n??Ht;return{reason:e,event:t??new Event("base-ui"),...r}}let um=0;function Hj(e,t="mui"){const[n,r]=f.useState(e),o=e||n;return f.useEffect(()=>{n==null&&(um+=1,r(`${t}-${um}`))},[n,t]),o}const dm=Yn.useId;function $d(e,t){if(dm!==void 0){const n=dm();return e??(t?`${t}-${n}`:n)}return Hj(e,t)}function Ld(e){return $d(e,"base-ui")}const Gj=[];function qw(e){f.useEffect(e,Gj)}const ws=null;let fm=globalThis.requestAnimationFrame;class Yj{constructor(){lt(this,"callbacks",[]);lt(this,"callbacksCount",0);lt(this,"nextId",1);lt(this,"startId",1);lt(this,"isScheduled",!1);lt(this,"tick",t=>{var o;this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let a=0;a<n.length;a+=1)(o=n[a])==null||o.call(n,t)})}request(t){const n=this.nextId;this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1;const r=process.env.NODE_ENV!=="production"&&fm!==requestAnimationFrame&&(fm=requestAnimationFrame,!0);return(!this.isScheduled||r)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const Cs=new Yj;class Nn{constructor(){lt(this,"currentId",ws);lt(this,"cancel",()=>{this.currentId!==ws&&(Cs.cancel(this.currentId),this.currentId=ws)});lt(this,"disposeEffect",()=>this.cancel)}static create(){return new Nn}static request(t){return Cs.request(t)}static cancel(t){return Cs.cancel(t)}request(t){this.cancel(),this.currentId=Cs.request(()=>{this.currentId=ws,t()})}}function Ra(){const e=fn(Nn.create).current;return qw(e.disposeEffect),e}function Fd(e,t=!1,n=!1){const[r,o]=f.useState(e&&t?"idle":void 0),[a,s]=f.useState(e);return e&&!a&&(s(!0),o("starting")),!e&&a&&r!=="ending"&&!n&&o("ending"),!e&&!a&&r==="ending"&&o(void 0),ke(()=>{if(!e&&a&&r!=="ending"&&n){const i=Nn.request(()=>{o("ending")});return()=>{Nn.cancel(i)}}},[e,a,r,n]),ke(()=>{if(!e||t)return;const i=Nn.request(()=>{o(void 0)});return()=>{Nn.cancel(i)}},[t,e]),ke(()=>{if(!e||!t)return;e&&a&&r!=="idle"&&o("starting");const i=Nn.request(()=>{o("idle")});return()=>{Nn.cancel(i)}},[t,e,a,r]),{mounted:a,setMounted:s,transitionStatus:r}}let Xw=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function Zw(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:a}=e,{register:s,unregister:i,subscribeMapChange:l,elementsRef:c,labelsRef:d,nextIndexRef:u}=gj(),m=f.useRef(-1),[g,b]=f.useState(a??(o===Xw.GuessFromOrder?()=>{if(m.current===-1){const v=u.current;u.current+=1,m.current=v}return m.current}:-1)),h=f.useRef(null),x=f.useCallback(v=>{var w;if(h.current=v,g!==-1&&v!==null&&(c.current[g]=v,d)){const y=t!==void 0;d.current[g]=y?t:((w=r==null?void 0:r.current)==null?void 0:w.textContent)??v.textContent}},[g,c,d,t,r]);return ke(()=>{if(a!=null)return;const v=h.current;if(v)return s(v,n),()=>{i(v)}},[a,s,i,n]),ke(()=>{if(a==null)return l(v=>{var y;const w=h.current?(y=v.get(h.current))==null?void 0:y.index:null;w!=null&&b(w)})},[a,l,b]),f.useMemo(()=>({ref:x,index:g}),[g,x])}let ka=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const Uj={[ka.startingStyle]:""},Kj={[ka.endingStyle]:""},Vd={transitionStatus(e){return e==="starting"?Uj:e==="ending"?Kj:null}},Qw=f.createContext(void 0);process.env.NODE_ENV!=="production"&&(Qw.displayName="CompositeRootContext");function qj(e=!1){const t=f.useContext(Qw);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":mn(16));return t}function Xj(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:a}=e,s=r&&t!==!1,i=r&&t===!1;return{props:f.useMemo(()=>{const c={onKeyDown(d){n&&t&&d.key!=="Tab"&&d.preventDefault()}};return r||(c.tabIndex=o,!a&&n&&(c.tabIndex=t?o:-1)),(a&&(t||s)||!a&&n)&&(c["aria-disabled"]=n),a&&(!t||i)&&(c.disabled=n),c},[r,n,t,s,i,a,o])}}function Za(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0,composite:a}=e,s=f.useRef(null),i=qj(!0),l=a??i!==void 0,{props:c}=Xj({focusableWhenDisabled:n,disabled:t,composite:l,tabIndex:r,isNativeButton:o});process.env.NODE_ENV!=="production"&&f.useEffect(()=>{var b,h;if(!s.current)return;const g=Ss(s.current);if(o){if(!g){const x=((b=Yn.captureOwnerStack)==null?void 0:b.call(Yn))||"";ii(`A component that acts as a button expected a native <button> because the \`nativeButton\` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the \`render\` prop, or set \`nativeButton\` to \`false\`.${x}`)}}else if(g){const x=((h=Yn.captureOwnerStack)==null?void 0:h.call(Yn))||"";ii(`A component that acts as a button expected a non-<button> because the \`nativeButton\` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as \`role\` or \`aria-disabled\`). Use a non-<button> in the \`render\` prop, or set \`nativeButton\` to \`true\`.${x}`)}},[o]);const d=f.useCallback(()=>{const g=s.current;Ss(g)&&l&&t&&c.disabled===void 0&&g.disabled&&(g.disabled=!1)},[t,c.disabled,l]);ke(d,[d]);const u=f.useCallback((g={})=>{const{onClick:b,onMouseDown:h,onKeyUp:x,onKeyDown:v,onPointerDown:w,...y}=g;return Ma({onClick(C){if(t){C.preventDefault();return}b==null||b(C)},onMouseDown(C){t||h==null||h(C)},onKeyDown(C){if(t||(ci(C),v==null||v(C),C.baseUIHandlerPrevented))return;const E=C.target===C.currentTarget,S=C.currentTarget,M=Ss(S),R=!o&&Zj(S),I=E&&(o?M:!R),O=C.key==="Enter",_=C.key===" ",T=S.getAttribute("role"),k=(T==null?void 0:T.startsWith("menuitem"))||T==="option"||T==="gridcell";if(E&&l&&_){if(C.defaultPrevented&&k)return;C.preventDefault(),R||o&&M?(S.click(),C.preventBaseUIHandler()):I&&(b==null||b(C),C.preventBaseUIHandler());return}I&&(!o&&(_||O)&&C.preventDefault(),!o&&O&&(b==null||b(C)))},onKeyUp(C){if(!t){if(ci(C),x==null||x(C),C.target===C.currentTarget&&o&&l&&Ss(C.currentTarget)&&C.key===" "){C.preventDefault();return}C.baseUIHandlerPrevented||C.target===C.currentTarget&&!o&&!l&&C.key===" "&&(b==null||b(C))}},onPointerDown(C){if(t){C.preventDefault();return}w==null||w(C)}},o?{type:"button"}:{role:"button"},c,y)},[t,c,l,o]),m=De(g=>{s.current=g,d()});return{getButtonProps:u,buttonRef:m}}function Ss(e){return ct(e)&&e.tagName==="BUTTON"}function Zj(e){return!!((e==null?void 0:e.tagName)==="A"&&(e!=null&&e.href))}const so=typeof navigator<"u",yc=e4(),Jw=n4(),Wd=t4(),e1=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),Bd=yc.platform==="MacIntel"&&yc.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(yc.platform),pm=so&&/firefox/i.test(Wd),Qj=so&&/apple/i.test(navigator.vendor),di=so&&/android/i.test(Jw)||/android/i.test(Wd);so&&Jw.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const Jj=Wd.includes("jsdom/");function e4(){if(!so)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e!=null&&e.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function t4(){if(!so)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function n4(){if(!so)return"";const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform??""}const iu="data-base-ui-focusable",t1="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",pr="ArrowLeft",mr="ArrowRight",Hd="ArrowUp",Qa="ArrowDown";function cn(e){var n;let t=e.activeElement;for(;((n=t==null?void 0:t.shadowRoot)==null?void 0:n.activeElement)!=null;)t=t.shadowRoot.activeElement;return t}function He(e,t){var r;if(!e||!t)return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e.contains(t))return!0;if(n&&Do(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function qt(e){return"composedPath"in e?e.composedPath()[0]:e.target}function wc(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function r4(e){return e.matches("html,body")}function Gd(e){return ct(e)&&e.matches(t1)}function o4(e){return(e==null?void 0:e.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${t1}`))!=null}function lu(e){return e?e.getAttribute("role")==="combobox"&&Gd(e):!1}function cu(e){return e?e.hasAttribute(iu)?e:e.querySelector(`[${iu}]`)||e:null}function Pa(e,t,n=!0){return e.filter(o=>o.parentId===t).flatMap(o=>{var a;return[...!n||(a=o.context)!=null&&a.open?[o]:[],...Pa(e,o.id,n)]})}function mm(e,t){var o;let n=[],r=(o=e.find(a=>a.id===t))==null?void 0:o.parentId;for(;r;){const a=e.find(s=>s.id===r);r=a==null?void 0:a.parentId,a&&(n=n.concat(a))}return n}function pt(e){e.preventDefault(),e.stopPropagation()}function a4(e){return"nativeEvent"in e}function n1(e){return e.pointerType===""&&e.isTrusted?!0:di&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function r1(e){return Jj?!1:!di&&e.width===0&&e.height===0||di&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function hm(e,t){return["mouse","pen"].includes(e)}function s4(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}function Es(e,t,n){return Math.floor(e/t)!==n}function fi(e,t){return t<0||t>=e.length}function Cc(e,t){return Wt(e.current,{disabledIndices:t})}function gm(e,t){return Wt(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Wt(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:o=1}={}){let a=t;do a+=n?-o:o;while(a>=0&&a<=e.length-1&&No(e,a,r));return a}function i4(e,{event:t,orientation:n,loopFocus:r,onLoop:o,rtl:a,cols:s,disabledIndices:i,minIndex:l,maxIndex:c,prevIndex:d,stopEvent:u=!1}){let m=d,g;if(t.key===Hd?g="up":t.key===Qa&&(g="down"),g){const b=[],h=[];let x=!1,v=0;{let I=null,O=-1;e.forEach((_,T)=>{if(_==null)return;v+=1;const k=_.closest('[role="row"]');k&&(x=!0),(k!==I||O===-1)&&(I=k,O+=1,b[O]=[]),b[O].push(T),h[T]=O})}let w=!1,y=0;if(x)for(const I of b){const O=I.length;O>y&&(y=O),O!==s&&(w=!0)}const C=w&&v<e.length,E=y||s,S=I=>{if(!w||d===-1)return;const O=h[d];if(O==null)return;const _=b[O].indexOf(d),T=I==="up"?-1:1;for(let k=O+T,j=0;j<b.length;j+=1,k+=T){if(k<0||k>=b.length){if(!r||C)return;if(k=k<0?b.length-1:0,o){const z=Math.min(_,b[k].length-1),$=b[k][z]??b[k][0],F=o(t,d,$);k=h[F]??k}}const V=b[k];for(let z=Math.min(_,V.length-1);z>=0;z-=1){const $=V[z];if(!No(e,$,i))return $}}},M=I=>{if(!C||d===-1)return;const O=d%E,_=I==="up"?-E:E,T=c-c%E,k=Wr(c/E)+1;for(let j=d-O+_,V=0;V<k;V+=1,j+=_){if(j<0||j>c){if(!r)return;j=j<0?T:0}const z=Math.min(j+E-1,c);for(let $=Math.min(j+O,z);$>=j;$-=1)if(!No(e,$,i))return $}};u&&pt(t);const R=S(g)??M(g);if(R!==void 0)m=R;else if(d===-1)m=g==="up"?c:l;else if(m=Wt(e,{startingIndex:d,amount:E,decrement:g==="up",disabledIndices:i}),r){if(g==="up"&&(d-E<l||m<0)){const I=d%E,O=c%E,_=c-(O-I);O===I?m=c:m=O>I?_:_-E,o&&(m=o(t,d,m))}g==="down"&&d+E>c&&(m=Wt(e,{startingIndex:d%E-E,amount:E,disabledIndices:i}),o&&(m=o(t,d,m)))}fi(e,m)&&(m=d)}if(n==="both"){const b=Wr(d/s);t.key===(a?pr:mr)&&(u&&pt(t),d%s!==s-1?(m=Wt(e,{startingIndex:d,disabledIndices:i}),r&&Es(m,s,b)&&(m=Wt(e,{startingIndex:d-d%s-1,disabledIndices:i}),o&&(m=o(t,d,m)))):r&&(m=Wt(e,{startingIndex:d-d%s-1,disabledIndices:i}),o&&(m=o(t,d,m))),Es(m,s,b)&&(m=d)),t.key===(a?mr:pr)&&(u&&pt(t),d%s!==0?(m=Wt(e,{startingIndex:d,decrement:!0,disabledIndices:i}),r&&Es(m,s,b)&&(m=Wt(e,{startingIndex:d+(s-d%s),decrement:!0,disabledIndices:i}),o&&(m=o(t,d,m)))):r&&(m=Wt(e,{startingIndex:d+(s-d%s),decrement:!0,disabledIndices:i}),o&&(m=o(t,d,m))),Es(m,s,b)&&(m=d));const h=Wr(c/s)===b;fi(e,m)&&(r&&h?(m=t.key===(a?mr:pr)?c:Wt(e,{startingIndex:d-d%s-1,disabledIndices:i}),o&&(m=o(t,d,m))):m=d)}return m}function l4(e,t,n){const r=[];let o=0;return e.forEach(({width:a,height:s},i)=>{if(a>t&&process.env.NODE_ENV!=="production")throw new Error(`[Floating UI]: Invalid grid - item width at index ${i} is greater than grid columns`);let l=!1;for(;!l;){const c=[];for(let d=0;d<a;d+=1)for(let u=0;u<s;u+=1)c.push(o+d+u*t);o%t+a<=t&&c.every(d=>r[d]==null)?(c.forEach(d=>{r[d]=i}),l=!0):o+=1}}),[...r]}function c4(e,t,n,r,o){if(e===-1)return-1;const a=n.indexOf(e),s=t[e];switch(o){case"tl":return a;case"tr":return s?a+s.width-1:a;case"bl":return s?a+(s.height-1)*r:a;case"br":return n.lastIndexOf(e);default:return-1}}function u4(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function No(e,t,n){if(typeof n=="function"?n(t):(n==null?void 0:n.includes(t))??!1)return!0;const o=e[t];return o?hl(o)?!n&&(o.hasAttribute("disabled")||o.getAttribute("aria-disabled")==="true"):!0:!1}function d4(e){return e.visibility==="hidden"||e.visibility==="collapse"}function hl(e,t=e?Xt(e):null){return!e||!e.isConnected||!t||d4(t)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():t.display!=="none"&&t.display!=="contents"}function it(e){return(e==null?void 0:e.ownerDocument)||document}const f4='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function p4(e){const t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;const n=e.getRootNode();return Do(n)?n.host:null}function uu(e){for(const t of Array.from(e.children))if(zt(t)==="summary")return t;return null}function m4(e,t){const n=uu(t);return!!n&&(e===n||He(n,e))}function o1(e){const t=e?zt(e):"";return e!=null&&e.matches(f4)&&(t!=="summary"||e.parentElement!=null&&zt(e.parentElement)==="details"&&uu(e.parentElement)===e)&&(t!=="details"||uu(e)==null)&&(t!=="input"||e.type!=="hidden")}function a1(e){if(!o1(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=p4(t)){const n=t!==e,r=zt(t)==="slot";if(t.hasAttribute("inert")||n&&zt(t)==="details"&&!t.open&&!m4(e,t)||t.hasAttribute("hidden")||!r&&!h4(t,n))return!1}return!0}function h4(e,t){const n=Xt(e);return t?n.display!=="none":hl(e,n)}function s1(e){const t=e.tabIndex;if(t<0){const n=zt(e);if(n==="details"||n==="audio"||n==="video"||ct(e)&&e.isContentEditable)return 0}return t}function Sc(e){if(zt(e)!=="input")return null;const t=e;return t.type==="radio"&&t.name!==""?t:null}function g4(e,t){const n=Sc(e);if(!n)return!0;const r=t.find(o=>{const a=Sc(o);return(a==null?void 0:a.name)===n.name&&a.form===n.form&&a.checked});return r?r===n:t.find(o=>{const a=Sc(o);return(a==null?void 0:a.name)===n.name&&a.form===n.form})===n}function i1(e){if(ct(e)&&zt(e)==="slot"){const t=e.assignedElements({flatten:!0});if(t.length>0)return t}return ct(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function l1(e,t){i1(e).forEach(n=>{o1(n)&&t.push(n),l1(n,t)})}function c1(e,t,n){i1(e).forEach(r=>{ct(r)&&r.matches(t)&&n.push(r),c1(r,t,n)})}function Yd(e){return a1(e)&&s1(e)>=0}function u1(e){const t=[];return l1(e,t),t.filter(a1)}function gl(e){const t=u1(e);return t.filter(n=>s1(n)>=0&&g4(n,t))}function d1(e,t){const n=gl(e),r=n.length;if(r===0)return;const o=cn(it(e)),a=n.indexOf(o),s=a===-1?t===1?0:r-1:a+t;return n[s]}function f1(e){return d1(it(e).body,1)||e}function p1(e){return d1(it(e).body,-1)||e}function pa(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!He(n,r)}function b4(e){gl(e).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function bm(e){const t=[];c1(e,"[data-tabindex]",t),t.forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function ot(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function on(e){const t=fn(v4,e).current;return t.next=e,ke(t.effect),t}function v4(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function Hn(e){return e==null?e:"current"in e?e.current:e}function x4(e,t=!1,n=!0){const r=Ra();return De((o,a=null)=>{r.cancel();const s=Hn(e);if(s==null)return;const i=s,l=()=>{jn.flushSync(o)};if(typeof i.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){o();return}function c(){Promise.all(i.getAnimations().map(d=>d.finished)).then(()=>{a!=null&&a.aborted||l()}).catch(()=>{if(n){a!=null&&a.aborted||l();return}const d=i.getAnimations();!(a!=null&&a.aborted)&&d.length>0&&d.some(u=>u.pending||u.playState!=="finished")&&c()})}if(t){const d=ka.startingStyle;if(!i.hasAttribute(d)){r.request(c);return}const u=new MutationObserver(()=>{i.hasAttribute(d)||(u.disconnect(),c())});u.observe(i,{attributes:!0,attributeFilter:[d]}),a==null||a.addEventListener("abort",()=>u.disconnect(),{once:!0});return}r.request(c)})}function bl(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,a=De(o),s=x4(r,n,!1);f.useEffect(()=>{if(!t)return;const i=new AbortController;return s(a,i.signal),()=>{i.abort()}},[t,n,a,s])}function y4(e){const t=f.useRef(!0);t.current&&(t.current=!1,e())}const oa=0;class Kr{constructor(){lt(this,"currentId",oa);lt(this,"clear",()=>{this.currentId!==oa&&(clearTimeout(this.currentId),this.currentId=oa)});lt(this,"disposeEffect",()=>this.clear)}static create(){return new Kr}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=oa,n()},t)}isStarted(){return this.currentId!==oa}}function wr(){const e=fn(Kr.create).current;return qw(e.disposeEffect),e}let vm={},xm={},ym="";function w4(e){if(typeof document>"u")return!1;const t=it(e);return Pt(t).innerWidth-t.documentElement.clientWidth>0}function C4(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=it(e),r=n.documentElement,o=n.body,a=Er(r)?r:o,s=a.style.overflowY,i=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",a.style.overflowY="scroll";const l=a.offsetWidth;a.style.overflowY="hidden";const c=a.offsetWidth;return a.style.overflowY=s,r.style.scrollbarGutter=i,l===c}function S4(e){const t=it(e),n=t.documentElement,r=t.body,o=Er(n)?n:r,a={overflowY:o.style.overflowY,overflowX:o.style.overflowX};return Object.assign(o.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(o.style,a)}}function E4(e){var g;const t=it(e),n=t.documentElement,r=t.body,o=Pt(n);let a=0,s=0,i=!1;const l=Nn.create();if(e1&&(((g=o.visualViewport)==null?void 0:g.scale)??1)!==1)return()=>{};function c(){const b=o.getComputedStyle(n),h=o.getComputedStyle(r),w=(b.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";a=n.scrollTop,s=n.scrollLeft,vm={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},ym=n.style.scrollBehavior,xm={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const y=n.scrollHeight>n.clientHeight,C=n.scrollWidth>n.clientWidth,E=b.overflowY==="scroll"||h.overflowY==="scroll",S=b.overflowX==="scroll"||h.overflowX==="scroll",M=Math.max(0,o.innerWidth-r.clientWidth),R=Math.max(0,o.innerHeight-r.clientHeight),I=parseFloat(h.marginTop)+parseFloat(h.marginBottom),O=parseFloat(h.marginLeft)+parseFloat(h.marginRight),_=Er(n)?n:r;if(i=C4(e),i){n.style.scrollbarGutter=w,_.style.overflowY="hidden",_.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:w,overflowY:"hidden",overflowX:"hidden"}),(y||E)&&(n.style.overflowY="scroll"),(C||S)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:I||R?`calc(100dvh - ${I+R}px)`:"100dvh",width:O||M?`calc(100vw - ${O+M}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=a,r.scrollLeft=s,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function d(){Object.assign(n.style,vm),Object.assign(r.style,xm),i||(n.scrollTop=a,n.scrollLeft=s,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=ym)}function u(){d(),l.request(c)}c();const m=ot(o,"resize",u);return()=>{l.cancel(),d(),typeof o.removeEventListener=="function"&&m()}}class M4{constructor(){lt(this,"lockCount",0);lt(this,"restore",null);lt(this,"timeoutLock",Kr.create());lt(this,"timeoutUnlock",Kr.create());lt(this,"release",()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)});lt(this,"unlock",()=>{var t;this.lockCount===0&&this.restore&&((t=this.restore)==null||t.call(this),this.restore=null)})}acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}lock(t){if(this.lockCount===0||this.restore!==null)return;const r=it(t).documentElement,o=Pt(r).getComputedStyle(r).overflowY;if(o==="hidden"||o==="clip"){this.restore=st;return}const a=Bd||!w4(t);this.restore=a?S4(t):E4(t)}}const R4=new M4;function k4(e=!0,t=null){ke(()=>{if(e)return R4.acquire(t)},[e,t])}function To(...e){return()=>{for(let t=0;t<e.length;t+=1){const n=e[t];n&&n()}}}const m1={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},h1={...m1,position:"fixed",top:0,left:0},g1={...m1,position:"absolute"},Na=f.forwardRef(function(t,n){const[r,o]=f.useState();ke(()=>{Qj&&o("button")},[]);const a={tabIndex:0,role:r};return p.jsx("span",{...t,ref:n,style:h1,"aria-hidden":r?void 0:!0,...a,"data-base-ui-focus-guard":""})});process.env.NODE_ENV!=="production"&&(Na.displayName="FocusGuard");function pi(e){return`data-base-ui-${e}`}let Ms=0;function $s(e,t={}){const{preventScroll:n=!1,sync:r=!1,shouldFocus:o}=t;cancelAnimationFrame(Ms);function a(){o&&!o()||e==null||e.focus({preventScroll:n})}if(r)return a(),st;const s=requestAnimationFrame(a);return Ms=s,()=>{Ms===s&&(cancelAnimationFrame(s),Ms=0)}}const Ec={inert:new WeakMap,"aria-hidden":new WeakMap},wm="data-base-ui-inert",du={inert:new WeakSet,"aria-hidden":new WeakSet};let aa=new WeakMap,Mc=0;function P4(e){return du[e]}function b1(e){return e?Do(e)?e.host:b1(e.parentNode):null}const Rc=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=b1(n);return e.contains(r)?r:null}).filter(n=>n!=null),Cm=e=>{const t=new Set;return e.forEach(n=>{let r=n;for(;r&&!t.has(r);)t.add(r),r=r.parentNode}),t},Sm=(e,t,n)=>{const r=[],o=a=>{!a||n.has(a)||Array.from(a.children).forEach(s=>{zt(s)!=="script"&&(t.has(s)?o(s):r.push(s))})};return o(e),r};function N4(e,t,n,r,{mark:o=!0,markerIgnoreElements:a=[]}){const s=r?"inert":n?"aria-hidden":null;let i=null,l=null;const c=Rc(t,e),d=o?Rc(t,a):[],u=new Set(d),m=o?Sm(t,Cm(c),new Set(c)).filter(h=>!u.has(h)):[],g=[],b=[];if(s){const h=Ec[s],x=P4(s);l=x,i=h;const v=Rc(t,Array.from(t.querySelectorAll("[aria-live]"))),w=c.concat(v);Sm(t,Cm(w),new Set(w)).forEach(C=>{const E=C.getAttribute(s),S=E!==null&&E!=="false",M=(h.get(C)||0)+1;h.set(C,M),g.push(C),M===1&&S&&x.add(C),S||C.setAttribute(s,s==="inert"?"":"true")})}return o&&m.forEach(h=>{const x=(aa.get(h)||0)+1;aa.set(h,x),b.push(h),x===1&&h.setAttribute(wm,"")}),Mc+=1,()=>{i&&g.forEach(h=>{const v=(i.get(h)||0)-1;i.set(h,v),v||(!(l!=null&&l.has(h))&&s&&h.removeAttribute(s),l==null||l.delete(h))}),o&&b.forEach(h=>{const x=(aa.get(h)||0)-1;aa.set(h,x),x||h.removeAttribute(wm)}),Mc-=1,Mc||(Ec.inert=new WeakMap,Ec["aria-hidden"]=new WeakMap,du.inert=new WeakSet,du["aria-hidden"]=new WeakSet,aa=new WeakMap)}}function Em(e,t={}){const{ariaHidden:n=!1,inert:r=!1,mark:o=!0,markerIgnoreElements:a=[]}=t,s=it(e[0]).body;return N4(e,s,n,r,{mark:o,markerIgnoreElements:a})}const T4={style:{transition:"none"}},I4="data-base-ui-click-trigger",_4={fallbackAxisSide:"none"},O4={clipPath:"inset(50%)",position:"fixed",top:0,left:0},Ud=f.createContext(null);process.env.NODE_ENV!=="production"&&(Ud.displayName="PortalContext");const v1=()=>f.useContext(Ud),D4=pi("portal");function A4(e={}){const{ref:t,container:n,componentProps:r=Ht,elementProps:o}=e,a=$d(),s=v1(),i=s==null?void 0:s.portalNode,[l,c]=f.useState(null),[d,u]=f.useState(null),m=De(x=>{x!==null&&u(x)}),g=f.useRef(null);ke(()=>{if(n===null){g.current&&(g.current=null,u(null),c(null));return}if(a==null)return;const x=(n&&(Yu(n)?n:n.current))??i??document.body;if(x==null){g.current&&(g.current=null,u(null),c(null));return}g.current!==x&&(g.current=x,u(null),c(x))},[n,i,a]);const b=Vt("div",r,{ref:[t,m],props:[{id:a,[D4]:""},o]});return{portalNode:d,portalSubtree:l&&b?jn.createPortal(b,l):null}}const x1=f.forwardRef(function(t,n){const{render:r,className:o,style:a,children:s,container:i,renderGuards:l,...c}=t,{portalNode:d,portalSubtree:u}=A4({container:i,ref:n,componentProps:t,elementProps:c}),m=f.useRef(null),g=f.useRef(null),b=f.useRef(null),h=f.useRef(null),[x,v]=f.useState(null),w=f.useRef(!1),y=x==null?void 0:x.modal,C=x==null?void 0:x.open,E=typeof l=="boolean"?l:!!x&&!x.modal&&x.open&&!!d;f.useEffect(()=>{if(!d||y)return;function M(R){d&&R.relatedTarget&&pa(R)&&(R.type==="focusin"?w.current&&(bm(d),w.current=!1):(b4(d),w.current=!0))}return To(ot(d,"focusin",M,!0),ot(d,"focusout",M,!0))},[d,y]),f.useEffect(()=>{!d||C!==!1||(bm(d),w.current=!1)},[C,d]);const S=f.useMemo(()=>({beforeOutsideRef:m,afterOutsideRef:g,beforeInsideRef:b,afterInsideRef:h,portalNode:d,setFocusManagerState:v}),[d]);return p.jsxs(f.Fragment,{children:[u,p.jsxs(Ud.Provider,{value:S,children:[E&&d&&p.jsx(Na,{"data-type":"outside",ref:m,onFocus:M=>{var R;if(pa(M,d))(R=b.current)==null||R.focus();else{const I=x?x.domReference:null,O=p1(I);O==null||O.focus()}}}),E&&d&&p.jsx("span",{"aria-owns":d.id,style:O4}),d&&jn.createPortal(s,d),E&&d&&p.jsx(Na,{"data-type":"outside",ref:g,onFocus:M=>{var R;if(pa(M,d))(R=h.current)==null||R.focus();else{const I=x?x.domReference:null,O=f1(I);O==null||O.focus(),x!=null&&x.closeOnFocusOut&&(x==null||x.onOpenChange(!1,Ge(ml,M.nativeEvent)))}}})]})]})});process.env.NODE_ENV!=="production"&&(x1.displayName="FloatingPortal");function j4(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const y1=f.createContext(null);process.env.NODE_ENV!=="production"&&(y1.displayName="FloatingNodeContext");const w1=f.createContext(null);process.env.NODE_ENV!=="production"&&(w1.displayName="FloatingTreeContext");const C1=()=>{var e;return((e=f.useContext(y1))==null?void 0:e.id)||null},vl=e=>{const t=f.useContext(w1);return e??t};function z4(e,t){const n=Pt(qt(e));return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const Mm=20;let ur=[];function Kd(){ur=ur.filter(e=>{var t;return(t=e.deref())==null?void 0:t.isConnected})}function $4(e){Kd(),e&&zt(e)!=="body"&&(ur.push(new WeakRef(e)),ur.length>Mm&&(ur=ur.slice(-Mm)))}function kc(){var e;return Kd(),(e=ur[ur.length-1])==null?void 0:e.deref()}function L4(e){return e?Yd(e)?e:gl(e)[0]||e:null}function Rm(e,t){var a;if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!t.current.includes("floating")&&!((a=e.getAttribute("role"))!=null&&a.includes("dialog")))return;const r=u1(e).filter(s=>{const i=s.getAttribute("data-tabindex")||"";return Yd(s)||s.hasAttribute("data-tabindex")&&!i.startsWith("-")}),o=e.getAttribute("tabindex");t.current.includes("floating")||r.length===0?o!=="0"&&e.setAttribute("tabindex","0"):(o!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function F4(e){const{context:t,children:n,disabled:r=!1,initialFocus:o=!0,returnFocus:a=!0,restoreFocus:s=!1,modal:i=!0,closeOnFocusOut:l=!0,openInteractionType:c="",nextFocusableElement:d,previousFocusableElement:u,beforeContentFocusGuardRef:m,externalTree:g,getInsideElements:b}=e,h="rootStore"in t?t.rootStore:t,x=h.useState("open"),v=h.useState("domReferenceElement"),w=h.useState("floatingElement"),{events:y,dataRef:C}=h.context,E=De(()=>{var Y;return(Y=C.current.floatingContext)==null?void 0:Y.nodeId}),S=o===!1,M=lu(v)&&S,R=f.useRef(["content"]),I=on(o),O=on(a),_=on(c),T=vl(g),k=v1(),j=f.useRef(!1),V=f.useRef(!1),z=f.useRef(!1),$=f.useRef(null),F=f.useRef(""),L=f.useRef(""),D=f.useRef(null),re=f.useRef(null),pe=Lo(D,m,k==null?void 0:k.beforeInsideRef),G=Lo(re,k==null?void 0:k.afterInsideRef),B=wr(),J=wr(),oe=Ra(),U=k!=null,H=cu(w),te=De((Y=H)=>Y?gl(Y):[]),xe=De(()=>(b==null?void 0:b().filter(Y=>Y!=null))??[]);f.useEffect(()=>{if(r||!i)return;function Y(he){he.key==="Tab"&&He(H,cn(it(H)))&&te().length===0&&!M&&pt(he)}const we=it(H);return ot(we,"keydown",Y)},[r,H,i,M,te]),f.useEffect(()=>{if(r||!x)return;const Y=it(H);function we(){z.current=!1}function he(Me){const fe=qt(Me),Oe=xe(),se=He(w,fe)||He(v,fe)||He(k==null?void 0:k.portalNode,fe)||Oe.some(Ae=>Ae===fe||He(Ae,fe));z.current=!se,L.current=Me.pointerType||"keyboard",fe!=null&&fe.closest(`[${I4}]`)&&(V.current=!0)}function Ne(){L.current="keyboard"}return To(ot(Y,"pointerdown",he,!0),ot(Y,"pointerup",we,!0),ot(Y,"pointercancel",we,!0),ot(Y,"keydown",Ne,!0))},[r,w,v,H,x,k,xe]),f.useEffect(()=>{if(r||!l)return;const Y=it(H);function we(){V.current=!0,J.start(0,()=>{V.current=!1})}function he(Oe){const se=qt(Oe);Yd(se)&&($.current=se)}function Ne(Oe){const se=Oe.relatedTarget,Ae=Oe.currentTarget,Ke=qt(Oe);queueMicrotask(()=>{const je=E(),Pe=h.context.triggerElements,ae=xe(),A=(se==null?void 0:se.hasAttribute(pi("focus-guard")))&&[D.current,re.current,k==null?void 0:k.beforeInsideRef.current,k==null?void 0:k.afterInsideRef.current,k==null?void 0:k.beforeOutsideRef.current,k==null?void 0:k.afterOutsideRef.current,Hn(u),Hn(d)].includes(se),W=!(He(v,se)||He(w,se)||He(se,w)||He(k==null?void 0:k.portalNode,se)||ae.some(X=>X===se||He(X,se))||se!=null&&Pe.hasElement(se)||Pe.hasMatchingElement(X=>He(X,se))||A||T&&(Pa(T.nodesRef.current,je).find(X=>{var le,Te;return He((le=X.context)==null?void 0:le.elements.floating,se)||He((Te=X.context)==null?void 0:Te.elements.domReference,se)})||mm(T.nodesRef.current,je).find(X=>{var le,Te,Le;return[(le=X.context)==null?void 0:le.elements.floating,cu((Te=X.context)==null?void 0:Te.elements.floating)].includes(se)||((Le=X.context)==null?void 0:Le.elements.domReference)===se})));if(Ae===v&&H&&Rm(H,R),s&&Ae!==v&&!hl(Ke)&&cn(Y)===Y.body){if(ct(H)&&(H.focus(),s==="popup")){oe.request(()=>{H.focus()});return}const X=te(),le=$.current,Te=(le&&X.includes(le)?le:null)||X[X.length-1]||H;ct(Te)&&Te.focus()}if(C.current.insideReactTree){C.current.insideReactTree=!1;return}(M||!i)&&se&&W&&!V.current&&(M||se!==kc())&&(j.current=!0,h.setOpen(!1,Ge(ml,Oe)))})}function Me(){z.current||(C.current.insideReactTree=!0,B.start(0,()=>{C.current.insideReactTree=!1}))}const fe=ct(v)?v:null;if(!(!w&&!fe))return To(fe&&ot(fe,"focusout",Ne),fe&&ot(fe,"pointerdown",we),w&&ot(w,"focusin",he),w&&ot(w,"focusout",Ne),w&&k&&ot(w,"focusout",Me,!0))},[r,v,w,H,i,T,k,h,l,s,te,M,E,R,C,B,J,oe,d,u,xe]),f.useEffect(()=>{var Ae,Ke,je;if(r||!w||!x)return;const Y=Array.from(((Ae=k==null?void 0:k.portalNode)==null?void 0:Ae.querySelectorAll(`[${pi("portal")}]`))||[]),he=(je=(Ke=(T?mm(T.nodesRef.current,E()):[]).find(Pe=>{var ae;return lu(((ae=Pe.context)==null?void 0:ae.elements.domReference)||null)}))==null?void 0:Ke.context)==null?void 0:je.elements.domReference,Me=[...[w,...Y,D.current,re.current,k==null?void 0:k.beforeOutsideRef.current,k==null?void 0:k.afterOutsideRef.current,...xe()],he,Hn(u),Hn(d),M?v:null].filter(Pe=>Pe!=null),fe=Em(Me,{ariaHidden:i||M,mark:!1}),Oe=[w,...Y].filter(Pe=>Pe!=null),se=Em(Oe);return()=>{se(),fe()}},[x,r,v,w,i,k,M,T,E,d,u,xe]),ke(()=>{if(!x||r||!ct(H))return;const Y=it(H),we=cn(Y);queueMicrotask(()=>{const he=I.current,Ne=typeof he=="function"?he(_.current||""):he;if(Ne===void 0||Ne===!1||He(H,we))return;let fe=null;const Oe=()=>(fe==null&&(fe=te(H)),fe[0]||H);let se;Ne===!0||Ne===null?se=Oe():se=Hn(Ne),se=se||Oe();const Ae=He(H,cn(Y));$s(se,{preventScroll:se===H,shouldFocus(){if(Ae)return!0;const Ke=cn(Y);return!(Ke!==se&&He(H,Ke))}})})},[r,x,H,te,I,_]),ke(()=>{if(r||!H)return;const Y=it(H),we=cn(Y);$4(we);function he(Me){if(Me.open||(F.current=z4(Me.nativeEvent,L.current)),Me.reason===Fj&&Me.nativeEvent.type==="mouseleave"&&(j.current=!0),Me.reason===zd)if(Me.nested)j.current=!1;else if(n1(Me.nativeEvent)||r1(Me.nativeEvent))j.current=!1;else{let fe=!1;it(H).createElement("div").focus({get preventScroll(){return fe=!0,!1}}),fe?j.current=!1:j.current=!0}}y.on("openchange",he);function Ne(){const Me=O.current;let fe=typeof Me=="function"?Me(F.current):Me;if(fe===void 0||fe===!1)return null;if(fe===null&&(fe=!0),typeof fe=="boolean")return v!=null&&v.isConnected?v:kc()||null;const Oe=v!=null&&v.isConnected?v:kc();return Hn(fe)||Oe||null}return()=>{y.off("openchange",he);const Me=cn(Y),fe=xe(),Oe=He(w,Me)||fe.some(Ke=>Ke===Me||He(Ke,Me))||T&&Pa(T.nodesRef.current,E(),!1).some(Ke=>{var je;return He((je=Ke.context)==null?void 0:je.elements.floating,Me)}),se=O.current,Ae=Ne();queueMicrotask(()=>{const Ke=L4(Ae),je=typeof se!="boolean";se&&!j.current&&ct(Ke)&&(!(!je&&Ke!==Me&&Me!==Y.body)||Oe)&&Ke.focus({preventScroll:!0}),j.current=!1})}},[r,w,H,O,y,T,v,E,xe]),ke(()=>{if(!e1||x||!w)return;const Y=cn(it(w));!ct(Y)||!Gd(Y)||He(w,Y)&&Y.blur()},[x,w]),ke(()=>{if(!(r||!k))return k.setFocusManagerState({modal:i,closeOnFocusOut:l,open:x,onOpenChange:h.setOpen,domReference:v}),()=>{k.setFocusManagerState(null)}},[r,k,i,x,h,l,v]),ke(()=>{if(!(r||!H))return Rm(H,R),()=>{queueMicrotask(Kd)}},[r,H,R]);const Re=!r&&(i?!M:!0)&&(U||i);return p.jsxs(f.Fragment,{children:[Re&&p.jsx(Na,{"data-type":"inside",ref:pe,onFocus:Y=>{var we;if(i){const he=te();$s(he[he.length-1])}else if(k!=null&&k.portalNode)if(j.current=!1,pa(Y,k.portalNode)){const he=f1(v);he==null||he.focus()}else(we=Hn(u??k.beforeOutsideRef))==null||we.focus()}}),n,Re&&p.jsx(Na,{"data-type":"inside",ref:G,onFocus:Y=>{var we;if(i)$s(te()[0]);else if(k!=null&&k.portalNode)if(l&&(j.current=!0),pa(Y,k.portalNode)){const he=p1(v);he==null||he.focus()}else(we=Hn(d??k.afterOutsideRef))==null||we.focus()}})]})}function S1(e,t={}){const{enabled:n=!0,event:r="click",toggle:o=!0,ignoreMouse:a=!1,stickIfOpen:s=!0,touchOpenDelay:i=0,reason:l=Yw}=t,c="rootStore"in e?e.rootStore:e,d=c.context.dataRef,u=f.useRef(void 0),m=Ra(),g=wr(),b=f.useMemo(()=>{function h(v,w,y,C){const E=Ge(l,w,y);v&&C==="touch"&&i>0?g.start(i,()=>{c.setOpen(!0,E)}):c.setOpen(v,E)}function x(v,w,y){const C=d.current.openEvent,E=c.select("domReferenceElement")!==w;return v&&E||!v||!o?!0:C&&s?!y(C.type):!1}return{onPointerDown(v){u.current=v.pointerType},onMouseDown(v){const w=u.current,y=v.nativeEvent,C=c.select("open");if(v.button!==0||r==="click"||hm(w)&&a)return;const E=x(C,v.currentTarget,R=>R==="click"||R==="mousedown"),S=qt(y);if(Gd(S)){h(E,y,S,w);return}const M=v.currentTarget;m.request(()=>{h(E,y,M,w)})},onClick(v){if(r==="mousedown-only")return;const w=u.current;if(r==="mousedown"&&w){u.current=void 0;return}if(hm(w)&&a)return;const y=c.select("open"),C=x(y,v.currentTarget,E=>E==="click"||E==="mousedown"||E==="keydown"||E==="keyup");h(C,v.nativeEvent,v.currentTarget,w)},onKeyDown(){u.current=void 0}}},[d,r,a,l,c,s,o,m,g,i]);return f.useMemo(()=>n?{reference:b}:Ht,[n,b])}const V4={intentional:"onClick",sloppy:"onPointerDown"};function W4(){return!1}function B4(e){return{escapeKey:typeof e=="boolean"?e:(e==null?void 0:e.escapeKey)??!1,outsidePress:typeof e=="boolean"?e:(e==null?void 0:e.outsidePress)??!0}}function H4(e,t={}){const{enabled:n=!0,escapeKey:r=!0,outsidePress:o=!0,outsidePressEvent:a="sloppy",referencePress:s=W4,referencePressEvent:i="sloppy",bubbles:l,externalTree:c}=t,d="rootStore"in e?e.rootStore:e,u=d.useState("open"),m=d.useState("floatingElement"),{dataRef:g}=d.context,b=vl(c),h=De(typeof o=="function"?o:()=>!1),x=typeof o=="function"?h:o,v=x!==!1,w=De(()=>a),{escapeKey:y,outsidePress:C}=B4(l),E=f.useRef(!1),S=f.useRef(!1),M=f.useRef(!1),R=f.useRef(!1),I=f.useRef(""),O=f.useRef(null),_=wr(),T=wr(),k=De(()=>{T.clear(),g.current.insideReactTree=!1}),j=De(G=>{var oe;const B=(oe=g.current.floatingContext)==null?void 0:oe.nodeId;return(b?Pa(b.nodesRef.current,B):[]).some(U=>{var H;return((H=U.context)==null?void 0:H.open)&&!U.context.dataRef.current[G]})}),V=De(G=>wc(G,d.select("floatingElement"))||wc(G,d.select("domReferenceElement"))),z=De(G=>{s()&&d.setOpen(!1,Ge(Yw,G.nativeEvent))}),$=De(G=>{if(!u||!n||!r||G.key!=="Escape"||R.current||!y&&j("__escapeKeyBubbles"))return;const B=a4(G)?G.nativeEvent:G,J=Ge(Kw,B);d.setOpen(!1,J),J.isCanceled||G.preventDefault(),!y&&!J.isPropagationAllowed&&G.stopPropagation()}),F=De(()=>{g.current.insideReactTree=!0,T.start(0,k)}),L=De(G=>{if(!u||!n||G.button!==0)return;const B=qt(G.nativeEvent);He(d.select("floatingElement"),B)&&(E.current||(E.current=!0,S.current=!1))}),D=De(G=>{!u||!n||(G.defaultPrevented||G.nativeEvent.defaultPrevented)&&E.current&&(S.current=!0)});f.useEffect(()=>{if(!u||!n)return;g.current.__escapeKeyBubbles=y,g.current.__outsidePressBubbles=C;const G=new Kr,B=new Kr;function J(){G.clear(),R.current=!0}function oe(){G.start(zi()?5:0,()=>{R.current=!1})}function U(){M.current=!0,B.start(0,()=>{M.current=!1})}function H(){E.current=!1,S.current=!1}function te(){const A=I.current,W=A==="pen"||!A?"mouse":A,X=w(),le=typeof X=="function"?X():X;return typeof le=="string"?le:le[W]}function xe(A){const W=te();return W==="intentional"&&A.type!=="click"||W==="sloppy"&&A.type==="click"}function Re(A){var le;const W=(le=g.current.floatingContext)==null?void 0:le.nodeId,X=b&&Pa(b.nodesRef.current,W).some(Te=>{var Le;return wc(A,(Le=Te.context)==null?void 0:Le.elements.floating)});return V(A)||X}function Y(A){if(xe(A)){A.type!=="click"&&!V(A)&&(B.clear(),M.current=!1),k();return}if(g.current.insideReactTree){k();return}const W=qt(A),X=`[${pi("inert")}]`,le=ut(W)?W.getRootNode():null,Te=Array.from((Do(le)?le:it(d.select("floatingElement"))).querySelectorAll(X)),Le=d.context.triggerElements;if(W&&(Le.hasElement(W)||Le.hasMatchingElement(Fe=>He(Fe,W))))return;let tt=ut(W)?W:null;for(;tt&&!Xn(tt);){const Fe=Zn(tt);if(Xn(Fe)||!ut(Fe))break;tt=Fe}if(!(Te.length&&ut(W)&&!r4(W)&&!He(W,d.select("floatingElement"))&&Te.every(Fe=>!He(tt,Fe)))){if(ct(W)&&!("touches"in A)){const Fe=Xn(W),Ie=Xt(W),Ze=/auto|scroll/,at=Fe||Ze.test(Ie.overflowX),Qt=Fe||Ze.test(Ie.overflowY),wt=at&&W.clientWidth>0&&W.scrollWidth>W.clientWidth,gt=Qt&&W.clientHeight>0&&W.scrollHeight>W.clientHeight,Qe=Ie.direction==="rtl",bt=gt&&(Qe?A.offsetX<=W.offsetWidth-W.clientWidth:A.offsetX>W.clientWidth),ie=wt&&A.offsetY>W.clientHeight;if(bt||ie)return}if(!Re(A)){if(te()==="intentional"&&M.current){B.clear(),M.current=!1;return}typeof x=="function"&&!x(A)||j("__outsidePressBubbles")||(d.setOpen(!1,Ge(zd,A)),k())}}}function we(A){te()!=="sloppy"||A.pointerType==="touch"||!d.select("open")||!n||V(A)||Y(A)}function he(A){if(te()!=="sloppy"||!d.select("open")||!n||V(A))return;const W=A.touches[0];W&&(O.current={startTime:Date.now(),startX:W.clientX,startY:W.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},_.start(1e3,()=>{O.current&&(O.current.dismissOnTouchEnd=!1,O.current.dismissOnMouseDown=!1)}))}function Ne(A,W){const X=qt(A);if(!X)return;const le=ot(X,A.type,()=>{W(A),le()})}function Me(A){I.current="touch",Ne(A,he)}function fe(A){_.clear(),A.type==="pointerdown"&&(I.current=A.pointerType),!(A.type==="mousedown"&&O.current&&!O.current.dismissOnMouseDown)&&Ne(A,W=>{W.type==="pointerdown"?we(W):Y(W)})}function Oe(A){if(!E.current)return;const W=S.current;if(H(),te()==="intentional"){if(A.type==="pointercancel"){W&&U();return}if(!Re(A)){if(W){U();return}typeof x=="function"&&!x(A)||(B.clear(),M.current=!0,k())}}}function se(A){if(te()!=="sloppy"||!O.current||V(A))return;const W=A.touches[0];if(!W)return;const X=Math.abs(W.clientX-O.current.startX),le=Math.abs(W.clientY-O.current.startY),Te=Math.sqrt(X*X+le*le);Te>5&&(O.current.dismissOnTouchEnd=!0),Te>10&&(Y(A),_.clear(),O.current=null)}function Ae(A){Ne(A,se)}function Ke(A){te()!=="sloppy"||!O.current||V(A)||(O.current.dismissOnTouchEnd&&Y(A),_.clear(),O.current=null)}function je(A){Ne(A,Ke)}const Pe=it(m),ae=To(r&&To(ot(Pe,"keydown",$),ot(Pe,"compositionstart",J),ot(Pe,"compositionend",oe)),v&&To(ot(Pe,"click",fe,!0),ot(Pe,"pointerdown",fe,!0),ot(Pe,"pointerup",Oe,!0),ot(Pe,"pointercancel",Oe,!0),ot(Pe,"mousedown",fe,!0),ot(Pe,"mouseup",Oe,!0),ot(Pe,"touchstart",Me,!0),ot(Pe,"touchmove",Ae,!0),ot(Pe,"touchend",je,!0)));return()=>{ae(),G.clear(),B.clear(),H(),M.current=!1}},[g,m,r,v,x,u,n,y,C,$,k,w,j,V,b,d,_]),f.useEffect(k,[x,k]);const re=f.useMemo(()=>({onKeyDown:$,[V4[i]]:z,...i!=="intentional"&&{onClick:z}}),[$,z,i]),pe=f.useMemo(()=>({onKeyDown:$,onPointerDown:D,onMouseDown:D,onClickCapture:F,onMouseDownCapture(G){F(),L(G)},onPointerDownCapture(G){F(),L(G)},onMouseUpCapture:F,onTouchEndCapture:F,onTouchMoveCapture:F}),[$,F,L,D]);return f.useMemo(()=>n?{reference:re,floating:pe,trigger:re}:{},[n,re,pe])}const $e=(e,t,n,r,o,a,...s)=>{if(s.length>0)throw new Error(process.env.NODE_ENV!=="production"?"Unsupported number of selectors":mn(1));let i;if(e)i=e;else throw new Error("Missing arguments");return i};var Rs={exports:{}},Pc={};/**
|
|
163
|
+
* @license React
|
|
164
|
+
* use-sync-external-store-shim.production.js
|
|
165
|
+
*
|
|
166
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
167
|
+
*
|
|
168
|
+
* This source code is licensed under the MIT license found in the
|
|
169
|
+
* LICENSE file in the root directory of this source tree.
|
|
170
|
+
*/var km;function G4(){if(km)return Pc;km=1;var e=P;function t(u,m){return u===m&&(u!==0||1/u===1/m)||u!==u&&m!==m}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,a=e.useLayoutEffect,s=e.useDebugValue;function i(u,m){var g=m(),b=r({inst:{value:g,getSnapshot:m}}),h=b[0].inst,x=b[1];return a(function(){h.value=g,h.getSnapshot=m,l(h)&&x({inst:h})},[u,g,m]),o(function(){return l(h)&&x({inst:h}),u(function(){l(h)&&x({inst:h})})},[u]),s(g),g}function l(u){var m=u.getSnapshot;u=u.value;try{var g=m();return!n(u,g)}catch{return!0}}function c(u,m){return m()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:i;return Pc.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,Pc}var Nc={};/**
|
|
171
|
+
* @license React
|
|
172
|
+
* use-sync-external-store-shim.development.js
|
|
173
|
+
*
|
|
174
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
175
|
+
*
|
|
176
|
+
* This source code is licensed under the MIT license found in the
|
|
177
|
+
* LICENSE file in the root directory of this source tree.
|
|
178
|
+
*/var Pm;function Y4(){return Pm||(Pm=1,process.env.NODE_ENV!=="production"&&(function(){function e(g,b){return g===b&&(g!==0||1/g===1/b)||g!==g&&b!==b}function t(g,b){d||o.startTransition===void 0||(d=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var h=b();if(!u){var x=b();a(h,x)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),u=!0)}x=s({inst:{value:h,getSnapshot:b}});var v=x[0].inst,w=x[1];return l(function(){v.value=h,v.getSnapshot=b,n(v)&&w({inst:v})},[g,h,b]),i(function(){return n(v)&&w({inst:v}),g(function(){n(v)&&w({inst:v})})},[g]),c(h),h}function n(g){var b=g.getSnapshot;g=g.value;try{var h=b();return!a(g,h)}catch{return!0}}function r(g,b){return b()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=P,a=typeof Object.is=="function"?Object.is:e,s=o.useState,i=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,d=!1,u=!1,m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Nc.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:m,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Nc}var Nm;function qd(){return Nm||(Nm=1,process.env.NODE_ENV==="production"?Rs.exports=G4():Rs.exports=Y4()),Rs.exports}var U4=qd(),ks={exports:{}},Tc={};/**
|
|
179
|
+
* @license React
|
|
180
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
181
|
+
*
|
|
182
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
183
|
+
*
|
|
184
|
+
* This source code is licensed under the MIT license found in the
|
|
185
|
+
* LICENSE file in the root directory of this source tree.
|
|
186
|
+
*/var Tm;function K4(){if(Tm)return Tc;Tm=1;var e=P,t=qd();function n(c,d){return c===d&&(c!==0||1/c===1/d)||c!==c&&d!==d}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,a=e.useRef,s=e.useEffect,i=e.useMemo,l=e.useDebugValue;return Tc.useSyncExternalStoreWithSelector=function(c,d,u,m,g){var b=a(null);if(b.current===null){var h={hasValue:!1,value:null};b.current=h}else h=b.current;b=i(function(){function v(S){if(!w){if(w=!0,y=S,S=m(S),g!==void 0&&h.hasValue){var M=h.value;if(g(M,S))return C=M}return C=S}if(M=C,r(y,S))return M;var R=m(S);return g!==void 0&&g(M,R)?(y=S,M):(y=S,C=R)}var w=!1,y,C,E=u===void 0?null:u;return[function(){return v(d())},E===null?void 0:function(){return v(E())}]},[d,u,m,g]);var x=o(c,b[0],b[1]);return s(function(){h.hasValue=!0,h.value=x},[x]),l(x),x},Tc}var Ic={};/**
|
|
187
|
+
* @license React
|
|
188
|
+
* use-sync-external-store-shim/with-selector.development.js
|
|
189
|
+
*
|
|
190
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
191
|
+
*
|
|
192
|
+
* This source code is licensed under the MIT license found in the
|
|
193
|
+
* LICENSE file in the root directory of this source tree.
|
|
194
|
+
*/var Im;function q4(){return Im||(Im=1,process.env.NODE_ENV!=="production"&&(function(){function e(c,d){return c===d&&(c!==0||1/c===1/d)||c!==c&&d!==d}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=P,n=qd(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,a=t.useRef,s=t.useEffect,i=t.useMemo,l=t.useDebugValue;Ic.useSyncExternalStoreWithSelector=function(c,d,u,m,g){var b=a(null);if(b.current===null){var h={hasValue:!1,value:null};b.current=h}else h=b.current;b=i(function(){function v(S){if(!w){if(w=!0,y=S,S=m(S),g!==void 0&&h.hasValue){var M=h.value;if(g(M,S))return C=M}return C=S}if(M=C,r(y,S))return M;var R=m(S);return g!==void 0&&g(M,R)?(y=S,M):(y=S,C=R)}var w=!1,y,C,E=u===void 0?null:u;return[function(){return v(d())},E===null?void 0:function(){return v(E())}]},[d,u,m,g]);var x=o(c,b[0],b[1]);return s(function(){h.hasValue=!0,h.value=x},[x]),l(x),x},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Ic}var _m;function X4(){return _m||(_m=1,process.env.NODE_ENV==="production"?ks.exports=K4():ks.exports=q4()),ks.exports}var Z4=X4();const Q4=Dd(19),J4=Q4?t3:n3;function K(e,t,n,r,o){return J4(e,t,n,r,o)}function e3(e,t,n,r,o){const a=f.useCallback(()=>t(e.getSnapshot(),n,r,o),[e,t,n,r,o]);return U4.useSyncExternalStore(e.subscribe,a,a)}function t3(e,t,n,r,o){return e3(e,t,n,r,o)}function n3(e,t,n,r,o){return Z4.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,a=>t(a,n,r,o))}class E1{constructor(t){lt(this,"subscribe",t=>(this.listeners.add(t),()=>{this.listeners.delete(t)}));lt(this,"getSnapshot",()=>this.state);this.state=t,this.listeners=new Set,this.updateTick=0}setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){const t={...this.state};this.setState(t)}use(t,n,r,o){return K(this,t,n,r,o)}}class r3 extends E1{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){f.useDebugValue(t);const r=this;ke(()=>{r.state[t]!==n&&r.set(t,n)},[r,t,n])}useSyncedValueWithCleanup(t,n){const r=this;ke(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this;if(process.env.NODE_ENV!=="production"){f.useDebugValue(t,s=>Object.keys(s));const o=f.useRef(Object.keys(t)).current,a=Object.keys(t);(o.length!==a.length||o.some((s,i)=>s!==a[i]))&&console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.")}const r=Object.values(t);ke(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){f.useDebugValue(t);const r=this,o=n!==void 0;if(ke(()=>{o&&!Object.is(r.state[t],n)&&r.setState({...r.state,[t]:n})},[r,t,n,o]),process.env.NODE_ENV!=="production"){const a=this.controlledValues??(this.controlledValues=new Map);a.has(t)||a.set(t,o);const s=a.get(t);s!==void 0&&s!==o&&console.error(`A component is changing the ${o?"":"un"}controlled state of ${t.toString()} to be ${o?"un":""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`)}}select(t,n,r,o){const a=this.selectors[t];return a(this.state,n,r,o)}useState(t,n,r,o){return f.useDebugValue(t),K(this,this.selectors[t],n,r,o)}useContextCallback(t,n){f.useDebugValue(t);const r=De(n??st);this.context[t]=r}useStateSetter(t){const n=f.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let o=r(this.state);return n(o,o,this),this.subscribe(a=>{const s=r(a);if(!Object.is(o,s)){const i=o;o=s,n(s,i,this)}})}}const o3={open:$e(e=>e.open),transitionStatus:$e(e=>e.transitionStatus),domReferenceElement:$e(e=>e.domReferenceElement),referenceElement:$e(e=>e.positionReference??e.referenceElement),floatingElement:$e(e=>e.floatingElement),floatingId:$e(e=>e.floatingId)};class a3 extends r3{constructor(n){const{syncOnly:r,nested:o,onOpenChange:a,triggerElements:s,...i}=n;super({...i,positionReference:i.referenceElement,domReferenceElement:i.referenceElement},{onOpenChange:a,dataRef:{current:{}},events:j4(),nested:o,triggerElements:s},o3);lt(this,"syncOpenEvent",(n,r)=>{(!n||!this.state.open||r!=null&&s4(r))&&(this.context.dataRef.current.openEvent=n?r:void 0)});lt(this,"dispatchOpenChange",(n,r)=>{this.syncOpenEvent(n,r.event);const o={open:n,reason:r.reason,nativeEvent:r.event,nested:this.context.nested,triggerElement:r.trigger};this.context.events.emit("openchange",o)});lt(this,"setOpen",(n,r)=>{var o,a,s,i;if(this.syncOnly){(a=(o=this.context).onOpenChange)==null||a.call(o,n,r);return}this.dispatchOpenChange(n,r),(i=(s=this.context).onOpenChange)==null||i.call(s,n,r)});this.syncOnly=r}}const s3={tabIndex:-1,[iu]:""};class i3{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);if(r!==n&&(r!==void 0&&this.elementsSet.delete(r),this.elementsSet.add(n),this.idMap.set(t,n),process.env.NODE_ENV!=="production"&&this.elementsSet.size!==this.idMap.size))throw new Error("Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.")}delete(t){const n=this.idMap.get(t);n&&(this.elementsSet.delete(n),this.idMap.delete(t))}hasElement(t){return this.elementsSet.has(t)}hasMatchingElement(t){for(const n of this.elementsSet)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}function M1(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,o=$d(),a=C1()!=null;if(process.env.NODE_ENV!=="production"){const i=r.reference;i&&!ut(i)&&console.error("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `context.setPositionReference()`","instead.")}const s=fn(()=>new a3({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new i3,floatingId:o,syncOnly:!1,nested:a})).current;return ke(()=>{const i={open:t,floatingId:o};r.reference!==void 0&&(i.referenceElement=r.reference,i.domReferenceElement=ut(r.reference)?r.reference:null),r.floating!==void 0&&(i.floatingElement=r.floating),s.update(i)},[t,o,r.reference,r.floating,s]),s.context.onOpenChange=n,s.context.nested=a,s}function l3(e={}){const{nodeId:t,externalTree:n}=e,r=M1(e),o=e.rootContext||r,a=o.useState("referenceElement"),s=o.useState("floatingElement"),i=o.useState("domReferenceElement"),l=o.useState("open"),c=o.useState("floatingId"),[d,u]=f.useState(null),[m,g]=f.useState(void 0),[b,h]=f.useState(void 0),x=f.useRef(null),v=vl(n),w=f.useMemo(()=>({reference:a,floating:s,domReference:i}),[a,s,i]),y=Eb({...e,elements:{...w,...d&&{reference:d}}}),C=ut(m)?m:null,E=b===void 0?o.state.floatingElement:b;o.useSyncedValue("referenceElement",m??null),o.useSyncedValue("domReferenceElement",m===void 0?i:C),o.useSyncedValue("floatingElement",E);const S=f.useCallback(T=>{const k=ut(T)?{getBoundingClientRect:()=>T.getBoundingClientRect(),getClientRects:()=>T.getClientRects(),contextElement:T}:T;u(k),y.refs.setReference(k)},[y.refs]),M=f.useCallback(T=>{(ut(T)||T===null)&&(x.current=T,g(T)),(ut(y.refs.reference.current)||y.refs.reference.current===null||T!==null&&!ut(T))&&y.refs.setReference(T)},[y.refs,g]),R=f.useCallback(T=>{h(T),y.refs.setFloating(T)},[y.refs]),I=f.useMemo(()=>({...y.refs,setReference:M,setFloating:R,setPositionReference:S,domReference:x}),[y.refs,M,R,S]),O=f.useMemo(()=>({...y.elements,domReference:i}),[y.elements,i]),_=f.useMemo(()=>({...y,dataRef:o.context.dataRef,open:l,onOpenChange:o.setOpen,events:o.context.events,floatingId:c,refs:I,elements:O,nodeId:t,rootStore:o}),[y,I,O,t,o,l,c]);return ke(()=>{i&&(x.current=i)},[i]),ke(()=>{o.context.dataRef.current.floatingContext=_;const T=v==null?void 0:v.nodesRef.current.find(k=>k.id===t);T&&(T.context=_)}),f.useMemo(()=>({...y,context:_,refs:I,elements:O,rootStore:o}),[y,I,O,_,o])}const c3="Escape";function xl(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Ps(e,t){return xl(t,e===Hd||e===Qa,e===pr||e===mr)}function _c(e,t,n){return xl(t,e===Qa,n?e===pr:e===mr)||e==="Enter"||e===" "||e===""}function u3(e,t,n){return xl(t,n?e===pr:e===mr,e===Qa)}function d3(e,t,n,r){const o=n?e===mr:e===pr,a=e===Hd;return t==="both"||t==="horizontal"&&r&&r>1?e===c3:xl(t,o,a)}function f3(e,t){const{listRef:n,activeIndex:r,onNavigate:o=()=>{},enabled:a=!0,selectedIndex:s=null,allowEscape:i=!1,loopFocus:l=!1,nested:c=!1,rtl:d=!1,virtual:u=!1,focusItemOnOpen:m="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:b=!0,disabledIndices:h=void 0,orientation:x="vertical",parentOrientation:v,cols:w=1,id:y,resetOnPointerLeave:C=!0,externalTree:E}=t;process.env.NODE_ENV!=="production"&&(i&&(l||console.warn("`useListNavigation` looping must be enabled to allow escaping."),u||console.warn("`useListNavigation` must be virtual to allow escaping.")),x==="vertical"&&w>1&&console.warn("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const S="rootStore"in e?e.rootStore:e,M=S.useState("open"),R=S.useState("floatingElement"),I=S.useState("domReferenceElement"),O=S.context.dataRef,_=cu(R),T=lu(I),k=on(_),j=C1(),V=vl(E),z=f.useRef(m),$=f.useRef(s??-1),F=f.useRef(null),L=f.useRef(!0),D=De(ae=>{o($.current===-1?null:$.current,ae)}),re=f.useRef(D),pe=f.useRef(!!R),G=f.useRef(M),B=f.useRef(!1),J=f.useRef(!1),oe=f.useRef(null),U=on(h),H=on(M),te=on(s),xe=on(C),Re=Ra(),Y=Ra(),we=De(()=>{function ae(le){u?V==null||V.events.emit("virtualfocus",le):oe.current=$s(le,{sync:B.current,preventScroll:!0})}const A=n.current[$.current],W=J.current;A&&ae(A),(B.current?le=>le():le=>Re.request(le))(()=>{var Le;const le=n.current[$.current]||A;if(!le)return;A||ae(le),se&&(W||!L.current)&&((Le=le.scrollIntoView)==null||Le.call(le,{block:"nearest",inline:"nearest"}))})});ke(()=>{O.current.orientation=x},[O,x]),ke(()=>{a&&(M&&R?($.current=s??-1,z.current&&s!=null&&(J.current=!0,D())):pe.current&&($.current=-1,re.current()))},[a,M,R,s,D]),ke(()=>{if(a){if(!M){B.current=!1;return}if(R)if(r==null){if(B.current=!1,te.current!=null)return;if(pe.current&&($.current=-1,we()),(!G.current||!pe.current)&&z.current&&(F.current!=null||z.current===!0&&F.current==null)){let ae=0;const A=()=>{n.current[0]==null?(ae<2&&(ae?X=>Y.request(X):queueMicrotask)(A),ae+=1):($.current=F.current==null||_c(F.current,x,d)||c?Cc(n):gm(n),F.current=null,D())};A()}}else fi(n.current,r)||($.current=r,we(),J.current=!1)}},[a,M,R,r,te,c,n,x,d,D,we,Y]),ke(()=>{var le,Te;if(!a||R||!V||u||!pe.current)return;const ae=V.nodesRef.current,A=(Te=(le=ae.find(Le=>Le.id===j))==null?void 0:le.context)==null?void 0:Te.elements.floating,W=cn(it(R)),X=ae.some(Le=>Le.context&&He(Le.context.elements.floating,W));A&&!X&&L.current&&A.focus({preventScroll:!0})},[a,R,V,j,u]),ke(()=>{re.current=D,G.current=M,pe.current=!!R}),ke(()=>{M||(F.current=null,z.current=m)},[M,m]);const he=r!=null,Ne=De(ae=>{if(!H.current)return;const A=n.current.indexOf(ae.currentTarget);A!==-1&&($.current!==A||r!==A)&&($.current=A,D(ae))}),Me=De(()=>{var ae,A,W;return v??((W=(A=(ae=V==null?void 0:V.nodesRef.current.find(X=>X.id===j))==null?void 0:ae.context)==null?void 0:A.dataRef)==null?void 0:W.current.orientation)}),fe=De(()=>Cc(n,U.current)),Oe=De(ae=>{if(L.current=!1,B.current=!0,ae.which===229||!H.current&&ae.currentTarget===k.current)return;if(c&&d3(ae.key,x,d,w)){Ps(ae.key,Me())||pt(ae),S.setOpen(!1,Ge(ui,ae.nativeEvent)),ct(I)&&(u?V==null||V.events.emit("virtualfocus",I):I.focus());return}const A=$.current,W=Cc(n,h),X=gm(n,h);if(T||(ae.key==="Home"&&(pt(ae),$.current=W,D(ae)),ae.key==="End"&&(pt(ae),$.current=X,D(ae))),w>1){const le=Array.from({length:n.current.length},()=>({width:1,height:1})),Te=l4(le,w),Le=Te.findIndex(Ie=>Ie!=null&&!No(n.current,Ie,h)),tt=Te.reduce((Ie,Ze,at)=>Ze!=null&&!No(n.current,Ze,h)?at:Ie,-1),Fe=Te[i4(Te.map(Ie=>Ie!=null?n.current[Ie]:null),{event:ae,orientation:x,loopFocus:l,rtl:d,cols:w,disabledIndices:u4([...(typeof h!="function"?h:null)||n.current.map((Ie,Ze)=>No(n.current,Ze,h)?Ze:void 0),void 0],Te),minIndex:Le,maxIndex:tt,prevIndex:c4($.current>X?W:$.current,le,Te,w,ae.key===Qa?"bl":ae.key===(d?pr:mr)?"tr":"tl"),stopEvent:!0})];if(Fe!=null&&($.current=Fe,D(ae)),x==="both")return}if(Ps(ae.key,x)){if(pt(ae),M&&!u&&cn(ae.currentTarget.ownerDocument)===ae.currentTarget){$.current=_c(ae.key,x,d)?W:X,D(ae);return}_c(ae.key,x,d)?l?A>=X?i&&A!==n.current.length?$.current=-1:(B.current=!1,$.current=W):$.current=Wt(n.current,{startingIndex:A,disabledIndices:h}):$.current=Math.min(X,Wt(n.current,{startingIndex:A,disabledIndices:h})):l?A<=W?i&&A!==-1?$.current=n.current.length:(B.current=!1,$.current=X):$.current=Wt(n.current,{startingIndex:A,decrement:!0,disabledIndices:h}):$.current=Math.max(W,Wt(n.current,{startingIndex:A,decrement:!0,disabledIndices:h})),fi(n.current,$.current)&&($.current=-1),D(ae)}}),se=f.useMemo(()=>({onFocus(A){B.current=!0,Ne(A)},onClick:({currentTarget:A})=>A.focus({preventScroll:!0}),onMouseMove(A){B.current=!0,J.current=!1,g&&Ne(A)},onPointerLeave(A){var X;if(!H.current||!L.current||A.pointerType==="touch")return;B.current=!0;const W=A.relatedTarget;if(!(!g||n.current.includes(W))&&xe.current&&((X=oe.current)==null||X.call(oe),oe.current=null,$.current=-1,D(A),!u)){const le=k.current,Te=cn(it(le));le&&He(le,Te)&&le.focus({preventScroll:!0})}}}),[Ne,H,k,g,n,D,xe,u]),Ae=f.useMemo(()=>u&&M&&he&&{"aria-activedescendant":`${y}-${r}`},[u,M,he,y,r]),Ke=f.useMemo(()=>({"aria-orientation":x==="both"?void 0:x,...T?{}:Ae,onKeyDown(ae){if(ae.key==="Tab"&&ae.shiftKey&&M&&!u){const A=qt(ae.nativeEvent);if(A&&!He(k.current,A))return;pt(ae),S.setOpen(!1,Ge(ml,ae.nativeEvent)),ct(I)&&I.focus();return}Oe(ae)},onPointerMove(){L.current=!0}}),[Ae,Oe,k,x,T,S,M,u,I]),je=f.useMemo(()=>{function ae(X){S.setOpen(!0,Ge(ui,X.nativeEvent,X.currentTarget))}function A(X){m==="auto"&&n1(X.nativeEvent)&&(z.current=!u)}function W(X){z.current=m,m==="auto"&&r1(X.nativeEvent)&&(z.current=!0)}return{onKeyDown(X){const le=S.select("open");L.current=!1;const Te=X.key.startsWith("Arrow"),Le=u3(X.key,Me(),d),tt=Ps(X.key,x),Fe=(c?Le:tt)||X.key==="Enter"||X.key.trim()==="";if(u&&le)return Oe(X);if(!(!le&&!b&&Te)){if(Fe){const Ie=Ps(X.key,Me());F.current=c&&Ie?null:X.key}if(c){Le&&(pt(X),le?($.current=fe(),D(X)):ae(X));return}tt&&(te.current!=null&&($.current=te.current),pt(X),!le&&b?ae(X):Oe(X),le&&D(X))}},onFocus(X){S.select("open")&&!u&&($.current=-1,D(X))},onPointerDown:W,onPointerEnter:W,onMouseDown:A,onClick:A}},[Oe,m,fe,c,D,S,b,x,Me,d,te,u]),Pe=f.useMemo(()=>({...Ae,...je}),[Ae,je]);return f.useMemo(()=>a?{reference:Pe,floating:Ke,item:se,trigger:je}:{},[a,Pe,Ke,je,se])}function p3(e,t){const{listRef:n,elementsRef:r,activeIndex:o,onMatch:a,onTyping:s,enabled:i=!0,resetMs:l=750,selectedIndex:c=null}=t,d="rootStore"in e?e.rootStore:e,u=d.useState("open"),m=wr(),g=f.useRef(""),b=f.useRef(c??o??-1),h=f.useRef(null),x=De(y=>{function C(T){const k=r==null?void 0:r.current[T];return!k||hl(k)}function E(T,k,j=0){if(T.length===0)return-1;const V=(j%T.length+T.length)%T.length,z=k.toLocaleLowerCase();for(let $=0;$<T.length;$+=1){const F=(V+$)%T.length,L=T[F];if(!(!(L!=null&&L.toLocaleLowerCase().startsWith(z))||!C(F)))return F}return-1}const S=n.current;if(g.current.length>0&&y.key===" "&&(pt(y),s==null||s(!0)),g.current.length>0&&g.current[0]!==" "&&E(S,g.current)===-1&&y.key!==" "&&(s==null||s(!1)),S==null||y.key.length!==1||y.ctrlKey||y.metaKey||y.altKey)return;u&&y.key!==" "&&(pt(y),s==null||s(!0));const M=g.current==="";M&&(b.current=c??o??-1),S.every(T=>{var k,j;return T?((k=T[0])==null?void 0:k.toLocaleLowerCase())!==((j=T[1])==null?void 0:j.toLocaleLowerCase()):!0})&&g.current===y.key&&(g.current="",b.current=h.current),g.current+=y.key,m.start(l,()=>{g.current="",b.current=h.current,s==null||s(!1)});const O=((M?c??o??-1:b.current)??0)+1,_=E(S,g.current,O);_!==-1?(a==null||a(_),h.current=_):y.key!==" "&&(g.current="",s==null||s(!1))}),v=De(y=>{const C=y.relatedTarget,E=d.select("domReferenceElement"),S=d.select("floatingElement");He(E,C)||He(S,C)||(m.clear(),g.current="",b.current=h.current,s==null||s(!1))});ke(()=>{!u&&c!==null||(m.clear(),h.current=null,g.current!==""&&(g.current=""))},[u,c,m]),ke(()=>{u&&g.current===""&&(b.current=c??o??-1)},[u,c,o]);const w=f.useMemo(()=>({onKeyDown:x,onBlur:v}),[x,v]);return f.useMemo(()=>i?{reference:w,floating:w}:{},[i,w])}let Xd=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=ka.startingStyle]="startingStyle",e[e.endingStyle=ka.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),fu=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const m3={[fu.popupOpen]:""},h3={[fu.popupOpen]:"",[fu.pressed]:""},g3={[Xd.open]:""},b3={[Xd.closed]:""},v3={[Xd.anchorHidden]:""},x3={open(e){return e?m3:null}},y3={open(e){return e?h3:null}},R1={open(e){return e?g3:b3},anchorHidden(e){return e?v3:null}};function w3(e){return Dd(19)?e:e?"true":void 0}const k1=f.forwardRef(function(t,n){const{cutout:r,...o}=t;let a;if(r){const s=r.getBoundingClientRect();a=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${s.left}px ${s.top}px,${s.left}px ${s.bottom}px,${s.right}px ${s.bottom}px,${s.right}px ${s.top}px,${s.left}px ${s.top}px)`}return p.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...o,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:a}})});process.env.NODE_ENV!=="production"&&(k1.displayName="InternalBackdrop");function C3(e){const t=f.useRef(""),n=f.useCallback(o=>{o.defaultPrevented||(t.current=o.pointerType,e(o,o.pointerType))},[e]);return{onClick:f.useCallback(o=>{if(o.detail===0){e(o,"keyboard");return}"pointerType"in o?e(o,o.pointerType):e(o,t.current),t.current=""},[e]),onPointerDown:n}}function ua(e,t){const n=f.useRef(e),r=De(t);ke(()=>{n.current!==e&&r(n.current)},[e,r]),ke(()=>{n.current=e},[e])}function S3(e,t){const n=De((a,s)=>{(typeof e=="function"?e():e)||t(s||(Bd?"touch":""))}),{onClick:r,onPointerDown:o}=C3(n);return f.useMemo(()=>({onClick:r,onPointerDown:o}),[r,o])}function E3(e){const[t,n]=f.useState(null),r=S3(e,n);return ua(e,o=>{o&&!e&&n(null)}),f.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}const Zd=f.createContext(void 0);process.env.NODE_ENV!=="production"&&(Zd.displayName="ComboboxRootContext");const Qd=f.createContext(void 0);process.env.NODE_ENV!=="production"&&(Qd.displayName="ComboboxFloatingContext");const Jd=f.createContext(void 0);process.env.NODE_ENV!=="production"&&(Jd.displayName="ComboboxDerivedItemsContext");const ef=f.createContext("");process.env.NODE_ENV!=="production"&&(ef.displayName="ComboboxInputValueContext");function Zt(){const e=f.useContext(Zd);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxRootContext is missing. Combobox parts must be placed within <Combobox.Root>.":mn(22));return e}function yl(){const e=f.useContext(Qd);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxFloatingContext is missing. Combobox parts must be placed within <Combobox.Root>.":mn(23));return e}function _r(){const e=f.useContext(Jd);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxItemsContext is missing. Combobox parts must be placed within <Combobox.Root>.":mn(24));return e}function tf(){return f.useContext(ef)}const M3=(e,t)=>Object.is(e,t);function qr(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function R3(e,t,n){return!e||e.length===0?!1:e.some(r=>r===void 0?!1:qr(t,r,n))}function mi(e,t,n){return!e||e.length===0?-1:e.findIndex(r=>r===void 0?!1:qr(r,t,n))}function k3(e,t,n){return e.filter(r=>!qr(t,r,n))}function pu(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function nf(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function P3(e){if(!Array.isArray(e))return e!=null&&"null"in e;const t=e;if(nf(t)){for(const n of t)for(const r of n.items)if(r&&r.value==null&&r.label!=null)return!0;return!1}for(const n of t)if(n&&n.value==null&&n.label!=null)return!0;return!1}function Bt(e,t){if(t&&e!=null)return t(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return pu(e)}function sa(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?pu(e.value):pu(e)}function P1(e,t,n){function r(){return Bt(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){const o=t,a=nf(o)?o.flatMap(s=>s.items):o;if(e==null||typeof e!="object"){const s=a.find(i=>i.value===e);return s&&s.label!=null?s.label:r()}if("value"in e){const s=a.find(i=>i&&i.value===e.value);if(s&&s.label!=null)return s.label}}return r()}function N3(e,t,n){return e.reduce((r,o,a)=>(a>0&&r.push(", "),r.push(p.jsx(f.Fragment,{children:P1(o,t,n)},a)),r),[])}const Z={id:$e(e=>e.id),labelId:$e(e=>e.labelId),items:$e(e=>e.items),selectedValue:$e(e=>e.selectedValue),hasSelectionChips:$e(e=>{const t=e.selectedValue;return Array.isArray(t)&&t.length>0}),hasSelectedValue:$e(e=>{const{selectedValue:t,selectionMode:n}=e;return t==null?!1:n==="multiple"&&Array.isArray(t)?t.length>0:!0}),hasNullItemLabel:$e((e,t)=>t?P3(e.items):!1),open:$e(e=>e.open),mounted:$e(e=>e.mounted),forceMounted:$e(e=>e.forceMounted),inline:$e(e=>e.inline),activeIndex:$e(e=>e.activeIndex),selectedIndex:$e(e=>e.selectedIndex),isActive:$e((e,t)=>e.activeIndex===t),isSelected:$e((e,t)=>{const n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(o=>qr(t,o,n)):qr(t,r,n)}),transitionStatus:$e(e=>e.transitionStatus),popupProps:$e(e=>e.popupProps),inputProps:$e(e=>e.inputProps),triggerProps:$e(e=>e.triggerProps),itemProps:$e(e=>e.itemProps),positionerElement:$e(e=>e.positionerElement),listElement:$e(e=>e.listElement),triggerElement:$e(e=>e.triggerElement),inputElement:$e(e=>e.inputElement),inputGroupElement:$e(e=>e.inputGroupElement),popupSide:$e(e=>e.popupSide),openMethod:$e(e=>e.openMethod),inputInsidePopup:$e(e=>e.inputInsidePopup),inputOwnsFormValue:$e(e=>e.inputOwnsFormValue),selectionMode:$e(e=>e.selectionMode),name:$e(e=>e.name),form:$e(e=>e.form),disabled:$e(e=>e.disabled),readOnly:$e(e=>e.readOnly),required:$e(e=>e.required),grid:$e(e=>e.grid),virtualized:$e(e=>e.virtualized),itemToStringLabel:$e(e=>e.itemToStringLabel),isItemEqualToValue:$e(e=>e.isItemEqualToValue),modal:$e(e=>e.modal),autoHighlight:$e(e=>e.autoHighlight),submitOnItemClick:$e(e=>e.submitOnItemClick)};let Om=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const T3={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},So={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},I3={disabled:!1,...So},_3={valid(e){return e===null?null:e?{[Om.valid]:""}:{[Om.invalid]:""}}},N1={invalid:void 0,name:void 0,validityData:{state:T3,errors:[],error:"",value:"",initialValue:null},setValidityData:st,disabled:void 0,touched:So.touched,setTouched:st,dirty:So.dirty,setDirty:st,filled:So.filled,setFilled:st,focused:So.focused,setFocused:st,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:I3,markedDirtyRef:{current:!1},registerFieldControl:st,validation:{getValidationProps:(e=Ht)=>e,getInputValidationProps:(e=Ht)=>e,inputRef:{current:null},commit:async()=>{}}},rf=f.createContext(N1);process.env.NODE_ENV!=="production"&&(rf.displayName="FieldRootContext");function Ja(e=!0){const t=f.useContext(rf);if(t.setValidityData===st&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":mn(28));return t}function O3(e,t,n,r,o=!0){const{registerFieldControl:a}=Ja(),s=f.useRef(null);s.current||(s.current=Symbol()),ke(()=>{const i=s.current;return!i||!o?void 0:(a(i,{controlRef:e,getValue:r,id:t,value:n}),()=>{a(i,void 0)})},[e,o,r,t,a,n])}const T1=f.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:st,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(T1.displayName="FormContext");function D3(){return f.useContext(T1)}const I1=f.createContext({controlId:void 0,registerControlId:st,labelId:void 0,setLabelId:st,messageIds:[],setMessageIds:st,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&(I1.displayName="LabelableContext");function of(){return f.useContext(I1)}function _1(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:o,registerControlId:a}=of(),s=Ld(t),i=n?o:void 0,l=fn(()=>Symbol("labelable-control")),c=f.useRef(!1),d=f.useRef(t!=null),u=De(()=>{!c.current||a===st||(c.current=!1,a(l.current,void 0))});return ke(()=>{if(a===st)return;let m;if(n){const g=r==null?void 0:r.current;ut(g)&&g.closest("label")!=null?m=t??null:m=i??s}else if(t!=null)d.current=!0,m=t;else if(d.current)m=s;else{u();return}if(m===void 0){u();return}c.current=!0,a(l.current,m)},[t,r,i,a,n,s,l,u]),f.useEffect(()=>u,[u]),o??s}function A3(e,t){return(n,r)=>{if(n==null)return!1;const o=Bt(n,t);return e.contains(o,r)}}function j3(e,t,n){return(r,o)=>{if(r==null)return!1;if(!o)return!0;const a=Bt(r,t),s=n!=null?Bt(n,t):"";return s&&e.contains(s,o)&&s.length===o.length?!0:e.contains(a,o)}}const Dm=new Map;function z3(e={}){const t={usage:"search",sensitivity:"base",ignorePunctuation:!0,...e},n=`${O1(e.locale)}|${JSON.stringify(t)}`,r=Dm.get(n);if(r)return r;const o=new Intl.Collator(e.locale,t),a={contains(s,i,l){if(!i)return!0;const c=Bt(s,l);for(let d=0;d<=c.length-i.length;d+=1)if(o.compare(c.slice(d,d+i.length),i)===0)return!0;return!1},startsWith(s,i,l){if(!i)return!0;const c=Bt(s,l);return o.compare(c.slice(0,i.length),i)===0},endsWith(s,i,l){if(!i)return!0;const c=Bt(s,l),d=i.length;return c.length>=d&&o.compare(c.slice(c.length-d),i)===0}};return Dm.set(n,a),a}function O1(e){return Array.isArray(e)?e.map(t=>O1(t)).join(","):e==null?"":String(e)}const $3=z3,D1=Symbol("none"),Lr={value:D1,index:-1};function L3(e){const{id:t,onOpenChangeComplete:n,defaultSelectedValue:r=null,selectedValue:o,onSelectedValueChange:a,defaultInputValue:s,inputValue:i,open:l,defaultOpen:c=!1,selectionMode:d="none",onItemHighlighted:u,name:m,form:g,disabled:b=!1,readOnly:h=!1,required:x=!1,inputRef:v,grid:w=!1,items:y,filteredItems:C,filter:E,openOnInputClick:S=!0,autoHighlight:M=!1,keepHighlight:R=!1,highlightItemOnHover:I=!0,loopFocus:O=!0,itemToStringLabel:_,itemToStringValue:T,isItemEqualToValue:k=M3,virtualized:j=!1,inline:V=!1,fillInputOnItemPress:z=!0,modal:$=!1,limit:F=-1,autoComplete:L="list",formAutoComplete:D,locale:re,submitOnItemClick:pe=!1}=e,{clearErrors:G}=D3(),{setDirty:B,validityData:J,shouldValidateOnChange:oe,setFilled:U,name:H,disabled:te,setTouched:xe,setFocused:Re,validationMode:Y,validation:we}=Ja(),he=pl(),Ne=_1({id:t}),Me=$3({locale:re}),[fe,Oe]=f.useState(!1),[se,Ae]=f.useState(null),Ke=f.useRef([]),je=f.useRef([]),Pe=f.useRef(null),ae=f.useRef(null),A=f.useRef(null),W=f.useRef(null),X=f.useRef(null),le=f.useRef(!0),Te=f.useRef(!1),Le=f.useRef(null),tt=f.useRef(null),Fe=f.useRef(null),Ie=f.useRef(Lr),Ze=f.useRef(null),at=f.useRef([]),Qt=f.useRef([]),wt=te||b,gt=H??m,Qe=d==="multiple",bt=d==="single",ie=i!==void 0||s!==void 0,ye=y!==void 0,Se=C!==void 0;let ee;M==="always"?ee="always":ee=M?"input-change":!1;const[q,We]=vc({controlled:o,default:Qe?r??ys:r,name:"Combobox",state:"selectedValue"}),Ee=f.useMemo(()=>E===null?()=>!0:E!==void 0?E:bt&&!fe?j3(Me,_,q):A3(Me,_),[E,bt,q,fe,Me,_]),Dt=fn(()=>ie?s??"":bt?Bt(q,_):"").current,[Ve,Ct]=vc({controlled:i,default:Dt,name:"Combobox",state:"inputValue"}),[qe,vt]=vc({controlled:l,default:c,name:"Combobox",state:"open"}),dt=nf(y),xt=se??(Ve===""?"":String(Ve).trim()),Ut=bt?Bt(q,_):"",qo=bt&&!fe&&xt!==""&&Ut!==""&&Ut.length===xt.length&&Me.contains(Ut,xt),Or=qo?"":xt,rr=ye&&Se&&qo,or=f.useMemo(()=>y?dt?y.flatMap(ce=>ce.items):y:ys,[y,dt]),Dr=f.useMemo(()=>{if(C&&!rr)return C;if(!y)return ys;if(dt){const Ce=y,Ue=[];let Xe=0;for(const Mt of Ce){if(F>-1&&Xe>=F)break;const It=Or===""?Mt.items:Mt.items.filter(ar=>Ee(ar,Or,_));if(It.length===0)continue;const tn=F>-1?F-Xe:1/0,jr=It.slice(0,tn);if(jr.length>0){const ar={...Mt,items:jr};Ue.push(ar),Xe+=jr.length}}return Ue}if(Or==="")return F>-1?or.slice(0,F):or;const ce=[];for(const Ce of or){if(F>-1&&ce.length>=F)break;Ee(Ce,Or,_)&&ce.push(Ce)}return ce},[C,rr,y,dt,Or,F,Ee,_,or]),Jt=f.useMemo(()=>dt?Dr.flatMap(Ce=>Ce.items):Dr,[Dr,dt]),Be=fn(()=>new E1({id:Ne,labelId:void 0,selectedValue:q,open:qe,filter:Ee,query:xt,items:y,selectionMode:d,listRef:Ke,labelsRef:je,popupRef:Pe,emptyRef:X,inputRef:ae,startDismissRef:A,endDismissRef:W,keyboardActiveRef:le,chipsContainerRef:Le,clearRef:tt,valuesRef:at,allValuesRef:Qt,selectionEventRef:Fe,name:gt,form:g,disabled:wt,readOnly:h,required:x,grid:w,isGrouped:dt,virtualized:j,openOnInputClick:S,itemToStringLabel:_,isItemEqualToValue:k,modal:$,autoHighlight:ee,submitOnItemClick:pe,hasInputValue:ie,mounted:!1,forceMounted:!1,transitionStatus:"idle",inline:V,activeIndex:null,selectedIndex:null,popupProps:{},inputProps:{},triggerProps:{},itemProps:Ht,positionerElement:null,listElement:null,triggerElement:null,inputElement:null,inputGroupElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,inputOwnsFormValue:d==="none",onOpenChangeComplete:n||st,setOpen:st,setInputValue:st,setSelectedValue:st,setIndices:st,onItemHighlighted:st,handleSelection:st,forceMount:st,requestSubmit:st})).current,Wn=d==="none"?Ve:q,ts=f.useMemo(()=>d==="none"?Wn:Array.isArray(q)?q.map(ce=>sa(ce,T)):sa(q,T),[Wn,T,d,q]),wl=De(u),Xo=De(n),ns=K(Be,Z.activeIndex),LC=K(Be,Z.selectedIndex),rs=K(Be,Z.positionerElement),co=K(Be,Z.listElement),Ar=K(Be,Z.triggerElement),uo=K(Be,Z.inputElement),FC=K(Be,Z.inputGroupElement),en=K(Be,Z.inline),Sn=K(Be,Z.inputInsidePopup),VC=K(Be,Z.inputOwnsFormValue),WC=on(Ar),{mounted:kf,setMounted:BC,transitionStatus:Cl}=Fd(qe),{openMethod:Pf,triggerProps:Sl}=E3(qe),HC=De(()=>ts);O3(Sn?WC:ae,Ne,Wn,HC);const os=De(()=>{y?je.current=Jt.map(ce=>Bt(ce,_)):Be.set("forceMounted",!0)}),GC=f.useRef(q);ke(()=>{q!==GC.current&&os()},[os,q]);const hn=De(ce=>{Be.update(ce);const Ce=ce.type||"none";if(ce.activeIndex!==void 0)if(ce.activeIndex===null)Ie.current!==Lr&&(Ie.current=Lr,wl(void 0,ra(Ce,void 0,{index:-1})));else{const Ue=at.current[ce.activeIndex];Ie.current={value:Ue,index:ce.activeIndex},wl(Ue,ra(Ce,void 0,{index:ce.activeIndex}))}}),gn=De((ce,Ce)=>{var Ue;if(Te.current=Ce.reason===Gn,(Ue=e.onInputValueChange)==null||Ue.call(e,ce,Ce),!Ce.isCanceled){if(Ce.reason===Co){const Xe=Ce.event,Mt=Xe.inputType;if(Xe.type==="compositionend"||Mt!=null&&Mt!==""&&Mt!=="insertReplacementText"){const tn=ce.trim()!=="";tn&&Oe(!0),Ze.current={hasQuery:tn},tn&&ee&&Be.state.activeIndex==null&&Be.set("activeIndex",0)}}Ct(ce)}}),Zo=De((ce,Ce)=>{var Ue;if(qe!==ce&&(Ce.reason==="escape-key"&&ye&&Jt.length===0&&!Be.state.emptyRef.current&&Ce.allowPropagation(),(Ue=e.onOpenChange)==null||Ue.call(e,ce,Ce),!Ce.isCanceled&&(ce&&Qe&&Sn&&!en&&se!==null&&(Oe(!1),Ae(null),Ve!==""&&gn("",Ge(Gn,Ce.event))),!ce&&fe&&(bt?(en||Ae(xt),xt===""&&Oe(!1)):Qe&&(en||Ae(xt),Sn&&hn({activeIndex:null}),(!Sn||en)&&gn("",Ge(Gn,Ce.event)))),vt(ce),!ce&&Sn&&(Ce.reason===ml||Ce.reason===zd)&&(xe(!0),Re(!1),Y==="onBlur")))){const Xe=d==="none"?Ve:q;we.commit(Xe)}}),fo=De((ce,Ce)=>{if(a==null||a(ce,Ce),Ce.isCanceled)return;We(ce),(d==="none"&&Pe.current&&z||bt&&!Be.state.inputInsidePopup)&&gn(Bt(ce,_),Ge(Ce.reason,Ce.event)),bt&&ce!=null&&Ce.reason!==Co&&fe&&!en&&Ae(xt)}),YC=De((ce,Ce)=>{var jr;let Ue=Ce;if(Ue===void 0){if(ns===null)return;Ue=at.current[ns]}const Xe=qt(ce),Mt=Fe.current??ce;Fe.current=null;const It=Ge(Vj,Mt),tn=(jr=Xe==null?void 0:Xe.closest("a"))==null?void 0:jr.getAttribute("href");if(tn){tn.startsWith("#")&&Zo(!1,It);return}if(Qe){const ar=Array.isArray(q)?q:[],eS=R3(ar,Ue,Be.state.isItemEqualToValue)?k3(ar,Ue,Be.state.isItemEqualToValue):[...ar,Ue];if(fo(eS,It),!(ae.current?ae.current.value.trim()!=="":!1))return;Be.state.inputInsidePopup?gn("",Ge(Gn,It.event)):Zo(!1,It)}else fo(Ue,It),Zo(!1,It)}),El=De(()=>{var Ce,Ue;if(!Be.state.submitOnItemClick)return;const ce=((Ce=we.inputRef.current)==null?void 0:Ce.form)??((Ue=Be.state.inputElement)==null?void 0:Ue.form);ce&&typeof ce.requestSubmit=="function"&&ce.requestSubmit()}),Ml=De(()=>{if(BC(!1),Xo==null||Xo(!1),Oe(!1),Ae(null),hn(d==="none"?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),Qe&&ae.current&&ae.current.value!==""&&!Te.current&&gn("",Ge(Gn)),bt)if(Be.state.inputInsidePopup)ae.current&&ae.current.value!==""&&gn("",Ge(Gn));else{const ce=Bt(q,_);ae.current&&ae.current.value!==ce&&gn(ce,Ge(ce===""?Gn:xn))}}),UC=f.useMemo(()=>en&&rs?{current:rs.closest('[role="dialog"]')}:Pe,[en,rs]);bl({enabled:!e.actionsRef,open:qe,ref:UC,onComplete(){qe||Ml()}}),f.useImperativeHandle(e.actionsRef,()=>({unmount:Ml}),[Ml]),ke(function(){if(qe||d==="none")return;const Ce=y?or:Qt.current;if(Qe){const Ue=Array.isArray(q)?q:[],Xe=Ue[Ue.length-1],Mt=mi(Ce,Xe,k);hn({selectedIndex:Mt===-1?null:Mt})}else{const Ue=mi(Ce,q,k);hn({selectedIndex:Ue===-1?null:Ue})}},[qe,q,y,d,or,Qe,k,hn]),ke(()=>{y&&(at.current=Jt,Ke.current.length=Jt.length)},[y,Jt]),ke(()=>{const ce=Ze.current;if(ce&&(ce.hasQuery?ee&&Be.set("activeIndex",0):ee==="always"&&Be.set("activeIndex",0),Ze.current=null),!qe&&!en)return;const Ue=ye||Se?Jt:at.current,Xe=Be.state.activeIndex;if(Xe==null){if(ee==="always"&&Ue.length>0){Be.set("activeIndex",0);return}Ie.current!==Lr&&(Ie.current=Lr,Be.state.onItemHighlighted(void 0,ra(xn,void 0,{index:-1})));return}if(Xe>=Ue.length){Ie.current!==Lr&&(Ie.current=Lr,Be.state.onItemHighlighted(void 0,ra(xn,void 0,{index:-1}))),Be.set("activeIndex",null);return}const Mt=Ue[Xe],It=Ie.current.value,tn=It!==D1&&qr(Mt,It,Be.state.isItemEqualToValue);(Ie.current.index!==Xe||!tn)&&(Ie.current={value:Mt,index:Xe},Be.state.onItemHighlighted(Mt,ra(xn,void 0,{index:Xe})))},[ns,ee,Se,ye,Jt,en,qe,Be]),ke(()=>{if(d==="none"){U(String(Ve)!=="");return}U(Qe?Array.isArray(q)&&q.length>0:q!=null)},[U,d,Ve,q,Qe]),f.useEffect(()=>{ye&&ee&&Jt.length===0&&hn({activeIndex:null})},[ye,ee,Jt.length,hn]),ua(xt,()=>{!qe||xt===""||xt===String(Dt)||Oe(!0)}),ua(q,()=>{if(d!=="none"&&(G(gt),B(q!==J.initialValue),oe()?we.commit(q):we.commit(q,!0),bt&&!ie&&!Sn)){const ce=Bt(q,_);Ve!==ce&&gn(ce,Ge(xn))}}),ua(Ve,()=>{d==="none"&&(G(gt),B(Ve!==J.initialValue),oe()?we.commit(Ve):we.commit(Ve,!0))}),ua(y,()=>{if(!bt||ie||Sn||fe)return;const ce=Bt(q,_);Ve!==ce&&gn(ce,Ge(xn))});const as=M1({open:en?!0:qe,onOpenChange:Zo,elements:{reference:Sn?Ar:uo,floating:rs}});let Rl,kl;en||(Rl=w?"grid":"listbox",kl=qe?"true":"false");const ss=f.useMemo(()=>{const ce=(uo==null?void 0:uo.tagName)==="INPUT",Ce=uo==null||ce,Ue=Ce||qe,Xe=Ce?{autoComplete:"off",spellCheck:"false",autoCorrect:"off",autoCapitalize:"none"}:{};return Ue&&(Xe.role="combobox",Xe["aria-expanded"]=kl,Xe["aria-haspopup"]=Rl,Xe["aria-controls"]=qe?co==null?void 0:co.id:void 0,Xe["aria-autocomplete"]=L),{reference:Xe,floating:{role:"presentation"}}},[uo,qe,kl,Rl,co==null?void 0:co.id,L]),Nf=S1(as,{enabled:!h&&!wt&&S,event:"mousedown-only",toggle:!1,touchOpenDelay:Sn?0:100,reason:Uw}),is=H4(as,{enabled:!h&&!wt&&!en,outsidePressEvent:{mouse:"sloppy",touch:"intentional"},bubbles:en?!0:void 0,outsidePress(ce){const Ce=qt(ce);return!He(Ar,Ce)&&!He(tt.current,Ce)&&!He(Le.current,Ce)&&!He(FC,Ce)}}),po=f3(as,{enabled:!h&&!wt,id:Ne,listRef:Ke,activeIndex:ns,selectedIndex:LC,virtual:!0,loopFocus:O,allowEscape:O&&!ee,focusItemOnOpen:fe||d==="none"&&!ee?!1:"auto",focusItemOnHover:I,resetOnPointerLeave:!R,cols:w?2:1,orientation:w?"horizontal":void 0,rtl:he==="rtl",disabledIndices:ys,onNavigate(ce,Ce){!Ce&&!qe||Cl==="ending"||hn(Ce?{activeIndex:ce,type:le.current?"keyboard":"pointer"}:{activeIndex:ce})}}),Pl=f.useMemo(()=>Ma(po.reference,is.reference,Nf.reference,ss.reference),[po.reference,is.reference,Nf.reference,ss.reference]),Nl=f.useMemo(()=>Ma(s3,po.floating,is.floating,ss.floating),[po.floating,is.floating,ss.floating]),Tl=f.useMemo(()=>{const ce=po.item;return ce?{...ce,onFocus:void 0}:Ht},[po.item]);y4(()=>{Be.update({inline:V,popupProps:Nl,inputProps:Pl,triggerProps:Sl,itemProps:Tl,setOpen:Zo,setInputValue:gn,setSelectedValue:fo,setIndices:hn,onItemHighlighted:wl,handleSelection:YC,forceMount:os,requestSubmit:El})}),ke(()=>{Be.update({id:Ne,selectedValue:q,open:qe,mounted:kf,transitionStatus:Cl,items:y,inline:V,popupProps:Nl,inputProps:Pl,triggerProps:Sl,openMethod:Pf,itemProps:Tl,selectionMode:d,name:gt,form:g,disabled:wt,readOnly:h,required:x,grid:w,isGrouped:dt,virtualized:j,onOpenChangeComplete:Xo,openOnInputClick:S,itemToStringLabel:_,modal:$,autoHighlight:ee,isItemEqualToValue:k,submitOnItemClick:pe,hasInputValue:ie,requestSubmit:El,inputOwnsFormValue:d==="none"&&(V||!Be.state.inputInsidePopup)})},[Be,Ne,q,qe,kf,Cl,y,Nl,Pl,Tl,Pf,Sl,d,gt,wt,h,x,we,w,dt,j,Xo,S,_,$,k,pe,ie,V,El,ee,g]);const KC=Lo(v,we.inputRef),qC=f.useMemo(()=>({query:xt,hasItems:ye,filteredItems:Dr,flatFilteredItems:Jt}),[xt,ye,Dr,Jt]),XC=f.useMemo(()=>Array.isArray(Wn)?"":sa(Wn,T),[Wn,T]),ZC=Qe&&Array.isArray(q)&&q.length>0,Il=Qe||d==="none"&&VC?void 0:gt,QC=f.useMemo(()=>!Qe||!Array.isArray(q)||!gt?null:q.map(ce=>{const Ce=sa(ce,T);return p.jsx("input",{type:"hidden",form:g,name:gt,value:Ce},Ce)}),[Qe,q,g,gt,T]),JC=p.jsxs(f.Fragment,{children:[e.children,p.jsx("input",{...we.getInputValidationProps({onFocus(){var ce;if(Sn){Ar==null||Ar.focus();return}(ce=ae.current||Ar)==null||ce.focus()},onChange(ce){var Mt;if(ce.nativeEvent.defaultPrevented||wt||h){(Mt=ce.preventBaseUIHandler)==null||Mt.call(ce);return}const Ce=ce.currentTarget.value,Ue=Ge(xn,ce.nativeEvent);function Xe(){if(Qe)return;if(d==="none"){B(Ce!==J.initialValue),gn(Ce,Ue),oe()&&we.commit(Ce);return}const It=at.current.find(tn=>sa(tn,T).toLowerCase()===Ce.toLowerCase()||Bt(tn,_).toLowerCase()===Ce.toLowerCase());It!=null&&(B(It!==J.initialValue),fo==null||fo(It,Ue),oe()&&we.commit(It))}y?Xe():(os(),queueMicrotask(Xe))}}),id:Ne&&Il==null?`${Ne}-hidden-input`:void 0,form:g,name:Il,autoComplete:D,disabled:wt,required:x&&!ZC,readOnly:h,value:XC,ref:KC,style:Il?g1:h1,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),QC]});return p.jsx(Zd.Provider,{value:Be,children:p.jsx(Qd.Provider,{value:as,children:p.jsx(Jd.Provider,{value:qC,children:p.jsx(ef.Provider,{value:Ve,children:JC})})})})}const A1={...y3,..._3,popupSide:e=>e?{"data-popup-side":e}:null,listEmpty:e=>e?{"data-list-empty":""}:null};function F3(e){const t=e.getBoundingClientRect();if(process.env.NODE_ENV!=="production")return t;const n=Pt(e),r=n.getComputedStyle(e,"::before"),o=n.getComputedStyle(e,"::after");if(!(r.content!=="none"||o.content!=="none"))return t;const s=parseFloat(r.width)||0,i=parseFloat(r.height)||0,l=parseFloat(o.width)||0,c=parseFloat(o.height)||0,d=Math.max(t.width,s,l),u=Math.max(t.height,i,c),m=d-t.width,g=u-t.height;return{left:t.left-m/2,right:t.right+m/2,top:t.top-g/2,bottom:t.bottom+g/2}}function j1(e,t){return e??t}const Ns=2,z1=f.forwardRef(function(t,n){const{render:r,className:o,nativeButton:a=!0,disabled:s=!1,id:i,style:l,...c}=t,{state:d,disabled:u,setTouched:m,setFocused:g,validationMode:b,validation:h}=Ja(),{labelId:x}=of(),v=Zt(),{filteredItems:w}=_r(),y=K(v,Z.selectionMode),C=K(v,Z.disabled),E=K(v,Z.readOnly),S=K(v,Z.required),M=K(v,Z.mounted),R=K(v,Z.popupSide),I=K(v,Z.positionerElement),O=K(v,Z.listElement),_=K(v,Z.triggerProps),T=K(v,Z.triggerElement),k=K(v,Z.inputInsidePopup),j=K(v,Z.id),V=K(v,Z.labelId),z=K(v,Z.open),$=K(v,Z.selectedValue),F=K(v,Z.activeIndex),L=K(v,Z.selectedIndex),D=K(v,Z.hasSelectedValue),re=yl(),pe=tf(),G=wr(),B=u||C||s,J=w.length===0,oe=M&&I?R:null;_1({id:k?i:void 0});const U=k?i??j:i,H=j1(x,V),te=f.useRef("");function xe(se){te.current=se.pointerType}const Re=re.useState("domReferenceElement");f.useEffect(()=>{k&&T&&T!==Re&&re.set("domReferenceElement",T)},[T,Re,re,k]);const{reference:Y}=p3(re,{enabled:!z&&!E&&!C&&y==="single",listRef:v.state.labelsRef,activeIndex:F,selectedIndex:L,onMatch(se){const Ae=v.state.valuesRef.current[se];Ae!==void 0&&v.state.setSelectedValue(Ae,Ge("none"))}}),{reference:we}=S1(re,{enabled:!E&&!C,event:"mousedown"}),{buttonRef:he,getButtonProps:Ne}=Za({native:a,disabled:B}),Me={...d,open:z,disabled:B,popupSide:oe,listEmpty:J,placeholder:y==="none"?!1:!D},fe=De(se=>{v.set("triggerElement",se)});return Vt("button",t,{ref:[n,he,fe],state:Me,props:[_,we,Y,{id:U,tabIndex:k?0:-1,role:k?"combobox":void 0,"aria-expanded":z?"true":"false","aria-haspopup":k?"dialog":"listbox","aria-controls":z?O==null?void 0:O.id:void 0,"aria-required":k&&S||void 0,"aria-labelledby":H,onPointerDown:xe,onPointerEnter:xe,onFocus(){g(!0),!(B||E)&&G.start(0,v.state.forceMount)},onBlur(se){if(!He(I,se.relatedTarget)&&(m(!0),g(!1),b==="onBlur")){const Ae=y==="none"?pe:$;h.commit(Ae)}},onMouseDown(se){var je;if(B||E||(k||re.set("domReferenceElement",se.currentTarget),v.state.forceMount(),te.current!=="touch"&&((je=v.state.inputRef.current)==null||je.focus(),k||se.preventDefault()),z))return;const Ae=it(se.currentTarget);function Ke(Pe){if(!T)return;const ae=qt(Pe),A=v.state.positionerElement,W=v.state.listElement;if(He(T,ae)||He(A,ae)||He(W,ae)||ae===T)return;const X=F3(T),le=Pe.clientX>=X.left-Ns&&Pe.clientX<=X.right+Ns,Te=Pe.clientY>=X.top-Ns&&Pe.clientY<=X.bottom+Ns;le&&Te||v.state.setOpen(!1,Ge("cancel-open",Pe))}k&&Ae.addEventListener("mouseup",Ke,{once:!0})},onKeyDown(se){var Ae;B||E||(se.key==="ArrowDown"||se.key==="ArrowUp")&&(pt(se),v.state.setOpen(!0,Ge(ui,se.nativeEvent)),(Ae=v.state.inputRef.current)==null||Ae.focus())}},h?h.getValidationProps(c):c,Ne],stateAttributesMapping:A1})});process.env.NODE_ENV!=="production"&&(z1.displayName="ComboboxTrigger");const af=f.createContext(void 0);process.env.NODE_ENV!=="production"&&(af.displayName="ComboboxChipsContext");function $1(){return f.useContext(af)}const sf=f.createContext(void 0);process.env.NODE_ENV!=="production"&&(sf.displayName="ComboboxPositionerContext");function lf(e){const t=f.useContext(sf);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Combobox.Popup> and <Combobox.Arrow> must be used within the <Combobox.Positioner> component":mn(21));return t}const cf=f.forwardRef(function(t,n){const r=Zt(),{buttonRef:o,getButtonProps:a}=Za({native:!1}),s=Lo(n,o);function i(c){r.state.setOpen(!1,Ge(Wj,c.nativeEvent,c.currentTarget))}const l=a({onClick:i});return p.jsx("span",{ref:s,...l,"aria-label":"Dismiss",tabIndex:void 0,style:g1})});process.env.NODE_ENV!=="production"&&(cf.displayName="ComboboxInternalDismissButton");const uf=f.forwardRef(function(t,n){const{render:r,className:o,disabled:a=!1,id:s,style:i,...l}=t,{state:c,disabled:d,setTouched:u,setFocused:m,validationMode:g,validation:b}=Ja(),{labelId:h}=of(),x=$1(),w=!!lf(!0),y=Zt(),{filteredItems:C}=_r(),E=tf(),S=pl(),M=K(y,Z.required),R=K(y,Z.disabled),I=K(y,Z.readOnly),O=K(y,Z.name),_=K(y,Z.form),T=K(y,Z.selectionMode),k=K(y,Z.autoHighlight),j=K(y,Z.inputProps),V=K(y,Z.triggerProps),z=K(y,Z.open),$=K(y,Z.mounted),F=K(y,Z.selectedValue),L=K(y,Z.popupSide),D=K(y,Z.positionerElement),re=K(y,Z.id),pe=K(y,Z.inline),G=K(y,Z.modal),B=!!k,J=$&&D?L:null,oe=d||R||a,U=C.length===0,H=w||pe,te=!H||G,xe=Ld(s??(H?void 0:re)),Re=j1(h,void 0),Y=w?So:c,[we,he]=f.useState(null),Ne=f.useRef(!1),Me=f.useRef(null),fe=f.useRef(!1),Oe=T==="none"&&!w,se=De(A=>{const W=w||y.state.inline;W&&!y.state.hasInputValue&&y.state.setInputValue("",Ge(xn)),y.update({inputElement:A,inputInsidePopup:W,inputOwnsFormValue:Oe})}),Ae=w||!b?l:b.getValidationProps(l),Ke={...Y,open:z,disabled:oe,readOnly:I,popupSide:J,listEmpty:U};function je(A){if(!x)return;let W;const{highlightedChipIndex:X}=x,le=x.chipsRef.current.length,Te=S==="rtl",Le=Te?"ArrowRight":"ArrowLeft",tt=Te?"ArrowLeft":"ArrowRight";if(X!==void 0){if(A.key===Le)A.preventDefault(),X>0?W=X-1:W=void 0;else if(A.key===tt)A.preventDefault(),X<le-1?W=X+1:W=void 0;else if(A.key==="Backspace"||A.key==="Delete"){A.preventDefault();const Fe=X>=F.length-1?F.length-2:X;W=Fe>=0?Fe:void 0,y.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"})}return W}return A.key===Le&&(A.currentTarget.selectionStart??0)===0&&F.length>0?(A.preventDefault(),W=le>0?le-1:void 0):A.key==="Backspace"&&A.currentTarget.value===""&&F.length>0&&(y.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"}),A.preventDefault()),W}const Pe=Vt("input",t,{state:Ke,ref:[n,y.state.inputRef,se],props:[j,V,{type:"text",value:t.value??we??E,"aria-readonly":I||void 0,"aria-required":M||void 0,"aria-labelledby":Re,disabled:oe,readOnly:I,required:T==="none"?M:void 0,form:_,...Oe&&O&&{name:O},id:xe,onFocus(){if(m(!0),!pe||!fe.current)return;fe.current=!1;const A=Me.current;A==null||!Object.hasOwn(y.state.valuesRef.current,A)||y.state.setIndices({activeIndex:A})},onBlur(){u(!0),m(!1);const A=y.state.activeIndex;if(pe&&A!==null&&k!=="always"&&(Me.current=A,fe.current=!0,y.state.setIndices({activeIndex:null})),g==="onBlur"){const W=T==="none"?E:F;b.commit(W)}},onCompositionStart(A){di||(Ne.current=!0,he(A.currentTarget.value))},onCompositionEnd(A){Ne.current=!1;const W=A.currentTarget.value;he(null),y.state.setInputValue(W,Ge(Co,A.nativeEvent))},onChange(A){const W=A.nativeEvent.inputType,X=!W||W==="insertReplacementText",le=Ne.current||!X;if(Ne.current){const Fe=A.currentTarget.value;he(Fe),Fe===""&&!y.state.openOnInputClick&&!y.state.inputInsidePopup&&y.state.setOpen(!1,Ge(Gn,A.nativeEvent));const Ie=Fe.trim(),Ze=B&&Ie!=="";!I&&!oe&&Ie&&le&&(y.state.setOpen(!0,Ge(Co,A.nativeEvent)),B||y.state.setIndices({activeIndex:null,selectedIndex:null,type:y.state.keyboardActiveRef.current?"keyboard":"pointer"})),z&&y.state.activeIndex!==null&&!Ze&&y.state.setIndices({activeIndex:null,selectedIndex:null,type:y.state.keyboardActiveRef.current?"keyboard":"pointer"});return}y.state.setInputValue(A.currentTarget.value,Ge(Co,A.nativeEvent));const Te=A.currentTarget.value==="",Le=Ge(Gn,A.nativeEvent);Te&&!y.state.inputInsidePopup&&(T==="single"&&y.state.setSelectedValue(null,Le),y.state.openOnInputClick||y.state.setOpen(!1,Le));const tt=A.currentTarget.value.trim();!I&&!oe&&tt&&le&&(y.state.setOpen(!0,Ge(Co,A.nativeEvent)),B||y.state.setIndices({activeIndex:null,selectedIndex:null,type:y.state.keyboardActiveRef.current?"keyboard":"pointer"})),z&&y.state.activeIndex!==null&&!B&&y.state.setIndices({activeIndex:null,selectedIndex:null,type:y.state.keyboardActiveRef.current?"keyboard":"pointer"})},onKeyDown(A){var tt,Fe;if(oe||I||A.ctrlKey||A.shiftKey||A.altKey||A.metaKey)return;y.state.keyboardActiveRef.current=!0;const W=A.currentTarget,X=W.scrollWidth-W.clientWidth,le=S==="rtl";if(A.key==="Home"){pt(A);const Ie=pm&&le?W.value.length:0;W.setSelectionRange(Ie,Ie),W.scrollLeft=0;return}if(A.key==="End"){pt(A);const Ie=pm&&le?0:W.value.length;W.setSelectionRange(Ie,Ie),W.scrollLeft=le?-X:X;return}if(!$&&A.key==="Escape"){const Ie=T==="multiple"&&Array.isArray(F)?F.length===0:F===null,Ze=Ge(Kw,A.nativeEvent),at=T==="multiple"?[]:null;y.state.setInputValue("",Ze),y.state.setSelectedValue(at,Ze),!Ie&&!y.state.inline&&!Ze.isPropagationAllowed&&A.stopPropagation();return}if(x&&A.key==="Backspace"&&W.value===""&&x.highlightedChipIndex===void 0&&Array.isArray(F)&&F.length>0){const Ie=x.chipsRef.current.length,Ze=Ie>0?Ie-1:F.length-1,at=F.filter((Qt,wt)=>wt!==Ze);y.state.setIndices({activeIndex:null,selectedIndex:null,type:y.state.keyboardActiveRef.current?"keyboard":"pointer"}),y.state.setSelectedValue(at,Ge(xn,A.nativeEvent));return}const Te=(x==null?void 0:x.highlightedChipIndex)!==void 0,Le=je(A);if(x==null||x.setHighlightedChipIndex(Le),Le!==void 0?(tt=x==null?void 0:x.chipsRef.current[Le])==null||tt.focus():Te&&((Fe=y.state.inputRef.current)==null||Fe.focus()),A.which!==229&&A.key==="Enter"&&z){const Ie=y.state.activeIndex,Ze=A.nativeEvent;if(Ie===null){if(pe)return;y.state.setOpen(!1,Ge(xn,Ze));return}pt(A);const at=y.state.listRef.current[Ie];at&&(y.state.selectionEventRef.current=Ze,at.click(),y.state.selectionEventRef.current=null)}},onPointerMove(){y.state.keyboardActiveRef.current=!1},onPointerDown(){y.state.keyboardActiveRef.current=!1}},Ae],stateAttributesMapping:A1}),ae=w?p.jsx(rf.Provider,{value:N1,children:Pe}):Pe;return p.jsxs(f.Fragment,{children:[z&&te&&p.jsx(cf,{ref:y.state.startDismissRef}),ae]})});process.env.NODE_ENV!=="production"&&(uf.displayName="ComboboxInput");function V3(e,t,n,r,o){var i;if(e.baseUIHandlerPrevented||r)return;const a=qt(e.nativeEvent),s=ut(a)?a:null;s!==e.currentTarget&&o4(s)||(e.preventDefault(),!n&&((i=t.state.inputRef.current)==null||i.focus(),t.state.openOnInputClick&&t.state.setOpen(!0,Ge(Uw,e.nativeEvent))))}const W3={...Vd,...x3},L1=f.forwardRef(function(t,n){const{render:r,className:o,disabled:a=!1,nativeButton:s=!0,keepMounted:i=!1,style:l,...c}=t,{disabled:d}=Ja(),u=Zt(),m=K(u,Z.selectionMode),g=K(u,Z.disabled),b=K(u,Z.readOnly),h=K(u,Z.open),x=K(u,Z.selectedValue),v=K(u,Z.hasSelectionChips),w=tf();let y=!1;m==="none"?y=w!=="":m==="single"?y=x!=null:y=v;const C=d||g||a,{buttonRef:E,getButtonProps:S}=Za({native:s,disabled:C}),{mounted:M,transitionStatus:R,setMounted:I}=Fd(y),O={disabled:C,visible:y,open:h,transitionStatus:R};bl({open:y,ref:u.state.clearRef,onComplete(){y||I(!1)}});const _=Vt("button",t,{state:O,ref:[n,E,u.state.clearRef],props:[{tabIndex:-1,children:"x",onMouseDown(k){k.preventDefault()},onClick(k){var V;if(C||b)return;const j=u.state.keyboardActiveRef;u.state.setInputValue("",Ge(cm,k.nativeEvent)),m!=="none"?(u.state.setSelectedValue(Array.isArray(x)?[]:null,Ge(cm,k.nativeEvent)),u.state.setIndices({activeIndex:null,selectedIndex:null,type:j.current?"keyboard":"pointer"})):u.state.setIndices({activeIndex:null,type:j.current?"keyboard":"pointer"}),(V=u.state.inputRef.current)==null||V.focus()}},c,S],stateAttributesMapping:W3});return i||M?_:null});process.env.NODE_ENV!=="production"&&(L1.displayName="ComboboxClear");const df=f.createContext(null);process.env.NODE_ENV!=="production"&&(df.displayName="GroupCollectionContext");function B3(){return f.useContext(df)}function H3(e){const{children:t,items:n}=e,r=f.useMemo(()=>({items:n}),[n]);return p.jsx(df.Provider,{value:r,children:t})}function F1(e){const{children:t}=e,{filteredItems:n}=_r(),r=B3(),o=r?r.items:n;return o?p.jsx(f.Fragment,{children:o.map(t)}):null}const V1=f.forwardRef(function(t,n){var r;const{render:o,className:a,style:s,children:i,...l}=t,c=Zt(),d=yl(),u=!!lf(!0),{filteredItems:m,hasItems:g}=_r(),b=K(c,Z.selectionMode),h=K(c,Z.grid),x=K(c,Z.popupProps),v=K(c,Z.virtualized),w=b==="multiple",y=m.length===0,C=De(O=>{c.set("positionerElement",O)}),E=De(O=>{c.set("listElement",O)}),S=f.useMemo(()=>typeof i=="function"?r||(r=p.jsx(F1,{children:i})):i,[i]),M={empty:y},R=d.useState("floatingId"),I=Vt("div",t,{state:M,ref:[n,E,u?null:C],props:[x,{children:S,tabIndex:-1,id:R,role:h?"grid":"listbox","aria-multiselectable":w?"true":void 0,onKeyDown(O){if(!(c.state.disabled||c.state.readOnly)&&O.key==="Enter"){const _=c.state.activeIndex;if(_==null)return;pt(O);const T=O.nativeEvent,k=c.state.listRef.current[_];k&&(c.state.selectionEventRef.current=T,k.click(),c.state.selectionEventRef.current=null)}},onKeyDownCapture(){c.state.keyboardActiveRef.current=!0},onPointerMoveCapture(){c.state.keyboardActiveRef.current=!1}},l]});return v?I:p.jsx(zw,{elementsRef:c.state.listRef,labelsRef:g?void 0:c.state.labelsRef,children:I})});process.env.NODE_ENV!=="production"&&(V1.displayName="ComboboxList");const G3="",Y3=200;function U3(e){const t=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT);let n=null;for(;t.nextNode();){const r=t.currentNode;r.nodeValue!==""&&(n=r)}return n}function K3(){const e=wr(),t=f.useRef(null);return f.useEffect(()=>{if(Bd)return;const n=t.current;if(n==null)return;const r=U3(n);if(r==null)return;const o=r.nodeValue??"",a=`${o}${G3}`;return r.nodeValue=a,e.start(Y3,()=>{r.nodeValue===a&&(r.nodeValue=o)}),()=>{e.clear(),r.nodeValue===a&&(r.nodeValue=o)}},[t,e]),t}const ff=f.createContext(void 0);process.env.NODE_ENV!=="production"&&(ff.displayName="ComboboxPortalContext");function q3(){const e=f.useContext(ff);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: <Combobox.Portal> is missing.":mn(20));return e}const W1=f.forwardRef(function(t,n){const{keepMounted:r=!1,...o}=t,a=Zt(),s=K(a,Z.mounted),i=K(a,Z.forceMounted);return s||r||i?p.jsx(ff.Provider,{value:r,children:p.jsx(x1,{ref:n,...o})}):null});process.env.NODE_ENV!=="production"&&(W1.displayName="ComboboxPortal");const X3=e=>({name:"arrow",options:e,async fn(t){var L,D;const{x:n,y:r,placement:o,rects:a,platform:s,elements:i,middlewareData:l}=t,{element:c,padding:d=0,offsetParent:u="real"}=An(e,t)||{};if(c==null)return{};const m=Gu(d),g={x:n,y:r},b=Di(o),h=Oi(b),x=await s.getDimensions(c),v=b==="y",w=v?"top":"left",y=v?"bottom":"right",C=v?"clientHeight":"clientWidth",E=a.reference[h]+a.reference[b]-g[b]-a.floating[h],S=g[b]-a.reference[b],M=u==="real"?await((L=s.getOffsetParent)==null?void 0:L.call(s,c)):i.floating;let R=i.floating[C]||a.floating[h];(!R||!await((D=s.isElement)==null?void 0:D.call(s,M)))&&(R=i.floating[C]||a.floating[h]);const I=E/2-S/2,O=R/2-x[h]/2-1,_=Math.min(m[w],O),T=Math.min(m[y],O),k=_,j=R-x[h]-T,V=R/2-x[h]/2+I,z=qs(k,V,j),$=!l.arrow&&nr(o)!=null&&V!==z&&a.reference[h]/2-(V<k?_:T)-x[h]/2<0,F=$?V<k?V-k:V-j:0;return{[b]:g[b]+F,data:{[b]:z,centerOffset:V-z-F,...$&&{alignmentOffset:F}},reset:$}}}),Z3=(e,t)=>({...X3(e),options:[e,t]}),Q3={name:"hide",async fn(e){var i;const{width:t,height:n,x:r,y:o}=e.rects.reference,a=t===0&&n===0&&r===0&&o===0;return{data:{referenceHidden:((i=(await Tb().fn(e)).data)==null?void 0:i.referenceHidden)||a}}}},J3={sideX:"left",sideY:"top"};function B1(e,t,n){const r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function Am(e,t,n){const{rects:r,placement:o}=e;return{side:B1(t,an(o),n),align:nr(o)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function ez(e){var Qe,bt;const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,collisionBoundary:i,collisionPadding:l=5,sticky:c=!1,arrowPadding:d=5,disableAnchorTracking:u=!1,inline:m,keepMounted:g=!1,floatingRootContext:b,mounted:h,collisionAvoidance:x,shiftCrossAxis:v=!1,nodeId:w,adaptiveOrigin:y,lazyFlip:C=!1,externalTree:E}=e,[S,M]=f.useState(null);!h&&S!==null&&M(null);const R=x.side||"flip",I=x.align||"flip",O=x.fallbackAxisSide||"end",_=typeof t=="function"?t:void 0,T=De(_),k=_?T:t,j=on(t),V=on(h),$=pl()==="rtl",F=S||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":$?"left":"right","inline-start":$?"right":"left"}[r],L=a==="center"?F:`${F}-${a}`;let D=l;const re=1,pe=r==="bottom"?re:0,G=r==="top"?re:0,B=r==="right"?re:0,J=r==="left"?re:0;typeof D=="number"?D={top:D+pe,right:D+J,bottom:D+G,left:D+B}:D&&(D={top:(D.top||0)+pe,right:(D.right||0)+J,bottom:(D.bottom||0)+G,left:(D.left||0)+B});const oe={boundary:i==="clipping-ancestors"?"clippingAncestors":i,padding:D},U=f.useRef(null),H=on(o),te=on(s),xe=typeof o!="function"?o:0,Re=typeof s!="function"?s:0,Y=[];m&&Y.push(m),Y.push(Mb(ie=>{const ye=Am(ie,r,$),Se=typeof H.current=="function"?H.current(ye):H.current,ee=typeof te.current=="function"?te.current(ye):te.current;return{mainAxis:Se,crossAxis:ee,alignmentAxis:ee}},[xe,Re,$,r]));const we=I==="none"&&R!=="shift",he=!we&&(c||v||R==="shift"),Ne=R==="none"?null:Pb({...oe,padding:{top:D.top+re,right:D.right+re,bottom:D.bottom+re,left:D.left+re},mainAxis:!v&&R==="flip",crossAxis:I==="flip"?"alignment":!1,fallbackAxisSideDirection:O}),Me=we?null:Rb(ie=>{const ye=it(ie.elements.floating).documentElement;return{...oe,rootBoundary:v?{x:0,y:0,width:ye.clientWidth,height:ye.clientHeight}:void 0,mainAxis:I!=="none",crossAxis:he,limiter:c||v?void 0:kb(Se=>{if(!U.current)return{};const{width:ee,height:q}=U.current.getBoundingClientRect(),We=un(an(Se.placement)),Ee=We==="y"?ee:q,Dt=We==="y"?D.left+D.right:D.top+D.bottom;return{offset:Ee/2+Dt/2}})}},[oe,c,v,D,I]);R==="shift"||I==="shift"||a==="center"?Y.push(Me,Ne):Y.push(Ne,Me),Y.push(Nb({...oe,apply({elements:{floating:ie},availableWidth:ye,availableHeight:Se,rects:ee}){if(!V.current)return;const q=ie.style;q.setProperty("--available-width",`${ye}px`),q.setProperty("--available-height",`${Se}px`);const We=Pt(ie).devicePixelRatio||1,{x:Ee,y:Dt,width:Ve,height:Ct}=ee.reference,qe=(Math.round((Ee+Ve)*We)-Math.round(Ee*We))/We,vt=(Math.round((Dt+Ct)*We)-Math.round(Dt*We))/We;q.setProperty("--anchor-width",`${qe}px`),q.setProperty("--anchor-height",`${vt}px`)}}),Z3(ie=>({element:U.current||it(ie.elements.floating).createElement("div"),padding:d,offsetParent:"floating"}),[d]),{name:"transformOrigin",fn(ie){var Be,Wn,ts;const{elements:ye,middlewareData:Se,placement:ee,rects:q,y:We}=ie,Ee=an(ee),Dt=un(Ee),Ve=U.current,Ct=((Be=Se.arrow)==null?void 0:Be.x)||0,qe=((Wn=Se.arrow)==null?void 0:Wn.y)||0,vt=(Ve==null?void 0:Ve.clientWidth)||0,dt=(Ve==null?void 0:Ve.clientHeight)||0,xt=Ct+vt/2,Ut=qe+dt/2,qo=Math.abs(((ts=Se.shift)==null?void 0:ts.y)||0),Or=q.reference.height/2,rr=typeof o=="function"?o(Am(ie,r,$)):o,or=qo>rr,Dr={top:`${xt}px calc(100% + ${rr}px)`,bottom:`${xt}px ${-rr}px`,left:`calc(100% + ${rr}px) ${Ut}px`,right:`${-rr}px ${Ut}px`}[Ee],Jt=`${xt}px ${q.reference.y+Or-We}px`;return ye.floating.style.setProperty("--transform-origin",he&&Dt==="y"&&or?Jt:Dr),{}}},Q3,y),ke(()=>{!h&&b&&b.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[h,b]);const fe=f.useMemo(()=>({elementResize:!u&&typeof ResizeObserver<"u",layoutShift:!u&&typeof IntersectionObserver<"u"}),[u]),{refs:Oe,elements:se,x:Ae,y:Ke,middlewareData:je,update:Pe,placement:ae,context:A,isPositioned:W,floatingStyles:X}=l3({rootContext:b,open:g?h:void 0,placement:L,middleware:Y,strategy:n,whileElementsMounted:g?void 0:(...ie)=>Uc(...ie,fe),nodeId:w,externalTree:E}),{sideX:le,sideY:Te}=je.adaptiveOrigin||J3,Le=W?n:"fixed",tt=f.useMemo(()=>{const ie=y?{position:Le,[le]:Ae,[Te]:Ke}:{position:Le,...X};return W||(ie.opacity=0),ie},[y,Le,le,Ae,Te,Ke,X,W]),Fe=f.useRef(null);ke(()=>{if(!h)return;const ie=j.current,ye=typeof ie=="function"?ie():ie,ee=(jm(ye)?ye.current:ye)||null||null;ee!==Fe.current&&(Oe.setPositionReference(ee),Fe.current=ee)},[h,Oe,k,j]),f.useEffect(()=>{if(!h)return;const ie=j.current;typeof ie!="function"&&jm(ie)&&ie.current!==Fe.current&&(Oe.setPositionReference(ie.current),Fe.current=ie.current)},[h,Oe,k,j]),f.useEffect(()=>{if(g&&h&&se.domReference&&se.floating)return Uc(se.domReference,se.floating,Pe,fe)},[g,h,se,Pe,fe]);const Ie=an(ae),Ze=B1(r,Ie,$),at=nr(ae)||"center",Qt=!!((Qe=je.hide)!=null&&Qe.referenceHidden);ke(()=>{C&&h&&W&&M(Ie)},[C,h,W,Ie]);const wt=f.useMemo(()=>{var ie,ye;return{position:"absolute",top:(ie=je.arrow)==null?void 0:ie.y,left:(ye=je.arrow)==null?void 0:ye.x}},[je.arrow]),gt=((bt=je.arrow)==null?void 0:bt.centerOffset)!==0;return f.useMemo(()=>({positionerStyles:tt,arrowStyles:wt,arrowRef:U,arrowUncentered:gt,side:Ze,align:at,physicalSide:Ie,anchorHidden:Qt,refs:Oe,context:A,isPositioned:W,update:Pe}),[tt,wt,U,gt,Ze,at,Ie,Qt,Oe,A,W,Pe])}function jm(e){return e!=null&&"current"in e}function H1(e){return e==="starting"?T4:Ht}function tz(e,t,{styles:n,transitionStatus:r,props:o,refs:a,hidden:s,inert:i=!1}){const l={...n};return i&&(l.pointerEvents="none"),Vt("div",e,{state:t,ref:a,props:[{role:"presentation",hidden:s,style:l},H1(r),o],stateAttributesMapping:R1})}const nz=20;function rz(e,t,n,r){const[o,a]=f.useState(!1);ke(()=>{if(!e||!t||n==null){a(!1);return}const s=it(n).documentElement.clientWidth,i=n.offsetWidth;a(s>0&&i>0&&i>=s-nz)},[e,t,n]),k4(e&&(!t||o),r)}const G1=f.forwardRef(function(t,n){const{render:r,className:o,anchor:a,positionMethod:s="absolute",side:i="bottom",align:l="center",sideOffset:c=0,alignOffset:d=0,collisionBoundary:u="clipping-ancestors",collisionPadding:m=5,arrowPadding:g=5,sticky:b=!1,disableAnchorTracking:h=!1,collisionAvoidance:x=_4,style:v,...w}=t,y=Zt(),{filteredItems:C}=_r(),E=yl(),S=q3(),M=K(y,Z.modal),R=K(y,Z.open),I=K(y,Z.mounted),O=K(y,Z.openMethod),_=K(y,Z.positionerElement),T=K(y,Z.triggerElement),k=K(y,Z.inputElement),j=K(y,Z.inputGroupElement),V=K(y,Z.inputInsidePopup),z=K(y,Z.transitionStatus),$=C.length===0,L=ez({anchor:a??(V?T:j??k),floatingRootContext:E,positionMethod:s,mounted:I,side:i,sideOffset:c,align:l,alignOffset:d,arrowPadding:g,collisionBoundary:u,collisionPadding:m,sticky:b,disableAnchorTracking:h,keepMounted:S,collisionAvoidance:x,lazyFlip:!0});rz(R&&M,O==="touch",_,T);const D={open:R,side:L.side,align:L.align,anchorHidden:L.anchorHidden,empty:$};ke(()=>{y.set("popupSide",L.side)},[y,L.side]);const re=De(G=>{y.set("positionerElement",G)}),pe=tz(t,D,{styles:L.positionerStyles,transitionStatus:z,props:w,refs:[n,re],hidden:!I,inert:!R});return p.jsxs(sf.Provider,{value:L,children:[I&&M&&p.jsx(k1,{inert:w3(!R),cutout:j??k??T}),pe]})});process.env.NODE_ENV!=="production"&&(G1.displayName="ComboboxPositioner");const oz={...R1,...Vd},Y1=f.forwardRef(function(t,n){const{render:r,className:o,style:a,initialFocus:s,finalFocus:i,...l}=t,c=Zt(),d=lf(),u=yl(),{filteredItems:m}=_r(),g=K(c,Z.mounted),b=K(c,Z.open),h=K(c,Z.openMethod),x=K(c,Z.transitionStatus),v=K(c,Z.inputInsidePopup),w=K(c,Z.inputElement),y=K(c,Z.modal),C=m.length===0;bl({open:b,ref:c.state.popupRef,onComplete(){b&&c.state.onOpenChangeComplete(!0)}});const E={open:b,side:d.side,align:d.align,anchorHidden:d.anchorHidden,transitionStatus:x,empty:C},S=Vt("div",t,{state:E,ref:[n,c.state.popupRef],props:[{role:v?"dialog":"presentation",tabIndex:-1,onFocus(_){var k;const T=qt(_.nativeEvent);h!=="touch"&&(He(c.state.listElement,T)||T===_.currentTarget)&&((k=c.state.inputRef.current)==null||k.focus())}},H1(x),l],stateAttributesMapping:oz}),R=s===void 0?v?_=>_==="touch"?c.state.popupRef.current:w:!1:s;let I;i!=null?I=i:I=v?void 0:!1;const O=!v||y;return p.jsx(F4,{context:u,disabled:!g,modal:O,openInteractionType:h,initialFocus:R,returnFocus:I,getInsideElements:()=>[c.state.startDismissRef.current,c.state.endDismissRef.current],children:p.jsxs(f.Fragment,{children:[S,O&&p.jsx(cf,{ref:c.state.endDismissRef})]})})});process.env.NODE_ENV!=="production"&&(Y1.displayName="ComboboxPopup");const pf=f.createContext(void 0);process.env.NODE_ENV!=="production"&&(pf.displayName="ComboboxGroupContext");function az(){const e=f.useContext(pf);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxGroupContext is missing. ComboboxGroup parts must be placed within <Combobox.Group>.":mn(18));return e}const U1=f.forwardRef(function(t,n){const{render:r,className:o,style:a,items:s,...i}=t,[l,c]=f.useState(),d=f.useMemo(()=>({labelId:l,setLabelId:c,items:s}),[l,c,s]),u=Vt("div",t,{ref:n,props:[{role:"group","aria-labelledby":l},i]}),m=p.jsx(pf.Provider,{value:d,children:u});return s?p.jsx(H3,{items:s,children:m}):m});process.env.NODE_ENV!=="production"&&(U1.displayName="ComboboxGroup");const K1=f.forwardRef(function(t,n){const{render:r,className:o,style:a,id:s,...i}=t,{setLabelId:l}=az(),c=Ld(s);return ke(()=>(l(c),()=>{l(void 0)}),[c,l]),Vt("div",t,{ref:n,props:[{id:c},i]})});process.env.NODE_ENV!=="production"&&(K1.displayName="ComboboxGroupLabel");const mf=f.createContext(void 0);process.env.NODE_ENV!=="production"&&(mf.displayName="ComboboxItemContext");function q1(){const e=f.useContext(mf);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ComboboxItemContext is missing. ComboboxItem parts must be placed within <Combobox.Item>.":mn(19));return e}const X1=f.createContext(!1);process.env.NODE_ENV!=="production"&&(X1.displayName="ComboboxRowContext");function sz(){return f.useContext(X1)}const Z1=f.memo(f.forwardRef(function(t,n){const{render:r,className:o,style:a,value:s=null,index:i,disabled:l=!1,nativeButton:c=!1,...d}=t,u=f.useRef(!1),m=f.useRef(null),g=Zw({index:i,textRef:m,indexGuessBehavior:Xw.GuessFromOrder}),b=Zt(),h=sz(),{flatFilteredItems:x,hasItems:v}=_r(),w=K(b,Z.open),y=K(b,Z.selectionMode),C=K(b,Z.readOnly),E=K(b,Z.virtualized),S=K(b,Z.isItemEqualToValue),M=y!=="none",R=i??(E?mi(x,s,S):g.index),I=g.index!==-1,O=K(b,Z.id),_=K(b,Z.isActive,R),T=K(b,Z.isSelected,s),k=K(b,Z.itemProps),j=f.useRef(null),V=O!=null&&I?`${O}-${R}`:void 0,z=T&&M;ke(()=>{if(!(I&&(E||i!=null)))return;const J=b.state.listRef.current;return J[R]=j.current,()=>{delete J[R]}},[I,E,R,i,b]),ke(()=>{if(!I||v)return;const B=b.state.valuesRef.current;return B[R]=s,y!=="none"&&b.state.allValuesRef.current.push(s),()=>{delete B[R]}},[I,v,R,s,b,y]),ke(()=>{if(!w){u.current=!1;return}if(!I||v)return;const B=b.state.selectedValue,J=Array.isArray(B)?B[B.length-1]:B;qr(s,J,S)&&b.set("selectedIndex",R)},[I,v,w,b,R,s,S]);const{getButtonProps:$,buttonRef:F}=Za({disabled:l,focusableWhenDisabled:!0,native:c,composite:!0}),L={disabled:l,selected:z,highlighted:_};function D(B){function J(){b.state.handleSelection(B,s)}b.state.submitOnItemClick?(jn.flushSync(J),b.state.requestSubmit()):J()}const re={id:V,role:h?"gridcell":"option","aria-selected":M?z:void 0,tabIndex:void 0,onPointerDownCapture(B){u.current=!0,B.preventDefault()},onMouseDown(B){B.preventDefault()},onClick(B){l||C||D(B.nativeEvent)},onMouseUp(B){const J=u.current;u.current=!1,!(l||C||B.button!==0||J||!_)&&D(B.nativeEvent)}},pe=Vt("div",t,{ref:[F,n,g.ref,j],state:L,props:[k,re,d,$]}),G=f.useMemo(()=>({selected:z,textRef:m}),[z,m]);return p.jsx(mf.Provider,{value:G,children:pe})}));process.env.NODE_ENV!=="production"&&(Z1.displayName="ComboboxItem");const Q1=f.forwardRef(function(t,n){const{render:r,className:o,style:a,children:s,...i}=t,{filteredItems:l}=_r(),c=Zt(),d=K3(),u=l.length===0?s:null;return Vt("div",t,{ref:[n,c.state.emptyRef,d],props:[{children:u,role:"status","aria-live":"polite","aria-atomic":!0},i]})});process.env.NODE_ENV!=="production"&&(Q1.displayName="ComboboxEmpty");const J1=f.forwardRef(function(t,n){const{className:r,render:o,orientation:a="horizontal",style:s,...i}=t;return Vt("div",t,{state:{orientation:a},ref:n,props:[{role:"separator","aria-orientation":a},i]})});process.env.NODE_ENV!=="production"&&(J1.displayName="Separator");function iz(e){const{multiple:t=!1,defaultValue:n,value:r,onValueChange:o,autoComplete:a,...s}=e;return p.jsx(L3,{...s,selectionMode:t?"multiple":"single",selectedValue:r,defaultSelectedValue:n,onSelectedValueChange:o,formAutoComplete:a})}function lz(e){const{children:t,placeholder:n}=e,r=Zt(),o=K(r,Z.itemToStringLabel),a=K(r,Z.selectedValue),s=K(r,Z.items),i=K(r,Z.selectionMode)==="multiple",l=K(r,Z.hasSelectedValue),c=!l&&n!=null&&t==null,d=K(r,Z.hasNullItemLabel,c);let u=null;return typeof t=="function"?u=t(a):t!=null?u=t:!l&&n!=null&&!d?u=n:i&&Array.isArray(a)?u=N3(a,s,o):u=P1(a,s,o),p.jsx(f.Fragment,{children:u})}const eC=f.forwardRef(function(t,n){const r=t.keepMounted??!1,{selected:o}=q1();return r||o?p.jsx(tC,{...t,ref:n}):null});process.env.NODE_ENV!=="production"&&(eC.displayName="ComboboxItemIndicator");const tC=f.memo(f.forwardRef((e,t)=>{const{render:n,className:r,style:o,keepMounted:a,...s}=e,{selected:i}=q1(),l=f.useRef(null),{transitionStatus:c,setMounted:d}=Fd(i),m=Vt("span",e,{ref:[t,l],state:{selected:i,transitionStatus:c},props:[{"aria-hidden":!0,children:"✔️"},s],stateAttributesMapping:Vd});return bl({open:i,ref:l,onComplete(){i||d(!1)}}),m}));process.env.NODE_ENV!=="production"&&(tC.displayName="Inner");const nC=f.forwardRef(function(t,n){const{render:r,className:o,style:a,...s}=t,i=Zt(),l=K(i,Z.open),c=K(i,Z.hasSelectionChips),[d,u]=f.useState(void 0);l&&d!==void 0&&u(void 0);const m=f.useRef([]),g=Vt("div",t,{ref:[n,i.state.chipsContainerRef],props:[c?{role:"toolbar"}:Ht,{onMouseDown(h){V3(h,i,i.state.disabled,i.state.readOnly)}},s]}),b=f.useMemo(()=>({highlightedChipIndex:d,setHighlightedChipIndex:u,chipsRef:m}),[d,u,m]);return p.jsx(af.Provider,{value:b,children:p.jsx(zw,{elementsRef:m,children:g})})});process.env.NODE_ENV!=="production"&&(nC.displayName="ComboboxChips");const hf=f.createContext(void 0);process.env.NODE_ENV!=="production"&&(hf.displayName="ComboboxChipContext");function cz(){const e=f.useContext(hf);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"useComboboxChipContext must be used within a ComboboxChip":mn(17));return e}const rC=f.forwardRef(function(t,n){const{render:r,className:o,style:a,...s}=t,i=Zt(),{setHighlightedChipIndex:l,chipsRef:c}=$1(),d=pl(),u=K(i,Z.disabled),m=K(i,Z.readOnly),g=K(i,Z.selectedValue),{ref:b,index:h}=Zw();function x(C){let E=h;const S=d==="rtl",M=S?"ArrowRight":"ArrowLeft",R=S?"ArrowLeft":"ArrowRight";if(C.key===M)C.preventDefault(),h>0?E=h-1:E=void 0;else if(C.key===R)C.preventDefault(),h<c.current.length-1?E=h+1:E=void 0;else if(C.key==="Backspace"||C.key==="Delete"){const I=h>=g.length-1?g.length-2:h;E=I>=0?I:void 0,pt(C),i.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"}),i.state.setSelectedValue(g.filter((O,_)=>_!==h),Ge(xn,C.nativeEvent))}else C.key==="Enter"||C.key===" "?(pt(C),E=void 0):C.key==="ArrowDown"||C.key==="ArrowUp"?(pt(C),i.state.setOpen(!0,Ge(ui,C.nativeEvent)),E=void 0):C.key.length===1&&!C.ctrlKey&&!C.metaKey&&!C.altKey&&(E=void 0);return E}const w=Vt("div",t,{ref:[n,b],state:{disabled:u},props:[{tabIndex:-1,"aria-disabled":u||void 0,"aria-readonly":m||void 0,onKeyDown(C){var S,M;if(u||m)return;const E=x(C);jn.flushSync(()=>{l(E)}),E===void 0?(S=i.state.inputRef.current)==null||S.focus():(M=c.current[E])==null||M.focus()}},s]}),y=f.useMemo(()=>({index:h}),[h]);return p.jsx(hf.Provider,{value:y,children:w})});process.env.NODE_ENV!=="production"&&(rC.displayName="ComboboxChip");const oC=f.forwardRef(function(t,n){const{render:r,className:o,disabled:a=!1,nativeButton:s=!0,style:i,...l}=t,c=Zt(),{index:d}=cz(),u=K(c,Z.disabled),m=K(c,Z.readOnly),g=K(c,Z.selectedValue),b=K(c,Z.isItemEqualToValue),h=u||a,{buttonRef:x,getButtonProps:v}=Za({native:s,disabled:h||m,focusableWhenDisabled:!0}),w={disabled:h};function y(S){const M=c.state.activeIndex;if(M==null)return;const R=mi(c.state.valuesRef.current,S,b);R!==-1&&M===R&&c.state.setIndices({activeIndex:null,type:c.state.keyboardActiveRef.current?"keyboard":"pointer"})}function C(S){var I;const M=Ge(Bj,S.nativeEvent),R=g[d];return y(R),c.state.setSelectedValue(g.filter((O,_)=>_!==d),M),(I=c.state.inputRef.current)==null||I.focus(),M}return Vt("button",t,{ref:[n,x],state:w,props:[{tabIndex:-1,onMouseDown(S){S.preventDefault()},onClick(S){if(h||m)return;C(S).isPropagationAllowed||S.stopPropagation()},onKeyDown(S){h||m||(S.key==="Enter"||S.key===" ")&&(C(S).isPropagationAllowed||pt(S))}},l,v]})});process.env.NODE_ENV!=="production"&&(oC.displayName="ComboboxChipRemove");function aC({className:e,...t}){return p.jsx("textarea",{"data-slot":"textarea",className:N("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",e),...t})}function sC({className:e,...t}){return p.jsx("div",{"data-slot":"input-group",role:"group",className:N("group/input-group relative flex w-full items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none dark:bg-input/30","h-9 min-w-0 has-[>textarea]:h-auto","has-[>[data-align=inline-start]]:[&>input]:pl-2","has-[>[data-align=inline-end]]:[&>input]:pr-2","has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3","has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3","has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-[3px] has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50","has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-destructive/20 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40",e),...t})}const uz=wn("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]","inline-end":"order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]","block-start":"order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5 [.border-b]:pb-3","block-end":"order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5 [.border-t]:pt-3"}},defaultVariants:{align:"inline-start"}});function iC({className:e,align:t="inline-start",...n}){return p.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:N(uz({align:t}),e),onClick:r=>{var o,a;r.target.closest("button")||(a=(o=r.currentTarget.parentElement)==null?void 0:o.querySelector("input"))==null||a.focus()},...n})}const dz=wn("flex items-center gap-2 text-sm shadow-none",{variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-2 has-[>svg]:px-2 [&>svg:not([class*='size-'])]:size-3.5",sm:"h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function gf({className:e,type:t="button",variant:n="ghost",size:r="xs",...o}){return p.jsx(Fn,{type:t,"data-size":r,variant:n,className:N(dz({size:r}),e),...o})}function fz({className:e,...t}){return p.jsx("span",{className:N("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",e),...t})}function lC({className:e,...t}){return p.jsx(Md,{"data-slot":"input-group-control",className:N("flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",e),...t})}function pz({className:e,...t}){return p.jsx(aC,{"data-slot":"input-group-control",className:N("flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent",e),...t})}const mz=iz;function hz({...e}){return p.jsx(lz,{"data-slot":"combobox-value",...e})}function cC({className:e,children:t,...n}){return p.jsxs(z1,{"data-slot":"combobox-trigger",className:N("[&_svg:not([class*='size-'])]:size-4",e),...n,children:[t,p.jsx(il,{"data-slot":"combobox-trigger-icon",className:"pointer-events-none size-4 text-muted-foreground"})]})}function gz({className:e,...t}){return p.jsx(L1,{"data-slot":"combobox-clear",render:p.jsx(gf,{variant:"ghost",size:"icon-xs"}),className:N(e),...t,children:p.jsx(ll,{className:"pointer-events-none"})})}function bz({className:e,children:t,disabled:n=!1,showTrigger:r=!0,showClear:o=!1,...a}){return p.jsxs(sC,{className:N("w-auto",e),children:[p.jsx(uf,{render:p.jsx(lC,{disabled:n}),...a}),p.jsxs(iC,{align:"inline-end",children:[r&&p.jsx(gf,{size:"icon-xs",variant:"ghost",asChild:!0,"data-slot":"input-group-button",className:"group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent",disabled:n,children:p.jsx(cC,{})}),o&&p.jsx(gz,{disabled:n})]}),t]})}function vz({className:e,side:t="bottom",sideOffset:n=6,align:r="start",alignOffset:o=0,anchor:a,...s}){return p.jsx(W1,{children:p.jsx(G1,{side:t,sideOffset:n,align:r,alignOffset:o,anchor:a,className:"isolate z-50",children:p.jsx(Y1,{"data-slot":"combobox-content","data-chips":!!a,className:N("group/combobox-content relative max-h-96 w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) 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 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...s})})})}function xz({className:e,...t}){return p.jsx(V1,{"data-slot":"combobox-list",className:N("max-h-[min(calc(--spacing(96)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto p-1 data-empty:p-0",e),...t})}function yz({className:e,children:t,...n}){return p.jsxs(Z1,{"data-slot":"combobox-item",className:N("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[t,p.jsx(eC,{"data-slot":"combobox-item-indicator",render:p.jsx("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center"}),children:p.jsx(ao,{className:"pointer-events-none size-4 pointer-coarse:size-5"})})]})}function wz({className:e,...t}){return p.jsx(U1,{"data-slot":"combobox-group",className:N(e),...t})}function Cz({className:e,...t}){return p.jsx(K1,{"data-slot":"combobox-label",className:N("px-2 py-1.5 text-xs text-muted-foreground pointer-coarse:px-3 pointer-coarse:py-2 pointer-coarse:text-sm",e),...t})}function Sz({...e}){return p.jsx(F1,{"data-slot":"combobox-collection",...e})}function Ez({className:e,...t}){return p.jsx(Q1,{"data-slot":"combobox-empty",className:N("hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex",e),...t})}function Mz({className:e,...t}){return p.jsx(J1,{"data-slot":"combobox-separator",className:N("-mx-1 my-1 h-px bg-border",e),...t})}function Rz({className:e,...t}){return p.jsx(nC,{"data-slot":"combobox-chips",className:N("flex min-h-9 flex-wrap items-center gap-1.5 rounded-md border border-input bg-transparent bg-clip-padding px-2.5 py-1.5 text-sm shadow-xs transition-[color,box-shadow] focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-[3px] has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1.5 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40",e),...t})}function kz({className:e,children:t,showRemove:n=!0,...r}){return p.jsxs(rC,{"data-slot":"combobox-chip",className:N("flex h-[calc(--spacing(5.5))] w-fit items-center justify-center gap-1 rounded-sm bg-muted px-1.5 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0",e),...r,children:[t,n&&p.jsx(oC,{render:p.jsx(Fn,{variant:"ghost",size:"icon-xs"}),className:"-ml-1 opacity-50 hover:opacity-100","data-slot":"combobox-chip-remove",children:p.jsx(ll,{className:"pointer-events-none"})})]})}function Pz({className:e,children:t,...n}){return p.jsx(uf,{"data-slot":"combobox-chip-input",className:N("min-w-16 flex-1 outline-none",e),...n})}function Nz(){return f.useRef(null)}function Tz({...e}){return p.jsx(iT,{"data-slot":"context-menu",...e})}function Iz({...e}){return p.jsx(lT,{"data-slot":"context-menu-trigger",...e})}function _z({...e}){return p.jsx(uT,{"data-slot":"context-menu-group",...e})}function Oz({...e}){return p.jsx(Xv,{"data-slot":"context-menu-portal",...e})}function Dz({...e}){return p.jsx(bT,{"data-slot":"context-menu-sub",...e})}function Az({...e}){return p.jsx(mT,{"data-slot":"context-menu-radio-group",...e})}function jz({className:e,inset:t,children:n,...r}){return p.jsxs(vT,{"data-slot":"context-menu-sub-trigger","data-inset":t,className:N("flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",e),...r,children:[n,p.jsx(Ka,{className:"ml-auto"})]})}function zz({className:e,...t}){return p.jsx(xT,{"data-slot":"context-menu-sub-content",className:N("z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-lg 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",e),...t})}function $z({className:e,...t}){return p.jsx(Xv,{children:p.jsx(cT,{"data-slot":"context-menu-content",className:N("z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",e),...t})})}function Lz({className:e,inset:t,variant:n="default",...r}){return p.jsx(fT,{"data-slot":"context-menu-item","data-inset":t,"data-variant":n,className:N("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!",e),...r})}function Fz({className:e,children:t,checked:n,...r}){return p.jsxs(pT,{"data-slot":"context-menu-checkbox-item",className:N("relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...r,children:[p.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:p.jsx(Zv,{children:p.jsx(ao,{className:"size-4"})})}),t]})}function Vz({className:e,children:t,...n}){return p.jsxs(hT,{"data-slot":"context-menu-radio-item",className:N("relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[p.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:p.jsx(Zv,{children:p.jsx(ao,{className:"size-4"})})}),t]})}function Wz({className:e,inset:t,...n}){return p.jsx(dT,{"data-slot":"context-menu-label","data-inset":t,style:{fontVariationSettings:"'wght' 800, 'YTLC' 540"},className:N("px-2 py-1.5 text-xs text-muted-foreground data-[inset]:pl-8",e),...n})}function Bz({className:e,...t}){return p.jsx(gT,{"data-slot":"context-menu-separator",className:N("-mx-1 my-1 h-px bg-border",e),...t})}function Hz({className:e,...t}){return p.jsx("span",{"data-slot":"context-menu-shortcut",className:N("ml-auto text-xs tracking-widest text-muted-foreground",e),...t})}function Gz({value:e,onChange:t,placeholder:n="Pick a date",className:r,calendarProps:o}){return p.jsxs(Yy,{children:[p.jsx(Uy,{asChild:!0,children:p.jsxs(Fn,{variant:"default",className:N("w-60 justify-start text-left font-normal",!e&&"text-muted-foreground",r),children:[p.jsx(IO,{}),e?wo(e,"PPP"):p.jsx("span",{children:n})]})}),p.jsx(Ky,{className:"w-auto p-0",align:"start",children:p.jsx(Aw,{mode:"single",selected:e,onSelect:t,autoFocus:!0,...o})})]})}function Yz({className:e,...t}){return p.jsx("div",{role:"list","data-slot":"item-group",className:N("group/item-group flex flex-col",e),...t})}function Uz({className:e,...t}){return p.jsx(cl,{"data-slot":"item-separator",orientation:"horizontal",className:N("my-0",e),...t})}const Kz=wn("group/item flex flex-wrap items-center rounded-md border border-transparent text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-accent/50",{variants:{variant:{default:"bg-transparent",outline:"border-border",muted:"bg-muted/50"},size:{default:"gap-4 p-4",sm:"gap-2.5 px-4 py-3"}},defaultVariants:{variant:"default",size:"default"}});function qz({className:e,variant:t="default",size:n="default",asChild:r=!1,...o}){const a=r?zn:"div";return p.jsx(a,{"data-slot":"item","data-variant":t,"data-size":n,className:N(Kz({variant:t,size:n,className:e})),...o})}const Xz=wn("flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:translate-y-0.5 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none",{variants:{variant:{default:"bg-transparent",icon:"size-8 rounded-sm border bg-muted [&_svg:not([class*='size-'])]:size-4",image:"size-10 overflow-hidden rounded-sm [&_img]:size-full [&_img]:object-cover"}},defaultVariants:{variant:"default"}});function Zz({className:e,variant:t="default",...n}){return p.jsx("div",{"data-slot":"item-media","data-variant":t,className:N(Xz({variant:t,className:e})),...n})}function Qz({className:e,...t}){return p.jsx("div",{"data-slot":"item-content",className:N("flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none",e),...t})}function Jz({className:e,...t}){return p.jsx("div",{"data-slot":"item-title",className:N("flex w-fit items-center gap-2 text-sm leading-snug font-medium",e),...t})}function e6({className:e,...t}){return p.jsx("p",{"data-slot":"item-description",className:N("line-clamp-2 text-sm leading-normal font-normal text-balance text-muted-foreground","[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...t})}function t6({className:e,...t}){return p.jsx("div",{"data-slot":"item-actions",className:N("flex items-center gap-2",e),...t})}function n6({className:e,...t}){return p.jsx("div",{"data-slot":"item-header",className:N("flex basis-full items-center justify-between gap-2",e),...t})}function r6({className:e,...t}){return p.jsx("div",{"data-slot":"item-footer",className:N("flex basis-full items-center justify-between gap-2",e),...t})}function o6({className:e,...t}){return p.jsx("nav",{role:"navigation","aria-label":"pagination","data-slot":"pagination",className:N("mx-auto flex w-full justify-center",e),...t})}function a6({className:e,...t}){return p.jsx("ul",{"data-slot":"pagination-content",className:N("flex flex-row items-center gap-1",e),...t})}function s6({...e}){return p.jsx("li",{"data-slot":"pagination-item",...e})}function bf({className:e,isActive:t,size:n="icon",...r}){return p.jsx("a",{"aria-current":t?"page":void 0,"data-slot":"pagination-link","data-active":t,className:N(Ca({variant:t?"outline":"ghost",size:n}),e),...r})}function i6({className:e,...t}){return p.jsxs(bf,{"aria-label":"Go to previous page",size:"default",className:N("gap-1 px-2.5 sm:pl-2.5",e),...t,children:[p.jsx(Vy,{}),p.jsx("span",{className:"hidden sm:block",children:"Previous"})]})}function l6({className:e,...t}){return p.jsxs(bf,{"aria-label":"Go to next page",size:"default",className:N("gap-1 px-2.5 sm:pr-2.5",e),...t,children:[p.jsx("span",{className:"hidden sm:block",children:"Next"}),p.jsx(Ka,{})]})}function c6({className:e,...t}){return p.jsxs("span",{"aria-hidden":!0,"data-slot":"pagination-ellipsis",className:N("flex size-9 items-center justify-center",e),...t,children:[p.jsx(Wy,{className:"size-4"}),p.jsx("span",{className:"sr-only",children:"More pages"})]})}function u6({className:e,value:t,...n}){return p.jsx(bI,{"data-slot":"progress",className:N("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...n,children:p.jsx(vI,{"data-slot":"progress-indicator",className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})})}function d6({className:e,...t}){return p.jsx(V0,{"data-slot":"radio-group",className:N("grid gap-3",e),...t})}function f6({className:e,...t}){return p.jsx(H0,{"data-slot":"radio-group-item",className:N("aspect-square size-4 shrink-0 rounded-full border border-input text-primary shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:ring-destructive/40",e),...t,children:p.jsx(Y0,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:p.jsx(VO,{className:"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 fill-primary"})})})}function p6(e,t){const n=getComputedStyle(e),r=parseFloat(n.fontSize);return t*r}function m6(e,t){const n=getComputedStyle(e.ownerDocument.documentElement),r=parseFloat(n.fontSize);return t*r}function h6(e){return e/100*window.innerHeight}function g6(e){return e/100*window.innerWidth}function b6(e){switch(typeof e){case"number":return[e,"px"];case"string":{const t=parseFloat(e);return e.endsWith("%")?[t,"%"]:e.endsWith("px")?[t,"px"]:e.endsWith("rem")?[t,"rem"]:e.endsWith("em")?[t,"em"]:e.endsWith("vh")?[t,"vh"]:e.endsWith("vw")?[t,"vw"]:[t,"%"]}}}function da({groupSize:e,panelElement:t,styleProp:n}){let r;const[o,a]=b6(n);switch(a){case"%":{r=o/100*e;break}case"px":{r=o;break}case"rem":{r=m6(t,o);break}case"em":{r=p6(t,o);break}case"vh":{r=h6(o);break}case"vw":{r=g6(o);break}}return r}function Gt(e){return parseFloat(e.toFixed(3))}function Fo({group:e}){const{orientation:t,panels:n}=e;return n.reduce((r,o)=>(r+=t==="horizontal"?o.element.offsetWidth:o.element.offsetHeight,r),0)}function mu(e){const{panels:t}=e,n=Fo({group:e});return n===0?t.map(r=>({groupResizeBehavior:r.panelConstraints.groupResizeBehavior,collapsedSize:0,collapsible:r.panelConstraints.collapsible===!0,defaultSize:void 0,disabled:r.panelConstraints.disabled,minSize:0,maxSize:100,panelId:r.id})):t.map(r=>{const{element:o,panelConstraints:a}=r;let s=0;if(a.collapsedSize!==void 0){const d=da({groupSize:n,panelElement:o,styleProp:a.collapsedSize});s=Gt(d/n*100)}let i;if(a.defaultSize!==void 0){const d=da({groupSize:n,panelElement:o,styleProp:a.defaultSize});i=Gt(d/n*100)}let l=0;if(a.minSize!==void 0){const d=da({groupSize:n,panelElement:o,styleProp:a.minSize});l=Gt(d/n*100)}let c=100;if(a.maxSize!==void 0){const d=da({groupSize:n,panelElement:o,styleProp:a.maxSize});c=Gt(d/n*100)}return{groupResizeBehavior:a.groupResizeBehavior,collapsedSize:s,collapsible:a.collapsible===!0,defaultSize:i,disabled:a.disabled,minSize:l,maxSize:c,panelId:r.id}})}function nt(e,t="Assertion error"){if(!e)throw Error(t)}function hu(e,t){return Array.from(t).sort(e==="horizontal"?v6:x6)}function v6(e,t){const n=e.element.offsetLeft-t.element.offsetLeft;return n!==0?n:e.element.offsetWidth-t.element.offsetWidth}function x6(e,t){const n=e.element.offsetTop-t.element.offsetTop;return n!==0?n:e.element.offsetHeight-t.element.offsetHeight}function uC(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function dC(e,t){return{x:e.x>=t.left&&e.x<=t.right?0:Math.min(Math.abs(e.x-t.left),Math.abs(e.x-t.right)),y:e.y>=t.top&&e.y<=t.bottom?0:Math.min(Math.abs(e.y-t.top),Math.abs(e.y-t.bottom))}}function y6({orientation:e,rects:t,targetRect:n}){const r={x:n.x+n.width/2,y:n.y+n.height/2};let o,a=Number.MAX_VALUE;for(const s of t){const{x:i,y:l}=dC(r,s),c=e==="horizontal"?i:l;c<a&&(a=c,o=s)}return nt(o,"No rect found"),o}let Ts;function w6(){return Ts===void 0&&(typeof matchMedia=="function"?Ts=!!matchMedia("(pointer:coarse)").matches:Ts=!1),Ts}function fC(e){const{element:t,orientation:n,panels:r,separators:o}=e,a=hu(n,Array.from(t.children).filter(uC).map(b=>({element:b}))).map(({element:b})=>b),s=[];let i=!1,l=!1,c=-1,d=-1,u=0,m,g=[];{let b=-1;for(const h of a)h.hasAttribute("data-panel")&&(b++,h.hasAttribute("data-disabled")||(u++,c===-1&&(c=b),d=b))}if(u>1){let b=-1;for(const h of a)if(h.hasAttribute("data-panel")){b++;const x=r.find(v=>v.element===h);if(x){if(m){const v=m.element.getBoundingClientRect(),w=h.getBoundingClientRect();let y;if(l){const C=n==="horizontal"?new DOMRect(v.right,v.top,0,v.height):new DOMRect(v.left,v.bottom,v.width,0),E=n==="horizontal"?new DOMRect(w.left,w.top,0,w.height):new DOMRect(w.left,w.top,w.width,0);switch(g.length){case 0:{y=[C,E];break}case 1:{const S=g[0],M=y6({orientation:n,rects:[v,w],targetRect:S.element.getBoundingClientRect()});y=[S,M===v?E:C];break}default:{y=g;break}}}else g.length?y=g:y=[n==="horizontal"?new DOMRect(v.right,w.top,w.left-v.right,w.height):new DOMRect(w.left,v.bottom,w.width,w.top-v.bottom)];for(const C of y){let E="width"in C?C:C.element.getBoundingClientRect();const S=w6()?e.resizeTargetMinimumSize.coarse:e.resizeTargetMinimumSize.fine;if(E.width<S){const R=S-E.width;E=new DOMRect(E.x-R/2,E.y,E.width+R,E.height)}if(E.height<S){const R=S-E.height;E=new DOMRect(E.x,E.y-R/2,E.width,E.height+R)}const M=b<=c||b>d;!i&&!M&&s.push({group:e,groupSize:Fo({group:e}),panels:[m,x],separator:"width"in C?void 0:C,rect:E}),i=!1}}l=!1,m=x,g=[]}}else if(h.hasAttribute("data-separator")){h.ariaDisabled!==null&&(i=!0);const x=o.find(v=>v.element===h);x?g.push(x):(m=void 0,g=[])}else l=!0}return s}var cr;class pC{constructor(){_f(this,cr,{})}addListener(t,n){const r=Qo(this,cr)[t];return r===void 0?Qo(this,cr)[t]=[n]:r.includes(n)||r.push(n),()=>{this.removeListener(t,n)}}emit(t,n){const r=Qo(this,cr)[t];if(r!==void 0)if(r.length===1)r[0].call(null,n);else{let o=!1,a=null;const s=Array.from(r);for(let i=0;i<s.length;i++){const l=s[i];try{l.call(null,n)}catch(c){a===null&&(o=!0,a=c)}}if(o)throw a}}removeAllListeners(){Of(this,cr,{})}removeListener(t,n){const r=Qo(this,cr)[t];if(r!==void 0){const o=r.indexOf(n);o>=0&&r.splice(o,1)}}}cr=new WeakMap;let On=new Map;const mC=new pC;function C6(e){On=new Map(On),On.delete(e)}function zm(e,t){for(const[n]of On)if(n.id===e)return n}function hr(e,t){for(const[n,r]of On)if(n.id===e)return r;if(t)throw Error(`Could not find data for Group with id ${e}`)}function io(){return On}function vf(e,t){return mC.addListener("groupChange",n=>{n.group.id===e&&t(n)})}function Qn(e,t){const n=On.get(e);On=new Map(On),On.set(e,t),mC.emit("groupChange",{group:e,prev:n,next:t})}function S6(e,t,n){let r,o={x:1/0,y:1/0};for(const a of t){const s=dC(n,a.rect);switch(e){case"horizontal":{s.x<=o.x&&(r=a,o=s);break}case"vertical":{s.y<=o.y&&(r=a,o=s);break}}}return r?{distance:o,hitRegion:r}:void 0}function E6(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function M6(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:Fm(e),b:Fm(t)};let r;for(;n.a.at(-1)===n.b.at(-1);)r=n.a.pop(),n.b.pop();nt(r,"Stacking order can only be calculated for elements with a common ancestor");const o={a:Lm($m(n.a)),b:Lm($m(n.b))};if(o.a===o.b){const a=r.childNodes,s={a:n.a.at(-1),b:n.b.at(-1)};let i=a.length;for(;i--;){const l=a[i];if(l===s.a)return 1;if(l===s.b)return-1}}return Math.sign(o.a-o.b)}const R6=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function k6(e){const t=getComputedStyle(hC(e)??e).display;return t==="flex"||t==="inline-flex"}function P6(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||k6(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||R6.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function $m(e){let t=e.length;for(;t--;){const n=e[t];if(nt(n,"Missing node"),P6(n))return n}return null}function Lm(e){return e&&Number(getComputedStyle(e).zIndex)||0}function Fm(e){const t=[];for(;e;)t.push(e),e=hC(e);return t}function hC(e){const{parentNode:t}=e;return E6(t)?t.host:t}function N6(e,t){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function T6({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!uC(n)||n.contains(e)||e.contains(n))return!0;if(M6(n,e)>0){let r=n;for(;r;){if(r.contains(e))return!0;if(N6(r.getBoundingClientRect(),t))return!1;r=r.parentElement}}return!0}function xf(e,t){const n=[];return t.forEach((r,o)=>{if(o.disabled)return;const a=fC(o),s=S6(o.orientation,a,{x:e.clientX,y:e.clientY});s&&s.distance.x<=0&&s.distance.y<=0&&T6({groupElement:o.element,hitRegion:s.hitRegion.rect,pointerEventTarget:e.target})&&n.push(s.hitRegion)}),n}function I6(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function At(e,t,n=0){return Math.abs(Gt(e)-Gt(t))<=n}function Pn(e,t){return At(e,t)?0:e>t?1:-1}function Eo({overrideDisabledPanels:e,panelConstraints:t,prevSize:n,size:r}){const{collapsedSize:o=0,collapsible:a,disabled:s,maxSize:i=100,minSize:l=0}=t;if(s&&!e)return n;if(Pn(r,l)<0)if(a){const c=(o+l)/2;Pn(r,c)<0?r=o:r=l}else r=l;return r=Math.min(i,r),r=Gt(r),r}function Ta({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:o,trigger:a}){if(At(e,0))return t;const s=a==="imperative-api",i=Object.values(t),l=Object.values(o),c=[...i],[d,u]=r;nt(d!=null,"Invalid first pivot index"),nt(u!=null,"Invalid second pivot index");let m=0;switch(a){case"keyboard":{{const h=e<0?u:d,x=n[h];nt(x,`Panel constraints not found for index ${h}`);const{collapsedSize:v=0,collapsible:w,minSize:y=0}=x;if(w){const C=i[h];if(nt(C!=null,`Previous layout not found for panel index ${h}`),At(C,v)){const E=y-C;Pn(E,Math.abs(e))>0&&(e=e<0?0-E:E)}}}{const h=e<0?d:u,x=n[h];nt(x,`No panel constraints found for index ${h}`);const{collapsedSize:v=0,collapsible:w,minSize:y=0}=x;if(w){const C=i[h];if(nt(C!=null,`Previous layout not found for panel index ${h}`),At(C,y)){const E=C-v;Pn(E,Math.abs(e))>0&&(e=e<0?0-E:E)}}}break}default:{const h=e<0?u:d,x=n[h];nt(x,`Panel constraints not found for index ${h}`);const v=i[h],{collapsible:w,collapsedSize:y,minSize:C}=x;if(w&&Pn(v,C)<0)if(e>0){const E=C-y,S=E/2,M=v+e;Pn(M,C)<0&&(e=Pn(e,S)<=0?0:E)}else{const E=C-y,S=100-E/2,M=v-e;Pn(M,C)<0&&(e=Pn(100+e,S)>0?0:-E)}break}}{const h=e<0?1:-1;let x=e<0?u:d,v=0;for(;;){const y=i[x];nt(y!=null,`Previous layout not found for panel index ${x}`);const C=Eo({overrideDisabledPanels:s,panelConstraints:n[x],prevSize:y,size:100})-y;if(v+=C,x+=h,x<0||x>=n.length)break}const w=Math.min(Math.abs(e),Math.abs(v));e=e<0?0-w:w}{let h=e<0?d:u;for(;h>=0&&h<n.length;){const x=Math.abs(e)-Math.abs(m),v=i[h];nt(v!=null,`Previous layout not found for panel index ${h}`);const w=v-x,y=Eo({overrideDisabledPanels:s,panelConstraints:n[h],prevSize:v,size:w});if(!At(v,y)&&(m+=v-y,c[h]=y,m.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?h--:h++}}if(I6(l,c))return o;{const h=e<0?u:d,x=i[h];nt(x!=null,`Previous layout not found for panel index ${h}`);const v=x+m,w=Eo({overrideDisabledPanels:s,panelConstraints:n[h],prevSize:x,size:v});if(c[h]=w,!At(w,v)){let y=v-w,C=e<0?u:d;for(;C>=0&&C<n.length;){const E=c[C];nt(E!=null,`Previous layout not found for panel index ${C}`);const S=E+y,M=Eo({overrideDisabledPanels:s,panelConstraints:n[C],prevSize:E,size:S});if(At(E,M)||(y-=M-E,c[C]=M),At(y,0))break;e>0?C--:C++}}}const g=Object.values(c).reduce((h,x)=>x+h,0);if(!At(g,100,.1))return o;const b=Object.keys(o);return c.reduce((h,x,v)=>(h[b[v]]=x,h),{})}function Xr(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(t[n]===void 0||Pn(e[n],t[n])!==0)return!1;return!0}function Zr({layout:e,panelConstraints:t}){const n=Object.values(e),r=[...n],o=r.reduce((i,l)=>i+l,0);if(r.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${r.map(i=>`${i}%`).join(", ")}`);if(!At(o,100)&&r.length>0)for(let i=0;i<t.length;i++){const l=r[i];nt(l!=null,`No layout data found for index ${i}`);const c=100/o*l;r[i]=c}let a=0;for(let i=0;i<t.length;i++){const l=n[i];nt(l!=null,`No layout data found for index ${i}`);const c=r[i];nt(c!=null,`No layout data found for index ${i}`);const d=Eo({overrideDisabledPanels:!0,panelConstraints:t[i],prevSize:l,size:c});c!=d&&(a+=c-d,r[i]=d)}if(!At(a,0))for(let i=0;i<t.length;i++){const l=r[i];nt(l!=null,`No layout data found for index ${i}`);const c=l+a,d=Eo({overrideDisabledPanels:!0,panelConstraints:t[i],prevSize:l,size:c});if(l!==d&&(a-=d-l,r[i]=d,At(a,0)))break}const s=Object.keys(e);return r.reduce((i,l,c)=>(i[s[c]]=l,i),{})}function gC({groupId:e,panelId:t}){const n=()=>{const l=io();for(const[c,{defaultLayoutDeferred:d,derivedPanelConstraints:u,layout:m,groupSize:g,separatorToPanels:b}]of l)if(c.id===e)return{defaultLayoutDeferred:d,derivedPanelConstraints:u,group:c,groupSize:g,layout:m,separatorToPanels:b};throw Error(`Group ${e} not found`)},r=()=>{const l=n().derivedPanelConstraints.find(c=>c.panelId===t);if(l!==void 0)return l;throw Error(`Panel constraints not found for Panel ${t}`)},o=()=>{const l=n().group.panels.find(c=>c.id===t);if(l!==void 0)return l;throw Error(`Layout not found for Panel ${t}`)},a=()=>{const l=n().layout[t];if(l!==void 0)return l;throw Error(`Layout not found for Panel ${t}`)},s=({nextSize:l,panels:c,prevLayout:d,derivedPanelConstraints:u})=>{const m=a(),g=c.findIndex(x=>x.id===t),b=g===0,h=g===c.length-1;if(h&&l<m&&(b||c.slice(0,g).every((x,v)=>{const w=u[v];return(w==null?void 0:w.collapsible)&&At(w.collapsedSize,d[w.panelId])}))){const x=c.slice(0,g).reduce((v,w)=>v+d[w.id],0);return{...d,[t]:Gt(100-x)}}return Ta({delta:h?m-l:l-m,initialLayout:d,panelConstraints:u,pivotIndices:h?[g-1,g]:[g,g+1],prevLayout:d,trigger:"imperative-api"})},i=l=>{const c=a();if(l===c)return;const{defaultLayoutDeferred:d,derivedPanelConstraints:u,group:m,groupSize:g,layout:b,separatorToPanels:h}=n(),x=s({nextSize:l,panels:m.panels,prevLayout:b,derivedPanelConstraints:u}),v=Zr({layout:x,panelConstraints:u});Xr(b,v)||Qn(m,{defaultLayoutDeferred:d,derivedPanelConstraints:u,groupSize:g,layout:v,separatorToPanels:h})};return{collapse:()=>{const{collapsible:l,collapsedSize:c}=r(),{mutableValues:d}=o(),u=a();l&&u!==c&&(d.expandToSize=u,i(c))},expand:()=>{const{collapsible:l,collapsedSize:c,minSize:d}=r(),{mutableValues:u}=o(),m=a();if(l&&m===c){let g=u.expandToSize??d;g===0&&(g=1),i(g)}},getSize:()=>{const{group:l}=n(),c=a(),{element:d}=o(),u=l.orientation==="horizontal"?d.offsetWidth:d.offsetHeight;return{asPercentage:c,inPixels:u}},isCollapsed:()=>{const{collapsible:l,collapsedSize:c}=r(),d=a();return l&&At(c,d)},resize:l=>{const{group:c}=n(),{element:d}=o(),u=Fo({group:c}),m=da({groupSize:u,panelElement:d,styleProp:l}),g=Gt(m/u*100);i(g)}}}function Vm(e){if(e.defaultPrevented)return;const t=io();xf(e,t).forEach(n=>{if(n.separator&&!n.separator.disableDoubleClick){const r=n.panels.find(o=>o.panelConstraints.defaultSize!==void 0);if(r){const o=r.panelConstraints.defaultSize,a=gC({groupId:n.group.id,panelId:r.id});a&&o!==void 0&&(a.resize(o),e.preventDefault())}}})}function Ls(e){const t=io();for(const[n]of t)if(n.separators.some(r=>r.element===e))return n;throw Error("Could not find parent Group for separator element")}function bC({groupId:e}){const t=()=>{const n=io();for(const[r,o]of n)if(r.id===e)return{group:r,...o};throw Error(`Could not find Group with id "${e}"`)};return{getLayout(){const{defaultLayoutDeferred:n,layout:r}=t();return n?{}:r},setLayout(n){const{defaultLayoutDeferred:r,derivedPanelConstraints:o,group:a,groupSize:s,layout:i,separatorToPanels:l}=t(),c=Zr({layout:n,panelConstraints:o});return r?i:(Xr(i,c)||Qn(a,{defaultLayoutDeferred:r,derivedPanelConstraints:o,groupSize:s,layout:c,separatorToPanels:l}),c)}}}function Fr(e,t){const n=Ls(e),r=hr(n.id,!0),o=n.separators.find(d=>d.element===e);nt(o,"Matching separator not found");const a=r.separatorToPanels.get(o);nt(a,"Matching panels not found");const s=a.map(d=>n.panels.indexOf(d)),i=bC({groupId:n.id}).getLayout(),l=Ta({delta:t,initialLayout:i,panelConstraints:r.derivedPanelConstraints,pivotIndices:s,prevLayout:i,trigger:"keyboard"}),c=Zr({layout:l,panelConstraints:r.derivedPanelConstraints});Xr(i,c)||Qn(n,{defaultLayoutDeferred:r.defaultLayoutDeferred,derivedPanelConstraints:r.derivedPanelConstraints,groupSize:r.groupSize,layout:c,separatorToPanels:r.separatorToPanels})}function Wm(e){if(e.defaultPrevented)return;const t=e.currentTarget,n=Ls(t);if(!n.disabled)switch(e.key){case"ArrowDown":{e.preventDefault(),n.orientation==="vertical"&&Fr(t,5);break}case"ArrowLeft":{e.preventDefault(),n.orientation==="horizontal"&&Fr(t,-5);break}case"ArrowRight":{e.preventDefault(),n.orientation==="horizontal"&&Fr(t,5);break}case"ArrowUp":{e.preventDefault(),n.orientation==="vertical"&&Fr(t,-5);break}case"End":{e.preventDefault(),Fr(t,100);break}case"Enter":{e.preventDefault();const r=Ls(t),o=hr(r.id,!0),{derivedPanelConstraints:a,layout:s,separatorToPanels:i}=o,l=r.separators.find(m=>m.element===t);nt(l,"Matching separator not found");const c=i.get(l);nt(c,"Matching panels not found");const d=c[0],u=a.find(m=>m.panelId===d.id);if(nt(u,"Panel metadata not found"),u.collapsible){const m=s[d.id],g=u.collapsedSize===m?r.mutableState.expandedPanelSizes[d.id]??u.minSize:u.collapsedSize;Fr(t,g-m)}break}case"F6":{e.preventDefault();const r=Ls(t).separators.map(s=>s.element),o=Array.from(r).findIndex(s=>s===e.currentTarget);nt(o!==null,"Index not found");const a=e.shiftKey?o>0?o-1:r.length-1:o+1<r.length?o+1:0;r[a].focus({preventScroll:!0});break}case"Home":{e.preventDefault(),Fr(t,-100);break}}}let Io={cursorFlags:0,state:"inactive"};const yf=new pC;function Qr(){return Io}function _6(e){return yf.addListener("change",e)}function O6(e){const t=Io,n={...Io};n.cursorFlags=e,Io=n,yf.emit("change",{prev:t,next:n})}function _o(e){const t=Io;Io=e,yf.emit("change",{prev:t,next:e})}function Bm(e){if(e.defaultPrevented||e.pointerType==="mouse"&&e.button>0)return;const t=io(),n=xf(e,t),r=new Map;let o=!1;n.forEach(a=>{a.separator&&(o||(o=!0,a.separator.element.focus({focusVisible:!1,preventScroll:!0})));const s=t.get(a.group);s&&r.set(a.group,s.layout)}),_o({cursorFlags:0,hitRegions:n,initialLayoutMap:r,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:"active"}),n.length&&e.preventDefault()}const D6=e=>e,Oc=()=>{},vC=1,xC=2,yC=4,wC=8,Hm=3,Gm=12;let Is;function Ym(){return Is===void 0&&(Is=!1,typeof window<"u"&&(window.navigator.userAgent.includes("Chrome")||window.navigator.userAgent.includes("Firefox"))&&(Is=!0)),Is}function A6({cursorFlags:e,groups:t,state:n}){let r=0,o=0;switch(n){case"active":case"hover":t.forEach(a=>{if(!a.mutableState.disableCursor)switch(a.orientation){case"horizontal":{r++;break}case"vertical":{o++;break}}})}if(!(r===0&&o===0)){switch(n){case"active":{if(e&&Ym()){const a=(e&vC)!==0,s=(e&xC)!==0,i=(e&yC)!==0,l=(e&wC)!==0;if(a)return i?"se-resize":l?"ne-resize":"e-resize";if(s)return i?"sw-resize":l?"nw-resize":"w-resize";if(i)return"s-resize";if(l)return"n-resize"}break}}return Ym()?r>0&&o>0?"move":r>0?"ew-resize":"ns-resize":r>0&&o>0?"grab":r>0?"col-resize":"row-resize"}}const Um=new WeakMap;function wf(e){if(e.defaultView===null||e.defaultView===void 0)return;let{prevStyle:t,styleSheet:n}=Um.get(e)??{};n===void 0&&(n=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets&&(Object.isExtensible(e.adoptedStyleSheets)?e.adoptedStyleSheets.push(n):e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]));const r=Qr();switch(r.state){case"active":case"hover":{const o=A6({cursorFlags:r.cursorFlags,groups:r.hitRegions.map(s=>s.group),state:r.state}),a=`*, *:hover {cursor: ${o} !important; }`;if(t===a)return;t=a,o?n.cssRules.length===0?n.insertRule(a):n.replaceSync(a):n.cssRules.length===1&&n.deleteRule(0);break}case"inactive":{t=void 0,n.cssRules.length===1&&n.deleteRule(0);break}}Um.set(e,{prevStyle:t,styleSheet:n})}function CC({document:e,event:t,hitRegions:n,initialLayoutMap:r,mountedGroups:o,pointerDownAtPoint:a,prevCursorFlags:s}){let i=0;n.forEach(c=>{const{group:d,groupSize:u}=c,{orientation:m,panels:g}=d,{disableCursor:b}=d.mutableState;let h=0;a?m==="horizontal"?h=(t.clientX-a.x)/u*100:h=(t.clientY-a.y)/u*100:m==="horizontal"?h=t.clientX<0?-100:100:h=t.clientY<0?-100:100;const x=r.get(d),v=o.get(d);if(!x||!v)return;const{defaultLayoutDeferred:w,derivedPanelConstraints:y,groupSize:C,layout:E,separatorToPanels:S}=v;if(y&&E&&S){const M=Ta({delta:h,initialLayout:x,panelConstraints:y,pivotIndices:c.panels.map(R=>g.indexOf(R)),prevLayout:E,trigger:"mouse-or-touch"});if(Xr(M,E)){if(h!==0&&!b)switch(m){case"horizontal":{i|=h<0?vC:xC;break}case"vertical":{i|=h<0?yC:wC;break}}}else Qn(c.group,{defaultLayoutDeferred:w,derivedPanelConstraints:y,groupSize:C,layout:M,separatorToPanels:S})}});let l=0;t.movementX===0?l|=s&Hm:l|=i&Hm,t.movementY===0?l|=s&Gm:l|=i&Gm,O6(l),wf(e)}function Km(e){const t=io(),n=Qr();switch(n.state){case"active":CC({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:t,prevCursorFlags:n.cursorFlags})}}function qm(e){var r,o;if(e.defaultPrevented)return;const t=Qr(),n=io();switch(t.state){case"active":{if(e.buttons===0){_o({cursorFlags:0,state:"inactive"}),t.hitRegions.forEach(a=>{const s=hr(a.group.id,!0);Qn(a.group,s)});return}for(const a of t.hitRegions)if(a.separator){const{element:s}=a.separator;(r=s.hasPointerCapture)!=null&&r.call(s,e.pointerId)||((o=s.setPointerCapture)==null||o.call(s,e.pointerId))}CC({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n,pointerDownAtPoint:t.pointerDownAtPoint,prevCursorFlags:t.cursorFlags});break}default:{const a=xf(e,n);a.length===0?t.state!=="inactive"&&_o({cursorFlags:0,state:"inactive"}):_o({cursorFlags:0,hitRegions:a,state:"hover"}),wf(e.currentTarget);break}}}function Xm(e){if(e.relatedTarget instanceof HTMLIFrameElement)switch(Qr().state){case"hover":_o({cursorFlags:0,state:"inactive"})}}function Zm(e){if(e.defaultPrevented||e.pointerType==="mouse"&&e.button>0)return;const t=Qr();switch(t.state){case"active":_o({cursorFlags:0,state:"inactive"}),t.hitRegions.length>0&&(wf(e.currentTarget),t.hitRegions.forEach(n=>{const r=hr(n.group.id,!0);Qn(n.group,r)}),e.preventDefault())}}function Qm(e){let t=0,n=0;const r={};for(const a of e)if(a.defaultSize!==void 0){t++;const s=Gt(a.defaultSize);n+=s,r[a.panelId]=s}else r[a.panelId]=void 0;const o=e.length-t;if(o!==0){const a=Gt((100-n)/o);for(const s of e)s.defaultSize===void 0&&(r[s.panelId]=a)}return r}function j6(e,t,n){if(!n[0])return;const r=e.panels.find(l=>l.element===t);if(!r||!r.onResize)return;const o=Fo({group:e}),a=e.orientation==="horizontal"?r.element.offsetWidth:r.element.offsetHeight,s=r.mutableValues.prevSize,i={asPercentage:Gt(a/o*100),inPixels:a};r.mutableValues.prevSize=i,r.onResize(i,r.id,s)}function z6(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function $6({group:e,nextGroupSize:t,prevGroupSize:n,prevLayout:r}){if(n<=0||t<=0||n===t)return r;let o=0,a=0,s=!1;const i=new Map,l=[];for(const u of e.panels){const m=r[u.id]??0;switch(u.panelConstraints.groupResizeBehavior){case"preserve-pixel-size":{s=!0;const g=m/100*n,b=Gt(g/t*100);i.set(u.id,b),o+=b;break}case"preserve-relative-size":default:{l.push(u.id),a+=m;break}}}if(!s||l.length===0)return r;const c=100-o,d={...r};if(i.forEach((u,m)=>{d[m]=u}),a>0)for(const u of l){const m=r[u]??0;d[u]=Gt(m/a*c)}else{const u=Gt(c/l.length);for(const m of l)d[m]=u}return d}function L6(e,t){const n=e.map(o=>o.id),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n)if(!r.includes(o))return!1;return!0}const xo=new Map;function F6(e){let t=!0;nt(e.element.ownerDocument.defaultView,"Cannot register an unmounted Group");const n=e.element.ownerDocument.defaultView.ResizeObserver,r=new Set,o=new Set,a=new n(b=>{for(const h of b){const{borderBoxSize:x,target:v}=h;if(v===e.element){if(t){const w=Fo({group:e});if(w===0)return;const y=hr(e.id);if(!y)return;const C=mu(e),E=y.defaultLayoutDeferred?Qm(C):y.layout,S=$6({group:e,nextGroupSize:w,prevGroupSize:y.groupSize,prevLayout:E}),M=Zr({layout:S,panelConstraints:C});if(!y.defaultLayoutDeferred&&Xr(y.layout,M)&&z6(y.derivedPanelConstraints,C)&&y.groupSize===w)return;Qn(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:C,groupSize:w,layout:M,separatorToPanels:y.separatorToPanels})}}else j6(e,v,x)}});a.observe(e.element),e.panels.forEach(b=>{nt(!r.has(b.id),`Panel ids must be unique; id "${b.id}" was used more than once`),r.add(b.id),b.onResize&&a.observe(b.element)});const s=Fo({group:e}),i=mu(e),l=e.panels.map(({id:b})=>b).join(",");let c=e.mutableState.defaultLayout;c&&(L6(e.panels,c)||(c=void 0));const d=e.mutableState.layouts[l]??c??Qm(i),u=Zr({layout:d,panelConstraints:i}),m=e.element.ownerDocument;xo.set(m,(xo.get(m)??0)+1);const g=new Map;return fC(e).forEach(b=>{b.separator&&g.set(b.separator,b.panels)}),Qn(e,{defaultLayoutDeferred:s===0,derivedPanelConstraints:i,groupSize:s,layout:u,separatorToPanels:g}),e.separators.forEach(b=>{nt(!o.has(b.id),`Separator ids must be unique; id "${b.id}" was used more than once`),o.add(b.id),b.element.addEventListener("keydown",Wm)}),xo.get(m)===1&&(m.addEventListener("dblclick",Vm,!0),m.addEventListener("pointerdown",Bm,!0),m.addEventListener("pointerleave",Km),m.addEventListener("pointermove",qm),m.addEventListener("pointerout",Xm),m.addEventListener("pointerup",Zm,!0)),function(){t=!1,xo.set(m,Math.max(0,(xo.get(m)??0)-1)),C6(e),e.separators.forEach(b=>{b.element.removeEventListener("keydown",Wm)}),xo.get(m)||(m.removeEventListener("dblclick",Vm,!0),m.removeEventListener("pointerdown",Bm,!0),m.removeEventListener("pointerleave",Km),m.removeEventListener("pointermove",qm),m.removeEventListener("pointerout",Xm),m.removeEventListener("pointerup",Zm,!0)),a.disconnect()}}function V6(){const[e,t]=P.useState({}),n=P.useCallback(()=>t({}),[]);return[e,n]}function Cf(e){const t=P.useId();return`${e??t}`}const lo=typeof window<"u"?P.useLayoutEffect:P.useEffect;function ma(e){const t=P.useRef(e);return lo(()=>{t.current=e},[e]),P.useCallback((...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[t])}function Sf(...e){return ma(t=>{e.forEach(n=>{if(n)switch(typeof n){case"function":{n(t);break}case"object":{n.current=t;break}}})})}function Ef(e){const t=P.useRef({...e});return lo(()=>{for(const n in e)t.current[n]=e[n]},[e]),t.current}const SC=P.createContext(null);function W6(e,t){const n=P.useRef({getLayout:()=>({}),setLayout:D6});P.useImperativeHandle(t,()=>n.current,[]),lo(()=>{Object.assign(n.current,bC({groupId:e}))})}function EC({children:e,className:t,defaultLayout:n,disableCursor:r,disabled:o,elementRef:a,groupRef:s,id:i,onLayoutChange:l,onLayoutChanged:c,orientation:d="horizontal",resizeTargetMinimumSize:u={coarse:20,fine:10},style:m,...g}){const b=P.useRef({onLayoutChange:{},onLayoutChanged:{}}),h=ma(_=>{Xr(b.current.onLayoutChange,_)||(b.current.onLayoutChange=_,l==null||l(_))}),x=ma(_=>{Xr(b.current.onLayoutChanged,_)||(b.current.onLayoutChanged=_,c==null||c(_))}),v=Cf(i),w=P.useRef(null),[y,C]=V6(),E=P.useRef({lastExpandedPanelSizes:{},layouts:{},panels:[],resizeTargetMinimumSize:u,separators:[]}),S=Sf(w,a);W6(v,s);const M=ma((_,T)=>{const k=Qr(),j=zm(_),V=hr(_);if(V){let z=!1;switch(k.state){case"active":{z=k.hitRegions.some($=>$.group===j);break}}return{flexGrow:V.layout[T]??1,pointerEvents:z?"none":void 0}}if(n!=null&&n[T])return{flexGrow:n==null?void 0:n[T]}}),R=Ef({defaultLayout:n,disableCursor:r}),I=P.useMemo(()=>({get disableCursor(){return!!R.disableCursor},getPanelStyles:M,id:v,orientation:d,registerPanel:_=>{const T=E.current;return T.panels=hu(d,[...T.panels,_]),C(),()=>{T.panels=T.panels.filter(k=>k!==_),C()}},registerSeparator:_=>{const T=E.current;return T.separators=hu(d,[...T.separators,_]),C(),()=>{T.separators=T.separators.filter(k=>k!==_),C()}},updatePanelProps:(_,{disabled:T})=>{const k=E.current.panels.find(z=>z.id===_);k&&(k.panelConstraints.disabled=T);const j=zm(v),V=hr(v);j&&V&&Qn(j,{...V,derivedPanelConstraints:mu(j)})},updateSeparatorProps:(_,{disabled:T,disableDoubleClick:k})=>{const j=E.current.separators.find(V=>V.id===_);j&&(j.disabled=T,j.disableDoubleClick=k)}}),[M,v,C,d,R]),O=P.useRef(null);return lo(()=>{const _=w.current;if(_===null)return;const T=E.current;let k;if(R.defaultLayout!==void 0&&Object.keys(R.defaultLayout).length===T.panels.length){k={};for(const D of T.panels){const re=R.defaultLayout[D.id];re!==void 0&&(k[D.id]=re)}}const j={disabled:!!o,element:_,id:v,mutableState:{defaultLayout:k,disableCursor:!!R.disableCursor,expandedPanelSizes:E.current.lastExpandedPanelSizes,layouts:E.current.layouts},orientation:d,panels:T.panels,resizeTargetMinimumSize:T.resizeTargetMinimumSize,separators:T.separators};O.current=j;const V=F6(j),{defaultLayoutDeferred:z,derivedPanelConstraints:$,layout:F}=hr(j.id,!0);!z&&$.length>0&&(h(F),x(F));const L=vf(v,D=>{const{defaultLayoutDeferred:re,derivedPanelConstraints:pe,layout:G}=D.next;if(re||pe.length===0)return;const B=j.panels.map(({id:oe})=>oe).join(",");j.mutableState.layouts[B]=G,pe.forEach(oe=>{if(oe.collapsible){const{layout:U}=D.prev??{};if(U){const H=At(oe.collapsedSize,G[oe.panelId]),te=At(oe.collapsedSize,U[oe.panelId]);H&&!te&&(j.mutableState.expandedPanelSizes[oe.panelId]=U[oe.panelId])}}});const J=Qr().state!=="active";h(G),J&&x(G)});return()=>{O.current=null,V(),L()}},[o,v,x,h,d,y,R]),P.useEffect(()=>{const _=O.current;_&&(_.mutableState.defaultLayout=n,_.mutableState.disableCursor=!!r)}),p.jsx(SC.Provider,{value:I,children:p.jsx("div",{...g,className:t,"data-group":!0,"data-testid":v,id:v,ref:S,style:{height:"100%",width:"100%",overflow:"hidden",...m,display:"flex",flexDirection:d==="horizontal"?"row":"column",flexWrap:"nowrap",touchAction:d==="horizontal"?"pan-y":"pan-x"},children:e})})}EC.displayName="Group";function Mf(){const e=P.useContext(SC);return nt(e,"Group Context not found; did you render a Panel or Separator outside of a Group?"),e}function B6(e,t){const{id:n}=Mf(),r=P.useRef({collapse:Oc,expand:Oc,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:Oc});P.useImperativeHandle(t,()=>r.current,[]),lo(()=>{Object.assign(r.current,gC({groupId:n,panelId:e}))})}function MC({children:e,className:t,collapsedSize:n="0%",collapsible:r=!1,defaultSize:o,disabled:a,elementRef:s,groupResizeBehavior:i="preserve-relative-size",id:l,maxSize:c="100%",minSize:d="0%",onResize:u,panelRef:m,style:g,...b}){const h=!!l,x=Cf(l),v=Ef({disabled:a}),w=P.useRef(null),y=Sf(w,s),{getPanelStyles:C,id:E,orientation:S,registerPanel:M,updatePanelProps:R}=Mf(),I=u!==null,O=ma((j,V,z)=>{u==null||u(j,l,z)});lo(()=>{const j=w.current;if(j!==null){const V={element:j,id:x,idIsStable:h,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:I?O:void 0,panelConstraints:{groupResizeBehavior:i,collapsedSize:n,collapsible:r,defaultSize:o,disabled:v.disabled,maxSize:c,minSize:d}};return M(V)}},[i,n,r,o,I,x,h,c,d,O,M,v]),P.useEffect(()=>{R(x,{disabled:a})},[a,x,R]),B6(x,m);const _=()=>{const j=C(E,x);if(j)return JSON.stringify(j)},T=P.useSyncExternalStore(j=>vf(E,j),_,_);let k;return T?k=JSON.parse(T):o!==void 0?k={flexGrow:void 0,flexShrink:void 0,flexBasis:o}:k={flexGrow:1},p.jsx("div",{...b,"data-disabled":a||void 0,"data-panel":!0,"data-testid":x,id:x,ref:y,style:{...H6,display:"flex",flexBasis:0,flexShrink:1,overflow:"visible",...k},children:p.jsx("div",{className:t,style:{maxHeight:"100%",maxWidth:"100%",flexGrow:1,overflow:"auto",...g,touchAction:S==="horizontal"?"pan-y":"pan-x"},children:e})})}MC.displayName="Panel";const H6={minHeight:0,maxHeight:"100%",height:"auto",minWidth:0,maxWidth:"100%",width:"auto",border:"none",borderWidth:0,padding:0,margin:0};function G6({layout:e,panelConstraints:t,panelId:n,panelIndex:r}){let o,a;const s=e[n],i=t.find(l=>l.panelId===n);if(i){const l=i.maxSize,c=i.collapsible?i.collapsedSize:i.minSize,d=[r,r+1];a=Zr({layout:Ta({delta:c-s,initialLayout:e,panelConstraints:t,pivotIndices:d,prevLayout:e}),panelConstraints:t})[n],o=Zr({layout:Ta({delta:l-s,initialLayout:e,panelConstraints:t,pivotIndices:d,prevLayout:e}),panelConstraints:t})[n]}return{valueControls:n,valueMax:o,valueMin:a,valueNow:s}}function RC({children:e,className:t,disabled:n,disableDoubleClick:r,elementRef:o,id:a,style:s,...i}){const l=Cf(a),c=Ef({disabled:n,disableDoubleClick:r}),[d,u]=P.useState({}),[m,g]=P.useState("inactive"),[b,h]=P.useState(!1),x=P.useRef(null),v=Sf(x,o),{disableCursor:w,id:y,orientation:C,registerSeparator:E,updateSeparatorProps:S}=Mf(),M=C==="horizontal"?"vertical":"horizontal";lo(()=>{const O=x.current;if(O!==null){const _={disabled:c.disabled,disableDoubleClick:c.disableDoubleClick,element:O,id:l},T=E(_),k=_6(V=>{g(V.next.state!=="inactive"&&V.next.hitRegions.some(z=>z.separator===_)?V.next.state:"inactive")}),j=vf(y,V=>{const{derivedPanelConstraints:z,layout:$,separatorToPanels:F}=V.next,L=F.get(_);if(L){const D=L[0],re=L.indexOf(D);u(G6({layout:$,panelConstraints:z,panelId:D.id,panelIndex:re}))}});return()=>{k(),j(),T()}}},[y,l,E,c]),P.useEffect(()=>{S(l,{disabled:n,disableDoubleClick:r})},[n,r,l,S]);let R;n&&!w&&(R="not-allowed");let I;if(n)I="disabled";else switch(m){case"active":{I="active";break}default:b?I="focus":I=m}return p.jsx("div",{...i,"aria-controls":d.valueControls,"aria-disabled":n||void 0,"aria-orientation":M,"aria-valuemax":d.valueMax,"aria-valuemin":d.valueMin,"aria-valuenow":d.valueNow,children:e,className:t,"data-separator":I,"data-testid":l,id:l,onBlur:()=>h(!1),onFocus:()=>h(!0),ref:v,role:"separator",style:{flexBasis:"auto",cursor:R,...s,flexGrow:0,flexShrink:0,touchAction:"none"},tabIndex:n?void 0:0})}RC.displayName="Separator";function Y6({className:e,...t}){return p.jsx(EC,{"data-slot":"resizable-panel-group",className:N("flex h-full w-full aria-[orientation=vertical]:flex-col",e),...t})}function U6({...e}){return p.jsx(MC,{"data-slot":"resizable-panel",...e})}function K6({withHandle:e,className:t,...n}){return p.jsx(RC,{"data-slot":"resizable-handle",className:N("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90",t),...n,children:e&&p.jsx("div",{className:"z-10 flex h-4 w-3 items-center justify-center rounded-xs border bg-border",children:p.jsx(HO,{className:"size-2.5"})})})}function q6({className:e,children:t,...n}){return p.jsxs(BI,{"data-slot":"scroll-area",className:N("relative",e),...n,children:[p.jsx(HI,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",children:t}),p.jsx(kC,{}),p.jsx(GI,{})]})}function kC({className:e,orientation:t="vertical",...n}){return p.jsx(Z0,{"data-slot":"scroll-area-scrollbar",orientation:t,className:N("flex touch-none p-px transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...n,children:p.jsx(tx,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}function PC({...e}){return p.jsx(Au,{"data-slot":"sheet",...e})}function X6({...e}){return p.jsx(ju,{"data-slot":"sheet-trigger",...e})}function Z6({...e}){return p.jsx(no,{"data-slot":"sheet-close",...e})}function Q6({...e}){return p.jsx(zu,{"data-slot":"sheet-portal",...e})}function J6({className:e,...t}){return p.jsx($u,{"data-slot":"sheet-overlay",className:N("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",e),...t})}function NC({className:e,children:t,side:n="right",showCloseButton:r=!0,...o}){return p.jsxs(Q6,{children:[p.jsx(J6,{}),p.jsxs(Lu,{"data-slot":"sheet-content",className:N("fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:animate-in data-[state=open]:duration-500",n==="right"&&"inset-y-0 right-0 h-full w-3/4 data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm",n==="left"&&"inset-y-0 left-0 h-full w-3/4 data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",n==="top"&&"inset-x-0 top-0 h-auto data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",n==="bottom"&&"inset-x-0 bottom-0 h-auto data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",e),...o,children:[t,r&&p.jsxs(no,{className:"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary",children:[p.jsx(ll,{className:"size-4"}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function TC({className:e,...t}){return p.jsx("div",{"data-slot":"sheet-header",className:N("flex flex-col gap-1.5 p-4",e),...t})}function e8({className:e,...t}){return p.jsx("div",{"data-slot":"sheet-footer",className:N("mt-auto flex flex-col gap-2 p-4",e),...t})}function IC({className:e,...t}){return p.jsx(Fu,{"data-slot":"sheet-title",className:N("font-semibold text-foreground",e),...t})}function _C({className:e,...t}){return p.jsx(Vu,{"data-slot":"sheet-description",className:N("text-sm text-muted-foreground",e),...t})}const Dc=768;function OC(){const[e,t]=f.useState(void 0);return f.useEffect(()=>{const n=window.matchMedia(`(max-width: ${Dc-1}px)`),r=()=>{t(window.innerWidth<Dc)};return n.addEventListener("change",r),t(window.innerWidth<Dc),()=>n.removeEventListener("change",r)},[]),!!e}function gu({className:e,...t}){return p.jsx("div",{"data-slot":"skeleton",className:N("animate-pulse rounded-md bg-accent",e),...t})}const t8="sidebar_state",n8=3600*24*7,r8="16rem",o8="18rem",a8="3rem",s8="b",DC=f.createContext(null);function es(){const e=f.useContext(DC);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function AC({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:o,children:a,...s}){const i=OC(),[l,c]=f.useState(!1),[d,u]=f.useState(e),m=t??d,g=f.useCallback(v=>{const w=typeof v=="function"?v(m):v;n?n(w):u(w),document.cookie=`${t8}=${w}; path=/; max-age=${n8}`},[n,m]),b=f.useCallback(()=>i?c(v=>!v):g(v=>!v),[i,g,c]);f.useEffect(()=>{const v=w=>{w.key===s8&&(w.metaKey||w.ctrlKey)&&(w.preventDefault(),b())};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[b]);const h=m?"expanded":"collapsed",x=f.useMemo(()=>({state:h,open:m,setOpen:g,isMobile:i,openMobile:l,setOpenMobile:c,toggleSidebar:b}),[h,m,g,i,l,c,b]);return p.jsx(DC.Provider,{value:x,children:p.jsx(Zy,{delayDuration:0,children:p.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":r8,"--sidebar-width-icon":a8,...o},className:N("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",r),...s,children:a})})})}function i8({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:o,...a}){const{isMobile:s,state:i,openMobile:l,setOpenMobile:c}=es();return n==="none"?p.jsx("div",{"data-slot":"sidebar",className:N("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",r),...a,children:o}):s?p.jsx(PC,{open:l,onOpenChange:c,...a,children:p.jsxs(NC,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":o8},side:e,children:[p.jsxs(TC,{className:"sr-only",children:[p.jsx(IC,{children:"Sidebar"}),p.jsx(_C,{children:"Displays the mobile sidebar."})]}),p.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):p.jsxs("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":i,"data-collapsible":i==="collapsed"?n:"","data-variant":t,"data-side":e,"data-slot":"sidebar",children:[p.jsx("div",{"data-slot":"sidebar-gap",className:N("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),p.jsx("div",{"data-slot":"sidebar-container",className:N("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)",r),...a,children:p.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-sm",children:o})})]})}function jC({className:e,onClick:t,...n}){const{toggleSidebar:r}=es();return p.jsxs(Fn,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",size:"icon",onClick:o=>{t==null||t(o),r()},...n,children:[p.jsx(qO,{}),p.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function l8({className:e,...t}){const{toggleSidebar:n}=es();return p.jsx("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:n,title:"Toggle Sidebar",className:N("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})}function zC({className:e,...t}){return p.jsx("main",{"data-slot":"sidebar-inset",className:N("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",e),...t})}function c8({className:e,...t}){return p.jsx(Md,{"data-slot":"sidebar-input","data-sidebar":"input",className:N("h-8 w-full bg-background shadow-none",e),...t})}function u8({className:e,...t}){return p.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:N("flex flex-col gap-2 p-2",e),...t})}function d8({className:e,...t}){return p.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:N("flex flex-col gap-2 p-2",e),...t})}function f8({className:e,...t}){return p.jsx(cl,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:N("mx-2 w-auto bg-sidebar-border",e),...t})}function p8({className:e,...t}){return p.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:N("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})}function m8({className:e,...t}){return p.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:N("relative flex w-full min-w-0 flex-col p-2",e),...t})}function h8({className:e,asChild:t=!1,...n}){const r=t?zn:"div";return p.jsx(r,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:N("flex h-8 shrink-0 items-center rounded px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...n})}function g8({className:e,asChild:t=!1,...n}){const r=t?zn:"button";return p.jsx(r,{"data-slot":"sidebar-group-action","data-sidebar":"group-action",className:N("absolute top-3.5 right-3 flex aspect-square w-5 cursor-default items-center justify-center rounded p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform hover:bg-sidebar-accent focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","group-data-[collapsible=icon]:hidden",e),...n})}function b8({className:e,...t}){return p.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:N("w-full text-sm",e),...t})}function v8({className:e,...t}){return p.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:N("flex w-full min-w-0 flex-col gap-1",e),...t})}function x8({className:e,...t}){return p.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:N("group/menu-item relative",e),...t})}const y8=wn("peer/menu-button flex w-full cursor-default items-center gap-2 overflow-hidden rounded p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent focus-visible:ring-2 active:bg-sidebar-accent disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-background data-[active=true]:font-medium data-[active=true]:text-foreground data-[active=true]:border-r-4 data-[active=true]:border-primary data-[active=true]:hover:bg-background data-[state=open]:hover:bg-sidebar-accent [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent",outline:"bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function w8({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:o,className:a,...s}){const i=e?zn:"button",{isMobile:l,state:c}=es(),d=p.jsx(i,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":r,"data-active":t,className:N(y8({variant:n,size:r}),a),...s});return o?(typeof o=="string"&&(o={children:o}),p.jsxs(Qy,{children:[p.jsx(Jy,{asChild:!0,children:d}),p.jsx(ew,{side:"right",align:"center",hidden:c!=="collapsed"||l,...o})]})):d}function C8({className:e,asChild:t=!1,showOnHover:n=!1,...r}){const o=t?zn:"button";return p.jsx(o,{"data-slot":"sidebar-menu-action","data-sidebar":"menu-action",className:N("absolute top-1.5 right-1 flex aspect-square w-5 cursor-default items-center justify-center rounded p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform hover:bg-sidebar-accent focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",n&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground data-[state=open]:opacity-100 md:opacity-0",e),...r})}function S8({className:e,...t}){return p.jsx("div",{"data-slot":"sidebar-menu-badge","data-sidebar":"menu-badge",className:N("pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t})}function E8({className:e,showIcon:t=!1,...n}){const r=f.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return p.jsxs("div",{"data-slot":"sidebar-menu-skeleton","data-sidebar":"menu-skeleton",className:N("flex h-8 items-center gap-2 rounded px-2",e),...n,children:[t&&p.jsx(gu,{className:"size-4 rounded","data-sidebar":"menu-skeleton-icon"}),p.jsx(gu,{className:"h-4 max-w-(--skeleton-width) flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":r}})]})}function M8({className:e,...t}){return p.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:N("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t})}function R8({className:e,...t}){return p.jsx("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:N("group/menu-sub-item relative",e),...t})}function k8({asChild:e=!1,size:t="md",isActive:n=!1,className:r,...o}){const a=e?zn:"a";return p.jsx(a,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:N("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden hover:bg-sidebar-accent focus-visible:ring-2 active:bg-sidebar-accent disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",r),...o})}function P8({className:e,defaultValue:t,value:n,min:r=0,max:o=100,...a}){const s=f.useMemo(()=>Array.isArray(n)?n:Array.isArray(t)?t:[r,o],[n,t,r,o]);return p.jsxs(Bx,{"data-slot":"slider",defaultValue:t,value:n,min:r,max:o,className:N("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",e),...a,children:[p.jsx(Kx,{"data-slot":"slider-track",className:N("relative grow overflow-hidden rounded-full bg-muted data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:p.jsx(qx,{"data-slot":"slider-range",className:N("absolute bg-primary data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:s.length},(i,l)=>p.jsx(ty,{"data-slot":"slider-thumb",className:"block size-4 shrink-0 rounded-full border border-primary bg-white shadow-sm ring-ring/50 transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},l))]})}var N8=(e,t,n,r,o,a,s,i)=>{let l=document.documentElement,c=["light","dark"];function d(g){(Array.isArray(e)?e:[e]).forEach(b=>{let h=b==="class",x=h&&a?o.map(v=>a[v]||v):o;h?(l.classList.remove(...x),l.classList.add(a&&a[g]?a[g]:g)):l.setAttribute(b,g)}),u(g)}function u(g){i&&c.includes(g)&&(l.style.colorScheme=g)}function m(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)d(r);else try{let g=localStorage.getItem(t)||n,b=s&&g==="system"?m():g;d(b)}catch{}},T8=f.createContext(void 0),I8={setTheme:e=>{},themes:[]},_8=()=>{var e;return(e=f.useContext(T8))!=null?e:I8};f.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:o,defaultTheme:a,value:s,themes:i,nonce:l,scriptProps:c})=>{let d=JSON.stringify([n,t,a,e,i,s,r,o]).slice(1,-1);return f.createElement("script",{...c,suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(${N8.toString()})(${d})`}})});function O8(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const D8=e=>{switch(e){case"success":return z8;case"info":return L8;case"warning":return $8;case"error":return F8;default:return null}},A8=Array(12).fill(0),j8=({visible:e,className:t})=>P.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},P.createElement("div",{className:"sonner-spinner"},A8.map((n,r)=>P.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),z8=P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},P.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),$8=P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},P.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),L8=P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},P.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),F8=P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},P.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),V8=P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},P.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),P.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),W8=()=>{const[e,t]=P.useState(document.hidden);return P.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let bu=1;class B8{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...o}=t,a=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:bu++,s=this.toasts.find(l=>l.id===a),i=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),s?this.toasts=this.toasts.map(l=>l.id===a?(this.publish({...l,...t,id:a,title:r}),{...l,...t,id:a,dismissible:i,title:r}):l):this.addToast({title:r,...o,dismissible:i,id:a}),a},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let a=r!==void 0,s;const i=o.then(async c=>{if(s=["resolve",c],P.isValidElement(c))a=!1,this.create({id:r,type:"default",message:c});else if(G8(c)&&!c.ok){a=!1;const u=typeof n.error=="function"?await n.error(`HTTP error! status: ${c.status}`):n.error,m=typeof n.description=="function"?await n.description(`HTTP error! status: ${c.status}`):n.description,b=typeof u=="object"&&!P.isValidElement(u)?u:{message:u};this.create({id:r,type:"error",description:m,...b})}else if(c instanceof Error){a=!1;const u=typeof n.error=="function"?await n.error(c):n.error,m=typeof n.description=="function"?await n.description(c):n.description,b=typeof u=="object"&&!P.isValidElement(u)?u:{message:u};this.create({id:r,type:"error",description:m,...b})}else if(n.success!==void 0){a=!1;const u=typeof n.success=="function"?await n.success(c):n.success,m=typeof n.description=="function"?await n.description(c):n.description,b=typeof u=="object"&&!P.isValidElement(u)?u:{message:u};this.create({id:r,type:"success",description:m,...b})}}).catch(async c=>{if(s=["reject",c],n.error!==void 0){a=!1;const d=typeof n.error=="function"?await n.error(c):n.error,u=typeof n.description=="function"?await n.description(c):n.description,g=typeof d=="object"&&!P.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:u,...g})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((c,d)=>i.then(()=>s[0]==="reject"?d(s[1]):c(s[1])).catch(d));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||bu++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Kt=new B8,H8=(e,t)=>{const n=(t==null?void 0:t.id)||bu++;return Kt.addToast({title:e,...t,id:n}),n},G8=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Y8=H8,U8=()=>Kt.toasts,K8=()=>Kt.getActiveToasts();Object.assign(Y8,{success:Kt.success,info:Kt.info,warning:Kt.warning,error:Kt.error,custom:Kt.custom,message:Kt.message,promise:Kt.promise,dismiss:Kt.dismiss,loading:Kt.loading},{getHistory:U8,getToasts:K8});O8("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function _s(e){return e.label!==void 0}const q8=3,X8="24px",Z8="16px",Jm=4e3,Q8=356,J8=14,e$=45,t$=200;function Rn(...e){return e.filter(Boolean).join(" ")}function n$(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const r$=e=>{var t,n,r,o,a,s,i,l,c;const{invert:d,toast:u,unstyled:m,interacting:g,setHeights:b,visibleToasts:h,heights:x,index:v,toasts:w,expanded:y,removeToast:C,defaultRichColors:E,closeButton:S,style:M,cancelButtonStyle:R,actionButtonStyle:I,className:O="",descriptionClassName:_="",duration:T,position:k,gap:j,expandByDefault:V,classNames:z,icons:$,closeButtonAriaLabel:F="Close toast"}=e,[L,D]=P.useState(null),[re,pe]=P.useState(null),[G,B]=P.useState(!1),[J,oe]=P.useState(!1),[U,H]=P.useState(!1),[te,xe]=P.useState(!1),[Re,Y]=P.useState(!1),[we,he]=P.useState(0),[Ne,Me]=P.useState(0),fe=P.useRef(u.duration||T||Jm),Oe=P.useRef(null),se=P.useRef(null),Ae=v===0,Ke=v+1<=h,je=u.type,Pe=u.dismissible!==!1,ae=u.className||"",A=u.descriptionClassName||"",W=P.useMemo(()=>x.findIndex(ee=>ee.toastId===u.id)||0,[x,u.id]),X=P.useMemo(()=>{var ee;return(ee=u.closeButton)!=null?ee:S},[u.closeButton,S]),le=P.useMemo(()=>u.duration||T||Jm,[u.duration,T]),Te=P.useRef(0),Le=P.useRef(0),tt=P.useRef(0),Fe=P.useRef(null),[Ie,Ze]=k.split("-"),at=P.useMemo(()=>x.reduce((ee,q,We)=>We>=W?ee:ee+q.height,0),[x,W]),Qt=W8(),wt=u.invert||d,gt=je==="loading";Le.current=P.useMemo(()=>W*j+at,[W,at]),P.useEffect(()=>{fe.current=le},[le]),P.useEffect(()=>{B(!0)},[]),P.useEffect(()=>{const ee=se.current;if(ee){const q=ee.getBoundingClientRect().height;return Me(q),b(We=>[{toastId:u.id,height:q,position:u.position},...We]),()=>b(We=>We.filter(Ee=>Ee.toastId!==u.id))}},[b,u.id]),P.useLayoutEffect(()=>{if(!G)return;const ee=se.current,q=ee.style.height;ee.style.height="auto";const We=ee.getBoundingClientRect().height;ee.style.height=q,Me(We),b(Ee=>Ee.find(Ve=>Ve.toastId===u.id)?Ee.map(Ve=>Ve.toastId===u.id?{...Ve,height:We}:Ve):[{toastId:u.id,height:We,position:u.position},...Ee])},[G,u.title,u.description,b,u.id,u.jsx,u.action,u.cancel]);const Qe=P.useCallback(()=>{oe(!0),he(Le.current),b(ee=>ee.filter(q=>q.toastId!==u.id)),setTimeout(()=>{C(u)},t$)},[u,C,b,Le]);P.useEffect(()=>{if(u.promise&&je==="loading"||u.duration===1/0||u.type==="loading")return;let ee;return y||g||Qt?(()=>{if(tt.current<Te.current){const Ee=new Date().getTime()-Te.current;fe.current=fe.current-Ee}tt.current=new Date().getTime()})():(()=>{fe.current!==1/0&&(Te.current=new Date().getTime(),ee=setTimeout(()=>{u.onAutoClose==null||u.onAutoClose.call(u,u),Qe()},fe.current))})(),()=>clearTimeout(ee)},[y,g,u,je,Qt,Qe]),P.useEffect(()=>{u.delete&&(Qe(),u.onDismiss==null||u.onDismiss.call(u,u))},[Qe,u.delete]);function bt(){var ee;if($!=null&&$.loading){var q;return P.createElement("div",{className:Rn(z==null?void 0:z.loader,u==null||(q=u.classNames)==null?void 0:q.loader,"sonner-loader"),"data-visible":je==="loading"},$.loading)}return P.createElement(j8,{className:Rn(z==null?void 0:z.loader,u==null||(ee=u.classNames)==null?void 0:ee.loader),visible:je==="loading"})}const ie=u.icon||($==null?void 0:$[je])||D8(je);var ye,Se;return P.createElement("li",{tabIndex:0,ref:se,className:Rn(O,ae,z==null?void 0:z.toast,u==null||(t=u.classNames)==null?void 0:t.toast,z==null?void 0:z.default,z==null?void 0:z[je],u==null||(n=u.classNames)==null?void 0:n[je]),"data-sonner-toast":"","data-rich-colors":(ye=u.richColors)!=null?ye:E,"data-styled":!(u.jsx||u.unstyled||m),"data-mounted":G,"data-promise":!!u.promise,"data-swiped":Re,"data-removed":J,"data-visible":Ke,"data-y-position":Ie,"data-x-position":Ze,"data-index":v,"data-front":Ae,"data-swiping":U,"data-dismissible":Pe,"data-type":je,"data-invert":wt,"data-swipe-out":te,"data-swipe-direction":re,"data-expanded":!!(y||V&&G),"data-testid":u.testId,style:{"--index":v,"--toasts-before":v,"--z-index":w.length-v,"--offset":`${J?we:Le.current}px`,"--initial-height":V?"auto":`${Ne}px`,...M,...u.style},onDragEnd:()=>{H(!1),D(null),Fe.current=null},onPointerDown:ee=>{ee.button!==2&&(gt||!Pe||(Oe.current=new Date,he(Le.current),ee.target.setPointerCapture(ee.pointerId),ee.target.tagName!=="BUTTON"&&(H(!0),Fe.current={x:ee.clientX,y:ee.clientY})))},onPointerUp:()=>{var ee,q,We;if(te||!Pe)return;Fe.current=null;const Ee=Number(((ee=se.current)==null?void 0:ee.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Dt=Number(((q=se.current)==null?void 0:q.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ve=new Date().getTime()-((We=Oe.current)==null?void 0:We.getTime()),Ct=L==="x"?Ee:Dt,qe=Math.abs(Ct)/Ve;if(Math.abs(Ct)>=e$||qe>.11){he(Le.current),u.onDismiss==null||u.onDismiss.call(u,u),pe(L==="x"?Ee>0?"right":"left":Dt>0?"down":"up"),Qe(),xe(!0);return}else{var vt,dt;(vt=se.current)==null||vt.style.setProperty("--swipe-amount-x","0px"),(dt=se.current)==null||dt.style.setProperty("--swipe-amount-y","0px")}Y(!1),H(!1),D(null)},onPointerMove:ee=>{var q,We,Ee;if(!Fe.current||!Pe||((q=window.getSelection())==null?void 0:q.toString().length)>0)return;const Ve=ee.clientY-Fe.current.y,Ct=ee.clientX-Fe.current.x;var qe;const vt=(qe=e.swipeDirections)!=null?qe:n$(k);!L&&(Math.abs(Ct)>1||Math.abs(Ve)>1)&&D(Math.abs(Ct)>Math.abs(Ve)?"x":"y");let dt={x:0,y:0};const xt=Ut=>1/(1.5+Math.abs(Ut)/20);if(L==="y"){if(vt.includes("top")||vt.includes("bottom"))if(vt.includes("top")&&Ve<0||vt.includes("bottom")&&Ve>0)dt.y=Ve;else{const Ut=Ve*xt(Ve);dt.y=Math.abs(Ut)<Math.abs(Ve)?Ut:Ve}}else if(L==="x"&&(vt.includes("left")||vt.includes("right")))if(vt.includes("left")&&Ct<0||vt.includes("right")&&Ct>0)dt.x=Ct;else{const Ut=Ct*xt(Ct);dt.x=Math.abs(Ut)<Math.abs(Ct)?Ut:Ct}(Math.abs(dt.x)>0||Math.abs(dt.y)>0)&&Y(!0),(We=se.current)==null||We.style.setProperty("--swipe-amount-x",`${dt.x}px`),(Ee=se.current)==null||Ee.style.setProperty("--swipe-amount-y",`${dt.y}px`)}},X&&!u.jsx&&je!=="loading"?P.createElement("button",{"aria-label":F,"data-disabled":gt,"data-close-button":!0,onClick:gt||!Pe?()=>{}:()=>{Qe(),u.onDismiss==null||u.onDismiss.call(u,u)},className:Rn(z==null?void 0:z.closeButton,u==null||(r=u.classNames)==null?void 0:r.closeButton)},(Se=$==null?void 0:$.close)!=null?Se:V8):null,(je||u.icon||u.promise)&&u.icon!==null&&(($==null?void 0:$[je])!==null||u.icon)?P.createElement("div",{"data-icon":"",className:Rn(z==null?void 0:z.icon,u==null||(o=u.classNames)==null?void 0:o.icon)},u.promise||u.type==="loading"&&!u.icon?u.icon||bt():null,u.type!=="loading"?ie:null):null,P.createElement("div",{"data-content":"",className:Rn(z==null?void 0:z.content,u==null||(a=u.classNames)==null?void 0:a.content)},P.createElement("div",{"data-title":"",className:Rn(z==null?void 0:z.title,u==null||(s=u.classNames)==null?void 0:s.title)},u.jsx?u.jsx:typeof u.title=="function"?u.title():u.title),u.description?P.createElement("div",{"data-description":"",className:Rn(_,A,z==null?void 0:z.description,u==null||(i=u.classNames)==null?void 0:i.description)},typeof u.description=="function"?u.description():u.description):null),P.isValidElement(u.cancel)?u.cancel:u.cancel&&_s(u.cancel)?P.createElement("button",{"data-button":!0,"data-cancel":!0,style:u.cancelButtonStyle||R,onClick:ee=>{_s(u.cancel)&&Pe&&(u.cancel.onClick==null||u.cancel.onClick.call(u.cancel,ee),Qe())},className:Rn(z==null?void 0:z.cancelButton,u==null||(l=u.classNames)==null?void 0:l.cancelButton)},u.cancel.label):null,P.isValidElement(u.action)?u.action:u.action&&_s(u.action)?P.createElement("button",{"data-button":!0,"data-action":!0,style:u.actionButtonStyle||I,onClick:ee=>{_s(u.action)&&(u.action.onClick==null||u.action.onClick.call(u.action,ee),!ee.defaultPrevented&&Qe())},className:Rn(z==null?void 0:z.actionButton,u==null||(c=u.classNames)==null?void 0:c.actionButton)},u.action.label):null)};function eh(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function o$(e,t){const n={};return[e,t].forEach((r,o)=>{const a=o===1,s=a?"--mobile-offset":"--offset",i=a?Z8:X8;function l(c){["top","right","bottom","left"].forEach(d=>{n[`${s}-${d}`]=typeof c=="number"?`${c}px`:c})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(c=>{r[c]===void 0?n[`${s}-${c}`]=i:n[`${s}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(i)}),n}const a$=P.forwardRef(function(t,n){const{id:r,invert:o,position:a="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:l,className:c,offset:d,mobileOffset:u,theme:m="light",richColors:g,duration:b,style:h,visibleToasts:x=q8,toastOptions:v,dir:w=eh(),gap:y=J8,icons:C,containerAriaLabel:E="Notifications"}=t,[S,M]=P.useState([]),R=P.useMemo(()=>r?S.filter(G=>G.toasterId===r):S.filter(G=>!G.toasterId),[S,r]),I=P.useMemo(()=>Array.from(new Set([a].concat(R.filter(G=>G.position).map(G=>G.position)))),[R,a]),[O,_]=P.useState([]),[T,k]=P.useState(!1),[j,V]=P.useState(!1),[z,$]=P.useState(m!=="system"?m:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),F=P.useRef(null),L=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),D=P.useRef(null),re=P.useRef(!1),pe=P.useCallback(G=>{M(B=>{var J;return(J=B.find(oe=>oe.id===G.id))!=null&&J.delete||Kt.dismiss(G.id),B.filter(({id:oe})=>oe!==G.id)})},[]);return P.useEffect(()=>Kt.subscribe(G=>{if(G.dismiss){requestAnimationFrame(()=>{M(B=>B.map(J=>J.id===G.id?{...J,delete:!0}:J))});return}setTimeout(()=>{th.flushSync(()=>{M(B=>{const J=B.findIndex(oe=>oe.id===G.id);return J!==-1?[...B.slice(0,J),{...B[J],...G},...B.slice(J+1)]:[G,...B]})})})}),[S]),P.useEffect(()=>{if(m!=="system"){$(m);return}if(m==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?$("dark"):$("light")),typeof window>"u")return;const G=window.matchMedia("(prefers-color-scheme: dark)");try{G.addEventListener("change",({matches:B})=>{$(B?"dark":"light")})}catch{G.addListener(({matches:J})=>{try{$(J?"dark":"light")}catch(oe){console.error(oe)}})}},[m]),P.useEffect(()=>{S.length<=1&&k(!1)},[S]),P.useEffect(()=>{const G=B=>{var J;if(s.every(H=>B[H]||B.code===H)){var U;k(!0),(U=F.current)==null||U.focus()}B.code==="Escape"&&(document.activeElement===F.current||(J=F.current)!=null&&J.contains(document.activeElement))&&k(!1)};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[s]),P.useEffect(()=>{if(F.current)return()=>{D.current&&(D.current.focus({preventScroll:!0}),D.current=null,re.current=!1)}},[F.current]),P.createElement("section",{ref:n,"aria-label":`${E} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},I.map((G,B)=>{var J;const[oe,U]=G.split("-");return R.length?P.createElement("ol",{key:G,dir:w==="auto"?eh():w,tabIndex:-1,ref:F,className:c,"data-sonner-toaster":!0,"data-sonner-theme":z,"data-y-position":oe,"data-x-position":U,style:{"--front-toast-height":`${((J=O[0])==null?void 0:J.height)||0}px`,"--width":`${Q8}px`,"--gap":`${y}px`,...h,...o$(d,u)},onBlur:H=>{re.current&&!H.currentTarget.contains(H.relatedTarget)&&(re.current=!1,D.current&&(D.current.focus({preventScroll:!0}),D.current=null))},onFocus:H=>{H.target instanceof HTMLElement&&H.target.dataset.dismissible==="false"||re.current||(re.current=!0,D.current=H.relatedTarget)},onMouseEnter:()=>k(!0),onMouseMove:()=>k(!0),onMouseLeave:()=>{j||k(!1)},onDragEnd:()=>k(!1),onPointerDown:H=>{H.target instanceof HTMLElement&&H.target.dataset.dismissible==="false"||V(!0)},onPointerUp:()=>V(!1)},R.filter(H=>!H.position&&B===0||H.position===G).map((H,te)=>{var xe,Re;return P.createElement(r$,{key:H.id,icons:C,index:te,toast:H,defaultRichColors:g,duration:(xe=v==null?void 0:v.duration)!=null?xe:b,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:o,visibleToasts:x,closeButton:(Re=v==null?void 0:v.closeButton)!=null?Re:l,interacting:j,position:G,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,closeButtonAriaLabel:v==null?void 0:v.closeButtonAriaLabel,removeToast:pe,toasts:R.filter(Y=>Y.position==H.position),heights:O.filter(Y=>Y.position==H.position),setHeights:_,expandByDefault:i,gap:y,expanded:T,swipeDirections:t.swipeDirections})})):null}))}),s$=({...e})=>{const{theme:t="system"}=_8();return p.jsx(a$,{theme:t,className:"toaster group",icons:{success:p.jsx(LO,{className:"size-4"}),info:p.jsx(YO,{className:"size-4"}),warning:p.jsx(JO,{className:"size-4"}),error:p.jsx(ZO,{className:"size-4"}),loading:p.jsx(By,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},...e})};function i$({className:e,...t}){return p.jsx(By,{role:"status","aria-label":"Loading",className:N("size-4 animate-spin",e),...t})}function l$({className:e,size:t="default",...n}){return p.jsx(iy,{"data-slot":"switch","data-size":t,className:N("peer group/switch inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80",e),...n,children:p.jsx(cy,{"data-slot":"switch-thumb",className:N("pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground")})})}function c$({className:e,...t}){return p.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:p.jsx("table",{"data-slot":"table",className:N("w-full caption-bottom text-sm",e),...t})})}function u$({className:e,...t}){return p.jsx("thead",{"data-slot":"table-header",className:N("[&_tr]:border-b",e),...t})}function d$({className:e,...t}){return p.jsx("tbody",{"data-slot":"table-body",className:N("[&_tr:last-child]:border-0",e),...t})}function f$({className:e,...t}){return p.jsx("tfoot",{"data-slot":"table-footer",className:N("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t})}function p$({className:e,...t}){return p.jsx("tr",{"data-slot":"table-row",className:N("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",e),...t})}function m$({className:e,...t}){return p.jsx("th",{"data-slot":"table-head",className:N("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function h$({className:e,...t}){return p.jsx("td",{"data-slot":"table-cell",className:N("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function g$({className:e,...t}){return p.jsx("caption",{"data-slot":"table-caption",className:N("mt-4 text-sm text-muted-foreground",e),...t})}const Rf=wn("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none hover:bg-muted hover:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 min-w-9 px-2",sm:"h-8 min-w-8 px-1.5",lg:"h-10 min-w-10 px-2.5"}},defaultVariants:{variant:"default",size:"default"}});function b$({className:e,variant:t,size:n,...r}){return p.jsx(B_,{"data-slot":"toggle",className:N(Rf({variant:t,size:n,className:e})),...r})}const $C=f.createContext({size:"default",variant:"default",spacing:0});function v$({className:e,variant:t,size:n,spacing:r=0,children:o,...a}){return p.jsx(K_,{"data-slot":"toggle-group","data-variant":t,"data-size":n,"data-spacing":r,style:{"--gap":r},className:N("group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-md data-[spacing=default]:data-[variant=outline]:shadow-xs",e),...a,children:p.jsx($C.Provider,{value:{variant:t,size:n,spacing:r},children:o})})}function x$({className:e,children:t,variant:n,size:r,...o}){const a=f.useContext($C);return p.jsx(q_,{"data-slot":"toggle-group-item","data-variant":a.variant||n,"data-size":a.size||r,"data-spacing":a.spacing,className:N(Rf({variant:a.variant||n,size:a.size||r}),"w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10","data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-md data-[spacing=0]:last:rounded-r-md data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l",e),...o,children:t})}const Ko="'YTLC' 540, 'wght' 850, 'wdth' 95";function y$({className:e,style:t,...n}){return p.jsx("h1",{className:N("text-[2em] leading-tight",e),style:{fontVariationSettings:Ko,...t},...n})}function w$({className:e,style:t,...n}){return p.jsx("h2",{className:N("text-[1.75em] leading-tight",e),style:{fontVariationSettings:Ko,...t},...n})}function C$({className:e,style:t,...n}){return p.jsx("h3",{className:N("text-[1.5em] leading-snug",e),style:{fontVariationSettings:Ko,...t},...n})}function S$({className:e,style:t,...n}){return p.jsx("h4",{className:N("text-[1.25em] leading-snug",e),style:{fontVariationSettings:Ko,...t},...n})}function E$({className:e,style:t,...n}){return p.jsx("h5",{className:N("text-[1.125em] leading-snug",e),style:{fontVariationSettings:Ko,...t},...n})}function M$({className:e,style:t,...n}){return p.jsx("h6",{className:N("text-[1em] leading-snug",e),style:{fontVariationSettings:Ko,...t},...n})}function R$({className:e,style:t,...n}){return p.jsx("p",{className:N("text-[1em] leading-normal",e),style:{fontVariationSettings:"'wght' 500, 'YTLC' 540",...t},...n})}function k$({className:e,style:t,...n}){return p.jsx("strong",{className:N("font-normal",e),style:{fontVariationSettings:"'wght' 800, 'YTLC' 540",...t},...n})}function P$({className:e,...t}){return p.jsx("em",{className:N("italic",e),...t})}function N$({className:e,style:t,...n}){return p.jsx("strong",{className:N("italic font-normal",e),style:{fontVariationSettings:"'wght' 800, 'YTLC' 540",...t},...n})}function T$({className:e,...t}){return p.jsx("span",{className:N("text-[0.875em]",e),...t})}function I$({className:e,...t}){return p.jsx("code",{className:N("font-mono",e),...t})}function _$({sidebar:e,header:t,children:n,className:r,defaultOpen:o=!0}){return p.jsxs(AC,{defaultOpen:o,children:[e,p.jsxs(zC,{children:[t&&p.jsxs("header",{className:"sticky top-0 z-10 flex h-12 shrink-0 items-center gap-2 border-b border-background-elevated bg-background px-4",children:[e&&p.jsx(jC,{}),t]}),p.jsx("main",{className:N("flex flex-1 flex-col",r),children:n})]})]})}function O$({title:e,prefixActions:t,actions:n,className:r}){return p.jsxs("div",{className:N("flex min-h-12 w-full items-center justify-between gap-3",r),children:[p.jsxs("div",{className:"flex items-center gap-3",children:[t&&p.jsx("div",{className:"flex items-center gap-3",children:t}),p.jsx("span",{className:"text-sm",style:{fontVariationSettings:"'wght' 800, 'YTLC' 540"},children:e})]}),n&&p.jsx("div",{className:"flex items-center gap-3",children:n})]})}exports.Alert=FD;exports.AlertAction=BD;exports.AlertDescription=WD;exports.AlertDialog=HD;exports.AlertDialogAction=QD;exports.AlertDialogCancel=JD;exports.AlertDialogContent=YD;exports.AlertDialogDescription=XD;exports.AlertDialogFooter=KD;exports.AlertDialogHeader=UD;exports.AlertDialogMedia=ZD;exports.AlertDialogOverlay=rw;exports.AlertDialogPortal=nw;exports.AlertDialogTitle=qD;exports.AlertDialogTrigger=GD;exports.AlertTitle=VD;exports.AspectRatio=e2;exports.Avatar=t2;exports.AvatarBadge=o2;exports.AvatarFallback=r2;exports.AvatarGroup=a2;exports.AvatarGroupCount=s2;exports.AvatarImage=n2;exports.Badge=EO;exports.BodyText=R$;exports.BoldItalicText=N$;exports.BoldText=k$;exports.Breadcrumb=i2;exports.BreadcrumbEllipsis=p2;exports.BreadcrumbItem=c2;exports.BreadcrumbLink=u2;exports.BreadcrumbList=l2;exports.BreadcrumbPage=d2;exports.BreadcrumbSeparator=f2;exports.Button=Fn;exports.ButtonGroup=m2;exports.ButtonGroupSeparator=g2;exports.ButtonGroupText=h2;exports.Calendar=Aw;exports.CalendarDayButton=jw;exports.Card=bO;exports.CardAction=wO;exports.CardContent=CO;exports.CardDescription=yO;exports.CardFooter=SO;exports.CardHeader=vO;exports.CardTitle=xO;exports.Checkbox=vD;exports.Collapsible=lj;exports.CollapsibleContent=uj;exports.CollapsibleTrigger=cj;exports.Combobox=mz;exports.ComboboxChip=kz;exports.ComboboxChips=Rz;exports.ComboboxChipsInput=Pz;exports.ComboboxCollection=Sz;exports.ComboboxContent=vz;exports.ComboboxEmpty=Ez;exports.ComboboxGroup=wz;exports.ComboboxInput=bz;exports.ComboboxItem=yz;exports.ComboboxLabel=Cz;exports.ComboboxList=xz;exports.ComboboxSeparator=Mz;exports.ComboboxTrigger=cC;exports.ComboboxValue=hz;exports.ContextMenu=Tz;exports.ContextMenuCheckboxItem=Fz;exports.ContextMenuContent=$z;exports.ContextMenuGroup=_z;exports.ContextMenuItem=Lz;exports.ContextMenuLabel=Wz;exports.ContextMenuPortal=Oz;exports.ContextMenuRadioGroup=Az;exports.ContextMenuRadioItem=Vz;exports.ContextMenuSeparator=Bz;exports.ContextMenuShortcut=Hz;exports.ContextMenuSub=Dz;exports.ContextMenuSubContent=zz;exports.ContextMenuSubTrigger=jz;exports.ContextMenuTrigger=Iz;exports.DatePicker=Gz;exports.Dialog=tD;exports.DialogClose=rD;exports.DialogContent=oD;exports.DialogDescription=lD;exports.DialogFooter=sD;exports.DialogHeader=aD;exports.DialogOverlay=Gy;exports.DialogPortal=Hy;exports.DialogTitle=iD;exports.DialogTrigger=nD;exports.DropdownMenu=yD;exports.DropdownMenuCheckboxItem=RD;exports.DropdownMenuContent=SD;exports.DropdownMenuGroup=ED;exports.DropdownMenuItem=MD;exports.DropdownMenuLabel=ND;exports.DropdownMenuPortal=wD;exports.DropdownMenuRadioGroup=kD;exports.DropdownMenuRadioItem=PD;exports.DropdownMenuSeparator=TD;exports.DropdownMenuShortcut=ID;exports.DropdownMenuSub=_D;exports.DropdownMenuSubContent=DD;exports.DropdownMenuSubTrigger=OD;exports.DropdownMenuTrigger=CD;exports.H1=y$;exports.H2=w$;exports.H3=C$;exports.H4=S$;exports.H5=E$;exports.H6=M$;exports.Input=Md;exports.InputGroup=sC;exports.InputGroupAddon=iC;exports.InputGroupButton=gf;exports.InputGroupInput=lC;exports.InputGroupText=fz;exports.InputGroupTextarea=pz;exports.ItalicText=P$;exports.Item=qz;exports.ItemActions=t6;exports.ItemContent=Qz;exports.ItemDescription=e6;exports.ItemFooter=r6;exports.ItemGroup=Yz;exports.ItemHeader=n6;exports.ItemMedia=Zz;exports.ItemSeparator=Uz;exports.ItemTitle=Jz;exports.Label=xD;exports.LabelText=T$;exports.MonoText=I$;exports.PageHeader=O$;exports.Pagination=o6;exports.PaginationContent=a6;exports.PaginationEllipsis=c6;exports.PaginationItem=s6;exports.PaginationLink=bf;exports.PaginationNext=l6;exports.PaginationPrevious=i6;exports.Popover=Yy;exports.PopoverAnchor=cD;exports.PopoverContent=Ky;exports.PopoverTrigger=Uy;exports.Progress=u6;exports.RadioGroup=d6;exports.RadioGroupItem=f6;exports.ResizableHandle=K6;exports.ResizablePanel=U6;exports.ResizablePanelGroup=Y6;exports.Scaffold=_$;exports.ScrollArea=q6;exports.ScrollBar=kC;exports.Select=uD;exports.SelectContent=mD;exports.SelectGroup=dD;exports.SelectItem=gD;exports.SelectLabel=hD;exports.SelectScrollDownButton=Xy;exports.SelectScrollUpButton=qy;exports.SelectSeparator=bD;exports.SelectTrigger=pD;exports.SelectValue=fD;exports.Separator=cl;exports.Sheet=PC;exports.SheetClose=Z6;exports.SheetContent=NC;exports.SheetDescription=_C;exports.SheetFooter=e8;exports.SheetHeader=TC;exports.SheetTitle=IC;exports.SheetTrigger=X6;exports.Sidebar=i8;exports.SidebarContent=p8;exports.SidebarFooter=d8;exports.SidebarGroup=m8;exports.SidebarGroupAction=g8;exports.SidebarGroupContent=b8;exports.SidebarGroupLabel=h8;exports.SidebarHeader=u8;exports.SidebarInput=c8;exports.SidebarInset=zC;exports.SidebarMenu=v8;exports.SidebarMenuAction=C8;exports.SidebarMenuBadge=S8;exports.SidebarMenuButton=w8;exports.SidebarMenuItem=x8;exports.SidebarMenuSkeleton=E8;exports.SidebarMenuSub=M8;exports.SidebarMenuSubButton=k8;exports.SidebarMenuSubItem=R8;exports.SidebarProvider=AC;exports.SidebarRail=l8;exports.SidebarSeparator=f8;exports.SidebarTrigger=jC;exports.Skeleton=gu;exports.Slider=P8;exports.Spinner=i$;exports.Switch=l$;exports.Table=c$;exports.TableBody=d$;exports.TableCaption=g$;exports.TableCell=h$;exports.TableFooter=f$;exports.TableHead=m$;exports.TableHeader=u$;exports.TableRow=p$;exports.Tabs=AD;exports.TabsContent=$D;exports.TabsList=jD;exports.TabsTrigger=zD;exports.Textarea=aC;exports.ThemeProvider=LM;exports.Toaster=s$;exports.Toggle=b$;exports.ToggleGroup=v$;exports.ToggleGroupItem=x$;exports.Tooltip=Qy;exports.TooltipContent=ew;exports.TooltipProvider=Zy;exports.TooltipTrigger=Jy;exports.badgeVariants=Ly;exports.buttonGroupVariants=ow;exports.buttonVariants=Ca;exports.cn=N;exports.generateTheme=$h;exports.tabsListVariants=tw;exports.toggleVariants=Rf;exports.tokensToVars=Lh;exports.useComboboxAnchor=Nz;exports.useIsMobile=OC;exports.useSidebar=es;exports.useTheme=FM;
|