File "index.js"
Full Path: /home/fresvfqn/waterdamagerestorationandrepairsmithtown.com/wp-content/plugins/surerank/build/vendor-ac175c49/index.js
File size: 130.18 KB
MIME-type: text/plain
Charset: utf-8
"use strict";(globalThis.webpackChunksurerank=globalThis.webpackChunksurerank||[]).push([[167],{3535:(e,t,r)=>{r.d(t,{a:()=>l});var n=r(74848),s=r(56877),o=r(88553);const l=({variant:e="primary",size:t="md",icon:r=null,className:l=""})=>(0,n.jsx)("span",{className:(0,s.cn)("flex",{sm:"[&>svg]:size-4",md:"[&>svg]:size-5",lg:"[&>svg]:size-6",xl:"[&>svg]:size-8"}[t],{primary:"text-brand-primary-600",secondary:"text-background-primary"}[e],l),children:r||(0,n.jsx)(o.A,{className:"animate-spin shrink-0"})})},6903:(e,t,r)=>{r.d(t,{XI:()=>d});var n=r(74848),s=r(56877),o=r(51609),l=r(74443);const i=(0,o.createContext)(void 0),a=()=>{const e=(0,o.useContext)(i);if(!e)throw new Error("Table components must be used within Table component");return e},d=({children:e,className:t,checkboxSelection:r=!1,...l})=>{const a={checkboxSelection:r},d=o.Children.toArray(e).find(e=>o.isValidElement(e)&&e.type===x),c=o.Children.toArray(e).filter(e=>o.isValidElement(e)&&e.type!==x);return(0,n.jsx)(i.Provider,{value:a,children:(0,n.jsxs)("div",{className:"flow-root border-0.5 border-solid border-border-subtle rounded-md divide-y-0.5 divide-x-0 divide-solid divide-border-subtle overflow-hidden",children:[(0,n.jsx)("div",{className:"overflow-x-auto w-full",children:(0,n.jsx)("div",{className:"relative",children:(0,n.jsx)("table",{className:(0,s.cn)("table-fixed min-w-full border-collapse border-spacing-0",t),...l,children:c})})}),d]})})},c=({children:e,className:t,selected:r,onChangeSelection:o,indeterminate:i,disabled:d,...c})=>{const{checkboxSelection:u}=a();return(0,n.jsx)("thead",{className:(0,s.cn)("bg-background-secondary border-x-0 border-t-0 border-b-0.5 border-solid border-border-subtle",t),...c,children:(0,n.jsxs)("tr",{children:[u&&(0,n.jsx)("th",{scope:"col",className:"relative px-5.5 w-11 overflow-hidden",children:(0,n.jsx)("div",{className:"absolute inset-0 grid grid-cols-1 place-content-center",children:(0,n.jsx)(l.A,{size:"sm",checked:r,indeterminate:i,disabled:d,onChange:e=>{"function"==typeof o&&o(e)},"aria-label":r?"Deselect all":"Select all"})})}),e]})})},u=({children:e,className:t,...r})=>(0,n.jsx)("th",{scope:"col",className:(0,s.cn)("p-3 text-left text-sm font-medium leading-5 text-text-primary",t),...r,children:e}),m=({children:e,className:t,...r})=>(0,n.jsx)("tbody",{className:(0,s.cn)("bg-background-primary divide-y-0.5 divide-x-0 divide-solid divide-border-subtle",t),...r,children:e}),p=({children:e,selected:t,value:r,className:o,onChangeSelection:i,...d})=>{const{checkboxSelection:c}=a();return(0,n.jsxs)("tr",{className:(0,s.cn)("hover:bg-background-secondary",t&&"bg-background-secondary",o),...d,children:[c&&(0,n.jsx)("td",{className:"relative px-5.5 w-11 overflow-hidden",children:(0,n.jsx)("div",{className:"absolute inset-0 grid grid-cols-1 place-content-center",children:(0,n.jsx)(l.A,{size:"sm",checked:t,onChange:e=>{"function"==typeof i&&i(e,r)},"aria-label":"Select row"})})}),e]})},g=({children:e,className:t,...r})=>(0,n.jsx)("td",{className:(0,s.cn)("px-3 py-3.5 text-sm font-normal leading-5 text-text-secondary",t),...r,children:e}),x=({children:e,className:t,...r})=>{const{checkboxSelection:o}=a();return(0,n.jsx)("div",{className:(0,s.cn)("px-3 py-3",o&&"px-4",t),...r,children:e})};d.displayName="Table",c.displayName="Table.Head",u.displayName="Table.HeadCell",m.displayName="Table.Body",p.displayName="Table.Row",g.displayName="Table.Cell",x.displayName="Table.Footer",d.Head=c,d.HeadCell=u,d.Body=m,d.Row=p,d.Cell=g,d.Footer=x},9655:(e,t,r)=>{r.d(t,{d:()=>d});var n=r(74848),s=r(56877),o=r(6077),l=r(91090),i=r(96745);const a={sm:{image:"w-8 h-8",name:"text-xs",fileIcon:"h-8",uploadText:"text-xs"},md:{image:"w-10 h-10",name:"text-sm",fileIcon:"h-10",uploadText:"text-xs"},lg:{image:"w-10 h-10",name:"text-sm",fileIcon:"h-10",uploadText:"text-xs"}},d=({file:e,onRemove:t,error:r,disabled:d,size:c="sm"})=>(0,n.jsx)("div",{className:(0,s.cn)("w-full flex items-start justify-between rounded mt-2 bg-field-primary-background p-2 gap-3",r&&"border-alert-border-danger bg-alert-background-danger"),children:(0,n.jsxs)("div",{className:"flex items-center gap-3 w-full",children:[e.type.startsWith("image")?(0,n.jsx)("div",{className:(0,s.cn)("rounded-sm flex items-center justify-center shrink-0",r&&"bg-gray-200"),children:r?(0,n.jsx)(l.A,{className:"size-6 text-field-helper"}):(0,n.jsx)("img",{src:"url"in e?e.url:URL.createObjectURL(e),alt:"Preview",className:(0,s.cn)("w-full object-contain rounded-sm",a[c].image)})}):(0,n.jsx)("span",{className:(0,s.cn)("inline-flex self-start p-0.5",a[c].fileIcon),children:(0,n.jsx)(o.A,{className:"size-5 text-icon-primary"})}),(0,n.jsxs)("div",{className:"text-left flex flex-col gap-0 w-[calc(100%_-_5.5rem)]",children:[(0,n.jsx)("span",{className:(0,s.cn)(a[c].name,"font-medium text-field-label truncate"),children:e.name}),e.size&&e.size>0&&(0,n.jsx)("span",{className:(0,s.cn)(a[c].uploadText,"text-xs text-field-helper",r&&"text-support-error"),children:(0,s.v7)(e.size)})]}),!d&&(0,n.jsx)("button",{onClick:()=>t(e),className:"inline-flex cursor-pointer bg-transparent border-0 p-1 my-0 ml-auto mr-0 ring-0 focus:outline-none self-start","aria-label":"Remove file",children:(0,n.jsx)(i.A,{className:"size-4 text-support-error"})})]})})},12395:(e,t,r)=>{r.d(t,{Ay:()=>x});var n=r(74848),s=r(51609),o=r(97073),l=r(20659),i=r(50603),a=r(66221),d=r(22343),c=r(56877);const u=({type:e="simple",defaultValue:t=[],autoClose:r=!1,disabled:o=!1,children:l,className:i})=>{const[a,d]=(0,s.useState)(Array.isArray(t)?t:[t]);return(0,n.jsx)("div",{className:(0,c.cn)("boxed"===e?"space-y-3":"",i),children:s.Children.map(l,t=>{if(s.isValidElement(t)&&"value"in t.props){const n=!1!==t.props.collapsible,l=!n||a.includes(t.props.value);return s.cloneElement(t,{isOpen:l,onToggle:n?()=>(e=>{d(t=>r?t.includes(e)?[]:[e]:t.includes(e)?t.filter(t=>t!==e):[...t,e])})(t.props.value):void 0,type:e,disabled:o||t.props.disabled})}return t})})};u.displayName="Accordion";const m=({isOpen:e,onToggle:t,type:r="simple",disabled:o=!1,children:l,className:i})=>(0,n.jsx)("div",{className:(0,c.cn)({simple:"border-0",separator:"border-0 border-b border-solid border-border-subtle",boxed:"border border-solid border-border-subtle rounded-md"}[r],i),children:s.Children.map(l,n=>s.isValidElement(n)?s.cloneElement(n,{isOpen:e,onToggle:t,type:r,disabled:o}):n)});m.displayName="Accordion.Item";const p=({onClick:e,onToggle:t,isOpen:r,iconType:s="arrow",collapsible:a=!0,disabled:u=!1,tag:m="h3",type:p="simple",children:g,className:x,...f})=>(0,n.jsx)(m,{className:"flex m-0 hover:bg-background-secondary transition duration-150 ease-in-out",children:(0,n.jsxs)("button",{className:(0,c.cn)("flex w-full items-center justify-between text-sm font-medium transition-all appearance-none bg-transparent border-0 cursor-pointer gap-3",{simple:"px-2 py-3",separator:"px-2 py-4",boxed:"px-3 py-4"}[p],u&&"cursor-not-allowed opacity-40",x),onClick:(0,c.OK)(e,!u&&a?t:void 0),"aria-expanded":r,"aria-disabled":u,disabled:u,...f,children:[(0,n.jsx)("div",{className:"flex items-center gap-2 text-text-primary font-semibold text-left",children:g}),a?"arrow"===s?(0,n.jsx)(o.A,{className:(0,c.cn)("flex-shrink-0 text-icon-secondary size-5 transition-transform duration-300 ease-in-out",r?"rotate-180":"rotate-0"),"aria-hidden":"true"}):"plus-minus"===s?(0,n.jsx)(d.P.span,{initial:{opacity:0,rotate:r?-180:0},animate:{opacity:1,rotate:r?0:180},exit:{opacity:0},transition:{duration:.3,ease:"easeInOut"},className:"flex items-center flex-shrink-0 text-icon-secondary","aria-hidden":"true",children:(0,n.jsx)(r?l.A:i.A,{})},r?"minus":"plus"):null:null]})});p.displayName="Accordion.Trigger";const g=({isOpen:e,disabled:t=!1,type:r="simple",children:s,className:o})=>{const l={simple:"px-2 pb-3",separator:"px-2 pb-4",boxed:"px-3 pb-4"}[r];return(0,n.jsx)(a.N,{initial:!1,children:e&&(0,n.jsx)(d.P.div,{variants:{open:{height:"auto",opacity:1,overflow:"unset",transition:{overflow:{delay:1}}},closed:{height:0,opacity:0,overflow:"hidden"}},initial:"closed",animate:"open",exit:"closed",transition:{duration:.3,ease:"easeInOut"},className:(0,c.cn)("text-text-secondary w-full text-sm transition-[height, opacity, transform] ease-in box-border",t&&"opacity-40",o),"aria-hidden":!e,role:"region",children:(0,n.jsx)("div",{className:(0,c.cn)(l),children:s})},"content")})};g.displayName="Accordion.Content";const x=Object.assign(u,{Item:m,Trigger:p,Content:g})},13739:(e,t,r)=>{r.d(t,{A:()=>i});var n=r(74848),s=r(56877),o=r(39756),l=r(96307);const i=({design:e="inline",theme:t="light",variant:r="neutral",className:i="",title:a="",content:d="",icon:c=null,onClose:u,action:m={label:"",onClick:()=>{},type:"link"}})=>{const p=()=>{"function"==typeof u&&u()},g={neutral:"ring-alert-border-neutral bg-alert-background-neutral",custom:"ring-alert-border-neutral bg-alert-background-neutral",info:"ring-alert-border-info bg-alert-background-info",success:"ring-alert-border-green bg-alert-background-green",warning:"ring-alert-border-warning bg-alert-background-warning",error:"ring-alert-border-danger bg-alert-background-danger"},x="bg-background-inverse ring-background-inverse",f={light:"text-icon-secondary",dark:"text-icon-inverse"},b=()=>{m?.onClick?.(p)};return"stack"===e?(0,n.jsx)("div",{className:(0,s.cn)("flex items-center justify-start p-4 gap-2 relative ring-1 rounded-md shadow-lg","dark"===t?x:g?.[r],i),children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:(0,o.sW)({variant:r,icon:c,theme:t})}),(0,n.jsxs)("div",{className:"flex flex-col items-start justify-start gap-0.5 mr-7",children:[(0,o.LK)({title:a,theme:t}),(0,o._A)({content:d,theme:t}),m?.label&&"function"==typeof m?.onClick&&(0,n.jsx)("div",{className:"mt-2.5",children:(0,o.Th)({actionLabel:m?.label,actionType:m?.type??"button",onAction:b,theme:t})})]}),(0,n.jsx)("div",{className:"absolute right-4 top-4 [&_svg]:size-5",children:(0,n.jsx)("button",{className:(0,s.cn)("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",f[t]??f.light),onClick:()=>p(),"aria-label":"Close alert",children:(0,n.jsx)(l.A,{})})})]})}):(0,n.jsxs)("div",{className:(0,s.cn)("flex items-center justify-between p-3 gap-2 relative ring-1 rounded-lg shadow-lg","dark"===t?x:g?.[r],i),children:[(0,n.jsxs)("div",{className:"flex items-center justify-start gap-2",children:[(0,n.jsx)("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:(0,o.sW)({variant:r,icon:c,theme:t})}),(0,n.jsxs)("p",{className:"content-start space-x-1 my-0 mr-10 px-1",children:[(0,o.LK)({title:a,theme:t,inline:!0}),(0,o._A)({content:d,theme:t,inline:!0})]})]}),(0,n.jsxs)("div",{className:"flex h-full justify-start gap-4 [&_svg]:size-4",children:[m?.label&&"function"==typeof m?.onClick&&(0,n.jsx)("div",{className:"self-center flex h-5",children:(0,o.Th)({actionLabel:m?.label,actionType:m?.type??"button",onAction:b,theme:t})}),"function"==typeof u&&(0,n.jsx)("button",{className:(0,s.cn)("self-start bg-transparent m-0 border-none p-0.5 focus:outline-none active:outline-none cursor-pointer size-5",f[t]??f.light),onClick:()=>p(),"aria-label":"Close alert",children:(0,n.jsx)(l.A,{})})]})]})}},15415:(e,t,r)=>{r.d(t,{h:()=>o});var n=r(74848),s=r(56877);const o=({title:e="",description:t="",icon:r=null,iconPosition:o="right",tag:l="h2",size:i="sm",className:a=""})=>{const d={xs:"gap-1 [&>svg]:size-3.5",sm:"gap-1 [&>svg]:size-4",md:"gap-1.5 [&>svg]:size-5",lg:"gap-1.5 [&>svg]:size-5"};if(!e)return null;const c=()=>(0,n.jsx)(l,{className:(0,s.cn)("font-semibold p-0 m-0",{xs:"text-base [&>*]:text-base gap-1",sm:"text-lg [&>*]:text-lg gap-1",md:"text-xl [&>*]:text-xl gap-1.5",lg:"text-2xl [&>*]:text-2xl gap-1.5"}[i]),children:e});return(0,n.jsxs)("div",t?{className:a,children:[(0,n.jsxs)("div",{children:[r&&"left"===o&&(0,n.jsxs)("div",{className:(0,s.cn)("flex items-center",d[i]),children:[r,c()]}),r&&"right"===o&&(0,n.jsxs)("div",{className:(0,s.cn)("flex items-center",d[i]),children:[c(),r]}),!r&&c()]}),(0,n.jsx)("p",{className:(0,s.cn)("text-text-secondary font-normal my-0",{xs:"text-sm",sm:"text-sm",md:"text-base",lg:"text-base"}[i]),children:t})]}:{className:a,children:[r&&"left"===o&&(0,n.jsxs)("div",{className:(0,s.cn)("flex items-center",d[i]),children:[r,c()]}),r&&"right"===o&&(0,n.jsxs)("div",{className:(0,s.cn)("flex items-center",d[i]),children:[c(),r]}),!r&&c()]})}},16145:(e,t,r)=>{r.d(t,{A:()=>i});var n=r(74848),s=r(51609),o=r(39413),l=r(56877);const i=(0,s.forwardRef)(({id:e,defaultValue:t="",value:r,size:i="sm",className:a="",disabled:d=!1,onChange:c=()=>{},error:u=!1,onError:m=()=>{},...p},g)=>{const x=(0,s.useMemo)(()=>e||`input-textarea-${(0,o.Ak)()}`,[e]),f=(0,s.useMemo)(()=>typeof r<"u",[r]),[b,h]=(0,s.useState)(t),y=(0,s.useCallback)(()=>f?r:b,[f,r,b]);return(0,n.jsx)("textarea",{ref:g,id:x,className:(0,l.cn)("py-2 rounded border border-solid border-border-subtle bg-field-secondary-background font-normal placeholder-text-tertiary text-text-primary focus:outline-none transition ease-in-out duration-200",d?"border-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled":"",{sm:"px-3 rounded text-xs",md:"px-3 rounded-md text-sm",lg:"px-4 rounded-lg text-base"}[i],"focus:border-focus-border focus:ring-2 focus:ring-toggle-on focus:ring-offset-2",d?"hover:border-border-disabled":"hover:border-border-strong",u?"focus:border-focus-error-border focus:ring-field-color-error border-focus-error-border":"",a),disabled:d,onChange:e=>{if(d)return;const t=e.target.value;f||h(t),"function"==typeof c&&c(t)},onInvalid:m,value:y(),...p})});i.displayName="TextArea"},16162:(e,t,r)=>{r.d(t,{Ay:()=>v});var n=r(74848),s=r(51609),o=r(39413),l=r(99455),i=r(89667),a=r(56877);const d={primary:{checkbox:"border-border-strong hover:border-border-interactive checked:border-border-interactive bg-white checked:bg-toggle-on checked:hover:bg-toggle-on-hover checked:hover:border-toggle-on-hover focus:ring-2 focus:ring-offset-2 focus:ring-focus",icon:"text-white"}},c={sm:"text-sm leading-5",md:"text-base leading-6"},u={sm:{checkbox:"size-4",icon:"size-1.5",info:"size-4"},md:{checkbox:"size-5",icon:"size-2",info:"size-5"}},m={xs:"py-1 px-1 text-sm gap-0.5 [&>svg]:size-4",sm:"py-1 px-1.5 text-base gap-1 [&>svg]:size-4",md:"py-2 px-2.5 text-base gap-1 [&>svg]:size-5",lg:"py-2.5 px-3 text-base gap-1 [&>svg]:size-6"};var p=r(99019),g=r(19781);const x=(0,s.createContext)({}),f=()=>(0,s.useContext)(x),b=({children:e,name:t,style:r="simple",size:l="md",value:i,defaultValue:d,by:c="id",as:u="div",onChange:m,className:p,disableGroup:g=!1,vertical:f=!1,columns:b=4,multiSelection:h=!1,gapClassName:y="gap-2"})=>{const v=(0,s.useMemo)(()=>typeof i<"u",[i]),w=(0,s.useMemo)(()=>t||`radio-button-group-${(0,o.Ak)()}`,[t]);let j;j=v?i:h?d??[]:d;const[N,k]=(0,s.useState)(j),C=(0,s.useCallback)(e=>{if(h)k(t=>{let r;return r=Array.isArray(t)&&"string"==typeof e&&t.includes(e)?t.filter(t=>t!==e):[...Array.isArray(t)?t:[],..."string"==typeof e?[e]:[]],"function"==typeof m&&m(r),r});else{if(v||k(e),"function"!=typeof m)return;m(e)}},[m]);p=(0,a.cn)("grid grid-cols-4",a.pi[b],y,"tile"===r&&"gap-0",f&&"grid-cols-1",p);const z=(0,a.cn)("tile"===r?"border border-border-subtle border-solid rounded-md shadow-sm":"gap-6",p),A=()=>(0,n.jsx)(x.Provider,{value:{name:w,value:v?i:N,by:c,onChange:C,isControlled:v,disableAll:g,style:r,columns:b,multiSelection:h,size:l},children:s.Children.map(e,e=>(0,s.isValidElement)(e)?e:null)});return(0,n.jsx)(n.Fragment,{children:"tile"===r?(0,n.jsx)("div",{className:z,children:A()}):(0,n.jsx)(u,{...u===s.Fragment?{}:{className:p},children:A()})})};b.displayName="RadioButton.Group";const h=(0,s.forwardRef)(({id:e,label:t,value:r,children:m,disabled:x,icon:b=null,inlineIcon:h=!1,hideSelection:v=!1,reversePosition:w=!1,borderOn:j=!1,borderOnActive:N=!0,badgeItem:k=null,useSwitch:C=!1,info:z,minWidth:A=!0,...S},E)=>{const{buttonWrapperClasses:I,...P}=S,R=f(),{name:F,value:D,by:T,onChange:M,disableAll:L,checked:O,multiSelection:_,size:B="md"}=R,V="primary",K=(0,s.useMemo)(()=>e||`radio-button-${(0,o.Ak)()}`,[e]),$=(0,s.useMemo)(()=>L||x,[L,x]),W=(0,s.useMemo)(()=>_?Array.isArray(D)&&D.includes(r):typeof O<"u"?O:typeof D==typeof r&&("string"==typeof D?D===r:Array.isArray(D)?D.includes(r):D[T]===r[T]),[D,r,O]),H=(0,s.useCallback)(()=>(0,s.isValidElement)(t)?t:t?.heading?(0,n.jsxs)("div",{className:(0,a.cn)(!h&&{"space-y-3":"sm"===B,"space-y-4":"md"===B},w&&(C?"ml-10":"ml-4"),h&&"flex gap-2",h&&!t.description&&"items-center"),children:[b&&(0,n.jsx)(n.Fragment,{children:b}),(0,n.jsxs)("div",{className:(0,a.cn)(!b||!C||b&&k?{"space-y-0.5":"sm"===B,"space-y-1":"md"===B}:"space-y-0.5"),children:[(0,n.jsx)("p",{className:(0,a.cn)("text-text-primary font-medium m-0",c[B],x&&"text-text-disabled cursor-not-allowed"),children:t.heading}),t.description&&(0,n.jsx)("p",{className:"text-text-tertiary text-sm font-normal leading-5 m-0",children:t.description})]})]}):null,[t]);if("tile"===R.style)return(0,n.jsx)(y,{id:e,label:t,value:r,disabled:x,size:B,children:m});const U=()=>{$||(_?C&&M(r,!W):M(r))};return(0,n.jsxs)("label",{className:(0,a.cn)("inline-flex items-center relative cursor-pointer transition-all duration-300",!!t&&"items-start justify-between",A&&"min-w-[180px]",j&&"outline outline-field-border outline-1 rounded-md shadow-sm hover:outline-border-interactive",N&&j&&W&&"outline-border-interactive",{"pl-3.5 pr-2.5 py-2.5":"sm"===B&&!(b&&C),"p-3":"sm"===B&&(b&&C||b&&k),"pl-4 pr-3 py-3":"md"===B&&!(b&&C),"p-4":"md"===B&&(b&&C||b&&k)},"pr-12",$&&"cursor-not-allowed opacity-40",I),htmlFor:K,onClick:U,children:[!!t&&(0,n.jsx)("label",{className:(0,a.cn)("cursor-pointer",$&&"cursor-not-allowed"),htmlFor:K,children:H()}),!!z&&(0,n.jsx)("div",{className:"absolute mr-0.5 bottom-1.5 right-3",children:(0,n.jsx)(p.m,{title:z?.heading,content:z?.description,children:(0,n.jsx)(l.A,{className:(0,a.cn)("text-text-primary",u[B]?.info)})})}),(0,n.jsxs)("label",{className:(0,a.cn)("absolute mr-0.5 right-3 flex items-center cursor-pointer rounded-full gap-2",w&&"left-0",$&&"cursor-not-allowed",h&&"mr-3"),onClick:U,children:[!!k&&k,!v&&(C?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(g.Ay,{defaultValue:!1,size:B,onChange:()=>{_?M(r,!W):M(r)},checked:W,...P,"aria-label":t?.heading??"Switch"})}):(0,n.jsxs)("span",{className:"relative p-0.5",children:[(0,n.jsx)("input",{ref:E,id:K,type:_?"checkbox":"radio",className:(0,a.cn)("peer flex relative cursor-pointer appearance-none transition-all m-0 before:content-[''] checked:before:content-[''] checked:before:hidden before:hidden !border-1.5 border-solid",!_&&"rounded-full",d[V].checkbox,u[B].checkbox,$&&"disabled:bg-white checked:disabled:bg-white disabled:border-border-disabled checked:disabled:border-border-disabled cursor-not-allowed"),name:F,value:r,onChange:e=>M(e.target.value),checked:W,disabled:$,...P}),(0,n.jsx)("span",{className:(0,a.cn)("inline-flex items-center absolute top-2/4 not-rtl:left-2/4 rtl:right-2/4 -translate-y-2/4 -translate-x-2/4 text-white opacity-0 transition-opacity peer-checked:opacity-100",d[V].icon,$&&"peer-disabled:text-border-disabled cursor-not-allowed"),children:_?(0,n.jsx)(i.A,{className:"sm"===B?"size-3":"size-4"}):(0,n.jsx)("div",{className:(0,a.cn)("rounded-full bg-current",u[B]?.icon)})})]}))]})]})});h.displayName="RadioButton.Button";const y=({id:e,children:t,value:r,disabled:l,size:i="md",...d})=>{const c=f(),{name:u,value:p,by:g,onChange:x,disableAll:b,checked:h}=c||{},y=(0,s.useMemo)(()=>e||`radio-button-${(0,o.Ak)()}`,[e]),v=(0,s.useMemo)(()=>b||l,[b,l]),w=(0,s.useMemo)(()=>typeof h<"u"?h:typeof p==typeof r&&("string"==typeof p?p===r:Array.isArray(p)?p.includes(r):!(!p||!g)&&p[g]===r[g]),[p,r,h,g]),j=(0,a.cn)("bg-background-primary text-primary cursor-pointer flex items-center justify-center","hover:bg-button-tertiary-hover","focus:outline-none",v?"text-text-disabled cursor-not-allowed":"",m[i],"border-0 border-r border-border-subtle border-solid");return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("button",{type:"button",id:y,"aria-label":"Radio Button",className:(0,a.cn)(j,"first:rounded-tl first:rounded-bl first:border-0 first:border-r first:border-border-subtle last:rounded-tr last:rounded-br last:border-0",w&&"bg-button-disabled"),onClick:()=>{x&&x(r)},disabled:v,...d,children:[(0,n.jsx)("input",{type:"hidden",value:r,name:u,checked:w,onChange:e=>x?.(e.target.value)}),t]})})},v=Object.assign(h,{Group:b,Button:h})},19781:(e,t,r)=>{r.d(t,{Ay:()=>d});var n=r(74848),s=r(51609),o=r(39413),l=r(56877),i=r(71087);const a=({label:e,switchId:t,disabled:r=!1,children:o,size:a})=>{const d={xs:"text-xs leading-4 font-medium",sm:"text-sm leading-5 font-medium",md:"text-base leading-6 font-medium"},c={xs:"text-xs leading-4 font-normal",sm:"text-sm leading-5 font-normal",md:"text-sm leading-5 font-normal"},u={xs:"space-y-0.5",sm:"space-y-0.5",md:"space-y-1"};return(0,s.isValidElement)(e)?(0,n.jsxs)("div",{className:(0,l.cn)("inline-flex items-center gap-3","items-start"),children:[o,e]}):e?.heading||e?.description?(0,n.jsxs)("div",{className:(0,l.cn)("inline-flex",e?.heading&&e?.description?"items-start":"items-center","gap-3"),children:[o,(()=>{const{heading:s="",description:o=""}=e||{};return(0,n.jsxs)("div",{className:(0,l.cn)("space-y-0.5",u[a]),children:[s&&(0,n.jsx)(i.A,{htmlFor:t,className:(0,l.cn)("m-0",d[a]),...r&&{variant:"disabled"},children:s}),o&&(0,n.jsx)(i.A,{tag:"p",variant:"help",className:(0,l.cn)("text-sm font-normal leading-5 m-0",c[a]),...r&&{variant:"disabled"},children:o})]})})()]}):o},d=(0,s.forwardRef)(({id:e,onChange:t,value:r,defaultValue:i=!1,size:d="sm",disabled:c=!1,label:u={heading:"",description:""},name:m,className:p,...g},x)=>{const f="lg"===d?"md":d,b=(0,s.useMemo)(()=>typeof r<"u",[r]),h=(0,s.useMemo)(()=>e||`switch-${(0,o.Ak)()}`,[]),[y,v]=(0,s.useState)(i),w="primary",j=(0,s.useCallback)(()=>b?r:y,[b,r,y]),N={primary:{input:"bg-toggle-off checked:bg-toggle-on focus:ring focus:ring-toggle-on focus:ring-offset-2 border border-solid border-toggle-off-border checked:border-toggle-on-border shadow-toggleContainer focus:outline-none checked:focus:border-toggle-on-border focus:border-toggle-off-border",toggleDial:"bg-toggle-dial-background shadow-toggleDial"}},k={md:{container:"w-11 h-6",toggleDial:"size-4 peer-checked:translate-x-5"},sm:{container:"w-10 h-5",toggleDial:"size-3 peer-checked:translate-x-5"},xs:{container:"w-8 h-4",toggleDial:"size-2.5 peer-checked:translate-x-3.75"}};return(0,n.jsx)(a,{label:u,switchId:h,disabled:c,size:f,children:(0,n.jsxs)("div",{className:(0,l.cn)("relative group/switch inline-block cursor-pointer rounded-full shrink-0",k[f].container,p),children:[(0,n.jsx)("input",{ref:x,id:h,type:"checkbox",className:(0,l.cn)("peer appearance-none absolute rounded-full cursor-pointer transition-colors duration-300 h-full w-full before:content-[''] checked:before:content-[''] m-0 checked:[background-image:none]",N[w].input,c&&"bg-toggle-off-disabled disabled:border-transparent disabled:cursor-not-allowed checked:disabled:bg-toggle-on-disabled disabled:shadow-toggle-disabled",!c&&{primary:{input:"group-hover/switch:bg-toggle-off-hover checked:group-hover/switch:bg-toggle-on-hover checked:group-hover/switch:border-toggle-on-border"}}[w].input),checked:j(),onChange:e=>{if(c)return;const r=e.target.checked;b||v(r),"function"==typeof t&&t(r)},disabled:c,name:m,...g}),(0,n.jsx)("label",{htmlFor:h,className:(0,l.cn)("peer/toggle-dial bg-white border rounded-full absolute cursor-pointer shadow-md before:content[''] before:transition-opacity before:opacity-0 hover:before:opacity-10 before:hidden border-none transition-all duration-300 top-2/4 not-rtl:left-1 rtl:right-1 -translate-y-2/4 before:w-10 before:h-10 before:rounded-full before:absolute before:top-2/4 not-rtl:before:left-2/4 rtl:before:right-2/4 before:-translate-y-2/4 before:-translate-x-2/4",k[f].toggleDial,N[w].toggleDial,c&&"peer-disabled:cursor-not-allowed",!c&&{md:"group-hover/switch:size-5 group-focus-within/switch:size-5 not-rtl:group-focus-within/switch:left-0.5 rtl:group-focus-within/switch:right-0.5 not-rtl:group-hover/switch:left-0.5 rtl:group-hover/switch:right-0.5",sm:"group-hover/switch:size-4 group-focus-within/switch:size-4 not-rtl:group-focus-within/switch:left-0.5 rtl:group-focus-within/switch:right-0.5 not-rtl:group-hover/switch:left-0.5 rtl:group-hover/switch:right-0.5",xs:"group-hover/switch:size-3.25 group-focus-within/switch:size-3.25 not-rtl:group-focus-within/switch:left-0.5 rtl:group-focus-within/switch:right-0.5 not-rtl:group-hover/switch:left-0.5 rtl:group-hover/switch:right-0.5"}[f])})]})})});d.displayName="Switch"},29767:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(74848),s=r(56877);const o=({variant:e="rectangular",className:t,...r})=>(0,n.jsx)("div",{className:(0,s.cn)({circular:"rounded-full bg-gray-200 ",rectangular:"rounded-md bg-gray-200"}[e],"animate-pulse",{circular:"size-10",rectangular:"w-96 h-3"}[e],t),...r})},30071:(e,t,r)=>{r.d(t,{A:()=>b});var n=r(74848),s=r(44653),o=r(17829),l=r(69107),i=r(77984),a=r(23495),d=r(35683),c=r(86279),u=r(51609),m=r(56877);const p=u.forwardRef(({active:e,payload:t,className:r,indicator:s="dot",hideLabel:o=!1,hideIndicator:l=!1,label:i,labelFormatter:a,labelClassName:d,formatter:c,color:u,nameKey:p="name",labelKey:g},x)=>{if(!e||!t?.length)return null;const f=1===t.length&&"dot"!==s;return(0,n.jsxs)("div",{ref:x,className:(0,m.cn)("grid min-w-[8rem] items-start gap-1.5 rounded-lg border bg-tooltip-background-light px-3 py-2 text-xs shadow-xl",r),children:[f?null:(()=>{if(o||!t?.length)return null;const[e]=t,r=a?a(i||""):e[g]||i;return r?(0,n.jsx)("div",{className:(0,m.cn)("font-medium",d),children:r}):null})(),(0,n.jsx)("div",{className:"grid gap-1.5",children:t.map((e,t)=>{const r=u||e.color||"#000";return(0,n.jsxs)("div",{className:(0,m.cn)("flex w-full items-stretch gap-2","dot"===s&&"items-center"),children:[!l&&(0,n.jsx)("div",{className:(0,m.cn)({"size-2.5 ":"dot"===s,"w-1 h-full":"line"===s,"w-0 border-[0.5px] border-dashed":"dashed"===s}),style:{backgroundColor:"dot"===s||"line"===s?r:"",borderColor:"dashed"===s?r:""}}),(0,n.jsxs)("div",{className:"flex-1 flex justify-between items-center gap-2",children:[(0,n.jsx)("span",{children:e[p]||e.dataKey}),(0,n.jsx)("span",{className:"font-mono font-medium",children:c?c(e.value??""):e.value??""})]})]},e.dataKey||t)})})]})});p.displayName="ChartTooltipContent";var g=r(71087);const x="#6B7280",f=[{stroke:"#2563EB"},{stroke:"#38BDF8"}],b=({data:e,dataKeys:t=[],colors:r=[],showXAxis:u=!1,showYAxis:m=!1,showTooltip:b=!0,tooltipIndicator:h="dot",tooltipLabelKey:y,showCartesianGrid:v=!0,xAxisTickFormatter:w,yAxisTickFormatter:j,tickFormatter:N,xAxisDataKey:k,yAxisDataKey:C,xAxisFontSize:z="sm",xAxisFontColor:A=x,yAxisFontColor:S=x,chartWidth:E=350,chartHeight:I=200,withDots:P=!1,lineChartWrapperProps:R,strokeDasharray:F="3 3",gridColor:D="#E5E7EB",biaxial:T=!1,noDataComponent:M})=>{const L=r.length>0?r:f,O={sm:"12px",md:"14px",lg:"16px"},_=O[z]||O.sm,B=(e=0)=>Array.isArray(S)?S[e]||S[0]||x:S;return e&&0!==e.length?(0,n.jsx)(s.u,{width:E,height:I,children:(0,n.jsxs)(o.b,{...R,data:e,children:[v&&(0,n.jsx)(l.d,{strokeDasharray:F,horizontal:!1,stroke:D}),(0,n.jsx)(i.W,{dataKey:k,tickLine:!1,axisLine:!1,tickMargin:8,tickFormatter:w||N,tick:{fontSize:_,fill:A},hide:!u,interval:"equidistantPreserveStart"}),(0,n.jsx)(a.h,{yAxisId:"left",dataKey:T?t[0]:C,tickLine:!1,axisLine:!1,tickMargin:8,tickFormatter:j,tick:{fontSize:_,fill:B(0)},hide:!m,orientation:"left"}),T&&t.length>1&&(0,n.jsx)(a.h,{yAxisId:"right",dataKey:t[1],tickLine:!1,axisLine:!1,tickMargin:8,tickFormatter:j,tick:{fontSize:_,fill:B(1)},orientation:"right",hide:!m}),b&&(0,n.jsx)(d.m,{content:(0,n.jsx)(p,{indicator:h,labelKey:y})}),t.map((e,t)=>{let r="left";return T&&t>0&&(r="right"),(0,n.jsx)(c.N,{type:"monotone",dataKey:e,stroke:L[t].stroke,fill:L[t].stroke,strokeWidth:2,dot:P,yAxisId:r},e)})]})}):M||(0,n.jsx)(g.A,{size:"sm",variant:"help",children:"No data available"})}},30732:(e,t,r)=>{r.d(t,{E:()=>c});var n=r(74848),s=r(56877);const o={400:"font-normal",500:"font-medium",600:"font-semibold",700:"font-bold"},l={36:"text-4xl",30:"text-3xl",24:"text-2xl",20:"text-xl",18:"text-lg",16:"text-base",14:"text-sm",12:"text-xs"},i={44:"leading-11",38:"leading-9.5",32:"leading-8",30:"leading-7.5",28:"leading-7",24:"leading-6",20:"leading-5",16:"leading-4"},a={2:"tracking-2"},d={brand600:"text-brand-primary-600",link:"text-link-primary",primary:"text-text-primary",secondary:"text-text-secondary",tertiary:"text-text-tertiary",disabled:"text-text-disabled",help:"text-field-helper",label:"text-field-label",info:"text-support-info",success:"text-support-success",warning:"text-support-warning",error:"text-support-error",inverse:"text-text-on-color"},c=(0,r(51609).forwardRef)(function({as:e,children:t,weight:r,size:c,lineHeight:u,letterSpacing:m,color:p="primary",className:g,...x},f){return(0,n.jsx)(e||"p",{ref:f,className:(0,s.cn)("m-0 p-0",r?o[r]:"",c?l[c]:"",u?i[u]:"",m?a[m]:"",p?d[p]:"",g),...x,children:t})})},30758:(e,t,r)=>{r.d(t,{Ay:()=>h});var n=r(74848),s=r(51609),o=r(96307),l=r(60443),i=r(56877),a=r(39756);const d={"top-left":"top-0 bottom-0 left-0 justify-start items-start","top-right":"top-0 bottom-0 right-0 justify-start items-end","bottom-left":"top-0 bottom-0 left-0 justify-end items-start","bottom-right":"top-0 bottom-0 right-0 justify-end items-end"},c={neutral:"border-alert-border-neutral bg-alert-background-neutral",custom:"border-alert-border-neutral bg-alert-background-neutral",info:"border-alert-border-info bg-alert-background-info",success:"border-alert-border-green bg-alert-background-green",warning:"border-alert-border-warning bg-alert-background-warning",error:"border-alert-border-danger bg-alert-background-danger"},u="bg-background-inverse border-background-inverse",m={light:"text-icon-secondary",dark:"text-icon-inverse"};var p=r(75795),g=r(66221),x=r(22343);let f=!1;const b=({toastItem:e,title:t="",content:r="",autoDismiss:l=!0,dismissAfter:d=5e3,theme:p="light",design:g="stack",icon:x,variant:f="neutral",removeToast:b})=>{const h=(0,s.useRef)(0),y=(0,s.useRef)(0),v=(0,s.useRef)(),w=(e,t=d)=>{if(l&&!(d<0))return h.current=(new Date).getTime(),setTimeout(()=>{"function"==typeof b&&b(e.id)},t)};(0,s.useEffect)(()=>(v.current=w(e,d),()=>{clearTimeout(v.current)}),[]),(0,s.useEffect)(()=>{!e?.dismiss||"function"!=typeof b||b(e.id)},[e]);const j=()=>{"function"==typeof b&&e?.action?.onClick?.(()=>b(e.id))};let N=null;return"stack"===g&&(N=(0,n.jsx)("div",{className:(0,i.cn)("flex items-center justify-start p-4 gap-2 relative border border-solid rounded-md shadow-lg","dark"===p?u:c?.[f],"w-[22.5rem]"),onMouseEnter:()=>{clearTimeout(v.current),y.current=(new Date).getTime()},onMouseLeave:()=>{v.current=w(e,d-(y.current-h.current))},children:"custom"!==e.type?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:(0,a.sW)({variant:f,icon:x,theme:p})}),(0,n.jsxs)("div",{className:"flex flex-col items-start justify-start gap-0.5 mr-6",children:[(0,a.LK)({title:t,theme:p}),(0,a._A)({content:r,theme:p}),e?.action?.label&&"function"==typeof e?.action?.onClick&&(0,n.jsx)("div",{className:"mt-2.5",children:(0,a.Th)({actionLabel:e?.action?.label,actionType:e?.action?.type??"button",onAction:j,theme:p})})]}),(0,n.jsx)("div",{className:"absolute right-4 top-4 [&_svg]:size-5",children:(0,n.jsx)("button",{className:(0,i.cn)("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",m[p]??m.light),onClick:()=>{"function"==typeof b&&b(e.id)},children:(0,n.jsx)(o.A,{})})})]}):e?.jsx?.({close:()=>b(e.id),action:e?.action?{...e?.action,onClick:j}:null})})),"inline"===g&&(N=(0,n.jsxs)("div",{className:(0,i.cn)("flex items-center justify-start p-3 gap-2 relative border border-solid rounded-md shadow-lg","dark"===p?u:c?.[f],"lg:w-[47.5rem] w-full"),children:[(0,n.jsx)("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:(0,a.sW)({variant:f,icon:x,theme:p})}),(0,n.jsxs)("div",{className:"flex items-start justify-start gap-1 mr-10 [&>span:first-child]:shrink-0",children:[(0,a.LK)({title:t,theme:p}),(0,a._A)({content:r,theme:p})]}),(0,n.jsx)("div",{className:"absolute right-3 top-3 [&_svg]:size-5",children:(0,n.jsx)("button",{className:(0,i.cn)("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",m[p]??m.light),onClick:()=>b(e.id),children:(0,n.jsx)(o.A,{})})})]})),N},h=(y=({position:e="top-right",design:t="stack",theme:r="light",className:o="",autoDismiss:a=!0,dismissAfter:c=5e3})=>{const[u,m]=(0,s.useState)([]);(0,s.useEffect)(()=>{l.$.subscribe(e=>{e?.dismiss?m(t=>t.map(t=>t.id===e.id?{...t,dismiss:!0}:t)):setTimeout(()=>{(0,p.flushSync)(()=>m(t=>-1!==t.findIndex(t=>t.id===e.id)?t.map(t=>t.id===e.id?{...t,...e}:t):[...t,e]))})})},[]);const f=e=>{m(t=>t.filter(t=>t.id!==e))};return(0,n.jsx)("ul",{className:(0,i.cn)("fixed flex flex-col list-none z-20 p-10 pointer-events-none [&>li]:pointer-events-auto gap-3",d[e]??d["top-right"],o),children:(0,n.jsx)(g.N,{initial:!1,children:u.map(e=>(0,n.jsx)(x.P.li,{initial:{opacity:0,y:50,scale:.7},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.6,transition:{duration:.15}},layoutId:`toast-${e.id}`,children:(0,n.jsx)(b,{toastItem:e,title:e.title,content:e?.description,icon:e?.icon??void 0,design:e?.design??t,autoDismiss:e?.autoDismiss??a,dismissAfter:e?.dismissAfter??c,removeToast:f,variant:e.type,theme:e?.theme??r})},e.id))})})},(0,s.memo)(e=>f&&e.singleTon?null:(f=!0,(0,n.jsx)(y,{...e}))));var y},39756:(e,t,r)=>{r.d(t,{LK:()=>x,Px:()=>b,Th:()=>g,_A:()=>f,sW:()=>p});var n=r(74848),s=r(51609),o=r(89667),l=r(99455),i=r(60306),a=r(9400),d=r(56877),c=r(88029);const u="light",m="neutral",p=({icon:e,theme:t=u,variant:r=m})=>{const c="[&>svg]:h-5 [&>svg]:w-5",p=(({theme:e=u,variant:t=m})=>{let r="light"===e?"text-icon-secondary":"text-icon-inverse";return r={info:"light"===e?"text-support-info":"text-support-info-inverse",success:"light"===e?"text-support-success":"text-support-success-inverse",warning:"light"===e?"text-support-warning":"text-support-warning-inverse",error:"light"===e?"text-support-error":"text-support-error-inverse"}[t]||r,r})({theme:t,variant:r});if(e&&(0,s.isValidElement)(e))return(0,s.cloneElement)(e,{className:(0,d.cn)(c,p,e?.props?.className??"")});const g={neutral:(0,n.jsx)(l.A,{className:(0,d.cn)(c,p)}),info:(0,n.jsx)(l.A,{className:(0,d.cn)(c,p)}),success:(0,n.jsx)(o.A,{className:(0,d.cn)(c,p)}),warning:(0,n.jsx)(a.A,{className:(0,d.cn)(c,p)}),error:(0,n.jsx)(i.A,{className:(0,d.cn)(c,p)})};return g[r]||g.neutral},g=({actionType:e="button",onAction:t=()=>{},actionLabel:r="",theme:s=u})=>{const o="focus:ring-0 focus:ring-offset-0 ring-offset-0 focus:outline-none";let l="text-button-primary border-button-primary hover:border-button-primary hover:text-button-primary-hover";switch("dark"===s&&(l="text-text-inverse border-text-inverse hover:border-text-inverse hover:text-text-inverse"),e){case"button":return(0,n.jsx)(c.A,{variant:"outline",size:"xs",onClick:t,className:(0,d.cn)("rounded",o,l,"dark"===s?"bg-transparent hover:bg-transparent":"bg-white hover:bg-white"),children:r});case"link":return(0,n.jsx)(c.A,{variant:"link",size:"xs",onClick:t,className:(0,d.cn)(o,l),children:r});default:return null}},x=({theme:e=u,title:t="",inline:r=!1})=>t?(0,n.jsx)("span",{className:(0,d.cn)("block",{light:"text-text-primary",dark:"text-text-inverse"}[e],"text-sm leading-5 font-semibold",r?"inline":"block"),children:t}):null,f=({theme:e=u,content:t="",inline:r=!1})=>t?(0,n.jsx)("span",{className:(0,d.cn)({light:"text-text-primary",dark:"text-text-inverse"}[e],"block text-sm [&_*]:text-sm leading-5 [&_*]:leading-5 font-normal [word-break:break-word]",r?"inline":"block"),children:t}):null,b=(...e)=>t=>{e.forEach(e=>{"function"==typeof e?e(t):e&&(e.current=t)})}},43663:(e,t,r)=>{r.d(t,{Ay:()=>x});var n=r(74848),s=r(51609),o=r(56877),l=r(14070),i=r(46944),a=r(99019);const d=(0,s.createContext)({isCollapsed:!1,setIsCollapsed:()=>{},collapsible:!0}),c=({children:e,className:t,onCollapseChange:r,collapsible:l=!0,borderOn:i=!0,collapsed:a=!1,...c})=>{const u=(0,s.useRef)(null),[m,p]=(0,s.useState)(()=>!l&&a?a:o.Ar.get("sidebar-collapsed")||window.innerWidth<1280);return(0,s.useEffect)(()=>{"function"==typeof r&&r(m)},[m,r]),(0,s.useEffect)(()=>{if(!l&&a)return;const e=()=>{const e=window.innerWidth<1280;if(l)if(e)p(!0),o.Ar.set("sidebar-collapsed",!0);else{const e=o.Ar.get("sidebar-collapsed");p(e||!1)}else p(!1),o.Ar.remove("sidebar-collapsed")};return window.addEventListener("resize",e),e(),()=>{window.removeEventListener("resize",e)}},[l]),(0,n.jsx)(d.Provider,{value:{isCollapsed:m,setIsCollapsed:p,collapsible:l},children:(0,n.jsx)("div",{ref:u,className:(0,o.cn)("h-full overflow-auto w-72 px-4 py-4 gap-4 flex flex-col bg-background-primary",i&&"border-0 border-r border-solid border-border-subtle","transition-all duration-200",m&&"w-16 px-2",t),...c,children:e})})};c.displayName="Sidebar";const u=({children:e})=>(0,n.jsx)("div",{className:"space-y-2",children:e});u.displayName="Sidebar.Header";const m=({children:e})=>(0,n.jsx)("div",{className:(0,o.cn)("space-y-4 grow items-start"),children:e});m.displayName="Sidebar.Body";const p=({children:e})=>{const{isCollapsed:t,setIsCollapsed:r,collapsible:c}=(0,s.useContext)(d);return(0,n.jsxs)("div",{className:"space-y-4",children:[e,c&&(0,n.jsx)("button",{className:(0,o.cn)("bg-transparent w-full border-0 p-0 m-0 flex items-center gap-2 text-base cursor-pointer",t&&"justify-center"),onClick:()=>{r(!t),o.Ar.set("sidebar-collapsed",!t)},"aria-label":t?"Expand sidebar":"Collapse sidebar",children:t?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(a.m,{title:"Expand",children:(0,n.jsx)(i.A,{className:"size-5"})})}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.A,{className:"size-5"})," Collapse"]})})]})};p.displayName="Sidebar.Footer";const g=({children:e,className:t})=>(0,n.jsx)("div",{className:(0,o.cn)("w-full",t),children:e});g.displayName="Sidebar.Item";const x=Object.assign(c,{Header:u,Body:m,Footer:p,Item:g})},43953:(e,t,r)=>{r.d(t,{Ay:()=>I});var n=r(74848),s=r(51609),o=r(56877),l=r(30730),i=r(97073),a=r(38463),d=r(89667),c=r(83505),u=r(46885),m=r(34743),p=r(39413),g=r(39756);const x={sm:{icon:"[&>svg]:size-4",searchIcon:"[&>svg]:size-4",selectButton:"px-2.5 py-2 rounded text-xs font-medium leading-4 min-h-[2rem]",multiSelect:"pl-2 pr-2 py-1.5",displaySelected:"text-xs font-normal",dropdown:"rounded-md",dropdownItemsWrapper:"p-1.5",searchbarWrapper:"p-3 flex items-center gap-0.5",searchbar:"font-medium text-sm",searchbarIcon:"size-4",label:"text-sm font-medium"},md:{icon:"[&>svg]:size-5",searchIcon:"[&>svg]:size-5",selectButton:"px-3.5 py-2.5 rounded-md text-sm font-medium leading-4 min-h-[2.5rem]",multiSelect:"pl-2 pr-2.5 py-2",displaySelected:"text-sm font-normal",dropdown:"rounded-lg",dropdownItemsWrapper:"p-2",searchbarWrapper:"p-2.5 flex items-center gap-1",searchbar:"font-medium text-sm",searchbarIcon:"size-5",label:"text-sm font-medium"},lg:{icon:"[&>svg]:size-6",searchIcon:"[&>svg]:size-5",selectButton:"px-4 py-3 rounded-lg text-sm font-medium leading-5 min-h-[3rem]",multiSelect:"pl-2.5 pr-3 py-2.5",displaySelected:"text-base font-normal",dropdown:"rounded-lg",dropdownItemsWrapper:"p-2",searchbarWrapper:"p-2.5 flex items-center gap-1",searchbar:"font-medium text-sm",searchbarIcon:"size-5",label:"text-base font-medium"}},f="group-disabled:text-field-color-disabled",b={sm:"w-[calc(100%+0.75rem)] translate-x-[-0.375rem]",md:"w-[calc(100%+1rem)] translate-x-[-0.5rem]",lg:"w-[calc(100%+1rem)] translate-x-[-0.5rem]"},h={sm:"py-1.5 px-2 text-xs font-normal",md:"p-2 text-sm font-normal",lg:"p-2 text-base font-normal"},y=e=>null===e||"boolean"==typeof e?"":"string"==typeof e||"number"==typeof e?e.toString():Array.isArray(e)?e.map(y).join(" ").trim():(0,s.isValidElement)(e)?e.props&&e.props.children?y(e.props.children):"":"object"==typeof e&&"textContent"in e?e.textContent?.toString().toLowerCase()||"":"object"==typeof e&&"children"in e?y(e.children):"";var v=r(87835),w=r(3535);const j=(0,s.createContext)({}),N=()=>(0,s.useContext)(j),k=(0,s.forwardRef)(({children:e,icon:t=null,placeholder:r="Select an option",optionIcon:a=null,render:d,label:c,className:u,...m},p)=>{const{sizeValue:b,getReferenceProps:h,getValues:y,selectId:w,refs:j,isOpen:k,multiple:C,combobox:z,setSelected:A,onChange:S,isControlled:E,disabled:I,by:P}=N(),R={sm:"xs",md:"sm",lg:"md"}[b],F=(0,s.useCallback)(()=>t||(0,n.jsx)(z?l.A:i.A,{className:"text-field-placeholder group-disabled:text-icon-disabled"}),[t]),D=(0,s.useCallback)(()=>{const t=y();if(!t)return null;if(C)return t.map((e,t)=>(0,n.jsx)(v.A,{className:"cursor-default",icon:a,type:"rounded",size:R,onMouseDown:T(e),label:"function"==typeof d?d(e):e.toString(),closable:!0,disabled:I},t));let r="string"==typeof t?t:"";if("function"==typeof d&&(r=d(t)),"function"==typeof e&&"function"!=typeof d){const n={value:t,...C?{onClose:T(t)}:{}};r=e(n)}return((0,s.isValidElement)(e)||"string"==typeof e)&&"function"!=typeof d&&(r=e),(0,n.jsx)("span",{className:(0,o.cn)("truncate",x[b].displaySelected,f),children:r})},[y,I]),T=e=>t=>{t?.preventDefault(),t?.stopPropagation();const r=[...y()??[]],n=r.findIndex(t=>null!==t&&null!==e&&"object"==typeof t?t[P]===e[P]:t===e);-1!==n&&(r.splice(n,1),E||A(r),"function"==typeof S&&S(r))};return(0,n.jsxs)("div",{className:"w-full flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[!!c&&(0,n.jsx)("label",{className:(0,o.cn)(x[b]?.label,"text-field-label"),htmlFor:w,children:c}),(0,n.jsxs)("button",{id:w,ref:(0,g.Px)(j.setReference,p),className:(0,o.cn)("flex items-center justify-between w-full box-border transition-[outline,background-color,color,box-shadow] duration-200 bg-white","outline outline-1 outline-field-border border-none cursor-pointer",!k&&"focus:ring-2 focus:ring-offset-2 focus:outline-focus-border focus:ring-focus [&:hover:not(:focus):not(:disabled)]:outline-border-strong",x[b].selectButton,C&&x[b].multiSelect,"group disabled:outline-field-border-disabled [&:hover:has(:disabled)]:outline-field-border-disabled disabled:cursor-default",u),tabIndex:0,disabled:I,...m,...h(),children:[(0,n.jsxs)("div",{className:(0,o.cn)("flex-1 grid items-center justify-start gap-1.5 overflow-hidden",y()&&"flex flex-wrap"),children:[D(),(C?!y()?.length:!y())&&(0,n.jsx)("div",{className:(0,o.cn)("[grid-area:1/1/2/3] text-field-input px-1",x[b].displaySelected,f),children:r})]}),(0,n.jsx)("div",{className:(0,o.cn)("flex items-center [&>svg]:shrink-0",x[b].icon),children:F()})]})]})});function C({label:e,children:t,className:r,...l}){const{index:i,totalGroups:a}=l,{sizeValue:d}=N();return(0,n.jsxs)(s.Fragment,{children:[(0,n.jsxs)("div",{className:"flex flex-col",role:"group","aria-label":e,children:[(0,n.jsx)("div",{className:(0,o.cn)("p-2 font-normal text-text-tertiary",{sm:"text-xs",md:"text-xs",lg:"text-sm"}[d],r),id:`group-${e?.toLowerCase().replace(/\s+/g,"-")}`,children:e}),(0,n.jsx)("div",{className:"flex flex-col",role:"presentation","aria-labelledby":`group-${e?.toLowerCase().replace(/\s+/g,"-")}`,children:t})]}),i<a&&!!(t&&s.Children.count(t)>0)&&(0,n.jsx)("hr",{className:(0,o.cn)("h-px my-2 w-full border-border-subtle border-b border-t-0 border-solid",b[d])})]})}function z({children:e,className:t}){const{isOpen:r,context:l,refs:i,combobox:d,floatingStyles:u,getFloatingProps:m,sizeValue:p,setSearchKeyword:g,setActiveIndex:f,setSelectedIndex:b,value:v,selected:j,getValues:k,searchKeyword:z,listContentRef:A,by:S,searchPlaceholder:E,activeIndex:I,searchFn:P,debounceDelay:R}=N(),F=(0,s.useMemo)(()=>{const t=k();let r=-1;if(t){let n=s.Children.toArray(e);n.length>0&&(0,s.isValidElement)(n[0])&&n[0].type===C&&(n=s.Children.toArray(e).map(e=>(0,s.isValidElement)(e)?s.Children.toArray(e.props.children):[]).flat()),r=n.findIndex(e=>{if(!(0,s.isValidElement)(e))return!1;const r=e.props.value;return"object"==typeof r&&"object"==typeof t?r[S]===t[S]:r===t})}return r},[v,j,e,S]);(0,s.useLayoutEffect)(()=>{r||(f(F),b(F))},[F,r]),(0,s.useLayoutEffect)(()=>{r&&(d&&[-1,null].includes(I)||f(-1))},[z,r]);const D=(0,s.useMemo)(()=>{let t=0,r=0;s.Children.forEach(e,e=>{if((0,s.isValidElement)(e)&&e.type===C){let r=!1;if(z&&!P){const t=z.toLowerCase(),n=(e.props.label?.toLowerCase()||"").includes(t),o=s.Children.toArray(e.props.children).some(e=>!!(0,s.isValidElement)(e)&&(y(e.props.children)?.toLowerCase()).includes(t));r=n||o}else r=!0;r&&t++}}),r=Math.max(0,t-1);let n=0,o=0;return s.Children.map(e,e=>{if(!(0,s.isValidElement)(e))return null;if(e.type===C){let t=!1;if(z&&!P){const r=z.toLowerCase();t=(e.props.label?.toLowerCase()||"").includes(r)}const l=s.Children.map(e.props.children,e=>{if(!(0,s.isValidElement)(e))return null;if(t){const t={...e.props,index:n++};return(0,s.cloneElement)(e,t)}if(z&&!P){const t=y(e.props.children)?.toLowerCase(),r=z.toLowerCase();if(!t?.includes(r))return null}const r={...e.props,index:n++};return(0,s.cloneElement)(e,r)});if(!l?.some(e=>null!==e))return null;const i={...e.props,children:l,index:o,totalGroups:r};return o++,(0,s.cloneElement)(e,i)}if(z&&!P){const t=y(e.props?.children)?.toLowerCase(),r=z.toLowerCase();if(!t?.includes(r))return null}return(0,s.cloneElement)(e,{...e.props,index:n++})})},[z,v,j,e,P]),T=s.Children.count(D);(0,s.useEffect)(()=>{A.current=[];let t=s.Children.toArray(e);t&&(0,s.isValidElement)(t[0])&&t[0].type===C&&(t=s.Children.toArray(t).map(e=>(0,s.isValidElement)(e)?e.props.children:null).filter(Boolean)),s.Children.forEach(t,e=>{if(!(0,s.isValidElement)(e))return;const t=y(e.props?.children)?.toLowerCase();if(z&&!P){const e=z.toLowerCase();if(!t?.includes(e))return}A.current.push(t)})},[z,P]);const[M,L]=(0,s.useState)(!1),O=((e,t=500)=>{const r=(0,s.useRef)(null);return(0,s.useCallback)((...n)=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>e(...n),t)},[e,t])})((0,s.useCallback)(async()=>{if(P&&"function"==typeof P&&!M){L(!0);try{await P(z)}catch(h){}finally{L(!1)}}},[z]),R);return(0,s.useEffect)(()=>{"function"==typeof P&&O()},[O]),(0,n.jsx)(n.Fragment,{children:r&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(c.s3,{context:l,modal:!1,visuallyHiddenDismiss:!0,children:(0,n.jsxs)("div",{ref:i.setFloating,className:(0,o.cn)("box-border [&_*]:box-border w-full bg-white outline-none shadow-lg outline outline-1 outline-border-subtle",d&&"grid grid-cols-1 grid-rows-[auto_1fr] divide-y divide-x-0 divide-solid divide-border-subtle",x[p].dropdown,!d&&"h-auto",d?"overflow-hidden":"overflow-y-auto overflow-x-hidden",t),style:{...u,zIndex:1},...m(),children:[d&&(0,n.jsxs)("div",{className:(0,o.cn)(x[p].searchbarWrapper),children:[M?(0,n.jsx)(w.a,{className:x[p].searchbarIcon}):(0,n.jsx)(a.A,{className:(0,o.cn)("text-icon-secondary shrink-0",x[p].searchbarIcon)}),(0,n.jsx)("input",{className:(0,o.cn)("px-1 w-full placeholder:text-field-placeholder border-0 focus:outline-none focus:shadow-none",x[p].searchbar),type:"search",name:"keyword",placeholder:E,onChange:e=>g(e.target.value),value:z,autoComplete:"off"})]}),(0,n.jsxs)("div",{className:(0,o.cn)("overflow-y-auto overflow-x-hidden",!d&&"w-full h-full",x[p].dropdownItemsWrapper),children:[!!T&&D,!T&&(0,n.jsx)("div",{className:(0,o.cn)("p-2 text-center font-medium text-field-placeholder",h[p]),children:"No items found"})]})]})})})})}function A({children:e,root:t,id:r}){return(0,n.jsx)(c.XF,{id:r,root:t,children:e})}function S({value:e,selected:t,children:r,className:l,...i}){const{sizeValue:a,getItemProps:c,onKeyDownItem:u,onClickItem:m,activeIndex:p,selectedIndex:g,updateListRef:x,getValues:f,by:b,multiple:y}=N(),{index:v}=i,w=(0,s.useRef)(v),j=(0,s.useMemo)(()=>{if(!y)return!1;const t=f();return!!t&&t.some(t=>null!==t&&null!==e&&"object"==typeof t?t[b]===e[b]:t===e)},[e,f]),k=(0,s.useMemo)(()=>"boolean"==typeof t?t:y?j:v===g,[j,g,t]);return(0,n.jsxs)("div",{className:(0,o.cn)("w-full flex items-center justify-between text-text-primary hover:bg-button-tertiary-hover rounded-md transition-all duration-150 cursor-pointer focus:outline-none focus-within:outline-none outline-none",h[a],v===p&&"bg-button-tertiary-hover",l),ref:e=>{x(v,e)},role:"option",tabIndex:v===p?0:-1,"aria-selected":k&&v===p,...c({onClick(){m(w.current,e)},onKeyDown(t){u(t,w.current,e)}}),children:[(0,n.jsx)("span",{className:"w-full truncate",children:r}),k&&(0,n.jsx)(d.A,{className:(0,o.cn)("text-icon-on-color-disabled",{sm:"size-4",md:"size-4",lg:"size-5"}[a])})]})}const E=({id:e,size:t="md",value:r,defaultValue:o,onChange:l,by:i="id",children:a,multiple:d=!1,combobox:g=!1,disabled:x=!1,searchPlaceholder:f="Search...",searchFn:b,debounceDelay:h=500})=>{const y=(0,s.useMemo)(()=>e||`select-${(0,p.Ak)()}`,[e]),v=(0,s.useMemo)(()=>typeof r<"u",[r]),[w,N]=(0,s.useState)(o),[k,C]=(0,s.useState)(""),z=(0,s.useCallback)(()=>v?r:w,[v,r,w]),[A,S]=(0,s.useState)(!1),[E,I]=(0,s.useState)(null),[P,R]=(0,s.useState)(null),F={sm:g?256:172,md:g?256:216,lg:g?256:216},{refs:D,floatingStyles:T,context:M}=(0,c.we)({strategy:"fixed",placement:"bottom-start",open:A,onOpenChange:S,whileElementsMounted:u.ll,middleware:[(0,m.cY)(5),(0,m.UU)({padding:10}),(0,m.Ej)({apply({rects:e,elements:r,availableHeight:n}){Object.assign(r.floating.style,{maxHeight:`min(${n}px, ${F[t]}px)`,maxWidth:`${e.reference.width}px`})},padding:10})]}),L=(0,s.useRef)([]),O=(0,s.useRef)([]),_=(0,s.useRef)(!1),B=(0,c.kp)(M,{event:"mousedown"}),V=(0,c.s9)(M),K=(0,c.It)(M,{role:"listbox"}),$=(0,c.C1)(M,{listRef:L,activeIndex:E,selectedIndex:P,onNavigate:I,loop:!0}),W=(0,c.lY)(M,{listRef:O,activeIndex:E,selectedIndex:P,onMatch:A?I:R,onTypingChange(e){_.current=e}}),{getReferenceProps:H,getFloatingProps:U,getItemProps:G}=(0,c.bv)([V,K,$,B,...g?[]:[W]]),X=(e,t)=>{if(d)return((e,t)=>{const r=[...z()??[]];-1===r.findIndex(e=>null!==e&&null!==t&&"object"==typeof e?e[i]===t[i]:e===t)&&(r.push(t),v||N(r),R(e),D.reference.current.focus(),S(!1),C(""),"function"==typeof l&&l(r))})(e,t);R(e),v||N(t),D.reference.current.focus(),S(!1),C(""),"function"==typeof l&&l(t)},J=(0,s.useCallback)((e,t)=>{L.current[e]=t},[]);return(0,n.jsx)(j.Provider,{value:{selectedIndex:P,setSelectedIndex:R,activeIndex:E,setActiveIndex:I,selected:w,setSelected:N,handleSelect:X,combobox:g,sizeValue:t,multiple:d,onChange:l,isTypingRef:_,getItemProps:G,onClickItem:(e,t)=>{X(e,t)},onKeyDownItem:(e,t,r)=>{"Enter"===e.key&&(e.preventDefault(),X(t,r))," "===e.key&&!_.current&&(e.preventDefault(),X(t,r))},getValues:z,selectId:y,getReferenceProps:H,isOpen:A,value:r,updateListRef:J,refs:D,listContentRef:O,by:i,getFloatingProps:U,floatingStyles:T,context:M,searchKeyword:k,setSearchKeyword:C,disabled:x,isControlled:v,searchPlaceholder:f,searchFn:b,debounceDelay:h},children:a})};E.displayName="Select";const I=Object.assign(E,{Portal:A,Button:k,Options:z,Option:S,OptionGroup:C});A.displayName="Select.Portal",k.displayName="Select.Button",z.displayName="Select.Options",S.displayName="Select.Option",C.displayName="Select.OptionGroup"},45350:(e,t,r)=>{r.d(t,{mc:()=>z});var n=r(74848),s=r(51609),o=r(56877);const l={sm:{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},md:{1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-7",8:"md:grid-cols-8",9:"md:grid-cols-9",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12"},lg:{1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",7:"lg:grid-cols-7",8:"lg:grid-cols-8",9:"lg:grid-cols-9",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12"}},i={sm:{xs:"gap-2",sm:"gap-4",md:"gap-5",lg:"gap-6",xl:"gap-6","2xl":"gap-8"},md:{xs:"md:gap-2",sm:"md:gap-4",md:"md:gap-5",lg:"md:gap-6",xl:"md:gap-6","2xl":"md:gap-8"},lg:{xs:"lg:gap-2",sm:"lg:gap-4",md:"lg:gap-5",lg:"lg:gap-6",xl:"lg:gap-6","2xl":"lg:gap-8"}},a={sm:{xs:"gap-x-2",sm:"gap-x-4",md:"gap-x-5",lg:"gap-x-6",xl:"gap-x-6","2xl":"gap-x-8"},md:{xs:"md:gap-x-2",sm:"md:gap-x-4",md:"md:gap-x-5",lg:"md:gap-x-6",xl:"md:gap-x-6","2xl":"md:gap-x-8"},lg:{xs:"lg:gap-x-2",sm:"lg:gap-x-4",md:"lg:gap-x-5",lg:"lg:gap-x-6",xl:"lg:gap-x-6","2xl":"lg:gap-x-8"}},d={sm:{xs:"gap-y-2",sm:"gap-y-4",md:"gap-y-5",lg:"gap-y-6",xl:"gap-y-6","2xl":"gap-y-8"},md:{xs:"md:gap-y-2",sm:"md:gap-y-4",md:"md:gap-y-5",lg:"md:gap-y-6",xl:"md:gap-y-6","2xl":"md:gap-y-8"},lg:{xs:"lg:gap-y-2",sm:"lg:gap-y-4",md:"lg:gap-y-5",lg:"lg:gap-y-6",xl:"lg:gap-y-6","2xl":"lg:gap-y-8"}},c={sm:{1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12"},md:{1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12"},lg:{1:"lg:col-span-1",2:"lg:col-span-2",3:"lg:col-span-3",4:"lg:col-span-4",5:"lg:col-span-5",6:"lg:col-span-6",7:"lg:col-span-7",8:"lg:col-span-8",9:"lg:col-span-9",10:"lg:col-span-10",11:"lg:col-span-11",12:"lg:col-span-12"}},u={sm:{1:"col-start-1",2:"col-start-2",3:"col-start-3",4:"col-start-4",5:"col-start-5",6:"col-start-6",7:"col-start-7",8:"col-start-8",9:"col-start-9",10:"col-start-10",11:"col-start-11",12:"col-start-12"},md:{1:"md:col-start-1",2:"md:col-start-2",3:"md:col-start-3",4:"md:col-start-4",5:"md:col-start-5",6:"md:col-start-6",7:"md:col-start-7",8:"md:col-start-8",9:"md:col-start-9",10:"md:col-start-10",11:"md:col-start-11",12:"md:col-start-12"},lg:{1:"lg:col-start-1",2:"lg:col-start-2",3:"lg:col-start-3",4:"lg:col-start-4",5:"lg:col-start-5",6:"lg:col-start-6",7:"lg:col-start-7",8:"lg:col-start-8",9:"lg:col-start-9",10:"lg:col-start-10",11:"lg:col-start-11",12:"lg:col-start-12"}},m={sm:{row:"grid-flow-row",column:"grid-flow-col","row-dense":"grid-flow-row-dense","column-dense":"grid-flow-col-dense"},md:{row:"md:grid-flow-row",column:"md:grid-flow-col","row-dense":"md:grid-flow-row-dense","column-dense":"md:grid-flow-col-dense"},lg:{row:"lg:grid-flow-row",column:"lg:grid-flow-col","row-dense":"lg:grid-flow-row-dense","column-dense":"lg:grid-flow-col-dense"}},p={sm:{normal:"justify-normal",start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between",around:"justify-around",evenly:"justify-evenly",stretch:"justify-stretch"},md:{normal:"md:justify-normal",start:"md:justify-start",end:"md:justify-end",center:"md:justify-center",between:"md:justify-between",around:"md:justify-around",evenly:"md:justify-evenly",stretch:"md:justify-stretch"},lg:{normal:"lg:justify-normal",start:"lg:justify-start",end:"lg:justify-end",center:"lg:justify-center",between:"lg:justify-between",around:"lg:justify-around",evenly:"lg:justify-evenly",stretch:"lg:justify-stretch"}},g={sm:{start:"items-start",end:"items-end",center:"items-center",baseline:"items-baseline",stretch:"items-stretch"},md:{start:"md:items-start",end:"md:items-end",center:"md:items-center",baseline:"md:items-baseline",stretch:"md:items-stretch"},lg:{start:"lg:items-start",end:"lg:items-end",center:"lg:items-center",baseline:"lg:items-baseline",stretch:"lg:items-stretch"}},x={sm:{start:"self-start",end:"self-end",center:"self-center",baseline:"self-baseline",stretch:"self-stretch"},md:{start:"md:self-start",end:"md:self-end",center:"md:self-center",baseline:"md:self-baseline",stretch:"md:self-stretch"},lg:{start:"lg:self-start",end:"lg:self-end",center:"lg:self-center",baseline:"lg:self-baseline",stretch:"lg:self-stretch"}},f={sm:{auto:"justify-self-auto",start:"justify-self-start",end:"justify-self-end",center:"justify-self-center",baseline:"justify-self-baseline",stretch:"justify-self-stretch"},md:{auto:"md:justify-self-auto",start:"md:justify-self-start",end:"md:justify-self-end",center:"md:justify-self-center",baseline:"md:justify-self-baseline",stretch:"md:justify-self-stretch"},lg:{auto:"lg:justify-self-auto",start:"lg:justify-self-start",end:"lg:justify-self-end",center:"lg:justify-self-center",baseline:"lg:justify-self-baseline",stretch:"lg:justify-self-stretch"}},b={sm:{row:"flex-row","row-reverse":"flex-row-reverse",column:"flex-col","column-reverse":"flex-col-reverse"},md:{row:"md:flex-row","row-reverse":"md:flex-row-reverse",column:"md:flex-col","column-reverse":"md:flex-col-reverse"},lg:{row:"lg:flex-row","row-reverse":"lg:flex-row-reverse",column:"lg:flex-col","column-reverse":"lg:flex-col-reverse"}},h={sm:{wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse",nowrap:"flex-nowrap"},md:{wrap:"md:flex-wrap","wrap-reverse":"md:flex-wrap-reverse",nowrap:"md:flex-nowrap"},lg:{wrap:"lg:flex-wrap","wrap-reverse":"lg:flex-wrap-reverse",nowrap:"lg:flex-nowrap"}},y={sm:{1:"w-full",2:"w-1/2",3:"w-1/3",4:"w-1/4",5:"w-1/5",6:"w-1/6",7:"w-1/7",8:"w-1/8",9:"w-1/9",10:"w-1/10",11:"w-1/11",12:"w-1/12"},md:{1:"md:w-full",2:"md:w-1/2",3:"md:w-1/3",4:"md:w-1/4",5:"md:w-1/5",6:"md:w-1/6",7:"md:w-1/7",8:"md:w-1/8",9:"md:w-1/9",10:"md:w-1/10",11:"md:w-1/11",12:"md:w-1/12"},lg:{1:"lg:w-full",2:"lg:w-1/2",3:"lg:w-1/3",4:"lg:w-1/4",5:"lg:w-1/5",6:"lg:w-1/6",7:"lg:w-1/7",8:"lg:w-1/8",9:"lg:w-1/9",10:"lg:w-1/10",11:"lg:w-1/11",12:"lg:w-1/12"}},v={sm:{1:"order-1",2:"order-2",3:"order-3",4:"order-4",5:"order-5",6:"order-6",7:"order-7",8:"order-8",9:"order-9",10:"order-10",11:"order-11",12:"order-12",first:"order-first",last:"order-last",none:"order-none"},md:{1:"md:order-1",2:"md:order-2",3:"md:order-3",4:"md:order-4",5:"md:order-5",6:"md:order-6",7:"md:order-7",8:"md:order-8",9:"md:order-9",10:"md:order-10",11:"md:order-11",12:"md:order-12",first:"md:order-first",last:"md:order-last",none:"md:order-none"},lg:{1:"lg:order-1",2:"lg:order-2",3:"lg:order-3",4:"lg:order-4",5:"lg:order-5",6:"lg:order-6",7:"lg:order-7",8:"lg:order-8",9:"lg:order-9",10:"lg:order-10",11:"lg:order-11",12:"lg:order-12",first:"lg:order-first",last:"lg:order-last",none:"lg:order-none"}},w={sm:{0:"grow-0",1:"grow"},md:{0:"md:grow-0",1:"md:grow"},lg:{0:"lg:grow-0",1:"lg:grow"}},j={sm:{0:"shrink-0",1:"shrink"},md:{0:"md:shrink-0",1:"md:shrink"},lg:{0:"lg:shrink-0",1:"lg:shrink"}},N=(e,t,r,n="sm")=>{const s=[];switch(typeof e){case"object":for(const[n,l]of Object.entries(e))t[n]&&s.push(t?.[n]?.[l]??t?.[n]?.[r?.[n]]??"");break;case"string":case"number":const o=n;s.push(t?.[o]?.[e]??t?.[o]?.[r?.[o]]??"");break;default:if(void 0===e)break;s.push(t?.[n]?.[r]??"")}return s.join(" ")},k=({className:e,cols:t,gap:r,gapX:s,gapY:c,align:u,justify:x,gridFlow:f,colsSubGrid:b=!1,rowsSubGrid:h=!1,autoRows:y=!1,autoCols:v=!1,children:w,...j})=>{const k=N(t,l,1),C=N(r,i,"sm"),z=N(s,a,""),A=N(c,d,""),S=N(u,g,""),E=N(x,p,""),I=N(f,m,"");return(0,n.jsx)("div",{className:(0,o.cn)("grid",{"grid-cols-subgrid":b,"grid-rows-subgrid":h,"auto-cols-auto":v,"auto-rows-auto":y},k,C,z,A,S,E,I,e),...j,children:w})};k.Item=({className:e,children:t,colSpan:r,colStart:s,alignSelf:l,justifySelf:i,...a})=>{const d=N(r,c,0),m=N(s,u,0),p=N(l,x,""),g=N(i,f,"");return(0,n.jsx)("div",{className:(0,o.cn)(d,m,p,g,e),...a,children:t})};const C=(0,s.createContext)({}),z=({containerType:e="flex",gap:t="sm",gapX:r,gapY:s,direction:l,justify:c,align:u,wrap:m,cols:x,className:f,children:y,...v})=>{if("grid"===e)return(0,n.jsx)(C.Provider,{value:{containerType:e},children:(0,n.jsx)(k,{className:f,gap:t,gapX:r,gapY:s,cols:x,children:y,align:u,justify:c,...v})});const w=N(m,h,""),j=N(t,i,"sm"),z=N(r,a,""),A=N(s,d,""),S=N(l,b,""),E=N(c,p,""),I=N(u,g,""),P=(0,o.cn)("flex",w,j,z,A,S,E,I,f);return(0,n.jsx)(C.Provider,{value:{containerType:e,cols:x},children:"flex"===e?(0,n.jsx)("div",{className:P,children:y}):(0,n.jsx)(k,{className:f,gap:t,gapX:r,gapY:s,cols:x,children:y,align:u,justify:c,...v})})},A=({grow:e,shrink:t,order:r,alignSelf:l,justifySelf:i,className:a,children:d,...c})=>{const{containerType:u,cols:m}=(0,s.useContext)(C);if("grid"===u)return(0,n.jsx)(k.Item,{className:a,alignSelf:l,justifySelf:i,children:d,...c});const p=N(l,x,""),g=N(i,f,""),b=N(e,w,0),h=N(t,j,0),z=N(r,v,0),A=N(m,y,1);return(0,n.jsx)("div",{className:(0,o.cn)("box-border",b,h,z,p,g,A,a),children:d})};z.Item=A,z.displayName="Container",A.displayName="Container.Item"},53778:(e,t,r)=>{r.d(t,{Gd:()=>y});var n=r(74848),s=r(51609),o=r(66087),l=r(56877),i=r(38463);const a={sm:"text-xs [&>svg]:size-4 rounded",md:"text-sm [&>svg]:size-5 rounded-md",lg:"text-base [&>svg]:size-6 rounded-md"},d={input:{sm:"py-1.5 px-2 rounded",md:"p-2.5 rounded-md",lg:"p-3 rounded-md"},content:{sm:"p-1.5",md:"p-1.5",lg:"p-2"},title:{sm:"p-2 text-xs",md:"p-2 text-sm",lg:"p-2 text-sm"},item:{sm:"text-sm text-text-secondary rounded",md:"text-base text-text-secondary rounded-md",lg:"text-base text-text-secondary rounded-md"},icon:{sm:"p-1 text-sm [&>svg]:size-4 text-icon-secondary",md:"p-2 text-base [&>svg]:size-5 text-icon-secondary",lg:"p-2 text-base [&>svg]:size-5 text-icon-secondary"},dialog:{sm:"mt-1 rounded-md",md:"mt-1.5 rounded-lg",lg:"mt-1.5 rounded-lg"},slashIcon:{sm:"px-2 py-0.5",md:"px-3 py-1",lg:"px-3.5 py-1"}},c={primary:"bg-field-primary-background outline outline-1 outline-field-border hover:outline-border-strong focus-within:outline-focus-border focus-within:hover:outline-focus-border",secondary:"bg-field-secondary-background outline outline-1 outline-field-border hover:outline-border-strong focus-within:outline-focus-border focus-within:hover:outline-focus-border",ghost:"bg-field-secondary-background outline outline-1 outline-transparent focus-within:outline-focus-border"},u={ghost:"cursor-not-allowed text-text-disabled placeholder:text-text-disabled",primary:"outline-border-disabled hover:outline-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled placeholder:text-text-disabled",secondary:"outline-border-disabled hover:outline-border-disabled cursor-not-allowed text-text-disabled placeholder:text-text-disabled"};var m=r(83505),p=r(46885),g=r(34743),x=r(87835),f=r(3535);const b=(0,s.createContext)({}),h=()=>(0,s.useContext)(b),y=(0,s.forwardRef)(({className:e,size:t="sm",open:r=!1,setOpen:o,onOpenChange:i,loading:a=!1,clearAfterSelect:d=!0,closeAfterSelect:c=!0,variant:u="primary",filter:x=!0,...f},h)=>{const[y,v]=(0,s.useState)(""),[w,j]=(0,s.useState)(a??!1),[N,k]=(0,s.useState)(null),C=s.useRef([]),z=(0,s.useMemo)(()=>"function"==typeof o?o:i,[o,i]),{refs:A,floatingStyles:S,context:E}=(0,m.we)({open:r,onOpenChange:z,placement:"bottom-start",whileElementsMounted:p.ll,middleware:[(0,g.cY)(2),(0,g.UU)({padding:10}),(0,g.Ej)({apply({rects:e,elements:t,availableHeight:r}){t.floating.style.maxHeight=`${r}px`,t.floating.style.width=`${e.reference.width}px`,t.floating.style.fontFamily=window.getComputedStyle(t.reference).fontFamily}})]}),I=(0,m.C1)(E,{listRef:C,activeIndex:N,onNavigate:k,loop:!0,openOnArrowKeyDown:!1}),P=(0,m.s9)(E),{getReferenceProps:R,getFloatingProps:F,getItemProps:D}=(0,m.bv)([P,I]);return(0,s.useEffect)(()=>{const e=(0,l.DC)(),t=t=>{if("/"===t.key&&("Mac OS"===e?t.metaKey:t.ctrlKey)&&(t.preventDefault(),A.reference&&A.reference.current)){const e=A.reference.current instanceof HTMLElement?A.reference.current.querySelector("input"):null;e&&e.focus()}};return window.addEventListener("keydown",t),()=>{window.removeEventListener("keydown",t)}},[A.reference]),(0,s.useEffect)(()=>{r||k(null)},[r]),(0,n.jsx)(b.Provider,{value:{size:t,open:r,onOpenChange:z,refs:A,floatingStyles:S,context:E,getReferenceProps:R,getFloatingProps:F,getItemProps:D,activeIndex:N,setActiveIndex:k,listRef:C,searchTerm:y,setSearchTerm:v,isLoading:w,setIsLoading:j,clearAfterSelect:d,closeAfterSelect:c,variant:u,filter:x},children:(0,n.jsx)("div",{className:(0,l.cn)("searchbox-wrapper box-border relative w-full",e),...f,ref:h})})});y.displayName="SearchBox";const v=(0,s.forwardRef)(({className:e,type:t="text",placeholder:r="Search...",disabled:s=!1,onChange:m=()=>{},...p},g)=>{const{size:f,refs:b,getReferenceProps:y,searchTerm:v,setSearchTerm:w,open:j,setActiveIndex:N,listRef:k,onOpenChange:C,variant:z}=h(),A="lg"===f?"sm":"xs";return(0,n.jsxs)("div",{ref:b.setReference,className:(0,l.cn)("w-full group relative flex justify-center items-center gap-1.5 focus-within:z-10 transition-all ease-in-out duration-200",c[z],d.input[f],s?u[z]:"focus-within:ring-2 focus-within:ring-focus focus-within:ring-offset-2 focus-within:border-focus-border focus-within:hover:border-focus-border",e),...y(),children:[(0,n.jsx)("span",{className:(0,l.cn)(a[f],s?"text-icon-disabled":"text-icon-secondary group-hover:text-icon-primary group-focus-within:text-icon-primary","flex justify-center items-center"),children:(0,n.jsx)(i.A,{})}),(0,n.jsx)("input",{type:t,ref:g,className:(0,l.cn)(a[f],"flex-grow font-medium bg-transparent border-none outline-none border-transparent focus:ring-0 p-0 min-h-fit",s&&"text-field-placeholder focus-within:text-field-input group-hover:text-field-input placeholder:text-field-placeholder"),disabled:s,value:v,onChange:e=>{const t=e.target.value;w(t),m(t),"function"==typeof C&&(t.trim()?C(!0):C(!1))},onFocus:()=>{s||"function"!=typeof C||v?.trim()&&C(!0)},onKeyDown:e=>{if(!s){if("ArrowDown"===e.key||"ArrowUp"===e.key)return void(j&&(e.preventDefault(),"ArrowDown"===e.key?N(e=>null===e?0:e):"ArrowUp"===e.key&&N(e=>{const t=k?.current?.length||0;return null===e&&t>0?t-1:e})));"Escape"===e.key&&C(!1)}},placeholder:r,...(0,o.omit)(p,["size","open","onOpenChange","loading"])}),(0,n.jsx)(x.A,{label:"Mac OS"===(0,l.DC)()?"\u2318/":"Ctrl /",size:A,type:"rounded",variant:"neutral",className:"bg-background-primary"})]})});v.displayName="SearchBox.Input";const w=({className:e,children:t,...r})=>{const{size:s,open:o,refs:i,floatingStyles:a,getFloatingProps:c,context:u}=h();return o?(0,n.jsx)(m.s3,{context:u,initialFocus:-1,returnFocus:!0,children:(0,n.jsx)("div",{ref:i.setFloating,style:{...a},className:(0,l.cn)("bg-background-primary rounded-md border border-solid border-border-subtle shadow-soft-shadow-lg overflow-y-auto text-wrap focus:outline-none",d.dialog[s],e),...c(),...r,children:t})}):null};w.displayName="SearchBox.Content";const j=({children:e,id:t,root:r})=>(0,n.jsx)(m.XF,{id:t,root:r,children:e});j.displayName="SearchBox.Portal";const N=({children:e,className:t})=>{const{searchTerm:r,isLoading:o,listRef:l,filter:i=!0}=h();if(!i)return(0,n.jsx)(m.ph,{elementsRef:l,children:(0,n.jsx)("div",{className:t,children:e})});const a=s.Children.toArray(e).map(e=>{if(s.isValidElement(e)&&e.type===C){const t=s.Children.toArray(e.props.children).filter(e=>s.isValidElement(e)&&"string"==typeof e.props.children&&e.props.children.toLowerCase().includes(r.toLowerCase()));return t.length>0?(0,s.cloneElement)(e,{children:t}):null}return e}).filter(Boolean);return o?(0,n.jsx)(A,{}):(0,n.jsx)(m.ph,{elementsRef:l,children:(0,n.jsx)("div",{className:t,children:a.some(e=>s.isValidElement(e)&&e.type!==S)?a:(0,n.jsx)(k,{})})})};N.displayName="SearchBox.List";const k=({children:e="No results found.",className:t})=>{const{size:r}=h();return(0,n.jsx)("div",{className:(0,l.cn)("flex justify-center items-center",d.item[r],"text-text-tertiary p-4",t),children:e})};k.displayName="SearchBox.Empty";const C=({heading:e,children:t})=>{const{size:r}=h();return(0,n.jsxs)("div",{className:(0,l.cn)(d.content[r],d.item[r]),children:[e&&(0,n.jsx)("div",{className:(0,l.cn)(d.title[r],"text-text-tertiary"),children:e}),t]})};C.displayName="SearchBox.Group";const z=(0,s.forwardRef)(({className:e,icon:t,children:r,onClick:s,...o},i)=>{const{size:a,setSearchTerm:c,clearAfterSelect:u,getItemProps:p,activeIndex:g,onOpenChange:x,closeAfterSelect:f}=h(),{ref:b,index:y}=(0,m.rm)(),v=g===y;return(0,n.jsxs)("button",{type:"button",ref:e=>{"function"==typeof i?i(e):i&&(i.current=e),b(e)},className:(0,l.cn)("flex w-full items-center justify-start gap-1 p-1 cursor-pointer border-none bg-transparent text-left focus:outline-none",v&&"bg-background-secondary",!v&&"hover:bg-background-secondary focus:bg-background-secondary",d.item[a],e),...p?.({role:"option","aria-selected":v,onClick:()=>{"function"==typeof s&&s(),u&&c(""),f&&x(!1)},...o}),children:[t&&(0,n.jsx)("span",{className:(0,l.cn)(d.icon[a],"flex items-center justify-center"),children:t}),(0,n.jsx)("span",{className:(0,l.cn)("flex-grow py-0.5 px-1 font-normal",d.item[a]),children:r})]})});z.displayName="SearchBox.Item";const A=({loadingIcon:e=(0,n.jsx)(f.a,{})})=>{const{size:t}=h(),r=s.isValidElement(e)?(0,s.cloneElement)(e,{size:t}):e;return(0,n.jsx)("div",{className:(0,l.cn)("flex justify-center p-4",a[t],d.item[t]),children:r})};A.displayName="SearchBox.Loading";const S=(0,s.forwardRef)(({className:e,...t},r)=>(0,n.jsx)("hr",{ref:r,className:(0,l.cn)("border-0 border-t border-border-subtle border-solid m-0",e),...t}));S.displayName="SearchBox.Separator",y.Input=v,y.Loading=A,y.Separator=S,y.Content=w,y.List=N,y.Empty=k,y.Group=C,y.Item=z,y.Portal=j},54429:(e,t,r)=>{r.d(t,{Ay:()=>g});var n=r(74848),s=r(51609),o=r(56877),l=r(87116),i=r(22343),a=r(39413);const d=(0,s.createContext)({}),c=()=>(0,s.useContext)(d),u=(0,s.createContext)(null),m=({children:e,activeItem:t=null,onChange:r,className:i,size:d="sm",orientation:m="horizontal",variant:p="pill",iconPosition:g="left",width:x="full"})=>{const f=(0,a.Ak)(),b=c()?.activeItem||t,h=(0,s.useCallback)((e,t)=>{r&&r({event:e,value:t})},[r]);let y,v="rounded-full",w="p-1",j="ring-1 ring-tab-border";"vertical"===m?y="gap-0.5":("rounded"===p||"pill"===p)&&("xs"===d||"sm"===d?y="gap-0.5":("md"===d||"lg"===d)&&(y="gap-1")),"rounded"===p||"vertical"===m?v="rounded-md":"underline"===p&&(v="rounded-none",w="p-0",j="border-t-0 border-r-0 border-l-0 border-b border-solid border-tab-border","xs"===d?y="gap-0":"sm"===d?y="gap-2.5":("md"===d||"lg"===d)&&(y="gap-3"));const N=(0,o.cn)(`box-border [&>*]:box-border flex items-center ${"full"===x?"w-full":""} ${"vertical"===m?"flex-col":""}`,v,w,y,j,"underline"!==p?"bg-tab-background":"",i);return(0,n.jsx)("div",{className:N,children:(0,n.jsx)(u.Provider,{value:{activeItem:b,onChange:h,size:d,variant:p,orientation:m,iconPosition:g,width:x},children:(0,n.jsx)(l.o,{id:f,children:s.Children.map(e,e=>(0,s.isValidElement)(e)?s.cloneElement(e):null)})})})};m.displayName="Tabs.Group";const p=(0,s.forwardRef)(({slug:e,text:t,icon:r,className:l,disabled:a=!1,badge:d=null,...c},m)=>{const p=(0,s.useContext)(u);if(!p)throw new Error("Tab should be used inside Tabs Group");const{activeItem:g,onChange:x,size:f,variant:b,orientation:h,iconPosition:y,width:v}=p,w={xs:"px-1.5 py-0.5 text-xs [&_svg]:size-3",sm:"underline"===b?"py-1.5 text-sm [&_svg]:size-4":"px-3 py-1.5 text-sm [&_svg]:size-4",md:"underline"===b?"py-2 text-base [&_svg]:size-5":"px-3.5 py-1.5 text-base [&_svg]:size-5",lg:"underline"===b?"p-2.5 text-lg [&_svg]:size-6":"px-3.5 py-1.5 text-lg [&_svg]:size-6"}[f],j=(0,o.cn)("relative border-none bg-transparent text-text-secondary cursor-pointer flex items-center justify-center transition-[box-shadow,color,background-color] duration-200","full"===v?"flex-1":"","vertical"===h?"w-full justify-between":"");let N="rounded-full";"rounded"===b?N="rounded-md":"underline"===b&&(N="rounded-none");const k=(0,o.cn)(j,"border-none",N,"hover:text-text-primary","focus:outline-none",w,g===e?"bg-background-primary text-text-primary shadow-sm":"",a?"text-text-disabled cursor-not-allowed hover:text-text-disabled":"",l),C=(0,o.cn)("flex items-center gap-1");return(0,n.jsxs)(i.P.button,{ref:m,className:k,disabled:a,onClick:r=>{x(r,{slug:e,text:t})},...c,layoutRoot:!0,children:[g===e&&"underline"===b&&(0,n.jsx)(i.P.span,{layoutId:"underline",layoutDependency:g,className:"absolute right-0 left-0 -bottom-px h-px bg-border-interactive"}),(0,n.jsxs)("span",{className:C,children:["left"===y&&r&&(0,n.jsx)("span",{className:"mr-1 contents center-center transition duration-150",children:r}),t,"right"===y&&r&&(0,n.jsx)("span",{className:"ml-1 contents center-center transition duration-150",children:r})]}),d&&(0,s.isValidElement)(d)&&d]})});p.displayName="Tabs.Tab";const g=({activeItem:e,children:t})=>(0,n.jsx)(d.Provider,{value:{activeItem:e},children:t}),x=({slug:e,children:t})=>{const r=c();if(!r)throw new Error("TabPanel should be used inside Tabs");return e===r.activeItem?(0,n.jsx)(n.Fragment,{children:t}):null};x.displayName="Tabs.Panel",g.Group=m,g.Tab=p,g.Panel=x},55462:(e,t,r)=>{r.d(t,{rI:()=>v});var n=r(74848),s=r(51609),o=r(83505),l=r(34743),i=r(46885),a=r(56877),d=r(22343),c=r(66221),u=r(97073);const m=(0,s.createContext)({}),p=()=>(0,s.useContext)(m),g=({size:e="md",children:t,className:r})=>(0,n.jsx)(m.Provider,{value:{size:e},children:(0,n.jsx)("div",{className:(0,a.cn)("flex flex-col bg-background-primary p-2",r),children:t})});g.displayName="Menu";const x=({heading:e,arrow:t=!1,showArrowOnHover:r=!1,open:o=!0,onClick:l,children:i,className:m})=>{const[g,x]=(0,s.useState)(o),[f,b]=(0,s.useState)(!1),{size:h}=p(),y={sm:"size-4",md:"size-5"}[h??"md"],v=()=>{x(!g),l&&l(!g)};return(0,n.jsxs)("div",{children:[!!e&&(0,n.jsxs)("div",{role:"button",tabIndex:0,onClick:v,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&v()},onMouseEnter:()=>r&&b(!0),onMouseLeave:()=>r&&b(!1),className:(0,a.cn)("text-text-primary bg-transparent cursor-pointer flex justify-between items-center gap-1",{sm:"text-xs",md:"text-sm"}[h??"md"],e?"p-1":"p-0",m),"aria-expanded":g,children:[(0,n.jsx)("span",{className:"text-text-tertiary",children:e}),t&&(0,n.jsx)(d.P.span,{className:"flex items-center text-border-strong",initial:"hidden",animate:r?g||f?"visible":"hidden":"visible",exit:"hidden",variants:{visible:{opacity:1},hidden:{opacity:0}},transition:{duration:.15},children:(0,n.jsx)(d.P.span,{className:"inline-flex p-1",variants:{open:{rotate:180},closed:{rotate:0}},animate:g?"open":"closed",transition:{duration:.15},children:(0,n.jsx)(u.A,{className:(0,a.cn)("shrink-0",y)})})})]}),(0,n.jsx)(c.N,{initial:!1,children:g&&(0,n.jsx)(d.P.ul,{role:"menu",variants:{open:{height:"auto",opacity:1},closed:{height:0,opacity:0}},initial:"closed",animate:"open",exit:"closed",transition:{duration:.3,ease:"easeInOut"},className:"overflow flex gap-0.5 flex-col m-0 bg-white rounded p-0",children:i})})]})};x.displayName="Menu.List";const f=({disabled:e=!1,active:t,onClick:r,children:s,className:o,...l})=>{const{size:i}=p();return(0,n.jsx)("li",{role:"menuitem",tabIndex:e?-1:0,onClick:e?void 0:r,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&r?.()},className:(0,a.cn)("flex p-1 gap-1 items-center bg-transparent border-none rounded text-text-secondary cursor-pointer m-0",{sm:"[&>svg]:size-4 [&>svg]:m-1 [&>*:not(svg)]:mx-1 [&>*:not(svg)]:my-0.5 text-sm",md:"[&>svg]:size-5 [&>svg]:m-1.5 [&>*:not(svg)]:m-1 text-base"}[i??"md"],"hover:bg-background-secondary hover:text-text-primary",e?"text-text-disabled hover:text-text-disabled cursor-not-allowed hover:bg-transparent":"",t?"text-icon-primary [&>svg]:text-icon-interactive bg-background-secondary":"","transition-colors duration-300 ease-in-out",o),"aria-disabled":e,...l,children:s})};f.displayName="Menu.Item";const b=({variant:e="solid",className:t})=>(0,n.jsx)("li",{className:"m-0 p-0 list-none",role:"separator","aria-hidden":"true",children:(0,n.jsx)("hr",{className:(0,a.cn)("w-full border-0 border-t border-border-subtle",{solid:"border-solid",dashed:"border-dashed",dotted:"border-dotted",double:"border-double",hidden:"border-hidden",none:"border-none"}[e],t)})});b.displayName="Menu.Separator",g.List=x,g.Item=f,g.Separator=b;const h=(0,s.createContext)({}),y=()=>(0,s.useContext)(h),v=({placement:e="bottom",offset:t=10,boundary:r="clippingAncestors",children:d,className:c})=>{const[u,m]=(0,s.useState)(!1),{refs:p,floatingStyles:g,context:x}=(0,o.we)({open:u,onOpenChange:m,placement:e,strategy:"fixed",middleware:[(0,l.cY)(t),(0,l.UU)({boundary:r}),(0,l.BN)({boundary:r})],whileElementsMounted:i.ll}),f=(0,o.kp)(x),b=(0,o.s9)(x),y=(0,o.It)(x,{role:"menu"}),{getReferenceProps:v,getFloatingProps:w}=(0,o.bv)([f,b,y]),{isMounted:j,styles:N}=(0,o.DL)(x,{duration:150,initial:{opacity:0,scale:.95},open:{opacity:1,scale:1},close:{opacity:0,scale:.95}}),k=()=>m(e=>!e);return(0,n.jsx)(h.Provider,{value:{refs:p,handleClose:()=>m(!1),isMounted:j,styles:N,floatingStyles:g,getFloatingProps:w},children:(0,n.jsxs)("div",{className:(0,a.cn)("relative inline-block",c),children:[s.Children.map(d,e=>s.isValidElement(e)&&"DropdownMenu.Trigger"===e?.type?.displayName?(0,s.cloneElement)(e,{ref:p.setReference,onClick:k,...v()}):null),s.Children.toArray(d).filter(e=>s.isValidElement(e)&&["DropdownMenu.Portal","DropdownMenu.ContentWrapper"].includes(e.type.displayName||"")).map(e=>e)]})})};v.displayName="DropdownMenu";const w=({children:e,className:t})=>{const{refs:r,floatingStyles:o,getFloatingProps:l,isMounted:i,styles:a}=y();return i&&(0,n.jsx)("div",{ref:r.setFloating,className:t,style:{...o,...a},...l(),children:s.Children.map(e,e=>"DropdownMenu.Content"===e?.type?.displayName?e:null)})};w.displayName="DropdownMenu.ContentWrapper";const j=({children:e,root:t,id:r})=>(0,n.jsx)(o.XF,{id:r,root:t,children:e});j.displayName="DropdownMenu.Portal";const N=s.forwardRef(({children:e,className:t,...r},o)=>(0,s.isValidElement)(e)?s.cloneElement(e,{className:(0,a.cn)(t,e.props.className),ref:o,...r}):(0,n.jsx)("div",{ref:o,className:(0,a.cn)("cursor-pointer",t),role:"button",tabIndex:0,...r,children:e}));N.displayName="DropdownMenu.Trigger";const k=({children:e,className:t,...r})=>(0,n.jsx)("div",{className:(0,a.cn)("border border-solid border-border-subtle rounded-md shadow-lg overflow-hidden",t),children:(0,n.jsx)(g,{...r,children:e})});k.displayName="DropdownMenu.Content";const C=e=>(0,n.jsx)(g.List,{...e});C.displayName="DropdownMenu.List";const z=({children:e,as:t=g.Item,...r})=>{const{handleClose:o}=y();return e?t===s.Fragment&&(0,s.isValidElement)(e)?(0,s.cloneElement)(e,{onClick:(0,a.OK)(e.props?.onClick,o)}):(0,n.jsx)(t,{...r,className:(0,a.cn)("px-2",r.className),onClick:(0,a.OK)(r.onClick,o),children:e}):null};z.displayName="DropdownMenu.Item";const A=e=>(0,n.jsx)(g.Separator,{...e});A.displayName="DropdownMenu.Separator",v.Trigger=N,v.Content=k,v.List=C,v.Item=z,v.Separator=A,v.Portal=j,v.ContentWrapper=w},56231:(e,t,r)=>{r.d(t,{z:()=>o});var n=r(74848),s=r(56877);const o=({progress:e=0,speed:t=200,className:r=""})=>{let o=e;e<0&&(o=0),e>100&&(o=100);const l=`translateX(-${100-o}%)`,i=`h-2 rounded-full bg-background-brand absolute left-0 top-0 w-full bottom-0 origin-left transition-transform duration-${t} ease-linear`;return(0,n.jsx)("div",{className:(0,s.cn)("h-2 rounded-full bg-misc-progress-background overflow-hidden relative",r),role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Progress Bar",children:(0,n.jsx)("div",{className:i,style:{transform:l}})})}},56466:(e,t,r)=>{r.d(t,{dK:()=>p});var n=r(74848),s=r(51609),o=r(56877),l=r(53232),i=r(69011);const a={xs:{general:"text-xs min-w-6 h-6",ellipse:"text-xs min-w-6",icon:"size-4"},sm:{general:"text-xs min-w-8 h-8",ellipse:"text-xs min-w-8",icon:"size-4"},md:{general:"text-sm min-w-10 h-10",ellipse:"text-sm min-w-10",icon:"size-5"},lg:{general:"text-base min-w-12 h-12",ellipse:"text-base min-w-12",icon:"size-6"}},d="group disabled:border-field-border-disabled opacity-50";var c=r(88029);const u=(0,s.createContext)({size:"sm",disabled:!1}),m=()=>(0,s.useContext)(u),p=({size:e="sm",disabled:t=!1,children:r,className:s,...l})=>(0,n.jsx)(u.Provider,{value:{size:e,disabled:t},children:(0,n.jsx)("nav",{role:"navigation",className:(0,o.cn)("flex w-full justify-center box-border m-0",s),...l,children:r})});p.displayName="Pagination";const g=(0,s.forwardRef)(({className:e,...t},r)=>(0,n.jsx)("ul",{ref:r,className:(0,o.cn)("m-0 p-0 w-full flex justify-center flex-row items-center gap-1","list-none",e),...t}));g.displayName="Pagination.Content";const x=(0,s.forwardRef)(({isActive:e=!1,className:t,children:r,...s},l)=>{const{disabled:i}=m();return(0,n.jsx)("li",{ref:l,className:(0,o.cn)("flex",i&&d),children:(0,n.jsx)(f,{isActive:e,disabled:i,className:t,...s,children:r})})});x.displayName="Pagination.Item";const f=({isActive:e=!1,tag:t="a",children:r,className:s,...l})=>{const{size:i,disabled:u}=m(),p=e=>e.preventDefault();return(0,n.jsx)(c.A,{tag:t,size:i,variant:"ghost",className:(0,o.cn)("no-underline bg-transparent p-0 m-0 border-none","flex justify-center items-center rounded text-button-secondary","focus:outline focus:outline-1 focus:outline-border-subtle focus:bg-button-tertiary-hover",a[i].general,!u&&e&&"text-button-primary active:text-button-primary bg-brand-background-50",u&&[d,"group-disabled:text-field-color-disabled","focus:ring-transparent cursor-not-allowed"],s),disabled:u,...l,"aria-current":e?"page":void 0,onClick:e=>(0,o.OK)(l.onClick||(()=>{}),u?p:()=>{})(e),children:(0,n.jsx)("span",{className:"px-1 flex",children:r})})},b=e=>{const{size:t,disabled:r}=m();return(0,n.jsx)("li",{className:(0,o.cn)("flex",r&&d),"aria-label":"Go to previous page",children:(0,n.jsx)(f,{className:(0,o.cn)("[&>span]:flex [&>span]:items-center"),...e,children:(0,n.jsx)(l.A,{className:(0,o.cn)(a[t].icon)})})})};b.displayName="Pagination.Previous";const h=e=>{const{size:t,disabled:r}=m();return(0,n.jsx)("li",{className:(0,o.cn)("flex",r&&d),"aria-label":"Go to next page",children:(0,n.jsx)(f,{className:(0,o.cn)("[&>span]:flex [&>span]:items-center"),...e,children:(0,n.jsx)(i.A,{className:(0,o.cn)(a[t].icon)})})})};h.displayName="Pagination.Next";const y=e=>{const{size:t,disabled:r}=m();return(0,n.jsx)("li",{className:(0,o.cn)("flex",r&&d),children:(0,n.jsx)("span",{className:(0,o.cn)("flex justify-center",a[t].ellipse,r&&d),"aria-hidden":"true",...e,children:"\u2022\u2022\u2022"})})};y.displayName="Pagination.Ellipsis",p.Content=g,p.Item=x,p.Previous=b,p.Next=h,p.Ellipsis=y},56523:(e,t,r)=>{r.d(t,{A:()=>i});var n=r(74848),s=r(51609),o=r(56877),l=r(10772);const i=(0,s.forwardRef)(({variant:e="primary",size:t="md",border:r="subtle",src:i,alt:a,children:d,className:c,...u},m)=>{const[p,g]=(0,s.useState)(!1),x={white:"text-text-primary bg-background-primary",gray:"text-text-primary bg-background-secondary",primary:"text-text-on-color bg-background-brand","primary-light":"text-text-primary bg-brand-background-50",dark:"text-text-on-color bg-button-secondary"}[e],f={xxs:"size-5 [&>svg]:size-3 text-xs",xs:"size-6 [&>svg]:size-4 text-sm",sm:"size-8 [&>svg]:size-5 text-base",md:"size-10 [&>svg]:size-6 text-lg",lg:"size-12 [&>svg]:size-12 text-lg"}[t],b={none:"",subtle:"ring-1 ring-border-transparent-subtle",ring:"ring ring-border-subtle"}[i&&"none"===r?"subtle":r],h=i?"object-cover object-center":"",y=!i||p,v=y?"div":"img";return(0,s.useEffect)(()=>{g(!1)},[i]),(0,n.jsx)(v,{ref:m,className:(0,o.cn)("rounded-full overflow-hidden flex items-center justify-center",y&&x,f,b,h,c),...y?{children:(()=>{if(i&&p){if(a&&"string"==typeof a)return a?.[0]?.toUpperCase();if(d&&"string"==typeof d)return d?.[0]?.toUpperCase();if(!d&&!a)return(0,n.jsx)(l.A,{})}return d?"string"==typeof d?d?.[0]?.toUpperCase():d:null})()}:{src:i,alt:a,onError:()=>{g(!0)}},...u})})},56877:(e,t,r)=>{r.d(t,{Ar:()=>u,DC:()=>d,HK:()=>i,OK:()=>l,cn:()=>o,pi:()=>a,v7:()=>c});var n=r(34892),s=r(34164);const o=(...e)=>(0,n.QP)((0,s.$)(...e)),l=(...e)=>(...t)=>e.filter(Boolean).forEach(e=>e?.(...t)),i=e=>{const t={0:"gap-0",xxs:"gap-1",xs:"gap-2",sm:"gap-3",md:"gap-4",lg:"gap-5",xl:"gap-6","2xl":"gap-8"};return t[e]||t.md},a={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},d=()=>{const e=window.navigator?.userAgentData?.platform||window.navigator.platform;let t="null";return["macOS","Macintosh","MacIntel","MacPPC","Mac68K"].includes(e)?t="Mac OS":["Win32","Win64","Windows","WinCE"].includes(e)&&(t="Windows"),t},c=e=>e<1024?`${e} bytes`:e<1048576?`${(e/1024).toFixed(2)} KB`:e<1073741824?`${(e/1048576).toFixed(2)} MB`:`${(e/1073741824).toFixed(2)} GB`,u={set:(e,t)=>{if(!(typeof window>"u"))try{localStorage.setItem(e,JSON.stringify(t))}catch(r){}},get:e=>{if(typeof window>"u")return null;try{const t=localStorage.getItem(e);return t?JSON.parse(t):null}catch(t){return null}},remove:e=>{if(!(typeof window>"u"))try{localStorage.removeItem(e)}catch(t){}}}},59572:(e,t,r)=>{r.d(t,{A:()=>k,Y:()=>N});var n=r(74848),s=r(51609),o=r(56877),l=r(83505),i=r(66221),a=r(22343);const d={left:{open:{x:0},exit:{x:"-100%"}},right:{open:{x:0},exit:{x:"100%"}}},c=({children:e,className:t})=>{const{open:r,position:s,handleClose:c,transitionDuration:u,getFloatingProps:m,drawerContainerRef:p,scrollLock:g,context:x,className:f,refs:b}=N();return x&&m?(0,n.jsx)(i.N,{children:r&&(0,n.jsx)(l.zR,{ref:p,lockScroll:g,className:(0,o.cn)("z-50",f),children:(0,n.jsx)(l.s3,{context:x,modal:!0,...b?.reference&&{returnFocus:b.reference},children:(0,n.jsx)("div",{className:"fixed inset-0 overflow-hidden",children:(0,n.jsx)("div",{className:"relative inset-0 h-full flex items-center",children:(0,n.jsx)("div",{className:(0,o.cn)("flex items-center justify-center h-full w-full",{"justify-start":"left"===s,"justify-end":"right"===s}),children:(0,n.jsx)(a.P.div,{className:(0,o.cn)("flex flex-col w-120 h-full bg-background-primary shadow-2xl overflow-hidden z-20",t),initial:"exit",animate:"open",exit:"exit",variants:d[s],transition:u,ref:e=>{setTimeout(()=>{b?.setFloating(e)},1e3*((u?.duration||.3)+.1))},"aria-label":"drawer",role:"dialog","aria-modal":"true",...m?.(),children:"function"==typeof e?e({close:c}):e})})})})})})}):null};c.displayName="Drawer.Panel";const u=({children:e,className:t,...r})=>(0,n.jsx)("div",{className:(0,o.cn)("space-y-2 px-5 pt-5 pb-4",t),...r,children:e});u.displayName="Drawer.Header";const m=({children:e,as:t="h3",className:r,...s})=>(0,n.jsx)(t,{className:(0,o.cn)("text-base font-semibold text-text-primary m-0 p-0",r),...s,children:e});m.displayName="Drawer.Title";const p=({children:e,as:t="p",className:r,...s})=>(0,n.jsx)(t,{className:(0,o.cn)("text-sm font-normal text-text-secondary my-0 ml-0 mr-1 p-0",r),...s,children:e});p.displayName="Drawer.Description";const g=({children:e,className:t,...r})=>(0,n.jsx)("div",{className:(0,o.cn)("px-5 pb-4 pt-2 flex flex-col flex-1 overflow-y-auto overflow-x-hidden",t),...r,children:e});g.displayName="Drawer.Body";const x=({children:e,className:t})=>{const{design:r,handleClose:s}=N();return(0,n.jsx)("div",{className:(0,o.cn)("px-5 py-4 flex justify-end gap-3 mt-auto",{"bg-background-secondary":"footer-divided"===r,"border-t border-b-0 border-x-0 border-solid border-border-subtle":"footer-bordered"===r},t),children:e?"function"==typeof e?e({close:s}):e:null})};x.displayName="Drawer.Footer";var f=r(96307);const b=({className:e,...t})=>(0,n.jsx)("button",{className:(0,o.cn)("bg-transparent inline-flex justify-center items-center border-0 p-1 m-0 cursor-pointer focus:outline-none outline-none shadow-none",e),"aria-label":"Close drawer",...t,children:(0,n.jsx)(f.A,{className:"size-4 text-text-primary shrink-0"})}),h=({children:e,as:t=s.Fragment,...r})=>{const{handleClose:o}=N();return e?t===s.Fragment?"function"==typeof e?e({close:o}):(0,s.isValidElement)(e)?(0,s.cloneElement)(e,{onClick:o}):(0,n.jsx)(b,{onClick:o,...r}):(0,n.jsx)(t,{...r,onClick:o,children:e}):(0,n.jsx)(b,{onClick:o,...r})};h.displayName="Drawer.CloseButton";var y=r(75795);const v={open:{opacity:1},exit:{opacity:0}},w=({className:e,...t})=>{const{open:r,drawerContainerRef:l,transitionDuration:d}=N(),[c,u]=(0,s.useState)(null);(0,s.useEffect)(()=>{l?.current&&u(l.current)},[r,l]);const m=(0,n.jsx)(i.N,{mode:"wait",children:r&&(0,s.createElement)(a.P.div,{className:(0,o.cn)("fixed inset-0 -z-10 bg-background-inverse/90",e),...t,initial:"exit",animate:"open",exit:"exit",variants:v,transition:d,key:"backdrop"})});return c?(0,y.createPortal)(m,c):m};w.displayName="Drawer.Backdrop";const j=(0,s.createContext)({}),N=()=>(0,s.useContext)(j),k=({open:e,setOpen:t,children:r,trigger:i,className:a,exitOnClickOutside:d=!1,exitOnEsc:c=!0,design:u="simple",position:m="right",transitionDuration:p=.2,scrollLock:g=!0})=>{const x=void 0!==e&&void 0!==t,[f,b]=(0,s.useState)(!1),h=(0,s.useRef)(null),y=(0,s.useMemo)(()=>x?e:f,[e,f,x]),v=(0,s.useMemo)(()=>x?t:b,[t,b,x]),w=()=>{y||v(!0)},{refs:N,context:k}=(0,l.we)({open:y,onOpenChange:v,transform:!1}),C=(0,l.s9)(k,{enabled:c||d,escapeKey:c,outsidePress:d}),z=(0,l.It)(k,{role:"dialog"}),A=(0,l.kp)(k),{getFloatingProps:S}=(0,l.bv)([C,z,A]),E=(0,s.useCallback)(()=>(0,s.isValidElement)(i)?(0,s.cloneElement)(i,{onClick:(0,o.OK)(w,i.props.onClick),ref:N.setReference,"aria-haspopup":"dialog","aria-expanded":y}):"function"==typeof i?i({onClick:w}):null,[i,w,N.setReference]);return(0,n.jsxs)(n.Fragment,{children:[E(),(0,n.jsx)(j.Provider,{value:{open:y,setOpen:v,handleClose:()=>{y&&v(!1)},design:u,position:m,drawerContainerRef:h,transitionDuration:{duration:p},getFloatingProps:S,scrollLock:g,context:k,className:a,refs:N},children:r})]})};k.displayName="Drawer",k.Panel=c,k.Header=u,k.Title=m,k.Description=p,k.Body=g,k.CloseButton=h,k.Footer=x,k.Backdrop=w,k.Portal=({children:e,...t})=>(0,n.jsx)(l.XF,{...t,children:e})},59909:(e,t,r)=>{r.d(t,{bx:()=>o});var n=r(74848),s=r(56877);const o=({children:e,gap:t="lg",className:r,...o})=>(0,n.jsx)("div",{className:(0,s.cn)("w-full box-border flex items-center justify-between bg-background-primary p-5 min-h-16",(0,s.HK)(t),r),...o,children:e});o.displayName="Topbar";const l=({gap:e="sm",children:t,className:r})=>(0,n.jsx)("div",{className:(0,s.cn)("flex items-center",(0,s.HK)(e),r),children:t});l.displayName="Topbar.Left";const i=({gap:e="md",children:t,align:r="center",className:o})=>{const l={left:"justify-start",center:"justify-center",right:"justify-end"}[r];return(0,n.jsx)("div",{className:(0,s.cn)("flex items-center grow",(0,s.HK)(e),l,o),children:t})};i.displayName="Topbar.Middle";const a=({gap:e="sm",children:t,className:r})=>(0,n.jsx)("div",{className:(0,s.cn)("flex items-center",(0,s.HK)(e),r),children:t});a.displayName="Topbar.Right";const d=({children:e,className:t})=>(0,n.jsx)("div",{className:(0,s.cn)("flex items-center [&>svg]:block h-full",t),children:e});d.displayName="Topbar.Item",o.Left=l,o.Middle=i,o.Right=a,o.Item=d},60443:(e,t,r)=>{r.d(t,{$:()=>s,o:()=>o});let n=1;const s=new class{#e;#t;constructor(){this.#e=[],this.#t=[]}subscribe(e){return this.#t.push(e),()=>{this.#t=this.#t.filter(t=>t!==e)}}publish(e){this.#t.forEach(t=>t(e))}add(e){this.#e.push(e),this.publish(e)}remove(e){return this.#e=this.#e.filter(t=>t.id!==e),e}create(e){const{id:t,message:r="",jsx:s,...o}=e;if(!r&&"function"!=typeof s)return;const l="number"==typeof t?t:n++;return this.#e.find(e=>e.id===l)&&(this.#e=this.#e.map(e=>e.id===l?(this.publish({...e,title:r,jsx:s,...o}),{...e,title:r,jsx:s,...o}):e)),this.add({id:l,title:r,jsx:s,...o}),l}update(e,t){const{render:r}=t;let n=t;switch(typeof r){case"function":n={jsx:r,...t};break;case"string":n={title:r,...t}}this.#e=this.#e.map(t=>t.id===e?(this.publish({...t,...n}),{...t,...n}):t)}dismiss(e){return e||this.#e.forEach(e=>this.#t.forEach(t=>t({id:e.id,dismiss:!0}))),this.#t.forEach(t=>t({id:e,dismiss:!0})),e}history(){return this.#e}default(e="",t={}){return this.create({message:e,type:"neutral",...t})}success(e="",t={}){return this.create({message:e,type:"success",...t})}error(e="",t={}){return this.create({message:e,type:"error",...t})}warning(e="",t={}){return this.create({message:e,type:"warning",...t})}info(e="",t={}){return this.create({message:e,type:"info",...t})}custom(e,t={}){return this.create({jsx:e,type:"custom",...t})}},o=Object.seal(Object.assign((e,t)=>s.default(e,t),{success:s.success.bind(s),error:s.error.bind(s),warning:s.warning.bind(s),info:s.info.bind(s),custom:s.custom.bind(s),dismiss:s.dismiss.bind(s),update:s.update.bind(s)},{getHistory:s.history.bind(s)}))},62163:(e,t,r)=>{r.d(t,{A:()=>u});var n=r(74848),s=r(51609),o=r(39413),l=r(56877),i=r(59110),a=r(96307),d=r(39756),c=r(71087);const u=(0,s.forwardRef)(({id:e,type:t="text",defaultValue:r="",value:u,size:m="sm",className:p="",disabled:g=!1,onChange:x=()=>{},error:f=!1,onError:b=()=>{},prefix:h=null,suffix:y=null,label:v="",...w},j)=>{const N=(0,s.useRef)(null),k=(0,s.useMemo)(()=>e||`input-${t}-${(0,o.Ak)()}`,[e]),C=(0,s.useMemo)(()=>typeof u<"u",[u]),[z,A]=(0,s.useState)(r),[S,E]=(0,s.useState)(null),I=(0,s.useCallback)(()=>C?u:z,[C,u,z]),P=e=>{if(g)return;let r;"file"===t?(r=e.target.files,E(r&&r.length>0?r[0].name:null)):r=e.target.value,!C&&"file"!==t&&A(r),"function"==typeof x&&x(r)},R=()=>{E(null),N.current&&(N.current.value=""),x(null)},F="bg-field-secondary-background font-normal placeholder-text-tertiary text-text-primary w-full outline outline-1 outline-border-subtle border-none transition-[color,box-shadow,outline] duration-200",D={xs:"px-2 py-1 rounded",sm:"p-3 py-2 rounded",md:"p-3.5 py-2.5 rounded-md",lg:"p-4 py-3 rounded-lg"},T={xs:"text-xs font-medium",sm:"text-sm font-medium",md:"text-sm font-medium",lg:"text-base font-medium"},M={xs:"text-xs",sm:"text-xs",md:"text-sm",lg:"text-base"},L={sm:h?"pl-8":"",md:h?"pl-9":"",lg:h?"pl-10":""},O={sm:y?"pr-8":"",md:y?"pr-9":"",lg:y?"pr-10":""},_=g?"hover:outline-border-disabled":"hover:outline-border-strong",B="focus:outline-focus-border focus:ring-2 focus:ring-toggle-on focus:ring-offset-2",V=f?"focus:outline-focus-error-border focus:ring-field-color-error outline-focus-error-border":"",K=f?"focus:outline-focus-error-border focus:ring-field-color-error outline-focus-error-border":"",$=g?"outline-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled":"",W=g?"outline-border-disabled cursor-not-allowed text-text-disabled file:text-text-tertiary":"",H="font-normal placeholder-text-tertiary text-text-primary pointer-events-none absolute inset-y-0 flex flex-1 items-center [&>svg]:h-4 [&>svg]:w-4",U=g?"font-normal placeholder-text-tertiary text-icon-disabled pointer-events-none absolute inset-y-0 flex flex-1 items-center":"font-normal placeholder-text-tertiary text-field-placeholder pointer-events-none absolute inset-y-0 flex flex-1 items-center",G={xs:"[&>svg]:size-4",sm:"[&>svg]:size-4",md:"[&>svg]:size-5",lg:"[&>svg]:size-6"},X=(0,s.useMemo)(()=>v?(0,n.jsx)(c.A,{className:(0,l.cn)(T[m]),htmlFor:k,...w?.required&&{required:!0},children:v}):null,[v,m,k]),J=S?"file:border-0 file:bg-transparent pr-10":"text-text-tertiary file:border-0 file:bg-transparent pr-10";return(0,n.jsxs)("div","file"===t?{className:"flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[X,(0,n.jsxs)("div",{className:(0,l.cn)("w-full relative flex focus-within:z-10",p),children:[(0,n.jsx)("input",{ref:(0,d.Px)(N,j),id:k,type:"file",className:(0,l.cn)(F,W,D[m],M[m],B,_,K,J),disabled:g,onChange:P,onInvalid:b,...w}),(0,n.jsx)("div",{className:(0,l.cn)(U,"right-0 pr-3",G[m]),children:(0,n.jsx)(i.A,{})})]})]}:{className:"flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[X,(0,n.jsxs)("div",{className:(0,l.cn)("w-full relative flex focus-within:z-10",p),children:[h?(0,n.jsx)("div",{className:(0,l.cn)(H,"left-0 pl-3",M[m]),children:h}):null,(0,n.jsx)("input",{ref:(0,d.Px)(N,j),id:k,type:t,className:(0,l.cn)(F,$,D[m],M[m],L[m],O[m],B,_,V),disabled:g,onChange:P,onInvalid:b,value:I(),...w}),"file"===t?(0,n.jsx)("div",S?{className:(0,l.cn)(U,"right-0 pr-3 cursor-pointer z-20 pointer-events-auto",G[m]),onClick:R,role:"button",tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&R()},children:(0,n.jsx)(a.A,{})}:{className:(0,l.cn)(U,"right-0 pr-3",G[m]),children:(0,n.jsx)(i.A,{})}):y?(0,n.jsx)("div",{className:(0,l.cn)(H,"right-0 pr-3",M[m]),children:y}):null]})]})});u.displayName="Input"},62214:(e,t,r)=>{r.d(t,{Rt:()=>v});var n=r(74848),s=r(56877),o=r(22343),l=r(78379),i=r(51609),a=r(88029);const d=(0,i.createContext)({}),c=d.Provider,u=()=>(0,i.useContext)(d),m=(e,t,r)=>{if(!e||!t)return{open:()=>({}),closed:()=>({})};const n=e?.getBoundingClientRect(),s=t?.getBoundingClientRect(),o=r?n?.x-s?.x+n?.width/2:s?.width-(s?.right-n?.x)+n?.width/2,l=n?.y-s?.y+n?.height/2;return{open:(e=1e3)=>({clipPath:`circle(${2*e+200}px at ${o}px ${l}px)`,background:"rgb(255, 255, 255, 1)",transition:{type:"spring",stiffness:20,restDelta:2,background:{duration:0}}}),closed:{clipPath:`circle(${n?.width/2}px at ${o}px ${l}px)`,background:"rgb(255, 255, 255, 0)",transition:{delay:.5,type:"spring",stiffness:400,damping:40,background:{duration:0,delay:1e3}}}}},p=e=>(0,n.jsx)(o.P.path,{className:"stroke-icon-primary",fill:"transparent",strokeWidth:"3",strokeLinecap:"round",...e}),g=({className:e})=>{const{toggleOpen:t,setTriggerRef:r}=u();return(0,n.jsx)(a.A,{ref:r,className:(0,s.cn)("relative z-[1] rounded-full hover:shadow-sm focus:[box-shadow:none] pointer-events-auto bg-background-primary",e),variant:"ghost",size:"xs",onClick:t,"aria-label":"Toggle menu",icon:(0,n.jsxs)(o.P.svg,{className:"shrink-0 stroke-icon-primary",width:"23",height:"23",variants:{open:{viewBox:"0 0 20 20"},closed:{viewBox:"0 0 23 18"}},children:[(0,n.jsx)(p,{variants:{closed:{d:"M 2 2.5 L 20 2.5"},open:{d:"M 3 16.5 L 17 2.5"}}}),(0,n.jsx)(p,{d:"M 2 9.423 L 20 9.423",variants:{closed:{opacity:1},open:{opacity:0}},transition:{duration:.1}}),(0,n.jsx)(p,{variants:{closed:{d:"M 2 16.346 L 20 16.346"},open:{d:"M 3 2.5 L 17 16.346"}}})]})})},x={open:{transition:{staggerChildren:.07,delayChildren:.2}},closed:{transition:{staggerChildren:.05,staggerDirection:-1}}},f=({tag:e="a",active:t,icon:r,iconPosition:o="left",className:l,children:a,...d})=>{let c=null,u=null;const m=r&&(0,i.isValidElement)(r)?(0,i.cloneElement)(r,{key:"left-icon",className:(0,s.cn)("size-5",t?"text-brand-800":"text-icon-secondary",r.props?.className??"")}):null;switch(o){case"left":c=m;break;case"right":u=m;break;default:c=null,u=null}return(0,n.jsx)(h,{children:(0,n.jsxs)(e,{className:(0,s.cn)("w-full no-underline hover:no-underline text-text-primary text-lg font-medium flex items-center gap-2 px-2.5 py-1.5 rounded-md hover:bg-background-secondary hover:text-text-primary focus:outline-none focus:shadow-none transition ease-in-out duration-150",t?"text-text-primary bg-background-secondary":"text-text-secondary",l),...d,children:[!!c&&c,(0,n.jsx)("span",{className:"contents",children:a}),!!u&&u]})})},b={open:{y:0,opacity:1,transition:{y:{stiffness:1e3,velocity:-100}}},closed:{y:50,opacity:0,transition:{y:{stiffness:1e3}}}},h=({children:e})=>(0,n.jsx)(o.P.li,{className:"m-0 p-0 flex items-center justify-start w-full",variants:b,whileHover:{scale:1.05},whileTap:{scale:.95},children:e}),y=({children:e,className:t})=>{const{triggerRef:r,triggerOnRight:l,triggerOnLeft:a}=u(),[d,c]=(0,i.useState)(null);return r?(0,n.jsxs)(o.P.div,{ref:c,className:(0,s.cn)("absolute top-0 bottom-0 w-80 h-screen",l?"right-0":"left-0",t),children:[d&&(0,n.jsx)(o.P.div,{className:(0,s.cn)("bg-background-primary shadow-lg absolute top-0 bottom-0 w-80 border-y-0 border-l-0 border-r border-solid border-border-subtle",l?"right-0":"left-0"),variants:m(r,d,a??!1)}),(0,n.jsx)(o.P.ul,{variants:x,className:(0,s.cn)("relative mt-14 mb-0 w-full px-5 pb-5 pt-2 flex flex-col items-start justify-start gap-0.5",t),children:e})]}):null},v=({className:e,children:t})=>{const[r,a]=(0,l.Y)(!1,!0),[d,u]=(0,i.useState)(null),m=(0,i.useRef)(null),{height:p}=(e=>{const t=(0,i.useRef)({width:0,height:0});return(0,i.useEffect)(()=>{e.current&&(t.current.width=e.current.offsetWidth,t.current.height=e.current.offsetHeight)},[]),t.current})(m),{isRight:g=!1,isLeft:x=!0}=(e=>{if(!e)return{error:"Element not found."};const t=e.getBoundingClientRect(),r=window.innerWidth,n=r/2,s=t.right<n,o=t.left>n;return{isLeft:s,isRight:o,isCenter:!s&&!o,elementRect:{left:t.left,right:t.right,width:t.width},viewport:{width:r,center:n}}})(d);return(0,n.jsx)(c,{value:{isOpen:r,toggleOpen:a,setTriggerRef:e=>{(0,i.startTransition)(()=>{u(e)})},triggerRef:d,triggerOnRight:g,triggerOnLeft:x},children:(0,n.jsx)("div",{className:(0,s.cn)("size-6 z-[1]",e),children:(0,n.jsx)(o.P.nav,{className:"h-full",initial:!1,animate:r?"open":"closed",custom:p,variants:{open:{pointerEvents:"auto"},closed:{pointerEvents:"none"}},ref:m,children:t})})})};v.displayName="HamburgerMenu",g.displayName="HamburgerMenu.Toggle",y.displayName="HamburgerMenu.Options",f.displayName="HamburgerMenu.Option",v.Options=y,v.Option=f,v.Toggle=g},65650:(e,t,r)=>{r.d(t,{A:()=>W});var n=r(74848),s=r(12532),o=r(6246),l=r(69923),i=r(60083),a=r(40290),d=r(59798),c=r(45838),u=r(16191),m=r(56877);const p={sm:"px-3 py-1.5 rounded [&_.editor-content>p]:text-xs [&_.editor-content>p]:font-normal [&_.pointer-events-none]:text-xs [&_.pointer-events-none]:font-normal [&_.editor-content>p]:content-center [&_.editor-content>p]:min-h-5",md:"px-3.5 py-2 rounded-md [&_.editor-content>p]:text-sm [&_.editor-content>p]:font-normal [&_.pointer-events-none]:text-sm [&_.pointer-events-none]:font-normal [&_.editor-content>p]:content-center [&_.editor-content>p]:min-h-6",lg:"px-4 py-2.5 rounded-md [&_.editor-content>p]:text-base [&_.editor-content>p]:font-normal [&_.pointer-events-none]:text-base [&_.pointer-events-none]:font-normal [&_.editor-content>p]:content-center [&_.editor-content>p]:min-h-7"},g={sm:"p-1.5 rounded-md max-h-[10.75rem]",md:"p-2 rounded-lg max-h-[13.5rem]",lg:"p-2 rounded-lg max-h-[13.5rem]"},x={sm:"p-1.5 rounded text-xs leading-5 font-normal",md:"p-2 rounded-md text-sm leading-6 font-normal",lg:"p-2 rounded-md text-base leading-6 font-normal"};var f=r(51609),b=r(94439),h=r(95591),y=r(48832),v=r(73105),w=r(87835);const j=e=>{switch(e){case"sm":return"xs";case"md":default:return"sm";case"lg":return"md"}},N=({data:e,by:t,size:r,nodeKey:s})=>{const[o]=(0,b.DF)(),l=!o.isEditable();let i=e;"object"==typeof e&&(i=e[t]);const a=(0,f.useCallback)(e=>{const t=(0,y.nsf)(s);if(!t||!t.isSelected())return!1;let r=!1;const n=t.getPreviousSibling();return(0,y.ff4)(n)&&(n.selectEnd(),r=!0),(0,y.kFe)(n)&&(n.select(),r=!0),(0,y.Cyw)(n)&&(n.selectNext(),r=!0),null===n&&(t.selectPrevious(),r=!0),r&&e.preventDefault(),r},[s]),d=(0,f.useCallback)(e=>{const t=(0,y.nsf)(s);if(!t||!t.isSelected())return!1;let r=!1;const n=t.getNextSibling();return(0,y.ff4)(n)&&(n.selectStart(),r=!0),(0,y.kFe)(n)&&(n.select(0,0),r=!0),(0,y.Cyw)(n)&&(n.selectPrevious(),r=!0),null===n&&(t.selectNext(),r=!0),r&&e.preventDefault(),r},[s]);return(0,f.useEffect)(()=>{const e=(0,v.Sd)(o.registerCommand(y.AX0,a,y.AcJ),o.registerCommand(y.JM3,d,y.AcJ));return()=>{e()}},[o,a,d]),(0,n.jsx)(w.A,{className:"inline-flex",type:"rounded",size:j(r),label:i,icon:null,closable:!0,onClose:e=>{e.stopPropagation(),e.preventDefault(),!l&&o.update(()=>{const e=(0,y.nsf)(s);e&&e.remove()})},disabled:l})};class k extends y.Kp7{__data;__by;__size;constructor(e,t,r,n){super(n),this.__data=e,this.__by=t,this.__size=r}static getType(){return"mention"}static clone(e){return new k(e.__data,e.__by,e.__size,e.__key)}static importJSON(e){return C(e.data,e.by,e.size)}createDOM(){return document.createElement("span")}updateDOM(){return!1}exportDOM(){return{element:document.createElement("span")}}exportJSON(){return{type:k.getType(),data:this.__data,by:this.__by,size:this.__size,version:1}}decorate(){return(0,n.jsx)(N,{data:this.__data,by:this.__by,size:this.__size,nodeKey:this.__key})}}const C=(e,t,r)=>new k(e,t,r);class z{constructor(e){this.initData=e,this.key="",this.data=e,this.ref={current:null},this.setRefElement=e=>{this.ref.current=e}}data;key;ref;setRefElement}class A{value;constructor(e){this.value=e}}function S(e,t,r="name"){const[n,s]=(0,f.useState)([]),o=(0,f.useRef)(new WeakMap),l=(0,f.useRef)(new Map),i=(0,f.useRef)(e);return(0,f.useEffect)(()=>{i.current!==e&&(o.current=new WeakMap,l.current.clear(),i.current=e,null!==t&&E.search(e,t,e=>{s(e)},r))},[e,r,t]),(0,f.useEffect)(()=>{if(null===t)return void s([]);const n=o.current,i=l.current;let a=i.get(t);a||(a=new A(t),i.set(t,a));const d=n.get(a);if(null!==d){if(void 0!==d)return void s(d);if(n.set(a,null),E.search(e,t,e=>{const r=i.get(t);r&&(n.set(r,e),s(e))},r),i.size>100){const e=Array.from(i.entries()).slice(-50);l.current=new Map(e)}}},[t,e,r]),n}const E={search(e,t,r,n){setTimeout(()=>{if(!Array.isArray(e))return[];const s=e.filter(e=>{if("string"==typeof e)return e.toLowerCase().includes(t.toLowerCase());const r=e?.[n]?.toString();return!!r&&r.toLowerCase().includes(t.toLowerCase())});r(s)},500)}},I=(0,f.forwardRef)(({size:e,className:t,children:r,...s},o)=>(0,n.jsx)("ul",{role:"menu",ref:o,className:(0,m.cn)("absolute inset-x-0 top-full m-0 w-full h-auto overflow-y-auto overflow-x-hidden z-10 bg-background-primary border border-solid border-border-subtle shadow-lg list-none",g[e],t),...s,children:r}));I.displayName="EditorCombobox";const P=(0,f.forwardRef)(({size:e,children:t,selected:r=!1,className:s,...o},l)=>(0,n.jsx)("li",{role:"option",ref:l,className:(0,m.cn)("m-0 text-text-primary cursor-pointer",x[e],r&&"bg-button-tertiary-hover",s),...o,children:t}));P.displayName="EditorCombobox.Item";const R=Object.assign(I,{Item:P});var F=r(83505),D=r(34743),T=r(46885);const M=({optionsArray:e,by:t="name",size:r="md",trigger:s="@",menuComponent:o=R,menuItemComponent:l=R.Item,autoSpace:i=!0})=>{const{y:a,refs:d,strategy:c}=(0,F.we)({placement:"bottom",strategy:"absolute",middleware:[(0,D.cY)(8),(0,D.RK)(),(0,D.BN)(),(0,D.UU)()],whileElementsMounted:T.ll}),u=(0,f.useRef)(!1),m=(0,f.useRef)(null),p="\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'\"~=<>_:;",g=[s].join(""),x="[^"+g+p+"\\s]",w=new RegExp(`(^|\\s|\\()([${g}]((?:${x}${"(?:\\.[ |$]| |["+p+"]|)"}){0,75}))$`),j=new RegExp(`(^|\\s|\\()([${g}]((?:${x}){0,50}))$`),[N]=(0,b.DF)(),[A,E]=(0,f.useState)(null),[I,P]=(0,f.useState)(!1),M=S(e,A,t),L=(0,f.useCallback)((e,n,s)=>{N.update(()=>{const o=C(e.data,t,r);n&&n.replace(o),s(),P(!1)})},[N]),O=(0,f.useMemo)(()=>M.map(e=>new z(e)),[N,M]),_=(0,f.useCallback)(e=>{if(!i)return!1;const{key:t,ctrlKey:r,metaKey:n}=e;if(r||n||" "===t||t.length>1||u.current)return u.current&&(u.current=!1),!1;const s=(0,y.vJq)(),{focus:o,anchor:l}=s,[a]=s.getNodes();if(!l||!o||l?.key!==o?.key||l?.offset!==o?.offset||!a)return!1;if((e=>e instanceof k)(a)){const e=(0,y.sTu)(" ");return a.insertAfter(e),!0}return!1},[N,s,i]),B=(0,f.useCallback)(e=>{const{key:t}=e;return"Backspace"===t&&(u.current=!0,!0)},[u]),V=(0,f.useCallback)(()=>{P(!0)},[]),K=(0,f.useCallback)(()=>(V(),!1),[]);return(0,f.useEffect)(()=>{if(N)return(0,v.Sd)(N.registerCommand(y.R18,_,y.AcJ),N.registerCommand(y.gCZ,B,y.AcJ),N.registerCommand(y.$7r,K,y.AcJ))},[N,_]),(0,f.useEffect)(()=>{if(!N)return;const e=N.getRootElement()?.parentElement?.parentElement;e&&d.setReference(e)},[N,d]),(0,f.useEffect)(()=>{I||P(O.length>0)},[O]),(0,f.useEffect)(()=>{if(!I)return;const e=e=>{const t=e.target,r=N.getRootElement(),n=d.floating.current;r&&!r.contains(t)&&n&&!n.contains(t)&&(P(!1),E(null))},t=()=>{setTimeout(()=>{const e=N.getRootElement(),t=d.floating.current;if(e){const r=e.ownerDocument.activeElement;t&&(!r||!t.contains(r))&&(P(!1),E(null))}},100)};document.addEventListener("mousedown",e);const r=N.getRootElement();return r&&r.addEventListener("blur",t,!0),()=>{document.removeEventListener("mousedown",e),r&&r.removeEventListener("blur",t,!0)}},[I,N,d.floating]),(0,n.jsx)(h.QP,{onOpen:V,onQueryChange:E,onSelectOption:L,triggerFn:e=>{let t=w.exec(e);if(null===t&&(t=j.exec(e)),null!==t){const e=t[3];if(e.length>=0)return{leadOffset:t.index+t[1].length,matchingString:e,replaceableString:t[2]}}return null},options:O,menuRenderFn:(e,{selectedIndex:s,selectOptionAndCleanUp:i,setHighlightedIndex:u})=>I&&e.current&&O?.length?(0,n.jsx)(o,{className:"w-full",size:r,ref:e=>{d.setFloating(e),m.current=e},style:{position:c,top:a??0,left:-2,width:"calc(100% + 4px)"},children:O.map((e,o)=>(0,n.jsx)(l,{ref:e.ref,size:r,selected:o===s,onMouseEnter:()=>{u(o)},onClick:()=>i(e),children:"string"==typeof e.data?e.data:e.data?.[t]},o))}):null})},L={ltr:"ltr",rtl:"rtl",paragraph:"editor-paragraph",quote:"editor-quote",heading:{h1:"editor-heading-h1",h2:"editor-heading-h2",h3:"editor-heading-h3",h4:"editor-heading-h4",h5:"editor-heading-h5",h6:"editor-heading-h6"},list:{nested:{listitem:"editor-nested-listitem"},ol:"editor-list-ol",ul:"editor-list-ul",listitem:"editor-listItem",listitemChecked:"editor-listItemChecked",listitemUnchecked:"editor-listItemUnchecked"},hashtag:"editor-hashtag",image:"editor-image",link:"editor-link",text:{bold:"editor-textBold",code:"editor-textCode",italic:"editor-textItalic",strikethrough:"editor-textStrikethrough",subscript:"editor-textSubscript",superscript:"editor-textSuperscript",underline:"editor-textUnderline",underlineStrikethrough:"editor-textUnderlineStrikethrough"},code:"editor-code",codeHighlight:{atrule:"editor-tokenAttr",attr:"editor-tokenAttr",boolean:"editor-tokenProperty",builtin:"editor-tokenSelector",cdata:"editor-tokenComment",char:"editor-tokenSelector",class:"editor-tokenFunction","class-name":"editor-tokenFunction",comment:"editor-tokenComment",constant:"editor-tokenProperty",deleted:"editor-tokenProperty",doctype:"editor-tokenComment",entity:"editor-tokenOperator",function:"editor-tokenFunction",important:"editor-tokenVariable",inserted:"editor-tokenSelector",keyword:"editor-tokenAttr",namespace:"editor-tokenVariable",number:"editor-tokenProperty",operator:"editor-tokenOperator",prolog:"editor-tokenComment",property:"editor-tokenProperty",punctuation:"editor-tokenPunctuation",regex:"editor-tokenVariable",selector:"editor-tokenSelector",string:"editor-tokenSelector",symbol:"editor-tokenProperty",tag:"editor-tokenProperty",url:"editor-tokenOperator",variable:"editor-tokenVariable"}},O=({content:e})=>(0,n.jsx)("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 flex items-center justify-start text-field-placeholder w-full",children:(0,n.jsx)("span",{className:"truncate",children:e})}),_=({style:e})=>{const[t]=(0,b.DF)();return(0,f.useLayoutEffect)(()=>{t&&t.registerRootListener(t=>{t&&e&&0!==Object.keys(e).length&&Object.assign(t.style,e)})},[t]),null};var B=r(27639);function V(e){const t=(0,y.NiT)().getTextContentSize();let r=0;const n=e._nodeMap;for(const[,s]of n)"mention"===s.__type&&(r+=1);return t+r}function K({maxLength:e}){const[t]=(0,b.DF)();return(0,f.useEffect)(()=>{let r=null;return t.registerNodeTransform(y.haT,()=>{const n=(0,y.vJq)();if(!(0,y.I2P)(n)||!n.isCollapsed())return;const s=t.getEditorState(),o=s.read(()=>V(s)),l=V(s);if(o!==l){const i=l-e,a=n.anchor;i>0&&(o===e&&r!==s?(r=s,(0,v.Xq)(t,s)):(0,B._A)(t,a,i))}})},[t,e]),null}function $(e){}const W=(0,f.forwardRef)(({defaultValue:e="",placeholder:t="Press @ to view variable suggestions",onChange:r,size:g="md",autoFocus:x=!1,options:b,by:h="name",trigger:y="@",menuComponent:v,menuItemComponent:w,className:j,wrapperClassName:N,disabled:C=!1,autoSpaceAfterMention:z=!1,style:A,maxLength:S},E)=>{const I={namespace:"Editor",editorTheme:L,onError:$,nodes:[k],editorState:e||'{\n "root": {\n "children": [\n {\n "children": [],\n "direction": null,\n "format": "",\n "indent": 0,\n "type": "paragraph",\n "version": 1,\n "textFormat": 0,\n "textStyle": ""\n }\n ],\n "direction": null,\n "format": "",\n "indent": 0,\n "type": "root",\n "version": 1\n }\n}',editable:!C};let P,R;return(0,f.isValidElement)(v)&&(P=v),(0,f.isValidElement)(w)&&(R=w),(0,n.jsx)("div",{className:(0,m.cn)("relative w-full","focus-within:ring-2 focus-within:ring-offset-2 hover:outline-border-strong hover:focus-within:outline-focus-border focus-within:outline-focus-border focus-within:ring-focus transition-[color,outline,box-shadow] duration-150 ease-in-out outline outline-1 outline-field-border",p[g],C&&"bg-field-secondary-background outline-field-border-disabled hover:outline-field-border-disabled [&_p]:text-badge-color-disabled cursor-not-allowed",N),children:(0,n.jsxs)(o.n,{initialConfig:I,children:[(0,n.jsx)("div",{className:"relative w-full [&_p]:m-0",children:(0,n.jsx)(l.h,{contentEditable:(0,n.jsx)(i.a,{className:(0,m.cn)("editor-content focus-visible:outline-none outline-none","w-full [&>p]:w-full [&>p]:m-0",j)}),placeholder:(0,n.jsx)(O,{content:t}),ErrorBoundary:d.R})}),(0,n.jsx)(a.G,{}),(0,n.jsx)(M,{menuComponent:P,menuItemComponent:R,size:g,by:h,optionsArray:b,trigger:y,autoSpace:z}),(0,n.jsx)(c.D,{onChange:(e,t)=>{"function"==typeof r&&r(e,t)},ignoreSelectionChange:!0}),E&&(0,n.jsx)(u.G,{editorRef:E}),x&&(0,n.jsx)(s.x,{}),(0,n.jsx)(_,{style:A}),S&&(0,n.jsx)(K,{maxLength:S})]})})});W.displayName="EditorInput"},66893:(e,t,r)=>{r.d(t,{Jc:()=>c});var n=r(74848),s=r(51609),o=r(56877),l=r(89667),i=r(50603);const a=(e,t)=>(0,o.cn)("rounded-full text-brand-primary-600 transition-colors duration-300",e[t].dot,e[t].ring),d={sm:{dot:"size-2.5",ring:"size-5",numberIcon:"size-5 text-tiny",icon:"size-5",label:"text-xs"},md:{dot:"size-3",ring:"size-6",numberIcon:"size-6 text-sm",icon:"size-6",label:"text-sm"},lg:{dot:"size-3.5",ring:"size-7",numberIcon:"size-7 text-md",icon:"size-7",label:"text-sm"}},c=({variant:e="dot",size:t="sm",type:r="inline",currentStep:i=1,children:a,className:c,lineClassName:u="min-w-10",completedVariant:m="icon",completedIcon:p=(0,n.jsx)(l.A,{}),...g})=>{const x=s.Children.count(a);-1===i&&(i=x+1);const f=s.Children.map(a,(o,l)=>{const a={isCompleted:l+1<i,isCurrent:l+1===i,sizeClasses:d,size:t,variant:e,type:r,isLast:l+1===x,index:l,lineClassName:u,completedVariant:m,completedIcon:p};return(0,n.jsx)(s.Fragment,{children:s.isValidElement(o)?s.cloneElement(o,a):o},l)});return(0,n.jsx)("div",{className:(0,o.cn)("flex w-full",c,"inline"===r?"items-center justify-between":""),...g,children:f})},u=({labelText:e="",icon:t=(0,n.jsx)(i.A,{}),isCurrent:r,isCompleted:s,className:a,type:d,variant:c,sizeClasses:u,size:p,isLast:g,index:x,lineClassName:f,completedVariant:b="icon",completedIcon:h=(0,n.jsx)(l.A,{}),...y})=>{const v=m(c,s,r,u,p,t,x,b,h),w={lg:"left-[calc(50%+14px)] right-[calc(-50%+14px)]",md:"left-[calc(50%+12px)] right-[calc(-50%+12px)]",sm:"left-[calc(50%+10px)] right-[calc(-50%+10px)]"},j={lg:"top-3.5",md:"top-3",sm:"top-2.5"},N=()=>{if(e){const t=(0,o.cn)(u[p].label,"text-text-tertiary",r?"text-brand-primary-600":"","break-word","stack"===d?"mt-2 transform max-w-xs":"mx-2 max-w-32");return(0,n.jsx)("span",{className:t,children:e})}return null},k=()=>{if(!g){const t=(0,o.cn)("block",s?"border-brand-primary-600":"border-border-subtle",f);return(0,n.jsx)("div","stack"===d?{className:(0,o.cn)("relative","flex","border-solid","border-y","absolute",s?"border-brand-primary-600":"border-border-subtle",j[p],w[p]),children:(0,n.jsx)("span",{className:"block"})}:{className:"flex-1",children:(0,n.jsx)("span",{className:(0,o.cn)("mr-2 border-y border-solid",!e&&"ml-2",t)})})}return null};return"stack"===d?(0,n.jsxs)("div",{className:"relative flex-1 justify-center",children:[(0,n.jsxs)("div",{className:(0,o.cn)("flex items-center flex-col",a),...y,children:[v,N()]}),k()]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:(0,o.cn)("flex items-center",a),...y,children:[v,N()]}),k()]})};u.displayName="ProgressSteps.Step";const m=(e,t,r,s,i,d,c,u="icon",m=(0,n.jsx)(l.A,{}))=>{if(t)return(0,n.jsx)("span","number"===u?{className:(0,o.cn)(a(s,i),"flex items-center justify-center bg-brand-primary-600 text-text-on-color rounded-full"),children:c+1}:{className:a(s,i),children:m});const p=((e,t,r)=>(0,o.cn)("relative flex items-center rounded-full justify-center transition-colors z-10 duration-500 ring-1",e?"ring-brand-primary-600":"ring-border-subtle",t[r].ring))(!!r,s,i),g=((e,t,r,n)=>{const s=`absolute rounded-full transition-colors duration-500 ${r[n].dot}`;return"dot"===e?(0,o.cn)(s,r[n].dot,t?"bg-brand-primary-600":"bg-text-tertiary"):"number"===e?(0,o.cn)(s,r[n].dot,t?"text-brand-primary-600":"text-text-tertiary","flex items-center justify-center"):"icon"===e?(0,o.cn)(s,t?"text-brand-primary-600":"text-text-tertiary","flex items-center justify-center"):""})(e,r,s,i);let x=null;return"number"===e?x=c+1:"icon"===e&&d&&(x=d),(0,n.jsx)("span",{className:p,children:(0,n.jsx)("span",{className:g,children:x})})};c.Step=u},71087:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(74848),s=r(56877);const o=(0,r(51609).forwardRef)(({children:e=null,tag:t="label",size:r="sm",className:o="",variant:l="neutral",required:i=!1,...a},d)=>{if(!e)return null;let c="";return i&&(c="after:content-['*'] after:text-field-required after:ml-0.5"),(0,n.jsx)(t,{ref:d,className:(0,s.cn)("font-medium text-field-label flex items-center gap-0.5",{xs:"text-xs [&>*]:text-xs [&>svg]:h-3 [&>svg]:w-3",sm:"text-sm [&>*]:text-sm [&>svg]:h-4 [&>svg]:w-4",md:"text-base [&>*]:text-base [&>svg]:h-5 [&>svg]:w-5"}[r],{neutral:"text-field-label [&>*]:text-field-label",help:"text-field-helper [&>*]:text-field-helper",error:"text-support-error [&>*]:text-support-error",disabled:"text-field-color-disabled disabled cursor-not-allowed [&>*]:text-field-color-disabled"}[l],c,{neutral:"",help:"font-normal",error:"font-normal",disabled:""}?.[l],o),...a,children:e})});o.displayName="Label"},74443:(e,t,r)=>{r.d(t,{A:()=>c});var n=r(74848),s=r(51609),o=r(39413),l=r(56877),i=r(89667),a=r(20659),d=r(71087);const c=(0,s.forwardRef)(({id:e,label:t,defaultChecked:r=!1,checked:c,onChange:u,indeterminate:m,disabled:p,size:g="md",className:x,...f},b)=>{const h=(0,s.useMemo)(()=>e||`checkbox-${(0,o.Ak)()}`,[e]),y=(0,s.useMemo)(()=>typeof c<"u",[c]),[v,w]=(0,s.useState)(r||!1),j="primary",N={sm:{checkbox:"size-4 rounded gap-1",icon:"size-3",text:"text-sm",description:"text-sm",gap:"gap-0.5"},md:{checkbox:"size-5 rounded gap-1",icon:"size-4",text:"text-base",description:"text-sm",gap:"gap-1"}},k={primary:{checkbox:"border-border-strong hover:border-border-interactive checked:border-border-interactive bg-white checked:bg-toggle-on checked:hover:bg-toggle-on-hover checked:hover:border-toggle-on-hover focus:ring-2 focus:ring-offset-2 focus:ring-focus",icon:"text-white"}},C=(0,s.useCallback)(()=>y?c:v,[y,c,v]),z=(0,s.useCallback)(()=>(0,s.isValidElement)(t)?t:t?.heading||t?.description?(0,n.jsxs)("div",{className:N[g].gap,children:[t?.heading&&(0,n.jsx)(d.A,{className:(0,l.cn)("text-text-primary font-medium leading-4 m-0",N[g].text,N[g].gap,p&&"text-text-disabled"),htmlFor:h,children:t?.heading}),t?.description&&(0,n.jsx)(d.A,{tag:"p",className:(0,l.cn)("font-normal leading-5 m-0",N[g].description,p&&"text-text-disabled"),variant:"help",children:t?.description})]}):null,[t,g,p]);return(0,n.jsxs)("div",{className:(0,l.cn)("inline-flex items-center justify-center gap-2",!!t&&"items-start",p&&"cursor-not-allowed"),children:[(0,n.jsxs)("label",{className:(0,l.cn)("relative flex items-center justify-center rounded-full p-0.5",!p&&"cursor-pointer"),htmlFor:h,children:[(0,n.jsx)("input",{ref:b,id:h,type:"checkbox",className:(0,l.cn)("peer relative cursor-pointer appearance-none transition-all m-0 before:content-[''] checked:before:content-[''] checked:before:hidden before:hidden !border-1.5 border-solid",k[j].checkbox,N[g].checkbox,p&&"cursor-not-allowed disabled:bg-white checked:disabled:bg-white disabled:border-border-disabled checked:disabled:border-border-disabled",x),checked:C(),onChange:e=>{if(p)return;const t=e.target.checked;y||w(t),"function"==typeof u&&u(t)},disabled:p,...f}),(0,n.jsx)("span",{className:(0,l.cn)("pointer-events-none inline-flex items-center absolute top-2/4 not-rtl:left-2/4 rtl:right-2/4 -translate-y-2/4 -translate-x-2/4 text-white opacity-0 transition-opacity peer-checked:opacity-100",k[j].icon,p&&"cursor-not-allowed peer-disabled:text-border-disabled"),children:(0,n.jsx)(m?a.A:i.A,{className:(0,l.cn)(N[g]?.icon)})})]}),!!t&&z()]})});c.displayName="Checkbox"},84227:(e,t,r)=>{r.d(t,{Ay:()=>c});var n=r(74848),s=r(51609),o=r(56877),l=r(69011),i=r(45396);const a={sm:{text:"text-sm",separator:"text-sm",separatorIconSize:16},md:{text:"text-base",separator:"text-base",separatorIconSize:18}},d=(0,s.createContext)({sizes:a.sm}),c=({children:e,size:t="sm"})=>(0,n.jsx)(d.Provider,{value:{sizes:a[t]||a.sm},children:(0,n.jsx)("nav",{className:"flex m-0","aria-label":"Breadcrumb",children:(0,n.jsx)("ul",{className:"m-0 inline-flex items-center space-x-1 md:space-x-1",children:e})})});c.displayName="Breadcrumb";const u=({children:e})=>(0,n.jsx)(n.Fragment,{children:e});u.displayName="Breadcrumb.List";const m=({children:e})=>(0,n.jsx)("li",{className:"m-0 inline-flex items-center gap-2",children:e});m.displayName="Breadcrumb.Item";const p=({href:e,children:t,className:r,as:l="a",...i})=>{const{sizes:a}=(0,s.useContext)(d);return(0,n.jsx)(l,{href:e,className:(0,o.cn)(a.text,"px-1 font-medium no-underline text-text-tertiary hover:text-text-primary hover:underline","focus:outline-none focus:ring-1 focus:ring-border-interactive focus:border-border-interactive focus:rounded-sm","transition-all duration-200",r),...i,children:t})};p.displayName="Breadcrumb.Link";const g=({type:e})=>{const{sizes:t}=(0,s.useContext)(d),r={slash:(0,n.jsx)("span",{className:(0,o.cn)("mx-1",t.separator),children:"/"}),arrow:(0,n.jsx)(l.A,{size:t.separatorIconSize})};return(0,n.jsx)("li",{role:"separator",className:"flex items-center text-text-tertiary mx-2 p-0 list-none","aria-hidden":"true",children:r[e]||r.arrow})};g.displayName="Breadcrumb.Separator";const x=()=>{const{sizes:e}=(0,s.useContext)(d);return(0,n.jsx)(i.A,{className:"mt-[2px] cursor-pointer text-text-tertiary hover:text-text-primary",size:e.separatorIconSize+4})};x.displayName="Breadcrumb.Ellipsis";const f=({children:e})=>{const{sizes:t}=(0,s.useContext)(d);return(0,n.jsx)("span",{className:(0,o.cn)(t.text,"font-medium text-text-primary"),children:e})};f.displayName="Breadcrumb.Page",c.List=u,c.Item=m,c.Link=p,c.Separator=g,c.Ellipsis=x,c.Page=f},85173:(e,t,r)=>{r.d(t,{Ay:()=>x});var n=r(74848),s=r(51609),o=r(66221),l=r(22343),i=r(56877),a=r(96307),d=r(75795),c=r(83505);const u=(0,s.createContext)({}),m=()=>(0,s.useContext)(u),p={open:{opacity:1},exit:{opacity:0}},g={duration:.2},x=({open:e,setOpen:t,children:r,trigger:o=null,className:l,exitOnClickOutside:a=!1,exitOnEsc:d=!0,design:m="simple",scrollLock:p=!0})=>{const g=void 0!==e&&void 0!==t,[x,f]=(0,s.useState)(!1),b=(0,s.useRef)(null),h=(0,s.useRef)(null),y=(0,s.useMemo)(()=>g?e:x,[e,x]),v=(0,s.useMemo)(()=>g?t:f,[f,t]),{refs:w,context:j}=(0,c.we)({open:y,onOpenChange:v}),N=(0,c.kp)(j),k=(0,c.s9)(j,{enabled:a||d,escapeKey:d,outsidePress:a}),C=(0,c.It)(j,{role:"dialog"}),{getFloatingProps:z}=(0,c.bv)([N,k,C]),A=()=>{y||v(!0)},S=(0,s.useCallback)(()=>(0,s.isValidElement)(o)?(0,s.cloneElement)(o,{onClick:(0,i.OK)(A,o?.props?.onClick),ref:w.setReference,"aria-haspopup":"dialog","aria-expanded":y}):"function"==typeof o?o({onClick:A}):null,[o,A,w.setReference,y]);return(0,n.jsxs)(n.Fragment,{children:[S(),(0,n.jsx)(u.Provider,{value:{open:y,setOpen:v,handleClose:()=>{y&&v(!1)},design:m,context:j,getFloatingProps:z,refs:w,dialogContainerRef:h,dialogRef:b,scrollLock:p,className:l},children:r})]})};x.displayName="Dialog";const f=({children:e,className:t})=>{const{open:r,handleClose:s,context:a,getFloatingProps:d,dialogRef:u,scrollLock:x,dialogContainerRef:f,className:b,refs:h}=m();return(0,n.jsx)(o.N,{children:r&&(0,n.jsx)(c.zR,{ref:f,lockScroll:x,className:(0,i.cn)("z-999999",b),"aria-modal":"true",children:(0,n.jsx)(c.s3,{context:a,...h?.reference&&{returnFocus:h.reference},children:(0,n.jsx)(l.P.div,{className:"fixed inset-0 overflow-y-auto",initial:"exit",animate:"open",exit:"exit",variants:p,role:"dialog","aria-modal":"true",transition:g,children:(0,n.jsx)("div",{className:"flex items-center justify-center min-h-full",children:(0,n.jsx)("div",{ref:e=>{e&&(u.current=e,a&&a.refs.setFloating(e))},...d?.(),className:(0,i.cn)("flex flex-col gap-5 w-120 h-fit bg-background-primary border border-solid border-border-subtle rounded-xl shadow-soft-shadow-2xl my-5 overflow-hidden",t),children:"function"==typeof e?e({close:s}):e})})})})})})};f.displayName="Dialog.Panel";const b=({children:e,...t})=>(0,n.jsx)(c.XF,{...t,children:e});b.displayName="Dialog.Portal";const h=({className:e,...t})=>{const{open:r,dialogContainerRef:s}=m();return s?.current?(0,n.jsx)(n.Fragment,{children:(0,d.createPortal)((0,n.jsx)(o.N,{children:r&&(0,n.jsx)(l.P.div,{className:(0,i.cn)("fixed inset-0 -z-10 bg-background-inverse/90",e),...t,initial:"exit",animate:"open",exit:"exit",variants:p,transition:g})}),s.current)}):null};h.displayName="Dialog.Backdrop";const y=({children:e,className:t,...r})=>(0,n.jsx)("div",{className:(0,i.cn)("space-y-2 px-5 pt-5 pb-1",t),...r,children:e});y.displayName="Dialog.Header";const v=({children:e,as:t="h3",className:r,...s})=>(0,n.jsx)(t,{className:(0,i.cn)("text-base font-semibold text-text-primary m-0 p-0",r),...s,children:e});v.displayName="Dialog.Title";const w=({children:e,as:t="p",className:r,...s})=>(0,n.jsx)(t,{className:(0,i.cn)("text-sm font-normal text-text-secondary my-0 ml-0 mr-1 p-0",r),...s,children:e});w.displayName="Dialog.Description";const j=({className:e,...t})=>(0,n.jsx)("button",{className:(0,i.cn)("bg-transparent inline-flex justify-center items-center border-0 p-1 m-0 cursor-pointer focus:outline-none outline-none shadow-none",e),"aria-label":"Close dialog",...t,children:(0,n.jsx)(a.A,{className:"size-4 text-text-primary shrink-0"})}),N=({children:e,as:t=s.Fragment,...r})=>{const{handleClose:o}=m();return e?t===s.Fragment?"function"==typeof e?e({close:o}):(0,s.cloneElement)(e,{onClick:o}):(0,n.jsx)(t,{...r,onClick:o,"aria-label":"Close dialog",children:e}):(0,n.jsx)(j,{onClick:o,...r})};N.displayName="Dialog.CloseButton";const k=({children:e,className:t,...r})=>(0,n.jsx)("div",{className:(0,i.cn)("px-5",t),...r,children:e});k.displayName="Dialog.Body";const C=({children:e,className:t})=>{const{design:r,handleClose:s}=m();return(0,n.jsx)("div",{className:(0,i.cn)("p-4 flex justify-end gap-3",{"bg-background-secondary":"footer-divided"===r},t),children:e?"function"==typeof e?e({close:s}):e:null})};C.displayName="Dialog.Footer",x.Panel=f,x.Portal=b,x.Title=v,x.Description=w,x.CloseButton=N,x.Header=y,x.Body=k,x.Footer=C,x.Backdrop=h},87835:(e,t,r)=>{r.d(t,{A:()=>i});var n=r(74848),s=r(51609),o=r(56877),l=r(96307);const i=(0,s.forwardRef)(({label:e="",size:t="sm",className:r="",type:s="pill",variant:i="neutral",icon:a=null,disabled:d=!1,onClose:c=()=>{},closable:u=!1,onMouseDown:m=()=>{},disableHover:p=!1},g)=>{const x={neutral:"bg-badge-background-gray text-badge-color-gray border-badge-border-gray",red:"bg-badge-background-red text-badge-color-red border-badge-border-red",yellow:"bg-badge-background-yellow text-badge-color-yellow border-badge-border-yellow",green:"bg-badge-background-green text-badge-color-green border-badge-border-green",blue:"bg-badge-background-sky text-badge-color-sky border-badge-border-sky",inverse:"bg-background-inverse text-text-inverse border-background-inverse",disabled:"bg-badge-background-disabled text-badge-color-disabled border-badge-border-disabled disabled cursor-not-allowed"};let f="",b="group relative justify-center flex items-center cursor-pointer";const h={xxs:"[&>svg]:size-3",xs:"[&>svg]:size-3",sm:"[&>svg]:size-3",md:"[&>svg]:size-4",lg:"[&>svg]:size-5"};return d?(f=x.disabled,b+=" cursor-not-allowed disabled"):f=x[i],e?(0,n.jsxs)("span",{className:(0,o.cn)("font-medium border-badge-border-gray flex items-center justify-center border border-solid box-border max-w-full transition-colors duration-150 ease-in-out",{xxs:"py-0.5 px-0.5 text-xs h-4",xs:"py-0.5 px-1 text-xs h-5",sm:"py-1 px-1.5 text-xs h-6",md:"py-1 px-1.5 text-sm h-7",lg:"py-1 px-1.5 text-base h-8"}[t],{pill:"rounded-full",rounded:"rounded"}[s],"gap-0.5",f,!p&&{neutral:"hover:bg-badge-hover-gray",red:"hover:bg-badge-hover-red",yellow:"hover:bg-badge-hover-yellow",green:"hover:bg-badge-hover-green",blue:"hover:bg-badge-hover-sky",inverse:"hover:bg-badge-hover-inverse",disabled:"hover:bg-badge-hover-disabled"}[i],r),ref:g,children:[a?(0,n.jsx)("span",{className:(0,o.cn)("justify-center flex items-center",h[t]),children:a}):null,(0,n.jsx)("span",{className:"px-1 truncate inline-block",children:e}),u&&(0,n.jsxs)("span",{className:(0,o.cn)(b,h[t]),onMouseDown:m,role:"button",tabIndex:0,...!d&&{onClick:c},children:[(0,n.jsx)("span",{className:"sr-only",children:`Remove ${e}`}),(0,n.jsx)(l.A,{}),(0,n.jsx)("span",{className:"absolute -inset-1"})]})]}):null});i.displayName="Badge"},88029:(e,t,r)=>{r.d(t,{A:()=>l});var n=r(74848),s=r(51609),o=r(56877);const l=(0,s.forwardRef)((e,t)=>{const{variant:r="primary",size:l="md",type:i="button",tag:a="button",className:d,children:c,disabled:u=!1,destructive:m=!1,icon:p=null,iconPosition:g="left",loading:x=!1,...f}=e;let b,h=null,y="";return p&&(y="flex items-center justify-center","left"===g?b=p:h=p),(0,n.jsxs)(a,{ref:t,type:i,className:(0,o.cn)(y,"outline outline-1 border-none cursor-pointer transition-colors duration-300 ease-in-out text-xs font-semibold focus:ring-2 focus:ring-toggle-on focus:ring-offset-2 disabled:text-text-disabled",{xs:"p-1 rounded [&>svg]:size-4",sm:"p-2 rounded [&>svg]:size-4 gap-0.5",md:"p-2.5 rounded-md text-sm [&>svg]:size-5 gap-1",lg:"p-3 rounded-lg text-base [&>svg]:size-6 gap-1"}[l],{primary:"text-text-on-color bg-button-primary hover:bg-button-primary-hover outline-button-primary hover:outline-button-primary-hover shadow-xs disabled:shadow-none focus:shadow-none disabled:bg-button-disabled disabled:outline-button-disabled",secondary:"text-text-on-color bg-button-secondary hover:bg-button-secondary-hover outline-button-secondary hover:outline-button-secondary-hover shadow-xs focus:shadow-none disabled:shadow-none disabled:bg-button-disabled disabled:outline-button-disabled",outline:"text-button-tertiary-color outline-border-subtle bg-button-tertiary shadow-sm focus:shadow-none hover:bg-button-tertiary-hover hover:outline-border-subtle disabled:bg-button-tertiary disabled:outline-border-disabled",ghost:"text-text-primary bg-transparent outline-transparent hover:bg-button-tertiary-hover",link:"outline-none text-link-primary bg-transparent hover:text-link-primary-hover hover:underline p-0 border-0 leading-none"}[r],m&&!u?{primary:"bg-button-danger hover:bg-button-danger-hover outline-button-danger hover:outline-button-danger-hover",secondary:"bg-button-danger hover:bg-button-danger-hover outline-button-danger hover:outline-button-danger-hover",outline:"text-button-danger outline outline-1 outline-button-danger hover:outline-button-danger bg-button-tertiary hover:bg-field-background-error",ghost:"text-button-danger hover:bg-field-background-error",link:"text-button-danger hover:text-button-danger-secondary"}[r]:"",m&&"focus:ring-focus-error",x?"opacity-50 disabled:cursor-not-allowed":"",{"cursor-default":u},d),disabled:u,"aria-disabled":u,...f,children:[(0,n.jsx)(s.Fragment,{children:b},"left-icon"),c?(0,n.jsx)("span",{className:"px-1",children:c}):null,(0,n.jsx)(s.Fragment,{children:h},"right-icon")]})});l.displayName="Button"},99019:(e,t,r)=>{r.d(t,{m:()=>c});var n=r(74848),s=r(51609),o=r(83505),l=r(46885),i=r(34743),a=r(56877),d=r(39756);const c=({variant:e="dark",placement:t="bottom",title:r="",content:c,arrow:u=!1,open:m,setOpen:p,children:g,className:x,tooltipPortalRoot:f,tooltipPortalId:b,boundary:h="clippingAncestors",strategy:y="fixed",offset:v=8,triggers:w=["hover","focus"],interactive:j=!1})=>{const N=(0,s.useMemo)(()=>"boolean"==typeof m&&"function"==typeof p,[m,p]),[k,C]=(0,s.useState)(!1),z=(0,s.useRef)(null),{refs:A,floatingStyles:S,context:E}=(0,o.we)({open:N?m:k,onOpenChange:N?p:C,placement:t,strategy:y,middleware:[(0,i.cY)(v),(0,i.UU)({boundary:h}),(0,i.BN)({boundary:h}),(0,i.UE)({element:z})],whileElementsMounted:l.ll}),I=(0,o.kp)(E,{enabled:!N&&w.includes("click")}),P=(0,o.Mk)(E,{move:!1,enabled:!N&&w.includes("hover"),...j&&{handleClose:(0,o.iB)()}}),R=(0,o.iQ)(E,{enabled:!N&&w.includes("focus")}),F=(0,o.s9)(E),D=(0,o.It)(E,{role:"tooltip"}),{getReferenceProps:T,getFloatingProps:M}=(0,o.bv)([I,P,R,F,D]),{isMounted:L,styles:O}=(0,o.DL)(E,{duration:150,initial:{opacity:0},open:{opacity:1},close:{opacity:0}}),_={light:"bg-tooltip-background-light text-text-primary",dark:"bg-tooltip-background-dark text-text-on-color"}[e],B="dark"===e?"text-tooltip-background-dark":"text-tooltip-background-light";return(0,n.jsxs)(s.Fragment,{children:[(0,s.isValidElement)(g)&&(0,n.jsx)(s.Fragment,{children:(0,s.cloneElement)(g,{ref:(0,d.Px)(g.ref,A.setReference),className:(0,a.cn)(g.props.className),...T()})},"tooltip-reference"),(0,n.jsx)(o.XF,{id:b,root:f,children:L&&(0,n.jsxs)("div",{className:(0,a.cn)("absolute z-20 py-2 px-3 rounded-md text-xs leading-4 shadow-soft-shadow-lg",_,"max-w-80 w-fit",x),ref:A.setFloating,style:{...S,...O},...M(),children:[(0,n.jsxs)("div",{children:[!!r&&(0,n.jsx)("span",{className:"font-semibold",children:r},"tooltip-title"),!!c&&(0,n.jsx)("div",{className:"font-normal",children:c},"tooltip-content")]}),u&&(0,n.jsx)(o.ie,{ref:z,context:E,className:(0,a.cn)("fill-current",B)})]})})]})};c.displayName="Tooltip"}}]);