izen-react-starter 1.1.2 → 1.1.4
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 +43 -25
- package/dist/{MIMHJGAX-Brj9G5XE.js → MIMHJGAX-CX0R0gR-.js} +1 -1
- package/dist/{Q7LWSL4U-CPoRPcQS.js → Q7LWSL4U-DisRfAmB.js} +2 -2
- package/dist/{VLTTJS3N-BeVVV6a8.js → VLTTJS3N-hByn9hgE.js} +2 -2
- package/dist/components/Card/Card.d.ts +1 -5
- package/dist/components/Card/Card.d.ts.map +1 -1
- package/dist/{index-lCrdXFfH.js → index-BlTeKmzn.js} +6 -5
- package/dist/react-starter.js +1 -1
- package/dist/react-starter.umd.cjs +1 -1
- package/package.json +1 -1
|
@@ -347,7 +347,7 @@ ${n.map(([i,a])=>{var l;const s=((l=a.theme)==null?void 0:l[r])||a.color;return
|
|
|
347
347
|
- less than the value passed to \`max\` (or ${Zx} if no \`max\` prop is set)
|
|
348
348
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
349
349
|
|
|
350
|
-
Defaulting to \`null\`.`}var H6=B6,i0e=z6;const W6=g.forwardRef(({className:e,value:t,...n},r)=>b.jsx(H6,{ref:r,className:q("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...n,children:b.jsx(i0e,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));W6.displayName=H6.displayName;var _d=(e=>(e.Manage="manage",e.Create="create",e.Read="read",e.Update="update",e.Delete="delete",e))(_d||{}),Md=(e=>(e.Undefined="d.e.f.a.u.l.t",e.Auth="auth",e.Users="users",e.UserGroups="user-groups",e.Clients="clients",e.Shared="shared",e.Reports="reports",e.Preferences="preferences",e.Locations="locations",e.IssueTypes="issue-types",e.Checkpoint="checkpoints",e.LocationShift="location",e.Employees="employees",e.EmployeeAvailabilities="employee-availabilities",e.EmployeeShift="employee-shifts",e.UserDevice="user-devices",e.EmployeeShift_SelfSchedule="employee-shifts/self-schedule",e.Map="map",e.Issue="issues",e))(Md||{}),K6=(e=>(e.Admin="admin",e.Manager="manager",e.Reader="reader",e.Client="client",e))(K6||{});const a0e=[{label:"Admin",value:"admin"},{label:"Manager",value:"manager"},{label:"Viewer",value:"reader"},{label:"Client",value:"client"}],G6={admin:{manage:{can:"all"},create:{can:"all"},read:{can:"all"},update:{can:"all"},delete:{can:"all"}},manager:{manage:{can:["users","preferences","clients","shared","issue-types","checkpoints","user-devices","reports","map","locations"]},create:{can:["users","preferences","clients","shared","issue-types","checkpoints","user-devices","reports","map","locations"]},read:{can:["users","preferences","clients","shared","issue-types","checkpoints","user-devices","reports","map","locations"]},update:{can:["users","preferences","clients","shared","issue-types","checkpoints","user-devices","reports","map","locations"]},delete:{can:["users","preferences","clients","shared","issue-types","checkpoints","user-devices","reports","map","locations"]}},reader:{read:{can:["users","preferences","clients","shared","locations","issue-types","checkpoints","user-devices"]}},client:{manage:{can:["users","preferences","clients","shared"]},create:{can:["users","preferences","clients","shared"]},read:{can:["users","preferences","clients","shared"]},update:{can:["users","preferences","clients","shared"]},delete:{can:["users","preferences","clients","shared"]}}},Y6=(e,t,n)=>{var r;for(const o of e){const i=G6[o];if(n==="d.e.f.a.u.l.t"||!i)return!1;const a=i[t];if(!a)return!1;if((a.can==="all"||a.can.includes(n))&&!((r=a.cannot)!=null&&r.includes(n)))return!0}return!1},tm=()=>{const{user:e}=Zv();return{isAllowed:(r,o)=>{if(o===Md.Auth)return!0;if(!e)return!1;const i=e.role;return Y6([i],r,o)},getResourceByUrl:r=>{const o=Object.entries(Md);for(const[,i]of o)if(r.startsWith("/"+i))return i;return Md.Undefined}}},s0e=({children:e,resource:t,action:n=_d.Read,fallback:r=null})=>{const{isAllowed:o}=tm();return o(n,t)?e:r},nm=e=>O.forwardRef((t,n)=>{const{isAllowed:r}=tm(),{accessedResource:o,accessAction:i=_d.Read,...a}=t;return r(i,o)?b.jsx(e,{ref:n,...a}):null}),l0e=({children:e,resource:t,fallback:n=null})=>{const{isAllowed:r}=tm();return r(_d.Update,t)?e:n},c0e=nm(lx),u0e=nm(Xv),d0e=nm(Xc);var Jx="Radio",[f0e,X6]=kt(Jx),[h0e,p0e]=f0e(Jx),Q6=g.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:i,disabled:a,value:s="on",onCheck:l,form:c,...u}=e,[d,f]=g.useState(null),p=je(t,v=>f(v)),h=g.useRef(!1),m=d?c||!!d.closest("form"):!0;return b.jsxs(h0e,{scope:n,checked:o,disabled:a,children:[b.jsx(ye.button,{type:"button",role:"radio","aria-checked":o,"data-state":t8(o),"data-disabled":a?"":void 0,disabled:a,value:s,...u,ref:p,onClick:ne(e.onClick,v=>{o||l==null||l(),m&&(h.current=v.isPropagationStopped(),h.current||v.stopPropagation())})}),m&&b.jsx(e8,{control:d,bubbles:!h.current,name:r,value:s,checked:o,required:i,disabled:a,form:c,style:{transform:"translateX(-100%)"}})]})});Q6.displayName=Jx;var Z6="RadioIndicator",J6=g.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,i=p0e(Z6,n);return b.jsx(Tt,{present:r||i.checked,children:b.jsx(ye.span,{"data-state":t8(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t})})});J6.displayName=Z6;var g0e="RadioBubbleInput",e8=g.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},i)=>{const a=g.useRef(null),s=je(a,i),l=wl(n),c=Ju(t);return g.useEffect(()=>{const u=a.current;if(!u)return;const d=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==n&&p){const h=new Event("click",{bubbles:r});p.call(u,n),u.dispatchEvent(h)}},[l,n,r]),b.jsx(ye.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:s,style:{...o.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});e8.displayName=g0e;function t8(e){return e?"checked":"unchecked"}var m0e=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],rm="RadioGroup",[v0e]=kt(rm,[Lo,X6]),n8=Lo(),r8=X6(),[y0e,b0e]=v0e(rm),o8=g.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:i,required:a=!1,disabled:s=!1,orientation:l,dir:c,loop:u=!0,onValueChange:d,...f}=e,p=n8(n),h=Wr(c),[m,v]=Ot({prop:i,defaultProp:o??null,onChange:d,caller:rm});return b.jsx(y0e,{scope:n,name:r,required:a,disabled:s,value:m,onValueChange:v,children:b.jsx(ld,{asChild:!0,...p,orientation:l,dir:h,loop:u,children:b.jsx(ye.div,{role:"radiogroup","aria-required":a,"aria-orientation":l,"data-disabled":s?"":void 0,dir:h,...f,ref:t})})})});o8.displayName=rm;var i8="RadioGroupItem",a8=g.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,i=b0e(i8,n),a=i.disabled||r,s=n8(n),l=r8(n),c=g.useRef(null),u=je(t,c),d=i.value===o.value,f=g.useRef(!1);return g.useEffect(()=>{const p=m=>{m0e.includes(m.key)&&(f.current=!0)},h=()=>f.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",h),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",h)}},[]),b.jsx(cd,{asChild:!0,...s,focusable:!a,active:d,children:b.jsx(Q6,{disabled:a,required:i.required,checked:d,...l,...o,name:i.name,ref:u,onCheck:()=>i.onValueChange(o.value),onKeyDown:ne(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:ne(o.onFocus,()=>{var p;f.current&&((p=c.current)==null||p.click())})})})});a8.displayName=i8;var w0e="RadioGroupIndicator",s8=g.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=r8(n);return b.jsx(J6,{...o,...r,ref:t})});s8.displayName=w0e;var l8=o8,c8=a8,x0e=s8;const u8=g.forwardRef(({className:e,...t},n)=>b.jsx(l8,{className:q("grid gap-2",e),...t,ref:n}));u8.displayName=l8.displayName;const d8=g.forwardRef(({className:e,...t},n)=>b.jsx(c8,{ref:n,className:q("aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:b.jsx(x0e,{className:"flex items-center justify-center",children:b.jsx(yy,{className:"h-3.5 w-3.5 fill-primary"})})}));d8.displayName=c8.displayName;function Ct(e,t="Assertion error"){if(!e)throw Error(t)}function Ll({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 eS(e,t){return t.sort(e==="horizontal"?S0e:C0e)}function S0e(e,t){const n=e.element.offsetLeft-t.element.offsetLeft;return n!==0?n:e.element.offsetWidth-t.element.offsetWidth}function C0e(e,t){const n=e.element.offsetTop-t.element.offsetTop;return n!==0?n:e.element.offsetHeight-t.element.offsetHeight}function f8(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function h8(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 E0e({orientation:e,rects:t,targetRect:n}){const r={x:n.x+n.width/2,y:n.y+n.height/2};let o,i=Number.MAX_VALUE;for(const a of t){const{x:s,y:l}=h8(r,a),c=e==="horizontal"?s:l;c<i&&(i=c,o=a)}return Ct(o,"No rect found"),o}function p8(e){const{element:t,orientation:n,panels:r,separators:o}=e,i=eS(n,Array.from(t.children).filter(f8).map(u=>({element:u}))).map(({element:u})=>u),a=[];let s=!1,l,c=[];for(const u of i)if(u.hasAttribute("data-panel")){const d=r.find(f=>f.element===u);if(d){if(l){const f=l.element.getBoundingClientRect(),p=u.getBoundingClientRect();let h;if(s){const m=n==="horizontal"?new DOMRect(f.right,f.top,0,f.height):new DOMRect(f.left,f.bottom,f.width,0),v=n==="horizontal"?new DOMRect(p.left,p.top,0,p.height):new DOMRect(p.left,p.top,p.width,0);switch(c.length){case 0:{h=[m,v];break}case 1:{const y=c[0],w=E0e({orientation:n,rects:[f,p],targetRect:y.element.getBoundingClientRect()});h=[y,w===f?v:m];break}default:{h=c;break}}}else c.length?h=c:h=[n==="horizontal"?new DOMRect(f.right,p.top,p.left-f.right,p.height):new DOMRect(p.left,f.bottom,p.width,p.top-f.bottom)];for(const m of h)a.push({group:e,groupSize:Ll({group:e}),panels:[l,d],separator:"width"in m?void 0:m,rect:"width"in m?m:m.element.getBoundingClientRect()})}s=!1,l=d,c=[]}}else if(u.hasAttribute("data-separator")){const d=o.find(f=>f.element===u);d?c.push(d):(l=void 0,c=[])}else s=!0;return a}function P0e(e,t){const n=getComputedStyle(e),r=parseFloat(n.fontSize);return t*r}function O0e(e,t){const n=getComputedStyle(e.ownerDocument.body),r=parseFloat(n.fontSize);return t*r}function T0e(e){return e/100*window.innerHeight}function _0e(e){return e/100*window.innerWidth}function M0e(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 om({groupSize:e,panelElement:t,styleProp:n}){let r;const[o,i]=M0e(n);switch(i){case"%":{r=o/100*e;break}case"px":{r=o;break}case"rem":{r=O0e(t,o);break}case"em":{r=P0e(t,o);break}case"vh":{r=T0e(o);break}case"vw":{r=_0e(o);break}}return r}function co(e){return parseFloat(e.toFixed(3))}function g8(e){const{panels:t}=e,n=Ll({group:e});return n===0?t.map(r=>({collapsedSize:0,collapsible:r.panelConstraints.collapsible===!0,defaultSize:void 0,minSize:0,maxSize:100,panelId:r.id})):t.map(r=>{const{element:o,panelConstraints:i}=r;let a=0;if(i.collapsedSize){const u=om({groupSize:n,panelElement:o,styleProp:i.collapsedSize});a=co(u/n*100)}let s;if(i.defaultSize){const u=om({groupSize:n,panelElement:o,styleProp:i.defaultSize});s=co(u/n*100)}let l=0;if(i.minSize){const u=om({groupSize:n,panelElement:o,styleProp:i.minSize});l=co(u/n*100)}let c=100;if(i.maxSize){const u=om({groupSize:n,panelElement:o,styleProp:i.maxSize});c=co(u/n*100)}return{collapsedSize:a,collapsible:i.collapsible===!0,defaultSize:s,minSize:l,maxSize:c,panelId:r.id}})}class k0e{constructor(){Le(this,va,{})}addListener(t,n){const r=K(this,va)[t];return r===void 0?K(this,va)[t]=[n]:r.includes(n)||r.push(n),()=>{this.removeListener(t,n)}}emit(t,n){const r=K(this,va)[t];if(r!==void 0)if(r.length===1)r[0].call(null,n);else{let o=!1,i=null;const a=Array.from(r);for(let s=0;s<a.length;s++){const l=a[s];try{l.call(null,n)}catch(c){i===null&&(o=!0,i=c)}}if(o)throw i}}removeAllListeners(){Pe(this,va,{})}removeListener(t,n){const r=K(this,va)[t];if(r!==void 0){const o=r.indexOf(n);o>=0&&r.splice(o,1)}}}va=new WeakMap;function Vn(e,t,n=0){return Math.abs(co(e)-co(t))<=n}let $r={cursorFlags:0,interactionState:{state:"inactive"},mountedGroups:new Map};const rs=new k0e;function Ro(){return $r}function Ir(e){const t=typeof e=="function"?e($r):e;if($r===t)return $r;const n=$r;return $r={...$r,...t},t.cursorFlags!==void 0&&rs.emit("cursorFlagsChange",$r.cursorFlags),t.interactionState!==void 0&&rs.emit("interactionStateChange",$r.interactionState),t.mountedGroups!==void 0&&($r.mountedGroups.forEach((r,o)=>{r.derivedPanelConstraints.forEach(i=>{if(i.collapsible){const{layout:a}=n.mountedGroups.get(o)??{};if(a){const s=Vn(i.collapsedSize,r.layout[i.panelId]),l=Vn(i.collapsedSize,a[i.panelId]);s&&!l&&(o.inMemoryLastExpandedPanelSizes[i.panelId]=a[i.panelId])}}})}),rs.emit("mountedGroupsChange",$r.mountedGroups)),$r}function A0e(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 kd(e,t){return Vn(e,t)?0:e>t?1:-1}function Fl({panelConstraints:e,size:t}){const{collapsedSize:n=0,collapsible:r,maxSize:o=100,minSize:i=0}=e;if(kd(t,i)<0)if(r){const a=(n+i)/2;kd(t,a)<0?t=n:t=i}else t=i;return t=Math.min(o,t),t=co(t),t}function Ad({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:o,trigger:i}){if(Vn(e,0))return t;const a=Object.values(t),s=Object.values(o),l=[...a],[c,u]=r;Ct(c!=null,"Invalid first pivot index"),Ct(u!=null,"Invalid second pivot index");let d=0;if(i==="keyboard"){{const h=e<0?u:c,m=n[h];Ct(m,`Panel constraints not found for index ${h}`);const{collapsedSize:v=0,collapsible:y,minSize:w=0}=m;if(y){const x=a[h];if(Ct(x!=null,`Previous layout not found for panel index ${h}`),Vn(x,v)){const S=w-x;kd(S,Math.abs(e))>0&&(e=e<0?0-S:S)}}}{const h=e<0?c:u,m=n[h];Ct(m,`No panel constraints found for index ${h}`);const{collapsedSize:v=0,collapsible:y,minSize:w=0}=m;if(y){const x=a[h];if(Ct(x!=null,`Previous layout not found for panel index ${h}`),Vn(x,w)){const S=x-v;kd(S,Math.abs(e))>0&&(e=e<0?0-S:S)}}}}{const h=e<0?1:-1;let m=e<0?u:c,v=0;for(;;){const w=a[m];Ct(w!=null,`Previous layout not found for panel index ${m}`);const x=Fl({panelConstraints:n[m],size:100})-w;if(v+=x,m+=h,m<0||m>=n.length)break}const y=Math.min(Math.abs(e),Math.abs(v));e=e<0?0-y:y}{let h=e<0?c:u;for(;h>=0&&h<n.length;){const m=Math.abs(e)-Math.abs(d),v=a[h];Ct(v!=null,`Previous layout not found for panel index ${h}`);const y=v-m,w=Fl({panelConstraints:n[h],size:y});if(!Vn(v,w)&&(d+=v-w,l[h]=w,d.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?h--:h++}}if(A0e(s,l))return o;{const h=e<0?u:c,m=a[h];Ct(m!=null,`Previous layout not found for panel index ${h}`);const v=m+d,y=Fl({panelConstraints:n[h],size:v});if(l[h]=y,!Vn(y,v)){let w=v-y,x=e<0?u:c;for(;x>=0&&x<n.length;){const S=l[x];Ct(S!=null,`Previous layout not found for panel index ${x}`);const C=S+w,E=Fl({panelConstraints:n[x],size:C});if(Vn(S,E)||(w-=E-S,l[x]=E),Vn(w,0))break;e>0?x--:x++}}}const f=Object.values(l).reduce((h,m)=>m+h,0);if(!Vn(f,100,.1))return o;const p=Object.keys(o);return l.reduce((h,m,v)=>(h[p[v]]=m,h),{})}function im(e){const t=e.parentElement;Ct(t,"Parent group element not found");const{mountedGroups:n}=Ro();for(const[r]of n)if(r.element===t)return r;throw Error("Could not find parent Group for separator element")}function Rl(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(t[n]===void 0||kd(e[n],t[n])!==0)return!1;return!0}function os({layout:e,panelConstraints:t}){const n=[...Object.values(e)],r=n.reduce((a,s)=>a+s,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(a=>`${a}%`).join(", ")}`);if(!Vn(r,100)&&n.length>0)for(let a=0;a<t.length;a++){const s=n[a];Ct(s!=null,`No layout data found for index ${a}`);const l=100/r*s;n[a]=l}let o=0;for(let a=0;a<t.length;a++){const s=n[a];Ct(s!=null,`No layout data found for index ${a}`);const l=Fl({panelConstraints:t[a],size:s});s!=l&&(o+=s-l,n[a]=l)}if(!Vn(o,0))for(let a=0;a<t.length;a++){const s=n[a];Ct(s!=null,`No layout data found for index ${a}`);const l=s+o,c=Fl({panelConstraints:t[a],size:l});if(s!==c&&(o-=c-s,n[a]=c,Vn(o,0)))break}const i=Object.keys(e);return n.reduce((a,s,l)=>(a[i[l]]=s,a),{})}function m8({groupId:e}){const t=()=>{const{mountedGroups:n}=Ro();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:i,layout:a,separatorToPanels:s}=t(),l=os({layout:n,panelConstraints:o});return r?a:(Rl(a,l)||Ir(c=>({mountedGroups:new Map(c.mountedGroups).set(i,{defaultLayoutDeferred:r,derivedPanelConstraints:o,layout:l,separatorToPanels:s})})),l)}}}function v8(e){const{mountedGroups:t}=Ro(),n=t.get(e);return Ct(n,`Mounted Group ${e.id} not found`),n}function is(e,t){const n=im(e),r=v8(n),o=n.separators.find(u=>u.element===e);Ct(o,"Matching separator not found");const i=r.separatorToPanels.get(o);Ct(i,"Matching panels not found");const a=i.map(u=>n.panels.indexOf(u)),s=m8({groupId:n.id}).getLayout(),l=Ad({delta:t,initialLayout:s,panelConstraints:r.derivedPanelConstraints,pivotIndices:a,prevLayout:s,trigger:"keyboard"}),c=os({layout:l,panelConstraints:r.derivedPanelConstraints});Rl(s,c)||Ir(u=>({mountedGroups:new Map(u.mountedGroups).set(n,{defaultLayoutDeferred:r.defaultLayoutDeferred,derivedPanelConstraints:r.derivedPanelConstraints,layout:c,separatorToPanels:r.separatorToPanels})}))}function y8(e){if(e.defaultPrevented)return;const t=e.currentTarget,n=im(t);if(!n.disabled)switch(e.key){case"ArrowDown":{e.preventDefault(),n.orientation==="vertical"&&is(t,5);break}case"ArrowLeft":{e.preventDefault(),n.orientation==="horizontal"&&is(t,-5);break}case"ArrowRight":{e.preventDefault(),n.orientation==="horizontal"&&is(t,5);break}case"ArrowUp":{e.preventDefault(),n.orientation==="vertical"&&is(t,-5);break}case"End":{e.preventDefault(),is(t,100);break}case"Enter":{e.preventDefault();const r=im(t),{derivedPanelConstraints:o,layout:i,separatorToPanels:a}=v8(r),s=r.separators.find(d=>d.element===t);Ct(s,"Matching separator not found");const l=a.get(s);Ct(l,"Matching panels not found");const c=l[0],u=o.find(d=>d.panelId===c.id);if(Ct(u,"Panel metadata not found"),u.collapsible){const d=i[c.id],f=u.collapsedSize===d?r.inMemoryLastExpandedPanelSizes[c.id]??u.minSize:u.collapsedSize;is(t,f-d)}break}case"F6":{e.preventDefault();const r=im(t).separators.map(a=>a.element),o=Array.from(r).findIndex(a=>a===e.currentTarget);Ct(o!==null,"Index not found");const i=e.shiftKey?o>0?o-1:r.length-1:o+1<r.length?o+1:0;r[i].focus();break}case"Home":{e.preventDefault(),is(t,-100);break}}}const D0e=e=>e,tS=()=>{},b8=1,w8=2,x8=4,S8=8,C8={coarse:10,precise:5};function N0e(e,t,n){let r,o={x:1/0,y:1/0};for(const i of t){const a=h8(n,i.rect);switch(e){case"horizontal":{a.x<=o.x&&(r=i,o=a);break}case"vertical":{a.y<=o.y&&(r=i,o=a);break}}}return r?{distance:o,hitRegion:r}:void 0}let am;function $0e(){return am===void 0&&(typeof matchMedia=="function"?am=!!matchMedia("(pointer:coarse)").matches:am=!1),am}function I0e(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function L0e(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:O8(e),b:O8(t)};let r;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;Ct(r,"Stacking order can only be calculated for elements with a common ancestor");const o={a:P8(E8(n.a)),b:P8(E8(n.b))};if(o.a===o.b){const i=r.childNodes,a={a:n.a.at(-1),b:n.b.at(-1)};let s=i.length;for(;s--;){const l=i[s];if(l===a.a)return 1;if(l===a.b)return-1}}return Math.sign(o.a-o.b)}const F0e=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function R0e(e){const t=getComputedStyle(T8(e)??e).display;return t==="flex"||t==="inline-flex"}function B0e(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||R0e(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"||F0e.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function E8(e){let t=e.length;for(;t--;){const n=e[t];if(Ct(n,"Missing node"),B0e(n))return n}return null}function P8(e){return e&&Number(getComputedStyle(e).zIndex)||0}function O8(e){const t=[];for(;e;)t.push(e),e=T8(e);return t}function T8(e){const{parentNode:t}=e;return I0e(t)?t.host:t}function j0e(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 z0e({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!f8(n)||n.contains(e)||e.contains(n))return!0;if(L0e(n,e)>0){let r=n;for(;r;){if(r.contains(e))return!0;if(j0e(r.getBoundingClientRect(),t))return!1;r=r.parentElement}}return!0}function _8(e,t){const n=[];return t.forEach((r,o)=>{if(o.disabled)return;const i=$0e()?C8.coarse:C8.precise,a=p8(o),s=N0e(o.orientation,a,{x:e.clientX,y:e.clientY});s&&s.distance.x<=i&&s.distance.y<=i&&z0e({groupElement:o.element,hitRegion:s.hitRegion.rect,pointerEventTarget:e.target})&&n.push(s.hitRegion)}),n}function M8(e){if(e.defaultPrevented)return;const{mountedGroups:t}=Ro(),n=_8(e,t),r=new Set,o=new Set,i=new Set,a=new Map;let s=!1;n.forEach(l=>{r.add(l.group),l.panels.forEach(u=>{o.add(u)}),l.separator&&(i.add(l.separator),s||(s=!0,l.separator.element.focus()));const c=t.get(l.group);c&&a.set(l.group,c.layout)}),Ir({interactionState:{hitRegions:n,initialLayoutMap:a,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:"active"}}),n.length&&e.preventDefault()}function q0e({cursorFlags:e,groups:t,state:n}){let r=0,o=0;switch(n){case"active":case"hover":t.forEach(i=>{if(!i.disableCursor)switch(i.orientation){case"horizontal":{r++;break}case"vertical":{o++;break}}})}if(r===0&&o===0)return null;switch(n){case"active":{const i=(e&b8)!==0,a=(e&w8)!==0,s=(e&x8)!==0,l=(e&S8)!==0;if(e){if(i)return s?"se-resize":l?"ne-resize":"e-resize";if(a)return s?"sw-resize":l?"nw-resize":"w-resize";if(s)return"s-resize";if(l)return"n-resize"}break}}return r>0&&o>0?"move":r>0?"ew-resize":"ns-resize"}const k8=new WeakMap;function nS(e){if(e.defaultView===null)return;let{prevStyle:t,styleSheet:n}=k8.get(e)??{};n===void 0&&(n=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets=[n]);const{cursorFlags:r,interactionState:o}=Ro();switch(o.state){case"active":case"hover":{const i=q0e({cursorFlags:r,groups:o.hitRegions.map(s=>s.group),state:o.state}),a=`*{cursor: ${i} !important; ${o.state==="active"?"touch-action: none;":""} }`;if(t===a)return;t=a,i?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}}k8.set(e,{prevStyle:t,styleSheet:n})}function A8({document:e,event:t,hitRegions:n,initialLayoutMap:r,mountedGroups:o,pointerDownAtPoint:i}){let a=0;const s=new Map(o);n.forEach(l=>{const{group:c,groupSize:u}=l,{disableCursor:d,orientation:f,panels:p}=c;let h=0;i?f==="horizontal"?h=(t.clientX-i.x)/u*100:h=(t.clientY-i.y)/u*100:f==="horizontal"?h=t.clientX<0?-100:100:h=t.clientY<0?-100:100;const m=r.get(c),{defaultLayoutDeferred:v,derivedPanelConstraints:y,layout:w,separatorToPanels:x}=o.get(c)??{defaultLayoutDeferred:!1};if(y&&m&&w&&x){const S=Ad({delta:h,initialLayout:m,panelConstraints:y,pivotIndices:l.panels.map(C=>p.indexOf(C)),prevLayout:w,trigger:"mouse-or-touch"});if(Rl(S,w)){if(h!==0&&!d)switch(f){case"horizontal":{a|=h<0?b8:w8;break}case"vertical":{a|=h<0?x8:S8;break}}}else{s.set(l.group,{defaultLayoutDeferred:v,derivedPanelConstraints:y,layout:S,separatorToPanels:x});const C=l.group.panels.map(({id:E})=>E).join(",");l.group.inMemoryLayouts[C]=S}}}),Ir({cursorFlags:a,mountedGroups:s}),nS(e)}function D8(e){const{interactionState:t,mountedGroups:n}=Ro();switch(t.state){case"active":A8({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n})}}function N8(e){if(e.defaultPrevented)return;const{interactionState:t,mountedGroups:n}=Ro();switch(t.state){case"active":{if(e.buttons===0){Ir(r=>r.interactionState.state==="inactive"?r:{cursorFlags:0,interactionState:{state:"inactive"}});return}A8({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n,pointerDownAtPoint:t.pointerDownAtPoint});break}default:{const r=_8(e,n);r.length===0?t.state!=="inactive"&&Ir({interactionState:{state:"inactive"}}):Ir({interactionState:{hitRegions:r,state:"hover"}}),nS(e.currentTarget);break}}}function $8(e){if(e.defaultPrevented)return;e.preventDefault();const{interactionState:t}=Ro();switch(t.state){case"active":Ir({cursorFlags:0,interactionState:{state:"inactive"}}),nS(e.currentTarget)}}function I8(e){let t=0,n=0;const r={};for(const i of e)if(i.defaultSize!==void 0){t++;const a=co(i.defaultSize);n+=a,r[i.panelId]=a}else r[i.panelId]=void 0;const o=e.length-t;if(o!==0){const i=co((100-n)/o);for(const a of e)a.defaultSize===void 0&&(r[a.panelId]=i)}return r}function V0e(e,t,n){const r=n[0];if(!r)return;const o=e.panels.find(a=>a.element===t);if(!o||!o.onResize)return;const i=Ll({group:e});o.onResize({asPercentage:co(r.inlineSize/i*100),inPixels:r.inlineSize},o.id)}function U0e(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 H0e(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 Bl=new Map;function W0e(e){let t=!0;Ct(e.element.ownerDocument.defaultView,"Cannot register an unmounted Group");const n=e.element.ownerDocument.defaultView.ResizeObserver,r=new Set,o=new Set,i=new n(h=>{for(const m of h){const{borderBoxSize:v,target:y}=m;if(y===e.element){if(t){if(Ll({group:e})===0)return;Ir(w=>{const x=w.mountedGroups.get(e);if(x){const S=g8(e),C=x.defaultLayoutDeferred?I8(S):x.layout,E=os({layout:C,panelConstraints:S});return!x.defaultLayoutDeferred&&Rl(C,E)&&U0e(x.derivedPanelConstraints,S)?w:{mountedGroups:new Map(w.mountedGroups).set(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:S,layout:E,separatorToPanels:x.separatorToPanels})}}return w})}}else V0e(e,y,v)}});i.observe(e.element),e.panels.forEach(h=>{Ct(!r.has(h.id),`Panel ids must be unique; id "${h.id}" was used more than once`),r.add(h.id),h.onResize&&i.observe(h.element)});const a=Ll({group:e}),s=g8(e),l=e.panels.map(({id:h})=>h).join(",");let c=e.defaultLayout;c&&(H0e(e.panels,c)||(c=void 0));const u=e.inMemoryLayouts[l]??c??I8(s),d=os({layout:u,panelConstraints:s}),f=p8(e),p=e.element.ownerDocument;return Ir(h=>{const m=new Map;return Bl.set(p,(Bl.get(p)??0)+1),f.forEach(v=>{v.separator&&m.set(v.separator,v.panels)}),{mountedGroups:new Map(h.mountedGroups).set(e,{defaultLayoutDeferred:a===0,derivedPanelConstraints:s,layout:d,separatorToPanels:m})}}),e.separators.forEach(h=>{Ct(!o.has(h.id),`Separator ids must be unique; id "${h.id}" was used more than once`),o.add(h.id),h.element.addEventListener("keydown",y8)}),Bl.get(p)===1&&(p.addEventListener("pointerdown",M8),p.addEventListener("pointerleave",D8),p.addEventListener("pointermove",N8),p.addEventListener("pointerup",$8)),function(){t=!1,Bl.set(p,Math.max(0,(Bl.get(p)??0)-1)),Ir(h=>{const m=new Map(h.mountedGroups);return m.delete(e),{mountedGroups:m}}),e.separators.forEach(h=>{h.element.removeEventListener("keydown",y8)}),Bl.get(p)||(p.removeEventListener("pointerdown",M8),p.removeEventListener("pointerleave",D8),p.removeEventListener("pointermove",N8),p.removeEventListener("pointerup",$8)),i.disconnect()}}function rS(e){const t=O.useId();return`${e??t}`}const as=typeof window<"u"?O.useLayoutEffect:O.useEffect;function oS(e){const t=O.useRef(e);return as(()=>{t.current=e},[e]),O.useCallback(n=>{var r;return(r=t.current)==null?void 0:r.call(t,n)},[t])}function iS(...e){return oS(t=>{e.forEach(n=>{if(n)switch(typeof n){case"function":{n(t);break}case"object":{n.current=t;break}}})})}function K0e(e){const t=O.useRef({...e});return as(()=>{for(const n in e)t.current[n]=e[n]},[e]),t.current}const L8="--react-resizable-panels--panel--pointer-events";function F8(e,t){const n=e.replace(/[^a-zA-Z0-9\-_]/g,""),r=t.replace(/[^a-zA-Z0-9\-_]/g,"");return`--react-resizable-panels--${n}--${r}`}const R8=O.createContext(null);function G0e(e,t){const n=O.useRef({getLayout:()=>({}),setLayout:D0e});O.useImperativeHandle(t,()=>n.current,[]),as(()=>{Object.assign(n.current,m8({groupId:e}))})}function Y0e({children:e,className:t,defaultLayout:n,disableCursor:r,disabled:o,elementRef:i,groupRef:a,id:s,onLayoutChange:l,orientation:c="horizontal",style:u,...d}){const f=O.useRef({}),p=oS(U=>{Rl(f.current,U)||(f.current=U,l==null||l(U))}),h=rS(s),[m,v]=O.useState(!1),[y,w]=O.useState(null),[x,S]=O.useState(n??{}),[C,E]=O.useState([]),[P,_]=O.useState([]),T=O.useRef({lastExpandedPanelSizes:{},layouts:{}}),M=iS(w,i);G0e(h,a);const A=O.useMemo(()=>({id:h,orientation:c,registerPanel:U=>(E(L=>eS(c,[...L,U])),()=>{E(L=>L.filter(V=>V!==U))}),registerSeparator:U=>(_(L=>eS(c,[...L,U])),()=>{_(L=>L.filter(V=>V!==U))})}),[h,c]),D=K0e({defaultLayout:n,disableCursor:r}),N=O.useRef(null);as(()=>{if(y===null)return;const U={defaultLayout:D.defaultLayout,disableCursor:!!D.disableCursor,disabled:!!o,element:y,id:h,inMemoryLastExpandedPanelSizes:T.current.lastExpandedPanelSizes,inMemoryLayouts:T.current.layouts,orientation:c,panels:C,separators:P};N.current=U;const L=W0e(U),V=Ro().mountedGroups.get(U);if(V){const{defaultLayoutDeferred:se,derivedPanelConstraints:pe,layout:W}=V;!se&&pe.length>0&&(S(W),p==null||p(W))}const j=rs.addListener("interactionStateChange",se=>{switch(se.state){case"active":{v(se.hitRegions.some(pe=>pe.group===U));break}default:{v(!1);break}}}),H=rs.addListener("mountedGroupsChange",se=>{const pe=se.get(U);if(pe){const{defaultLayoutDeferred:W,derivedPanelConstraints:Y,layout:F}=pe;if(W||Y.length===0)return;S(F),p==null||p(F)}});return()=>{N.current=null,L(),j(),H()}},[o,y,h,p,c,C,P,D]),O.useEffect(()=>{const U=N.current;U&&(U.defaultLayout=n,U.disableCursor=!!r)});const R={[L8]:m?"none":void 0};for(const U in x){const L=F8(h,U),V=x[U];R[L]=V}return b.jsx(R8.Provider,{value:A,children:b.jsx("div",{...d,"aria-orientation":c,className:t,"data-group":!0,"data-testid":h,id:h,ref:M,style:{...u,...R,display:"flex",flexDirection:c==="horizontal"?"row":"column",flexWrap:"nowrap"},children:e})})}function aS(){const e=O.useContext(R8);return Ct(e,"Group Context not found; did you render a Panel or Separator outside of a Group?"),e}function X0e({groupId:e,panelId:t}){const n=()=>{const{mountedGroups:s}=Ro();for(const[l,{defaultLayoutDeferred:c,derivedPanelConstraints:u,layout:d,separatorToPanels:f}]of s)if(l.id===e)return{defaultLayoutDeferred:c,derivedPanelConstraints:u,group:l,layout:d,separatorToPanels:f};throw Error(`Group ${e} not found`)},r=()=>{const s=n().derivedPanelConstraints.find(l=>l.panelId===t);if(s!==void 0)return s;throw Error(`Panel constraints not found for Panel ${t}`)},o=()=>{const s=n().group.panels.find(l=>l.id===t);if(s!==void 0)return s;throw Error(`Layout not found for Panel ${t}`)},i=()=>{const s=n().layout[t];if(s!==void 0)return s;throw Error(`Layout not found for Panel ${t}`)},a=s=>{const l=i();if(s===l)return;const{defaultLayoutDeferred:c,derivedPanelConstraints:u,group:d,layout:f,separatorToPanels:p}=n(),h=d.panels.findIndex(w=>w.id===t),m=h===d.panels.length-1,v=Ad({delta:m?l-s:s-l,initialLayout:f,panelConstraints:u,pivotIndices:m?[h-1,h]:[h,h+1],prevLayout:f,trigger:"imperative-api"}),y=os({layout:v,panelConstraints:u});Rl(f,y)||Ir(w=>({mountedGroups:new Map(w.mountedGroups).set(d,{defaultLayoutDeferred:c,derivedPanelConstraints:u,layout:y,separatorToPanels:p})}))};return{collapse:()=>{const{collapsible:s,collapsedSize:l}=r(),c=i();s&&c!==l&&a(l)},expand:()=>{const{collapsible:s,collapsedSize:l,minSize:c}=r(),u=i();s&&u===l&&a(c)},getSize:()=>{const{group:s}=n(),l=i(),{element:c}=o(),u=s.orientation==="horizontal"?c.offsetWidth:c.offsetHeight;return{asPercentage:l,inPixels:u}},isCollapsed:()=>{const{collapsible:s,collapsedSize:l}=r(),c=i();return s&&Vn(l,c)},resize:s=>{if(i()!==s){let l;switch(typeof s){case"number":{const{group:c}=n(),u=Ll({group:c});l=co(s/u*100);break}case"string":{l=parseFloat(s);break}}a(l)}}}}function Q0e(e,t){const{id:n}=aS(),r=O.useRef({collapse:tS,expand:tS,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:tS});O.useImperativeHandle(t,()=>r.current,[]),as(()=>{Object.assign(r.current,X0e({groupId:n,panelId:e}))})}function Z0e({children:e,className:t,collapsedSize:n="0%",collapsible:r=!1,defaultSize:o,elementRef:i,id:a,maxSize:s="100%",minSize:l="0%",onResize:c,panelRef:u,style:d,...f}){const p=!!a,h=rS(a),[m,v]=O.useState(null),y=iS(v,i),{id:w,registerPanel:x}=aS(),S=c!==null,C=oS(P=>{c==null||c(P,a)});as(()=>{if(m!==null)return x({element:m,id:h,idIsStable:p,onResize:S?C:void 0,panelConstraints:{collapsedSize:n,collapsible:r,defaultSize:o,maxSize:s,minSize:l}})},[n,r,o,m,S,h,p,s,l,C,x]),Q0e(h,u);const E=F8(w,h);return b.jsx("div",{...f,"data-panel":!0,"data-testid":h,id:h,ref:y,style:{...J0e,flexBasis:0,flexGrow:`var(${E}, 1)`,flexShrink:1,overflow:"hidden",pointerEvents:`var(${L8})`},children:b.jsx("div",{className:t,style:{width:"100%",height:"100%",...d},children:e})})}const J0e={minHeight:"unset",maxHeight:"unset",height:"unset",minWidth:"unset",maxWidth:"unset",width:"unset",flex:"unset",flexBasis:"unset",flexShrink:"unset",flexGrow:"unset",border:"unset",borderWidth:"unset",padding:"unset",margin:"unset"};function ebe({layout:e,panelConstraints:t,panelId:n,panelIndex:r}){let o,i;const a=e[n],s=t.find(l=>l.panelId===n);if(s){const l=s.maxSize,c=i=s.collapsible?s.collapsedSize:s.minSize,u=[r,r+1];i=os({layout:Ad({delta:c-a,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e,trigger:"keyboard"}),panelConstraints:t})[n],o=os({layout:Ad({delta:l-a,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e,trigger:"keyboard"}),panelConstraints:t})[n]}return{valueControls:n,valueMax:o,valueMin:i,valueNow:a}}function tbe({children:e,className:t,elementRef:n,id:r,style:o,...i}){const a=rS(r),[s,l]=O.useState({}),[c,u]=O.useState("inactive"),[d,f]=O.useState(null),p=iS(f,n),{id:h,orientation:m,registerSeparator:v}=aS(),y=m==="horizontal"?"vertical":"horizontal";return as(()=>{if(d!==null){const w={element:d,id:a},x=v(w),S=rs.addListener("interactionStateChange",E=>{u(E.state!=="inactive"&&E.hitRegions.some(P=>P.separator===w)?E.state:"inactive")}),C=rs.addListener("mountedGroupsChange",E=>{E.forEach(({derivedPanelConstraints:P,layout:_,separatorToPanels:T},M)=>{if(M.id===h){const A=T.get(w);if(A){const D=A[0],N=M.panels.indexOf(D);l(ebe({layout:_,panelConstraints:P,panelId:D.id,panelIndex:N}))}}})});return()=>{S(),C(),x()}}},[d,h,a,v]),b.jsx("div",{...i,"aria-controls":s.valueControls,"aria-orientation":y,"aria-valuemax":s.valueMax,"aria-valuemin":s.valueMin,"aria-valuenow":s.valueNow,children:e,className:t,"data-separator":c,"data-testid":a,id:a,ref:p,role:"separator",style:{flexBasis:"auto",...o,flexGrow:0,flexShrink:0},tabIndex:0})}const nbe=({className:e,...t})=>b.jsx(Y0e,{className:q("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",e),...t}),rbe=Z0e,obe=({withHandle:e,className:t,...n})=>b.jsx(tbe,{className:q("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:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),...n,children:e&&b.jsx("div",{className:"z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border",children:b.jsx(SV,{className:"h-2.5 w-2.5"})})});function ibe(e){const t=abe(e),n=g.forwardRef((r,o)=>{const{children:i,...a}=r,s=g.Children.toArray(i),l=s.find(lbe);if(l){const c=l.props.children,u=s.map(d=>d===l?g.Children.count(c)>1?g.Children.only(null):g.isValidElement(c)?c.props.children:null:d);return b.jsx(t,{...a,ref:o,children:g.isValidElement(c)?g.cloneElement(c,void 0,u):null})}return b.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function abe(e){const t=g.forwardRef((n,r)=>{const{children:o,...i}=n;if(g.isValidElement(o)){const a=ube(o),s=cbe(i,o.props);return o.type!==g.Fragment&&(s.ref=r?Pn(r,a):a),g.cloneElement(o,s)}return g.Children.count(o)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sbe=Symbol("radix.slottable");function lbe(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sbe}function cbe(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const l=i(...s);return o(...s),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function ube(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 dbe=[" ","Enter","ArrowUp","ArrowDown"],fbe=[" ","Enter"],ss="Select",[sm,lm,hbe]=Qo(ss),[jl]=kt(ss,[hbe,Io]),cm=Io(),[pbe,ra]=jl(ss),[gbe,mbe]=jl(ss),B8=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:a,defaultValue:s,onValueChange:l,dir:c,name:u,autoComplete:d,disabled:f,required:p,form:h}=e,m=cm(t),[v,y]=g.useState(null),[w,x]=g.useState(null),[S,C]=g.useState(!1),E=Wr(c),[P,_]=Ot({prop:r,defaultProp:o??!1,onChange:i,caller:ss}),[T,M]=Ot({prop:a,defaultProp:s,onChange:l,caller:ss}),A=g.useRef(null),D=v?h||!!v.closest("form"):!0,[N,R]=g.useState(new Set),U=Array.from(N).map(L=>L.props.value).join(";");return b.jsx(Tl,{...m,children:b.jsxs(pbe,{required:p,scope:t,trigger:v,onTriggerChange:y,valueNode:w,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:Et(),value:T,onValueChange:M,open:P,onOpenChange:_,dir:E,triggerPointerDownPosRef:A,disabled:f,children:[b.jsx(sm.Provider,{scope:t,children:b.jsx(gbe,{scope:e.__scopeSelect,onNativeOptionAdd:g.useCallback(L=>{R(V=>new Set(V).add(L))},[]),onNativeOptionRemove:g.useCallback(L=>{R(V=>{const j=new Set(V);return j.delete(L),j})},[]),children:n})}),D?b.jsxs(uR,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:d,value:T,onChange:L=>M(L.target.value),disabled:f,form:h,children:[T===void 0?b.jsx("option",{value:""}):null,Array.from(N)]},U):null]})})};B8.displayName=ss;var j8="SelectTrigger",z8=g.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=cm(n),a=ra(j8,n),s=a.disabled||r,l=je(t,a.onTriggerChange),c=lm(n),u=g.useRef("touch"),[d,f,p]=fR(m=>{const v=c().filter(x=>!x.disabled),y=v.find(x=>x.value===a.value),w=hR(v,m,y);w!==void 0&&a.onValueChange(w.value)}),h=m=>{s||(a.onOpenChange(!0),p()),m&&(a.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return b.jsx(_l,{asChild:!0,...i,children:b.jsx(ye.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":dR(a.value)?"":void 0,...o,ref:l,onClick:ne(o.onClick,m=>{m.currentTarget.focus(),u.current!=="mouse"&&h(m)}),onPointerDown:ne(o.onPointerDown,m=>{u.current=m.pointerType;const v=m.target;v.hasPointerCapture(m.pointerId)&&v.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(h(m),m.preventDefault())}),onKeyDown:ne(o.onKeyDown,m=>{const v=d.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&f(m.key),!(v&&m.key===" ")&&dbe.includes(m.key)&&(h(),m.preventDefault())})})})});z8.displayName=j8;var q8="SelectValue",V8=g.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:a="",...s}=e,l=ra(q8,n),{onValueNodeHasChildrenChange:c}=l,u=i!==void 0,d=je(t,l.onValueNodeChange);return At(()=>{c(u)},[c,u]),b.jsx(ye.span,{...s,ref:d,style:{pointerEvents:"none"},children:dR(l.value)?b.jsx(b.Fragment,{children:a}):i})});V8.displayName=q8;var vbe="SelectIcon",U8=g.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return b.jsx(ye.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});U8.displayName=vbe;var ybe="SelectPortal",H8=e=>b.jsx(Sa,{asChild:!0,...e});H8.displayName=ybe;var ls="SelectContent",W8=g.forwardRef((e,t)=>{const n=ra(ls,e.__scopeSelect),[r,o]=g.useState();if(At(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?Oc.createPortal(b.jsx(K8,{scope:e.__scopeSelect,children:b.jsx(sm.Slot,{scope:e.__scopeSelect,children:b.jsx("div",{children:e.children})})}),i):null}return b.jsx(G8,{...e,ref:t})});W8.displayName=ls;var uo=10,[K8,oa]=jl(ls),bbe="SelectContentImpl",wbe=ibe("SelectContent.RemoveScroll"),G8=g.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:a,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:h,hideWhenDetached:m,avoidCollisions:v,...y}=e,w=ra(ls,n),[x,S]=g.useState(null),[C,E]=g.useState(null),P=je(t,Z=>S(Z)),[_,T]=g.useState(null),[M,A]=g.useState(null),D=lm(n),[N,R]=g.useState(!1),U=g.useRef(!1);g.useEffect(()=>{if(x)return vh(x)},[x]),ch();const L=g.useCallback(Z=>{const[J,...Q]=D().map(z=>z.ref.current),[oe]=Q.slice(-1),le=document.activeElement;for(const z of Z)if(z===le||(z==null||z.scrollIntoView({block:"nearest"}),z===J&&C&&(C.scrollTop=0),z===oe&&C&&(C.scrollTop=C.scrollHeight),z==null||z.focus(),document.activeElement!==le))return},[D,C]),V=g.useCallback(()=>L([_,x]),[L,_,x]);g.useEffect(()=>{N&&V()},[N,V]);const{onOpenChange:j,triggerPointerDownPosRef:H}=w;g.useEffect(()=>{if(x){let Z={x:0,y:0};const J=oe=>{var le,z;Z={x:Math.abs(Math.round(oe.pageX)-(((le=H.current)==null?void 0:le.x)??0)),y:Math.abs(Math.round(oe.pageY)-(((z=H.current)==null?void 0:z.y)??0))}},Q=oe=>{Z.x<=10&&Z.y<=10?oe.preventDefault():x.contains(oe.target)||j(!1),document.removeEventListener("pointermove",J),H.current=null};return H.current!==null&&(document.addEventListener("pointermove",J),document.addEventListener("pointerup",Q,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",Q,{capture:!0})}}},[x,j,H]),g.useEffect(()=>{const Z=()=>j(!1);return window.addEventListener("blur",Z),window.addEventListener("resize",Z),()=>{window.removeEventListener("blur",Z),window.removeEventListener("resize",Z)}},[j]);const[se,pe]=fR(Z=>{const J=D().filter(le=>!le.disabled),Q=J.find(le=>le.ref.current===document.activeElement),oe=hR(J,Z,Q);oe&&setTimeout(()=>oe.ref.current.focus())}),W=g.useCallback((Z,J,Q)=>{const oe=!U.current&&!Q;(w.value!==void 0&&w.value===J||oe)&&(T(Z),oe&&(U.current=!0))},[w.value]),Y=g.useCallback(()=>x==null?void 0:x.focus(),[x]),F=g.useCallback((Z,J,Q)=>{const oe=!U.current&&!Q;(w.value!==void 0&&w.value===J||oe)&&A(Z)},[w.value]),ee=r==="popper"?sS:Y8,fe=ee===sS?{side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:h,hideWhenDetached:m,avoidCollisions:v}:{};return b.jsx(K8,{scope:n,content:x,viewport:C,onViewportChange:E,itemRefCallback:W,selectedItem:_,onItemLeave:Y,itemTextRefCallback:F,focusSelectedItem:V,selectedItemText:M,position:r,isPositioned:N,searchRef:se,children:b.jsx(Kc,{as:wbe,allowPinchZoom:!0,children:b.jsx(Wc,{asChild:!0,trapped:w.open,onMountAutoFocus:Z=>{Z.preventDefault()},onUnmountAutoFocus:ne(o,Z=>{var J;(J=w.trigger)==null||J.focus({preventScroll:!0}),Z.preventDefault()}),children:b.jsx(li,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:Z=>Z.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:b.jsx(ee,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:Z=>Z.preventDefault(),...y,...fe,onPlaced:()=>R(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:ne(y.onKeyDown,Z=>{const J=Z.ctrlKey||Z.altKey||Z.metaKey;if(Z.key==="Tab"&&Z.preventDefault(),!J&&Z.key.length===1&&pe(Z.key),["ArrowUp","ArrowDown","Home","End"].includes(Z.key)){let oe=D().filter(le=>!le.disabled).map(le=>le.ref.current);if(["ArrowUp","End"].includes(Z.key)&&(oe=oe.slice().reverse()),["ArrowUp","ArrowDown"].includes(Z.key)){const le=Z.target,z=oe.indexOf(le);oe=oe.slice(z+1)}setTimeout(()=>L(oe)),Z.preventDefault()}})})})})})})});G8.displayName=bbe;var xbe="SelectItemAlignedPosition",Y8=g.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=ra(ls,n),a=oa(ls,n),[s,l]=g.useState(null),[c,u]=g.useState(null),d=je(t,P=>u(P)),f=lm(n),p=g.useRef(!1),h=g.useRef(!0),{viewport:m,selectedItem:v,selectedItemText:y,focusSelectedItem:w}=a,x=g.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&c&&m&&v&&y){const P=i.trigger.getBoundingClientRect(),_=c.getBoundingClientRect(),T=i.valueNode.getBoundingClientRect(),M=y.getBoundingClientRect();if(i.dir!=="rtl"){const le=M.left-_.left,z=T.left-le,_e=P.left-z,X=P.width+_e,be=Math.max(X,_.width),$e=window.innerWidth-uo,Ve=Od(z,[uo,Math.max(uo,$e-be)]);s.style.minWidth=X+"px",s.style.left=Ve+"px"}else{const le=_.right-M.right,z=window.innerWidth-T.right-le,_e=window.innerWidth-P.right-z,X=P.width+_e,be=Math.max(X,_.width),$e=window.innerWidth-uo,Ve=Od(z,[uo,Math.max(uo,$e-be)]);s.style.minWidth=X+"px",s.style.right=Ve+"px"}const A=f(),D=window.innerHeight-uo*2,N=m.scrollHeight,R=window.getComputedStyle(c),U=parseInt(R.borderTopWidth,10),L=parseInt(R.paddingTop,10),V=parseInt(R.borderBottomWidth,10),j=parseInt(R.paddingBottom,10),H=U+L+N+j+V,se=Math.min(v.offsetHeight*5,H),pe=window.getComputedStyle(m),W=parseInt(pe.paddingTop,10),Y=parseInt(pe.paddingBottom,10),F=P.top+P.height/2-uo,ee=D-F,fe=v.offsetHeight/2,Z=v.offsetTop+fe,J=U+L+Z,Q=H-J;if(J<=F){const le=A.length>0&&v===A[A.length-1].ref.current;s.style.bottom="0px";const z=c.clientHeight-m.offsetTop-m.offsetHeight,_e=Math.max(ee,fe+(le?Y:0)+z+V),X=J+_e;s.style.height=X+"px"}else{const le=A.length>0&&v===A[0].ref.current;s.style.top="0px";const _e=Math.max(F,U+m.offsetTop+(le?W:0)+fe)+Q;s.style.height=_e+"px",m.scrollTop=J-F+m.offsetTop}s.style.margin=`${uo}px 0`,s.style.minHeight=se+"px",s.style.maxHeight=D+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[f,i.trigger,i.valueNode,s,c,m,v,y,i.dir,r]);At(()=>x(),[x]);const[S,C]=g.useState();At(()=>{c&&C(window.getComputedStyle(c).zIndex)},[c]);const E=g.useCallback(P=>{P&&h.current===!0&&(x(),w==null||w(),h.current=!1)},[x,w]);return b.jsx(Cbe,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:E,children:b.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:b.jsx(ye.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Y8.displayName=xbe;var Sbe="SelectPopperPosition",sS=g.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=uo,...i}=e,a=cm(n);return b.jsx(id,{...a,...i,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.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)"}})});sS.displayName=Sbe;var[Cbe,lS]=jl(ls,{}),cS="SelectViewport",X8=g.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,i=oa(cS,n),a=lS(cS,n),s=je(t,i.onViewportChange),l=g.useRef(0);return b.jsxs(b.Fragment,{children:[b.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}),b.jsx(sm.Slot,{scope:n,children:b.jsx(ye.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:ne(o.onScroll,c=>{const u=c.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=a;if(f!=null&&f.current&&d){const p=Math.abs(l.current-u.scrollTop);if(p>0){const h=window.innerHeight-uo*2,m=parseFloat(d.style.minHeight),v=parseFloat(d.style.height),y=Math.max(m,v);if(y<h){const w=y+p,x=Math.min(h,w),S=w-x;d.style.height=x+"px",d.style.bottom==="0px"&&(u.scrollTop=S>0?S:0,d.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});X8.displayName=cS;var Q8="SelectGroup",[Ebe,Pbe]=jl(Q8),Z8=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Et();return b.jsx(Ebe,{scope:n,id:o,children:b.jsx(ye.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Z8.displayName=Q8;var J8="SelectLabel",eR=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Pbe(J8,n);return b.jsx(ye.div,{id:o.id,...r,ref:t})});eR.displayName=J8;var um="SelectItem",[Obe,tR]=jl(um),nR=g.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...a}=e,s=ra(um,n),l=oa(um,n),c=s.value===r,[u,d]=g.useState(i??""),[f,p]=g.useState(!1),h=je(t,w=>{var x;return(x=l.itemRefCallback)==null?void 0:x.call(l,w,r,o)}),m=Et(),v=g.useRef("touch"),y=()=>{o||(s.onValueChange(r),s.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 b.jsx(Obe,{scope:n,value:r,disabled:o,textId:m,isSelected:c,onItemTextChange:g.useCallback(w=>{d(x=>x||((w==null?void 0:w.textContent)??"").trim())},[]),children:b.jsx(sm.ItemSlot,{scope:n,value:r,disabled:o,textValue:u,children:b.jsx(ye.div,{role:"option","aria-labelledby":m,"data-highlighted":f?"":void 0,"aria-selected":c&&f,"data-state":c?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...a,ref:h,onFocus:ne(a.onFocus,()=>p(!0)),onBlur:ne(a.onBlur,()=>p(!1)),onClick:ne(a.onClick,()=>{v.current!=="mouse"&&y()}),onPointerUp:ne(a.onPointerUp,()=>{v.current==="mouse"&&y()}),onPointerDown:ne(a.onPointerDown,w=>{v.current=w.pointerType}),onPointerMove:ne(a.onPointerMove,w=>{var x;v.current=w.pointerType,o?(x=l.onItemLeave)==null||x.call(l):v.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ne(a.onPointerLeave,w=>{var x;w.currentTarget===document.activeElement&&((x=l.onItemLeave)==null||x.call(l))}),onKeyDown:ne(a.onKeyDown,w=>{var S;((S=l.searchRef)==null?void 0:S.current)!==""&&w.key===" "||(fbe.includes(w.key)&&y(),w.key===" "&&w.preventDefault())})})})})});nR.displayName=um;var Dd="SelectItemText",rR=g.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,a=ra(Dd,n),s=oa(Dd,n),l=tR(Dd,n),c=mbe(Dd,n),[u,d]=g.useState(null),f=je(t,y=>d(y),l.onItemTextChange,y=>{var w;return(w=s.itemTextRefCallback)==null?void 0:w.call(s,y,l.value,l.disabled)}),p=u==null?void 0:u.textContent,h=g.useMemo(()=>b.jsx("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:v}=c;return At(()=>(m(h),()=>v(h)),[m,v,h]),b.jsxs(b.Fragment,{children:[b.jsx(ye.span,{id:l.textId,...i,ref:f}),l.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Oc.createPortal(i.children,a.valueNode):null]})});rR.displayName=Dd;var oR="SelectItemIndicator",iR=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return tR(oR,n).isSelected?b.jsx(ye.span,{"aria-hidden":!0,...r,ref:t}):null});iR.displayName=oR;var uS="SelectScrollUpButton",aR=g.forwardRef((e,t)=>{const n=oa(uS,e.__scopeSelect),r=lS(uS,e.__scopeSelect),[o,i]=g.useState(!1),a=je(t,r.onScrollButtonChange);return At(()=>{if(n.viewport&&n.isPositioned){let s=function(){const c=l.scrollTop>0;i(c)};const l=n.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),o?b.jsx(lR,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=n;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});aR.displayName=uS;var dS="SelectScrollDownButton",sR=g.forwardRef((e,t)=>{const n=oa(dS,e.__scopeSelect),r=lS(dS,e.__scopeSelect),[o,i]=g.useState(!1),a=je(t,r.onScrollButtonChange);return At(()=>{if(n.viewport&&n.isPositioned){let s=function(){const c=l.scrollHeight-l.clientHeight,u=Math.ceil(l.scrollTop)<c;i(u)};const l=n.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),o?b.jsx(lR,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=n;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});sR.displayName=dS;var lR=g.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=oa("SelectScrollButton",n),a=g.useRef(null),s=lm(n),l=g.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return g.useEffect(()=>()=>l(),[l]),At(()=>{var u;const c=s().find(d=>d.ref.current===document.activeElement);(u=c==null?void 0:c.ref.current)==null||u.scrollIntoView({block:"nearest"})},[s]),b.jsx(ye.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:ne(o.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:ne(o.onPointerMove,()=>{var c;(c=i.onItemLeave)==null||c.call(i),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:ne(o.onPointerLeave,()=>{l()})})}),Tbe="SelectSeparator",cR=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return b.jsx(ye.div,{"aria-hidden":!0,...r,ref:t})});cR.displayName=Tbe;var fS="SelectArrow",_be=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=cm(n),i=ra(fS,n),a=oa(fS,n);return i.open&&a.position==="popper"?b.jsx(ad,{...o,...r,ref:t}):null});_be.displayName=fS;var Mbe="SelectBubbleInput",uR=g.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=g.useRef(null),i=je(r,o),a=wl(t);return g.useEffect(()=>{const s=o.current;if(!s)return;const l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&u){const d=new Event("change",{bubbles:!0});u.call(s,t),s.dispatchEvent(d)}},[a,t]),b.jsx(ye.select,{...n,style:{...FF,...n.style},ref:i,defaultValue:t})});uR.displayName=Mbe;function dR(e){return e===""||e===void 0}function fR(e){const t=ht(e),n=g.useRef(""),r=g.useRef(0),o=g.useCallback(a=>{const s=n.current+a;t(s),(function l(c){n.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>l(""),1e3))})(s)},[t]),i=g.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return g.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function hR(e,t,n){const o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let a=kbe(e,Math.max(i,0));o.length===1&&(a=a.filter(c=>c!==n));const l=a.find(c=>c.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function kbe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Abe=B8,pR=z8,Dbe=V8,Nbe=U8,$be=H8,gR=W8,Ibe=X8,Lbe=Z8,mR=eR,vR=nR,Fbe=rR,Rbe=iR,yR=aR,bR=sR,wR=cR;const Bbe=Abe,jbe=Lbe,zbe=Dbe,xR=g.forwardRef(({className:e,children:t,...n},r)=>b.jsxs(pR,{ref:r,className:q("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,b.jsx(Nbe,{asChild:!0,children:b.jsx(vy,{className:"h-4 w-4 opacity-50"})})]}));xR.displayName=pR.displayName;const hS=g.forwardRef(({className:e,...t},n)=>b.jsx(yR,{ref:n,className:q("flex cursor-default items-center justify-center py-1",e),...t,children:b.jsx(zX,{className:"h-4 w-4"})}));hS.displayName=yR.displayName;const pS=g.forwardRef(({className:e,...t},n)=>b.jsx(bR,{ref:n,className:q("flex cursor-default items-center justify-center py-1",e),...t,children:b.jsx(vy,{className:"h-4 w-4"})}));pS.displayName=bR.displayName;const SR=g.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>b.jsx($be,{children:b.jsxs(gR,{ref:o,className:q("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",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,...r,children:[b.jsx(hS,{}),b.jsx(Ibe,{className:q("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),b.jsx(pS,{})]})}));SR.displayName=gR.displayName;const CR=g.forwardRef(({className:e,...t},n)=>b.jsx(mR,{ref:n,className:q("px-2 py-1.5 text-sm font-semibold",e),...t}));CR.displayName=mR.displayName;const ER=g.forwardRef(({className:e,children:t,...n},r)=>b.jsxs(vR,{ref:r,className:q("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[b.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:b.jsx(Rbe,{children:b.jsx(Qc,{className:"h-4 w-4"})})}),b.jsx(Fbe,{children:t})]}));ER.displayName=vR.displayName;const PR=g.forwardRef(({className:e,...t},n)=>b.jsx(wR,{ref:n,className:q("-mx-1 my-1 h-px bg-muted",e),...t}));PR.displayName=wR.displayName;var qbe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Vbe=qbe.reduce((e,t)=>{const n=Ys(`Primitive.${t}`),r=g.forwardRef((o,i)=>{const{asChild:a,...s}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(l,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Ube="Separator",OR="horizontal",Hbe=["horizontal","vertical"],TR=g.forwardRef((e,t)=>{const{decorative:n,orientation:r=OR,...o}=e,i=Wbe(r)?r:OR,s=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return b.jsx(Vbe.div,{"data-orientation":i,...s,...o,ref:t})});TR.displayName=Ube;function Wbe(e){return Hbe.includes(e)}var _R=TR;const gS=g.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>b.jsx(_R,{ref:o,decorative:n,orientation:t,className:q("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));gS.displayName=_R.displayName;function Lr({className:e,...t}){return b.jsx("div",{className:q("animate-pulse rounded-md ",e),...t})}function Kbe(){return b.jsxs("div",{className:"p-5",children:[b.jsx("h5",{className:"text-center font-bold",children:"Please Wait..."}),b.jsx(Lr,{className:"h-40 w-full mb-4 bg-gray-300"}),b.jsx(Lr,{className:"h-10 w-full mb-4 bg-gray-300"}),b.jsx(Lr,{className:"h-10 w-full mb-4 bg-gray-300"}),b.jsx(Lr,{className:"h-10 w-full mb-4 bg-gray-300"}),b.jsx(Lr,{className:"h-10 w-full mb-4 bg-gray-300"}),b.jsx(Lr,{className:"h-10 w-full mb-4 bg-gray-300"}),b.jsx(Lr,{className:"h-10 w-full mb-4 bg-gray-300"}),b.jsx(Lr,{className:"h-10 w-full mb-4 bg-gray-300"}),b.jsx(Lr,{className:"h-10 w-full mb-4 bg-gray-300"})]})}var Gbe=Symbol("radix.slottable");function Ybe(e){const t=({children:n})=>b.jsx(b.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Gbe,t}var[dm]=kt("Tooltip",[Io]),fm=Io(),MR="TooltipProvider",Xbe=700,mS="tooltip.open",[Qbe,vS]=dm(MR),kR=e=>{const{__scopeTooltip:t,delayDuration:n=Xbe,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,a=g.useRef(!0),s=g.useRef(!1),l=g.useRef(0);return g.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),b.jsx(Qbe,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:g.useCallback(()=>{window.clearTimeout(l.current),a.current=!1},[]),onClose:g.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:g.useCallback(c=>{s.current=c},[]),disableHoverableContent:o,children:i})};kR.displayName=MR;var Nd="Tooltip",[Zbe,$d]=dm(Nd),AR=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,l=vS(Nd,e.__scopeTooltip),c=fm(t),[u,d]=g.useState(null),f=Et(),p=g.useRef(0),h=a??l.disableHoverableContent,m=s??l.delayDuration,v=g.useRef(!1),[y,w]=Ot({prop:r,defaultProp:o??!1,onChange:P=>{P?(l.onOpen(),document.dispatchEvent(new CustomEvent(mS))):l.onClose(),i==null||i(P)},caller:Nd}),x=g.useMemo(()=>y?v.current?"delayed-open":"instant-open":"closed",[y]),S=g.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v.current=!1,w(!0)},[w]),C=g.useCallback(()=>{window.clearTimeout(p.current),p.current=0,w(!1)},[w]),E=g.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{v.current=!0,w(!0),p.current=0},m)},[m,w]);return g.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),b.jsx(Tl,{...c,children:b.jsx(Zbe,{scope:t,contentId:f,open:y,stateAttribute:x,trigger:u,onTriggerChange:d,onTriggerEnter:g.useCallback(()=>{l.isOpenDelayedRef.current?E():S()},[l.isOpenDelayedRef,E,S]),onTriggerLeave:g.useCallback(()=>{h?C():(window.clearTimeout(p.current),p.current=0)},[C,h]),onOpen:S,onClose:C,disableHoverableContent:h,children:n})})};AR.displayName=Nd;var yS="TooltipTrigger",DR=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=$d(yS,n),i=vS(yS,n),a=fm(n),s=g.useRef(null),l=je(t,s,o.onTriggerChange),c=g.useRef(!1),u=g.useRef(!1),d=g.useCallback(()=>c.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),b.jsx(_l,{asChild:!0,...a,children:b.jsx(ye.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:ne(e.onPointerMove,f=>{f.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),u.current=!0)}),onPointerLeave:ne(e.onPointerLeave,()=>{o.onTriggerLeave(),u.current=!1}),onPointerDown:ne(e.onPointerDown,()=>{o.open&&o.onClose(),c.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:ne(e.onFocus,()=>{c.current||o.onOpen()}),onBlur:ne(e.onBlur,o.onClose),onClick:ne(e.onClick,o.onClose)})})});DR.displayName=yS;var bS="TooltipPortal",[Jbe,ewe]=dm(bS,{forceMount:void 0}),NR=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=$d(bS,t);return b.jsx(Jbe,{scope:t,forceMount:n,children:b.jsx(Tt,{present:n||i.open,children:b.jsx(Sa,{asChild:!0,container:o,children:r})})})};NR.displayName=bS;var zl="TooltipContent",$R=g.forwardRef((e,t)=>{const n=ewe(zl,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=$d(zl,e.__scopeTooltip);return b.jsx(Tt,{present:r||a.open,children:a.disableHoverableContent?b.jsx(IR,{side:o,...i,ref:t}):b.jsx(twe,{side:o,...i,ref:t})})}),twe=g.forwardRef((e,t)=>{const n=$d(zl,e.__scopeTooltip),r=vS(zl,e.__scopeTooltip),o=g.useRef(null),i=je(t,o),[a,s]=g.useState(null),{trigger:l,onClose:c}=n,u=o.current,{onPointerInTransitChange:d}=r,f=g.useCallback(()=>{s(null),d(!1)},[d]),p=g.useCallback((h,m)=>{const v=h.currentTarget,y={x:h.clientX,y:h.clientY},w=awe(y,v.getBoundingClientRect()),x=swe(y,w),S=lwe(m.getBoundingClientRect()),C=uwe([...x,...S]);s(C),d(!0)},[d]);return g.useEffect(()=>()=>f(),[f]),g.useEffect(()=>{if(l&&u){const h=v=>p(v,u),m=v=>p(v,l);return l.addEventListener("pointerleave",h),u.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",h),u.removeEventListener("pointerleave",m)}}},[l,u,p,f]),g.useEffect(()=>{if(a){const h=m=>{const v=m.target,y={x:m.clientX,y:m.clientY},w=(l==null?void 0:l.contains(v))||(u==null?void 0:u.contains(v)),x=!cwe(y,a);w?f():x&&(f(),c())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[l,u,a,c,f]),b.jsx(IR,{...e,ref:i})}),[nwe,rwe]=dm(Nd,{isInside:!1}),owe=Ybe("TooltipContent"),IR=g.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...s}=e,l=$d(zl,n),c=fm(n),{onClose:u}=l;return g.useEffect(()=>(document.addEventListener(mS,u),()=>document.removeEventListener(mS,u)),[u]),g.useEffect(()=>{if(l.trigger){const d=f=>{const p=f.target;p!=null&&p.contains(l.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,u]),b.jsx(li,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:b.jsxs(id,{"data-state":l.stateAttribute,...c,...s,ref:t,style:{...s.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:[b.jsx(owe,{children:r}),b.jsx(nwe,{scope:n,isInside:!0,children:b.jsx(RF,{id:l.contentId,role:"tooltip",children:o||r})})]})})});$R.displayName=zl;var LR="TooltipArrow",iwe=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=fm(n);return rwe(LR,n).isInside?null:b.jsx(ad,{...o,...r,ref:t})});iwe.displayName=LR;function awe(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function swe(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 lwe(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 cwe(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const s=t[i],l=t[a],c=s.x,u=s.y,d=l.x,f=l.y;u>r!=f>r&&n<(d-c)*(r-u)/(f-u)+c&&(o=!o)}return o}function uwe(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),dwe(t)}function dwe(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 i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.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 i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.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 fwe=kR,hwe=AR,pwe=DR,gwe=NR,FR=$R;const RR=fwe,BR=hwe,jR=pwe,wS=g.forwardRef(({className:e,sideOffset:t=4,...n},r)=>b.jsx(gwe,{children:b.jsx(FR,{ref:r,sideOffset:t,className:q("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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",e),...n})}));wS.displayName=FR.displayName;const xS=768;function zR(){const[e,t]=O.useState(void 0);return O.useEffect(()=>{const n=window.matchMedia(`(max-width: ${xS-1}px)`),r=()=>{t(window.innerWidth<xS)};return n.addEventListener("change",r),t(window.innerWidth<xS),()=>n.removeEventListener("change",r)},[]),!!e}const mwe="sidebar_state",vwe=3600*24*7,ywe="16rem",bwe="18rem",wwe="3rem",xwe="b",qR=g.createContext(null);function Id(){const e=g.useContext(qR);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const VR=g.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:o,children:i,...a},s)=>{const l=zR(),[c,u]=g.useState(!1),[d,f]=g.useState(e),p=t??d,h=g.useCallback(w=>{const x=typeof w=="function"?w(p):w;n?n(x):f(x),document.cookie=`${mwe}=${x}; path=/; max-age=${vwe}`},[n,p]),m=g.useCallback(()=>l?u(w=>!w):h(w=>!w),[l,h,u]);g.useEffect(()=>{const w=x=>{x.key===xwe&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),m())};return window.addEventListener("keydown",w),()=>window.removeEventListener("keydown",w)},[m]);const v=p?"expanded":"collapsed",y=g.useMemo(()=>({state:v,open:p,setOpen:h,isMobile:l,openMobile:c,setOpenMobile:u,toggleSidebar:m}),[v,p,h,l,c,u,m]);return b.jsx(qR.Provider,{value:y,children:b.jsx(RR,{delayDuration:0,children:b.jsx("div",{style:{"--sidebar-width":ywe,"--sidebar-width-icon":wwe,...o},className:q("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",r),ref:s,...a,children:i})})})});VR.displayName="SidebarProvider";const UR=g.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:o,...i},a)=>{const{isMobile:s,state:l,openMobile:c,setOpenMobile:u}=Id();return n==="none"?b.jsx("div",{className:q("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",r),ref:a,...i,children:o}):s?b.jsx(kx,{open:c,onOpenChange:u,...i,children:b.jsxs(zg,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":bwe},side:e,children:[b.jsxs(qg,{className:"sr-only",children:[b.jsx(Vg,{children:"Sidebar"}),b.jsx(Ug,{children:"Displays the mobile sidebar."})]}),b.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):b.jsxs("div",{ref:a,className:"group peer hidden text-sidebar-foreground md:block","data-state":l,"data-collapsible":l==="collapsed"?n:"","data-variant":t,"data-side":e,children:[b.jsx("div",{className:q("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)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),b.jsx("div",{className:q("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)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...i,children:b.jsx("div",{"data-sidebar":"sidebar",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",children:o})})]})});UR.displayName="Sidebar";const HR=g.forwardRef(({className:e,onClick:t,...n},r)=>{const{toggleSidebar:o}=Id();return b.jsxs(Xc,{ref:r,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:q("h-7 w-7",e),onClick:i=>{t==null||t(i),o()},...n,children:[b.jsx(EV,{}),b.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});HR.displayName="SidebarTrigger";const WR=g.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:r}=Id();return b.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:q("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[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 group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});WR.displayName="SidebarRail";const KR=g.forwardRef(({className:e,...t},n)=>b.jsx("main",{ref:n,className:q("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));KR.displayName="SidebarInset";const GR=g.forwardRef(({className:e,...t},n)=>b.jsx(Ex,{ref:n,"data-sidebar":"input",className:q("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));GR.displayName="SidebarInput";const YR=g.forwardRef(({className:e,...t},n)=>b.jsx("div",{ref:n,"data-sidebar":"header",className:q("flex flex-col gap-2 p-2",e),...t}));YR.displayName="SidebarHeader";const XR=g.forwardRef(({className:e,...t},n)=>b.jsx("div",{ref:n,"data-sidebar":"footer",className:q("flex flex-col gap-2 p-2",e),...t}));XR.displayName="SidebarFooter";const QR=g.forwardRef(({className:e,...t},n)=>b.jsx(gS,{ref:n,"data-sidebar":"separator",className:q("mx-2 w-auto bg-sidebar-border",e),...t}));QR.displayName="SidebarSeparator";const ZR=g.forwardRef(({className:e,...t},n)=>b.jsx("div",{ref:n,"data-sidebar":"content",className:q("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));ZR.displayName="SidebarContent";const JR=g.forwardRef(({className:e,...t},n)=>b.jsx("div",{ref:n,"data-sidebar":"group",className:q("relative flex w-full min-w-0 flex-col p-2",e),...t}));JR.displayName="SidebarGroup";const e7=g.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const o=t?Fi:"div";return b.jsx(o,{ref:r,"data-sidebar":"group-label",className:q("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring 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})});e7.displayName="SidebarGroupLabel";const t7=g.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const o=t?Fi:"button";return b.jsx(o,{ref:r,"data-sidebar":"group-action",className:q("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...n})});t7.displayName="SidebarGroupAction";const n7=g.forwardRef(({className:e,...t},n)=>b.jsx("div",{ref:n,"data-sidebar":"group-content",className:q("w-full text-sm",e),...t}));n7.displayName="SidebarGroupContent";const r7=g.forwardRef(({className:e,...t},n)=>b.jsx("ul",{ref:n,"data-sidebar":"menu",className:q("flex w-full min-w-0 flex-col gap-1",e),...t}));r7.displayName="SidebarMenu";const o7=g.forwardRef(({className:e,...t},n)=>b.jsx("li",{ref:n,"data-sidebar":"menu-item",className:q("group/menu-item relative",e),...t}));o7.displayName="SidebarMenuItem";const Swe=ei("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(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"}}),i7=g.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:o,className:i,...a},s)=>{const l=e?Fi:"button",{isMobile:c,state:u}=Id(),d=b.jsx(l,{ref:s,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:q(Swe({variant:n,size:r}),i),...a});return o?(typeof o=="string"&&(o={children:o}),b.jsxs(BR,{children:[b.jsx(jR,{asChild:!0,children:d}),b.jsx(wS,{side:"right",align:"center",hidden:u!=="collapsed"||c,...o})]})):d});i7.displayName="SidebarMenuButton";const a7=g.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...r},o)=>{const i=t?Fi:"button";return b.jsx(i,{ref:o,"data-sidebar":"menu-action",className:q("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md: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 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...r})});a7.displayName="SidebarMenuAction";const s7=g.forwardRef(({className:e,...t},n)=>b.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:q("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","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}));s7.displayName="SidebarMenuBadge";const l7=g.forwardRef(({className:e,showIcon:t=!1,...n},r)=>{const o=g.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return b.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:q("flex h-8 items-center gap-2 rounded-md px-2",e),...n,children:[t&&b.jsx(Lr,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),b.jsx(Lr,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})});l7.displayName="SidebarMenuSkeleton";const c7=g.forwardRef(({className:e,...t},n)=>b.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:q("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}));c7.displayName="SidebarMenuSub";const u7=g.forwardRef(({...e},t)=>b.jsx("li",{ref:t,...e}));u7.displayName="SidebarMenuSubItem";const d7=g.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:r,...o},i)=>{const a=e?Fi:"a";return b.jsx(a,{ref:i,"data-sidebar":"menu-sub-button","data-size":t,className:q("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground 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 [&>svg]:text-sidebar-accent-foreground","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",`${n?"font-bold bg-white rounded-lg shadow-md text-[12px]":""}`,r),...o})});d7.displayName="SidebarMenuSubButton";var f7=["PageUp","PageDown"],h7=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],p7={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},ql="Slider",[SS,Cwe,Ewe]=Qo(ql),[g7]=kt(ql,[Ewe]),[Pwe,hm]=g7(ql),m7=g.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:i=1,orientation:a="horizontal",disabled:s=!1,minStepsBetweenThumbs:l=0,defaultValue:c=[r],value:u,onValueChange:d=()=>{},onValueCommit:f=()=>{},inverted:p=!1,form:h,...m}=e,v=g.useRef(new Set),y=g.useRef(0),x=a==="horizontal"?Owe:Twe,[S=[],C]=Ot({prop:u,defaultProp:c,onChange:A=>{var N;(N=[...v.current][y.current])==null||N.focus(),d(A)}}),E=g.useRef(S);function P(A){const D=Dwe(S,A);M(A,D)}function _(A){M(A,y.current)}function T(){const A=E.current[y.current];S[y.current]!==A&&f(S)}function M(A,D,{commit:N}={commit:!1}){const R=Lwe(i),U=Fwe(Math.round((A-r)/i)*i+r,R),L=Od(U,[r,o]);C((V=[])=>{const j=kwe(V,L,D);if(Iwe(j,l*i)){y.current=j.indexOf(L);const H=String(j)!==String(V);return H&&N&&f(j),H?j:V}else return V})}return b.jsx(Pwe,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:o,valueIndexToChangeRef:y,thumbs:v.current,values:S,orientation:a,form:h,children:b.jsx(SS.Provider,{scope:e.__scopeSlider,children:b.jsx(SS.Slot,{scope:e.__scopeSlider,children:b.jsx(x,{"aria-disabled":s,"data-disabled":s?"":void 0,...m,ref:t,onPointerDown:ne(m.onPointerDown,()=>{s||(E.current=S)}),min:r,max:o,inverted:p,onSlideStart:s?void 0:P,onSlideMove:s?void 0:_,onSlideEnd:s?void 0:T,onHomeKeyDown:()=>!s&&M(r,0,{commit:!0}),onEndKeyDown:()=>!s&&M(o,S.length-1,{commit:!0}),onStepKeyDown:({event:A,direction:D})=>{if(!s){const U=f7.includes(A.key)||A.shiftKey&&h7.includes(A.key)?10:1,L=y.current,V=S[L],j=i*U*D;M(V+j,L,{commit:!0})}}})})})})});m7.displayName=ql;var[v7,y7]=g7(ql,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Owe=g.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:l,onStepKeyDown:c,...u}=e,[d,f]=g.useState(null),p=je(t,x=>f(x)),h=g.useRef(void 0),m=Wr(o),v=m==="ltr",y=v&&!i||!v&&i;function w(x){const S=h.current||d.getBoundingClientRect(),C=[0,S.width],P=PS(C,y?[n,r]:[r,n]);return h.current=S,P(x-S.left)}return b.jsx(v7,{scope:e.__scopeSlider,startEdge:y?"left":"right",endEdge:y?"right":"left",direction:y?1:-1,size:"width",children:b.jsx(b7,{dir:m,"data-orientation":"horizontal",...u,ref:p,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const S=w(x.clientX);a==null||a(S)},onSlideMove:x=>{const S=w(x.clientX);s==null||s(S)},onSlideEnd:()=>{h.current=void 0,l==null||l()},onStepKeyDown:x=>{const C=p7[y?"from-left":"from-right"].includes(x.key);c==null||c({event:x,direction:C?-1:1})}})})}),Twe=g.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:s,onStepKeyDown:l,...c}=e,u=g.useRef(null),d=je(t,u),f=g.useRef(void 0),p=!o;function h(m){const v=f.current||u.current.getBoundingClientRect(),y=[0,v.height],x=PS(y,p?[r,n]:[n,r]);return f.current=v,x(m-v.top)}return b.jsx(v7,{scope:e.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1,children:b.jsx(b7,{"data-orientation":"vertical",...c,ref:d,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:m=>{const v=h(m.clientY);i==null||i(v)},onSlideMove:m=>{const v=h(m.clientY);a==null||a(v)},onSlideEnd:()=>{f.current=void 0,s==null||s()},onStepKeyDown:m=>{const y=p7[p?"from-bottom":"from-top"].includes(m.key);l==null||l({event:m,direction:y?-1:1})}})})}),b7=g.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:l,...c}=e,u=hm(ql,n);return b.jsx(ye.span,{...c,ref:t,onKeyDown:ne(e.onKeyDown,d=>{d.key==="Home"?(a(d),d.preventDefault()):d.key==="End"?(s(d),d.preventDefault()):f7.concat(h7).includes(d.key)&&(l(d),d.preventDefault())}),onPointerDown:ne(e.onPointerDown,d=>{const f=d.target;f.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(f)?f.focus():r(d)}),onPointerMove:ne(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:ne(e.onPointerUp,d=>{const f=d.target;f.hasPointerCapture(d.pointerId)&&(f.releasePointerCapture(d.pointerId),i(d))})})}),w7="SliderTrack",x7=g.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=hm(w7,n);return b.jsx(ye.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});x7.displayName=w7;var CS="SliderRange",S7=g.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=hm(CS,n),i=y7(CS,n),a=g.useRef(null),s=je(t,a),l=o.values.length,c=o.values.map(f=>P7(f,o.min,o.max)),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return b.jsx(ye.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:s,style:{...e.style,[i.startEdge]:u+"%",[i.endEdge]:d+"%"}})});S7.displayName=CS;var ES="SliderThumb",C7=g.forwardRef((e,t)=>{const n=Cwe(e.__scopeSlider),[r,o]=g.useState(null),i=je(t,s=>o(s)),a=g.useMemo(()=>r?n().findIndex(s=>s.ref.current===r):-1,[n,r]);return b.jsx(_we,{...e,ref:i,index:a})}),_we=g.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,a=hm(ES,n),s=y7(ES,n),[l,c]=g.useState(null),u=je(t,w=>c(w)),d=l?a.form||!!l.closest("form"):!0,f=Ju(l),p=a.values[r],h=p===void 0?0:P7(p,a.min,a.max),m=Awe(r,a.values.length),v=f==null?void 0:f[s.size],y=v?Nwe(v,h,s.direction):0;return g.useEffect(()=>{if(l)return a.thumbs.add(l),()=>{a.thumbs.delete(l)}},[l,a.thumbs]),b.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${h}% + ${y}px)`},children:[b.jsx(SS.ItemSlot,{scope:e.__scopeSlider,children:b.jsx(ye.span,{role:"slider","aria-label":e["aria-label"]||m,"aria-valuemin":a.min,"aria-valuenow":p,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...i,ref:u,style:p===void 0?{display:"none"}:e.style,onFocus:ne(e.onFocus,()=>{a.valueIndexToChangeRef.current=r})})}),d&&b.jsx(E7,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:p},r)]})});C7.displayName=ES;var Mwe="RadioBubbleInput",E7=g.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const o=g.useRef(null),i=je(o,r),a=wl(t);return g.useEffect(()=>{const s=o.current;if(!s)return;const l=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&u){const d=new Event("input",{bubbles:!0});u.call(s,t),s.dispatchEvent(d)}},[a,t]),b.jsx(ye.input,{style:{display:"none"},...n,ref:i,defaultValue:t})});E7.displayName=Mwe;function kwe(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,i)=>o-i)}function P7(e,t,n){const i=100/(n-t)*(e-t);return Od(i,[0,100])}function Awe(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function Dwe(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 Nwe(e,t,n){const r=e/2,i=PS([0,50],[0,r]);return(r-i(t)*n)*n}function $we(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function Iwe(e,t){if(t>0){const n=$we(e);return Math.min(...n)>=t}return!0}function PS(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 Lwe(e){return(String(e).split(".")[1]||"").length}function Fwe(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var O7=m7,Rwe=x7,Bwe=S7,jwe=C7;const T7=g.forwardRef(({className:e,...t},n)=>b.jsxs(O7,{ref:n,className:q("relative flex w-full touch-none select-none items-center",e),...t,children:[b.jsx(Rwe,{className:"relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20",children:b.jsx(Bwe,{className:"absolute h-full bg-primary"})}),b.jsx(jwe,{className:"block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"})]}));T7.displayName=O7.displayName;var zwe=(e,t,n,r,o,i,a,s)=>{let l=document.documentElement,c=["light","dark"];function u(p){(Array.isArray(e)?e:[e]).forEach(h=>{let m=h==="class",v=m&&i?o.map(y=>i[y]||y):o;m?(l.classList.remove(...v),l.classList.add(i&&i[p]?i[p]:p)):l.setAttribute(h,p)}),d(p)}function d(p){s&&c.includes(p)&&(l.style.colorScheme=p)}function f(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)u(r);else try{let p=localStorage.getItem(t)||n,h=a&&p==="system"?f():p;u(h)}catch{}},qwe=g.createContext(void 0),Vwe={setTheme:e=>{},themes:[]},Uwe=()=>{var e;return(e=g.useContext(qwe))!=null?e:Vwe};g.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:o,defaultTheme:i,value:a,themes:s,nonce:l,scriptProps:c})=>{let u=JSON.stringify([n,t,i,e,s,a,r,o]).slice(1,-1);return g.createElement("script",{...c,suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(${zwe.toString()})(${u})`}})});function Hwe(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 Wwe=e=>{switch(e){case"success":return Ywe;case"info":return Qwe;case"warning":return Xwe;case"error":return Zwe;default:return null}},Kwe=Array(12).fill(0),Gwe=({visible:e,className:t})=>O.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},O.createElement("div",{className:"sonner-spinner"},Kwe.map((n,r)=>O.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Ywe=O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},O.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"})),Xwe=O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},O.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"})),Qwe=O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},O.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"})),Zwe=O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},O.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"})),Jwe=O.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"},O.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),O.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),e1e=()=>{const[e,t]=O.useState(document.hidden);return O.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let OS=1;class t1e{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,i=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:OS++,a=this.toasts.find(l=>l.id===i),s=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),a?this.toasts=this.toasts.map(l=>l.id===i?(this.publish({...l,...t,id:i,title:r}),{...l,...t,id:i,dismissible:s,title:r}):l):this.addToast({title:r,...o,dismissible:s,id:i}),i},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 i=r!==void 0,a;const s=o.then(async c=>{if(a=["resolve",c],O.isValidElement(c))i=!1,this.create({id:r,type:"default",message:c});else if(r1e(c)&&!c.ok){i=!1;const d=typeof n.error=="function"?await n.error(`HTTP error! status: ${c.status}`):n.error,f=typeof n.description=="function"?await n.description(`HTTP error! status: ${c.status}`):n.description,h=typeof d=="object"&&!O.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:f,...h})}else if(c instanceof Error){i=!1;const d=typeof n.error=="function"?await n.error(c):n.error,f=typeof n.description=="function"?await n.description(c):n.description,h=typeof d=="object"&&!O.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:f,...h})}else if(n.success!==void 0){i=!1;const d=typeof n.success=="function"?await n.success(c):n.success,f=typeof n.description=="function"?await n.description(c):n.description,h=typeof d=="object"&&!O.isValidElement(d)?d:{message:d};this.create({id:r,type:"success",description:f,...h})}}).catch(async c=>{if(a=["reject",c],n.error!==void 0){i=!1;const u=typeof n.error=="function"?await n.error(c):n.error,d=typeof n.description=="function"?await n.description(c):n.description,p=typeof u=="object"&&!O.isValidElement(u)?u:{message:u};this.create({id:r,type:"error",description:d,...p})}}).finally(()=>{i&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((c,u)=>s.then(()=>a[0]==="reject"?u(a[1]):c(a[1])).catch(u));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)||OS++;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 Zn=new t1e,n1e=(e,t)=>{const n=(t==null?void 0:t.id)||OS++;return Zn.addToast({title:e,...t,id:n}),n},r1e=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",o1e=n1e,i1e=()=>Zn.toasts,a1e=()=>Zn.getActiveToasts();Object.assign(o1e,{success:Zn.success,info:Zn.info,warning:Zn.warning,error:Zn.error,custom:Zn.custom,message:Zn.message,promise:Zn.promise,dismiss:Zn.dismiss,loading:Zn.loading},{getHistory:i1e,getToasts:a1e}),Hwe("[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 pm(e){return e.label!==void 0}const s1e=3,l1e="24px",c1e="16px",_7=4e3,u1e=356,d1e=14,f1e=45,h1e=200;function Bo(...e){return e.filter(Boolean).join(" ")}function p1e(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const g1e=e=>{var t,n,r,o,i,a,s,l,c;const{invert:u,toast:d,unstyled:f,interacting:p,setHeights:h,visibleToasts:m,heights:v,index:y,toasts:w,expanded:x,removeToast:S,defaultRichColors:C,closeButton:E,style:P,cancelButtonStyle:_,actionButtonStyle:T,className:M="",descriptionClassName:A="",duration:D,position:N,gap:R,expandByDefault:U,classNames:L,icons:V,closeButtonAriaLabel:j="Close toast"}=e,[H,se]=O.useState(null),[pe,W]=O.useState(null),[Y,F]=O.useState(!1),[ee,fe]=O.useState(!1),[Z,J]=O.useState(!1),[Q,oe]=O.useState(!1),[le,z]=O.useState(!1),[_e,X]=O.useState(0),[be,$e]=O.useState(0),Ve=O.useRef(d.duration||D||_7),ae=O.useRef(null),Ee=O.useRef(null),Xe=y===0,$=y+1<=m,B=d.type,G=d.dismissible!==!1,he=d.className||"",re=d.descriptionClassName||"",ce=O.useMemo(()=>v.findIndex(Me=>Me.toastId===d.id)||0,[v,d.id]),Oe=O.useMemo(()=>{var Me;return(Me=d.closeButton)!=null?Me:E},[d.closeButton,E]),Ge=O.useMemo(()=>d.duration||D||_7,[d.duration,D]),Qe=O.useRef(0),et=O.useRef(0),$t=O.useRef(0),rt=O.useRef(null),[gt,Jt]=N.split("-"),en=O.useMemo(()=>v.reduce((Me,ke,ct)=>ct>=ce?Me:Me+ke.height,0),[v,ce]),Wn=e1e(),vn=d.invert||u,$n=B==="loading";et.current=O.useMemo(()=>ce*R+en,[ce,en]),O.useEffect(()=>{Ve.current=Ge},[Ge]),O.useEffect(()=>{F(!0)},[]),O.useEffect(()=>{const Me=Ee.current;if(Me){const ke=Me.getBoundingClientRect().height;return $e(ke),h(ct=>[{toastId:d.id,height:ke,position:d.position},...ct]),()=>h(ct=>ct.filter(ft=>ft.toastId!==d.id))}},[h,d.id]),O.useLayoutEffect(()=>{if(!Y)return;const Me=Ee.current,ke=Me.style.height;Me.style.height="auto";const ct=Me.getBoundingClientRect().height;Me.style.height=ke,$e(ct),h(ft=>ft.find(ut=>ut.toastId===d.id)?ft.map(ut=>ut.toastId===d.id?{...ut,height:ct}:ut):[{toastId:d.id,height:ct,position:d.position},...ft])},[Y,d.title,d.description,h,d.id,d.jsx,d.action,d.cancel]);const Ne=O.useCallback(()=>{fe(!0),X(et.current),h(Me=>Me.filter(ke=>ke.toastId!==d.id)),setTimeout(()=>{S(d)},h1e)},[d,S,h,et]);O.useEffect(()=>{if(d.promise&&B==="loading"||d.duration===1/0||d.type==="loading")return;let Me;return x||p||Wn?(()=>{if($t.current<Qe.current){const ft=new Date().getTime()-Qe.current;Ve.current=Ve.current-ft}$t.current=new Date().getTime()})():(()=>{Ve.current!==1/0&&(Qe.current=new Date().getTime(),Me=setTimeout(()=>{d.onAutoClose==null||d.onAutoClose.call(d,d),Ne()},Ve.current))})(),()=>clearTimeout(Me)},[x,p,d,B,Wn,Ne]),O.useEffect(()=>{d.delete&&(Ne(),d.onDismiss==null||d.onDismiss.call(d,d))},[Ne,d.delete]);function Te(){var Me;if(V!=null&&V.loading){var ke;return O.createElement("div",{className:Bo(L==null?void 0:L.loader,d==null||(ke=d.classNames)==null?void 0:ke.loader,"sonner-loader"),"data-visible":B==="loading"},V.loading)}return O.createElement(Gwe,{className:Bo(L==null?void 0:L.loader,d==null||(Me=d.classNames)==null?void 0:Me.loader),visible:B==="loading"})}const Ie=d.icon||(V==null?void 0:V[B])||Wwe(B);var we,ze;return O.createElement("li",{tabIndex:0,ref:Ee,className:Bo(M,he,L==null?void 0:L.toast,d==null||(t=d.classNames)==null?void 0:t.toast,L==null?void 0:L.default,L==null?void 0:L[B],d==null||(n=d.classNames)==null?void 0:n[B]),"data-sonner-toast":"","data-rich-colors":(we=d.richColors)!=null?we:C,"data-styled":!(d.jsx||d.unstyled||f),"data-mounted":Y,"data-promise":!!d.promise,"data-swiped":le,"data-removed":ee,"data-visible":$,"data-y-position":gt,"data-x-position":Jt,"data-index":y,"data-front":Xe,"data-swiping":Z,"data-dismissible":G,"data-type":B,"data-invert":vn,"data-swipe-out":Q,"data-swipe-direction":pe,"data-expanded":!!(x||U&&Y),"data-testid":d.testId,style:{"--index":y,"--toasts-before":y,"--z-index":w.length-y,"--offset":`${ee?_e:et.current}px`,"--initial-height":U?"auto":`${be}px`,...P,...d.style},onDragEnd:()=>{J(!1),se(null),rt.current=null},onPointerDown:Me=>{Me.button!==2&&($n||!G||(ae.current=new Date,X(et.current),Me.target.setPointerCapture(Me.pointerId),Me.target.tagName!=="BUTTON"&&(J(!0),rt.current={x:Me.clientX,y:Me.clientY})))},onPointerUp:()=>{var Me,ke,ct;if(Q||!G)return;rt.current=null;const ft=Number(((Me=Ee.current)==null?void 0:Me.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Cn=Number(((ke=Ee.current)==null?void 0:ke.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ut=new Date().getTime()-((ct=ae.current)==null?void 0:ct.getTime()),mt=H==="x"?ft:Cn,Hr=Math.abs(mt)/ut;if(Math.abs(mt)>=f1e||Hr>.11){X(et.current),d.onDismiss==null||d.onDismiss.call(d,d),W(H==="x"?ft>0?"right":"left":Cn>0?"down":"up"),Ne(),oe(!0);return}else{var En,nr;(En=Ee.current)==null||En.style.setProperty("--swipe-amount-x","0px"),(nr=Ee.current)==null||nr.style.setProperty("--swipe-amount-y","0px")}z(!1),J(!1),se(null)},onPointerMove:Me=>{var ke,ct,ft;if(!rt.current||!G||((ke=window.getSelection())==null?void 0:ke.toString().length)>0)return;const ut=Me.clientY-rt.current.y,mt=Me.clientX-rt.current.x;var Hr;const En=(Hr=e.swipeDirections)!=null?Hr:p1e(N);!H&&(Math.abs(mt)>1||Math.abs(ut)>1)&&se(Math.abs(mt)>Math.abs(ut)?"x":"y");let nr={x:0,y:0};const xf=Xo=>1/(1.5+Math.abs(Xo)/20);if(H==="y"){if(En.includes("top")||En.includes("bottom"))if(En.includes("top")&&ut<0||En.includes("bottom")&&ut>0)nr.y=ut;else{const Xo=ut*xf(ut);nr.y=Math.abs(Xo)<Math.abs(ut)?Xo:ut}}else if(H==="x"&&(En.includes("left")||En.includes("right")))if(En.includes("left")&&mt<0||En.includes("right")&&mt>0)nr.x=mt;else{const Xo=mt*xf(mt);nr.x=Math.abs(Xo)<Math.abs(mt)?Xo:mt}(Math.abs(nr.x)>0||Math.abs(nr.y)>0)&&z(!0),(ct=Ee.current)==null||ct.style.setProperty("--swipe-amount-x",`${nr.x}px`),(ft=Ee.current)==null||ft.style.setProperty("--swipe-amount-y",`${nr.y}px`)}},Oe&&!d.jsx&&B!=="loading"?O.createElement("button",{"aria-label":j,"data-disabled":$n,"data-close-button":!0,onClick:$n||!G?()=>{}:()=>{Ne(),d.onDismiss==null||d.onDismiss.call(d,d)},className:Bo(L==null?void 0:L.closeButton,d==null||(r=d.classNames)==null?void 0:r.closeButton)},(ze=V==null?void 0:V.close)!=null?ze:Jwe):null,(B||d.icon||d.promise)&&d.icon!==null&&((V==null?void 0:V[B])!==null||d.icon)?O.createElement("div",{"data-icon":"",className:Bo(L==null?void 0:L.icon,d==null||(o=d.classNames)==null?void 0:o.icon)},d.promise||d.type==="loading"&&!d.icon?d.icon||Te():null,d.type!=="loading"?Ie:null):null,O.createElement("div",{"data-content":"",className:Bo(L==null?void 0:L.content,d==null||(i=d.classNames)==null?void 0:i.content)},O.createElement("div",{"data-title":"",className:Bo(L==null?void 0:L.title,d==null||(a=d.classNames)==null?void 0:a.title)},d.jsx?d.jsx:typeof d.title=="function"?d.title():d.title),d.description?O.createElement("div",{"data-description":"",className:Bo(A,re,L==null?void 0:L.description,d==null||(s=d.classNames)==null?void 0:s.description)},typeof d.description=="function"?d.description():d.description):null),O.isValidElement(d.cancel)?d.cancel:d.cancel&&pm(d.cancel)?O.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||_,onClick:Me=>{pm(d.cancel)&&G&&(d.cancel.onClick==null||d.cancel.onClick.call(d.cancel,Me),Ne())},className:Bo(L==null?void 0:L.cancelButton,d==null||(l=d.classNames)==null?void 0:l.cancelButton)},d.cancel.label):null,O.isValidElement(d.action)?d.action:d.action&&pm(d.action)?O.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||T,onClick:Me=>{pm(d.action)&&(d.action.onClick==null||d.action.onClick.call(d.action,Me),!Me.defaultPrevented&&Ne())},className:Bo(L==null?void 0:L.actionButton,d==null||(c=d.classNames)==null?void 0:c.actionButton)},d.action.label):null)};function M7(){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 m1e(e,t){const n={};return[e,t].forEach((r,o)=>{const i=o===1,a=i?"--mobile-offset":"--offset",s=i?c1e:l1e;function l(c){["top","right","bottom","left"].forEach(u=>{n[`${a}-${u}`]=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[`${a}-${c}`]=s:n[`${a}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(s)}),n}const v1e=O.forwardRef(function(t,n){const{id:r,invert:o,position:i="bottom-right",hotkey:a=["altKey","KeyT"],expand:s,closeButton:l,className:c,offset:u,mobileOffset:d,theme:f="light",richColors:p,duration:h,style:m,visibleToasts:v=s1e,toastOptions:y,dir:w=M7(),gap:x=d1e,icons:S,containerAriaLabel:C="Notifications"}=t,[E,P]=O.useState([]),_=O.useMemo(()=>r?E.filter(Y=>Y.toasterId===r):E.filter(Y=>!Y.toasterId),[E,r]),T=O.useMemo(()=>Array.from(new Set([i].concat(_.filter(Y=>Y.position).map(Y=>Y.position)))),[_,i]),[M,A]=O.useState([]),[D,N]=O.useState(!1),[R,U]=O.useState(!1),[L,V]=O.useState(f!=="system"?f:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),j=O.useRef(null),H=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),se=O.useRef(null),pe=O.useRef(!1),W=O.useCallback(Y=>{P(F=>{var ee;return(ee=F.find(fe=>fe.id===Y.id))!=null&&ee.delete||Zn.dismiss(Y.id),F.filter(({id:fe})=>fe!==Y.id)})},[]);return O.useEffect(()=>Zn.subscribe(Y=>{if(Y.dismiss){requestAnimationFrame(()=>{P(F=>F.map(ee=>ee.id===Y.id?{...ee,delete:!0}:ee))});return}setTimeout(()=>{xr.flushSync(()=>{P(F=>{const ee=F.findIndex(fe=>fe.id===Y.id);return ee!==-1?[...F.slice(0,ee),{...F[ee],...Y},...F.slice(ee+1)]:[Y,...F]})})})}),[E]),O.useEffect(()=>{if(f!=="system"){V(f);return}if(f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?V("dark"):V("light")),typeof window>"u")return;const Y=window.matchMedia("(prefers-color-scheme: dark)");try{Y.addEventListener("change",({matches:F})=>{V(F?"dark":"light")})}catch{Y.addListener(({matches:ee})=>{try{V(ee?"dark":"light")}catch(fe){console.error(fe)}})}},[f]),O.useEffect(()=>{E.length<=1&&N(!1)},[E]),O.useEffect(()=>{const Y=F=>{var ee;if(a.every(J=>F[J]||F.code===J)){var Z;N(!0),(Z=j.current)==null||Z.focus()}F.code==="Escape"&&(document.activeElement===j.current||(ee=j.current)!=null&&ee.contains(document.activeElement))&&N(!1)};return document.addEventListener("keydown",Y),()=>document.removeEventListener("keydown",Y)},[a]),O.useEffect(()=>{if(j.current)return()=>{se.current&&(se.current.focus({preventScroll:!0}),se.current=null,pe.current=!1)}},[j.current]),O.createElement("section",{ref:n,"aria-label":`${C} ${H}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},T.map((Y,F)=>{var ee;const[fe,Z]=Y.split("-");return _.length?O.createElement("ol",{key:Y,dir:w==="auto"?M7():w,tabIndex:-1,ref:j,className:c,"data-sonner-toaster":!0,"data-sonner-theme":L,"data-y-position":fe,"data-x-position":Z,style:{"--front-toast-height":`${((ee=M[0])==null?void 0:ee.height)||0}px`,"--width":`${u1e}px`,"--gap":`${x}px`,...m,...m1e(u,d)},onBlur:J=>{pe.current&&!J.currentTarget.contains(J.relatedTarget)&&(pe.current=!1,se.current&&(se.current.focus({preventScroll:!0}),se.current=null))},onFocus:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||pe.current||(pe.current=!0,se.current=J.relatedTarget)},onMouseEnter:()=>N(!0),onMouseMove:()=>N(!0),onMouseLeave:()=>{R||N(!1)},onDragEnd:()=>N(!1),onPointerDown:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||U(!0)},onPointerUp:()=>U(!1)},_.filter(J=>!J.position&&F===0||J.position===Y).map((J,Q)=>{var oe,le;return O.createElement(g1e,{key:J.id,icons:S,index:Q,toast:J,defaultRichColors:p,duration:(oe=y==null?void 0:y.duration)!=null?oe:h,className:y==null?void 0:y.className,descriptionClassName:y==null?void 0:y.descriptionClassName,invert:o,visibleToasts:v,closeButton:(le=y==null?void 0:y.closeButton)!=null?le:l,interacting:R,position:Y,style:y==null?void 0:y.style,unstyled:y==null?void 0:y.unstyled,classNames:y==null?void 0:y.classNames,cancelButtonStyle:y==null?void 0:y.cancelButtonStyle,actionButtonStyle:y==null?void 0:y.actionButtonStyle,closeButtonAriaLabel:y==null?void 0:y.closeButtonAriaLabel,removeToast:W,toasts:_.filter(z=>z.position==J.position),heights:M.filter(z=>z.position==J.position),setHeights:A,expandByDefault:s,gap:x,expanded:D,swipeDirections:t.swipeDirections})})):null}))}),y1e=({...e})=>{const{theme:t="system"}=Uwe();return b.jsx(v1e,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var gm="Switch",[b1e]=kt(gm),[w1e,x1e]=b1e(gm),k7=g.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:l="on",onCheckedChange:c,form:u,...d}=e,[f,p]=g.useState(null),h=je(t,x=>p(x)),m=g.useRef(!1),v=f?u||!!f.closest("form"):!0,[y,w]=Ot({prop:o,defaultProp:i??!1,onChange:c,caller:gm});return b.jsxs(w1e,{scope:n,checked:y,disabled:s,children:[b.jsx(ye.button,{type:"button",role:"switch","aria-checked":y,"aria-required":a,"data-state":$7(y),"data-disabled":s?"":void 0,disabled:s,value:l,...d,ref:h,onClick:ne(e.onClick,x=>{w(S=>!S),v&&(m.current=x.isPropagationStopped(),m.current||x.stopPropagation())})}),v&&b.jsx(N7,{control:f,bubbles:!m.current,name:r,value:l,checked:y,required:a,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});k7.displayName=gm;var A7="SwitchThumb",D7=g.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=x1e(A7,n);return b.jsx(ye.span,{"data-state":$7(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});D7.displayName=A7;var S1e="SwitchBubbleInput",N7=g.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},i)=>{const a=g.useRef(null),s=je(a,i),l=wl(n),c=Ju(t);return g.useEffect(()=>{const u=a.current;if(!u)return;const d=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==n&&p){const h=new Event("click",{bubbles:r});p.call(u,n),u.dispatchEvent(h)}},[l,n,r]),b.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:s,style:{...o.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});N7.displayName=S1e;function $7(e){return e?"checked":"unchecked"}var I7=k7,C1e=D7;const L7=g.forwardRef(({className:e,...t},n)=>b.jsx(I7,{className:q("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:b.jsx(C1e,{className:q("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));L7.displayName=I7.displayName;const F7=g.forwardRef(({className:e,...t},n)=>b.jsx("div",{className:"relative w-full overflow-auto",children:b.jsx("table",{ref:n,className:q("w-full caption-bottom text-sm",e),...t})}));F7.displayName="Table";const R7=g.forwardRef(({className:e,...t},n)=>b.jsx("thead",{ref:n,className:q("[&_tr]:border-b",e),...t}));R7.displayName="TableHeader";const B7=g.forwardRef(({className:e,...t},n)=>b.jsx("tbody",{ref:n,className:q("[&_tr:last-child]:border-0",e),...t}));B7.displayName="TableBody";const j7=g.forwardRef(({className:e,...t},n)=>b.jsx("tfoot",{ref:n,className:q("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));j7.displayName="TableFooter";const z7=g.forwardRef(({className:e,...t},n)=>b.jsx("tr",{ref:n,className:q("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));z7.displayName="TableRow";const q7=g.forwardRef(({className:e,...t},n)=>b.jsx("th",{ref:n,className:q("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));q7.displayName="TableHead";const V7=g.forwardRef(({className:e,...t},n)=>b.jsx("td",{ref:n,className:q("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));V7.displayName="TableCell";const U7=g.forwardRef(({className:e,...t},n)=>b.jsx("caption",{ref:n,className:q("mt-4 text-sm text-muted-foreground",e),...t}));U7.displayName="TableCaption";var mm="Tabs",[E1e]=kt(mm,[Lo]),H7=Lo(),[P1e,TS]=E1e(mm),W7=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:a="horizontal",dir:s,activationMode:l="automatic",...c}=e,u=Wr(s),[d,f]=Ot({prop:r,onChange:o,defaultProp:i??"",caller:mm});return b.jsx(P1e,{scope:n,baseId:Et(),value:d,onValueChange:f,orientation:a,dir:u,activationMode:l,children:b.jsx(ye.div,{dir:u,"data-orientation":a,...c,ref:t})})});W7.displayName=mm;var K7="TabsList",G7=g.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=TS(K7,n),a=H7(n);return b.jsx(ld,{asChild:!0,...a,orientation:i.orientation,dir:i.dir,loop:r,children:b.jsx(ye.div,{role:"tablist","aria-orientation":i.orientation,...o,ref:t})})});G7.displayName=K7;var Y7="TabsTrigger",X7=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,a=TS(Y7,n),s=H7(n),l=J7(a.baseId,r),c=e9(a.baseId,r),u=r===a.value;return b.jsx(cd,{asChild:!0,...s,focusable:!o,active:u,children:b.jsx(ye.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...i,ref:t,onMouseDown:ne(e.onMouseDown,d=>{!o&&d.button===0&&d.ctrlKey===!1?a.onValueChange(r):d.preventDefault()}),onKeyDown:ne(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&a.onValueChange(r)}),onFocus:ne(e.onFocus,()=>{const d=a.activationMode!=="manual";!u&&!o&&d&&a.onValueChange(r)})})})});X7.displayName=Y7;var Q7="TabsContent",Z7=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...a}=e,s=TS(Q7,n),l=J7(s.baseId,r),c=e9(s.baseId,r),u=r===s.value,d=g.useRef(u);return g.useEffect(()=>{const f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),b.jsx(Tt,{present:o||u,children:({present:f})=>b.jsx(ye.div,{"data-state":u?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":l,hidden:!f,id:c,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:f&&i})})});Z7.displayName=Q7;function J7(e,t){return`${e}-trigger-${t}`}function e9(e,t){return`${e}-content-${t}`}var O1e=W7,t9=G7,n9=X7,r9=Z7;const T1e=O1e,o9=g.forwardRef(({className:e,...t},n)=>b.jsx(t9,{ref:n,className:q("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));o9.displayName=t9.displayName;const i9=g.forwardRef(({className:e,...t},n)=>b.jsx(n9,{ref:n,className:q("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));i9.displayName=n9.displayName;const a9=g.forwardRef(({className:e,...t},n)=>b.jsx(r9,{ref:n,className:q("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));a9.displayName=r9.displayName;const s9=g.forwardRef(({className:e,...t},n)=>b.jsx("textarea",{className:q("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));s9.displayName="Textarea";var _S="ToastProvider",[MS,_1e,M1e]=Qo("Toast"),[l9]=kt("Toast",[M1e]),[k1e,vm]=l9(_S),c9=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,l]=g.useState(null),[c,u]=g.useState(0),d=g.useRef(!1),f=g.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${_S}\`. Expected non-empty \`string\`.`),b.jsx(MS.Provider,{scope:t,children:b.jsx(k1e,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:g.useCallback(()=>u(p=>p+1),[]),onToastRemove:g.useCallback(()=>u(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:a})})};c9.displayName=_S;var u9="ToastViewport",A1e=["F8"],kS="toast.viewportPause",AS="toast.viewportResume",d9=g.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=A1e,label:o="Notifications ({hotkey})",...i}=e,a=vm(u9,n),s=_1e(n),l=g.useRef(null),c=g.useRef(null),u=g.useRef(null),d=g.useRef(null),f=je(t,d,a.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),h=a.toastCount>0;g.useEffect(()=>{const v=y=>{var x;r.length!==0&&r.every(S=>y[S]||y.code===S)&&((x=d.current)==null||x.focus())};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[r]),g.useEffect(()=>{const v=l.current,y=d.current;if(h&&v&&y){const w=()=>{if(!a.isClosePausedRef.current){const E=new CustomEvent(kS);y.dispatchEvent(E),a.isClosePausedRef.current=!0}},x=()=>{if(a.isClosePausedRef.current){const E=new CustomEvent(AS);y.dispatchEvent(E),a.isClosePausedRef.current=!1}},S=E=>{!v.contains(E.relatedTarget)&&x()},C=()=>{v.contains(document.activeElement)||x()};return v.addEventListener("focusin",w),v.addEventListener("focusout",S),v.addEventListener("pointermove",w),v.addEventListener("pointerleave",C),window.addEventListener("blur",w),window.addEventListener("focus",x),()=>{v.removeEventListener("focusin",w),v.removeEventListener("focusout",S),v.removeEventListener("pointermove",w),v.removeEventListener("pointerleave",C),window.removeEventListener("blur",w),window.removeEventListener("focus",x)}}},[h,a.isClosePausedRef]);const m=g.useCallback(({tabbingDirection:v})=>{const w=s().map(x=>{const S=x.ref.current,C=[S,...U1e(S)];return v==="forwards"?C:C.reverse()});return(v==="forwards"?w.reverse():w).flat()},[s]);return g.useEffect(()=>{const v=d.current;if(v){const y=w=>{var C,E,P;const x=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!x){const _=document.activeElement,T=w.shiftKey;if(w.target===v&&T){(C=c.current)==null||C.focus();return}const D=m({tabbingDirection:T?"backwards":"forwards"}),N=D.findIndex(R=>R===_);$S(D.slice(N+1))?w.preventDefault():T?(E=c.current)==null||E.focus():(P=u.current)==null||P.focus()}};return v.addEventListener("keydown",y),()=>v.removeEventListener("keydown",y)}},[s,m]),b.jsxs(BG,{ref:l,role:"region","aria-label":o.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:h?void 0:"none"},children:[h&&b.jsx(DS,{ref:c,onFocusFromOutsideViewport:()=>{const v=m({tabbingDirection:"forwards"});$S(v)}}),b.jsx(MS.Slot,{scope:n,children:b.jsx(ye.ol,{tabIndex:-1,...i,ref:f})}),h&&b.jsx(DS,{ref:u,onFocusFromOutsideViewport:()=>{const v=m({tabbingDirection:"backwards"});$S(v)}})]})});d9.displayName=u9;var f9="ToastFocusProxy",DS=g.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=vm(f9,n);return b.jsx(Xg,{tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{var c;const s=a.relatedTarget;!((c=i.viewport)!=null&&c.contains(s))&&r()}})});DS.displayName=f9;var Ld="Toast",D1e="toast.swipeStart",N1e="toast.swipeMove",$1e="toast.swipeCancel",I1e="toast.swipeEnd",h9=g.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s,l]=Ot({prop:r,defaultProp:o??!0,onChange:i,caller:Ld});return b.jsx(Tt,{present:n||s,children:b.jsx(R1e,{open:s,...a,ref:t,onClose:()=>l(!1),onPause:ht(e.onPause),onResume:ht(e.onResume),onSwipeStart:ne(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ne(e.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:ne(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ne(e.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});h9.displayName=Ld;var[L1e,F1e]=l9(Ld,{onClose(){}}),R1e=g.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:p,...h}=e,m=vm(Ld,n),[v,y]=g.useState(null),w=je(t,R=>y(R)),x=g.useRef(null),S=g.useRef(null),C=o||m.duration,E=g.useRef(0),P=g.useRef(C),_=g.useRef(0),{onToastAdd:T,onToastRemove:M}=m,A=ht(()=>{var U;(v==null?void 0:v.contains(document.activeElement))&&((U=m.viewport)==null||U.focus()),a()}),D=g.useCallback(R=>{!R||R===1/0||(window.clearTimeout(_.current),E.current=new Date().getTime(),_.current=window.setTimeout(A,R))},[A]);g.useEffect(()=>{const R=m.viewport;if(R){const U=()=>{D(P.current),c==null||c()},L=()=>{const V=new Date().getTime()-E.current;P.current=P.current-V,window.clearTimeout(_.current),l==null||l()};return R.addEventListener(kS,L),R.addEventListener(AS,U),()=>{R.removeEventListener(kS,L),R.removeEventListener(AS,U)}}},[m.viewport,C,l,c,D]),g.useEffect(()=>{i&&!m.isClosePausedRef.current&&D(C)},[i,C,m.isClosePausedRef,D]),g.useEffect(()=>(T(),()=>M()),[T,M]);const N=g.useMemo(()=>v?w9(v):null,[v]);return m.viewport?b.jsxs(b.Fragment,{children:[N&&b.jsx(B1e,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:N}),b.jsx(L1e,{scope:n,onClose:A,children:Oc.createPortal(b.jsx(MS.ItemSlot,{scope:n,children:b.jsx(RG,{asChild:!0,onEscapeKeyDown:ne(s,()=>{m.isFocusedToastEscapeKeyDownRef.current||A(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:b.jsx(ye.li,{tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":m.swipeDirection,...h,ref:w,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ne(e.onKeyDown,R=>{R.key==="Escape"&&(s==null||s(R.nativeEvent),R.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,A()))}),onPointerDown:ne(e.onPointerDown,R=>{R.button===0&&(x.current={x:R.clientX,y:R.clientY})}),onPointerMove:ne(e.onPointerMove,R=>{if(!x.current)return;const U=R.clientX-x.current.x,L=R.clientY-x.current.y,V=!!S.current,j=["left","right"].includes(m.swipeDirection),H=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,se=j?H(0,U):0,pe=j?0:H(0,L),W=R.pointerType==="touch"?10:2,Y={x:se,y:pe},F={originalEvent:R,delta:Y};V?(S.current=Y,ym(N1e,d,F,{discrete:!1})):x9(Y,m.swipeDirection,W)?(S.current=Y,ym(D1e,u,F,{discrete:!1}),R.target.setPointerCapture(R.pointerId)):(Math.abs(U)>W||Math.abs(L)>W)&&(x.current=null)}),onPointerUp:ne(e.onPointerUp,R=>{const U=S.current,L=R.target;if(L.hasPointerCapture(R.pointerId)&&L.releasePointerCapture(R.pointerId),S.current=null,x.current=null,U){const V=R.currentTarget,j={originalEvent:R,delta:U};x9(U,m.swipeDirection,m.swipeThreshold)?ym(I1e,p,j,{discrete:!0}):ym($1e,f,j,{discrete:!0}),V.addEventListener("click",H=>H.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),B1e=e=>{const{__scopeToast:t,children:n,...r}=e,o=vm(Ld,t),[i,a]=g.useState(!1),[s,l]=g.useState(!1);return q1e(()=>a(!0)),g.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:b.jsx(Sa,{asChild:!0,children:b.jsx(Xg,{...r,children:i&&b.jsxs(b.Fragment,{children:[o.label," ",n]})})})},j1e="ToastTitle",p9=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return b.jsx(ye.div,{...r,ref:t})});p9.displayName=j1e;var z1e="ToastDescription",g9=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return b.jsx(ye.div,{...r,ref:t})});g9.displayName=z1e;var m9="ToastAction",v9=g.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?b.jsx(b9,{altText:n,asChild:!0,children:b.jsx(NS,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${m9}\`. Expected non-empty \`string\`.`),null)});v9.displayName=m9;var y9="ToastClose",NS=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=F1e(y9,n);return b.jsx(b9,{asChild:!0,children:b.jsx(ye.button,{type:"button",...r,ref:t,onClick:ne(e.onClick,o.onClose)})})});NS.displayName=y9;var b9=g.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return b.jsx(ye.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function w9(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),V1e(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...w9(r))}}),t}function ym(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Tc(o,i):o.dispatchEvent(i)}var x9=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function q1e(e=()=>{}){const t=ht(e);At(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function V1e(e){return e.nodeType===e.ELEMENT_NODE}function U1e(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 $S(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var H1e=c9,S9=d9,C9=h9,E9=p9,P9=g9,O9=v9,T9=NS;const _9=H1e,IS=g.forwardRef(({className:e,...t},n)=>b.jsx(S9,{ref:n,className:q("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));IS.displayName=S9.displayName;const W1e=ei("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground",success:"success group border-success bg-success text-success-foreground"}},defaultVariants:{variant:"default"}}),LS=g.forwardRef(({className:e,variant:t,...n},r)=>b.jsx(C9,{ref:r,className:q(W1e({variant:t}),e),...n}));LS.displayName=C9.displayName;const M9=g.forwardRef(({className:e,...t},n)=>b.jsx(O9,{ref:n,className:q("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));M9.displayName=O9.displayName;const FS=g.forwardRef(({className:e,...t},n)=>b.jsx(T9,{ref:n,className:q("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:b.jsx(Eh,{className:"h-4 w-4"})}));FS.displayName=T9.displayName;const RS=g.forwardRef(({className:e,...t},n)=>b.jsx(E9,{ref:n,className:q("text-sm font-semibold [&+div]:text-xs",e),...t}));RS.displayName=E9.displayName;const BS=g.forwardRef(({className:e,...t},n)=>b.jsx(P9,{ref:n,className:q("text-sm opacity-90",e),...t}));BS.displayName=P9.displayName;const K1e=1,G1e=1e6;let jS=0;function Y1e(){return jS=(jS+1)%Number.MAX_SAFE_INTEGER,jS.toString()}const zS=new Map,k9=e=>{if(zS.has(e))return;const t=setTimeout(()=>{zS.delete(e),Fd({type:"REMOVE_TOAST",toastId:e})},G1e);zS.set(e,t)},A9=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,K1e)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?k9(n):e.toasts.forEach(r=>{k9(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},bm=[];let wm={toasts:[]};function Fd(e){wm=A9(wm,e),bm.forEach(t=>{t(wm)})}function D9({...e}){const t=Y1e(),n=o=>Fd({type:"UPDATE_TOAST",toast:{...o,id:t}}),r=()=>Fd({type:"DISMISS_TOAST",toastId:t});return Fd({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function N9(){const[e,t]=g.useState(wm);return g.useEffect(()=>(bm.push(t),()=>{const n=bm.indexOf(t);n>-1&&bm.splice(n,1)}),[e]),{...e,toast:D9,dismiss:n=>Fd({type:"DISMISS_TOAST",toastId:n})}}function X1e(){const{toasts:e}=N9();return b.jsxs(_9,{children:[e.map(function({id:t,title:n,description:r,action:o,...i}){return b.jsxs(LS,{...i,className:"shadow-lg pointer-events-auto",children:[b.jsxs("div",{className:"grid gap-1",children:[n&&b.jsx(RS,{children:n}),r&&b.jsx(BS,{children:r})]}),o,b.jsx(FS,{})]},t)}),b.jsx(IS,{style:{position:"fixed",bottom:"10px"}})]})}var $9="Toggle",qS=g.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:o,...i}=e,[a,s]=Ot({prop:n,onChange:o,defaultProp:r??!1,caller:$9});return b.jsx(ye.button,{type:"button","aria-pressed":a,"data-state":a?"on":"off","data-disabled":e.disabled?"":void 0,...i,ref:t,onClick:ne(e.onClick,()=>{e.disabled||s(!a)})})});qS.displayName=$9;var I9=qS;const VS=ei("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),L9=g.forwardRef(({className:e,variant:t,size:n,...r},o)=>b.jsx(I9,{ref:o,className:q(VS({variant:t,size:n,className:e})),...r}));L9.displayName=I9.displayName;var ia="ToggleGroup",[F9]=kt(ia,[Lo]),R9=Lo(),US=O.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const o=r;return b.jsx(Q1e,{...o,ref:t})}if(n==="multiple"){const o=r;return b.jsx(Z1e,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${ia}\``)});US.displayName=ia;var[B9,j9]=F9(ia),Q1e=O.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...i}=e,[a,s]=Ot({prop:n,defaultProp:r??"",onChange:o,caller:ia});return b.jsx(B9,{scope:e.__scopeToggleGroup,type:"single",value:O.useMemo(()=>a?[a]:[],[a]),onItemActivate:s,onItemDeactivate:O.useCallback(()=>s(""),[s]),children:b.jsx(z9,{...i,ref:t})})}),Z1e=O.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...i}=e,[a,s]=Ot({prop:n,defaultProp:r??[],onChange:o,caller:ia}),l=O.useCallback(u=>s((d=[])=>[...d,u]),[s]),c=O.useCallback(u=>s((d=[])=>d.filter(f=>f!==u)),[s]);return b.jsx(B9,{scope:e.__scopeToggleGroup,type:"multiple",value:a,onItemActivate:l,onItemDeactivate:c,children:b.jsx(z9,{...i,ref:t})})});US.displayName=ia;var[J1e,exe]=F9(ia),z9=O.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:i,dir:a,loop:s=!0,...l}=e,c=R9(n),u=Wr(a),d={role:"group",dir:u,...l};return b.jsx(J1e,{scope:n,rovingFocus:o,disabled:r,children:o?b.jsx(ld,{asChild:!0,...c,orientation:i,dir:u,loop:s,children:b.jsx(ye.div,{...d,ref:t})}):b.jsx(ye.div,{...d,ref:t})})}),xm="ToggleGroupItem",q9=O.forwardRef((e,t)=>{const n=j9(xm,e.__scopeToggleGroup),r=exe(xm,e.__scopeToggleGroup),o=R9(e.__scopeToggleGroup),i=n.value.includes(e.value),a=r.disabled||e.disabled,s={...e,pressed:i,disabled:a},l=O.useRef(null);return r.rovingFocus?b.jsx(cd,{asChild:!0,...o,focusable:!a,active:i,ref:l,children:b.jsx(V9,{...s,ref:t})}):b.jsx(V9,{...s,ref:t})});q9.displayName=xm;var V9=O.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,i=j9(xm,n),a={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},s=i.type==="single"?a:void 0;return b.jsx(qS,{...s,...o,ref:t,onPressedChange:l=>{l?i.onItemActivate(r):i.onItemDeactivate(r)}})}),U9=US,H9=q9;const W9=g.createContext({size:"default",variant:"default"}),K9=g.forwardRef(({className:e,variant:t,size:n,children:r,...o},i)=>b.jsx(U9,{ref:i,className:q("flex items-center justify-center gap-1",e),...o,children:b.jsx(W9.Provider,{value:{variant:t,size:n},children:r})}));K9.displayName=U9.displayName;const G9=g.forwardRef(({className:e,children:t,variant:n,size:r,...o},i)=>{const a=g.useContext(W9);return b.jsx(H9,{ref:i,className:q(VS({variant:a.variant||n,size:a.size||r}),e),...o,children:t})});G9.displayName=H9.displayName;const txe=({children:e,variant:t="primary",size:n="medium",loading:r=!1,disabled:o,className:i="",...a})=>{const l=`btn btn--${t} btn--${n} ${i}`.trim();return b.jsx("button",{className:l,disabled:o||r,...a,children:r?b.jsx("span",{className:"btn__spinner",children:"⏳"}):e})},nxe=({title:e,children:t,footer:n,className:r="",elevation:o="medium"})=>{const i="card",a=`${i} ${i}--${o} ${r}`.trim();return b.jsxs("div",{className:a,children:[e&&b.jsx("div",{className:"card__header",children:b.jsx("h3",{className:"card__title",children:e})}),b.jsx("div",{className:"card__body",children:t}),n&&b.jsx("div",{className:"card__footer",children:n})]})},Y9=O.createContext(void 0),rxe=({children:e,initialSidebarOpen:t=!1,initialTheme:n="light"})=>{const[r,o]=O.useState(t),[i,a]=O.useState(n),c={sidebarOpen:r,toggleSidebar:()=>{o(u=>!u)},theme:i,toggleTheme:()=>{a(u=>u==="light"?"dark":"light")},setSidebarOpen:o,setTheme:a};return b.jsx(Y9.Provider,{value:c,children:e})},oxe=()=>{const e=O.useContext(Y9);if(e===void 0)throw new Error("useLayout must be used within a LayoutProvider");return e},ixe=({redirectTo:e="/login"})=>{var r;const t=Zv(),n=xo();return t!=null&&t.user&&((r=t==null?void 0:t.user)!=null&&r.verified)?b.jsx(LK,{}):b.jsx(IK,{to:e,state:{from:n},replace:!0})};function axe(){const{pathname:e}=xo();return O.useMemo(()=>e,[e])}function sxe(){const e=Vv();return O.useMemo(()=>({back:()=>e(-1),forward:()=>e(1),reload:()=>window.location.reload(),push:n=>e(n),replace:n=>e(n,{replace:!0})}),[e])}function X9(e,t){return function(){return e.apply(t,arguments)}}const{toString:lxe}=Object.prototype,{getPrototypeOf:HS}=Object,{iterator:Sm,toStringTag:Q9}=Symbol,Cm=(e=>t=>{const n=lxe.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),fo=e=>(e=e.toLowerCase(),t=>Cm(t)===e),Em=e=>t=>typeof t===e,{isArray:Vl}=Array,Ul=Em("undefined");function Rd(e){return e!==null&&!Ul(e)&&e.constructor!==null&&!Ul(e.constructor)&&Jn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Z9=fo("ArrayBuffer");function cxe(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Z9(e.buffer),t}const uxe=Em("string"),Jn=Em("function"),J9=Em("number"),Bd=e=>e!==null&&typeof e=="object",dxe=e=>e===!0||e===!1,Pm=e=>{if(Cm(e)!=="object")return!1;const t=HS(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Q9 in e)&&!(Sm in e)},fxe=e=>{if(!Bd(e)||Rd(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},hxe=fo("Date"),pxe=fo("File"),gxe=fo("Blob"),mxe=fo("FileList"),vxe=e=>Bd(e)&&Jn(e.pipe),yxe=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Jn(e.append)&&((t=Cm(e))==="formdata"||t==="object"&&Jn(e.toString)&&e.toString()==="[object FormData]"))},bxe=fo("URLSearchParams"),[wxe,xxe,Sxe,Cxe]=["ReadableStream","Request","Response","Headers"].map(fo),Exe=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function jd(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Vl(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(Rd(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length;let s;for(r=0;r<a;r++)s=i[r],t.call(null,e[s],s,e)}}function eB(e,t){if(Rd(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const cs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,tB=e=>!Ul(e)&&e!==cs;function WS(){const{caseless:e,skipUndefined:t}=tB(this)&&this||{},n={},r=(o,i)=>{const a=e&&eB(n,i)||i;Pm(n[a])&&Pm(o)?n[a]=WS(n[a],o):Pm(o)?n[a]=WS({},o):Vl(o)?n[a]=o.slice():(!t||!Ul(o))&&(n[a]=o)};for(let o=0,i=arguments.length;o<i;o++)arguments[o]&&jd(arguments[o],r);return n}const Pxe=(e,t,n,{allOwnKeys:r}={})=>(jd(t,(o,i)=>{n&&Jn(o)?e[i]=X9(o,n):e[i]=o},{allOwnKeys:r}),e),Oxe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Txe=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},_xe=(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&HS(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Mxe=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},kxe=e=>{if(!e)return null;if(Vl(e))return e;let t=e.length;if(!J9(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Axe=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&HS(Uint8Array)),Dxe=(e,t)=>{const r=(e&&e[Sm]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},Nxe=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},$xe=fo("HTMLFormElement"),Ixe=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),nB=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Lxe=fo("RegExp"),rB=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};jd(n,(o,i)=>{let a;(a=t(o,i,e))!==!1&&(r[i]=a||o)}),Object.defineProperties(e,r)},Fxe=e=>{rB(e,(t,n)=>{if(Jn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Jn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Rxe=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return Vl(e)?r(e):r(String(e).split(t)),n},Bxe=()=>{},jxe=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function zxe(e){return!!(e&&Jn(e.append)&&e[Q9]==="FormData"&&e[Sm])}const qxe=e=>{const t=new Array(10),n=(r,o)=>{if(Bd(r)){if(t.indexOf(r)>=0)return;if(Rd(r))return r;if(!("toJSON"in r)){t[o]=r;const i=Vl(r)?[]:{};return jd(r,(a,s)=>{const l=n(a,o+1);!Ul(l)&&(i[s]=l)}),t[o]=void 0,i}}return r};return n(e,0)},Vxe=fo("AsyncFunction"),Uxe=e=>e&&(Bd(e)||Jn(e))&&Jn(e.then)&&Jn(e.catch),oB=((e,t)=>e?setImmediate:t?((n,r)=>(cs.addEventListener("message",({source:o,data:i})=>{o===cs&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),cs.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Jn(cs.postMessage)),Hxe=typeof queueMicrotask<"u"?queueMicrotask.bind(cs):typeof process<"u"&&process.nextTick||oB,te={isArray:Vl,isArrayBuffer:Z9,isBuffer:Rd,isFormData:yxe,isArrayBufferView:cxe,isString:uxe,isNumber:J9,isBoolean:dxe,isObject:Bd,isPlainObject:Pm,isEmptyObject:fxe,isReadableStream:wxe,isRequest:xxe,isResponse:Sxe,isHeaders:Cxe,isUndefined:Ul,isDate:hxe,isFile:pxe,isBlob:gxe,isRegExp:Lxe,isFunction:Jn,isStream:vxe,isURLSearchParams:bxe,isTypedArray:Axe,isFileList:mxe,forEach:jd,merge:WS,extend:Pxe,trim:Exe,stripBOM:Oxe,inherits:Txe,toFlatObject:_xe,kindOf:Cm,kindOfTest:fo,endsWith:Mxe,toArray:kxe,forEachEntry:Dxe,matchAll:Nxe,isHTMLForm:$xe,hasOwnProperty:nB,hasOwnProp:nB,reduceDescriptors:rB,freezeMethods:Fxe,toObjectSet:Rxe,toCamelCase:Ixe,noop:Bxe,toFiniteNumber:jxe,findKey:eB,global:cs,isContextDefined:tB,isSpecCompliantForm:zxe,toJSONObject:qxe,isAsyncFn:Vxe,isThenable:Uxe,setImmediate:oB,asap:Hxe,isIterable:e=>e!=null&&Jn(e[Sm])};function tt(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}te.inherits(tt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:te.toJSONObject(this.config),code:this.code,status:this.status}}});const iB=tt.prototype,aB={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{aB[e]={value:e}}),Object.defineProperties(tt,aB),Object.defineProperty(iB,"isAxiosError",{value:!0}),tt.from=(e,t,n,r,o,i)=>{const a=Object.create(iB);te.toFlatObject(e,a,function(u){return u!==Error.prototype},c=>c!=="isAxiosError");const s=e&&e.message?e.message:"Error",l=t==null&&e?e.code:t;return tt.call(a,s,l,n,r,o),e&&a.cause==null&&Object.defineProperty(a,"cause",{value:e,configurable:!0}),a.name=e&&e.name||"Error",i&&Object.assign(a,i),a};const Wxe=null;function KS(e){return te.isPlainObject(e)||te.isArray(e)}function sB(e){return te.endsWith(e,"[]")?e.slice(0,-2):e}function lB(e,t,n){return e?e.concat(t).map(function(o,i){return o=sB(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function Kxe(e){return te.isArray(e)&&!e.some(KS)}const Gxe=te.toFlatObject(te,{},null,function(t){return/^is[A-Z]/.test(t)});function Om(e,t,n){if(!te.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=te.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,v){return!te.isUndefined(v[m])});const r=n.metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&te.isSpecCompliantForm(t);if(!te.isFunction(o))throw new TypeError("visitor must be a function");function c(h){if(h===null)return"";if(te.isDate(h))return h.toISOString();if(te.isBoolean(h))return h.toString();if(!l&&te.isBlob(h))throw new tt("Blob is not supported. Use a Buffer instead.");return te.isArrayBuffer(h)||te.isTypedArray(h)?l&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function u(h,m,v){let y=h;if(h&&!v&&typeof h=="object"){if(te.endsWith(m,"{}"))m=r?m:m.slice(0,-2),h=JSON.stringify(h);else if(te.isArray(h)&&Kxe(h)||(te.isFileList(h)||te.endsWith(m,"[]"))&&(y=te.toArray(h)))return m=sB(m),y.forEach(function(x,S){!(te.isUndefined(x)||x===null)&&t.append(a===!0?lB([m],S,i):a===null?m:m+"[]",c(x))}),!1}return KS(h)?!0:(t.append(lB(v,m,i),c(h)),!1)}const d=[],f=Object.assign(Gxe,{defaultVisitor:u,convertValue:c,isVisitable:KS});function p(h,m){if(!te.isUndefined(h)){if(d.indexOf(h)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(h),te.forEach(h,function(y,w){(!(te.isUndefined(y)||y===null)&&o.call(t,y,te.isString(w)?w.trim():w,m,f))===!0&&p(y,m?m.concat(w):[w])}),d.pop()}}if(!te.isObject(e))throw new TypeError("data must be an object");return p(e),t}function cB(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function GS(e,t){this._pairs=[],e&&Om(e,this,t)}const uB=GS.prototype;uB.append=function(t,n){this._pairs.push([t,n])},uB.toString=function(t){const n=t?function(r){return t.call(this,r,cB)}:cB;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Yxe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function dB(e,t,n){if(!t)return e;const r=n&&n.encode||Yxe;te.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(o?i=o(t,n):i=te.isURLSearchParams(t)?t.toString():new GS(t,n).toString(r),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class fB{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){te.forEach(this.handlers,function(r){r!==null&&t(r)})}}const hB={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Xxe={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:GS,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},YS=typeof window<"u"&&typeof document<"u",XS=typeof navigator=="object"&&navigator||void 0,Qxe=YS&&(!XS||["ReactNative","NativeScript","NS"].indexOf(XS.product)<0),Zxe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Jxe=YS&&window.location.href||"http://localhost",An={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:YS,hasStandardBrowserEnv:Qxe,hasStandardBrowserWebWorkerEnv:Zxe,navigator:XS,origin:Jxe},Symbol.toStringTag,{value:"Module"})),...Xxe};function eSe(e,t){return Om(e,new An.classes.URLSearchParams,{visitor:function(n,r,o,i){return An.isNode&&te.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function tSe(e){return te.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function nSe(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}function pB(e){function t(n,r,o,i){let a=n[i++];if(a==="__proto__")return!0;const s=Number.isFinite(+a),l=i>=n.length;return a=!a&&te.isArray(o)?o.length:a,l?(te.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!s):((!o[a]||!te.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],i)&&te.isArray(o[a])&&(o[a]=nSe(o[a])),!s)}if(te.isFormData(e)&&te.isFunction(e.entries)){const n={};return te.forEachEntry(e,(r,o)=>{t(tSe(r),o,n,0)}),n}return null}function rSe(e,t,n){if(te.isString(e))try{return(t||JSON.parse)(e),te.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const zd={transitional:hB,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=te.isObject(t);if(i&&te.isHTMLForm(t)&&(t=new FormData(t)),te.isFormData(t))return o?JSON.stringify(pB(t)):t;if(te.isArrayBuffer(t)||te.isBuffer(t)||te.isStream(t)||te.isFile(t)||te.isBlob(t)||te.isReadableStream(t))return t;if(te.isArrayBufferView(t))return t.buffer;if(te.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return eSe(t,this.formSerializer).toString();if((s=te.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Om(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),rSe(t)):t}],transformResponse:[function(t){const n=this.transitional||zd.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(te.isResponse(t)||te.isReadableStream(t))return t;if(t&&te.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(s){if(a)throw s.name==="SyntaxError"?tt.from(s,tt.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:An.classes.FormData,Blob:An.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};te.forEach(["delete","get","head","post","put","patch"],e=>{zd.headers[e]={}});const oSe=te.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),iSe=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
350
|
+
Defaulting to \`null\`.`}var H6=B6,i0e=z6;const W6=g.forwardRef(({className:e,value:t,...n},r)=>b.jsx(H6,{ref:r,className:q("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...n,children:b.jsx(i0e,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));W6.displayName=H6.displayName;var _d=(e=>(e.Manage="manage",e.Create="create",e.Read="read",e.Update="update",e.Delete="delete",e))(_d||{}),Md=(e=>(e.Undefined="d.e.f.a.u.l.t",e.Auth="auth",e.Users="users",e.UserGroups="user-groups",e.Clients="clients",e.Shared="shared",e.Reports="reports",e.Preferences="preferences",e.Locations="locations",e.IssueTypes="issue-types",e.Checkpoint="checkpoints",e.LocationShift="location",e.Employees="employees",e.EmployeeAvailabilities="employee-availabilities",e.EmployeeShift="employee-shifts",e.UserDevice="user-devices",e.EmployeeShift_SelfSchedule="employee-shifts/self-schedule",e.Map="map",e.Issue="issues",e))(Md||{}),K6=(e=>(e.Admin="admin",e.Manager="manager",e.Reader="reader",e.Client="client",e))(K6||{});const a0e=[{label:"Admin",value:"admin"},{label:"Manager",value:"manager"},{label:"Viewer",value:"reader"},{label:"Client",value:"client"}],G6={admin:{manage:{can:"all"},create:{can:"all"},read:{can:"all"},update:{can:"all"},delete:{can:"all"}},manager:{manage:{can:["users","preferences","clients","shared","issue-types","checkpoints","user-devices","reports","map","locations"]},create:{can:["users","preferences","clients","shared","issue-types","checkpoints","user-devices","reports","map","locations"]},read:{can:["users","preferences","clients","shared","issue-types","checkpoints","user-devices","reports","map","locations"]},update:{can:["users","preferences","clients","shared","issue-types","checkpoints","user-devices","reports","map","locations"]},delete:{can:["users","preferences","clients","shared","issue-types","checkpoints","user-devices","reports","map","locations"]}},reader:{read:{can:["users","preferences","clients","shared","locations","issue-types","checkpoints","user-devices"]}},client:{manage:{can:["users","preferences","clients","shared"]},create:{can:["users","preferences","clients","shared"]},read:{can:["users","preferences","clients","shared"]},update:{can:["users","preferences","clients","shared"]},delete:{can:["users","preferences","clients","shared"]}}},Y6=(e,t,n)=>{var r;for(const o of e){const i=G6[o];if(n==="d.e.f.a.u.l.t"||!i)return!1;const a=i[t];if(!a)return!1;if((a.can==="all"||a.can.includes(n))&&!((r=a.cannot)!=null&&r.includes(n)))return!0}return!1},tm=()=>{const{user:e}=Zv();return{isAllowed:(r,o)=>{if(o===Md.Auth)return!0;if(!e)return!1;const i=e.role;return Y6([i],r,o)},getResourceByUrl:r=>{const o=Object.entries(Md);for(const[,i]of o)if(r.startsWith("/"+i))return i;return Md.Undefined}}},s0e=({children:e,resource:t,action:n=_d.Read,fallback:r=null})=>{const{isAllowed:o}=tm();return o(n,t)?e:r},nm=e=>O.forwardRef((t,n)=>{const{isAllowed:r}=tm(),{accessedResource:o,accessAction:i=_d.Read,...a}=t;return r(i,o)?b.jsx(e,{ref:n,...a}):null}),l0e=({children:e,resource:t,fallback:n=null})=>{const{isAllowed:r}=tm();return r(_d.Update,t)?e:n},c0e=nm(lx),u0e=nm(Xv),d0e=nm(Xc);var Jx="Radio",[f0e,X6]=kt(Jx),[h0e,p0e]=f0e(Jx),Q6=g.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:i,disabled:a,value:s="on",onCheck:l,form:c,...u}=e,[d,f]=g.useState(null),p=je(t,v=>f(v)),h=g.useRef(!1),m=d?c||!!d.closest("form"):!0;return b.jsxs(h0e,{scope:n,checked:o,disabled:a,children:[b.jsx(ye.button,{type:"button",role:"radio","aria-checked":o,"data-state":t8(o),"data-disabled":a?"":void 0,disabled:a,value:s,...u,ref:p,onClick:ne(e.onClick,v=>{o||l==null||l(),m&&(h.current=v.isPropagationStopped(),h.current||v.stopPropagation())})}),m&&b.jsx(e8,{control:d,bubbles:!h.current,name:r,value:s,checked:o,required:i,disabled:a,form:c,style:{transform:"translateX(-100%)"}})]})});Q6.displayName=Jx;var Z6="RadioIndicator",J6=g.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,i=p0e(Z6,n);return b.jsx(Tt,{present:r||i.checked,children:b.jsx(ye.span,{"data-state":t8(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t})})});J6.displayName=Z6;var g0e="RadioBubbleInput",e8=g.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},i)=>{const a=g.useRef(null),s=je(a,i),l=wl(n),c=Ju(t);return g.useEffect(()=>{const u=a.current;if(!u)return;const d=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==n&&p){const h=new Event("click",{bubbles:r});p.call(u,n),u.dispatchEvent(h)}},[l,n,r]),b.jsx(ye.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:s,style:{...o.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});e8.displayName=g0e;function t8(e){return e?"checked":"unchecked"}var m0e=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],rm="RadioGroup",[v0e]=kt(rm,[Lo,X6]),n8=Lo(),r8=X6(),[y0e,b0e]=v0e(rm),o8=g.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:i,required:a=!1,disabled:s=!1,orientation:l,dir:c,loop:u=!0,onValueChange:d,...f}=e,p=n8(n),h=Wr(c),[m,v]=Ot({prop:i,defaultProp:o??null,onChange:d,caller:rm});return b.jsx(y0e,{scope:n,name:r,required:a,disabled:s,value:m,onValueChange:v,children:b.jsx(ld,{asChild:!0,...p,orientation:l,dir:h,loop:u,children:b.jsx(ye.div,{role:"radiogroup","aria-required":a,"aria-orientation":l,"data-disabled":s?"":void 0,dir:h,...f,ref:t})})})});o8.displayName=rm;var i8="RadioGroupItem",a8=g.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,i=b0e(i8,n),a=i.disabled||r,s=n8(n),l=r8(n),c=g.useRef(null),u=je(t,c),d=i.value===o.value,f=g.useRef(!1);return g.useEffect(()=>{const p=m=>{m0e.includes(m.key)&&(f.current=!0)},h=()=>f.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",h),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",h)}},[]),b.jsx(cd,{asChild:!0,...s,focusable:!a,active:d,children:b.jsx(Q6,{disabled:a,required:i.required,checked:d,...l,...o,name:i.name,ref:u,onCheck:()=>i.onValueChange(o.value),onKeyDown:ne(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:ne(o.onFocus,()=>{var p;f.current&&((p=c.current)==null||p.click())})})})});a8.displayName=i8;var w0e="RadioGroupIndicator",s8=g.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=r8(n);return b.jsx(J6,{...o,...r,ref:t})});s8.displayName=w0e;var l8=o8,c8=a8,x0e=s8;const u8=g.forwardRef(({className:e,...t},n)=>b.jsx(l8,{className:q("grid gap-2",e),...t,ref:n}));u8.displayName=l8.displayName;const d8=g.forwardRef(({className:e,...t},n)=>b.jsx(c8,{ref:n,className:q("aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:b.jsx(x0e,{className:"flex items-center justify-center",children:b.jsx(yy,{className:"h-3.5 w-3.5 fill-primary"})})}));d8.displayName=c8.displayName;function Ct(e,t="Assertion error"){if(!e)throw Error(t)}function Ll({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 eS(e,t){return t.sort(e==="horizontal"?S0e:C0e)}function S0e(e,t){const n=e.element.offsetLeft-t.element.offsetLeft;return n!==0?n:e.element.offsetWidth-t.element.offsetWidth}function C0e(e,t){const n=e.element.offsetTop-t.element.offsetTop;return n!==0?n:e.element.offsetHeight-t.element.offsetHeight}function f8(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function h8(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 E0e({orientation:e,rects:t,targetRect:n}){const r={x:n.x+n.width/2,y:n.y+n.height/2};let o,i=Number.MAX_VALUE;for(const a of t){const{x:s,y:l}=h8(r,a),c=e==="horizontal"?s:l;c<i&&(i=c,o=a)}return Ct(o,"No rect found"),o}function p8(e){const{element:t,orientation:n,panels:r,separators:o}=e,i=eS(n,Array.from(t.children).filter(f8).map(u=>({element:u}))).map(({element:u})=>u),a=[];let s=!1,l,c=[];for(const u of i)if(u.hasAttribute("data-panel")){const d=r.find(f=>f.element===u);if(d){if(l){const f=l.element.getBoundingClientRect(),p=u.getBoundingClientRect();let h;if(s){const m=n==="horizontal"?new DOMRect(f.right,f.top,0,f.height):new DOMRect(f.left,f.bottom,f.width,0),v=n==="horizontal"?new DOMRect(p.left,p.top,0,p.height):new DOMRect(p.left,p.top,p.width,0);switch(c.length){case 0:{h=[m,v];break}case 1:{const y=c[0],w=E0e({orientation:n,rects:[f,p],targetRect:y.element.getBoundingClientRect()});h=[y,w===f?v:m];break}default:{h=c;break}}}else c.length?h=c:h=[n==="horizontal"?new DOMRect(f.right,p.top,p.left-f.right,p.height):new DOMRect(p.left,f.bottom,p.width,p.top-f.bottom)];for(const m of h)a.push({group:e,groupSize:Ll({group:e}),panels:[l,d],separator:"width"in m?void 0:m,rect:"width"in m?m:m.element.getBoundingClientRect()})}s=!1,l=d,c=[]}}else if(u.hasAttribute("data-separator")){const d=o.find(f=>f.element===u);d?c.push(d):(l=void 0,c=[])}else s=!0;return a}function P0e(e,t){const n=getComputedStyle(e),r=parseFloat(n.fontSize);return t*r}function O0e(e,t){const n=getComputedStyle(e.ownerDocument.body),r=parseFloat(n.fontSize);return t*r}function T0e(e){return e/100*window.innerHeight}function _0e(e){return e/100*window.innerWidth}function M0e(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 om({groupSize:e,panelElement:t,styleProp:n}){let r;const[o,i]=M0e(n);switch(i){case"%":{r=o/100*e;break}case"px":{r=o;break}case"rem":{r=O0e(t,o);break}case"em":{r=P0e(t,o);break}case"vh":{r=T0e(o);break}case"vw":{r=_0e(o);break}}return r}function co(e){return parseFloat(e.toFixed(3))}function g8(e){const{panels:t}=e,n=Ll({group:e});return n===0?t.map(r=>({collapsedSize:0,collapsible:r.panelConstraints.collapsible===!0,defaultSize:void 0,minSize:0,maxSize:100,panelId:r.id})):t.map(r=>{const{element:o,panelConstraints:i}=r;let a=0;if(i.collapsedSize){const u=om({groupSize:n,panelElement:o,styleProp:i.collapsedSize});a=co(u/n*100)}let s;if(i.defaultSize){const u=om({groupSize:n,panelElement:o,styleProp:i.defaultSize});s=co(u/n*100)}let l=0;if(i.minSize){const u=om({groupSize:n,panelElement:o,styleProp:i.minSize});l=co(u/n*100)}let c=100;if(i.maxSize){const u=om({groupSize:n,panelElement:o,styleProp:i.maxSize});c=co(u/n*100)}return{collapsedSize:a,collapsible:i.collapsible===!0,defaultSize:s,minSize:l,maxSize:c,panelId:r.id}})}class k0e{constructor(){Le(this,va,{})}addListener(t,n){const r=K(this,va)[t];return r===void 0?K(this,va)[t]=[n]:r.includes(n)||r.push(n),()=>{this.removeListener(t,n)}}emit(t,n){const r=K(this,va)[t];if(r!==void 0)if(r.length===1)r[0].call(null,n);else{let o=!1,i=null;const a=Array.from(r);for(let s=0;s<a.length;s++){const l=a[s];try{l.call(null,n)}catch(c){i===null&&(o=!0,i=c)}}if(o)throw i}}removeAllListeners(){Pe(this,va,{})}removeListener(t,n){const r=K(this,va)[t];if(r!==void 0){const o=r.indexOf(n);o>=0&&r.splice(o,1)}}}va=new WeakMap;function Vn(e,t,n=0){return Math.abs(co(e)-co(t))<=n}let $r={cursorFlags:0,interactionState:{state:"inactive"},mountedGroups:new Map};const rs=new k0e;function Ro(){return $r}function Ir(e){const t=typeof e=="function"?e($r):e;if($r===t)return $r;const n=$r;return $r={...$r,...t},t.cursorFlags!==void 0&&rs.emit("cursorFlagsChange",$r.cursorFlags),t.interactionState!==void 0&&rs.emit("interactionStateChange",$r.interactionState),t.mountedGroups!==void 0&&($r.mountedGroups.forEach((r,o)=>{r.derivedPanelConstraints.forEach(i=>{if(i.collapsible){const{layout:a}=n.mountedGroups.get(o)??{};if(a){const s=Vn(i.collapsedSize,r.layout[i.panelId]),l=Vn(i.collapsedSize,a[i.panelId]);s&&!l&&(o.inMemoryLastExpandedPanelSizes[i.panelId]=a[i.panelId])}}})}),rs.emit("mountedGroupsChange",$r.mountedGroups)),$r}function A0e(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 kd(e,t){return Vn(e,t)?0:e>t?1:-1}function Fl({panelConstraints:e,size:t}){const{collapsedSize:n=0,collapsible:r,maxSize:o=100,minSize:i=0}=e;if(kd(t,i)<0)if(r){const a=(n+i)/2;kd(t,a)<0?t=n:t=i}else t=i;return t=Math.min(o,t),t=co(t),t}function Ad({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:o,trigger:i}){if(Vn(e,0))return t;const a=Object.values(t),s=Object.values(o),l=[...a],[c,u]=r;Ct(c!=null,"Invalid first pivot index"),Ct(u!=null,"Invalid second pivot index");let d=0;if(i==="keyboard"){{const h=e<0?u:c,m=n[h];Ct(m,`Panel constraints not found for index ${h}`);const{collapsedSize:v=0,collapsible:y,minSize:w=0}=m;if(y){const x=a[h];if(Ct(x!=null,`Previous layout not found for panel index ${h}`),Vn(x,v)){const S=w-x;kd(S,Math.abs(e))>0&&(e=e<0?0-S:S)}}}{const h=e<0?c:u,m=n[h];Ct(m,`No panel constraints found for index ${h}`);const{collapsedSize:v=0,collapsible:y,minSize:w=0}=m;if(y){const x=a[h];if(Ct(x!=null,`Previous layout not found for panel index ${h}`),Vn(x,w)){const S=x-v;kd(S,Math.abs(e))>0&&(e=e<0?0-S:S)}}}}{const h=e<0?1:-1;let m=e<0?u:c,v=0;for(;;){const w=a[m];Ct(w!=null,`Previous layout not found for panel index ${m}`);const x=Fl({panelConstraints:n[m],size:100})-w;if(v+=x,m+=h,m<0||m>=n.length)break}const y=Math.min(Math.abs(e),Math.abs(v));e=e<0?0-y:y}{let h=e<0?c:u;for(;h>=0&&h<n.length;){const m=Math.abs(e)-Math.abs(d),v=a[h];Ct(v!=null,`Previous layout not found for panel index ${h}`);const y=v-m,w=Fl({panelConstraints:n[h],size:y});if(!Vn(v,w)&&(d+=v-w,l[h]=w,d.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?h--:h++}}if(A0e(s,l))return o;{const h=e<0?u:c,m=a[h];Ct(m!=null,`Previous layout not found for panel index ${h}`);const v=m+d,y=Fl({panelConstraints:n[h],size:v});if(l[h]=y,!Vn(y,v)){let w=v-y,x=e<0?u:c;for(;x>=0&&x<n.length;){const S=l[x];Ct(S!=null,`Previous layout not found for panel index ${x}`);const C=S+w,E=Fl({panelConstraints:n[x],size:C});if(Vn(S,E)||(w-=E-S,l[x]=E),Vn(w,0))break;e>0?x--:x++}}}const f=Object.values(l).reduce((h,m)=>m+h,0);if(!Vn(f,100,.1))return o;const p=Object.keys(o);return l.reduce((h,m,v)=>(h[p[v]]=m,h),{})}function im(e){const t=e.parentElement;Ct(t,"Parent group element not found");const{mountedGroups:n}=Ro();for(const[r]of n)if(r.element===t)return r;throw Error("Could not find parent Group for separator element")}function Rl(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(t[n]===void 0||kd(e[n],t[n])!==0)return!1;return!0}function os({layout:e,panelConstraints:t}){const n=[...Object.values(e)],r=n.reduce((a,s)=>a+s,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(a=>`${a}%`).join(", ")}`);if(!Vn(r,100)&&n.length>0)for(let a=0;a<t.length;a++){const s=n[a];Ct(s!=null,`No layout data found for index ${a}`);const l=100/r*s;n[a]=l}let o=0;for(let a=0;a<t.length;a++){const s=n[a];Ct(s!=null,`No layout data found for index ${a}`);const l=Fl({panelConstraints:t[a],size:s});s!=l&&(o+=s-l,n[a]=l)}if(!Vn(o,0))for(let a=0;a<t.length;a++){const s=n[a];Ct(s!=null,`No layout data found for index ${a}`);const l=s+o,c=Fl({panelConstraints:t[a],size:l});if(s!==c&&(o-=c-s,n[a]=c,Vn(o,0)))break}const i=Object.keys(e);return n.reduce((a,s,l)=>(a[i[l]]=s,a),{})}function m8({groupId:e}){const t=()=>{const{mountedGroups:n}=Ro();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:i,layout:a,separatorToPanels:s}=t(),l=os({layout:n,panelConstraints:o});return r?a:(Rl(a,l)||Ir(c=>({mountedGroups:new Map(c.mountedGroups).set(i,{defaultLayoutDeferred:r,derivedPanelConstraints:o,layout:l,separatorToPanels:s})})),l)}}}function v8(e){const{mountedGroups:t}=Ro(),n=t.get(e);return Ct(n,`Mounted Group ${e.id} not found`),n}function is(e,t){const n=im(e),r=v8(n),o=n.separators.find(u=>u.element===e);Ct(o,"Matching separator not found");const i=r.separatorToPanels.get(o);Ct(i,"Matching panels not found");const a=i.map(u=>n.panels.indexOf(u)),s=m8({groupId:n.id}).getLayout(),l=Ad({delta:t,initialLayout:s,panelConstraints:r.derivedPanelConstraints,pivotIndices:a,prevLayout:s,trigger:"keyboard"}),c=os({layout:l,panelConstraints:r.derivedPanelConstraints});Rl(s,c)||Ir(u=>({mountedGroups:new Map(u.mountedGroups).set(n,{defaultLayoutDeferred:r.defaultLayoutDeferred,derivedPanelConstraints:r.derivedPanelConstraints,layout:c,separatorToPanels:r.separatorToPanels})}))}function y8(e){if(e.defaultPrevented)return;const t=e.currentTarget,n=im(t);if(!n.disabled)switch(e.key){case"ArrowDown":{e.preventDefault(),n.orientation==="vertical"&&is(t,5);break}case"ArrowLeft":{e.preventDefault(),n.orientation==="horizontal"&&is(t,-5);break}case"ArrowRight":{e.preventDefault(),n.orientation==="horizontal"&&is(t,5);break}case"ArrowUp":{e.preventDefault(),n.orientation==="vertical"&&is(t,-5);break}case"End":{e.preventDefault(),is(t,100);break}case"Enter":{e.preventDefault();const r=im(t),{derivedPanelConstraints:o,layout:i,separatorToPanels:a}=v8(r),s=r.separators.find(d=>d.element===t);Ct(s,"Matching separator not found");const l=a.get(s);Ct(l,"Matching panels not found");const c=l[0],u=o.find(d=>d.panelId===c.id);if(Ct(u,"Panel metadata not found"),u.collapsible){const d=i[c.id],f=u.collapsedSize===d?r.inMemoryLastExpandedPanelSizes[c.id]??u.minSize:u.collapsedSize;is(t,f-d)}break}case"F6":{e.preventDefault();const r=im(t).separators.map(a=>a.element),o=Array.from(r).findIndex(a=>a===e.currentTarget);Ct(o!==null,"Index not found");const i=e.shiftKey?o>0?o-1:r.length-1:o+1<r.length?o+1:0;r[i].focus();break}case"Home":{e.preventDefault(),is(t,-100);break}}}const D0e=e=>e,tS=()=>{},b8=1,w8=2,x8=4,S8=8,C8={coarse:10,precise:5};function N0e(e,t,n){let r,o={x:1/0,y:1/0};for(const i of t){const a=h8(n,i.rect);switch(e){case"horizontal":{a.x<=o.x&&(r=i,o=a);break}case"vertical":{a.y<=o.y&&(r=i,o=a);break}}}return r?{distance:o,hitRegion:r}:void 0}let am;function $0e(){return am===void 0&&(typeof matchMedia=="function"?am=!!matchMedia("(pointer:coarse)").matches:am=!1),am}function I0e(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function L0e(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:O8(e),b:O8(t)};let r;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;Ct(r,"Stacking order can only be calculated for elements with a common ancestor");const o={a:P8(E8(n.a)),b:P8(E8(n.b))};if(o.a===o.b){const i=r.childNodes,a={a:n.a.at(-1),b:n.b.at(-1)};let s=i.length;for(;s--;){const l=i[s];if(l===a.a)return 1;if(l===a.b)return-1}}return Math.sign(o.a-o.b)}const F0e=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function R0e(e){const t=getComputedStyle(T8(e)??e).display;return t==="flex"||t==="inline-flex"}function B0e(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||R0e(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"||F0e.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function E8(e){let t=e.length;for(;t--;){const n=e[t];if(Ct(n,"Missing node"),B0e(n))return n}return null}function P8(e){return e&&Number(getComputedStyle(e).zIndex)||0}function O8(e){const t=[];for(;e;)t.push(e),e=T8(e);return t}function T8(e){const{parentNode:t}=e;return I0e(t)?t.host:t}function j0e(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 z0e({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!f8(n)||n.contains(e)||e.contains(n))return!0;if(L0e(n,e)>0){let r=n;for(;r;){if(r.contains(e))return!0;if(j0e(r.getBoundingClientRect(),t))return!1;r=r.parentElement}}return!0}function _8(e,t){const n=[];return t.forEach((r,o)=>{if(o.disabled)return;const i=$0e()?C8.coarse:C8.precise,a=p8(o),s=N0e(o.orientation,a,{x:e.clientX,y:e.clientY});s&&s.distance.x<=i&&s.distance.y<=i&&z0e({groupElement:o.element,hitRegion:s.hitRegion.rect,pointerEventTarget:e.target})&&n.push(s.hitRegion)}),n}function M8(e){if(e.defaultPrevented)return;const{mountedGroups:t}=Ro(),n=_8(e,t),r=new Set,o=new Set,i=new Set,a=new Map;let s=!1;n.forEach(l=>{r.add(l.group),l.panels.forEach(u=>{o.add(u)}),l.separator&&(i.add(l.separator),s||(s=!0,l.separator.element.focus()));const c=t.get(l.group);c&&a.set(l.group,c.layout)}),Ir({interactionState:{hitRegions:n,initialLayoutMap:a,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:"active"}}),n.length&&e.preventDefault()}function q0e({cursorFlags:e,groups:t,state:n}){let r=0,o=0;switch(n){case"active":case"hover":t.forEach(i=>{if(!i.disableCursor)switch(i.orientation){case"horizontal":{r++;break}case"vertical":{o++;break}}})}if(r===0&&o===0)return null;switch(n){case"active":{const i=(e&b8)!==0,a=(e&w8)!==0,s=(e&x8)!==0,l=(e&S8)!==0;if(e){if(i)return s?"se-resize":l?"ne-resize":"e-resize";if(a)return s?"sw-resize":l?"nw-resize":"w-resize";if(s)return"s-resize";if(l)return"n-resize"}break}}return r>0&&o>0?"move":r>0?"ew-resize":"ns-resize"}const k8=new WeakMap;function nS(e){if(e.defaultView===null)return;let{prevStyle:t,styleSheet:n}=k8.get(e)??{};n===void 0&&(n=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets=[n]);const{cursorFlags:r,interactionState:o}=Ro();switch(o.state){case"active":case"hover":{const i=q0e({cursorFlags:r,groups:o.hitRegions.map(s=>s.group),state:o.state}),a=`*{cursor: ${i} !important; ${o.state==="active"?"touch-action: none;":""} }`;if(t===a)return;t=a,i?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}}k8.set(e,{prevStyle:t,styleSheet:n})}function A8({document:e,event:t,hitRegions:n,initialLayoutMap:r,mountedGroups:o,pointerDownAtPoint:i}){let a=0;const s=new Map(o);n.forEach(l=>{const{group:c,groupSize:u}=l,{disableCursor:d,orientation:f,panels:p}=c;let h=0;i?f==="horizontal"?h=(t.clientX-i.x)/u*100:h=(t.clientY-i.y)/u*100:f==="horizontal"?h=t.clientX<0?-100:100:h=t.clientY<0?-100:100;const m=r.get(c),{defaultLayoutDeferred:v,derivedPanelConstraints:y,layout:w,separatorToPanels:x}=o.get(c)??{defaultLayoutDeferred:!1};if(y&&m&&w&&x){const S=Ad({delta:h,initialLayout:m,panelConstraints:y,pivotIndices:l.panels.map(C=>p.indexOf(C)),prevLayout:w,trigger:"mouse-or-touch"});if(Rl(S,w)){if(h!==0&&!d)switch(f){case"horizontal":{a|=h<0?b8:w8;break}case"vertical":{a|=h<0?x8:S8;break}}}else{s.set(l.group,{defaultLayoutDeferred:v,derivedPanelConstraints:y,layout:S,separatorToPanels:x});const C=l.group.panels.map(({id:E})=>E).join(",");l.group.inMemoryLayouts[C]=S}}}),Ir({cursorFlags:a,mountedGroups:s}),nS(e)}function D8(e){const{interactionState:t,mountedGroups:n}=Ro();switch(t.state){case"active":A8({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n})}}function N8(e){if(e.defaultPrevented)return;const{interactionState:t,mountedGroups:n}=Ro();switch(t.state){case"active":{if(e.buttons===0){Ir(r=>r.interactionState.state==="inactive"?r:{cursorFlags:0,interactionState:{state:"inactive"}});return}A8({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n,pointerDownAtPoint:t.pointerDownAtPoint});break}default:{const r=_8(e,n);r.length===0?t.state!=="inactive"&&Ir({interactionState:{state:"inactive"}}):Ir({interactionState:{hitRegions:r,state:"hover"}}),nS(e.currentTarget);break}}}function $8(e){if(e.defaultPrevented)return;e.preventDefault();const{interactionState:t}=Ro();switch(t.state){case"active":Ir({cursorFlags:0,interactionState:{state:"inactive"}}),nS(e.currentTarget)}}function I8(e){let t=0,n=0;const r={};for(const i of e)if(i.defaultSize!==void 0){t++;const a=co(i.defaultSize);n+=a,r[i.panelId]=a}else r[i.panelId]=void 0;const o=e.length-t;if(o!==0){const i=co((100-n)/o);for(const a of e)a.defaultSize===void 0&&(r[a.panelId]=i)}return r}function V0e(e,t,n){const r=n[0];if(!r)return;const o=e.panels.find(a=>a.element===t);if(!o||!o.onResize)return;const i=Ll({group:e});o.onResize({asPercentage:co(r.inlineSize/i*100),inPixels:r.inlineSize},o.id)}function U0e(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 H0e(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 Bl=new Map;function W0e(e){let t=!0;Ct(e.element.ownerDocument.defaultView,"Cannot register an unmounted Group");const n=e.element.ownerDocument.defaultView.ResizeObserver,r=new Set,o=new Set,i=new n(h=>{for(const m of h){const{borderBoxSize:v,target:y}=m;if(y===e.element){if(t){if(Ll({group:e})===0)return;Ir(w=>{const x=w.mountedGroups.get(e);if(x){const S=g8(e),C=x.defaultLayoutDeferred?I8(S):x.layout,E=os({layout:C,panelConstraints:S});return!x.defaultLayoutDeferred&&Rl(C,E)&&U0e(x.derivedPanelConstraints,S)?w:{mountedGroups:new Map(w.mountedGroups).set(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:S,layout:E,separatorToPanels:x.separatorToPanels})}}return w})}}else V0e(e,y,v)}});i.observe(e.element),e.panels.forEach(h=>{Ct(!r.has(h.id),`Panel ids must be unique; id "${h.id}" was used more than once`),r.add(h.id),h.onResize&&i.observe(h.element)});const a=Ll({group:e}),s=g8(e),l=e.panels.map(({id:h})=>h).join(",");let c=e.defaultLayout;c&&(H0e(e.panels,c)||(c=void 0));const u=e.inMemoryLayouts[l]??c??I8(s),d=os({layout:u,panelConstraints:s}),f=p8(e),p=e.element.ownerDocument;return Ir(h=>{const m=new Map;return Bl.set(p,(Bl.get(p)??0)+1),f.forEach(v=>{v.separator&&m.set(v.separator,v.panels)}),{mountedGroups:new Map(h.mountedGroups).set(e,{defaultLayoutDeferred:a===0,derivedPanelConstraints:s,layout:d,separatorToPanels:m})}}),e.separators.forEach(h=>{Ct(!o.has(h.id),`Separator ids must be unique; id "${h.id}" was used more than once`),o.add(h.id),h.element.addEventListener("keydown",y8)}),Bl.get(p)===1&&(p.addEventListener("pointerdown",M8),p.addEventListener("pointerleave",D8),p.addEventListener("pointermove",N8),p.addEventListener("pointerup",$8)),function(){t=!1,Bl.set(p,Math.max(0,(Bl.get(p)??0)-1)),Ir(h=>{const m=new Map(h.mountedGroups);return m.delete(e),{mountedGroups:m}}),e.separators.forEach(h=>{h.element.removeEventListener("keydown",y8)}),Bl.get(p)||(p.removeEventListener("pointerdown",M8),p.removeEventListener("pointerleave",D8),p.removeEventListener("pointermove",N8),p.removeEventListener("pointerup",$8)),i.disconnect()}}function rS(e){const t=O.useId();return`${e??t}`}const as=typeof window<"u"?O.useLayoutEffect:O.useEffect;function oS(e){const t=O.useRef(e);return as(()=>{t.current=e},[e]),O.useCallback(n=>{var r;return(r=t.current)==null?void 0:r.call(t,n)},[t])}function iS(...e){return oS(t=>{e.forEach(n=>{if(n)switch(typeof n){case"function":{n(t);break}case"object":{n.current=t;break}}})})}function K0e(e){const t=O.useRef({...e});return as(()=>{for(const n in e)t.current[n]=e[n]},[e]),t.current}const L8="--react-resizable-panels--panel--pointer-events";function F8(e,t){const n=e.replace(/[^a-zA-Z0-9\-_]/g,""),r=t.replace(/[^a-zA-Z0-9\-_]/g,"");return`--react-resizable-panels--${n}--${r}`}const R8=O.createContext(null);function G0e(e,t){const n=O.useRef({getLayout:()=>({}),setLayout:D0e});O.useImperativeHandle(t,()=>n.current,[]),as(()=>{Object.assign(n.current,m8({groupId:e}))})}function Y0e({children:e,className:t,defaultLayout:n,disableCursor:r,disabled:o,elementRef:i,groupRef:a,id:s,onLayoutChange:l,orientation:c="horizontal",style:u,...d}){const f=O.useRef({}),p=oS(U=>{Rl(f.current,U)||(f.current=U,l==null||l(U))}),h=rS(s),[m,v]=O.useState(!1),[y,w]=O.useState(null),[x,S]=O.useState(n??{}),[C,E]=O.useState([]),[P,_]=O.useState([]),T=O.useRef({lastExpandedPanelSizes:{},layouts:{}}),M=iS(w,i);G0e(h,a);const A=O.useMemo(()=>({id:h,orientation:c,registerPanel:U=>(E(L=>eS(c,[...L,U])),()=>{E(L=>L.filter(V=>V!==U))}),registerSeparator:U=>(_(L=>eS(c,[...L,U])),()=>{_(L=>L.filter(V=>V!==U))})}),[h,c]),D=K0e({defaultLayout:n,disableCursor:r}),N=O.useRef(null);as(()=>{if(y===null)return;const U={defaultLayout:D.defaultLayout,disableCursor:!!D.disableCursor,disabled:!!o,element:y,id:h,inMemoryLastExpandedPanelSizes:T.current.lastExpandedPanelSizes,inMemoryLayouts:T.current.layouts,orientation:c,panels:C,separators:P};N.current=U;const L=W0e(U),V=Ro().mountedGroups.get(U);if(V){const{defaultLayoutDeferred:se,derivedPanelConstraints:pe,layout:W}=V;!se&&pe.length>0&&(S(W),p==null||p(W))}const j=rs.addListener("interactionStateChange",se=>{switch(se.state){case"active":{v(se.hitRegions.some(pe=>pe.group===U));break}default:{v(!1);break}}}),H=rs.addListener("mountedGroupsChange",se=>{const pe=se.get(U);if(pe){const{defaultLayoutDeferred:W,derivedPanelConstraints:Y,layout:F}=pe;if(W||Y.length===0)return;S(F),p==null||p(F)}});return()=>{N.current=null,L(),j(),H()}},[o,y,h,p,c,C,P,D]),O.useEffect(()=>{const U=N.current;U&&(U.defaultLayout=n,U.disableCursor=!!r)});const R={[L8]:m?"none":void 0};for(const U in x){const L=F8(h,U),V=x[U];R[L]=V}return b.jsx(R8.Provider,{value:A,children:b.jsx("div",{...d,"aria-orientation":c,className:t,"data-group":!0,"data-testid":h,id:h,ref:M,style:{...u,...R,display:"flex",flexDirection:c==="horizontal"?"row":"column",flexWrap:"nowrap"},children:e})})}function aS(){const e=O.useContext(R8);return Ct(e,"Group Context not found; did you render a Panel or Separator outside of a Group?"),e}function X0e({groupId:e,panelId:t}){const n=()=>{const{mountedGroups:s}=Ro();for(const[l,{defaultLayoutDeferred:c,derivedPanelConstraints:u,layout:d,separatorToPanels:f}]of s)if(l.id===e)return{defaultLayoutDeferred:c,derivedPanelConstraints:u,group:l,layout:d,separatorToPanels:f};throw Error(`Group ${e} not found`)},r=()=>{const s=n().derivedPanelConstraints.find(l=>l.panelId===t);if(s!==void 0)return s;throw Error(`Panel constraints not found for Panel ${t}`)},o=()=>{const s=n().group.panels.find(l=>l.id===t);if(s!==void 0)return s;throw Error(`Layout not found for Panel ${t}`)},i=()=>{const s=n().layout[t];if(s!==void 0)return s;throw Error(`Layout not found for Panel ${t}`)},a=s=>{const l=i();if(s===l)return;const{defaultLayoutDeferred:c,derivedPanelConstraints:u,group:d,layout:f,separatorToPanels:p}=n(),h=d.panels.findIndex(w=>w.id===t),m=h===d.panels.length-1,v=Ad({delta:m?l-s:s-l,initialLayout:f,panelConstraints:u,pivotIndices:m?[h-1,h]:[h,h+1],prevLayout:f,trigger:"imperative-api"}),y=os({layout:v,panelConstraints:u});Rl(f,y)||Ir(w=>({mountedGroups:new Map(w.mountedGroups).set(d,{defaultLayoutDeferred:c,derivedPanelConstraints:u,layout:y,separatorToPanels:p})}))};return{collapse:()=>{const{collapsible:s,collapsedSize:l}=r(),c=i();s&&c!==l&&a(l)},expand:()=>{const{collapsible:s,collapsedSize:l,minSize:c}=r(),u=i();s&&u===l&&a(c)},getSize:()=>{const{group:s}=n(),l=i(),{element:c}=o(),u=s.orientation==="horizontal"?c.offsetWidth:c.offsetHeight;return{asPercentage:l,inPixels:u}},isCollapsed:()=>{const{collapsible:s,collapsedSize:l}=r(),c=i();return s&&Vn(l,c)},resize:s=>{if(i()!==s){let l;switch(typeof s){case"number":{const{group:c}=n(),u=Ll({group:c});l=co(s/u*100);break}case"string":{l=parseFloat(s);break}}a(l)}}}}function Q0e(e,t){const{id:n}=aS(),r=O.useRef({collapse:tS,expand:tS,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:tS});O.useImperativeHandle(t,()=>r.current,[]),as(()=>{Object.assign(r.current,X0e({groupId:n,panelId:e}))})}function Z0e({children:e,className:t,collapsedSize:n="0%",collapsible:r=!1,defaultSize:o,elementRef:i,id:a,maxSize:s="100%",minSize:l="0%",onResize:c,panelRef:u,style:d,...f}){const p=!!a,h=rS(a),[m,v]=O.useState(null),y=iS(v,i),{id:w,registerPanel:x}=aS(),S=c!==null,C=oS(P=>{c==null||c(P,a)});as(()=>{if(m!==null)return x({element:m,id:h,idIsStable:p,onResize:S?C:void 0,panelConstraints:{collapsedSize:n,collapsible:r,defaultSize:o,maxSize:s,minSize:l}})},[n,r,o,m,S,h,p,s,l,C,x]),Q0e(h,u);const E=F8(w,h);return b.jsx("div",{...f,"data-panel":!0,"data-testid":h,id:h,ref:y,style:{...J0e,flexBasis:0,flexGrow:`var(${E}, 1)`,flexShrink:1,overflow:"hidden",pointerEvents:`var(${L8})`},children:b.jsx("div",{className:t,style:{width:"100%",height:"100%",...d},children:e})})}const J0e={minHeight:"unset",maxHeight:"unset",height:"unset",minWidth:"unset",maxWidth:"unset",width:"unset",flex:"unset",flexBasis:"unset",flexShrink:"unset",flexGrow:"unset",border:"unset",borderWidth:"unset",padding:"unset",margin:"unset"};function ebe({layout:e,panelConstraints:t,panelId:n,panelIndex:r}){let o,i;const a=e[n],s=t.find(l=>l.panelId===n);if(s){const l=s.maxSize,c=i=s.collapsible?s.collapsedSize:s.minSize,u=[r,r+1];i=os({layout:Ad({delta:c-a,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e,trigger:"keyboard"}),panelConstraints:t})[n],o=os({layout:Ad({delta:l-a,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e,trigger:"keyboard"}),panelConstraints:t})[n]}return{valueControls:n,valueMax:o,valueMin:i,valueNow:a}}function tbe({children:e,className:t,elementRef:n,id:r,style:o,...i}){const a=rS(r),[s,l]=O.useState({}),[c,u]=O.useState("inactive"),[d,f]=O.useState(null),p=iS(f,n),{id:h,orientation:m,registerSeparator:v}=aS(),y=m==="horizontal"?"vertical":"horizontal";return as(()=>{if(d!==null){const w={element:d,id:a},x=v(w),S=rs.addListener("interactionStateChange",E=>{u(E.state!=="inactive"&&E.hitRegions.some(P=>P.separator===w)?E.state:"inactive")}),C=rs.addListener("mountedGroupsChange",E=>{E.forEach(({derivedPanelConstraints:P,layout:_,separatorToPanels:T},M)=>{if(M.id===h){const A=T.get(w);if(A){const D=A[0],N=M.panels.indexOf(D);l(ebe({layout:_,panelConstraints:P,panelId:D.id,panelIndex:N}))}}})});return()=>{S(),C(),x()}}},[d,h,a,v]),b.jsx("div",{...i,"aria-controls":s.valueControls,"aria-orientation":y,"aria-valuemax":s.valueMax,"aria-valuemin":s.valueMin,"aria-valuenow":s.valueNow,children:e,className:t,"data-separator":c,"data-testid":a,id:a,ref:p,role:"separator",style:{flexBasis:"auto",...o,flexGrow:0,flexShrink:0},tabIndex:0})}const nbe=({className:e,...t})=>b.jsx(Y0e,{className:q("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",e),...t}),rbe=Z0e,obe=({withHandle:e,className:t,...n})=>b.jsx(tbe,{className:q("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:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),...n,children:e&&b.jsx("div",{className:"z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border",children:b.jsx(SV,{className:"h-2.5 w-2.5"})})});function ibe(e){const t=abe(e),n=g.forwardRef((r,o)=>{const{children:i,...a}=r,s=g.Children.toArray(i),l=s.find(lbe);if(l){const c=l.props.children,u=s.map(d=>d===l?g.Children.count(c)>1?g.Children.only(null):g.isValidElement(c)?c.props.children:null:d);return b.jsx(t,{...a,ref:o,children:g.isValidElement(c)?g.cloneElement(c,void 0,u):null})}return b.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function abe(e){const t=g.forwardRef((n,r)=>{const{children:o,...i}=n;if(g.isValidElement(o)){const a=ube(o),s=cbe(i,o.props);return o.type!==g.Fragment&&(s.ref=r?Pn(r,a):a),g.cloneElement(o,s)}return g.Children.count(o)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sbe=Symbol("radix.slottable");function lbe(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sbe}function cbe(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const l=i(...s);return o(...s),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function ube(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 dbe=[" ","Enter","ArrowUp","ArrowDown"],fbe=[" ","Enter"],ss="Select",[sm,lm,hbe]=Qo(ss),[jl]=kt(ss,[hbe,Io]),cm=Io(),[pbe,ra]=jl(ss),[gbe,mbe]=jl(ss),B8=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:a,defaultValue:s,onValueChange:l,dir:c,name:u,autoComplete:d,disabled:f,required:p,form:h}=e,m=cm(t),[v,y]=g.useState(null),[w,x]=g.useState(null),[S,C]=g.useState(!1),E=Wr(c),[P,_]=Ot({prop:r,defaultProp:o??!1,onChange:i,caller:ss}),[T,M]=Ot({prop:a,defaultProp:s,onChange:l,caller:ss}),A=g.useRef(null),D=v?h||!!v.closest("form"):!0,[N,R]=g.useState(new Set),U=Array.from(N).map(L=>L.props.value).join(";");return b.jsx(Tl,{...m,children:b.jsxs(pbe,{required:p,scope:t,trigger:v,onTriggerChange:y,valueNode:w,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:Et(),value:T,onValueChange:M,open:P,onOpenChange:_,dir:E,triggerPointerDownPosRef:A,disabled:f,children:[b.jsx(sm.Provider,{scope:t,children:b.jsx(gbe,{scope:e.__scopeSelect,onNativeOptionAdd:g.useCallback(L=>{R(V=>new Set(V).add(L))},[]),onNativeOptionRemove:g.useCallback(L=>{R(V=>{const j=new Set(V);return j.delete(L),j})},[]),children:n})}),D?b.jsxs(uR,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:d,value:T,onChange:L=>M(L.target.value),disabled:f,form:h,children:[T===void 0?b.jsx("option",{value:""}):null,Array.from(N)]},U):null]})})};B8.displayName=ss;var j8="SelectTrigger",z8=g.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=cm(n),a=ra(j8,n),s=a.disabled||r,l=je(t,a.onTriggerChange),c=lm(n),u=g.useRef("touch"),[d,f,p]=fR(m=>{const v=c().filter(x=>!x.disabled),y=v.find(x=>x.value===a.value),w=hR(v,m,y);w!==void 0&&a.onValueChange(w.value)}),h=m=>{s||(a.onOpenChange(!0),p()),m&&(a.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return b.jsx(_l,{asChild:!0,...i,children:b.jsx(ye.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":dR(a.value)?"":void 0,...o,ref:l,onClick:ne(o.onClick,m=>{m.currentTarget.focus(),u.current!=="mouse"&&h(m)}),onPointerDown:ne(o.onPointerDown,m=>{u.current=m.pointerType;const v=m.target;v.hasPointerCapture(m.pointerId)&&v.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(h(m),m.preventDefault())}),onKeyDown:ne(o.onKeyDown,m=>{const v=d.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&f(m.key),!(v&&m.key===" ")&&dbe.includes(m.key)&&(h(),m.preventDefault())})})})});z8.displayName=j8;var q8="SelectValue",V8=g.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:a="",...s}=e,l=ra(q8,n),{onValueNodeHasChildrenChange:c}=l,u=i!==void 0,d=je(t,l.onValueNodeChange);return At(()=>{c(u)},[c,u]),b.jsx(ye.span,{...s,ref:d,style:{pointerEvents:"none"},children:dR(l.value)?b.jsx(b.Fragment,{children:a}):i})});V8.displayName=q8;var vbe="SelectIcon",U8=g.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return b.jsx(ye.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});U8.displayName=vbe;var ybe="SelectPortal",H8=e=>b.jsx(Sa,{asChild:!0,...e});H8.displayName=ybe;var ls="SelectContent",W8=g.forwardRef((e,t)=>{const n=ra(ls,e.__scopeSelect),[r,o]=g.useState();if(At(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?Oc.createPortal(b.jsx(K8,{scope:e.__scopeSelect,children:b.jsx(sm.Slot,{scope:e.__scopeSelect,children:b.jsx("div",{children:e.children})})}),i):null}return b.jsx(G8,{...e,ref:t})});W8.displayName=ls;var uo=10,[K8,oa]=jl(ls),bbe="SelectContentImpl",wbe=ibe("SelectContent.RemoveScroll"),G8=g.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:a,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:h,hideWhenDetached:m,avoidCollisions:v,...y}=e,w=ra(ls,n),[x,S]=g.useState(null),[C,E]=g.useState(null),P=je(t,Z=>S(Z)),[_,T]=g.useState(null),[M,A]=g.useState(null),D=lm(n),[N,R]=g.useState(!1),U=g.useRef(!1);g.useEffect(()=>{if(x)return vh(x)},[x]),ch();const L=g.useCallback(Z=>{const[J,...Q]=D().map(z=>z.ref.current),[oe]=Q.slice(-1),le=document.activeElement;for(const z of Z)if(z===le||(z==null||z.scrollIntoView({block:"nearest"}),z===J&&C&&(C.scrollTop=0),z===oe&&C&&(C.scrollTop=C.scrollHeight),z==null||z.focus(),document.activeElement!==le))return},[D,C]),V=g.useCallback(()=>L([_,x]),[L,_,x]);g.useEffect(()=>{N&&V()},[N,V]);const{onOpenChange:j,triggerPointerDownPosRef:H}=w;g.useEffect(()=>{if(x){let Z={x:0,y:0};const J=oe=>{var le,z;Z={x:Math.abs(Math.round(oe.pageX)-(((le=H.current)==null?void 0:le.x)??0)),y:Math.abs(Math.round(oe.pageY)-(((z=H.current)==null?void 0:z.y)??0))}},Q=oe=>{Z.x<=10&&Z.y<=10?oe.preventDefault():x.contains(oe.target)||j(!1),document.removeEventListener("pointermove",J),H.current=null};return H.current!==null&&(document.addEventListener("pointermove",J),document.addEventListener("pointerup",Q,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",Q,{capture:!0})}}},[x,j,H]),g.useEffect(()=>{const Z=()=>j(!1);return window.addEventListener("blur",Z),window.addEventListener("resize",Z),()=>{window.removeEventListener("blur",Z),window.removeEventListener("resize",Z)}},[j]);const[se,pe]=fR(Z=>{const J=D().filter(le=>!le.disabled),Q=J.find(le=>le.ref.current===document.activeElement),oe=hR(J,Z,Q);oe&&setTimeout(()=>oe.ref.current.focus())}),W=g.useCallback((Z,J,Q)=>{const oe=!U.current&&!Q;(w.value!==void 0&&w.value===J||oe)&&(T(Z),oe&&(U.current=!0))},[w.value]),Y=g.useCallback(()=>x==null?void 0:x.focus(),[x]),F=g.useCallback((Z,J,Q)=>{const oe=!U.current&&!Q;(w.value!==void 0&&w.value===J||oe)&&A(Z)},[w.value]),ee=r==="popper"?sS:Y8,fe=ee===sS?{side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:h,hideWhenDetached:m,avoidCollisions:v}:{};return b.jsx(K8,{scope:n,content:x,viewport:C,onViewportChange:E,itemRefCallback:W,selectedItem:_,onItemLeave:Y,itemTextRefCallback:F,focusSelectedItem:V,selectedItemText:M,position:r,isPositioned:N,searchRef:se,children:b.jsx(Kc,{as:wbe,allowPinchZoom:!0,children:b.jsx(Wc,{asChild:!0,trapped:w.open,onMountAutoFocus:Z=>{Z.preventDefault()},onUnmountAutoFocus:ne(o,Z=>{var J;(J=w.trigger)==null||J.focus({preventScroll:!0}),Z.preventDefault()}),children:b.jsx(li,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:Z=>Z.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:b.jsx(ee,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:Z=>Z.preventDefault(),...y,...fe,onPlaced:()=>R(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:ne(y.onKeyDown,Z=>{const J=Z.ctrlKey||Z.altKey||Z.metaKey;if(Z.key==="Tab"&&Z.preventDefault(),!J&&Z.key.length===1&&pe(Z.key),["ArrowUp","ArrowDown","Home","End"].includes(Z.key)){let oe=D().filter(le=>!le.disabled).map(le=>le.ref.current);if(["ArrowUp","End"].includes(Z.key)&&(oe=oe.slice().reverse()),["ArrowUp","ArrowDown"].includes(Z.key)){const le=Z.target,z=oe.indexOf(le);oe=oe.slice(z+1)}setTimeout(()=>L(oe)),Z.preventDefault()}})})})})})})});G8.displayName=bbe;var xbe="SelectItemAlignedPosition",Y8=g.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=ra(ls,n),a=oa(ls,n),[s,l]=g.useState(null),[c,u]=g.useState(null),d=je(t,P=>u(P)),f=lm(n),p=g.useRef(!1),h=g.useRef(!0),{viewport:m,selectedItem:v,selectedItemText:y,focusSelectedItem:w}=a,x=g.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&c&&m&&v&&y){const P=i.trigger.getBoundingClientRect(),_=c.getBoundingClientRect(),T=i.valueNode.getBoundingClientRect(),M=y.getBoundingClientRect();if(i.dir!=="rtl"){const le=M.left-_.left,z=T.left-le,_e=P.left-z,X=P.width+_e,be=Math.max(X,_.width),$e=window.innerWidth-uo,Ve=Od(z,[uo,Math.max(uo,$e-be)]);s.style.minWidth=X+"px",s.style.left=Ve+"px"}else{const le=_.right-M.right,z=window.innerWidth-T.right-le,_e=window.innerWidth-P.right-z,X=P.width+_e,be=Math.max(X,_.width),$e=window.innerWidth-uo,Ve=Od(z,[uo,Math.max(uo,$e-be)]);s.style.minWidth=X+"px",s.style.right=Ve+"px"}const A=f(),D=window.innerHeight-uo*2,N=m.scrollHeight,R=window.getComputedStyle(c),U=parseInt(R.borderTopWidth,10),L=parseInt(R.paddingTop,10),V=parseInt(R.borderBottomWidth,10),j=parseInt(R.paddingBottom,10),H=U+L+N+j+V,se=Math.min(v.offsetHeight*5,H),pe=window.getComputedStyle(m),W=parseInt(pe.paddingTop,10),Y=parseInt(pe.paddingBottom,10),F=P.top+P.height/2-uo,ee=D-F,fe=v.offsetHeight/2,Z=v.offsetTop+fe,J=U+L+Z,Q=H-J;if(J<=F){const le=A.length>0&&v===A[A.length-1].ref.current;s.style.bottom="0px";const z=c.clientHeight-m.offsetTop-m.offsetHeight,_e=Math.max(ee,fe+(le?Y:0)+z+V),X=J+_e;s.style.height=X+"px"}else{const le=A.length>0&&v===A[0].ref.current;s.style.top="0px";const _e=Math.max(F,U+m.offsetTop+(le?W:0)+fe)+Q;s.style.height=_e+"px",m.scrollTop=J-F+m.offsetTop}s.style.margin=`${uo}px 0`,s.style.minHeight=se+"px",s.style.maxHeight=D+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[f,i.trigger,i.valueNode,s,c,m,v,y,i.dir,r]);At(()=>x(),[x]);const[S,C]=g.useState();At(()=>{c&&C(window.getComputedStyle(c).zIndex)},[c]);const E=g.useCallback(P=>{P&&h.current===!0&&(x(),w==null||w(),h.current=!1)},[x,w]);return b.jsx(Cbe,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:E,children:b.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:b.jsx(ye.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Y8.displayName=xbe;var Sbe="SelectPopperPosition",sS=g.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=uo,...i}=e,a=cm(n);return b.jsx(id,{...a,...i,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.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)"}})});sS.displayName=Sbe;var[Cbe,lS]=jl(ls,{}),cS="SelectViewport",X8=g.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,i=oa(cS,n),a=lS(cS,n),s=je(t,i.onViewportChange),l=g.useRef(0);return b.jsxs(b.Fragment,{children:[b.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}),b.jsx(sm.Slot,{scope:n,children:b.jsx(ye.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:ne(o.onScroll,c=>{const u=c.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=a;if(f!=null&&f.current&&d){const p=Math.abs(l.current-u.scrollTop);if(p>0){const h=window.innerHeight-uo*2,m=parseFloat(d.style.minHeight),v=parseFloat(d.style.height),y=Math.max(m,v);if(y<h){const w=y+p,x=Math.min(h,w),S=w-x;d.style.height=x+"px",d.style.bottom==="0px"&&(u.scrollTop=S>0?S:0,d.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});X8.displayName=cS;var Q8="SelectGroup",[Ebe,Pbe]=jl(Q8),Z8=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Et();return b.jsx(Ebe,{scope:n,id:o,children:b.jsx(ye.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Z8.displayName=Q8;var J8="SelectLabel",eR=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Pbe(J8,n);return b.jsx(ye.div,{id:o.id,...r,ref:t})});eR.displayName=J8;var um="SelectItem",[Obe,tR]=jl(um),nR=g.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...a}=e,s=ra(um,n),l=oa(um,n),c=s.value===r,[u,d]=g.useState(i??""),[f,p]=g.useState(!1),h=je(t,w=>{var x;return(x=l.itemRefCallback)==null?void 0:x.call(l,w,r,o)}),m=Et(),v=g.useRef("touch"),y=()=>{o||(s.onValueChange(r),s.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 b.jsx(Obe,{scope:n,value:r,disabled:o,textId:m,isSelected:c,onItemTextChange:g.useCallback(w=>{d(x=>x||((w==null?void 0:w.textContent)??"").trim())},[]),children:b.jsx(sm.ItemSlot,{scope:n,value:r,disabled:o,textValue:u,children:b.jsx(ye.div,{role:"option","aria-labelledby":m,"data-highlighted":f?"":void 0,"aria-selected":c&&f,"data-state":c?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...a,ref:h,onFocus:ne(a.onFocus,()=>p(!0)),onBlur:ne(a.onBlur,()=>p(!1)),onClick:ne(a.onClick,()=>{v.current!=="mouse"&&y()}),onPointerUp:ne(a.onPointerUp,()=>{v.current==="mouse"&&y()}),onPointerDown:ne(a.onPointerDown,w=>{v.current=w.pointerType}),onPointerMove:ne(a.onPointerMove,w=>{var x;v.current=w.pointerType,o?(x=l.onItemLeave)==null||x.call(l):v.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ne(a.onPointerLeave,w=>{var x;w.currentTarget===document.activeElement&&((x=l.onItemLeave)==null||x.call(l))}),onKeyDown:ne(a.onKeyDown,w=>{var S;((S=l.searchRef)==null?void 0:S.current)!==""&&w.key===" "||(fbe.includes(w.key)&&y(),w.key===" "&&w.preventDefault())})})})})});nR.displayName=um;var Dd="SelectItemText",rR=g.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,a=ra(Dd,n),s=oa(Dd,n),l=tR(Dd,n),c=mbe(Dd,n),[u,d]=g.useState(null),f=je(t,y=>d(y),l.onItemTextChange,y=>{var w;return(w=s.itemTextRefCallback)==null?void 0:w.call(s,y,l.value,l.disabled)}),p=u==null?void 0:u.textContent,h=g.useMemo(()=>b.jsx("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:v}=c;return At(()=>(m(h),()=>v(h)),[m,v,h]),b.jsxs(b.Fragment,{children:[b.jsx(ye.span,{id:l.textId,...i,ref:f}),l.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Oc.createPortal(i.children,a.valueNode):null]})});rR.displayName=Dd;var oR="SelectItemIndicator",iR=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return tR(oR,n).isSelected?b.jsx(ye.span,{"aria-hidden":!0,...r,ref:t}):null});iR.displayName=oR;var uS="SelectScrollUpButton",aR=g.forwardRef((e,t)=>{const n=oa(uS,e.__scopeSelect),r=lS(uS,e.__scopeSelect),[o,i]=g.useState(!1),a=je(t,r.onScrollButtonChange);return At(()=>{if(n.viewport&&n.isPositioned){let s=function(){const c=l.scrollTop>0;i(c)};const l=n.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),o?b.jsx(lR,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=n;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});aR.displayName=uS;var dS="SelectScrollDownButton",sR=g.forwardRef((e,t)=>{const n=oa(dS,e.__scopeSelect),r=lS(dS,e.__scopeSelect),[o,i]=g.useState(!1),a=je(t,r.onScrollButtonChange);return At(()=>{if(n.viewport&&n.isPositioned){let s=function(){const c=l.scrollHeight-l.clientHeight,u=Math.ceil(l.scrollTop)<c;i(u)};const l=n.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),o?b.jsx(lR,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=n;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});sR.displayName=dS;var lR=g.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=oa("SelectScrollButton",n),a=g.useRef(null),s=lm(n),l=g.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return g.useEffect(()=>()=>l(),[l]),At(()=>{var u;const c=s().find(d=>d.ref.current===document.activeElement);(u=c==null?void 0:c.ref.current)==null||u.scrollIntoView({block:"nearest"})},[s]),b.jsx(ye.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:ne(o.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:ne(o.onPointerMove,()=>{var c;(c=i.onItemLeave)==null||c.call(i),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:ne(o.onPointerLeave,()=>{l()})})}),Tbe="SelectSeparator",cR=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return b.jsx(ye.div,{"aria-hidden":!0,...r,ref:t})});cR.displayName=Tbe;var fS="SelectArrow",_be=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=cm(n),i=ra(fS,n),a=oa(fS,n);return i.open&&a.position==="popper"?b.jsx(ad,{...o,...r,ref:t}):null});_be.displayName=fS;var Mbe="SelectBubbleInput",uR=g.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=g.useRef(null),i=je(r,o),a=wl(t);return g.useEffect(()=>{const s=o.current;if(!s)return;const l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&u){const d=new Event("change",{bubbles:!0});u.call(s,t),s.dispatchEvent(d)}},[a,t]),b.jsx(ye.select,{...n,style:{...FF,...n.style},ref:i,defaultValue:t})});uR.displayName=Mbe;function dR(e){return e===""||e===void 0}function fR(e){const t=ht(e),n=g.useRef(""),r=g.useRef(0),o=g.useCallback(a=>{const s=n.current+a;t(s),(function l(c){n.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>l(""),1e3))})(s)},[t]),i=g.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return g.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function hR(e,t,n){const o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let a=kbe(e,Math.max(i,0));o.length===1&&(a=a.filter(c=>c!==n));const l=a.find(c=>c.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function kbe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Abe=B8,pR=z8,Dbe=V8,Nbe=U8,$be=H8,gR=W8,Ibe=X8,Lbe=Z8,mR=eR,vR=nR,Fbe=rR,Rbe=iR,yR=aR,bR=sR,wR=cR;const Bbe=Abe,jbe=Lbe,zbe=Dbe,xR=g.forwardRef(({className:e,children:t,...n},r)=>b.jsxs(pR,{ref:r,className:q("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,b.jsx(Nbe,{asChild:!0,children:b.jsx(vy,{className:"h-4 w-4 opacity-50"})})]}));xR.displayName=pR.displayName;const hS=g.forwardRef(({className:e,...t},n)=>b.jsx(yR,{ref:n,className:q("flex cursor-default items-center justify-center py-1",e),...t,children:b.jsx(zX,{className:"h-4 w-4"})}));hS.displayName=yR.displayName;const pS=g.forwardRef(({className:e,...t},n)=>b.jsx(bR,{ref:n,className:q("flex cursor-default items-center justify-center py-1",e),...t,children:b.jsx(vy,{className:"h-4 w-4"})}));pS.displayName=bR.displayName;const SR=g.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>b.jsx($be,{children:b.jsxs(gR,{ref:o,className:q("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",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,...r,children:[b.jsx(hS,{}),b.jsx(Ibe,{className:q("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),b.jsx(pS,{})]})}));SR.displayName=gR.displayName;const CR=g.forwardRef(({className:e,...t},n)=>b.jsx(mR,{ref:n,className:q("px-2 py-1.5 text-sm font-semibold",e),...t}));CR.displayName=mR.displayName;const ER=g.forwardRef(({className:e,children:t,...n},r)=>b.jsxs(vR,{ref:r,className:q("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[b.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:b.jsx(Rbe,{children:b.jsx(Qc,{className:"h-4 w-4"})})}),b.jsx(Fbe,{children:t})]}));ER.displayName=vR.displayName;const PR=g.forwardRef(({className:e,...t},n)=>b.jsx(wR,{ref:n,className:q("-mx-1 my-1 h-px bg-muted",e),...t}));PR.displayName=wR.displayName;var qbe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Vbe=qbe.reduce((e,t)=>{const n=Ys(`Primitive.${t}`),r=g.forwardRef((o,i)=>{const{asChild:a,...s}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(l,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Ube="Separator",OR="horizontal",Hbe=["horizontal","vertical"],TR=g.forwardRef((e,t)=>{const{decorative:n,orientation:r=OR,...o}=e,i=Wbe(r)?r:OR,s=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return b.jsx(Vbe.div,{"data-orientation":i,...s,...o,ref:t})});TR.displayName=Ube;function Wbe(e){return Hbe.includes(e)}var _R=TR;const gS=g.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>b.jsx(_R,{ref:o,decorative:n,orientation:t,className:q("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));gS.displayName=_R.displayName;function Lr({className:e,...t}){return b.jsx("div",{className:q("animate-pulse rounded-md ",e),...t})}function Kbe(){return b.jsxs("div",{className:"p-5",children:[b.jsx("h5",{className:"text-center font-bold",children:"Please Wait..."}),b.jsx(Lr,{className:"h-40 w-full mb-4 bg-gray-300"}),b.jsx(Lr,{className:"h-10 w-full mb-4 bg-gray-300"}),b.jsx(Lr,{className:"h-10 w-full mb-4 bg-gray-300"}),b.jsx(Lr,{className:"h-10 w-full mb-4 bg-gray-300"}),b.jsx(Lr,{className:"h-10 w-full mb-4 bg-gray-300"}),b.jsx(Lr,{className:"h-10 w-full mb-4 bg-gray-300"}),b.jsx(Lr,{className:"h-10 w-full mb-4 bg-gray-300"}),b.jsx(Lr,{className:"h-10 w-full mb-4 bg-gray-300"}),b.jsx(Lr,{className:"h-10 w-full mb-4 bg-gray-300"})]})}var Gbe=Symbol("radix.slottable");function Ybe(e){const t=({children:n})=>b.jsx(b.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Gbe,t}var[dm]=kt("Tooltip",[Io]),fm=Io(),MR="TooltipProvider",Xbe=700,mS="tooltip.open",[Qbe,vS]=dm(MR),kR=e=>{const{__scopeTooltip:t,delayDuration:n=Xbe,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,a=g.useRef(!0),s=g.useRef(!1),l=g.useRef(0);return g.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),b.jsx(Qbe,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:g.useCallback(()=>{window.clearTimeout(l.current),a.current=!1},[]),onClose:g.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:g.useCallback(c=>{s.current=c},[]),disableHoverableContent:o,children:i})};kR.displayName=MR;var Nd="Tooltip",[Zbe,$d]=dm(Nd),AR=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,l=vS(Nd,e.__scopeTooltip),c=fm(t),[u,d]=g.useState(null),f=Et(),p=g.useRef(0),h=a??l.disableHoverableContent,m=s??l.delayDuration,v=g.useRef(!1),[y,w]=Ot({prop:r,defaultProp:o??!1,onChange:P=>{P?(l.onOpen(),document.dispatchEvent(new CustomEvent(mS))):l.onClose(),i==null||i(P)},caller:Nd}),x=g.useMemo(()=>y?v.current?"delayed-open":"instant-open":"closed",[y]),S=g.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v.current=!1,w(!0)},[w]),C=g.useCallback(()=>{window.clearTimeout(p.current),p.current=0,w(!1)},[w]),E=g.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{v.current=!0,w(!0),p.current=0},m)},[m,w]);return g.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),b.jsx(Tl,{...c,children:b.jsx(Zbe,{scope:t,contentId:f,open:y,stateAttribute:x,trigger:u,onTriggerChange:d,onTriggerEnter:g.useCallback(()=>{l.isOpenDelayedRef.current?E():S()},[l.isOpenDelayedRef,E,S]),onTriggerLeave:g.useCallback(()=>{h?C():(window.clearTimeout(p.current),p.current=0)},[C,h]),onOpen:S,onClose:C,disableHoverableContent:h,children:n})})};AR.displayName=Nd;var yS="TooltipTrigger",DR=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=$d(yS,n),i=vS(yS,n),a=fm(n),s=g.useRef(null),l=je(t,s,o.onTriggerChange),c=g.useRef(!1),u=g.useRef(!1),d=g.useCallback(()=>c.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),b.jsx(_l,{asChild:!0,...a,children:b.jsx(ye.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:ne(e.onPointerMove,f=>{f.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),u.current=!0)}),onPointerLeave:ne(e.onPointerLeave,()=>{o.onTriggerLeave(),u.current=!1}),onPointerDown:ne(e.onPointerDown,()=>{o.open&&o.onClose(),c.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:ne(e.onFocus,()=>{c.current||o.onOpen()}),onBlur:ne(e.onBlur,o.onClose),onClick:ne(e.onClick,o.onClose)})})});DR.displayName=yS;var bS="TooltipPortal",[Jbe,ewe]=dm(bS,{forceMount:void 0}),NR=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=$d(bS,t);return b.jsx(Jbe,{scope:t,forceMount:n,children:b.jsx(Tt,{present:n||i.open,children:b.jsx(Sa,{asChild:!0,container:o,children:r})})})};NR.displayName=bS;var zl="TooltipContent",$R=g.forwardRef((e,t)=>{const n=ewe(zl,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=$d(zl,e.__scopeTooltip);return b.jsx(Tt,{present:r||a.open,children:a.disableHoverableContent?b.jsx(IR,{side:o,...i,ref:t}):b.jsx(twe,{side:o,...i,ref:t})})}),twe=g.forwardRef((e,t)=>{const n=$d(zl,e.__scopeTooltip),r=vS(zl,e.__scopeTooltip),o=g.useRef(null),i=je(t,o),[a,s]=g.useState(null),{trigger:l,onClose:c}=n,u=o.current,{onPointerInTransitChange:d}=r,f=g.useCallback(()=>{s(null),d(!1)},[d]),p=g.useCallback((h,m)=>{const v=h.currentTarget,y={x:h.clientX,y:h.clientY},w=awe(y,v.getBoundingClientRect()),x=swe(y,w),S=lwe(m.getBoundingClientRect()),C=uwe([...x,...S]);s(C),d(!0)},[d]);return g.useEffect(()=>()=>f(),[f]),g.useEffect(()=>{if(l&&u){const h=v=>p(v,u),m=v=>p(v,l);return l.addEventListener("pointerleave",h),u.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",h),u.removeEventListener("pointerleave",m)}}},[l,u,p,f]),g.useEffect(()=>{if(a){const h=m=>{const v=m.target,y={x:m.clientX,y:m.clientY},w=(l==null?void 0:l.contains(v))||(u==null?void 0:u.contains(v)),x=!cwe(y,a);w?f():x&&(f(),c())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[l,u,a,c,f]),b.jsx(IR,{...e,ref:i})}),[nwe,rwe]=dm(Nd,{isInside:!1}),owe=Ybe("TooltipContent"),IR=g.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...s}=e,l=$d(zl,n),c=fm(n),{onClose:u}=l;return g.useEffect(()=>(document.addEventListener(mS,u),()=>document.removeEventListener(mS,u)),[u]),g.useEffect(()=>{if(l.trigger){const d=f=>{const p=f.target;p!=null&&p.contains(l.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,u]),b.jsx(li,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:b.jsxs(id,{"data-state":l.stateAttribute,...c,...s,ref:t,style:{...s.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:[b.jsx(owe,{children:r}),b.jsx(nwe,{scope:n,isInside:!0,children:b.jsx(RF,{id:l.contentId,role:"tooltip",children:o||r})})]})})});$R.displayName=zl;var LR="TooltipArrow",iwe=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=fm(n);return rwe(LR,n).isInside?null:b.jsx(ad,{...o,...r,ref:t})});iwe.displayName=LR;function awe(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function swe(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 lwe(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 cwe(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const s=t[i],l=t[a],c=s.x,u=s.y,d=l.x,f=l.y;u>r!=f>r&&n<(d-c)*(r-u)/(f-u)+c&&(o=!o)}return o}function uwe(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),dwe(t)}function dwe(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 i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.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 i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.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 fwe=kR,hwe=AR,pwe=DR,gwe=NR,FR=$R;const RR=fwe,BR=hwe,jR=pwe,wS=g.forwardRef(({className:e,sideOffset:t=4,...n},r)=>b.jsx(gwe,{children:b.jsx(FR,{ref:r,sideOffset:t,className:q("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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",e),...n})}));wS.displayName=FR.displayName;const xS=768;function zR(){const[e,t]=O.useState(void 0);return O.useEffect(()=>{const n=window.matchMedia(`(max-width: ${xS-1}px)`),r=()=>{t(window.innerWidth<xS)};return n.addEventListener("change",r),t(window.innerWidth<xS),()=>n.removeEventListener("change",r)},[]),!!e}const mwe="sidebar_state",vwe=3600*24*7,ywe="16rem",bwe="18rem",wwe="3rem",xwe="b",qR=g.createContext(null);function Id(){const e=g.useContext(qR);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const VR=g.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:o,children:i,...a},s)=>{const l=zR(),[c,u]=g.useState(!1),[d,f]=g.useState(e),p=t??d,h=g.useCallback(w=>{const x=typeof w=="function"?w(p):w;n?n(x):f(x),document.cookie=`${mwe}=${x}; path=/; max-age=${vwe}`},[n,p]),m=g.useCallback(()=>l?u(w=>!w):h(w=>!w),[l,h,u]);g.useEffect(()=>{const w=x=>{x.key===xwe&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),m())};return window.addEventListener("keydown",w),()=>window.removeEventListener("keydown",w)},[m]);const v=p?"expanded":"collapsed",y=g.useMemo(()=>({state:v,open:p,setOpen:h,isMobile:l,openMobile:c,setOpenMobile:u,toggleSidebar:m}),[v,p,h,l,c,u,m]);return b.jsx(qR.Provider,{value:y,children:b.jsx(RR,{delayDuration:0,children:b.jsx("div",{style:{"--sidebar-width":ywe,"--sidebar-width-icon":wwe,...o},className:q("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",r),ref:s,...a,children:i})})})});VR.displayName="SidebarProvider";const UR=g.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:o,...i},a)=>{const{isMobile:s,state:l,openMobile:c,setOpenMobile:u}=Id();return n==="none"?b.jsx("div",{className:q("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",r),ref:a,...i,children:o}):s?b.jsx(kx,{open:c,onOpenChange:u,...i,children:b.jsxs(zg,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":bwe},side:e,children:[b.jsxs(qg,{className:"sr-only",children:[b.jsx(Vg,{children:"Sidebar"}),b.jsx(Ug,{children:"Displays the mobile sidebar."})]}),b.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):b.jsxs("div",{ref:a,className:"group peer hidden text-sidebar-foreground md:block","data-state":l,"data-collapsible":l==="collapsed"?n:"","data-variant":t,"data-side":e,children:[b.jsx("div",{className:q("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)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),b.jsx("div",{className:q("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)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...i,children:b.jsx("div",{"data-sidebar":"sidebar",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",children:o})})]})});UR.displayName="Sidebar";const HR=g.forwardRef(({className:e,onClick:t,...n},r)=>{const{toggleSidebar:o}=Id();return b.jsxs(Xc,{ref:r,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:q("h-7 w-7",e),onClick:i=>{t==null||t(i),o()},...n,children:[b.jsx(EV,{}),b.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});HR.displayName="SidebarTrigger";const WR=g.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:r}=Id();return b.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:q("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[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 group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});WR.displayName="SidebarRail";const KR=g.forwardRef(({className:e,...t},n)=>b.jsx("main",{ref:n,className:q("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));KR.displayName="SidebarInset";const GR=g.forwardRef(({className:e,...t},n)=>b.jsx(Ex,{ref:n,"data-sidebar":"input",className:q("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));GR.displayName="SidebarInput";const YR=g.forwardRef(({className:e,...t},n)=>b.jsx("div",{ref:n,"data-sidebar":"header",className:q("flex flex-col gap-2 p-2",e),...t}));YR.displayName="SidebarHeader";const XR=g.forwardRef(({className:e,...t},n)=>b.jsx("div",{ref:n,"data-sidebar":"footer",className:q("flex flex-col gap-2 p-2",e),...t}));XR.displayName="SidebarFooter";const QR=g.forwardRef(({className:e,...t},n)=>b.jsx(gS,{ref:n,"data-sidebar":"separator",className:q("mx-2 w-auto bg-sidebar-border",e),...t}));QR.displayName="SidebarSeparator";const ZR=g.forwardRef(({className:e,...t},n)=>b.jsx("div",{ref:n,"data-sidebar":"content",className:q("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));ZR.displayName="SidebarContent";const JR=g.forwardRef(({className:e,...t},n)=>b.jsx("div",{ref:n,"data-sidebar":"group",className:q("relative flex w-full min-w-0 flex-col p-2",e),...t}));JR.displayName="SidebarGroup";const e7=g.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const o=t?Fi:"div";return b.jsx(o,{ref:r,"data-sidebar":"group-label",className:q("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring 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})});e7.displayName="SidebarGroupLabel";const t7=g.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const o=t?Fi:"button";return b.jsx(o,{ref:r,"data-sidebar":"group-action",className:q("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...n})});t7.displayName="SidebarGroupAction";const n7=g.forwardRef(({className:e,...t},n)=>b.jsx("div",{ref:n,"data-sidebar":"group-content",className:q("w-full text-sm",e),...t}));n7.displayName="SidebarGroupContent";const r7=g.forwardRef(({className:e,...t},n)=>b.jsx("ul",{ref:n,"data-sidebar":"menu",className:q("flex w-full min-w-0 flex-col gap-1",e),...t}));r7.displayName="SidebarMenu";const o7=g.forwardRef(({className:e,...t},n)=>b.jsx("li",{ref:n,"data-sidebar":"menu-item",className:q("group/menu-item relative",e),...t}));o7.displayName="SidebarMenuItem";const Swe=ei("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(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"}}),i7=g.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:o,className:i,...a},s)=>{const l=e?Fi:"button",{isMobile:c,state:u}=Id(),d=b.jsx(l,{ref:s,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:q(Swe({variant:n,size:r}),i),...a});return o?(typeof o=="string"&&(o={children:o}),b.jsxs(BR,{children:[b.jsx(jR,{asChild:!0,children:d}),b.jsx(wS,{side:"right",align:"center",hidden:u!=="collapsed"||c,...o})]})):d});i7.displayName="SidebarMenuButton";const a7=g.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...r},o)=>{const i=t?Fi:"button";return b.jsx(i,{ref:o,"data-sidebar":"menu-action",className:q("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md: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 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...r})});a7.displayName="SidebarMenuAction";const s7=g.forwardRef(({className:e,...t},n)=>b.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:q("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","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}));s7.displayName="SidebarMenuBadge";const l7=g.forwardRef(({className:e,showIcon:t=!1,...n},r)=>{const o=g.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return b.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:q("flex h-8 items-center gap-2 rounded-md px-2",e),...n,children:[t&&b.jsx(Lr,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),b.jsx(Lr,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})});l7.displayName="SidebarMenuSkeleton";const c7=g.forwardRef(({className:e,...t},n)=>b.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:q("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}));c7.displayName="SidebarMenuSub";const u7=g.forwardRef(({...e},t)=>b.jsx("li",{ref:t,...e}));u7.displayName="SidebarMenuSubItem";const d7=g.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:r,...o},i)=>{const a=e?Fi:"a";return b.jsx(a,{ref:i,"data-sidebar":"menu-sub-button","data-size":t,className:q("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground 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 [&>svg]:text-sidebar-accent-foreground","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",`${n?"font-bold bg-white rounded-lg shadow-md text-[12px]":""}`,r),...o})});d7.displayName="SidebarMenuSubButton";var f7=["PageUp","PageDown"],h7=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],p7={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},ql="Slider",[SS,Cwe,Ewe]=Qo(ql),[g7]=kt(ql,[Ewe]),[Pwe,hm]=g7(ql),m7=g.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:i=1,orientation:a="horizontal",disabled:s=!1,minStepsBetweenThumbs:l=0,defaultValue:c=[r],value:u,onValueChange:d=()=>{},onValueCommit:f=()=>{},inverted:p=!1,form:h,...m}=e,v=g.useRef(new Set),y=g.useRef(0),x=a==="horizontal"?Owe:Twe,[S=[],C]=Ot({prop:u,defaultProp:c,onChange:A=>{var N;(N=[...v.current][y.current])==null||N.focus(),d(A)}}),E=g.useRef(S);function P(A){const D=Dwe(S,A);M(A,D)}function _(A){M(A,y.current)}function T(){const A=E.current[y.current];S[y.current]!==A&&f(S)}function M(A,D,{commit:N}={commit:!1}){const R=Lwe(i),U=Fwe(Math.round((A-r)/i)*i+r,R),L=Od(U,[r,o]);C((V=[])=>{const j=kwe(V,L,D);if(Iwe(j,l*i)){y.current=j.indexOf(L);const H=String(j)!==String(V);return H&&N&&f(j),H?j:V}else return V})}return b.jsx(Pwe,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:o,valueIndexToChangeRef:y,thumbs:v.current,values:S,orientation:a,form:h,children:b.jsx(SS.Provider,{scope:e.__scopeSlider,children:b.jsx(SS.Slot,{scope:e.__scopeSlider,children:b.jsx(x,{"aria-disabled":s,"data-disabled":s?"":void 0,...m,ref:t,onPointerDown:ne(m.onPointerDown,()=>{s||(E.current=S)}),min:r,max:o,inverted:p,onSlideStart:s?void 0:P,onSlideMove:s?void 0:_,onSlideEnd:s?void 0:T,onHomeKeyDown:()=>!s&&M(r,0,{commit:!0}),onEndKeyDown:()=>!s&&M(o,S.length-1,{commit:!0}),onStepKeyDown:({event:A,direction:D})=>{if(!s){const U=f7.includes(A.key)||A.shiftKey&&h7.includes(A.key)?10:1,L=y.current,V=S[L],j=i*U*D;M(V+j,L,{commit:!0})}}})})})})});m7.displayName=ql;var[v7,y7]=g7(ql,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Owe=g.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:l,onStepKeyDown:c,...u}=e,[d,f]=g.useState(null),p=je(t,x=>f(x)),h=g.useRef(void 0),m=Wr(o),v=m==="ltr",y=v&&!i||!v&&i;function w(x){const S=h.current||d.getBoundingClientRect(),C=[0,S.width],P=PS(C,y?[n,r]:[r,n]);return h.current=S,P(x-S.left)}return b.jsx(v7,{scope:e.__scopeSlider,startEdge:y?"left":"right",endEdge:y?"right":"left",direction:y?1:-1,size:"width",children:b.jsx(b7,{dir:m,"data-orientation":"horizontal",...u,ref:p,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const S=w(x.clientX);a==null||a(S)},onSlideMove:x=>{const S=w(x.clientX);s==null||s(S)},onSlideEnd:()=>{h.current=void 0,l==null||l()},onStepKeyDown:x=>{const C=p7[y?"from-left":"from-right"].includes(x.key);c==null||c({event:x,direction:C?-1:1})}})})}),Twe=g.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:s,onStepKeyDown:l,...c}=e,u=g.useRef(null),d=je(t,u),f=g.useRef(void 0),p=!o;function h(m){const v=f.current||u.current.getBoundingClientRect(),y=[0,v.height],x=PS(y,p?[r,n]:[n,r]);return f.current=v,x(m-v.top)}return b.jsx(v7,{scope:e.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1,children:b.jsx(b7,{"data-orientation":"vertical",...c,ref:d,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:m=>{const v=h(m.clientY);i==null||i(v)},onSlideMove:m=>{const v=h(m.clientY);a==null||a(v)},onSlideEnd:()=>{f.current=void 0,s==null||s()},onStepKeyDown:m=>{const y=p7[p?"from-bottom":"from-top"].includes(m.key);l==null||l({event:m,direction:y?-1:1})}})})}),b7=g.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:l,...c}=e,u=hm(ql,n);return b.jsx(ye.span,{...c,ref:t,onKeyDown:ne(e.onKeyDown,d=>{d.key==="Home"?(a(d),d.preventDefault()):d.key==="End"?(s(d),d.preventDefault()):f7.concat(h7).includes(d.key)&&(l(d),d.preventDefault())}),onPointerDown:ne(e.onPointerDown,d=>{const f=d.target;f.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(f)?f.focus():r(d)}),onPointerMove:ne(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:ne(e.onPointerUp,d=>{const f=d.target;f.hasPointerCapture(d.pointerId)&&(f.releasePointerCapture(d.pointerId),i(d))})})}),w7="SliderTrack",x7=g.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=hm(w7,n);return b.jsx(ye.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});x7.displayName=w7;var CS="SliderRange",S7=g.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=hm(CS,n),i=y7(CS,n),a=g.useRef(null),s=je(t,a),l=o.values.length,c=o.values.map(f=>P7(f,o.min,o.max)),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return b.jsx(ye.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:s,style:{...e.style,[i.startEdge]:u+"%",[i.endEdge]:d+"%"}})});S7.displayName=CS;var ES="SliderThumb",C7=g.forwardRef((e,t)=>{const n=Cwe(e.__scopeSlider),[r,o]=g.useState(null),i=je(t,s=>o(s)),a=g.useMemo(()=>r?n().findIndex(s=>s.ref.current===r):-1,[n,r]);return b.jsx(_we,{...e,ref:i,index:a})}),_we=g.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,a=hm(ES,n),s=y7(ES,n),[l,c]=g.useState(null),u=je(t,w=>c(w)),d=l?a.form||!!l.closest("form"):!0,f=Ju(l),p=a.values[r],h=p===void 0?0:P7(p,a.min,a.max),m=Awe(r,a.values.length),v=f==null?void 0:f[s.size],y=v?Nwe(v,h,s.direction):0;return g.useEffect(()=>{if(l)return a.thumbs.add(l),()=>{a.thumbs.delete(l)}},[l,a.thumbs]),b.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${h}% + ${y}px)`},children:[b.jsx(SS.ItemSlot,{scope:e.__scopeSlider,children:b.jsx(ye.span,{role:"slider","aria-label":e["aria-label"]||m,"aria-valuemin":a.min,"aria-valuenow":p,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...i,ref:u,style:p===void 0?{display:"none"}:e.style,onFocus:ne(e.onFocus,()=>{a.valueIndexToChangeRef.current=r})})}),d&&b.jsx(E7,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:p},r)]})});C7.displayName=ES;var Mwe="RadioBubbleInput",E7=g.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const o=g.useRef(null),i=je(o,r),a=wl(t);return g.useEffect(()=>{const s=o.current;if(!s)return;const l=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&u){const d=new Event("input",{bubbles:!0});u.call(s,t),s.dispatchEvent(d)}},[a,t]),b.jsx(ye.input,{style:{display:"none"},...n,ref:i,defaultValue:t})});E7.displayName=Mwe;function kwe(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,i)=>o-i)}function P7(e,t,n){const i=100/(n-t)*(e-t);return Od(i,[0,100])}function Awe(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function Dwe(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 Nwe(e,t,n){const r=e/2,i=PS([0,50],[0,r]);return(r-i(t)*n)*n}function $we(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function Iwe(e,t){if(t>0){const n=$we(e);return Math.min(...n)>=t}return!0}function PS(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 Lwe(e){return(String(e).split(".")[1]||"").length}function Fwe(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var O7=m7,Rwe=x7,Bwe=S7,jwe=C7;const T7=g.forwardRef(({className:e,...t},n)=>b.jsxs(O7,{ref:n,className:q("relative flex w-full touch-none select-none items-center",e),...t,children:[b.jsx(Rwe,{className:"relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20",children:b.jsx(Bwe,{className:"absolute h-full bg-primary"})}),b.jsx(jwe,{className:"block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"})]}));T7.displayName=O7.displayName;var zwe=(e,t,n,r,o,i,a,s)=>{let l=document.documentElement,c=["light","dark"];function u(p){(Array.isArray(e)?e:[e]).forEach(h=>{let m=h==="class",v=m&&i?o.map(y=>i[y]||y):o;m?(l.classList.remove(...v),l.classList.add(i&&i[p]?i[p]:p)):l.setAttribute(h,p)}),d(p)}function d(p){s&&c.includes(p)&&(l.style.colorScheme=p)}function f(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)u(r);else try{let p=localStorage.getItem(t)||n,h=a&&p==="system"?f():p;u(h)}catch{}},qwe=g.createContext(void 0),Vwe={setTheme:e=>{},themes:[]},Uwe=()=>{var e;return(e=g.useContext(qwe))!=null?e:Vwe};g.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:o,defaultTheme:i,value:a,themes:s,nonce:l,scriptProps:c})=>{let u=JSON.stringify([n,t,i,e,s,a,r,o]).slice(1,-1);return g.createElement("script",{...c,suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(${zwe.toString()})(${u})`}})});function Hwe(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 Wwe=e=>{switch(e){case"success":return Ywe;case"info":return Qwe;case"warning":return Xwe;case"error":return Zwe;default:return null}},Kwe=Array(12).fill(0),Gwe=({visible:e,className:t})=>O.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},O.createElement("div",{className:"sonner-spinner"},Kwe.map((n,r)=>O.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Ywe=O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},O.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"})),Xwe=O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},O.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"})),Qwe=O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},O.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"})),Zwe=O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},O.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"})),Jwe=O.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"},O.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),O.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),e1e=()=>{const[e,t]=O.useState(document.hidden);return O.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let OS=1;class t1e{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,i=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:OS++,a=this.toasts.find(l=>l.id===i),s=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),a?this.toasts=this.toasts.map(l=>l.id===i?(this.publish({...l,...t,id:i,title:r}),{...l,...t,id:i,dismissible:s,title:r}):l):this.addToast({title:r,...o,dismissible:s,id:i}),i},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 i=r!==void 0,a;const s=o.then(async c=>{if(a=["resolve",c],O.isValidElement(c))i=!1,this.create({id:r,type:"default",message:c});else if(r1e(c)&&!c.ok){i=!1;const d=typeof n.error=="function"?await n.error(`HTTP error! status: ${c.status}`):n.error,f=typeof n.description=="function"?await n.description(`HTTP error! status: ${c.status}`):n.description,h=typeof d=="object"&&!O.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:f,...h})}else if(c instanceof Error){i=!1;const d=typeof n.error=="function"?await n.error(c):n.error,f=typeof n.description=="function"?await n.description(c):n.description,h=typeof d=="object"&&!O.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:f,...h})}else if(n.success!==void 0){i=!1;const d=typeof n.success=="function"?await n.success(c):n.success,f=typeof n.description=="function"?await n.description(c):n.description,h=typeof d=="object"&&!O.isValidElement(d)?d:{message:d};this.create({id:r,type:"success",description:f,...h})}}).catch(async c=>{if(a=["reject",c],n.error!==void 0){i=!1;const u=typeof n.error=="function"?await n.error(c):n.error,d=typeof n.description=="function"?await n.description(c):n.description,p=typeof u=="object"&&!O.isValidElement(u)?u:{message:u};this.create({id:r,type:"error",description:d,...p})}}).finally(()=>{i&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((c,u)=>s.then(()=>a[0]==="reject"?u(a[1]):c(a[1])).catch(u));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)||OS++;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 Zn=new t1e,n1e=(e,t)=>{const n=(t==null?void 0:t.id)||OS++;return Zn.addToast({title:e,...t,id:n}),n},r1e=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",o1e=n1e,i1e=()=>Zn.toasts,a1e=()=>Zn.getActiveToasts();Object.assign(o1e,{success:Zn.success,info:Zn.info,warning:Zn.warning,error:Zn.error,custom:Zn.custom,message:Zn.message,promise:Zn.promise,dismiss:Zn.dismiss,loading:Zn.loading},{getHistory:i1e,getToasts:a1e}),Hwe("[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 pm(e){return e.label!==void 0}const s1e=3,l1e="24px",c1e="16px",_7=4e3,u1e=356,d1e=14,f1e=45,h1e=200;function Bo(...e){return e.filter(Boolean).join(" ")}function p1e(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const g1e=e=>{var t,n,r,o,i,a,s,l,c;const{invert:u,toast:d,unstyled:f,interacting:p,setHeights:h,visibleToasts:m,heights:v,index:y,toasts:w,expanded:x,removeToast:S,defaultRichColors:C,closeButton:E,style:P,cancelButtonStyle:_,actionButtonStyle:T,className:M="",descriptionClassName:A="",duration:D,position:N,gap:R,expandByDefault:U,classNames:L,icons:V,closeButtonAriaLabel:j="Close toast"}=e,[H,se]=O.useState(null),[pe,W]=O.useState(null),[Y,F]=O.useState(!1),[ee,fe]=O.useState(!1),[Z,J]=O.useState(!1),[Q,oe]=O.useState(!1),[le,z]=O.useState(!1),[_e,X]=O.useState(0),[be,$e]=O.useState(0),Ve=O.useRef(d.duration||D||_7),ae=O.useRef(null),Ee=O.useRef(null),Xe=y===0,$=y+1<=m,B=d.type,G=d.dismissible!==!1,he=d.className||"",re=d.descriptionClassName||"",ce=O.useMemo(()=>v.findIndex(Me=>Me.toastId===d.id)||0,[v,d.id]),Oe=O.useMemo(()=>{var Me;return(Me=d.closeButton)!=null?Me:E},[d.closeButton,E]),Ge=O.useMemo(()=>d.duration||D||_7,[d.duration,D]),Qe=O.useRef(0),et=O.useRef(0),$t=O.useRef(0),rt=O.useRef(null),[gt,Jt]=N.split("-"),en=O.useMemo(()=>v.reduce((Me,ke,ct)=>ct>=ce?Me:Me+ke.height,0),[v,ce]),Wn=e1e(),vn=d.invert||u,$n=B==="loading";et.current=O.useMemo(()=>ce*R+en,[ce,en]),O.useEffect(()=>{Ve.current=Ge},[Ge]),O.useEffect(()=>{F(!0)},[]),O.useEffect(()=>{const Me=Ee.current;if(Me){const ke=Me.getBoundingClientRect().height;return $e(ke),h(ct=>[{toastId:d.id,height:ke,position:d.position},...ct]),()=>h(ct=>ct.filter(ft=>ft.toastId!==d.id))}},[h,d.id]),O.useLayoutEffect(()=>{if(!Y)return;const Me=Ee.current,ke=Me.style.height;Me.style.height="auto";const ct=Me.getBoundingClientRect().height;Me.style.height=ke,$e(ct),h(ft=>ft.find(ut=>ut.toastId===d.id)?ft.map(ut=>ut.toastId===d.id?{...ut,height:ct}:ut):[{toastId:d.id,height:ct,position:d.position},...ft])},[Y,d.title,d.description,h,d.id,d.jsx,d.action,d.cancel]);const Ne=O.useCallback(()=>{fe(!0),X(et.current),h(Me=>Me.filter(ke=>ke.toastId!==d.id)),setTimeout(()=>{S(d)},h1e)},[d,S,h,et]);O.useEffect(()=>{if(d.promise&&B==="loading"||d.duration===1/0||d.type==="loading")return;let Me;return x||p||Wn?(()=>{if($t.current<Qe.current){const ft=new Date().getTime()-Qe.current;Ve.current=Ve.current-ft}$t.current=new Date().getTime()})():(()=>{Ve.current!==1/0&&(Qe.current=new Date().getTime(),Me=setTimeout(()=>{d.onAutoClose==null||d.onAutoClose.call(d,d),Ne()},Ve.current))})(),()=>clearTimeout(Me)},[x,p,d,B,Wn,Ne]),O.useEffect(()=>{d.delete&&(Ne(),d.onDismiss==null||d.onDismiss.call(d,d))},[Ne,d.delete]);function Te(){var Me;if(V!=null&&V.loading){var ke;return O.createElement("div",{className:Bo(L==null?void 0:L.loader,d==null||(ke=d.classNames)==null?void 0:ke.loader,"sonner-loader"),"data-visible":B==="loading"},V.loading)}return O.createElement(Gwe,{className:Bo(L==null?void 0:L.loader,d==null||(Me=d.classNames)==null?void 0:Me.loader),visible:B==="loading"})}const Ie=d.icon||(V==null?void 0:V[B])||Wwe(B);var we,ze;return O.createElement("li",{tabIndex:0,ref:Ee,className:Bo(M,he,L==null?void 0:L.toast,d==null||(t=d.classNames)==null?void 0:t.toast,L==null?void 0:L.default,L==null?void 0:L[B],d==null||(n=d.classNames)==null?void 0:n[B]),"data-sonner-toast":"","data-rich-colors":(we=d.richColors)!=null?we:C,"data-styled":!(d.jsx||d.unstyled||f),"data-mounted":Y,"data-promise":!!d.promise,"data-swiped":le,"data-removed":ee,"data-visible":$,"data-y-position":gt,"data-x-position":Jt,"data-index":y,"data-front":Xe,"data-swiping":Z,"data-dismissible":G,"data-type":B,"data-invert":vn,"data-swipe-out":Q,"data-swipe-direction":pe,"data-expanded":!!(x||U&&Y),"data-testid":d.testId,style:{"--index":y,"--toasts-before":y,"--z-index":w.length-y,"--offset":`${ee?_e:et.current}px`,"--initial-height":U?"auto":`${be}px`,...P,...d.style},onDragEnd:()=>{J(!1),se(null),rt.current=null},onPointerDown:Me=>{Me.button!==2&&($n||!G||(ae.current=new Date,X(et.current),Me.target.setPointerCapture(Me.pointerId),Me.target.tagName!=="BUTTON"&&(J(!0),rt.current={x:Me.clientX,y:Me.clientY})))},onPointerUp:()=>{var Me,ke,ct;if(Q||!G)return;rt.current=null;const ft=Number(((Me=Ee.current)==null?void 0:Me.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Cn=Number(((ke=Ee.current)==null?void 0:ke.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ut=new Date().getTime()-((ct=ae.current)==null?void 0:ct.getTime()),mt=H==="x"?ft:Cn,Hr=Math.abs(mt)/ut;if(Math.abs(mt)>=f1e||Hr>.11){X(et.current),d.onDismiss==null||d.onDismiss.call(d,d),W(H==="x"?ft>0?"right":"left":Cn>0?"down":"up"),Ne(),oe(!0);return}else{var En,nr;(En=Ee.current)==null||En.style.setProperty("--swipe-amount-x","0px"),(nr=Ee.current)==null||nr.style.setProperty("--swipe-amount-y","0px")}z(!1),J(!1),se(null)},onPointerMove:Me=>{var ke,ct,ft;if(!rt.current||!G||((ke=window.getSelection())==null?void 0:ke.toString().length)>0)return;const ut=Me.clientY-rt.current.y,mt=Me.clientX-rt.current.x;var Hr;const En=(Hr=e.swipeDirections)!=null?Hr:p1e(N);!H&&(Math.abs(mt)>1||Math.abs(ut)>1)&&se(Math.abs(mt)>Math.abs(ut)?"x":"y");let nr={x:0,y:0};const xf=Xo=>1/(1.5+Math.abs(Xo)/20);if(H==="y"){if(En.includes("top")||En.includes("bottom"))if(En.includes("top")&&ut<0||En.includes("bottom")&&ut>0)nr.y=ut;else{const Xo=ut*xf(ut);nr.y=Math.abs(Xo)<Math.abs(ut)?Xo:ut}}else if(H==="x"&&(En.includes("left")||En.includes("right")))if(En.includes("left")&&mt<0||En.includes("right")&&mt>0)nr.x=mt;else{const Xo=mt*xf(mt);nr.x=Math.abs(Xo)<Math.abs(mt)?Xo:mt}(Math.abs(nr.x)>0||Math.abs(nr.y)>0)&&z(!0),(ct=Ee.current)==null||ct.style.setProperty("--swipe-amount-x",`${nr.x}px`),(ft=Ee.current)==null||ft.style.setProperty("--swipe-amount-y",`${nr.y}px`)}},Oe&&!d.jsx&&B!=="loading"?O.createElement("button",{"aria-label":j,"data-disabled":$n,"data-close-button":!0,onClick:$n||!G?()=>{}:()=>{Ne(),d.onDismiss==null||d.onDismiss.call(d,d)},className:Bo(L==null?void 0:L.closeButton,d==null||(r=d.classNames)==null?void 0:r.closeButton)},(ze=V==null?void 0:V.close)!=null?ze:Jwe):null,(B||d.icon||d.promise)&&d.icon!==null&&((V==null?void 0:V[B])!==null||d.icon)?O.createElement("div",{"data-icon":"",className:Bo(L==null?void 0:L.icon,d==null||(o=d.classNames)==null?void 0:o.icon)},d.promise||d.type==="loading"&&!d.icon?d.icon||Te():null,d.type!=="loading"?Ie:null):null,O.createElement("div",{"data-content":"",className:Bo(L==null?void 0:L.content,d==null||(i=d.classNames)==null?void 0:i.content)},O.createElement("div",{"data-title":"",className:Bo(L==null?void 0:L.title,d==null||(a=d.classNames)==null?void 0:a.title)},d.jsx?d.jsx:typeof d.title=="function"?d.title():d.title),d.description?O.createElement("div",{"data-description":"",className:Bo(A,re,L==null?void 0:L.description,d==null||(s=d.classNames)==null?void 0:s.description)},typeof d.description=="function"?d.description():d.description):null),O.isValidElement(d.cancel)?d.cancel:d.cancel&&pm(d.cancel)?O.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||_,onClick:Me=>{pm(d.cancel)&&G&&(d.cancel.onClick==null||d.cancel.onClick.call(d.cancel,Me),Ne())},className:Bo(L==null?void 0:L.cancelButton,d==null||(l=d.classNames)==null?void 0:l.cancelButton)},d.cancel.label):null,O.isValidElement(d.action)?d.action:d.action&&pm(d.action)?O.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||T,onClick:Me=>{pm(d.action)&&(d.action.onClick==null||d.action.onClick.call(d.action,Me),!Me.defaultPrevented&&Ne())},className:Bo(L==null?void 0:L.actionButton,d==null||(c=d.classNames)==null?void 0:c.actionButton)},d.action.label):null)};function M7(){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 m1e(e,t){const n={};return[e,t].forEach((r,o)=>{const i=o===1,a=i?"--mobile-offset":"--offset",s=i?c1e:l1e;function l(c){["top","right","bottom","left"].forEach(u=>{n[`${a}-${u}`]=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[`${a}-${c}`]=s:n[`${a}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(s)}),n}const v1e=O.forwardRef(function(t,n){const{id:r,invert:o,position:i="bottom-right",hotkey:a=["altKey","KeyT"],expand:s,closeButton:l,className:c,offset:u,mobileOffset:d,theme:f="light",richColors:p,duration:h,style:m,visibleToasts:v=s1e,toastOptions:y,dir:w=M7(),gap:x=d1e,icons:S,containerAriaLabel:C="Notifications"}=t,[E,P]=O.useState([]),_=O.useMemo(()=>r?E.filter(Y=>Y.toasterId===r):E.filter(Y=>!Y.toasterId),[E,r]),T=O.useMemo(()=>Array.from(new Set([i].concat(_.filter(Y=>Y.position).map(Y=>Y.position)))),[_,i]),[M,A]=O.useState([]),[D,N]=O.useState(!1),[R,U]=O.useState(!1),[L,V]=O.useState(f!=="system"?f:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),j=O.useRef(null),H=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),se=O.useRef(null),pe=O.useRef(!1),W=O.useCallback(Y=>{P(F=>{var ee;return(ee=F.find(fe=>fe.id===Y.id))!=null&&ee.delete||Zn.dismiss(Y.id),F.filter(({id:fe})=>fe!==Y.id)})},[]);return O.useEffect(()=>Zn.subscribe(Y=>{if(Y.dismiss){requestAnimationFrame(()=>{P(F=>F.map(ee=>ee.id===Y.id?{...ee,delete:!0}:ee))});return}setTimeout(()=>{xr.flushSync(()=>{P(F=>{const ee=F.findIndex(fe=>fe.id===Y.id);return ee!==-1?[...F.slice(0,ee),{...F[ee],...Y},...F.slice(ee+1)]:[Y,...F]})})})}),[E]),O.useEffect(()=>{if(f!=="system"){V(f);return}if(f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?V("dark"):V("light")),typeof window>"u")return;const Y=window.matchMedia("(prefers-color-scheme: dark)");try{Y.addEventListener("change",({matches:F})=>{V(F?"dark":"light")})}catch{Y.addListener(({matches:ee})=>{try{V(ee?"dark":"light")}catch(fe){console.error(fe)}})}},[f]),O.useEffect(()=>{E.length<=1&&N(!1)},[E]),O.useEffect(()=>{const Y=F=>{var ee;if(a.every(J=>F[J]||F.code===J)){var Z;N(!0),(Z=j.current)==null||Z.focus()}F.code==="Escape"&&(document.activeElement===j.current||(ee=j.current)!=null&&ee.contains(document.activeElement))&&N(!1)};return document.addEventListener("keydown",Y),()=>document.removeEventListener("keydown",Y)},[a]),O.useEffect(()=>{if(j.current)return()=>{se.current&&(se.current.focus({preventScroll:!0}),se.current=null,pe.current=!1)}},[j.current]),O.createElement("section",{ref:n,"aria-label":`${C} ${H}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},T.map((Y,F)=>{var ee;const[fe,Z]=Y.split("-");return _.length?O.createElement("ol",{key:Y,dir:w==="auto"?M7():w,tabIndex:-1,ref:j,className:c,"data-sonner-toaster":!0,"data-sonner-theme":L,"data-y-position":fe,"data-x-position":Z,style:{"--front-toast-height":`${((ee=M[0])==null?void 0:ee.height)||0}px`,"--width":`${u1e}px`,"--gap":`${x}px`,...m,...m1e(u,d)},onBlur:J=>{pe.current&&!J.currentTarget.contains(J.relatedTarget)&&(pe.current=!1,se.current&&(se.current.focus({preventScroll:!0}),se.current=null))},onFocus:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||pe.current||(pe.current=!0,se.current=J.relatedTarget)},onMouseEnter:()=>N(!0),onMouseMove:()=>N(!0),onMouseLeave:()=>{R||N(!1)},onDragEnd:()=>N(!1),onPointerDown:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||U(!0)},onPointerUp:()=>U(!1)},_.filter(J=>!J.position&&F===0||J.position===Y).map((J,Q)=>{var oe,le;return O.createElement(g1e,{key:J.id,icons:S,index:Q,toast:J,defaultRichColors:p,duration:(oe=y==null?void 0:y.duration)!=null?oe:h,className:y==null?void 0:y.className,descriptionClassName:y==null?void 0:y.descriptionClassName,invert:o,visibleToasts:v,closeButton:(le=y==null?void 0:y.closeButton)!=null?le:l,interacting:R,position:Y,style:y==null?void 0:y.style,unstyled:y==null?void 0:y.unstyled,classNames:y==null?void 0:y.classNames,cancelButtonStyle:y==null?void 0:y.cancelButtonStyle,actionButtonStyle:y==null?void 0:y.actionButtonStyle,closeButtonAriaLabel:y==null?void 0:y.closeButtonAriaLabel,removeToast:W,toasts:_.filter(z=>z.position==J.position),heights:M.filter(z=>z.position==J.position),setHeights:A,expandByDefault:s,gap:x,expanded:D,swipeDirections:t.swipeDirections})})):null}))}),y1e=({...e})=>{const{theme:t="system"}=Uwe();return b.jsx(v1e,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var gm="Switch",[b1e]=kt(gm),[w1e,x1e]=b1e(gm),k7=g.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:l="on",onCheckedChange:c,form:u,...d}=e,[f,p]=g.useState(null),h=je(t,x=>p(x)),m=g.useRef(!1),v=f?u||!!f.closest("form"):!0,[y,w]=Ot({prop:o,defaultProp:i??!1,onChange:c,caller:gm});return b.jsxs(w1e,{scope:n,checked:y,disabled:s,children:[b.jsx(ye.button,{type:"button",role:"switch","aria-checked":y,"aria-required":a,"data-state":$7(y),"data-disabled":s?"":void 0,disabled:s,value:l,...d,ref:h,onClick:ne(e.onClick,x=>{w(S=>!S),v&&(m.current=x.isPropagationStopped(),m.current||x.stopPropagation())})}),v&&b.jsx(N7,{control:f,bubbles:!m.current,name:r,value:l,checked:y,required:a,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});k7.displayName=gm;var A7="SwitchThumb",D7=g.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=x1e(A7,n);return b.jsx(ye.span,{"data-state":$7(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});D7.displayName=A7;var S1e="SwitchBubbleInput",N7=g.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},i)=>{const a=g.useRef(null),s=je(a,i),l=wl(n),c=Ju(t);return g.useEffect(()=>{const u=a.current;if(!u)return;const d=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==n&&p){const h=new Event("click",{bubbles:r});p.call(u,n),u.dispatchEvent(h)}},[l,n,r]),b.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:s,style:{...o.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});N7.displayName=S1e;function $7(e){return e?"checked":"unchecked"}var I7=k7,C1e=D7;const L7=g.forwardRef(({className:e,...t},n)=>b.jsx(I7,{className:q("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:b.jsx(C1e,{className:q("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));L7.displayName=I7.displayName;const F7=g.forwardRef(({className:e,...t},n)=>b.jsx("div",{className:"relative w-full overflow-auto",children:b.jsx("table",{ref:n,className:q("w-full caption-bottom text-sm",e),...t})}));F7.displayName="Table";const R7=g.forwardRef(({className:e,...t},n)=>b.jsx("thead",{ref:n,className:q("[&_tr]:border-b",e),...t}));R7.displayName="TableHeader";const B7=g.forwardRef(({className:e,...t},n)=>b.jsx("tbody",{ref:n,className:q("[&_tr:last-child]:border-0",e),...t}));B7.displayName="TableBody";const j7=g.forwardRef(({className:e,...t},n)=>b.jsx("tfoot",{ref:n,className:q("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));j7.displayName="TableFooter";const z7=g.forwardRef(({className:e,...t},n)=>b.jsx("tr",{ref:n,className:q("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));z7.displayName="TableRow";const q7=g.forwardRef(({className:e,...t},n)=>b.jsx("th",{ref:n,className:q("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));q7.displayName="TableHead";const V7=g.forwardRef(({className:e,...t},n)=>b.jsx("td",{ref:n,className:q("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));V7.displayName="TableCell";const U7=g.forwardRef(({className:e,...t},n)=>b.jsx("caption",{ref:n,className:q("mt-4 text-sm text-muted-foreground",e),...t}));U7.displayName="TableCaption";var mm="Tabs",[E1e]=kt(mm,[Lo]),H7=Lo(),[P1e,TS]=E1e(mm),W7=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:a="horizontal",dir:s,activationMode:l="automatic",...c}=e,u=Wr(s),[d,f]=Ot({prop:r,onChange:o,defaultProp:i??"",caller:mm});return b.jsx(P1e,{scope:n,baseId:Et(),value:d,onValueChange:f,orientation:a,dir:u,activationMode:l,children:b.jsx(ye.div,{dir:u,"data-orientation":a,...c,ref:t})})});W7.displayName=mm;var K7="TabsList",G7=g.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=TS(K7,n),a=H7(n);return b.jsx(ld,{asChild:!0,...a,orientation:i.orientation,dir:i.dir,loop:r,children:b.jsx(ye.div,{role:"tablist","aria-orientation":i.orientation,...o,ref:t})})});G7.displayName=K7;var Y7="TabsTrigger",X7=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,a=TS(Y7,n),s=H7(n),l=J7(a.baseId,r),c=e9(a.baseId,r),u=r===a.value;return b.jsx(cd,{asChild:!0,...s,focusable:!o,active:u,children:b.jsx(ye.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...i,ref:t,onMouseDown:ne(e.onMouseDown,d=>{!o&&d.button===0&&d.ctrlKey===!1?a.onValueChange(r):d.preventDefault()}),onKeyDown:ne(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&a.onValueChange(r)}),onFocus:ne(e.onFocus,()=>{const d=a.activationMode!=="manual";!u&&!o&&d&&a.onValueChange(r)})})})});X7.displayName=Y7;var Q7="TabsContent",Z7=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...a}=e,s=TS(Q7,n),l=J7(s.baseId,r),c=e9(s.baseId,r),u=r===s.value,d=g.useRef(u);return g.useEffect(()=>{const f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),b.jsx(Tt,{present:o||u,children:({present:f})=>b.jsx(ye.div,{"data-state":u?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":l,hidden:!f,id:c,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:f&&i})})});Z7.displayName=Q7;function J7(e,t){return`${e}-trigger-${t}`}function e9(e,t){return`${e}-content-${t}`}var O1e=W7,t9=G7,n9=X7,r9=Z7;const T1e=O1e,o9=g.forwardRef(({className:e,...t},n)=>b.jsx(t9,{ref:n,className:q("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));o9.displayName=t9.displayName;const i9=g.forwardRef(({className:e,...t},n)=>b.jsx(n9,{ref:n,className:q("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));i9.displayName=n9.displayName;const a9=g.forwardRef(({className:e,...t},n)=>b.jsx(r9,{ref:n,className:q("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));a9.displayName=r9.displayName;const s9=g.forwardRef(({className:e,...t},n)=>b.jsx("textarea",{className:q("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));s9.displayName="Textarea";var _S="ToastProvider",[MS,_1e,M1e]=Qo("Toast"),[l9]=kt("Toast",[M1e]),[k1e,vm]=l9(_S),c9=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,l]=g.useState(null),[c,u]=g.useState(0),d=g.useRef(!1),f=g.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${_S}\`. Expected non-empty \`string\`.`),b.jsx(MS.Provider,{scope:t,children:b.jsx(k1e,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:g.useCallback(()=>u(p=>p+1),[]),onToastRemove:g.useCallback(()=>u(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:a})})};c9.displayName=_S;var u9="ToastViewport",A1e=["F8"],kS="toast.viewportPause",AS="toast.viewportResume",d9=g.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=A1e,label:o="Notifications ({hotkey})",...i}=e,a=vm(u9,n),s=_1e(n),l=g.useRef(null),c=g.useRef(null),u=g.useRef(null),d=g.useRef(null),f=je(t,d,a.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),h=a.toastCount>0;g.useEffect(()=>{const v=y=>{var x;r.length!==0&&r.every(S=>y[S]||y.code===S)&&((x=d.current)==null||x.focus())};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[r]),g.useEffect(()=>{const v=l.current,y=d.current;if(h&&v&&y){const w=()=>{if(!a.isClosePausedRef.current){const E=new CustomEvent(kS);y.dispatchEvent(E),a.isClosePausedRef.current=!0}},x=()=>{if(a.isClosePausedRef.current){const E=new CustomEvent(AS);y.dispatchEvent(E),a.isClosePausedRef.current=!1}},S=E=>{!v.contains(E.relatedTarget)&&x()},C=()=>{v.contains(document.activeElement)||x()};return v.addEventListener("focusin",w),v.addEventListener("focusout",S),v.addEventListener("pointermove",w),v.addEventListener("pointerleave",C),window.addEventListener("blur",w),window.addEventListener("focus",x),()=>{v.removeEventListener("focusin",w),v.removeEventListener("focusout",S),v.removeEventListener("pointermove",w),v.removeEventListener("pointerleave",C),window.removeEventListener("blur",w),window.removeEventListener("focus",x)}}},[h,a.isClosePausedRef]);const m=g.useCallback(({tabbingDirection:v})=>{const w=s().map(x=>{const S=x.ref.current,C=[S,...U1e(S)];return v==="forwards"?C:C.reverse()});return(v==="forwards"?w.reverse():w).flat()},[s]);return g.useEffect(()=>{const v=d.current;if(v){const y=w=>{var C,E,P;const x=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!x){const _=document.activeElement,T=w.shiftKey;if(w.target===v&&T){(C=c.current)==null||C.focus();return}const D=m({tabbingDirection:T?"backwards":"forwards"}),N=D.findIndex(R=>R===_);$S(D.slice(N+1))?w.preventDefault():T?(E=c.current)==null||E.focus():(P=u.current)==null||P.focus()}};return v.addEventListener("keydown",y),()=>v.removeEventListener("keydown",y)}},[s,m]),b.jsxs(BG,{ref:l,role:"region","aria-label":o.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:h?void 0:"none"},children:[h&&b.jsx(DS,{ref:c,onFocusFromOutsideViewport:()=>{const v=m({tabbingDirection:"forwards"});$S(v)}}),b.jsx(MS.Slot,{scope:n,children:b.jsx(ye.ol,{tabIndex:-1,...i,ref:f})}),h&&b.jsx(DS,{ref:u,onFocusFromOutsideViewport:()=>{const v=m({tabbingDirection:"backwards"});$S(v)}})]})});d9.displayName=u9;var f9="ToastFocusProxy",DS=g.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=vm(f9,n);return b.jsx(Xg,{tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{var c;const s=a.relatedTarget;!((c=i.viewport)!=null&&c.contains(s))&&r()}})});DS.displayName=f9;var Ld="Toast",D1e="toast.swipeStart",N1e="toast.swipeMove",$1e="toast.swipeCancel",I1e="toast.swipeEnd",h9=g.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s,l]=Ot({prop:r,defaultProp:o??!0,onChange:i,caller:Ld});return b.jsx(Tt,{present:n||s,children:b.jsx(R1e,{open:s,...a,ref:t,onClose:()=>l(!1),onPause:ht(e.onPause),onResume:ht(e.onResume),onSwipeStart:ne(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ne(e.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:ne(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ne(e.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});h9.displayName=Ld;var[L1e,F1e]=l9(Ld,{onClose(){}}),R1e=g.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:p,...h}=e,m=vm(Ld,n),[v,y]=g.useState(null),w=je(t,R=>y(R)),x=g.useRef(null),S=g.useRef(null),C=o||m.duration,E=g.useRef(0),P=g.useRef(C),_=g.useRef(0),{onToastAdd:T,onToastRemove:M}=m,A=ht(()=>{var U;(v==null?void 0:v.contains(document.activeElement))&&((U=m.viewport)==null||U.focus()),a()}),D=g.useCallback(R=>{!R||R===1/0||(window.clearTimeout(_.current),E.current=new Date().getTime(),_.current=window.setTimeout(A,R))},[A]);g.useEffect(()=>{const R=m.viewport;if(R){const U=()=>{D(P.current),c==null||c()},L=()=>{const V=new Date().getTime()-E.current;P.current=P.current-V,window.clearTimeout(_.current),l==null||l()};return R.addEventListener(kS,L),R.addEventListener(AS,U),()=>{R.removeEventListener(kS,L),R.removeEventListener(AS,U)}}},[m.viewport,C,l,c,D]),g.useEffect(()=>{i&&!m.isClosePausedRef.current&&D(C)},[i,C,m.isClosePausedRef,D]),g.useEffect(()=>(T(),()=>M()),[T,M]);const N=g.useMemo(()=>v?w9(v):null,[v]);return m.viewport?b.jsxs(b.Fragment,{children:[N&&b.jsx(B1e,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:N}),b.jsx(L1e,{scope:n,onClose:A,children:Oc.createPortal(b.jsx(MS.ItemSlot,{scope:n,children:b.jsx(RG,{asChild:!0,onEscapeKeyDown:ne(s,()=>{m.isFocusedToastEscapeKeyDownRef.current||A(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:b.jsx(ye.li,{tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":m.swipeDirection,...h,ref:w,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ne(e.onKeyDown,R=>{R.key==="Escape"&&(s==null||s(R.nativeEvent),R.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,A()))}),onPointerDown:ne(e.onPointerDown,R=>{R.button===0&&(x.current={x:R.clientX,y:R.clientY})}),onPointerMove:ne(e.onPointerMove,R=>{if(!x.current)return;const U=R.clientX-x.current.x,L=R.clientY-x.current.y,V=!!S.current,j=["left","right"].includes(m.swipeDirection),H=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,se=j?H(0,U):0,pe=j?0:H(0,L),W=R.pointerType==="touch"?10:2,Y={x:se,y:pe},F={originalEvent:R,delta:Y};V?(S.current=Y,ym(N1e,d,F,{discrete:!1})):x9(Y,m.swipeDirection,W)?(S.current=Y,ym(D1e,u,F,{discrete:!1}),R.target.setPointerCapture(R.pointerId)):(Math.abs(U)>W||Math.abs(L)>W)&&(x.current=null)}),onPointerUp:ne(e.onPointerUp,R=>{const U=S.current,L=R.target;if(L.hasPointerCapture(R.pointerId)&&L.releasePointerCapture(R.pointerId),S.current=null,x.current=null,U){const V=R.currentTarget,j={originalEvent:R,delta:U};x9(U,m.swipeDirection,m.swipeThreshold)?ym(I1e,p,j,{discrete:!0}):ym($1e,f,j,{discrete:!0}),V.addEventListener("click",H=>H.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),B1e=e=>{const{__scopeToast:t,children:n,...r}=e,o=vm(Ld,t),[i,a]=g.useState(!1),[s,l]=g.useState(!1);return q1e(()=>a(!0)),g.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:b.jsx(Sa,{asChild:!0,children:b.jsx(Xg,{...r,children:i&&b.jsxs(b.Fragment,{children:[o.label," ",n]})})})},j1e="ToastTitle",p9=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return b.jsx(ye.div,{...r,ref:t})});p9.displayName=j1e;var z1e="ToastDescription",g9=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return b.jsx(ye.div,{...r,ref:t})});g9.displayName=z1e;var m9="ToastAction",v9=g.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?b.jsx(b9,{altText:n,asChild:!0,children:b.jsx(NS,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${m9}\`. Expected non-empty \`string\`.`),null)});v9.displayName=m9;var y9="ToastClose",NS=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=F1e(y9,n);return b.jsx(b9,{asChild:!0,children:b.jsx(ye.button,{type:"button",...r,ref:t,onClick:ne(e.onClick,o.onClose)})})});NS.displayName=y9;var b9=g.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return b.jsx(ye.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function w9(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),V1e(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...w9(r))}}),t}function ym(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Tc(o,i):o.dispatchEvent(i)}var x9=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function q1e(e=()=>{}){const t=ht(e);At(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function V1e(e){return e.nodeType===e.ELEMENT_NODE}function U1e(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 $S(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var H1e=c9,S9=d9,C9=h9,E9=p9,P9=g9,O9=v9,T9=NS;const _9=H1e,IS=g.forwardRef(({className:e,...t},n)=>b.jsx(S9,{ref:n,className:q("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));IS.displayName=S9.displayName;const W1e=ei("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground",success:"success group border-success bg-success text-success-foreground"}},defaultVariants:{variant:"default"}}),LS=g.forwardRef(({className:e,variant:t,...n},r)=>b.jsx(C9,{ref:r,className:q(W1e({variant:t}),e),...n}));LS.displayName=C9.displayName;const M9=g.forwardRef(({className:e,...t},n)=>b.jsx(O9,{ref:n,className:q("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));M9.displayName=O9.displayName;const FS=g.forwardRef(({className:e,...t},n)=>b.jsx(T9,{ref:n,className:q("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:b.jsx(Eh,{className:"h-4 w-4"})}));FS.displayName=T9.displayName;const RS=g.forwardRef(({className:e,...t},n)=>b.jsx(E9,{ref:n,className:q("text-sm font-semibold [&+div]:text-xs",e),...t}));RS.displayName=E9.displayName;const BS=g.forwardRef(({className:e,...t},n)=>b.jsx(P9,{ref:n,className:q("text-sm opacity-90",e),...t}));BS.displayName=P9.displayName;const K1e=1,G1e=1e6;let jS=0;function Y1e(){return jS=(jS+1)%Number.MAX_SAFE_INTEGER,jS.toString()}const zS=new Map,k9=e=>{if(zS.has(e))return;const t=setTimeout(()=>{zS.delete(e),Fd({type:"REMOVE_TOAST",toastId:e})},G1e);zS.set(e,t)},A9=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,K1e)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?k9(n):e.toasts.forEach(r=>{k9(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},bm=[];let wm={toasts:[]};function Fd(e){wm=A9(wm,e),bm.forEach(t=>{t(wm)})}function D9({...e}){const t=Y1e(),n=o=>Fd({type:"UPDATE_TOAST",toast:{...o,id:t}}),r=()=>Fd({type:"DISMISS_TOAST",toastId:t});return Fd({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function N9(){const[e,t]=g.useState(wm);return g.useEffect(()=>(bm.push(t),()=>{const n=bm.indexOf(t);n>-1&&bm.splice(n,1)}),[e]),{...e,toast:D9,dismiss:n=>Fd({type:"DISMISS_TOAST",toastId:n})}}function X1e(){const{toasts:e}=N9();return b.jsxs(_9,{children:[e.map(function({id:t,title:n,description:r,action:o,...i}){return b.jsxs(LS,{...i,className:"shadow-lg pointer-events-auto",children:[b.jsxs("div",{className:"grid gap-1",children:[n&&b.jsx(RS,{children:n}),r&&b.jsx(BS,{children:r})]}),o,b.jsx(FS,{})]},t)}),b.jsx(IS,{style:{position:"fixed",bottom:"10px"}})]})}var $9="Toggle",qS=g.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:o,...i}=e,[a,s]=Ot({prop:n,onChange:o,defaultProp:r??!1,caller:$9});return b.jsx(ye.button,{type:"button","aria-pressed":a,"data-state":a?"on":"off","data-disabled":e.disabled?"":void 0,...i,ref:t,onClick:ne(e.onClick,()=>{e.disabled||s(!a)})})});qS.displayName=$9;var I9=qS;const VS=ei("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),L9=g.forwardRef(({className:e,variant:t,size:n,...r},o)=>b.jsx(I9,{ref:o,className:q(VS({variant:t,size:n,className:e})),...r}));L9.displayName=I9.displayName;var ia="ToggleGroup",[F9]=kt(ia,[Lo]),R9=Lo(),US=O.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const o=r;return b.jsx(Q1e,{...o,ref:t})}if(n==="multiple"){const o=r;return b.jsx(Z1e,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${ia}\``)});US.displayName=ia;var[B9,j9]=F9(ia),Q1e=O.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...i}=e,[a,s]=Ot({prop:n,defaultProp:r??"",onChange:o,caller:ia});return b.jsx(B9,{scope:e.__scopeToggleGroup,type:"single",value:O.useMemo(()=>a?[a]:[],[a]),onItemActivate:s,onItemDeactivate:O.useCallback(()=>s(""),[s]),children:b.jsx(z9,{...i,ref:t})})}),Z1e=O.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...i}=e,[a,s]=Ot({prop:n,defaultProp:r??[],onChange:o,caller:ia}),l=O.useCallback(u=>s((d=[])=>[...d,u]),[s]),c=O.useCallback(u=>s((d=[])=>d.filter(f=>f!==u)),[s]);return b.jsx(B9,{scope:e.__scopeToggleGroup,type:"multiple",value:a,onItemActivate:l,onItemDeactivate:c,children:b.jsx(z9,{...i,ref:t})})});US.displayName=ia;var[J1e,exe]=F9(ia),z9=O.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:i,dir:a,loop:s=!0,...l}=e,c=R9(n),u=Wr(a),d={role:"group",dir:u,...l};return b.jsx(J1e,{scope:n,rovingFocus:o,disabled:r,children:o?b.jsx(ld,{asChild:!0,...c,orientation:i,dir:u,loop:s,children:b.jsx(ye.div,{...d,ref:t})}):b.jsx(ye.div,{...d,ref:t})})}),xm="ToggleGroupItem",q9=O.forwardRef((e,t)=>{const n=j9(xm,e.__scopeToggleGroup),r=exe(xm,e.__scopeToggleGroup),o=R9(e.__scopeToggleGroup),i=n.value.includes(e.value),a=r.disabled||e.disabled,s={...e,pressed:i,disabled:a},l=O.useRef(null);return r.rovingFocus?b.jsx(cd,{asChild:!0,...o,focusable:!a,active:i,ref:l,children:b.jsx(V9,{...s,ref:t})}):b.jsx(V9,{...s,ref:t})});q9.displayName=xm;var V9=O.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,i=j9(xm,n),a={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},s=i.type==="single"?a:void 0;return b.jsx(qS,{...s,...o,ref:t,onPressedChange:l=>{l?i.onItemActivate(r):i.onItemDeactivate(r)}})}),U9=US,H9=q9;const W9=g.createContext({size:"default",variant:"default"}),K9=g.forwardRef(({className:e,variant:t,size:n,children:r,...o},i)=>b.jsx(U9,{ref:i,className:q("flex items-center justify-center gap-1",e),...o,children:b.jsx(W9.Provider,{value:{variant:t,size:n},children:r})}));K9.displayName=U9.displayName;const G9=g.forwardRef(({className:e,children:t,variant:n,size:r,...o},i)=>{const a=g.useContext(W9);return b.jsx(H9,{ref:i,className:q(VS({variant:a.variant||n,size:a.size||r}),e),...o,children:t})});G9.displayName=H9.displayName;const txe=({children:e,variant:t="primary",size:n="medium",loading:r=!1,disabled:o,className:i="",...a})=>{const l=`btn btn--${t} btn--${n} ${i}`.trim();return b.jsx("button",{className:l,disabled:o||r,...a,children:r?b.jsx("span",{className:"btn__spinner",children:"⏳"}):e})},nxe=({title:e,children:t,footer:n,className:r="",elevation:o="medium",...i})=>{const a="card",s=`${a} ${a}--${o} ${r}`.trim();return b.jsxs("div",{className:s,...i,children:[e&&b.jsx("div",{className:"card__header",children:b.jsx("h3",{className:"card__title",children:e})}),b.jsx("div",{className:"card__body",children:t}),n&&b.jsx("div",{className:"card__footer",children:n})]})},Y9=O.createContext(void 0),rxe=({children:e,initialSidebarOpen:t=!1,initialTheme:n="light"})=>{const[r,o]=O.useState(t),[i,a]=O.useState(n),c={sidebarOpen:r,toggleSidebar:()=>{o(u=>!u)},theme:i,toggleTheme:()=>{a(u=>u==="light"?"dark":"light")},setSidebarOpen:o,setTheme:a};return b.jsx(Y9.Provider,{value:c,children:e})},oxe=()=>{const e=O.useContext(Y9);if(e===void 0)throw new Error("useLayout must be used within a LayoutProvider");return e},ixe=({redirectTo:e="/login"})=>{var r;const t=Zv(),n=xo();return t!=null&&t.user&&((r=t==null?void 0:t.user)!=null&&r.verified)?b.jsx(LK,{}):b.jsx(IK,{to:e,state:{from:n},replace:!0})};function axe(){const{pathname:e}=xo();return O.useMemo(()=>e,[e])}function sxe(){const e=Vv();return O.useMemo(()=>({back:()=>e(-1),forward:()=>e(1),reload:()=>window.location.reload(),push:n=>e(n),replace:n=>e(n,{replace:!0})}),[e])}function X9(e,t){return function(){return e.apply(t,arguments)}}const{toString:lxe}=Object.prototype,{getPrototypeOf:HS}=Object,{iterator:Sm,toStringTag:Q9}=Symbol,Cm=(e=>t=>{const n=lxe.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),fo=e=>(e=e.toLowerCase(),t=>Cm(t)===e),Em=e=>t=>typeof t===e,{isArray:Vl}=Array,Ul=Em("undefined");function Rd(e){return e!==null&&!Ul(e)&&e.constructor!==null&&!Ul(e.constructor)&&Jn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Z9=fo("ArrayBuffer");function cxe(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Z9(e.buffer),t}const uxe=Em("string"),Jn=Em("function"),J9=Em("number"),Bd=e=>e!==null&&typeof e=="object",dxe=e=>e===!0||e===!1,Pm=e=>{if(Cm(e)!=="object")return!1;const t=HS(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Q9 in e)&&!(Sm in e)},fxe=e=>{if(!Bd(e)||Rd(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},hxe=fo("Date"),pxe=fo("File"),gxe=fo("Blob"),mxe=fo("FileList"),vxe=e=>Bd(e)&&Jn(e.pipe),yxe=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Jn(e.append)&&((t=Cm(e))==="formdata"||t==="object"&&Jn(e.toString)&&e.toString()==="[object FormData]"))},bxe=fo("URLSearchParams"),[wxe,xxe,Sxe,Cxe]=["ReadableStream","Request","Response","Headers"].map(fo),Exe=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function jd(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Vl(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(Rd(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length;let s;for(r=0;r<a;r++)s=i[r],t.call(null,e[s],s,e)}}function eB(e,t){if(Rd(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const cs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,tB=e=>!Ul(e)&&e!==cs;function WS(){const{caseless:e,skipUndefined:t}=tB(this)&&this||{},n={},r=(o,i)=>{const a=e&&eB(n,i)||i;Pm(n[a])&&Pm(o)?n[a]=WS(n[a],o):Pm(o)?n[a]=WS({},o):Vl(o)?n[a]=o.slice():(!t||!Ul(o))&&(n[a]=o)};for(let o=0,i=arguments.length;o<i;o++)arguments[o]&&jd(arguments[o],r);return n}const Pxe=(e,t,n,{allOwnKeys:r}={})=>(jd(t,(o,i)=>{n&&Jn(o)?e[i]=X9(o,n):e[i]=o},{allOwnKeys:r}),e),Oxe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Txe=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},_xe=(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&HS(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Mxe=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},kxe=e=>{if(!e)return null;if(Vl(e))return e;let t=e.length;if(!J9(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Axe=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&HS(Uint8Array)),Dxe=(e,t)=>{const r=(e&&e[Sm]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},Nxe=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},$xe=fo("HTMLFormElement"),Ixe=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),nB=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Lxe=fo("RegExp"),rB=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};jd(n,(o,i)=>{let a;(a=t(o,i,e))!==!1&&(r[i]=a||o)}),Object.defineProperties(e,r)},Fxe=e=>{rB(e,(t,n)=>{if(Jn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Jn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Rxe=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return Vl(e)?r(e):r(String(e).split(t)),n},Bxe=()=>{},jxe=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function zxe(e){return!!(e&&Jn(e.append)&&e[Q9]==="FormData"&&e[Sm])}const qxe=e=>{const t=new Array(10),n=(r,o)=>{if(Bd(r)){if(t.indexOf(r)>=0)return;if(Rd(r))return r;if(!("toJSON"in r)){t[o]=r;const i=Vl(r)?[]:{};return jd(r,(a,s)=>{const l=n(a,o+1);!Ul(l)&&(i[s]=l)}),t[o]=void 0,i}}return r};return n(e,0)},Vxe=fo("AsyncFunction"),Uxe=e=>e&&(Bd(e)||Jn(e))&&Jn(e.then)&&Jn(e.catch),oB=((e,t)=>e?setImmediate:t?((n,r)=>(cs.addEventListener("message",({source:o,data:i})=>{o===cs&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),cs.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Jn(cs.postMessage)),Hxe=typeof queueMicrotask<"u"?queueMicrotask.bind(cs):typeof process<"u"&&process.nextTick||oB,te={isArray:Vl,isArrayBuffer:Z9,isBuffer:Rd,isFormData:yxe,isArrayBufferView:cxe,isString:uxe,isNumber:J9,isBoolean:dxe,isObject:Bd,isPlainObject:Pm,isEmptyObject:fxe,isReadableStream:wxe,isRequest:xxe,isResponse:Sxe,isHeaders:Cxe,isUndefined:Ul,isDate:hxe,isFile:pxe,isBlob:gxe,isRegExp:Lxe,isFunction:Jn,isStream:vxe,isURLSearchParams:bxe,isTypedArray:Axe,isFileList:mxe,forEach:jd,merge:WS,extend:Pxe,trim:Exe,stripBOM:Oxe,inherits:Txe,toFlatObject:_xe,kindOf:Cm,kindOfTest:fo,endsWith:Mxe,toArray:kxe,forEachEntry:Dxe,matchAll:Nxe,isHTMLForm:$xe,hasOwnProperty:nB,hasOwnProp:nB,reduceDescriptors:rB,freezeMethods:Fxe,toObjectSet:Rxe,toCamelCase:Ixe,noop:Bxe,toFiniteNumber:jxe,findKey:eB,global:cs,isContextDefined:tB,isSpecCompliantForm:zxe,toJSONObject:qxe,isAsyncFn:Vxe,isThenable:Uxe,setImmediate:oB,asap:Hxe,isIterable:e=>e!=null&&Jn(e[Sm])};function tt(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}te.inherits(tt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:te.toJSONObject(this.config),code:this.code,status:this.status}}});const iB=tt.prototype,aB={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{aB[e]={value:e}}),Object.defineProperties(tt,aB),Object.defineProperty(iB,"isAxiosError",{value:!0}),tt.from=(e,t,n,r,o,i)=>{const a=Object.create(iB);te.toFlatObject(e,a,function(u){return u!==Error.prototype},c=>c!=="isAxiosError");const s=e&&e.message?e.message:"Error",l=t==null&&e?e.code:t;return tt.call(a,s,l,n,r,o),e&&a.cause==null&&Object.defineProperty(a,"cause",{value:e,configurable:!0}),a.name=e&&e.name||"Error",i&&Object.assign(a,i),a};const Wxe=null;function KS(e){return te.isPlainObject(e)||te.isArray(e)}function sB(e){return te.endsWith(e,"[]")?e.slice(0,-2):e}function lB(e,t,n){return e?e.concat(t).map(function(o,i){return o=sB(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function Kxe(e){return te.isArray(e)&&!e.some(KS)}const Gxe=te.toFlatObject(te,{},null,function(t){return/^is[A-Z]/.test(t)});function Om(e,t,n){if(!te.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=te.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,v){return!te.isUndefined(v[m])});const r=n.metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&te.isSpecCompliantForm(t);if(!te.isFunction(o))throw new TypeError("visitor must be a function");function c(h){if(h===null)return"";if(te.isDate(h))return h.toISOString();if(te.isBoolean(h))return h.toString();if(!l&&te.isBlob(h))throw new tt("Blob is not supported. Use a Buffer instead.");return te.isArrayBuffer(h)||te.isTypedArray(h)?l&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function u(h,m,v){let y=h;if(h&&!v&&typeof h=="object"){if(te.endsWith(m,"{}"))m=r?m:m.slice(0,-2),h=JSON.stringify(h);else if(te.isArray(h)&&Kxe(h)||(te.isFileList(h)||te.endsWith(m,"[]"))&&(y=te.toArray(h)))return m=sB(m),y.forEach(function(x,S){!(te.isUndefined(x)||x===null)&&t.append(a===!0?lB([m],S,i):a===null?m:m+"[]",c(x))}),!1}return KS(h)?!0:(t.append(lB(v,m,i),c(h)),!1)}const d=[],f=Object.assign(Gxe,{defaultVisitor:u,convertValue:c,isVisitable:KS});function p(h,m){if(!te.isUndefined(h)){if(d.indexOf(h)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(h),te.forEach(h,function(y,w){(!(te.isUndefined(y)||y===null)&&o.call(t,y,te.isString(w)?w.trim():w,m,f))===!0&&p(y,m?m.concat(w):[w])}),d.pop()}}if(!te.isObject(e))throw new TypeError("data must be an object");return p(e),t}function cB(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function GS(e,t){this._pairs=[],e&&Om(e,this,t)}const uB=GS.prototype;uB.append=function(t,n){this._pairs.push([t,n])},uB.toString=function(t){const n=t?function(r){return t.call(this,r,cB)}:cB;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Yxe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function dB(e,t,n){if(!t)return e;const r=n&&n.encode||Yxe;te.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(o?i=o(t,n):i=te.isURLSearchParams(t)?t.toString():new GS(t,n).toString(r),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class fB{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){te.forEach(this.handlers,function(r){r!==null&&t(r)})}}const hB={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Xxe={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:GS,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},YS=typeof window<"u"&&typeof document<"u",XS=typeof navigator=="object"&&navigator||void 0,Qxe=YS&&(!XS||["ReactNative","NativeScript","NS"].indexOf(XS.product)<0),Zxe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Jxe=YS&&window.location.href||"http://localhost",An={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:YS,hasStandardBrowserEnv:Qxe,hasStandardBrowserWebWorkerEnv:Zxe,navigator:XS,origin:Jxe},Symbol.toStringTag,{value:"Module"})),...Xxe};function eSe(e,t){return Om(e,new An.classes.URLSearchParams,{visitor:function(n,r,o,i){return An.isNode&&te.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function tSe(e){return te.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function nSe(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}function pB(e){function t(n,r,o,i){let a=n[i++];if(a==="__proto__")return!0;const s=Number.isFinite(+a),l=i>=n.length;return a=!a&&te.isArray(o)?o.length:a,l?(te.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!s):((!o[a]||!te.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],i)&&te.isArray(o[a])&&(o[a]=nSe(o[a])),!s)}if(te.isFormData(e)&&te.isFunction(e.entries)){const n={};return te.forEachEntry(e,(r,o)=>{t(tSe(r),o,n,0)}),n}return null}function rSe(e,t,n){if(te.isString(e))try{return(t||JSON.parse)(e),te.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const zd={transitional:hB,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=te.isObject(t);if(i&&te.isHTMLForm(t)&&(t=new FormData(t)),te.isFormData(t))return o?JSON.stringify(pB(t)):t;if(te.isArrayBuffer(t)||te.isBuffer(t)||te.isStream(t)||te.isFile(t)||te.isBlob(t)||te.isReadableStream(t))return t;if(te.isArrayBufferView(t))return t.buffer;if(te.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return eSe(t,this.formSerializer).toString();if((s=te.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Om(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),rSe(t)):t}],transformResponse:[function(t){const n=this.transitional||zd.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(te.isResponse(t)||te.isReadableStream(t))return t;if(t&&te.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(s){if(a)throw s.name==="SyntaxError"?tt.from(s,tt.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:An.classes.FormData,Blob:An.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};te.forEach(["delete","get","head","post","put","patch"],e=>{zd.headers[e]={}});const oSe=te.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),iSe=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
351
351
|
`).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&oSe[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},gB=Symbol("internals");function qd(e){return e&&String(e).trim().toLowerCase()}function Tm(e){return e===!1||e==null?e:te.isArray(e)?e.map(Tm):String(e)}function aSe(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const sSe=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function QS(e,t,n,r,o){if(te.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!te.isString(t)){if(te.isString(r))return t.indexOf(r)!==-1;if(te.isRegExp(r))return r.test(t)}}function lSe(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function cSe(e,t){const n=te.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,a){return this[r].call(this,t,o,i,a)},configurable:!0})})}let er=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(s,l,c){const u=qd(l);if(!u)throw new Error("header name must be a non-empty string");const d=te.findKey(o,u);(!d||o[d]===void 0||c===!0||c===void 0&&o[d]!==!1)&&(o[d||l]=Tm(s))}const a=(s,l)=>te.forEach(s,(c,u)=>i(c,u,l));if(te.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(te.isString(t)&&(t=t.trim())&&!sSe(t))a(iSe(t),n);else if(te.isObject(t)&&te.isIterable(t)){let s={},l,c;for(const u of t){if(!te.isArray(u))throw TypeError("Object iterator must return a key-value pair");s[c=u[0]]=(l=s[c])?te.isArray(l)?[...l,u[1]]:[l,u[1]]:u[1]}a(s,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=qd(t),t){const r=te.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return aSe(o);if(te.isFunction(n))return n.call(this,o,r);if(te.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=qd(t),t){const r=te.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||QS(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(a){if(a=qd(a),a){const s=te.findKey(r,a);s&&(!n||QS(r,r[s],s,n))&&(delete r[s],o=!0)}}return te.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||QS(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return te.forEach(this,(o,i)=>{const a=te.findKey(r,i);if(a){n[a]=Tm(o),delete n[i];return}const s=t?lSe(i):String(i).trim();s!==i&&delete n[i],n[s]=Tm(o),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return te.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&te.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
352
352
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[gB]=this[gB]={accessors:{}}).accessors,o=this.prototype;function i(a){const s=qd(a);r[s]||(cSe(o,a),r[s]=!0)}return te.isArray(t)?t.forEach(i):i(t),this}};er.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),te.reduceDescriptors(er.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),te.freezeMethods(er);function ZS(e,t){const n=this||zd,r=t||n,o=er.from(r.headers);let i=r.data;return te.forEach(e,function(s){i=s.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function mB(e){return!!(e&&e.__CANCEL__)}function Hl(e,t,n){tt.call(this,e??"canceled",tt.ERR_CANCELED,t,n),this.name="CanceledError"}te.inherits(Hl,tt,{__CANCEL__:!0});function vB(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new tt("Request failed with status code "+n.status,[tt.ERR_BAD_REQUEST,tt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function uSe(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function dSe(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,a;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=r[i];a||(a=c),n[o]=l,r[o]=c;let d=i,f=0;for(;d!==o;)f+=n[d++],d=d%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),c-a<t)return;const p=u&&c-u;return p?Math.round(f*1e3/p):void 0}}function fSe(e,t){let n=0,r=1e3/t,o,i;const a=(c,u=Date.now())=>{n=u,o=null,i&&(clearTimeout(i),i=null),e(...c)};return[(...c)=>{const u=Date.now(),d=u-n;d>=r?a(c,u):(o=c,i||(i=setTimeout(()=>{i=null,a(o)},r-d)))},()=>o&&a(o)]}const _m=(e,t,n=3)=>{let r=0;const o=dSe(50,250);return fSe(i=>{const a=i.loaded,s=i.lengthComputable?i.total:void 0,l=a-r,c=o(l),u=a<=s;r=a;const d={loaded:a,total:s,progress:s?a/s:void 0,bytes:l,rate:c||void 0,estimated:c&&s&&u?(s-a)/c:void 0,event:i,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(d)},n)},yB=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},bB=e=>(...t)=>te.asap(()=>e(...t)),hSe=An.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,An.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(An.origin),An.navigator&&/(msie|trident)/i.test(An.navigator.userAgent)):()=>!0,pSe=An.hasStandardBrowserEnv?{write(e,t,n,r,o,i,a){if(typeof document>"u")return;const s=[`${e}=${encodeURIComponent(t)}`];te.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),te.isString(r)&&s.push(`path=${r}`),te.isString(o)&&s.push(`domain=${o}`),i===!0&&s.push("secure"),te.isString(a)&&s.push(`SameSite=${a}`),document.cookie=s.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function gSe(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function mSe(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function wB(e,t,n){let r=!gSe(t);return e&&(r||n==!1)?mSe(e,t):t}const xB=e=>e instanceof er?{...e}:e;function us(e,t){t=t||{};const n={};function r(c,u,d,f){return te.isPlainObject(c)&&te.isPlainObject(u)?te.merge.call({caseless:f},c,u):te.isPlainObject(u)?te.merge({},u):te.isArray(u)?u.slice():u}function o(c,u,d,f){if(te.isUndefined(u)){if(!te.isUndefined(c))return r(void 0,c,d,f)}else return r(c,u,d,f)}function i(c,u){if(!te.isUndefined(u))return r(void 0,u)}function a(c,u){if(te.isUndefined(u)){if(!te.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function s(c,u,d){if(d in t)return r(c,u);if(d in e)return r(void 0,c)}const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(c,u,d)=>o(xB(c),xB(u),d,!0)};return te.forEach(Object.keys({...e,...t}),function(u){const d=l[u]||o,f=d(e[u],t[u],u);te.isUndefined(f)&&d!==s||(n[u]=f)}),n}const SB=e=>{const t=us({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:s}=t;if(t.headers=a=er.from(a),t.url=dB(wB(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),te.isFormData(n)){if(An.hasStandardBrowserEnv||An.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(te.isFunction(n.getHeaders)){const l=n.getHeaders(),c=["content-type","content-length"];Object.entries(l).forEach(([u,d])=>{c.includes(u.toLowerCase())&&a.set(u,d)})}}if(An.hasStandardBrowserEnv&&(r&&te.isFunction(r)&&(r=r(t)),r||r!==!1&&hSe(t.url))){const l=o&&i&&pSe.read(i);l&&a.set(o,l)}return t},vSe=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const o=SB(e);let i=o.data;const a=er.from(o.headers).normalize();let{responseType:s,onUploadProgress:l,onDownloadProgress:c}=o,u,d,f,p,h;function m(){p&&p(),h&&h(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let v=new XMLHttpRequest;v.open(o.method.toUpperCase(),o.url,!0),v.timeout=o.timeout;function y(){if(!v)return;const x=er.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),C={data:!s||s==="text"||s==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:x,config:e,request:v};vB(function(P){n(P),m()},function(P){r(P),m()},C),v=null}"onloadend"in v?v.onloadend=y:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(y)},v.onabort=function(){v&&(r(new tt("Request aborted",tt.ECONNABORTED,e,v)),v=null)},v.onerror=function(S){const C=S&&S.message?S.message:"Network Error",E=new tt(C,tt.ERR_NETWORK,e,v);E.event=S||null,r(E),v=null},v.ontimeout=function(){let S=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const C=o.transitional||hB;o.timeoutErrorMessage&&(S=o.timeoutErrorMessage),r(new tt(S,C.clarifyTimeoutError?tt.ETIMEDOUT:tt.ECONNABORTED,e,v)),v=null},i===void 0&&a.setContentType(null),"setRequestHeader"in v&&te.forEach(a.toJSON(),function(S,C){v.setRequestHeader(C,S)}),te.isUndefined(o.withCredentials)||(v.withCredentials=!!o.withCredentials),s&&s!=="json"&&(v.responseType=o.responseType),c&&([f,h]=_m(c,!0),v.addEventListener("progress",f)),l&&v.upload&&([d,p]=_m(l),v.upload.addEventListener("progress",d),v.upload.addEventListener("loadend",p)),(o.cancelToken||o.signal)&&(u=x=>{v&&(r(!x||x.type?new Hl(null,e,v):x),v.abort(),v=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const w=uSe(o.url);if(w&&An.protocols.indexOf(w)===-1){r(new tt("Unsupported protocol "+w+":",tt.ERR_BAD_REQUEST,e));return}v.send(i||null)})},ySe=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const i=function(c){if(!o){o=!0,s();const u=c instanceof Error?c:this.reason;r.abort(u instanceof tt?u:new Hl(u instanceof Error?u.message:u))}};let a=t&&setTimeout(()=>{a=null,i(new tt(`timeout ${t} of ms exceeded`,tt.ETIMEDOUT))},t);const s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),e=null)};e.forEach(c=>c.addEventListener("abort",i));const{signal:l}=r;return l.unsubscribe=()=>te.asap(s),l}},bSe=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},wSe=async function*(e,t){for await(const n of xSe(e))yield*bSe(n,t)},xSe=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},CB=(e,t,n,r)=>{const o=wSe(e,t);let i=0,a,s=l=>{a||(a=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await o.next();if(c){s(),l.close();return}let d=u.byteLength;if(n){let f=i+=d;n(f)}l.enqueue(new Uint8Array(u))}catch(c){throw s(c),c}},cancel(l){return s(l),o.return()}},{highWaterMark:2})},EB=64*1024,{isFunction:Mm}=te,SSe=(({Request:e,Response:t})=>({Request:e,Response:t}))(te.global),{ReadableStream:PB,TextEncoder:OB}=te.global,TB=(e,...t)=>{try{return!!e(...t)}catch{return!1}},CSe=e=>{e=te.merge.call({skipUndefined:!0},SSe,e);const{fetch:t,Request:n,Response:r}=e,o=t?Mm(t):typeof fetch=="function",i=Mm(n),a=Mm(r);if(!o)return!1;const s=o&&Mm(PB),l=o&&(typeof OB=="function"?(h=>m=>h.encode(m))(new OB):async h=>new Uint8Array(await new n(h).arrayBuffer())),c=i&&s&&TB(()=>{let h=!1;const m=new n(An.origin,{body:new PB,method:"POST",get duplex(){return h=!0,"half"}}).headers.has("Content-Type");return h&&!m}),u=a&&s&&TB(()=>te.isReadableStream(new r("").body)),d={stream:u&&(h=>h.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(h=>{!d[h]&&(d[h]=(m,v)=>{let y=m&&m[h];if(y)return y.call(m);throw new tt(`Response type '${h}' is not supported`,tt.ERR_NOT_SUPPORT,v)})});const f=async h=>{if(h==null)return 0;if(te.isBlob(h))return h.size;if(te.isSpecCompliantForm(h))return(await new n(An.origin,{method:"POST",body:h}).arrayBuffer()).byteLength;if(te.isArrayBufferView(h)||te.isArrayBuffer(h))return h.byteLength;if(te.isURLSearchParams(h)&&(h=h+""),te.isString(h))return(await l(h)).byteLength},p=async(h,m)=>{const v=te.toFiniteNumber(h.getContentLength());return v??f(m)};return async h=>{let{url:m,method:v,data:y,signal:w,cancelToken:x,timeout:S,onDownloadProgress:C,onUploadProgress:E,responseType:P,headers:_,withCredentials:T="same-origin",fetchOptions:M}=SB(h),A=t||fetch;P=P?(P+"").toLowerCase():"text";let D=ySe([w,x&&x.toAbortSignal()],S),N=null;const R=D&&D.unsubscribe&&(()=>{D.unsubscribe()});let U;try{if(E&&c&&v!=="get"&&v!=="head"&&(U=await p(_,y))!==0){let pe=new n(m,{method:"POST",body:y,duplex:"half"}),W;if(te.isFormData(y)&&(W=pe.headers.get("content-type"))&&_.setContentType(W),pe.body){const[Y,F]=yB(U,_m(bB(E)));y=CB(pe.body,EB,Y,F)}}te.isString(T)||(T=T?"include":"omit");const L=i&&"credentials"in n.prototype,V={...M,signal:D,method:v.toUpperCase(),headers:_.normalize().toJSON(),body:y,duplex:"half",credentials:L?T:void 0};N=i&&new n(m,V);let j=await(i?A(N,M):A(m,V));const H=u&&(P==="stream"||P==="response");if(u&&(C||H&&R)){const pe={};["status","statusText","headers"].forEach(ee=>{pe[ee]=j[ee]});const W=te.toFiniteNumber(j.headers.get("content-length")),[Y,F]=C&&yB(W,_m(bB(C),!0))||[];j=new r(CB(j.body,EB,Y,()=>{F&&F(),R&&R()}),pe)}P=P||"text";let se=await d[te.findKey(d,P)||"text"](j,h);return!H&&R&&R(),await new Promise((pe,W)=>{vB(pe,W,{data:se,headers:er.from(j.headers),status:j.status,statusText:j.statusText,config:h,request:N})})}catch(L){throw R&&R(),L&&L.name==="TypeError"&&/Load failed|fetch/i.test(L.message)?Object.assign(new tt("Network Error",tt.ERR_NETWORK,h,N),{cause:L.cause||L}):tt.from(L,L&&L.code,h,N)}}},ESe=new Map,_B=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,i=[r,o,n];let a=i.length,s=a,l,c,u=ESe;for(;s--;)l=i[s],c=u.get(l),c===void 0&&u.set(l,c=s?new Map:CSe(t)),u=c;return c};_B();const JS={http:Wxe,xhr:vSe,fetch:{get:_B}};te.forEach(JS,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const MB=e=>`- ${e}`,PSe=e=>te.isFunction(e)||e===null||e===!1;function OSe(e,t){e=te.isArray(e)?e:[e];const{length:n}=e;let r,o;const i={};for(let a=0;a<n;a++){r=e[a];let s;if(o=r,!PSe(r)&&(o=JS[(s=String(r)).toLowerCase()],o===void 0))throw new tt(`Unknown adapter '${s}'`);if(o&&(te.isFunction(o)||(o=o.get(t))))break;i[s||"#"+a]=o}if(!o){const a=Object.entries(i).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let s=n?a.length>1?`since :
|
|
353
353
|
`+a.map(MB).join(`
|