@1d1s/design-system 1.2.6 → 1.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/CheckList/CheckList.d.ts +4 -1
- package/dist/components/CircleAvatar/CircleAvatar.d.ts +2 -2
- package/dist/components/Stripe/Stripe.d.ts +1 -1
- package/dist/components/Tag/ChallengeTag.d.ts +1 -1
- package/dist/components/TextField/TextArea.d.ts +3 -0
- package/dist/index.es.js +156 -156
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -18,13 +18,13 @@ return e(he,{role:"region","aria-labelledby":i.triggerId,"data-orientation":a.or
|
|
|
18
18
|
return e(qe,{className:fn("border-b border-gray-200 last:border-b-0",t),...n})}function bn({className:t,children:r,...o}){/* @__PURE__ */
|
|
19
19
|
return e(Qe,{className:"flex",children:/* @__PURE__ */n(Ue,{className:fn("flex flex-1 items-center justify-between py-3 sm:py-4 text-left","text-sm sm:text-base font-medium text-gray-900 transition-colors","hover:text-main-900","focus:outline-none focus-visible:ring-2 focus-visible:ring-main-500 focus-visible:ring-offset-2 rounded-1","[&[data-state=open]>svg]:rotate-180","cursor-pointer",t),...o,children:[r,
|
|
20
20
|
/* @__PURE__ */e(mn,{className:fn("h-4 w-4 sm:h-5 sm:w-5 shrink-0 text-gray-500 transition-transform duration-200")})]})})}function vn({className:t,children:n,...r}){/* @__PURE__ */
|
|
21
|
-
return e(Ke,{className:fn("overflow-hidden text-gray-700","data-[state=closed]:animate-accordion-up","data-[state=open]:animate-accordion-down"),...r,children:/* @__PURE__ */e("div",{className:fn("pb-3 sm:pb-4 pt-0 text-sm sm:text-base",t),children:n})})}const yn=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,wn=Ze,xn=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return wn(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:o,defaultVariants:a}=t,i=Object.keys(o).map(e=>{const t=null==n?void 0:n[e],r=null==a?void 0:a[e];if(null===t)return null;const i=yn(t)||yn(r);return o[e][i]}),l=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{}),s=null==t||null===(r=t.compoundVariants)||void 0===r?void 0:r.reduce((e,t)=>{let{class:n,className:r,...o}=t;return Object.entries(o).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...a,...l}[t]):{...a,...l}[t]===n})?[...e,n,r]:e},[]);return wn(e,i,s,null==n?void 0:n.class,null==n?void 0:n.className)},Cn=xn("inline-flex items-center text-gray-900",{variants:{tone:{main:"bg-main-300",peach:"bg-
|
|
21
|
+
return e(Ke,{className:fn("overflow-hidden text-gray-700","data-[state=closed]:animate-accordion-up","data-[state=open]:animate-accordion-down"),...r,children:/* @__PURE__ */e("div",{className:fn("pb-3 sm:pb-4 pt-0 text-sm sm:text-base",t),children:n})})}const yn=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,wn=Ze,xn=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return wn(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:o,defaultVariants:a}=t,i=Object.keys(o).map(e=>{const t=null==n?void 0:n[e],r=null==a?void 0:a[e];if(null===t)return null;const i=yn(t)||yn(r);return o[e][i]}),l=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{}),s=null==t||null===(r=t.compoundVariants)||void 0===r?void 0:r.reduce((e,t)=>{let{class:n,className:r,...o}=t;return Object.entries(o).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...a,...l}[t]):{...a,...l}[t]===n})?[...e,n,r]:e},[]);return wn(e,i,s,null==n?void 0:n.class,null==n?void 0:n.className)},Cn=xn("inline-flex items-center text-gray-900",{variants:{tone:{main:"bg-main-300",peach:"bg-brand-soft",mint:"bg-mint-200",blue:"bg-blue-200",green:"bg-green-200",gray:"bg-gray-100"},layout:{vertical:"flex-col text-center",horizontal:"flex-row gap-2"},size:{sm:"",md:"",lg:""}},compoundVariants:[{layout:"vertical",size:"sm",class:"min-w-[72px] rounded-2.5 px-3 py-3 gap-1"},{layout:"vertical",size:"md",class:"min-w-[88px] rounded-3 px-3 py-3.5 gap-1.5"},{layout:"vertical",size:"lg",class:"min-w-[112px] rounded-4 px-4 py-5 gap-2"},{layout:"horizontal",size:"sm",class:"rounded-2.5 px-3.5 py-2.5"},{layout:"horizontal",size:"md",class:"rounded-3 px-4 py-3"},{layout:"horizontal",size:"lg",class:"rounded-4 px-5 py-3.5"}],defaultVariants:{tone:"main",layout:"vertical",size:"md"}}),kn={sm:"text-[18px]",md:"text-[22px]",lg:"text-[34px]"},Nn={sm:"text-[10px]",md:"text-[11px]",lg:"text-xs"};function An({emoji:t,label:r,tone:o,layout:a,size:i,className:l,...s}){const c=i??"md";/* @__PURE__ */
|
|
22
22
|
return n("div",{"data-slot":"achievement-badge",className:fn(Cn({tone:o,layout:a,size:i}),l),...s,children:[
|
|
23
23
|
/* @__PURE__ */e("span",{"aria-hidden":!0,className:fn("leading-none",kn[c]),children:t}),
|
|
24
24
|
/* @__PURE__ */e("span",{className:fn("font-bold",Nn[c]),children:r})]})}var Mn=/* @__PURE__ */Symbol.for("react.lazy"),Sn=x[" use ".trim().toString()];function Rn(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===Mn&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t;var t}function En(t){const n=/* @__PURE__ */Pn(t),r=x.forwardRef((t,r)=>{let{children:o,...a}=t;Rn(o)&&"function"==typeof Sn&&(o=Sn(o._payload));const i=x.Children.toArray(o),l=i.find(Ln);if(l){const t=l.props.children,o=i.map(e=>e===l?x.Children.count(t)>1?x.Children.only(null):x.isValidElement(t)?t.props.children:null:e);/* @__PURE__ */
|
|
25
25
|
return e(n,{...a,ref:r,children:x.isValidElement(t)?x.cloneElement(t,void 0,o):null})}/* @__PURE__ */
|
|
26
26
|
return e(n,{...a,ref:r,children:o})});return r.displayName=`${t}.Slot`,r}var _n=/* @__PURE__ */En("Slot");function Pn(e){const t=x.forwardRef((e,t)=>{let{children:n,...r}=e;if(Rn(n)&&"function"==typeof Sn&&(n=Sn(n._payload)),x.isValidElement(n)){const e=(e=>{let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)})(n),o=((e,t)=>{const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}})(r,n.props);return n.type!==x.Fragment&&(o.ref=t?I(t,e):e),x.cloneElement(n,o)}return x.Children.count(n)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Dn=/* @__PURE__ */Symbol("radix.slottable");function Ln(e){return x.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Dn}const On=xn("leading-none",{variants:{size:{display1:"text-5xl",display2:"text-4xl",heading1:"text-3xl",heading2:"text-2xl",body1:"text-xl",body2:"text-lg",caption1:"text-base",caption2:"text-sm",caption3:"text-xs",pageTitle:"text-3xl"},weight:{extrabold:"font-extrabold",bold:"font-bold",semibold:"font-semibold",medium:"font-medium",regular:"font-normal",light:"font-light"}},defaultVariants:{size:"body2",weight:"medium"}});function zn({className:t,size:n,weight:r,as:o="span",...a}){/* @__PURE__ */
|
|
27
|
-
return e(o,{className:fn(On({size:n,weight:r,className:t})),...a})}const Tn=xn("inline-flex items-center justify-center gap-1.5 border transition-[scale,translate,filter,background-color,box-shadow,border-color,color] duration-150 ease-out active:scale-[0.97] disabled:cursor-not-allowed disabled:opacity-[0.45] disabled:active:scale-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/30 focus-visible:ring-offset-2",{variants:{variant:{primary:"bg-brand text-white border-transparent hover:brightness-105 hover:-translate-y-px",secondary:"bg-white text-gray-800 border-gray-200 hover:bg-gray-50 hover:border-gray-300",soft:"bg-
|
|
27
|
+
return e(o,{className:fn(On({size:n,weight:r,className:t})),...a})}const Tn=xn("inline-flex items-center justify-center gap-1.5 border transition-[scale,translate,filter,background-color,box-shadow,border-color,color] duration-150 ease-out active:scale-[0.97] disabled:cursor-not-allowed disabled:opacity-[0.45] disabled:active:scale-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/30 focus-visible:ring-offset-2",{variants:{variant:{primary:"bg-brand text-white border-transparent hover:brightness-105 hover:-translate-y-px",secondary:"bg-white text-gray-800 border-gray-200 hover:bg-gray-50 hover:border-gray-300",soft:"bg-brand-soft text-brand border-main-300 hover:bg-main-300/70",ghost:"bg-transparent text-gray-700 border-transparent hover:bg-gray-100",danger:"bg-red-500 text-white border-transparent hover:brightness-105 hover:-translate-y-px",outlined:"bg-white text-gray-800 border-gray-200 hover:bg-gray-50 hover:border-gray-300",default:"bg-brand text-white border-transparent hover:brightness-105 hover:-translate-y-px"},size:{xs:"h-6 px-2 gap-1",sm:"h-[30px] px-3 gap-1",md:"h-[38px] px-4",lg:"h-[46px] px-5",xl:"h-[54px] px-6",icon:"h-[38px] w-[38px] p-0",small:"h-[30px] px-3 gap-1",medium:"h-[38px] px-4",large:"h-[46px] px-5"},pill:{true:"rounded-full",false:"rounded-2.5"},fullWidth:{true:"w-full",false:""}},defaultVariants:{variant:"primary",size:"md",pill:!1,fullWidth:!1}}),In={xs:{size:"caption3",weight:"extrabold"},sm:{size:"caption3",weight:"extrabold"},md:{size:"caption2",weight:"extrabold"},lg:{size:"caption1",weight:"extrabold"},xl:{size:"body2",weight:"extrabold"},icon:{size:"caption2",weight:"extrabold"},small:{size:"caption3",weight:"extrabold"},medium:{size:"caption2",weight:"extrabold"},large:{size:"caption1",weight:"extrabold"}};function Wn({className:t,variant:r,size:o,pill:a,fullWidth:i,asChild:l=!1,disabled:s=!1,iconLeft:c,iconRight:d,children:u,...p}){const f=o??"md",m="icon"!==f&&("string"==typeof u||"number"==typeof u);/* @__PURE__ */
|
|
28
28
|
return n(l?_n:"button",{"data-slot":"button",className:fn(Tn({variant:r,size:o,pill:a,fullWidth:i,className:t})),disabled:s,...p,children:[c,m?/* @__PURE__ */e(zn,{size:In[f].size,weight:In[f].weight,children:u}):u,d]})}const Fn=t=>/* @__PURE__ */e(a,{...t}),Bn=t=>/* @__PURE__ */e(l,{...t}),jn=({strokeWidth:t=14,...n})=>/* @__PURE__ */e("svg",{width:"65",height:"50",viewBox:"0 0 65 50",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:/* @__PURE__ */e("path",{d:"M57.5 7.5L23.125 41.875L7.5 26.25",stroke:"currentColor",strokeWidth:t,strokeLinecap:"round",strokeLinejoin:"round"})}),Hn=t=>/* @__PURE__ */e("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:/* @__PURE__ */e("path",{d:"M16 20L8 12L16 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Yn=t=>/* @__PURE__ */e("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:/* @__PURE__ */e("path",{d:"M8 4L16 12L8 20",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),$n=t=>/* @__PURE__ */e("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:/* @__PURE__ */e("path",{d:"M4 16L12 8L20 16",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Vn=t=>/* @__PURE__ */e("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:/* @__PURE__ */e("path",{d:"M18 6L6 18M18 18L6 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),Gn=t=>/* @__PURE__ */n("svg",{width:"48",height:"80",viewBox:"0 0 48 80",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:[
|
|
29
29
|
/* @__PURE__ */e("path",{d:"M0 78.622V15.4757C0 14.1285 1.72603 13.5819 2.49497 14.6855L46.4899 77.8318C47.1262 78.7453 46.4759 79.9999 45.3664 79.9999H1.37144C0.614016 79.9999 0 79.3833 0 78.622Z",fill:"currentColor"}),
|
|
30
30
|
/* @__PURE__ */e("path",{d:"M48 78.622V15.4757C48 14.1285 46.274 13.5819 45.505 14.6855L1.51006 77.8318C0.873795 78.7453 1.52406 79.9999 2.63359 79.9999H46.6285C47.386 79.9999 48 79.3833 48 78.622Z",fill:"currentColor"}),
|
|
@@ -50,7 +50,7 @@ return e(Un[t],{width:r??n,height:o??n,...a})}function Xn({onChange:t,size:r=300
|
|
|
50
50
|
/* @__PURE__ */e("input",{type:"file",accept:"image/*",ref:d,className:"hidden",onChange(e){void 0!==t&&t(e),(e=>{const t=e.target.files?.[0];if(t){u.current&&URL.revokeObjectURL(u.current);const e=URL.createObjectURL(t);u.current=e,f(e)}})(e)},...i}),
|
|
51
51
|
/* @__PURE__ */e("button",{type:"button",onClick:m,"aria-label":"이미지 선택",className:fn("group relative h-full w-full cursor-pointer overflow-hidden rounded-full bg-gray-100 outline-none transition-[border-color,box-shadow,background-color] duration-200","focus-visible:ring-3 focus-visible:ring-main-300/60",!p&&"border-2 border-dashed border-gray-200 bg-white hover:border-gray-300"),children:p?/* @__PURE__ */e("img",{src:p,alt:"이미지 미리보기",className:"h-full w-full object-cover",loading:"lazy"}):/* @__PURE__ */e("div",{className:"flex h-full w-full items-center justify-center",children:/* @__PURE__ */e(Gn,{width:c,height:s,className:"text-gray-400"})})}),
|
|
52
52
|
/* @__PURE__ */e(Wn,{type:"button",variant:"secondary",size:"sm",pill:!0,onClick:m,iconLeft:/* @__PURE__ */e(qn,{className:"h-3.5 w-3.5 text-gray-700"}),className:"absolute bottom-0 left-1/2 z-10 -translate-x-1/2 translate-y-1/2 px-4 text-gray-700 shadow-lg",children:a})]})}const Zn={brand:"bg-brand",blue:"bg-blue-600",mint:"bg-mint-800",red:"bg-red-600",green:"bg-green-700",gray:"bg-gray-700"},Jn={NEW:"brand",HOT:"blue",TIP:"mint"};function er({kind:t,tone:n,children:r,variant:o="standalone",className:a,...i}){const l=n??(t?Jn[t]:"brand"),s=r??t??"";/* @__PURE__ */
|
|
53
|
-
return e("span","inline"===o?{"data-slot":"status-badge","data-variant":"inline",className:fn("inline-flex items-center justify-center rounded-full bg-white/25 px-2.5 py-0.5","text-[10px] font-extrabold uppercase tracking-[0.4px] text-white",a),...i,children:s}:{"data-slot":"status-badge","data-variant":"standalone",className:fn("inline-flex items-center justify-center rounded-2 px-3 py-1.5",Zn[l],a),...i,children:/* @__PURE__ */e("span",{className:"rounded-full bg-white/25 px-2.5 py-0.5 text-[10px] font-extrabold uppercase tracking-[0.4px] text-white",children:s})})}const tr=xn("relative overflow-hidden rounded-
|
|
53
|
+
return e("span","inline"===o?{"data-slot":"status-badge","data-variant":"inline",className:fn("inline-flex items-center justify-center rounded-full bg-white/25 px-2.5 py-0.5","text-[10px] font-extrabold uppercase tracking-[0.4px] text-white",a),...i,children:s}:{"data-slot":"status-badge","data-variant":"standalone",className:fn("inline-flex items-center justify-center rounded-2 px-3 py-1.5",Zn[l],a),...i,children:/* @__PURE__ */e("span",{className:"rounded-full bg-white/25 px-2.5 py-0.5 text-[10px] font-extrabold uppercase tracking-[0.4px] text-white",children:s})})}const tr=xn("relative overflow-hidden rounded-4 p-6 text-white",{variants:{tone:{orange:"bg-[linear-gradient(135deg,#ff8a65_0%,#ff5722_100%)] shadow-warm",mint:"bg-[linear-gradient(135deg,#7dd8b5_0%,#3eb489_100%)]",blue:"bg-[linear-gradient(135deg,#7ab3ef_0%,#1666ba_100%)]",purple:"bg-[linear-gradient(135deg,#a78bfa_0%,#7c3aed_100%)]",gray:"bg-[linear-gradient(135deg,#9e9e9e_0%,#424242_100%)]"},size:{sm:"p-4 rounded-3",md:"p-6 rounded-4",lg:"p-8 rounded-4"}},defaultVariants:{tone:"orange",size:"md"}});function nr({kind:t,title:r,subtitle:o,action:a,tone:i,size:l,bg:s,className:c,style:d,...u}){/* @__PURE__ */
|
|
54
54
|
return e("div",{"data-slot":"banner",className:fn(tr({tone:i,size:l}),c),style:s?{...d,background:s}:d,...u,children:/* @__PURE__ */n("div",{className:"flex items-start justify-between gap-4",children:[
|
|
55
55
|
/* @__PURE__ */n("div",{className:"min-w-0 flex-1",children:[t?/* @__PURE__ */e(er,{variant:"inline",kind:t,children:t}):null,
|
|
56
56
|
/* @__PURE__ */e("div",{className:"mt-3 text-xl font-extrabold leading-[1.25] tracking-[-0.4px] whitespace-pre-line",children:r}),o?/* @__PURE__ */e("div",{className:"mt-1.5 text-xs opacity-90",children:o}):null]}),a?/* @__PURE__ */e("div",{className:"shrink-0",children:a}):null]})})}function rr({items:r,autoSlideIntervalMs:o=5e3,initialIndex:a=0,enableLoop:i=!0,showIndicators:l=!0,aspectRatioClassName:s="aspect-[4/1]",minHeightPx:c=180,componentId:d,enableDataLayerTracking:u=!1,impressionMode:p="once",onBannerClick:f,onBannerImpression:m,onBannerChange:h,onItemClick:g,className:b,...v}){const y=r.length,w=c>0?`${c}px`:void 0,x=C.useMemo(()=>0===y||a<0?0:a>y-1?y-1:a,[a,y]),k=i&&y>1,N=C.useMemo(()=>{if(0===y)return[];if(!k)return r;const[e]=r,[t]=r.slice(-1);return[t,...r,e]},[k,y,r]),[A,M]=C.useState(k?x+1:x),[S,R]=C.useState(!0),[E,_]=C.useState(0);C.useEffect(()=>{M(k?x+1:x)},[k,x,y]),C.useEffect(()=>{if(y<=1||o<=0)return;let e;const t=()=>{e=window.setInterval(()=>{M(e=>e+1)},o)},n=()=>window.clearInterval(e),r=()=>{document.hidden?n():(R(!1),M(e=>{const t=((e-(k?1:0)+y)%y+y)%y;return k?t+1:t}),t())};return t(),document.addEventListener("visibilitychange",r),()=>{n(),document.removeEventListener("visibilitychange",r)}},[o,k,y,E]),C.useEffect(()=>{if(S)return;const e=window.setTimeout(()=>{R(!0)},30);return()=>window.clearTimeout(e)},[S]);const P=0===y?0:((A-(k?1:0)+y)%y+y)%y,D=C.useRef(/* @__PURE__ */new Set),L=C.useCallback((e,t,n)=>{const r=void 0===t.id?`${n}`:String(t.id),o={event:e,componentId:d,bannerId:r,bannerIndex:n,bannerType:t.type,bannerTitle:t.title,bannerSubtitle:t.subtitle,timestamp:Date.now()};if("click"===e&&f?.(o),"impression"===e&&m?.(o),"change"===e&&h?.(o),u&&"undefined"!=typeof window){const t=window;Array.isArray(t.dataLayer)&&t.dataLayer.push({event:`banner_${e}`,component_id:d??"banner-carousel",banner_id:o.bannerId,banner_index:o.bannerIndex,banner_type:o.bannerType,banner_title:o.bannerTitle,banner_subtitle:o.bannerSubtitle,timestamp:o.timestamp})}},[d,u,h,f,m]);C.useEffect(()=>{if(0===y)return;const e=r[P];if(!e)return;L("change",e,P);const t=`${void 0===e.id?`${P}`:String(e.id)}-${P}`,n=D.current.has(t);"once"===p&&n||(D.current.add(t),L("impression",e,P))},[P,L,p,y,r]);const O=C.useRef(!1);return 0===y?null:/* @__PURE__ */e("div",{className:fn("w-full",b),...v,children:/* @__PURE__ */n("div",{className:"relative overflow-hidden rounded-4",children:[
|
|
@@ -72,7 +72,7 @@ return e("nav",{"data-slot":"bottom-nav",className:fn("sticky bottom-0 z-30 grid
|
|
|
72
72
|
return n("button",{type:"button","data-active":a?"true":"false","aria-current":a?"page":void 0,onClick(){o?.(t.id),t.onClick?.()},className:fn("flex flex-col items-center justify-center gap-0.5 py-1 transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/30",a?"text-brand":"text-gray-400 hover:text-gray-600"),children:[
|
|
73
73
|
/* @__PURE__ */e("span",{className:"leading-none",children:i}),
|
|
74
74
|
/* @__PURE__ */e("span",{className:"text-[10px] font-semibold leading-none",children:t.label})]},t.id)})})}function ar(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...e)=>t.current?.(...e),[])}var ir,lr="dismissableLayer.update",sr=x.createContext({layers:/* @__PURE__ */new Set,layersWithOutsidePointerEventsDisabled:/* @__PURE__ */new Set,branches:/* @__PURE__ */new Set}),cr=x.forwardRef((t,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:l,onDismiss:s,...c}=t,d=x.useContext(sr),[u,p]=x.useState(null),f=u?.ownerDocument??globalThis?.document,[,m]=x.useState({}),h=W(n,e=>p(e)),g=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(b),y=u?g.indexOf(u):-1,w=d.layersWithOutsidePointerEventsDisabled.size>0,C=y>=v,k=((e,t=globalThis?.document)=>{const n=ar(e),r=x.useRef(!1),o=x.useRef(()=>{});return x.useEffect(()=>{const e=e=>{if(e.target&&!r.current){let r=()=>{ur("dismissableLayer.pointerDownOutside",n,a,{discrete:!0})};const a={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture(){return r.current=!0}}})(e=>{const t=e.target,n=[...d.branches].some(e=>e.contains(t));C&&!n&&(a?.(e),l?.(e),e.defaultPrevented||s?.())},f),N=((e,t=globalThis?.document)=>{const n=ar(e),r=x.useRef(!1);return x.useEffect(()=>{const e=e=>{e.target&&!r.current&&ur("dismissableLayer.focusOutside",n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture(){return r.current=!0},onBlurCapture(){return r.current=!1}}})(e=>{const t=e.target;[...d.branches].some(e=>e.contains(t))||(i?.(e),l?.(e),e.defaultPrevented||s?.())},f);return((e,t=globalThis?.document)=>{const n=ar(e);x.useEffect(()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])})(e=>{y===d.layers.size-1&&(o?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),x.useEffect(()=>{if(u)return r&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(ir=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(u)),d.layers.add(u),dr(),()=>{r&&1===d.layersWithOutsidePointerEventsDisabled.size&&(f.body.style.pointerEvents=ir)}},[u,f,r,d]),x.useEffect(()=>()=>{u&&(d.layers.delete(u),d.layersWithOutsidePointerEventsDisabled.delete(u),dr())},[u,d]),x.useEffect(()=>{const e=()=>m({});return document.addEventListener(lr,e),()=>document.removeEventListener(lr,e)},[]),/* @__PURE__ */e(U.div,{...c,ref:h,style:{pointerEvents:w?C?"auto":"none":void 0,...t.style},onFocusCapture:V(t.onFocusCapture,N.onFocusCapture),onBlurCapture:V(t.onBlurCapture,N.onBlurCapture),onPointerDownCapture:V(t.onPointerDownCapture,k.onPointerDownCapture)})});function dr(){const e=new CustomEvent(lr);document.dispatchEvent(e)}function ur(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?((e,t)=>{e&&_.flushSync(()=>e.dispatchEvent(t))})(o,a):o.dispatchEvent(a)}cr.displayName="DismissableLayer",x.forwardRef((t,n)=>{const r=x.useContext(sr),o=x.useRef(null),a=W(n,o);return x.useEffect(()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),/* @__PURE__ */e(U.div,{...t,ref:a})}).displayName="DismissableLayerBranch";var pr="focusScope.autoFocusOnMount",fr="focusScope.autoFocusOnUnmount",mr={bubbles:!1,cancelable:!0},hr=x.forwardRef((t,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...l}=t,[s,c]=x.useState(null),d=ar(a),u=ar(i),p=x.useRef(null),f=W(n,e=>c(e)),m=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(o){let e=e=>{if(m.paused||!s)return;const t=e.target;s.contains(t)?p.current=t:yr(p.current,{select:!0})},t=e=>{if(m.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||yr(p.current,{select:!0}))},n=e=>{if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&yr(s)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[o,s,m.paused]),x.useEffect(()=>{if(s){wr.add(m);const e=document.activeElement;if(!s.contains(e)){const t=new CustomEvent(pr,mr);s.addEventListener(pr,d),s.dispatchEvent(t),t.defaultPrevented||(((e,{select:t=!1}={})=>{const n=document.activeElement;for(const r of e)if(yr(r,{select:t}),document.activeElement!==n)return})(gr(s).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&yr(s))}return()=>{s.removeEventListener(pr,d),setTimeout(()=>{const t=new CustomEvent(fr,mr);s.addEventListener(fr,u),s.dispatchEvent(t),t.defaultPrevented||yr(e??document.body,{select:!0}),s.removeEventListener(fr,u),wr.remove(m)},0)}}},[s,d,u,m]);const h=x.useCallback(e=>{if(!r&&!o)return;if(m.paused)return;const t=document.activeElement;if("Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&t){const n=e.currentTarget,[o,a]=(e=>{const t=gr(e);return[br(t,e),br(t.reverse(),e)]})(n);o&&a?e.shiftKey||t!==a?e.shiftKey&&t===o&&(e.preventDefault(),r&&yr(a,{select:!0})):(e.preventDefault(),r&&yr(o,{select:!0})):t===n&&e.preventDefault()}},[r,o,m.paused]);/* @__PURE__ */
|
|
75
|
-
return e(U.div,{tabIndex:-1,...l,ref:f,onKeyDown:h})});function gr(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(e){return e.disabled||e.hidden||"INPUT"===e.tagName&&"hidden"===e.type?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function br(e,t){for(const n of e)if(!vr(n,{upTo:t}))return n}function vr(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function yr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&(e=>e instanceof HTMLInputElement&&"select"in e)(e)&&t&&e.select()}}hr.displayName="FocusScope";var wr=(()=>{let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=xr(e,t),e.unshift(t)},remove(t){e=xr(e,t),e[0]?.resume()}}})();function xr(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var Cr=x.forwardRef((t,n)=>{const{container:r,...o}=t,[a,i]=x.useState(!1);G(()=>i(!0),[]);const l=r||a&&globalThis?.document?.body;return l?P.createPortal(/* @__PURE__ */e(U.div,{...o,ref:n}),l):null});Cr.displayName="Portal";var kr=0;function Nr(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ar()),document.body.insertAdjacentElement("beforeend",e[1]??Ar()),kr++,()=>{1===kr&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),kr--}},[])}function Ar(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Mr=function(){return Mr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Mr.apply(this,arguments)};function Sr(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}"function"==typeof SuppressedError&&SuppressedError;var Rr="right-scroll-bar-position",Er="width-before-scroll-bar";function _r(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var Pr="undefined"!=typeof window?x.useLayoutEffect:x.useEffect,Dr=/* @__PURE__ */new WeakMap;function Lr(e){return e}var Or=e=>{var t=e.sideCar,n=Sr(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x.createElement(r,Mr({},n))};Or.isSideCarExport=!0;var zr=(e=>{void 0===e&&(e={});var t=((e,t)=>{void 0===t&&(t=Lr);var n=[],r=!1;return{read(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:null},useMedium(e){var o=t(e,r);return n.push(o),()=>{n=n.filter(e=>e!==o)}},assignSyncMedium(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:t=>e(t),filter:()=>n}},assignMedium(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var a=()=>{var n=t;t=[],n.forEach(e)},i=()=>Promise.resolve().then(a);i(),n={push(e){t.push(e),i()},filter:e=>(t=t.filter(e),n)}}}})();return t.options=Mr({async:!0,ssr:!1},e),t})(),Tr=()=>{},Ir=x.forwardRef((e,t)=>{var n=x.useRef(null),r=x.useState({onScrollCapture:Tr,onWheelCapture:Tr,onTouchMoveCapture:Tr}),o=r[0],a=r[1],i=e.forwardProps,l=e.children,s=e.className,c=e.removeScrollBar,d=e.enabled,u=e.shards,p=e.sideCar,f=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,b=e.as,v=void 0===b?"div":b,y=e.gapMode,w=Sr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=p,k=(e=>{var t,n,r=(t=t=>e.forEach(e=>_r(e,t)),(n=N(()=>({value:null,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}))[0]).callback=t,n.facade);return Pr(()=>{var t=Dr.get(r);if(t){var n=new Set(t),o=new Set(e),a=r.current;n.forEach(e=>{o.has(e)||_r(e,null)}),o.forEach(e=>{n.has(e)||_r(e,a)})}Dr.set(r,e)},[e]),r})([n,t]),A=Mr(Mr({},w),o);return x.createElement(x.Fragment,null,d&&x.createElement(C,{sideCar:zr,removeScrollBar:c,shards:u,noRelative:f,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),i?x.cloneElement(x.Children.only(l),Mr(Mr({},A),{ref:k})):x.createElement(v,Mr({},A,{className:s,ref:k}),l))});Ir.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ir.classNames={fullWidth:Er,zeroRight:Rr};var Wr=()=>{var e,t,n,r=(e=0,t=null,n={add(n){var r,o;0==e&&(t=(()=>{if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=(()=>{if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__})();return t&&e.setAttribute("nonce",t),e})())&&(o=n,(r=t).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),(e=>{(document.head||document.getElementsByTagName("head")[0]).appendChild(e)})(t)),e++},remove(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}},(e,t)=>{x.useEffect(()=>(n.add(e),()=>{n.remove()}),[e&&t])});return e=>(r(e.styles,e.dynamic),null)},Fr={left:0,top:0,right:0,gap:0},Br=e=>parseInt(e||"",10)||0,jr=Wr(),Hr="data-scroll-locked",Yr=(e,t,n,r)=>{var o=e.left,a=e.top,i=e.right,l=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(l,"px ").concat(r,";\n }\n body[").concat(Hr,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(l,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Rr," {\n right: ").concat(l,"px ").concat(r,";\n }\n \n .").concat(Er," {\n margin-right: ").concat(l,"px ").concat(r,";\n }\n \n .").concat(Rr," .").concat(Rr," {\n right: 0 ").concat(r,";\n }\n \n .").concat(Er," .").concat(Er," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(Hr,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},$r=()=>{var e=parseInt(document.body.getAttribute(Hr)||"0",10);return isFinite(e)?e:0},Vr=e=>{var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;x.useEffect(()=>(document.body.setAttribute(Hr,($r()+1).toString()),()=>{var e=$r()-1;e<=0?document.body.removeAttribute(Hr):document.body.setAttribute(Hr,e.toString())}),[]);var a=x.useMemo(()=>(e=>{if(void 0===e&&(e="margin"),"undefined"==typeof window)return Fr;var t=(e=>{var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingTop":"marginTop"],r=t["padding"===e?"paddingRight":"marginRight"];return[Br(t["padding"===e?"paddingLeft":"marginLeft"]),Br(n),Br(r)]})(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}})(o),[o]);return x.createElement(jr,{styles:Yr(a,!t,o,n?"":"!important")})},Gr=!1;if("undefined"!=typeof window)try{var qr=Object.defineProperty({},"passive",{get(){return Gr=!0,!0}});window.addEventListener("test",qr,qr),window.removeEventListener("test",qr,qr)}catch(fh){Gr=!1}var Qr=!!Gr&&{passive:!1},Ur=(e,t)=>{if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!(e=>"TEXTAREA"===e.tagName)(e)&&"visible"===n[t])},Kr=(e,t)=>{var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),Xr(e,r)){var o=Zr(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Xr=(e,t)=>"v"===e?(e=>Ur(e,"overflowY"))(t):(e=>Ur(e,"overflowX"))(t),Zr=(e,t)=>{return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:(e=>[e.scrollLeft,e.scrollWidth,e.clientWidth])(t);var n},Jr=e=>"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0],eo=e=>[e.deltaX,e.deltaY],to=e=>e&&"current"in e?e.current:e,no=e=>"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n"),ro=0,oo=[];function ao(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const io=(zr.useMedium(e=>{var t=x.useRef([]),n=x.useRef([0,0]),r=x.useRef(),o=x.useState(ro++)[0],a=x.useState(Wr)[0],i=x.useRef(e);x.useEffect(()=>{i.current=e},[e]),x.useEffect(()=>{if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([e.lockRef.current],(e.shards||[]).map(to),!0).filter(Boolean);return t.forEach(e=>e.classList.add("allow-interactivity-".concat(o))),()=>{document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(e=>e.classList.remove("allow-interactivity-".concat(o)))}}},[e.inert,e.lockRef.current,e.shards]);var l=x.useCallback((e,t)=>{if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var o,a=Jr(e),l=n.current,s="deltaX"in e?e.deltaX:l[0]-a[0],c="deltaY"in e?e.deltaY:l[1]-a[1],d=e.target,u=Math.abs(s)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===u&&"range"===d.type)return!1;var p=window.getSelection(),f=p&&p.anchorNode;if(f&&(f===d||f.contains(d)))return!1;var m=Kr(u,d);if(!m)return!0;if(m?o=u:(o="v"===u?"h":"v",m=Kr(u,d)),!m)return!1;if(!r.current&&"changedTouches"in e&&(s||c)&&(r.current=o),!o)return!0;var h=r.current||o;return((e,t,n,r)=>{var o=((e,t)=>"h"===e&&"rtl"===t?-1:1)(e,window.getComputedStyle(t).direction),a=o*r,i=n.target,l=t.contains(i),s=!1,c=a>0,d=0,u=0;do{if(!i)break;var p=Zr(e,i),f=p[0],m=p[1]-p[2]-o*f;(f||m)&&Xr(e,i)&&(d+=m,u+=f);var h=i.parentNode;i=h&&h.nodeType===Node.DOCUMENT_FRAGMENT_NODE?h.host:h}while(!l&&i!==document.body||l&&(t.contains(i)||t===i));return(c&&Math.abs(d)<1||!c&&Math.abs(u)<1)&&(s=!0),s})(h,t,e,"h"===h?s:c)},[]),s=x.useCallback(e=>{var n=e;if(oo.length&&oo[oo.length-1]===a){var r="deltaY"in n?eo(n):Jr(n),o=t.current.filter(e=>{return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&(t=e.delta)[0]===(o=r)[0]&&t[1]===o[1];var t,o})[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var s=(i.current.shards||[]).map(to).filter(Boolean).filter(e=>e.contains(n.target));(s.length>0?l(n,s[0]):!i.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),c=x.useCallback((e,n,r,o)=>{var a={name:e,delta:n,target:r,should:o,shadowParent:ao(r)};t.current.push(a),setTimeout(()=>{t.current=t.current.filter(e=>e!==a)},1)},[]),d=x.useCallback(e=>{n.current=Jr(e),r.current=void 0},[]),u=x.useCallback(t=>{c(t.type,eo(t),t.target,l(t,e.lockRef.current))},[]),p=x.useCallback(t=>{c(t.type,Jr(t),t.target,l(t,e.lockRef.current))},[]);x.useEffect(()=>(oo.push(a),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:p}),document.addEventListener("wheel",s,Qr),document.addEventListener("touchmove",s,Qr),document.addEventListener("touchstart",d,Qr),()=>{oo=oo.filter(e=>e!==a),document.removeEventListener("wheel",s,Qr),document.removeEventListener("touchmove",s,Qr),document.removeEventListener("touchstart",d,Qr)}),[]);var f=e.removeScrollBar;return x.createElement(x.Fragment,null,e.inert?x.createElement(a,{styles:no(o)}):null,f?x.createElement(Vr,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}),Or);var lo=x.forwardRef((e,t)=>x.createElement(Ir,Mr({},e,{ref:t,sideCar:io})));lo.classNames=Ir.classNames;var so=/* @__PURE__ */new WeakMap,co=/* @__PURE__ */new WeakMap,uo={},po=0,fo=e=>e&&(e.host||fo(e.parentNode)),mo=(e,t,n)=>{void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=(e=>"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body)(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),((e,t,n,r)=>{var o=((e,t)=>t.map(t=>{if(e.contains(t))return t;var n=fo(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(e=>Boolean(e)))(t,Array.isArray(e)?e:[e]);uo[n]||(uo[n]=/* @__PURE__ */new WeakMap);var a=uo[n],i=[],l=/* @__PURE__ */new Set,s=new Set(o),c=e=>{e&&!l.has(e)&&(l.add(e),c(e.parentNode))};o.forEach(c);var d=e=>{e&&!s.has(e)&&Array.prototype.forEach.call(e.children,e=>{if(l.has(e))d(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,s=(so.get(e)||0)+1,c=(a.get(e)||0)+1;so.set(e,s),a.set(e,c),i.push(e),1===s&&o&&co.set(e,!0),1===c&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(u){console.error("aria-hidden: cannot operate on ",e,u)}})};return d(t),l.clear(),po++,()=>{i.forEach(e=>{var t=so.get(e)-1,o=a.get(e)-1;so.set(e,t),a.set(e,o),t||(co.has(e)||e.removeAttribute(r),co.delete(e)),o||e.removeAttribute(n)}),--po||(so=/* @__PURE__ */new WeakMap,so=/* @__PURE__ */new WeakMap,co=/* @__PURE__ */new WeakMap,uo={})}})(r,o,n,"aria-hidden")):()=>null},ho="Dialog",[go]=O(ho),[bo,vo]=go(ho),yo=t=>{const{__scopeDialog:n,children:r,open:o,defaultOpen:a,onOpenChange:i,modal:l=!0}=t,s=x.useRef(null),c=x.useRef(null),[d,u]=Q({prop:o,defaultProp:a??!1,onChange:i,caller:ho});/* @__PURE__ */
|
|
75
|
+
return e(U.div,{tabIndex:-1,...l,ref:f,onKeyDown:h})});function gr(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(e){return e.disabled||e.hidden||"INPUT"===e.tagName&&"hidden"===e.type?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function br(e,t){for(const n of e)if(!vr(n,{upTo:t}))return n}function vr(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function yr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&(e=>e instanceof HTMLInputElement&&"select"in e)(e)&&t&&e.select()}}hr.displayName="FocusScope";var wr=(()=>{let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=xr(e,t),e.unshift(t)},remove(t){e=xr(e,t),e[0]?.resume()}}})();function xr(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var Cr=x.forwardRef((t,n)=>{const{container:r,...o}=t,[a,i]=x.useState(!1);G(()=>i(!0),[]);const l=r||a&&globalThis?.document?.body;return l?P.createPortal(/* @__PURE__ */e(U.div,{...o,ref:n}),l):null});Cr.displayName="Portal";var kr=0;function Nr(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ar()),document.body.insertAdjacentElement("beforeend",e[1]??Ar()),kr++,()=>{1===kr&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),kr--}},[])}function Ar(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Mr=function(){return Mr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Mr.apply(this,arguments)};function Sr(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}"function"==typeof SuppressedError&&SuppressedError;var Rr="right-scroll-bar-position",Er="width-before-scroll-bar";function _r(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var Pr="undefined"!=typeof window?x.useLayoutEffect:x.useEffect,Dr=/* @__PURE__ */new WeakMap;function Lr(e){return e}var Or=e=>{var t=e.sideCar,n=Sr(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x.createElement(r,Mr({},n))};Or.isSideCarExport=!0;var zr=(e=>{void 0===e&&(e={});var t=((e,t)=>{void 0===t&&(t=Lr);var n=[],r=!1;return{read(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:null},useMedium(e){var o=t(e,r);return n.push(o),()=>{n=n.filter(e=>e!==o)}},assignSyncMedium(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:t=>e(t),filter:()=>n}},assignMedium(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var a=()=>{var n=t;t=[],n.forEach(e)},i=()=>Promise.resolve().then(a);i(),n={push(e){t.push(e),i()},filter:e=>(t=t.filter(e),n)}}}})();return t.options=Mr({async:!0,ssr:!1},e),t})(),Tr=()=>{},Ir=x.forwardRef((e,t)=>{var n=x.useRef(null),r=x.useState({onScrollCapture:Tr,onWheelCapture:Tr,onTouchMoveCapture:Tr}),o=r[0],a=r[1],i=e.forwardProps,l=e.children,s=e.className,c=e.removeScrollBar,d=e.enabled,u=e.shards,p=e.sideCar,f=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,b=e.as,v=void 0===b?"div":b,y=e.gapMode,w=Sr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=p,k=(e=>{var t,n,r=(t=t=>e.forEach(e=>_r(e,t)),(n=N(()=>({value:null,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}))[0]).callback=t,n.facade);return Pr(()=>{var t=Dr.get(r);if(t){var n=new Set(t),o=new Set(e),a=r.current;n.forEach(e=>{o.has(e)||_r(e,null)}),o.forEach(e=>{n.has(e)||_r(e,a)})}Dr.set(r,e)},[e]),r})([n,t]),A=Mr(Mr({},w),o);return x.createElement(x.Fragment,null,d&&x.createElement(C,{sideCar:zr,removeScrollBar:c,shards:u,noRelative:f,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),i?x.cloneElement(x.Children.only(l),Mr(Mr({},A),{ref:k})):x.createElement(v,Mr({},A,{className:s,ref:k}),l))});Ir.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ir.classNames={fullWidth:Er,zeroRight:Rr};var Wr=()=>{var e,t,n,r=(e=0,t=null,n={add(n){var r,o;0==e&&(t=(()=>{if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=(()=>{if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__})();return t&&e.setAttribute("nonce",t),e})())&&(o=n,(r=t).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),(e=>{(document.head||document.getElementsByTagName("head")[0]).appendChild(e)})(t)),e++},remove(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}},(e,t)=>{x.useEffect(()=>(n.add(e),()=>{n.remove()}),[e&&t])});return e=>(r(e.styles,e.dynamic),null)},Fr={left:0,top:0,right:0,gap:0},Br=e=>parseInt(e||"",10)||0,jr=Wr(),Hr="data-scroll-locked",Yr=(e,t,n,r)=>{var o=e.left,a=e.top,i=e.right,l=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(l,"px ").concat(r,";\n }\n body[").concat(Hr,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(l,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Rr," {\n right: ").concat(l,"px ").concat(r,";\n }\n \n .").concat(Er," {\n margin-right: ").concat(l,"px ").concat(r,";\n }\n \n .").concat(Rr," .").concat(Rr," {\n right: 0 ").concat(r,";\n }\n \n .").concat(Er," .").concat(Er," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(Hr,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},$r=()=>{var e=parseInt(document.body.getAttribute(Hr)||"0",10);return isFinite(e)?e:0},Vr=e=>{var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;x.useEffect(()=>(document.body.setAttribute(Hr,($r()+1).toString()),()=>{var e=$r()-1;e<=0?document.body.removeAttribute(Hr):document.body.setAttribute(Hr,e.toString())}),[]);var a=x.useMemo(()=>(e=>{if(void 0===e&&(e="margin"),"undefined"==typeof window)return Fr;var t=(e=>{var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingTop":"marginTop"],r=t["padding"===e?"paddingRight":"marginRight"];return[Br(t["padding"===e?"paddingLeft":"marginLeft"]),Br(n),Br(r)]})(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}})(o),[o]);return x.createElement(jr,{styles:Yr(a,!t,o,n?"":"!important")})},Gr=!1;if("undefined"!=typeof window)try{var qr=Object.defineProperty({},"passive",{get(){return Gr=!0,!0}});window.addEventListener("test",qr,qr),window.removeEventListener("test",qr,qr)}catch(hh){Gr=!1}var Qr=!!Gr&&{passive:!1},Ur=(e,t)=>{if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!(e=>"TEXTAREA"===e.tagName)(e)&&"visible"===n[t])},Kr=(e,t)=>{var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),Xr(e,r)){var o=Zr(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Xr=(e,t)=>"v"===e?(e=>Ur(e,"overflowY"))(t):(e=>Ur(e,"overflowX"))(t),Zr=(e,t)=>{return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:(e=>[e.scrollLeft,e.scrollWidth,e.clientWidth])(t);var n},Jr=e=>"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0],eo=e=>[e.deltaX,e.deltaY],to=e=>e&&"current"in e?e.current:e,no=e=>"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n"),ro=0,oo=[];function ao(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const io=(zr.useMedium(e=>{var t=x.useRef([]),n=x.useRef([0,0]),r=x.useRef(),o=x.useState(ro++)[0],a=x.useState(Wr)[0],i=x.useRef(e);x.useEffect(()=>{i.current=e},[e]),x.useEffect(()=>{if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([e.lockRef.current],(e.shards||[]).map(to),!0).filter(Boolean);return t.forEach(e=>e.classList.add("allow-interactivity-".concat(o))),()=>{document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(e=>e.classList.remove("allow-interactivity-".concat(o)))}}},[e.inert,e.lockRef.current,e.shards]);var l=x.useCallback((e,t)=>{if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var o,a=Jr(e),l=n.current,s="deltaX"in e?e.deltaX:l[0]-a[0],c="deltaY"in e?e.deltaY:l[1]-a[1],d=e.target,u=Math.abs(s)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===u&&"range"===d.type)return!1;var p=window.getSelection(),f=p&&p.anchorNode;if(f&&(f===d||f.contains(d)))return!1;var m=Kr(u,d);if(!m)return!0;if(m?o=u:(o="v"===u?"h":"v",m=Kr(u,d)),!m)return!1;if(!r.current&&"changedTouches"in e&&(s||c)&&(r.current=o),!o)return!0;var h=r.current||o;return((e,t,n,r)=>{var o=((e,t)=>"h"===e&&"rtl"===t?-1:1)(e,window.getComputedStyle(t).direction),a=o*r,i=n.target,l=t.contains(i),s=!1,c=a>0,d=0,u=0;do{if(!i)break;var p=Zr(e,i),f=p[0],m=p[1]-p[2]-o*f;(f||m)&&Xr(e,i)&&(d+=m,u+=f);var h=i.parentNode;i=h&&h.nodeType===Node.DOCUMENT_FRAGMENT_NODE?h.host:h}while(!l&&i!==document.body||l&&(t.contains(i)||t===i));return(c&&Math.abs(d)<1||!c&&Math.abs(u)<1)&&(s=!0),s})(h,t,e,"h"===h?s:c)},[]),s=x.useCallback(e=>{var n=e;if(oo.length&&oo[oo.length-1]===a){var r="deltaY"in n?eo(n):Jr(n),o=t.current.filter(e=>{return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&(t=e.delta)[0]===(o=r)[0]&&t[1]===o[1];var t,o})[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var s=(i.current.shards||[]).map(to).filter(Boolean).filter(e=>e.contains(n.target));(s.length>0?l(n,s[0]):!i.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),c=x.useCallback((e,n,r,o)=>{var a={name:e,delta:n,target:r,should:o,shadowParent:ao(r)};t.current.push(a),setTimeout(()=>{t.current=t.current.filter(e=>e!==a)},1)},[]),d=x.useCallback(e=>{n.current=Jr(e),r.current=void 0},[]),u=x.useCallback(t=>{c(t.type,eo(t),t.target,l(t,e.lockRef.current))},[]),p=x.useCallback(t=>{c(t.type,Jr(t),t.target,l(t,e.lockRef.current))},[]);x.useEffect(()=>(oo.push(a),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:p}),document.addEventListener("wheel",s,Qr),document.addEventListener("touchmove",s,Qr),document.addEventListener("touchstart",d,Qr),()=>{oo=oo.filter(e=>e!==a),document.removeEventListener("wheel",s,Qr),document.removeEventListener("touchmove",s,Qr),document.removeEventListener("touchstart",d,Qr)}),[]);var f=e.removeScrollBar;return x.createElement(x.Fragment,null,e.inert?x.createElement(a,{styles:no(o)}):null,f?x.createElement(Vr,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}),Or);var lo=x.forwardRef((e,t)=>x.createElement(Ir,Mr({},e,{ref:t,sideCar:io})));lo.classNames=Ir.classNames;var so=/* @__PURE__ */new WeakMap,co=/* @__PURE__ */new WeakMap,uo={},po=0,fo=e=>e&&(e.host||fo(e.parentNode)),mo=(e,t,n)=>{void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=(e=>"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body)(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),((e,t,n,r)=>{var o=((e,t)=>t.map(t=>{if(e.contains(t))return t;var n=fo(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(e=>Boolean(e)))(t,Array.isArray(e)?e:[e]);uo[n]||(uo[n]=/* @__PURE__ */new WeakMap);var a=uo[n],i=[],l=/* @__PURE__ */new Set,s=new Set(o),c=e=>{e&&!l.has(e)&&(l.add(e),c(e.parentNode))};o.forEach(c);var d=e=>{e&&!s.has(e)&&Array.prototype.forEach.call(e.children,e=>{if(l.has(e))d(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,s=(so.get(e)||0)+1,c=(a.get(e)||0)+1;so.set(e,s),a.set(e,c),i.push(e),1===s&&o&&co.set(e,!0),1===c&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(u){console.error("aria-hidden: cannot operate on ",e,u)}})};return d(t),l.clear(),po++,()=>{i.forEach(e=>{var t=so.get(e)-1,o=a.get(e)-1;so.set(e,t),a.set(e,o),t||(co.has(e)||e.removeAttribute(r),co.delete(e)),o||e.removeAttribute(n)}),--po||(so=/* @__PURE__ */new WeakMap,so=/* @__PURE__ */new WeakMap,co=/* @__PURE__ */new WeakMap,uo={})}})(r,o,n,"aria-hidden")):()=>null},ho="Dialog",[go]=O(ho),[bo,vo]=go(ho),yo=t=>{const{__scopeDialog:n,children:r,open:o,defaultOpen:a,onOpenChange:i,modal:l=!0}=t,s=x.useRef(null),c=x.useRef(null),[d,u]=Q({prop:o,defaultProp:a??!1,onChange:i,caller:ho});/* @__PURE__ */
|
|
76
76
|
return e(bo,{scope:n,triggerRef:s,contentRef:c,contentId:ee(),titleId:ee(),descriptionId:ee(),open:d,onOpenChange:u,onOpenToggle:x.useCallback(()=>u(e=>!e),[u]),modal:l,children:r})};yo.displayName=ho;var wo="DialogTrigger",xo=x.forwardRef((t,n)=>{const{__scopeDialog:r,...o}=t,a=vo(wo,r),i=W(n,a.triggerRef);/* @__PURE__ */
|
|
77
77
|
return e(U.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":jo(a.open),...o,ref:i,onClick:V(t.onClick,a.onOpenToggle)})});xo.displayName=wo;var Co="DialogPortal",[ko,No]=go(Co,{forceMount:void 0}),Ao=t=>{const{__scopeDialog:n,forceMount:r,children:o,container:a}=t,i=vo(Co,n);/* @__PURE__ */
|
|
78
78
|
return e(ko,{scope:n,forceMount:r,children:x.Children.map(o,t=>/* @__PURE__ */e(K,{present:r||i.open,children:/* @__PURE__ */e(Cr,{asChild:!0,container:a,children:t})}))})};Ao.displayName=Co;var Mo="DialogOverlay",So=x.forwardRef((t,n)=>{const r=No(Mo,t.__scopeDialog),{forceMount:o=r.forceMount,...a}=t,i=vo(Mo,t.__scopeDialog);return i.modal?/* @__PURE__ */e(K,{present:o||i.open,children:/* @__PURE__ */e(Eo,{...a,ref:n})}):null});So.displayName=Mo;var Ro=/* @__PURE__ */F("DialogOverlay.RemoveScroll"),Eo=x.forwardRef((t,n)=>{const{__scopeDialog:r,...o}=t,a=vo(Mo,r);
|
|
@@ -91,243 +91,243 @@ return e(r.Provider,{value:a,children:n})};return o.displayName=t+"Provider",[o,
|
|
|
91
91
|
return e(Ko,{className:fn("fixed inset-0 z-50 bg-black/45","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...n})}function ia({className:t,children:r,inset:o=8,showHandle:a=!0,style:i,...l}){/* @__PURE__ */
|
|
92
92
|
return n(ra,{children:[
|
|
93
93
|
/* @__PURE__ */e(aa,{}),
|
|
94
|
-
/* @__PURE__ */n(Xo,{className:fn("fixed z-50 bg-white","rounded-
|
|
94
|
+
/* @__PURE__ */n(Xo,{className:fn("fixed z-50 bg-white","rounded-4 shadow-[0_-8px_32px_rgba(0,0,0,0.14)]","px-[18px] pt-2.5 pb-4","max-h-[85dvh] overflow-y-auto","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","duration-300",t),style:{left:o,right:o,bottom:o,...i},...l,children:[a&&/* @__PURE__ */e("div",{"aria-hidden":"true",className:"mx-auto mt-1 mb-3 h-1 w-9 rounded-full bg-gray-300"}),r]})]})}function la({className:t,...n}){/* @__PURE__ */
|
|
95
95
|
return e("div",{className:fn("mb-2.5",t),...n})}function sa({className:t,...n}){/* @__PURE__ */
|
|
96
96
|
return e("div",{className:fn("mt-1.5 flex gap-2",t),...n})}function ca({className:t,children:n,...r}){/* @__PURE__ */
|
|
97
97
|
return e(Zo,{asChild:!0,...r,children:/* @__PURE__ */e(zn,{size:"body2",weight:"extrabold",className:fn("block text-black tracking-[-0.3px]",t),children:n})})}function da({className:t,children:n,...r}){/* @__PURE__ */
|
|
98
98
|
return e(Jo,{asChild:!0,...r,children:/* @__PURE__ */e(zn,{size:"caption2",weight:"regular",className:fn("text-gray-600 mt-1",t),children:n})})}const ua=6048e5,pa=/* @__PURE__ */Symbol.for("constructDateFrom");function fa(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&pa in e?e[pa](t):e instanceof Date?new e.constructor(t):new Date(t)}function ma(e,t){return fa(t||e,e)}function ha(e,t,n){const r=ma(e,n?.in);return isNaN(t)?fa(n?.in||e,NaN):t?(r.setDate(r.getDate()+t),r):r}function ga(e,t,n){const r=ma(e,n?.in);if(isNaN(t))return fa(n?.in||e,NaN);if(!t)return r;const o=r.getDate(),a=fa(n?.in||e,r.getTime());return a.setMonth(r.getMonth()+t+1,0),o>=a.getDate()?a:(r.setFullYear(a.getFullYear(),a.getMonth(),o),r)}let ba={};function va(){return ba}function ya(e,t){const n=va(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=ma(e,t?.in),a=o.getDay(),i=(a<r?7:0)+a-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function wa(e,t){return ya(e,{...t,weekStartsOn:1})}function xa(e,t){const n=ma(e,t?.in),r=n.getFullYear(),o=fa(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=wa(o),i=fa(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const l=wa(i);return n.getTime()>=a.getTime()?r+1:n.getTime()>=l.getTime()?r:r-1}function Ca(e){const t=ma(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function ka(e,...t){const n=fa.bind(null,e||t.find(e=>"object"==typeof e));return t.map(n)}function Na(e,t){const n=ma(e,t?.in);return n.setHours(0,0,0,0),n}function Aa(e,t,n){const[r,o]=ka(n?.in,e,t),a=Na(r),i=Na(o),l=+a-Ca(a),s=+i-Ca(i);return Math.round((l-s)/864e5)}function Ma(e,t,n){return ha(e,7*t,n)}function Sa(e,t,n){return ga(e,12*t,n)}function Ra(e,t,n){const[r,o]=ka(n?.in,e,t);return+Na(r)===+Na(o)}function Ea(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function _a(e,t,n){const[r,o]=ka(n?.in,e,t);return 12*(r.getFullYear()-o.getFullYear())+(r.getMonth()-o.getMonth())}function Pa(e,t){const n=ma(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function Da(e,t){const n=ma(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function La(e,t){const n=ma(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Oa(e,t){const n=va(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=ma(e,t?.in),a=o.getDay(),i=6+(a<r?-7:0)-(a-r);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}function za(e,t){return Oa(e,{...t,weekStartsOn:1})}const Ta={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function Ia(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Wa={date:Ia({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Ia({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Ia({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Fa={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Ba(e){return(t,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,o=n?.width?String(n.width):t;r=e.formattingValues[o]||e.formattingValues[t]}else{const t=e.defaultWidth,o=n?.width?String(n.width):e.defaultWidth;r=e.values[o]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}const ja={ordinalNumber(e,t){const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Ba({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Ba({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback(e){return e-1}}),month:Ba({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Ba({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Ba({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function Ha(e){return(t,n={})=>{const r=n.width,o=t.match(r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth]);if(!o)return null;const a=o[0],i=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(i)?((e,t)=>{for(let n=0;n<e.length;n++)if(t(e[n]))return n})(i,e=>e.test(a)):((e,t)=>{for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n})(i,e=>e.test(a));let s;return s=e.valueCallback?e.valueCallback(l):l,s=n.valueCallback?n.valueCallback(s):s,{value:s,rest:t.slice(a.length)}}}function Ya(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],a=t.match(e.parsePattern);if(!a)return null;let i=e.valueCallback?e.valueCallback(a[0]):a[0];return i=n.valueCallback?n.valueCallback(i):i,{value:i,rest:t.slice(o.length)}}}const $a={ordinalNumber:Ya({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback(e){return parseInt(e,10)}}),era:Ha({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Ha({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback(e){return e+1}}),month:Ha({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Ha({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Ha({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},Va={code:"en-US",formatDistance(e,t,n){let r;const o=Ta[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:Wa,formatRelative(e,t,n,r){return Fa[e]},localize:ja,match:$a,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Ga(e,t){const n=ma(e,t?.in),r=+wa(n)-+(e=>{const t=xa(e,void 0),n=fa(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),wa(n)})(n);return Math.round(r/ua)+1}function qa(e,t){const n=ma(e,t?.in),r=n.getFullYear(),o=va(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,i=fa(t?.in||e,0);i.setFullYear(r+1,0,a),i.setHours(0,0,0,0);const l=ya(i,t),s=fa(t?.in||e,0);s.setFullYear(r,0,a),s.setHours(0,0,0,0);const c=ya(s,t);return+n>=+l?r+1:+n>=+c?r:r-1}function Qa(e,t){const n=ma(e,t?.in),r=+ya(n,t)-+((e,t)=>{const n=va(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=qa(e,t),a=fa(t?.in||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),ya(a,t)})(n,t);return Math.round(r/ua)+1}function Ua(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const Ka={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ua("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):Ua(n+1,2)},d:(e,t)=>Ua(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>Ua(e.getHours()%12||12,t.length),H:(e,t)=>Ua(e.getHours(),t.length),m:(e,t)=>Ua(e.getMinutes(),t.length),s:(e,t)=>Ua(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return Ua(Math.trunc(r*Math.pow(10,n-3)),t.length)}},Xa={G(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y(e,t,n){if("yo"===t){const t=e.getFullYear();return n.ordinalNumber(t>0?t:1-t,{unit:"year"})}return Ka.y(e,t)},Y(e,t,n,r){const o=qa(e,r),a=o>0?o:1-o;return"YY"===t?Ua(a%100,2):"Yo"===t?n.ordinalNumber(a,{unit:"year"}):Ua(a,t.length)},R(e,t){return Ua(xa(e),t.length)},u(e,t){return Ua(e.getFullYear(),t.length)},Q(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Ua(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Ua(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Ka.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Ua(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w(e,t,n,r){const o=Qa(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):Ua(o,t.length)},I(e,t,n){const r=Ga(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):Ua(r,t.length)},d(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):Ka.d(e,t)},D(e,t,n){const r=(e=>{const t=ma(e,void 0);return Aa(t,La(t))+1})(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):Ua(r,t.length)},E(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return Ua(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return Ua(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i(e,t,n){const r=e.getDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return Ua(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b(e,t,n){const r=e.getHours();let o;switch(o=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B(e,t,n){const r=e.getHours();let o;switch(o=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return Ka.h(e,t)},H(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):Ka.H(e,t)},K(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):Ua(r,t.length)},k(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):Ua(r,t.length)},m(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ka.m(e,t)},s(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Ka.s(e,t)},S(e,t){return Ka.S(e,t)},X(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return Ja(r);case"XXXX":case"XX":return ei(r);default:return ei(r,":")}},x(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Ja(r);case"xxxx":case"xx":return ei(r);default:return ei(r,":")}},O(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Za(r,":");default:return"GMT"+ei(r,":")}},z(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Za(r,":");default:return"GMT"+ei(r,":")}},t(e,t,n){return Ua(Math.trunc(+e/1e3),t.length)},T(e,t,n){return Ua(+e,t.length)}};function Za(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),a=r%60;return 0===a?n+String(o):n+String(o)+t+Ua(a,2)}function Ja(e,t){return e%60==0?(e>0?"-":"+")+Ua(Math.abs(e)/60,2):ei(e,t)}function ei(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+Ua(Math.trunc(r/60),2)+t+Ua(r%60,2)}const ti=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},ni=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},ri={p:ni,P(e,t){const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return ti(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;default:a=t.dateTime({width:"full"})}return a.replace("{{date}}",ti(r,t)).replace("{{time}}",ni(o,t))}},oi=/^D+$/,ai=/^Y+$/,ii=["D","DD","YY","YYYY"],li=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,si=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ci=/^'([^]*?)'?$/,di=/''/g,ui=/[a-zA-Z]/;function pi(e,t,n){const r=va(),o=n?.locale??r.locale??Va,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,l=ma(e,n?.in);if(!(e=>!(!Ea(e)&&"number"!=typeof e||isNaN(+ma(e))))(l))throw new RangeError("Invalid time value");let s=t.match(si).map(e=>{const t=e[0];return"p"===t||"P"===t?(0,ri[t])(e,o.formatLong):e}).join("").match(li).map(e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:fi(e)};if(Xa[t])return{isToken:!0,value:e};if(t.match(ui))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});o.localize.preprocessor&&(s=o.localize.preprocessor(l,s));const c={firstWeekContainsDate:a,weekStartsOn:i,locale:o};return s.map(r=>{if(!r.isToken)return r.value;const a=r.value;return(!n?.useAdditionalWeekYearTokens&&(e=>ai.test(e))(a)||!n?.useAdditionalDayOfYearTokens&&(e=>oi.test(e))(a))&&((e,t,n)=>{const r=((e,t,n)=>{const r="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`})(e,t,n);if(console.warn(r),ii.includes(e))throw new RangeError(r)})(a,t,String(e)),(0,Xa[a[0]])(l,a,o.localize,c)}).join("")}function fi(e){const t=e.match(ci);return t?t[1].replace(di,"'"):e}function mi(e,t){return+ma(e)>+ma(t)}function hi(e,t){return+ma(e)<+ma(t)}function gi(e,t,n){const[r,o]=ka(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function bi(e,t,n){return ha(e,-t,n)}function vi(e,t,n){const r=ma(e,n?.in),o=r.getFullYear(),a=r.getDate(),i=fa(e,0);i.setFullYear(o,t,15),i.setHours(0,0,0,0);const l=(e=>{const t=ma(e,void 0),n=t.getFullYear(),r=t.getMonth(),o=fa(t,0);return o.setFullYear(n,r+1,0),o.setHours(0,0,0,0),o.getDate()})(i);return r.setMonth(t,Math.min(a,l)),r}function yi(e,t,n){const r=ma(e,n?.in);return isNaN(+r)?fa(e,NaN):(r.setFullYear(t),r)}const wi={lessThanXSeconds:{one:"1초 미만",other:"{{count}}초 미만"},xSeconds:{one:"1초",other:"{{count}}초"},halfAMinute:"30초",lessThanXMinutes:{one:"1분 미만",other:"{{count}}분 미만"},xMinutes:{one:"1분",other:"{{count}}분"},aboutXHours:{one:"약 1시간",other:"약 {{count}}시간"},xHours:{one:"1시간",other:"{{count}}시간"},xDays:{one:"1일",other:"{{count}}일"},aboutXWeeks:{one:"약 1주",other:"약 {{count}}주"},xWeeks:{one:"1주",other:"{{count}}주"},aboutXMonths:{one:"약 1개월",other:"약 {{count}}개월"},xMonths:{one:"1개월",other:"{{count}}개월"},aboutXYears:{one:"약 1년",other:"약 {{count}}년"},xYears:{one:"1년",other:"{{count}}년"},overXYears:{one:"1년 이상",other:"{{count}}년 이상"},almostXYears:{one:"거의 1년",other:"거의 {{count}}년"}},xi={date:Ia({formats:{full:"y년 M월 d일 EEEE",long:"y년 M월 d일",medium:"y.MM.dd",short:"y.MM.dd"},defaultWidth:"full"}),time:Ia({formats:{full:"a H시 mm분 ss초 zzzz",long:"a H:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:Ia({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},Ci={lastWeek:"'지난' eeee p",yesterday:"'어제' p",today:"'오늘' p",tomorrow:"'내일' p",nextWeek:"'다음' eeee p",other:"P"},ki={ordinalNumber(e,t){const n=Number(e);switch(String(t?.unit)){case"minute":case"second":return String(n);case"date":return n+"일";default:return n+"번째"}},era:Ba({values:{narrow:["BC","AD"],abbreviated:["BC","AD"],wide:["기원전","서기"]},defaultWidth:"wide"}),quarter:Ba({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1분기","2분기","3분기","4분기"]},defaultWidth:"wide",argumentCallback(e){return e-1}}),month:Ba({values:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],abbreviated:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],wide:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]},defaultWidth:"wide"}),day:Ba({values:{narrow:["일","월","화","수","목","금","토"],short:["일","월","화","수","목","금","토"],abbreviated:["일","월","화","수","목","금","토"],wide:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"]},defaultWidth:"wide"}),dayPeriod:Ba({values:{narrow:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},abbreviated:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},wide:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"}},defaultWidth:"wide",formattingValues:{narrow:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},abbreviated:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},wide:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"}},defaultFormattingWidth:"wide"})},Ni={ordinalNumber:Ya({matchPattern:/^(\d+)(일|번째)?/i,parsePattern:/\d+/i,valueCallback(e){return parseInt(e,10)}}),era:Ha({matchPatterns:{narrow:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(기원전|서기)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^(bc|기원전)/i,/^(ad|서기)/i]},defaultParseWidth:"any"}),quarter:Ha({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234]사?분기/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback(e){return e+1}}),month:Ha({matchPatterns:{narrow:/^(1[012]|[123456789])/,abbreviated:/^(1[012]|[123456789])월/i,wide:/^(1[012]|[123456789])월/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^1월?$/,/^2/,/^3/,/^4/,/^5/,/^6/,/^7/,/^8/,/^9/,/^10/,/^11/,/^12/]},defaultParseWidth:"any"}),day:Ha({matchPatterns:{narrow:/^[일월화수목금토]/,short:/^[일월화수목금토]/,abbreviated:/^[일월화수목금토]/,wide:/^[일월화수목금토]요일/},defaultMatchWidth:"wide",parsePatterns:{any:[/^일/,/^월/,/^화/,/^수/,/^목/,/^금/,/^토/]},defaultParseWidth:"any"}),dayPeriod:Ha({matchPatterns:{any:/^(am|pm|오전|오후|자정|정오|아침|저녁|밤)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^(am|오전)/i,pm:/^(pm|오후)/i,midnight:/^자정/i,noon:/^정오/i,morning:/^아침/i,afternoon:/^오후/i,evening:/^저녁/i,night:/^밤/i}},defaultParseWidth:"any"})},Ai={code:"ko",formatDistance(e,t,n){let r;const o=wi[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?r+" 후":r+" 전":r},formatLong:xi,formatRelative(e,t,n,r){return Ci[e]},localize:ki,match:Ni,options:{weekStartsOn:0,firstWeekContainsDate:1}};var Mi=function(){return Mi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Mi.apply(this,arguments)};function Si(e,t,n){for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function Ri(e){return"multiple"===e.mode}function Ei(e){return"range"===e.mode}function _i(e){return"single"===e.mode}"function"==typeof SuppressedError&&SuppressedError;var Pi={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rdp-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"},Di=/* @__PURE__ */Object.freeze({__proto__:null,formatCaption(e,t){return pi(e,"LLLL y",t)},formatDay(e,t){return pi(e,"d",t)},formatMonthCaption(e,t){return pi(e,"LLLL",t)},formatWeekNumber(e){return"".concat(e)},formatWeekdayName(e,t){return pi(e,"cccccc",t)},formatYearCaption(e,t){return pi(e,"yyyy",t)}}),Li=/* @__PURE__ */Object.freeze({__proto__:null,labelDay(e,t,n){return pi(e,"do MMMM (EEEE)",n)},labelMonthDropdown(){return"Month: "},labelNext(){return"Go to next month"},labelPrevious(){return"Go to previous month"},labelWeekNumber(e){return"Week n. ".concat(e)},labelWeekday(e,t){return pi(e,"cccc",t)},labelYearDropdown(){return"Year: "}}),Oi=M(void 0);function zi(t){var n,r,o=t.initialProps,a={captionLayout:"buttons",classNames:Pi,formatters:Di,labels:Li,locale:Va,modifiersClassNames:{},modifiers:{},numberOfMonths:1,styles:{},today:/* @__PURE__ */new Date,mode:"default"},i=(e=>{var t=e.fromYear,n=e.toYear,r=e.fromMonth,o=e.toMonth,a=e.fromDate,i=e.toDate;return r?a=Da(r):t&&(a=new Date(t,0,1)),o?i=Pa(o):n&&(i=new Date(n,11,31)),{fromDate:a?Na(a):void 0,toDate:i?Na(i):void 0}})(o),l=i.fromDate,s=i.toDate,c=null!==(n=o.captionLayout)&&void 0!==n?n:a.captionLayout;"buttons"===c||l&&s||(c="buttons"),(_i(o)||Ri(o)||Ei(o))&&(r=o.onSelect);var d=Mi(Mi(Mi({},a),o),{captionLayout:c,classNames:Mi(Mi({},a.classNames),o.classNames),components:Mi({},o.components),formatters:Mi(Mi({},a.formatters),o.formatters),fromDate:l,labels:Mi(Mi({},a.labels),o.labels),mode:o.mode||a.mode,modifiers:Mi(Mi({},a.modifiers),o.modifiers),modifiersClassNames:Mi(Mi({},a.modifiersClassNames),o.modifiersClassNames),onSelect:r,styles:Mi(Mi({},a.styles),o.styles),toDate:s});return e(Oi.Provider,{value:d,children:t.children})}function Ti(){var e=S(Oi);if(!e)throw new Error("useDayPicker must be used within a DayPickerProvider.");return e}function Ii(t){var n=Ti();return e("div",{className:n.classNames.caption_label,style:n.styles.caption_label,"aria-live":"polite",role:"presentation",id:t.id,children:(0,n.formatters.formatCaption)(t.displayMonth,{locale:n.locale})})}function Wi(t){return e("svg",Mi({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},t,{children:e("path",{d:"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z",fill:"currentColor",fillRule:"nonzero"})}))}function Fi(t){var r,o,a=t.onChange,i=t.value,l=t.children,s=t.caption,c=t.className,d=t.style,u=Ti(),p=null!==(o=null===(r=u.components)||void 0===r?void 0:r.IconDropdown)&&void 0!==o?o:Wi;return n("div",{className:c,style:d,children:[e("span",{className:u.classNames.vhidden,children:t["aria-label"]}),e("select",{name:t.name,"aria-label":t["aria-label"],className:u.classNames.dropdown,style:u.styles.dropdown,value:i,onChange:a,children:l}),n("div",{className:u.classNames.caption_label,style:u.styles.caption_label,"aria-hidden":"true",children:[s,e(p,{className:u.classNames.dropdown_icon,style:u.styles.dropdown_icon})]})]})}function Bi(n){var r,o=Ti(),a=o.fromDate,i=o.toDate,l=o.styles,s=o.locale,c=o.formatters.formatMonthCaption,d=o.classNames,u=o.components,p=o.labels.labelMonthDropdown;if(!a)return e(t,{});if(!i)return e(t,{});var f=[];if(((e,t)=>{const[n,r]=ka(void 0,e,t);return n.getFullYear()===r.getFullYear()})(a,i))for(var m=Da(a),h=a.getMonth();h<=i.getMonth();h++)f.push(vi(m,h));else for(m=Da(/* @__PURE__ */new Date),h=0;h<=11;h++)f.push(vi(m,h));var g=null!==(r=null==u?void 0:u.Dropdown)&&void 0!==r?r:Fi;return e(g,{name:"months","aria-label":p(),className:d.dropdown_month,style:l.dropdown_month,onChange(e){var t=Number(e.target.value),r=vi(Da(n.displayMonth),t);n.onChange(r)},value:n.displayMonth.getMonth(),caption:c(n.displayMonth,{locale:s}),children:f.map(t=>e("option",{value:t.getMonth(),children:c(t,{locale:s})},t.getMonth()))})}function ji(n){var r,o=n.displayMonth,a=Ti(),i=a.fromDate,l=a.toDate,s=a.locale,c=a.styles,d=a.classNames,u=a.components,p=a.formatters.formatYearCaption,f=a.labels.labelYearDropdown,m=[];if(!i)return e(t,{});if(!l)return e(t,{});for(var h=i.getFullYear(),g=l.getFullYear(),b=h;b<=g;b++)m.push(yi(La(/* @__PURE__ */new Date),b));var v=null!==(r=null==u?void 0:u.Dropdown)&&void 0!==r?r:Fi;return e(v,{name:"years","aria-label":f(),className:d.dropdown_year,style:c.dropdown_year,onChange(e){var t=yi(Da(o),Number(e.target.value));n.onChange(t)},value:o.getFullYear(),caption:p(o,{locale:s}),children:m.map(t=>e("option",{value:t.getFullYear(),children:p(t,{locale:s})},t.getFullYear()))})}var Hi=M(void 0);function Yi(t){var n=Ti(),r=(()=>{var e=Ti(),t=(e=>{var t=e.month||e.defaultMonth||e.today||/* @__PURE__ */new Date,n=e.toDate,r=e.fromDate,o=e.numberOfMonths,a=void 0===o?1:o;return n&&_a(n,t)<0&&(t=ga(n,-1*(a-1))),r&&_a(t,r)<0&&(t=r),Da(t)})(e),n=((e,t)=>{var n=N(e);return[void 0===t?n[0]:t,n[1]]})(t,e.month),r=n[1];return[n[0],t=>{var n;if(!e.disableNavigation){var o=Da(t);r(o),null===(n=e.onMonthChange)||void 0===n||n.call(e,o)}}]})(),o=r[0],a=r[1],i=((e,t)=>{for(var n=t.reverseMonths,r=t.numberOfMonths,o=Da(e),a=_a(Da(ga(o,r)),o),i=[],l=0;l<a;l++){var s=ga(o,l);i.push(s)}return n&&(i=i.reverse()),i})(o,n),l=((e,t)=>{if(!t.disableNavigation){var n=t.toDate,r=t.numberOfMonths,o=void 0===r?1:r,a=t.pagedNavigation?o:1,i=Da(e);if(!n)return ga(i,a);if(!(_a(n,e)<o))return ga(i,a)}})(o,n),s=((e,t)=>{if(!t.disableNavigation){var n=t.fromDate,r=t.numberOfMonths,o=t.pagedNavigation?void 0===r?1:r:1,a=Da(e);if(!n)return ga(a,-o);if(!(_a(a,n)<=0))return ga(a,-o)}})(o,n),c=e=>i.some(t=>gi(e,t));return e(Hi.Provider,{value:{currentMonth:o,displayMonths:i,goToMonth:a,goToDate(e,t){c(e)||(t&&hi(e,t)?a(ga(e,1+-1*n.numberOfMonths)):a(e))},previousMonth:s,nextMonth:l,isDateDisplayed:c},children:t.children})}function $i(){var e=S(Hi);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}function Vi(t){var r,o=Ti(),a=o.classNames,i=o.styles,l=o.components,s=$i().goToMonth,c=e=>{s(ga(e,t.displayIndex?-t.displayIndex:0))},d=null!==(r=null==l?void 0:l.CaptionLabel)&&void 0!==r?r:Ii,u=e(d,{id:t.id,displayMonth:t.displayMonth});return n("div",{className:a.caption_dropdowns,style:i.caption_dropdowns,children:[e("div",{className:a.vhidden,children:u}),e(Bi,{onChange:c,displayMonth:t.displayMonth}),e(ji,{onChange:c,displayMonth:t.displayMonth})]})}function Gi(t){return e("svg",Mi({width:"16px",height:"16px",viewBox:"0 0 120 120"},t,{children:e("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"})}))}function qi(t){return e("svg",Mi({width:"16px",height:"16px",viewBox:"0 0 120 120"},t,{children:e("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"})}))}var Qi=E((t,n)=>{var r=Ti(),o=r.classNames,a=r.styles,i=[o.button_reset,o.button];t.className&&i.push(t.className);var l=i.join(" "),s=Mi(Mi({},a.button_reset),a.button);return t.style&&Object.assign(s,t.style),e("button",Mi({},t,{ref:n,type:"button",className:l,style:s}))});function Ui(r){var o,a,i=Ti(),l=i.dir,s=i.locale,c=i.classNames,d=i.styles,u=i.labels,p=u.labelPrevious,f=u.labelNext,m=i.components;if(!r.nextMonth&&!r.previousMonth)return e(t,{});var h=p(r.previousMonth,{locale:s}),g=[c.nav_button,c.nav_button_previous].join(" "),b=f(r.nextMonth,{locale:s}),v=[c.nav_button,c.nav_button_next].join(" "),y=null!==(o=null==m?void 0:m.IconRight)&&void 0!==o?o:qi,w=null!==(a=null==m?void 0:m.IconLeft)&&void 0!==a?a:Gi;return n("div",{className:c.nav,style:d.nav,children:[!r.hidePrevious&&e(Qi,{name:"previous-month","aria-label":h,className:g,style:d.nav_button_previous,disabled:!r.previousMonth,onClick:r.onPreviousClick,children:e("rtl"===l?y:w,{className:c.nav_icon,style:d.nav_icon})}),!r.hideNext&&e(Qi,{name:"next-month","aria-label":b,className:v,style:d.nav_button_next,disabled:!r.nextMonth,onClick:r.onNextClick,children:e("rtl"===l?w:y,{className:c.nav_icon,style:d.nav_icon})})]})}function Ki(t){var n=Ti().numberOfMonths,r=$i(),o=r.previousMonth,a=r.nextMonth,i=r.goToMonth,l=r.displayMonths,s=l.findIndex(e=>gi(t.displayMonth,e)),c=0===s,d=s===l.length-1;return e(Ui,{displayMonth:t.displayMonth,hideNext:n>1&&(c||!d),hidePrevious:n>1&&(d||!c),nextMonth:a,previousMonth:o,onPreviousClick(){o&&i(o)},onNextClick(){a&&i(a)}})}function Xi(r){var o,a,i=Ti(),l=i.classNames,s=i.styles,c=i.captionLayout,d=i.components,u=null!==(o=null==d?void 0:d.CaptionLabel)&&void 0!==o?o:Ii;return a=i.disableNavigation?e(u,{id:r.id,displayMonth:r.displayMonth}):"dropdown"===c?e(Vi,{displayMonth:r.displayMonth,id:r.id}):n(t,"dropdown-buttons"===c?{children:[e(Vi,{displayMonth:r.displayMonth,displayIndex:r.displayIndex,id:r.id}),e(Ki,{displayMonth:r.displayMonth,displayIndex:r.displayIndex,id:r.id})]}:{children:[e(u,{id:r.id,displayMonth:r.displayMonth,displayIndex:r.displayIndex}),e(Ki,{displayMonth:r.displayMonth,id:r.id})]}),e("div",{className:l.caption,style:s.caption,children:a})}function Zi(n){var r=Ti(),o=r.footer;return o?e("tfoot",{className:r.classNames.tfoot,style:r.styles.tfoot,children:e("tr",{children:e("td",{colSpan:8,children:o})})}):e(t,{})}function Ji(){var t=Ti(),r=t.classNames,o=t.styles,a=t.showWeekNumber,i=t.locale,l=t.formatters.formatWeekdayName,s=t.labels.labelWeekday,c=((e,t,n)=>{for(var r=n?wa(/* @__PURE__ */new Date):ya(/* @__PURE__ */new Date,{locale:e,weekStartsOn:t}),o=[],a=0;a<7;a++){var i=ha(r,a);o.push(i)}return o})(i,t.weekStartsOn,t.ISOWeek);return n("tr",{style:o.head_row,className:r.head_row,children:[a&&e("td",{style:o.head_cell,className:r.head_cell}),c.map((t,n)=>e("th",{scope:"col",className:r.head_cell,style:o.head_cell,"aria-label":s(t,{locale:i}),children:l(t,{locale:i})},n))]})}function el(){var t,n=Ti(),r=n.components,o=null!==(t=null==r?void 0:r.HeadRow)&&void 0!==t?t:Ji;return e("thead",{style:n.styles.head,className:n.classNames.head,children:e(o,{})})}function tl(n){var r=Ti();return e(t,{children:(0,r.formatters.formatDay)(n.date,{locale:r.locale})})}var nl=M(void 0);function rl(t){return Ri(t.initialProps)?e(ol,{initialProps:t.initialProps,children:t.children}):e(nl.Provider,{value:{selected:void 0,modifiers:{disabled:[]}},children:t.children})}function ol(t){var n=t.initialProps,r=t.children,o=n.selected,a=n.min,i=n.max,l={disabled:[]};return o&&l.disabled.push(e=>{var t=i&&o.length>i-1,n=o.some(t=>Ra(t,e));return Boolean(t&&!n)}),e(nl.Provider,{value:{selected:o,onDayClick(e,t,r){var l,s;if(null===(l=n.onDayClick)||void 0===l||l.call(n,e,t,r),!Boolean(t.selected&&a&&(null==o?void 0:o.length)===a)&&!Boolean(!t.selected&&i&&(null==o?void 0:o.length)===i)){var c=o?Si([],o):[];if(t.selected){var d=c.findIndex(t=>Ra(e,t));c.splice(d,1)}else c.push(e);null===(s=n.onSelect)||void 0===s||s.call(n,c,e,t,r)}},modifiers:l},children:r})}function al(){var e=S(nl);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}var il,ll,sl=M(void 0);function cl(t){return Ei(t.initialProps)?e(dl,{initialProps:t.initialProps,children:t.children}):e(sl.Provider,{value:{selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}},children:t.children})}function dl(t){var n=t.initialProps,r=t.children,o=n.selected,a=o||{},i=a.from,l=a.to,s=n.min,c=n.max,d={range_start:[],range_end:[],range_middle:[],disabled:[]};if(i?(d.range_start=[i],l?(d.range_end=[l],Ra(i,l)||(d.range_middle=[{after:i,before:l}])):d.range_end=[i]):l&&(d.range_start=[l],d.range_end=[l]),s&&(i&&!l&&d.disabled.push({after:bi(i,s-1),before:ha(i,s-1)}),i&&l&&d.disabled.push({after:i,before:ha(i,s-1)}),!i&&l&&d.disabled.push({after:bi(l,s-1),before:ha(l,s-1)})),c){if(i&&!l&&(d.disabled.push({before:ha(i,1-c)}),d.disabled.push({after:ha(i,c-1)})),i&&l){var u=c-(Aa(l,i)+1);d.disabled.push({before:bi(i,u)}),d.disabled.push({after:ha(l,u)})}!i&&l&&(d.disabled.push({before:ha(l,1-c)}),d.disabled.push({after:ha(l,c-1)}))}return e(sl.Provider,{value:{selected:o,onDayClick(e,t,r){var a,i;null===(a=n.onDayClick)||void 0===a||a.call(n,e,t,r);var l=((e,t)=>{var n=t||{},r=n.from,o=n.to;if(r&&o){if(Ra(o,e)&&Ra(r,e))return;if(Ra(o,e))return{from:o,to:void 0};if(Ra(r,e))return;return mi(r,e)?{from:e,to:o}:{from:r,to:e}}return o?mi(e,o)?{from:o,to:e}:{from:e,to:o}:r?hi(e,r)?{from:e,to:r}:{from:r,to:e}:{from:e,to:void 0}})(e,o);null===(i=n.onSelect)||void 0===i||i.call(n,l,e,t,r)},modifiers:d},children:r})}function ul(){var e=S(sl);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function pl(e){return Array.isArray(e)?Si([],e):void 0!==e?[e]:[]}(ll=il||(il={})).Outside="outside",ll.Disabled="disabled",ll.Selected="selected",ll.Hidden="hidden",ll.Today="today",ll.RangeStart="range_start",ll.RangeEnd="range_end",ll.RangeMiddle="range_middle";var fl=il.Selected,ml=il.Disabled,hl=il.Hidden,gl=il.Today,bl=il.RangeEnd,vl=il.RangeMiddle,yl=il.RangeStart,wl=il.Outside,xl=M(void 0);function Cl(t){var n=Ti(),r=((e,t,n)=>{var r,o=((r={})[fl]=pl(e.selected),r[ml]=pl(e.disabled),r[hl]=pl(e.hidden),r[gl]=[e.today],r[bl]=[],r[vl]=[],r[yl]=[],r[wl]=[],r);return e.fromDate&&o[ml].push({before:e.fromDate}),e.toDate&&o[ml].push({after:e.toDate}),Ri(e)?o[ml]=o[ml].concat(t.modifiers[ml]):Ei(e)&&(o[ml]=o[ml].concat(n.modifiers[ml]),o[yl]=n.modifiers[yl],o[vl]=n.modifiers[vl],o[bl]=n.modifiers[bl]),o})(n,al(),ul()),o=(e=>{var t={};return Object.entries(e).forEach(e=>{t[e[0]]=pl(e[1])}),t})(n.modifiers),a=Mi(Mi({},r),o);return e(xl.Provider,{value:a,children:t.children})}function kl(){var e=S(xl);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function Nl(e,t,n){var r=Object.keys(t).reduce((n,r)=>(((e,t)=>t.some(t=>{if("boolean"==typeof t)return t;if(Ea(t))return Ra(e,t);var n,r,o,a,i,l;if(l=t,Array.isArray(l)&&l.every(Ea))return t.includes(e);if((e=>Boolean(e&&"object"==typeof e&&"from"in e))(t))return n=e,i=(r=t).to,(a=r.from)&&i?(Aa(i,a)<0&&(a=(o=[i,a])[0],i=o[1]),Aa(n,a)>=0&&Aa(i,n)>=0):i?Ra(i,n):!!a&&Ra(a,n);if((e=>Boolean(e&&"object"==typeof e&&"dayOfWeek"in e))(t))return t.dayOfWeek.includes(e.getDay());if((e=>Boolean(e&&"object"==typeof e&&"before"in e&&"after"in e))(t)){var s=Aa(t.before,e)>0,c=Aa(t.after,e)<0;return mi(t.before,t.after)?c&&s:s||c}return(e=>Boolean(e&&"object"==typeof e&&"after"in e))(t)?Aa(e,t.after)>0:(e=>Boolean(e&&"object"==typeof e&&"before"in e))(t)?Aa(t.before,e)>0:"function"==typeof t&&t(e)}))(e,t[r])&&n.push(r),n),[]),o={};return r.forEach(e=>o[e]=!0),n&&!gi(e,n)&&(o.outside=!0),o}function Al(e,t){var n=t.moveBy,r=t.direction,o=t.context,a=t.modifiers,i=t.retry,l=void 0===i?{count:0,lastFocused:e}:i,s=o.weekStartsOn,c=o.fromDate,d=o.toDate,u=o.locale,p={day:ha,week:Ma,month:ga,year:Sa,startOfWeek(e){return o.ISOWeek?wa(e):ya(e,{locale:u,weekStartsOn:s})},endOfWeek(e){return o.ISOWeek?za(e):Oa(e,{locale:u,weekStartsOn:s})}}[n](e,"after"===r?1:-1);"before"===r&&c?p=(e=>{let t,n;return e.forEach(e=>{n||"object"!=typeof e||(n=fa.bind(null,e));const r=ma(e,n);(!t||t<r||isNaN(+r))&&(t=r)}),fa(n,t||NaN)})([c,p]):"after"===r&&d&&(p=(e=>{let t,n;return e.forEach(e=>{n||"object"!=typeof e||(n=fa.bind(null,e));const r=ma(e,n);(!t||t>r||isNaN(+r))&&(t=r)}),fa(n,t||NaN)})([d,p]));var f=!0;if(a){var m=Nl(p,a);f=!m.disabled&&!m.hidden}return f?p:l.count>365?l.lastFocused:Al(p,{moveBy:n,direction:r,context:o,modifiers:a,retry:Mi(Mi({},l),{count:l.count+1})})}var Ml=M(void 0);function Sl(t){var n=$i(),r=kl(),o=N(),a=o[0],i=o[1],l=N(),s=l[0],c=l[1],d=((e,t)=>{for(var n,r,o=Da(e[0]),a=Pa(e[e.length-1]),i=o;i<=a;){var l=Nl(i,t);if(l.disabled||l.hidden)i=ha(i,1);else{if(l.selected)return i;l.today&&!r&&(r=i),n||(n=i),i=ha(i,1)}}return r||n})(n.displayMonths,r),u=(null!=a?a:s&&n.isDateDisplayed(s))?s:d,p=e=>{i(e)},f=Ti(),m=(e,t)=>{if(a){var o=Al(a,{moveBy:e,direction:t,context:f,modifiers:r});Ra(a,o)||(n.goToDate(o,a),p(o))}};return e(Ml.Provider,{value:{focusedDay:a,focusTarget:u,blur(){c(a),i(void 0)},focus:p,focusDayAfter(){return m("day","after")},focusDayBefore(){return m("day","before")},focusWeekAfter(){return m("week","after")},focusWeekBefore(){return m("week","before")},focusMonthBefore(){return m("month","before")},focusMonthAfter(){return m("month","after")},focusYearBefore(){return m("year","before")},focusYearAfter(){return m("year","after")},focusStartOfWeek(){return m("startOfWeek","before")},focusEndOfWeek(){return m("endOfWeek","after")}},children:t.children})}function Rl(){var e=S(Ml);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}var El=M(void 0);function _l(t){return _i(t.initialProps)?e(Pl,{initialProps:t.initialProps,children:t.children}):e(El.Provider,{value:{selected:void 0},children:t.children})}function Pl(t){var n=t.initialProps,r=t.children;return e(El.Provider,{value:{selected:n.selected,onDayClick(e,t,r){var o,a,i;null===(o=n.onDayClick)||void 0===o||o.call(n,e,t,r),!t.selected||n.required?null===(i=n.onSelect)||void 0===i||i.call(n,e,e,t,r):null===(a=n.onSelect)||void 0===a||a.call(n,void 0,e,t,r)}},children:r})}function Dl(){var e=S(El);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function Ll(t){var n=k(null),r=function(t,n,r){var o,a,i,l=Ti(),s=Rl(),c=((e,t)=>Nl(e,kl(),t))(t,n),d=((e,t)=>{var n=Ti(),r=Dl(),o=al(),a=ul(),i=Rl(),l=i.focusDayAfter,s=i.focusDayBefore,c=i.focusWeekAfter,d=i.focusWeekBefore,u=i.blur,p=i.focus,f=i.focusMonthBefore,m=i.focusMonthAfter,h=i.focusYearBefore,g=i.focusYearAfter,b=i.focusStartOfWeek,v=i.focusEndOfWeek;return{onClick(i){var l,s,c,d;_i(n)?null===(l=r.onDayClick)||void 0===l||l.call(r,e,t,i):Ri(n)?null===(s=o.onDayClick)||void 0===s||s.call(o,e,t,i):Ei(n)?null===(c=a.onDayClick)||void 0===c||c.call(a,e,t,i):null===(d=n.onDayClick)||void 0===d||d.call(n,e,t,i)},onFocus(r){var o;p(e),null===(o=n.onDayFocus)||void 0===o||o.call(n,e,t,r)},onBlur(r){var o;u(),null===(o=n.onDayBlur)||void 0===o||o.call(n,e,t,r)},onKeyDown(r){var o;switch(r.key){case"ArrowLeft":r.preventDefault(),r.stopPropagation(),"rtl"===n.dir?l():s();break;case"ArrowRight":r.preventDefault(),r.stopPropagation(),"rtl"===n.dir?s():l();break;case"ArrowDown":r.preventDefault(),r.stopPropagation(),c();break;case"ArrowUp":r.preventDefault(),r.stopPropagation(),d();break;case"PageUp":r.preventDefault(),r.stopPropagation(),r.shiftKey?h():f();break;case"PageDown":r.preventDefault(),r.stopPropagation(),r.shiftKey?g():m();break;case"Home":r.preventDefault(),r.stopPropagation(),b();break;case"End":r.preventDefault(),r.stopPropagation(),v()}null===(o=n.onDayKeyDown)||void 0===o||o.call(n,e,t,r)},onKeyUp(r){var o;null===(o=n.onDayKeyUp)||void 0===o||o.call(n,e,t,r)},onMouseEnter(r){var o;null===(o=n.onDayMouseEnter)||void 0===o||o.call(n,e,t,r)},onMouseLeave(r){var o;null===(o=n.onDayMouseLeave)||void 0===o||o.call(n,e,t,r)},onPointerEnter(r){var o;null===(o=n.onDayPointerEnter)||void 0===o||o.call(n,e,t,r)},onPointerLeave(r){var o;null===(o=n.onDayPointerLeave)||void 0===o||o.call(n,e,t,r)},onTouchCancel(r){var o;null===(o=n.onDayTouchCancel)||void 0===o||o.call(n,e,t,r)},onTouchEnd(r){var o;null===(o=n.onDayTouchEnd)||void 0===o||o.call(n,e,t,r)},onTouchMove(r){var o;null===(o=n.onDayTouchMove)||void 0===o||o.call(n,e,t,r)},onTouchStart(r){var o;null===(o=n.onDayTouchStart)||void 0===o||o.call(n,e,t,r)}}})(t,c),u=(()=>{var e=Ti(),t=Dl(),n=al(),r=ul();return _i(e)?t.selected:Ri(e)?n.selected:Ei(e)?r.selected:void 0})(),p=Boolean(l.onDayClick||"default"!==l.mode);A(()=>{var e;c.outside||s.focusedDay&&p&&Ra(s.focusedDay,t)&&(null===(e=r.current)||void 0===e||e.focus())},[s.focusedDay,t,r,p,c.outside]);var f=((e,t)=>{var n=[e.classNames.day];return Object.keys(t).forEach(t=>{var r=e.modifiersClassNames[t];if(r)n.push(r);else if((e=>Object.values(il).includes(e))(t)){var o=e.classNames["day_".concat(t)];o&&n.push(o)}}),n})(l,c).join(" "),m=((e,t)=>{var n=Mi({},e.styles.day);return Object.keys(t).forEach(t=>{var r;n=Mi(Mi({},n),null===(r=e.modifiersStyles)||void 0===r?void 0:r[t])}),n})(l,c),h=Boolean(c.outside&&!l.showOutsideDays||c.hidden),g=null!==(i=null===(a=l.components)||void 0===a?void 0:a.DayContent)&&void 0!==i?i:tl,b={style:m,className:f,children:e(g,{date:t,displayMonth:n,activeModifiers:c}),role:"gridcell"},v=s.focusTarget&&Ra(s.focusTarget,t)&&!c.outside,y=s.focusedDay&&Ra(s.focusedDay,t),w=Mi(Mi(Mi({},b),((o={disabled:c.disabled,role:"gridcell"})["aria-selected"]=c.selected,o.tabIndex=y||v?0:-1,o)),d);return{isButton:p,isHidden:h,activeModifiers:c,selectedDays:u,buttonProps:w,divProps:b}}(t.date,t.displayMonth,n);return r.isHidden?e("div",{role:"gridcell"}):r.isButton?e(Qi,Mi({name:"day",ref:n},r.buttonProps)):e("div",Mi({},r.divProps))}function Ol(t){var n=t.number,r=t.dates,o=Ti(),a=o.onWeekNumberClick,i=o.styles,l=o.classNames,s=o.locale,c=o.labels.labelWeekNumber,d=(0,o.formatters.formatWeekNumber)(Number(n),{locale:s});if(!a)return e("span",{className:l.weeknumber,style:i.weeknumber,children:d});var u=c(Number(n),{locale:s});return e(Qi,{name:"week-number","aria-label":u,className:l.weeknumber,style:i.weeknumber,onClick(e){a(n,r,e)},children:d})}function zl(t){var r,o,a,i=Ti(),l=i.styles,s=i.classNames,c=i.components,d=null!==(r=null==c?void 0:c.Day)&&void 0!==r?r:Ll,u=null!==(o=null==c?void 0:c.WeekNumber)&&void 0!==o?o:Ol;return i.showWeekNumber&&(a=e("td",{className:s.cell,style:l.cell,children:e(u,{number:t.weekNumber,dates:t.dates})})),n("tr",{className:s.row,style:l.row,children:[a,t.dates.map(n=>e("td",{className:s.cell,style:l.cell,role:"presentation",children:e(d,{displayMonth:t.displayMonth,date:n})},(e=>Math.trunc(+ma(e)/1e3))(n)))]})}function Tl(e,t,n){for(var r=(null==n?void 0:n.ISOWeek)?za(t):Oa(t,n),o=(null==n?void 0:n.ISOWeek)?wa(e):ya(e,n),a=Aa(r,o),i=[],l=0;l<=a;l++)i.push(ha(o,l));return i.reduce((e,t)=>{var r=(null==n?void 0:n.ISOWeek)?Ga(t):Qa(t,n),o=e.find(e=>e.weekNumber===r);return o?(o.dates.push(t),e):(e.push({weekNumber:r,dates:[t]}),e)},[])}function Il(t){var r,o,a,i=Ti(),l=i.locale,s=i.classNames,c=i.styles,d=i.hideHead,u=i.components,p=i.weekStartsOn,f=i.firstWeekContainsDate,m=i.ISOWeek,h=((e,t)=>{var n=Tl(Da(e),Pa(e),t);if(null==t?void 0:t.useFixedWeeks){var r=((e,t)=>{const n=ma(e,t?.in);return((e,t,n)=>{const[r,o]=ka(n?.in,e,t),a=ya(r,n),i=ya(o,n),l=+a-Ca(a),s=+i-Ca(i);return Math.round((l-s)/ua)})(((e,t)=>{const n=ma(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(0,0,0,0),ma(n,t?.in)})(n,t),Da(n,t),t)+1})(e,t);if(r<6){var o=n[n.length-1],a=o.dates[o.dates.length-1],i=Ma(a,6-r),l=Tl(Ma(a,1),i,t);n.push.apply(n,l)}}return n})(t.displayMonth,{useFixedWeeks:Boolean(i.fixedWeeks),ISOWeek:m,locale:l,weekStartsOn:p,firstWeekContainsDate:f}),g=null!==(r=null==u?void 0:u.Head)&&void 0!==r?r:el,b=null!==(o=null==u?void 0:u.Row)&&void 0!==o?o:zl,v=null!==(a=null==u?void 0:u.Footer)&&void 0!==a?a:Zi;return n("table",{id:t.id,className:s.table,style:c.table,role:"grid","aria-labelledby":t["aria-labelledby"],children:[!d&&e(g,{}),e("tbody",{className:s.tbody,style:c.tbody,children:h.map(n=>e(b,{displayMonth:t.displayMonth,dates:n.dates,weekNumber:n.weekNumber},n.weekNumber))}),e(v,{displayMonth:t.displayMonth})]})}var Wl="undefined"!=typeof window&&window.document&&window.document.createElement?R:A,Fl=!1,Bl=0;function jl(){return"react-day-picker-".concat(++Bl)}function Hl(t){var r,o,a=Ti(),i=a.dir,l=a.classNames,s=a.styles,c=a.components,d=$i().displayMonths,u=(e=>{var t,n=null!=e?e:Fl?jl():null,r=N(n),o=r[0],a=r[1];return Wl(()=>{null===o&&a(jl())},[]),A(()=>{!1===Fl&&(Fl=!0)},[]),null!==(t=null!=e?e:o)&&void 0!==t?t:void 0})(a.id?"".concat(a.id,"-").concat(t.displayIndex):void 0),p=a.id?"".concat(a.id,"-grid-").concat(t.displayIndex):void 0,f=[l.month],m=s.month,h=0===t.displayIndex,g=t.displayIndex===d.length-1,b=!h&&!g;"rtl"===i&&(g=(r=[h,g])[0],h=r[1]),h&&(f.push(l.caption_start),m=Mi(Mi({},m),s.caption_start)),g&&(f.push(l.caption_end),m=Mi(Mi({},m),s.caption_end)),b&&(f.push(l.caption_between),m=Mi(Mi({},m),s.caption_between));var v=null!==(o=null==c?void 0:c.Caption)&&void 0!==o?o:Xi;return n("div",{className:f.join(" "),style:m,children:[e(v,{id:u,displayMonth:t.displayMonth,displayIndex:t.displayIndex}),e(Il,{id:p,"aria-labelledby":u,displayMonth:t.displayMonth})]},t.displayIndex)}function Yl(t){var n=Ti();return e("div",{className:n.classNames.months,style:n.styles.months,children:t.children})}function $l(t){var n,r,o=t.initialProps,a=Ti(),i=Rl(),l=$i(),s=N(!1),c=s[0],d=s[1];A(()=>{a.initialFocus&&i.focusTarget&&(c||(i.focus(i.focusTarget),d(!0)))},[a.initialFocus,c,i.focus,i.focusTarget,i]);var u=[a.classNames.root,a.className];a.numberOfMonths>1&&u.push(a.classNames.multiple_months),a.showWeekNumber&&u.push(a.classNames.with_weeknumber);var p=Mi(Mi({},a.styles.root),a.style),f=Object.keys(o).filter(e=>e.startsWith("data-")).reduce((e,t)=>{var n;return Mi(Mi({},e),((n={})[t]=o[t],n))},{}),m=null!==(r=null===(n=o.components)||void 0===n?void 0:n.Months)&&void 0!==r?r:Yl;return e("div",Mi({className:u.join(" "),style:p,dir:a.dir,id:a.id,nonce:o.nonce,title:o.title,lang:o.lang},f,{children:e(m,{children:l.displayMonths.map((t,n)=>e(Hl,{displayIndex:n,displayMonth:t},n))})}))}function Vl(t){var n=t.children,r=((e,t)=>{var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n})(t,["children"]);return e(zi,{initialProps:r,children:e(Yi,{children:e(_l,{initialProps:r,children:e(rl,{initialProps:r,children:e(cl,{initialProps:r,children:e(Cl,{children:e(Sl,{children:n})})})})})})})}function Gl(t){return e(Vl,Mi({},t,{children:e($l,{initialProps:t})}))}function ql({className:t,classNames:n,showOutsideDays:r=!0,...o}){const a="range"===o.mode;/* @__PURE__ */
|
|
99
|
-
return e(Gl,{locale:Ai,showOutsideDays:r,className:fn("w-fit p-2",t),classNames:{months:"flex flex-col gap-3",month:"flex flex-col gap-3",caption:"relative flex h-9 items-center justify-center",caption_label:"text-sm font-extrabold tracking-[-0.2px] text-gray-900",nav:"absolute inset-x-0 top-1/2 flex -translate-y-1/2 items-center justify-between px-1",nav_button:"inline-flex h-8 w-8 items-center justify-center rounded-2 border border-gray-200 bg-white p-0 text-gray-700 transition-colors duration-200 hover:border-gray-300 hover:bg-gray-100 hover:text-gray-900 hover:cursor-pointer disabled:opacity-40",nav_button_previous:"",nav_button_next:"",table:"w-full border-collapse",head_row:"flex",head_cell:"h-8 w-9 text-center text-xs font-medium text-gray-500",row:"mt-0.5 flex w-full",cell:fn("relative h-9 w-9 p-0 text-center text-sm","focus-within:relative focus-within:z-20",a?"[&:has(.day-range-middle)]:bg-
|
|
99
|
+
return e(Gl,{locale:Ai,showOutsideDays:r,className:fn("w-fit p-2",t),classNames:{months:"flex flex-col gap-3",month:"flex flex-col gap-3",caption:"relative flex h-9 items-center justify-center",caption_label:"text-sm font-extrabold tracking-[-0.2px] text-gray-900",nav:"absolute inset-x-0 top-1/2 flex -translate-y-1/2 items-center justify-between px-1",nav_button:"inline-flex h-8 w-8 items-center justify-center rounded-2 border border-gray-200 bg-white p-0 text-gray-700 transition-colors duration-200 hover:border-gray-300 hover:bg-gray-100 hover:text-gray-900 hover:cursor-pointer disabled:opacity-40",nav_button_previous:"",nav_button_next:"",table:"w-full border-collapse",head_row:"flex",head_cell:"h-8 w-9 text-center text-xs font-medium text-gray-500",row:"mt-0.5 flex w-full",cell:fn("relative h-9 w-9 p-0 text-center text-sm","focus-within:relative focus-within:z-20",a?"[&:has(.day-range-middle)]:bg-brand-soft/70 [&:has(.day-range-start)]:bg-brand-soft/70 [&:has(.day-range-end)]:bg-brand-soft/70 [&:has(.day-range-start)]:rounded-l-2 [&:has(.day-range-end)]:rounded-r-2":"[&:has([aria-selected])]:rounded-2"),day:"inline-flex h-9 w-9 items-center justify-center rounded-2 border border-transparent p-0 text-sm font-medium text-gray-800 transition-colors duration-200 aria-selected:opacity-100 hover:bg-gray-100 hover:text-gray-900 hover:cursor-pointer focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-main-300/60",day_range_start:"day-range-start aria-selected:rounded-2 aria-selected:bg-brand aria-selected:text-white",day_range_end:"day-range-end aria-selected:rounded-2 aria-selected:bg-brand aria-selected:text-white",day_selected:"bg-brand text-white hover:bg-main-700 hover:text-white focus:bg-main-700 focus:text-white",day_today:"text-brand font-extrabold",day_outside:"day-outside text-gray-400 aria-selected:text-gray-500",day_disabled:"cursor-not-allowed text-gray-300 opacity-40 hover:bg-transparent hover:text-gray-300",day_range_middle:"day-range-middle aria-selected:rounded-none aria-selected:bg-brand-soft aria-selected:text-brand",day_hidden:"invisible",...n},components:{IconLeft({className:t,...n}){/* @__PURE__ */return e(Hn,{className:fn("size-4",t),...n})},IconRight({className:t,...n}){/* @__PURE__ */return e(Yn,{className:fn("size-4",t),...n})}},...o})}const Ql=xn("relative overflow-hidden bg-white border border-gray-200 will-change-transform transition-[translate,scale,box-shadow] duration-300 ease-[cubic-bezier(0.22,1,0.36,1)]",{variants:{radius:{sm:"rounded-2",md:"rounded-3",lg:"rounded-4",xl:"rounded-4"},interactive:{true:"cursor-pointer hover:-translate-y-1.5 hover:shadow-warm",false:""}},defaultVariants:{radius:"lg",interactive:!1}});function Ul({radius:t,interactive:n,className:r,...o}){/* @__PURE__ */
|
|
100
100
|
return e("div",{"data-slot":"card",className:fn(Ql({radius:t,interactive:n}),r),...o})}function Kl({className:t,children:n,...r}){/* @__PURE__ */
|
|
101
101
|
return e("div",{"data-slot":"card-thumb",className:fn("relative w-full overflow-hidden",t),...r,children:n})}function Xl({className:t,children:n,...r}){/* @__PURE__ */
|
|
102
102
|
return e("div",{"data-slot":"card-body",className:fn("flex flex-col gap-2 p-3.5",t),...r,children:n})}function Zl({className:t,children:n,...r}){/* @__PURE__ */
|
|
103
103
|
return e("div",{"data-slot":"card-title",className:fn("text-sm font-extrabold leading-snug tracking-[-0.2px] text-gray-900 line-clamp-2",t),...r,children:n})}function Jl({className:t,children:n,...r}){/* @__PURE__ */
|
|
104
104
|
return e("div",{"data-slot":"card-meta",className:fn("flex items-center justify-between text-[11px] text-gray-500",t),...r,children:n})}function es({className:t,children:n,position:r="top-left",...o}){/* @__PURE__ */
|
|
105
105
|
return e("div",{"data-slot":"card-overlay",className:fn("absolute z-[1]",{"top-left":"top-2 left-2","top-right":"top-2 right-2","bottom-left":"bottom-2 left-2","bottom-right":"bottom-2 right-2"}[r],t),...o,children:n})}function ts({label:t,icon:r,children:o,checked:a,defaultChecked:i=!1,onCheckedChange:l,showCheckIndicator:s=!0,width:c=320,height:d=220,className:u,disabled:p,onClick:f,style:m,"aria-label":h,...g}){const b="boolean"==typeof a,[v,y]=C.useState(i),w=b?a:v,x=void 0!==o,k=h??("string"==typeof t||"number"==typeof t?String(t):void 0);/* @__PURE__ */
|
|
106
|
-
return n("button",{type:"button",role:"checkbox","aria-checked":w,"aria-label":k,disabled:p,onClick(e){if(p)return;const t=!w;b||y(t),l?.(t),f?.(e)},className:fn("relative overflow-hidden rounded-
|
|
106
|
+
return n("button",{type:"button",role:"checkbox","aria-checked":w,"aria-label":k,disabled:p,onClick(e){if(p)return;const t=!w;b||y(t),l?.(t),f?.(e)},className:fn("relative overflow-hidden rounded-4 border-2 transition-all duration-200 ease-out active:scale-95","flex flex-col items-center justify-center",!x&&"gap-4",w?"border-brand bg-brand-soft text-brand":"border-gray-200 bg-white text-gray-500",!p&&"hover:cursor-pointer",!p&&(w?"hover:bg-main-300":"hover:bg-gray-100"),p&&"cursor-not-allowed opacity-60 active:scale-100",u),style:{width:c,height:d,...m},...g,children:[s?/* @__PURE__ */e("span",{className:fn("absolute top-4 right-4 flex w-[clamp(18px,8%,32px)] aspect-square shrink-0 items-center justify-center rounded-full border-2 transition-colors",w?"border-brand bg-brand text-white":"border-gray-200 bg-white text-transparent"),children:/* @__PURE__ */e(jn,{className:"h-[46%] w-[46%]",strokeWidth:4.4})}):null,x?o:/* @__PURE__ */n("div",{className:"flex flex-col items-center justify-center gap-3",children:[r?/* @__PURE__ */e("span",{className:"text-inherit [&>svg]:h-14 [&>svg]:w-14",children:r}):null,"string"==typeof t||"number"==typeof t?/* @__PURE__ */e(zn,{size:"heading1",weight:"bold",className:fn("text-inherit",w?"text-brand":"text-gray-600"),children:t}):t]})]})}function ns(e){const t=x.useRef({value:e,previous:e});return x.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function rs(e){const[t,n]=x.useState(void 0);return G(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,a;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,a=t.blockSize}else o=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}Ul.Thumb=Kl,Ul.Body=Xl,Ul.Title=Zl,Ul.Meta=Jl,Ul.Overlay=es;var os="Checkbox",[as]=O(os),[is,ls]=as(os);function ss(t){const{__scopeCheckbox:n,checked:r,children:o,defaultChecked:a,disabled:i,form:l,name:s,onCheckedChange:c,required:d,value:u="on",internal_do_not_use_render:p}=t,[f,m]=Q({prop:r,defaultProp:a??!1,onChange:c,caller:os}),[h,g]=x.useState(null),[b,v]=x.useState(null),y=x.useRef(!1),w=!h||!!l||!!h.closest("form"),C={checked:f,disabled:i,setChecked:m,control:h,setControl:g,name:s,form:l,value:u,hasConsumerStoppedPropagationRef:y,required:d,defaultChecked:!bs(a)&&a,isFormControl:w,bubbleInput:b,setBubbleInput:v};/* @__PURE__ */
|
|
107
107
|
return e(is,{scope:n,...C,children:gs(p)?p(C):o})}var cs="CheckboxTrigger",ds=x.forwardRef(({__scopeCheckbox:t,onKeyDown:n,onClick:r,...o},a)=>{const{control:i,value:l,disabled:s,checked:c,required:d,setControl:u,setChecked:p,hasConsumerStoppedPropagationRef:f,isFormControl:m,bubbleInput:h}=ls(cs,t),g=W(a,u),b=x.useRef(c);return x.useEffect(()=>{const e=i?.form;if(e){const t=()=>p(b.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[i,p]),/* @__PURE__ */e(U.button,{type:"button",role:"checkbox","aria-checked":bs(c)?"mixed":c,"aria-required":d,"data-state":vs(c),"data-disabled":s?"":void 0,disabled:s,value:l,...o,ref:g,onKeyDown:V(n,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:V(r,e=>{p(e=>!!bs(e)||!e),h&&m&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})});ds.displayName=cs;var us=x.forwardRef((r,o)=>{const{__scopeCheckbox:a,name:i,checked:l,defaultChecked:s,required:c,disabled:d,value:u,onCheckedChange:p,form:f,...m}=r;/* @__PURE__ */
|
|
108
108
|
return e(ss,{__scopeCheckbox:a,checked:l,defaultChecked:s,disabled:d,required:c,onCheckedChange:p,name:i,form:f,value:u,internal_do_not_use_render({isFormControl:r}){/* @__PURE__ */return n(t,{children:[
|
|
109
109
|
/* @__PURE__ */e(ds,{...m,ref:o,__scopeCheckbox:a}),r&&/* @__PURE__ */e(hs,{__scopeCheckbox:a})]})}})});us.displayName=os;var ps="CheckboxIndicator",fs=x.forwardRef((t,n)=>{const{__scopeCheckbox:r,forceMount:o,...a}=t,i=ls(ps,r);/* @__PURE__ */
|
|
110
110
|
return e(K,{present:o||bs(i.checked)||!0===i.checked,children:/* @__PURE__ */e(U.span,{"data-state":vs(i.checked),"data-disabled":i.disabled?"":void 0,...a,ref:n,style:{pointerEvents:"none",...t.style}})})});fs.displayName=ps;var ms="CheckboxBubbleInput",hs=x.forwardRef(({__scopeCheckbox:t,...n},r)=>{const{control:o,hasConsumerStoppedPropagationRef:a,checked:i,defaultChecked:l,required:s,disabled:c,name:d,value:u,form:p,bubbleInput:f,setBubbleInput:m}=ls(ms,t),h=W(r,m),g=ns(i),b=rs(o);x.useEffect(()=>{const e=f;if(!e)return;const t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(g!==i&&n){const t=new Event("click",{bubbles:!a.current});e.indeterminate=bs(i),n.call(e,!bs(i)&&i),e.dispatchEvent(t)}},[f,g,i,a]);const v=x.useRef(!bs(i)&&i);/* @__PURE__ */
|
|
111
111
|
return e(U.input,{type:"checkbox","aria-hidden":!0,defaultChecked:l??v.current,required:s,disabled:c,name:d,value:u,form:p,...n,tabIndex:-1,ref:h,style:{...n.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function gs(e){return"function"==typeof e}function bs(e){return"indeterminate"===e}function vs(e){return bs(e)?"indeterminate":e?"checked":"unchecked"}hs.displayName=ms;const ys=x.forwardRef(({className:t,label:r,id:o,readOnly:a,...i},l)=>{const s=x.useId(),c=o||s;/* @__PURE__ */
|
|
112
112
|
return n("div",{className:fn("flex items-center gap-2",a&&"pointer-events-none"),children:[
|
|
113
|
-
/* @__PURE__ */e(us,{ref:l,id:c,className:fn("peer h-[18px] w-[18px] shrink-0 cursor-pointer rounded-1.5 border-[1.5px] border-gray-300 bg-white text-white","transition-[background-color,border-color] duration-150 ease-out","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/30 focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-[0.45]","data-[state=checked]:border-brand data-[state=checked]:bg-brand data-[state=checked]:text-white",t),...i,children:/* @__PURE__ */e(fs,{className:"flex items-center justify-center text-current",children:/* @__PURE__ */e(jn,{className:"h-2.5 w-2.5",strokeWidth:8})})}),r?/* @__PURE__ */e("label",{htmlFor:c,className:fn("cursor-pointer select-none text-gray-800 transition-colors","peer-disabled:cursor-not-allowed peer-disabled:opacity-[0.45]","peer-data-[state=checked]:text-gray-500 peer-data-[state=checked]:line-through"),children:/* @__PURE__ */e(zn,{size:"caption2",weight:"medium",children:r})}):null]})});function
|
|
114
|
-
return e("div",{className:fn("overflow-hidden rounded-4 border border-gray-200 bg-white",
|
|
115
|
-
return n("label",{htmlFor:
|
|
116
|
-
/* @__PURE__ */e(ys,{id:
|
|
117
|
-
return e("div",{"data-slot":"stripe",className:fn("relative flex w-full items-center justify-center overflow-hidden","font-mono text-[10px] tracking-[0.3px] text-black/45",a),style:{height:o,borderRadius:r,background:
|
|
118
|
-
return e("div",{"data-slot":"circle-avatar",className:fn("relative shrink-0 overflow-hidden rounded-full",c),style:{width:d,height:d,...a?{border:`${u}px solid var(--
|
|
119
|
-
/* @__PURE__ */e(
|
|
113
|
+
/* @__PURE__ */e(us,{ref:l,id:c,className:fn("peer h-[18px] w-[18px] shrink-0 cursor-pointer rounded-1.5 border-[1.5px] border-gray-300 bg-white text-white","transition-[background-color,border-color] duration-150 ease-out","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/30 focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-[0.45]","data-[state=checked]:border-brand data-[state=checked]:bg-brand data-[state=checked]:text-white",t),...i,children:/* @__PURE__ */e(fs,{className:"flex items-center justify-center text-current",children:/* @__PURE__ */e(jn,{className:"h-2.5 w-2.5",strokeWidth:8})})}),r?/* @__PURE__ */e("label",{htmlFor:c,className:fn("cursor-pointer select-none text-gray-800 transition-colors","peer-disabled:cursor-not-allowed peer-disabled:opacity-[0.45]","peer-data-[state=checked]:text-gray-500 peer-data-[state=checked]:line-through"),children:/* @__PURE__ */e(zn,{size:"caption2",weight:"medium",children:r})}):null]})});ys.displayName=us.displayName;const ws={sm:{row:"gap-3 px-3 py-2.5",checkbox:"h-4 w-4",label:"caption1"},md:{row:"gap-3.5 px-4 py-3.5",checkbox:"h-[18px] w-[18px]",label:"body2"},lg:{row:"gap-4 px-4 py-4",checkbox:"h-5 w-5",label:"body1"}};function xs({options:t,value:r,onValueChange:o,size:a="md",className:i,readOnly:l=!1,disabled:s=!1}){const c=C.useId(),d=ws[a];/* @__PURE__ */
|
|
114
|
+
return e("div",{className:fn("overflow-hidden rounded-4 border border-gray-200 bg-white",i),children:t.map((t,a)=>{const i=r.includes(t.id),u=s||t.disabled,p=!u&&l,f=u||p,m=`${c}-${t.id}`;/* @__PURE__ */
|
|
115
|
+
return n("label",{htmlFor:m,"aria-disabled":f,onClick(e){f&&e.preventDefault()},className:fn("flex w-full items-center text-left transition-colors",d.row,a>0&&"border-t border-gray-200",!f&&"cursor-pointer hover:bg-gray-100/70",u&&"cursor-not-allowed",p&&"cursor-default hover:cursor-not-allowed"),children:[
|
|
116
|
+
/* @__PURE__ */e(ys,{id:m,checked:i,disabled:u,onCheckedChange(e){var n;f||"indeterminate"===e||(n=t.id,o(!0===e?r.includes(n)?r:[...r,n]:r.filter(e=>e!==n)))},className:fn(d.checkbox,"rounded-1.5","data-[state=checked]:border-brand data-[state=checked]:bg-brand",p&&"cursor-default hover:cursor-not-allowed")}),"string"==typeof t.label||"number"==typeof t.label?/* @__PURE__ */e(zn,{size:d.label,weight:"medium",className:fn("flex-1 transition-colors",i?"text-gray-900":"text-gray-600",u&&"text-gray-400"),children:t.label}):/* @__PURE__ */e("span",{className:fn("flex-1",!i&&"text-gray-600",u&&"opacity-60"),children:t.label})]},t.id)})})}const Cs={peach:"var(--main-300)",cream:"var(--brand-soft)",mint:"var(--mint-200)",blue:"var(--blue-200)",sky:"var(--blue-300)",rose:"var(--red-300)",gray:"var(--gray-200)"};function ks(e){return e?e in Cs?Cs[e]:e:Cs.cream}function Ns(e){return`repeating-linear-gradient(135deg, ${e}, ${e} 8px, color-mix(in srgb, ${e} 98%, black) 8px, color-mix(in srgb, ${e} 98%, black) 16px)`}function As({tone:t,label:n,radius:r=0,height:o="100%",className:a,style:i,...l}){const s=ks(t);/* @__PURE__ */
|
|
117
|
+
return e("div",{"data-slot":"stripe",className:fn("relative flex w-full items-center justify-center overflow-hidden","font-mono text-[10px] tracking-[0.3px] text-black/45",a),style:{height:o,borderRadius:r,background:Ns(s),...i},...l,children:void 0!==n&&""!==n?/* @__PURE__ */e("span",{className:"rounded-0.5 bg-white/70 px-1.5 py-0.5",children:n}):null})}const Ms={xs:24,sm:32,md:40,lg:56,xl:76};function Ss({size:r="md",tone:o="peach",ring:a=!1,imageUrl:i,fallback:l,alt:s="avatar",className:c}){const d="number"==typeof r?r:Ms[r],u=d>40?3:2,[p,f]=N(!1);A(()=>{f(!1)},[i]);const m="string"==typeof i&&/^(\/|https?:\/\/)/.test(i)&&!p;/* @__PURE__ */
|
|
118
|
+
return e("div",{"data-slot":"circle-avatar",className:fn("relative shrink-0 overflow-hidden rounded-full",c),style:{width:d,height:d,...a?{border:`${u}px solid var(--brand-soft)`}:null},children:m?/* @__PURE__ */e(L,{src:i,alt:s,fill:!0,sizes:"76px",className:"object-cover",onError(){return f(!0)}}):/* @__PURE__ */n(t,{children:[
|
|
119
|
+
/* @__PURE__ */e(As,{tone:o,className:"absolute inset-0 h-full"}),void 0!==l?/* @__PURE__ */e("div",{className:"absolute inset-0 flex items-center justify-center text-gray-700",children:l}):null]})})}const Rs={sm:{diameter:48,stroke:5,labelSize:"caption2"},md:{diameter:72,stroke:7,labelSize:"body2"},lg:{diameter:100,stroke:9,labelSize:"body1"},xl:{diameter:140,stroke:12,labelSize:"heading2"}};function Es({value:t,size:r="md",stroke:o,color:a,trackColor:i,showPercentage:l=!0,centerSlot:s,className:c}){const d="string"==typeof r?Rs[r]:{diameter:r,stroke:o??Math.max(2,Math.round(r/10)),labelSize:"body1"},u=d.diameter,p=o??d.stroke,f=(u-p)/2,m=2*Math.PI*f,h=Math.min(Math.max(t,0),100),g=d.labelSize,[b,v]=N(0);A(()=>{const e=requestAnimationFrame(()=>v(h));return()=>cancelAnimationFrame(e)},[h]);const y=m-m*b/100;/* @__PURE__ */
|
|
120
120
|
return n("div",{"data-slot":"circular-progress",className:fn("relative inline-flex items-center justify-center",c),style:{width:u,height:u},children:[
|
|
121
121
|
/* @__PURE__ */n("svg",{width:u,height:u,style:{transform:"rotate(-90deg)"},children:[
|
|
122
122
|
/* @__PURE__ */e("circle",{cx:u/2,cy:u/2,r:f,fill:"none",strokeWidth:p,className:fn(!i&&"stroke-gray-100"),stroke:i}),
|
|
123
|
-
/* @__PURE__ */e("circle",{cx:u/2,cy:u/2,r:f,fill:"none",strokeWidth:p,strokeLinecap:"round",strokeDasharray:m,strokeDashoffset:y,className:fn(!a&&"stroke-brand"),stroke:a,style:{transition:"stroke-dashoffset 600ms cubic-bezier(0.2, 0.7, 0.1, 1)"}})]}),(s??l)&&/* @__PURE__ */e("div",{className:"absolute inset-0 flex items-center justify-center",children:s??/* @__PURE__ */e(zn,{size:g,weight:"extrabold",className:fn(!a&&"text-brand"),style:a?{color:a}:void 0,children:`${h}%`})})]})}function
|
|
123
|
+
/* @__PURE__ */e("circle",{cx:u/2,cy:u/2,r:f,fill:"none",strokeWidth:p,strokeLinecap:"round",strokeDasharray:m,strokeDashoffset:y,className:fn(!a&&"stroke-brand"),stroke:a,style:{transition:"stroke-dashoffset 600ms cubic-bezier(0.2, 0.7, 0.1, 1)"}})]}),(s??l)&&/* @__PURE__ */e("div",{className:"absolute inset-0 flex items-center justify-center",children:s??/* @__PURE__ */e(zn,{size:g,weight:"extrabold",className:fn(!a&&"text-brand"),style:a?{color:a}:void 0,children:`${h}%`})})]})}function _s({avatar:t,imageUrl:r,author:o,text:a,time:i,divider:l=!0,className:s,...c}){/* @__PURE__ */
|
|
124
124
|
return n("div",{"data-slot":"comment-row",className:fn("flex items-start gap-2.5 py-3",l&&"border-b border-gray-100 last:border-b-0",s),...c,children:[
|
|
125
|
-
/* @__PURE__ */e("div",{className:"shrink-0",children:t??/* @__PURE__ */e(
|
|
125
|
+
/* @__PURE__ */e("div",{className:"shrink-0",children:t??/* @__PURE__ */e(Ss,{imageUrl:r,size:"sm"})}),
|
|
126
126
|
/* @__PURE__ */n("div",{className:"min-w-0 flex-1",children:[
|
|
127
127
|
/* @__PURE__ */n("div",{className:"flex items-baseline justify-between gap-2",children:[
|
|
128
128
|
/* @__PURE__ */e("span",{className:"text-xs font-bold text-gray-900 truncate",children:o}),i?/* @__PURE__ */e("span",{className:"shrink-0 text-[10px] text-gray-500",children:i}):null]}),
|
|
129
|
-
/* @__PURE__ */e("div",{className:"mt-1 text-xs leading-[1.5] text-gray-700",children:a})]})]})}const _s=["top","right","bottom","left"],Ps=Math.min,Ds=Math.max,Ls=Math.round,Os=Math.floor,zs=e=>({x:e,y:e}),Ts={left:"right",right:"left",bottom:"top",top:"bottom"};function Is(e,t,n){return Ds(e,Ps(t,n))}function Ws(e,t){return"function"==typeof e?e(t):e}function Fs(e){return e.split("-")[0]}function Bs(e){return e.split("-")[1]}function js(e){return"x"===e?"y":"x"}function Hs(e){return"y"===e?"height":"width"}function Ys(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function $s(e){return js(Ys(e))}function Vs(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Gs=["left","right"],qs=["right","left"],Qs=["top","bottom"],Us=["bottom","top"];function Ks(e){const t=Fs(e);return Ts[t]+e.slice(t.length)}function Xs(e){return"number"!=typeof e?(e=>({top:0,right:0,bottom:0,left:0,...e}))(e):{top:e,right:e,bottom:e,left:e}}function Zs(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Js(e,t,n){let{reference:r,floating:o}=e;const a=Ys(t),i=$s(t),l=Hs(i),s=Fs(t),c="y"===a,d=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,p=r[l]/2-o[l]/2;let f;switch(s){case"top":f={x:d,y:r.y-o.height};break;case"bottom":f={x:d,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:u};break;case"left":f={x:r.x-o.width,y:u};break;default:f={x:r.x,y:r.y}}switch(Bs(t)){case"start":f[i]-=p*(n&&c?-1:1);break;case"end":f[i]+=p*(n&&c?-1:1)}return f}async function ec(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:a,rects:i,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:p=!1,padding:f=0}=Ws(t,e),m=Xs(f),h=l[p?"floating"===u?"reference":"floating":u],g=Zs(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(h)))||n?h:h.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(l.floating)),boundary:c,rootBoundary:d,strategy:s})),b="floating"===u?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,v=await(null==a.getOffsetParent?void 0:a.getOffsetParent(l.floating)),y=await(null==a.isElement?void 0:a.isElement(v))&&await(null==a.getScale?void 0:a.getScale(v))||{x:1,y:1},w=Zs(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:b,offsetParent:v,strategy:s}):b);return{top:(g.top-w.top+m.top)/y.y,bottom:(w.bottom-g.bottom+m.bottom)/y.y,left:(g.left-w.left+m.left)/y.x,right:(w.right-g.right+m.right)/y.x}}function tc(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function nc(e){return _s.some(t=>e[t]>=0)}const rc=/* @__PURE__ */new Set(["left","top"]);function oc(){return"undefined"!=typeof window}function ac(e){return sc(e)?(e.nodeName||"").toLowerCase():"#document"}function ic(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function lc(e){var t;return null==(t=(sc(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function sc(e){return!!oc()&&(e instanceof Node||e instanceof ic(e).Node)}function cc(e){return!!oc()&&(e instanceof Element||e instanceof ic(e).Element)}function dc(e){return!!oc()&&(e instanceof HTMLElement||e instanceof ic(e).HTMLElement)}function uc(e){return!(!oc()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof ic(e).ShadowRoot)}function pc(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Cc(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function fc(e){return/^(table|td|th)$/.test(ac(e))}function mc(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const hc=/transform|translate|scale|rotate|perspective|filter/,gc=/paint|layout|strict|content/,bc=e=>!!e&&"none"!==e;let vc;function yc(e){const t=cc(e)?Cc(e):e;return bc(t.transform)||bc(t.translate)||bc(t.scale)||bc(t.rotate)||bc(t.perspective)||!wc()&&(bc(t.backdropFilter)||bc(t.filter))||hc.test(t.willChange||"")||gc.test(t.contain||"")}function wc(){return null==vc&&(vc="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),vc}function xc(e){return/^(html|body|#document)$/.test(ac(e))}function Cc(e){return ic(e).getComputedStyle(e)}function kc(e){return cc(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Nc(e){if("html"===ac(e))return e;const t=e.assignedSlot||e.parentNode||uc(e)&&e.host||lc(e);return uc(t)?t.host:t}function Ac(e){const t=Nc(e);return xc(t)?e.ownerDocument?e.ownerDocument.body:e.body:dc(t)&&pc(t)?t:Ac(t)}function Mc(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Ac(e),a=o===(null==(r=e.ownerDocument)?void 0:r.body),i=ic(o);if(a){const e=Sc(i);return t.concat(i,i.visualViewport||[],pc(o)?o:[],e&&n?Mc(e):[])}return t.concat(o,Mc(o,[],n))}function Sc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Rc(e){const t=Cc(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=dc(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,l=Ls(n)!==a||Ls(r)!==i;return l&&(n=a,r=i),{width:n,height:r,$:l}}function Ec(e){return cc(e)?e:e.contextElement}function _c(e){const t=Ec(e);if(!dc(t))return zs(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Rc(t);let i=(a?Ls(n.width):n.width)/r,l=(a?Ls(n.height):n.height)/o;return i&&Number.isFinite(i)||(i=1),l&&Number.isFinite(l)||(l=1),{x:i,y:l}}const Pc=/* @__PURE__ */zs(0);function Dc(e){const t=ic(e);return wc()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Pc}function Lc(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),a=Ec(e);let i=zs(1);t&&(r?cc(r)&&(i=_c(r)):i=_c(e));const l=((e,t,n)=>(void 0===t&&(t=!1),!(!n||t&&n!==ic(e))&&t))(a,n,r)?Dc(a):zs(0);let s=(o.left+l.x)/i.x,c=(o.top+l.y)/i.y,d=o.width/i.x,u=o.height/i.y;if(a){const e=ic(a),t=r&&cc(r)?ic(r):r;let n=e,o=Sc(n);for(;o&&r&&t!==n;){const e=_c(o),t=o.getBoundingClientRect(),r=Cc(o),a=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,d*=e.x,u*=e.y,s+=a,c+=i,n=ic(o),o=Sc(n)}}return Zs({width:d,height:u,x:s,y:c})}function Oc(e,t){const n=kc(e).scrollLeft;return t?t.left+n:Lc(lc(e)).left+n}function zc(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Oc(e,n),y:n.top+t.scrollTop}}function Tc(e,t,n){let r;if("viewport"===t)r=((e,t)=>{const n=ic(e),r=lc(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,l=0,s=0;if(o){a=o.width,i=o.height;const e=wc();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}const c=Oc(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(r.clientWidth-t.clientWidth-o);i<=25&&(a-=i)}else c<=25&&(a+=c);return{width:a,height:i,x:l,y:s}})(e,n);else if("document"===t)r=(e=>{const t=lc(e),n=kc(e),r=e.ownerDocument.body,o=Ds(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Ds(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Oc(e);const l=-n.scrollTop;return"rtl"===Cc(r).direction&&(i+=Ds(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:l}})(lc(e));else if(cc(t))r=((e,t)=>{const n=Lc(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=dc(e)?_c(e):zs(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:o*a.x,y:r*a.y}})(t,n);else{const n=Dc(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Zs(r)}function Ic(e,t){const n=Nc(e);return!(n===t||!cc(n)||xc(n))&&("fixed"===Cc(n).position||Ic(n,t))}function Wc(e,t,n){const r=dc(t),o=lc(t),a="fixed"===n,i=Lc(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const s=zs(0);function c(){s.x=Oc(o)}if(r||!r&&!a)if(("body"!==ac(t)||pc(o))&&(l=kc(t)),r){const e=Lc(t,!0,a,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&c();a&&!r&&o&&c();const d=!o||r||a?zs(0):zc(o,l);return{x:i.left+l.scrollLeft-s.x-d.x,y:i.top+l.scrollTop-s.y-d.y,width:i.width,height:i.height}}function Fc(e){return"static"===Cc(e).position}function Bc(e,t){if(!dc(e)||"fixed"===Cc(e).position)return null;if(t)return t(e);let n=e.offsetParent;return lc(e)===n&&(n=n.ownerDocument.body),n}function jc(e,t){const n=ic(e);if(mc(e))return n;if(!dc(e)){let t=Nc(e);for(;t&&!xc(t);){if(cc(t)&&!Fc(t))return t;t=Nc(t)}return n}let r=Bc(e,t);for(;r&&fc(r)&&Fc(r);)r=Bc(r,t);return r&&xc(r)&&Fc(r)&&!yc(r)?n:r||(e=>{let t=Nc(e);for(;dc(t)&&!xc(t);){if(yc(t))return t;if(mc(t))return null;t=Nc(t)}return null})(e)||n}const Hc={convertOffsetParentRelativeRectToViewportRelativeRect(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a="fixed"===o,i=lc(r),l=!!t&&mc(t.floating);if(r===i||l&&a)return n;let s={scrollLeft:0,scrollTop:0},c=zs(1);const d=zs(0),u=dc(r);if((u||!u&&!a)&&(("body"!==ac(r)||pc(i))&&(s=kc(r)),u)){const e=Lc(r);c=_c(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}const p=!i||u||a?zs(0):zc(i,s);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+d.x+p.x,y:n.y*c.y-s.scrollTop*c.y+d.y+p.y}},getDocumentElement:lc,getClippingRect(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[..."clippingAncestors"===n?mc(t)?[]:((e,t)=>{const n=t.get(e);if(n)return n;let r=Mc(e,[],!1).filter(e=>cc(e)&&"body"!==ac(e)),o=null;const a="fixed"===Cc(e).position;let i=a?Nc(e):e;for(;cc(i)&&!xc(i);){const t=Cc(i),n=yc(i);n||"fixed"!==t.position||(o=null),(a?!n&&!o:!n&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||pc(i)&&!n&&Ic(e,i))?r=r.filter(e=>e!==i):o=t,i=Nc(i)}return t.set(e,r),r})(t,this._c):[].concat(n),r],i=Tc(t,a[0],o);let l=i.top,s=i.right,c=i.bottom,d=i.left;for(let u=1;u<a.length;u++){const e=Tc(t,a[u],o);l=Ds(e.top,l),s=Ps(e.right,s),c=Ps(e.bottom,c),d=Ds(e.left,d)}return{width:s-d,height:c-l,x:d,y:l}},getOffsetParent:jc,async getElementRects(e){const t=this.getOffsetParent||jc,n=this.getDimensions,r=await n(e.floating);return{reference:Wc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects(e){return Array.from(e.getClientRects())},getDimensions(e){const{width:t,height:n}=Rc(e);return{width:t,height:n}},getScale:_c,isElement:cc,isRTL(e){return"rtl"===Cc(e).direction}};function Yc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}const $c=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:i,elements:l,middlewareData:s}=t,{element:c,padding:d=0}=Ws(e,t)||{};if(null==c)return{};const u=Xs(d),p={x:n,y:r},f=$s(o),m=Hs(f),h=await i.getDimensions(c),g="y"===f,b=g?"top":"left",v=g?"bottom":"right",y=g?"clientHeight":"clientWidth",w=a.reference[m]+a.reference[f]-p[f]-a.floating[m],x=p[f]-a.reference[f],C=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c));let k=C?C[y]:0;k&&await(null==i.isElement?void 0:i.isElement(C))||(k=l.floating[y]||a.floating[m]);const N=w/2-x/2,A=k/2-h[m]/2-1,M=Ps(u[b],A),S=Ps(u[v],A),R=M,E=k-h[m]-S,_=k/2-h[m]/2+N,P=Is(R,_,E),D=!s.arrow&&null!=Bs(o)&&_!==P&&a.reference[m]/2-(_<R?M:S)-h[m]/2<0,L=D?_<R?_-R:_-E:0;return{[f]:p[f]+L,data:{[f]:P,centerOffset:_-P-L,...D&&{alignmentOffset:L}},reset:D}}}),Vc=e=>(void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:i}=t,{offset:l=0,mainAxis:s=!0,crossAxis:c=!0}=Ws(e,t),d={x:n,y:r},u=Ys(o),p=js(u);let f=d[p],m=d[u];const h=Ws(l,t),g="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(s){const e="y"===p?"height":"width",t=a.reference[p]-a.floating[e]+g.mainAxis,n=a.reference[p]+a.reference[e]-g.mainAxis;f<t?f=t:f>n&&(f=n)}if(c){var b,v;const e="y"===p?"width":"height",t=rc.has(Fs(o)),n=a.reference[u]-a.floating[e]+(t&&(null==(b=i.offset)?void 0:b[u])||0)+(t?0:g.crossAxis),r=a.reference[u]+a.reference[e]+(t?0:(null==(v=i.offset)?void 0:v[u])||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[p]:f,[u]:m}}});var Gc="undefined"!=typeof document?R:()=>{};function qc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!qc(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||qc(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function Qc(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Uc(e,t){const n=Qc(e);return Math.round(t*n)/n}function Kc(e){const t=x.useRef(e);return Gc(()=>{t.current=e}),t}const Xc=(e,t)=>{const n=(e=>(void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:i,middlewareData:l}=t,s=await(async(e,t)=>{const{placement:n,platform:r,elements:o}=e,a=await(null==r.isRTL?void 0:r.isRTL(o.floating)),i=Fs(n),l=Bs(n),s="y"===Ys(n),c=rc.has(i)?-1:1,d=a&&s?-1:1,u=Ws(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:m}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return l&&"number"==typeof m&&(f="end"===l?-1*m:m),s?{x:f*d,y:p*c}:{x:p*c,y:f*d}})(t,e);return i===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:o+s.x,y:a+s.y,data:{...s,placement:i}}}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}},Zc=(e,t)=>{const n=(e=>(void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:a}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:s={fn(e){let{x:t,y:n}=e;return{x:t,y:n}}},...c}=Ws(e,t),d={x:n,y:r},u=await a.detectOverflow(t,c),p=Ys(Fs(o)),f=js(p);let m=d[f],h=d[p];i&&(m=Is(m+u["y"===f?"top":"left"],m,m-u["y"===f?"bottom":"right"])),l&&(h=Is(h+u["y"===p?"top":"left"],h,h-u["y"===p?"bottom":"right"]));const g=s.fn({...t,[f]:m,[p]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[f]:i,[p]:l}}}}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}},Jc=(e,t)=>({fn:Vc(e).fn,options:[e,t]}),ed=(e,t)=>{const n=(e=>(void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:i,initialPlacement:l,platform:s,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...g}=Ws(e,t);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};const b=Fs(o),v=Ys(l),y=Fs(l)===l,w=await(null==s.isRTL?void 0:s.isRTL(c.floating)),x=p||(y||!h?[Ks(l)]:(e=>{const t=Ks(e);return[Vs(e),t,Vs(t)]})(l)),C="none"!==m;!p&&C&&x.push(...((e,t,n,r)=>{const o=Bs(e);let a=((e,t,n)=>{switch(e){case"top":case"bottom":return n?t?qs:Gs:t?Gs:qs;case"left":case"right":return t?Qs:Us;default:return[]}})(Fs(e),"start"===n,r);return o&&(a=a.map(e=>e+"-"+o),t&&(a=a.concat(a.map(Vs)))),a})(l,h,m,w));const k=[l,...x],N=await s.detectOverflow(t,g),A=[];let M=(null==(r=a.flip)?void 0:r.overflows)||[];if(d&&A.push(N[b]),u){const e=((e,t,n)=>{void 0===n&&(n=!1);const r=Bs(e),o=$s(e),a=Hs(o);let i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Ks(i)),[i,Ks(i)]})(o,i,w);A.push(N[e[0]],N[e[1]])}if(M=[...M,{placement:o,overflows:A}],!A.every(e=>e<=0)){var S,R;const e=((null==(S=a.flip)?void 0:S.index)||0)+1,t=k[e];if(t&&("alignment"!==u||v===Ys(t)||M.every(e=>Ys(e.placement)!==v||e.overflows[0]>0)))return{data:{index:e,overflows:M},reset:{placement:t}};let n=null==(R=M.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:R.placement;if(!n)switch(f){case"bestFit":{var E;const e=null==(E=M.filter(e=>{if(C){const t=Ys(e.placement);return t===v||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:E[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}},td=(e,t)=>{const n=(e=>(void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:i,elements:l}=t,{apply:s=()=>{},...c}=Ws(e,t),d=await i.detectOverflow(t,c),u=Fs(o),p=Bs(o),f="y"===Ys(o),{width:m,height:h}=a.floating;let g,b;"top"===u||"bottom"===u?(g=u,b=p===(await(null==i.isRTL?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(b=u,g="end"===p?"top":"bottom");const v=h-d.top-d.bottom,y=m-d.left-d.right;let w=Ps(h-d[g],v),x=Ps(m-d[b],y);if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(x=y),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(w=v),!t.middlewareData.shift&&!p){const e=Ds(d.left,0),t=Ds(d.right,0),n=Ds(d.top,0),r=Ds(d.bottom,0);f?x=m-2*(0!==e||0!==t?e+t:Ds(d.left,d.right)):w=h-2*(0!==n||0!==r?n+r:Ds(d.top,d.bottom))}await s({...t,availableWidth:x,availableHeight:w});const C=await i.getDimensions(l.floating);return m!==C.width||h!==C.height?{reset:{rects:!0}}:{}}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}},nd=(e,t)=>{const n=(e=>(void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...a}=Ws(e,t);switch(o){case"referenceHidden":{const e=tc(await r.detectOverflow(t,{...a,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:nc(e)}}}case"escaped":{const e=tc(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:nc(e)}}}default:return{}}}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}},rd=(e,t)=>{const n=(e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&{}.hasOwnProperty.call(n,"current")?null!=n.current?$c({element:n.current,padding:r}).fn(t):{}:n?$c({element:n,padding:r}).fn(t):{}}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}};var od=x.forwardRef((t,n)=>{const{children:r,width:o=10,height:a=5,...i}=t;/* @__PURE__ */
|
|
130
|
-
return e(U.svg,{...i,ref:n,width:o,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:/* @__PURE__ */e("polygon",{points:"0,0 30,0 15,10"})})});
|
|
131
|
-
return e(
|
|
129
|
+
/* @__PURE__ */e("div",{className:"mt-1 text-xs leading-[1.5] text-gray-700",children:a})]})]})}const Ps=["top","right","bottom","left"],Ds=Math.min,Ls=Math.max,Os=Math.round,zs=Math.floor,Ts=e=>({x:e,y:e}),Is={left:"right",right:"left",bottom:"top",top:"bottom"};function Ws(e,t,n){return Ls(e,Ds(t,n))}function Fs(e,t){return"function"==typeof e?e(t):e}function Bs(e){return e.split("-")[0]}function js(e){return e.split("-")[1]}function Hs(e){return"x"===e?"y":"x"}function Ys(e){return"y"===e?"height":"width"}function $s(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function Vs(e){return Hs($s(e))}function Gs(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const qs=["left","right"],Qs=["right","left"],Us=["top","bottom"],Ks=["bottom","top"];function Xs(e){const t=Bs(e);return Is[t]+e.slice(t.length)}function Zs(e){return"number"!=typeof e?(e=>({top:0,right:0,bottom:0,left:0,...e}))(e):{top:e,right:e,bottom:e,left:e}}function Js(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function ec(e,t,n){let{reference:r,floating:o}=e;const a=$s(t),i=Vs(t),l=Ys(i),s=Bs(t),c="y"===a,d=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,p=r[l]/2-o[l]/2;let f;switch(s){case"top":f={x:d,y:r.y-o.height};break;case"bottom":f={x:d,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:u};break;case"left":f={x:r.x-o.width,y:u};break;default:f={x:r.x,y:r.y}}switch(js(t)){case"start":f[i]-=p*(n&&c?-1:1);break;case"end":f[i]+=p*(n&&c?-1:1)}return f}async function tc(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:a,rects:i,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:p=!1,padding:f=0}=Fs(t,e),m=Zs(f),h=l[p?"floating"===u?"reference":"floating":u],g=Js(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(h)))||n?h:h.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(l.floating)),boundary:c,rootBoundary:d,strategy:s})),b="floating"===u?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,v=await(null==a.getOffsetParent?void 0:a.getOffsetParent(l.floating)),y=await(null==a.isElement?void 0:a.isElement(v))&&await(null==a.getScale?void 0:a.getScale(v))||{x:1,y:1},w=Js(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:b,offsetParent:v,strategy:s}):b);return{top:(g.top-w.top+m.top)/y.y,bottom:(w.bottom-g.bottom+m.bottom)/y.y,left:(g.left-w.left+m.left)/y.x,right:(w.right-g.right+m.right)/y.x}}function nc(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function rc(e){return Ps.some(t=>e[t]>=0)}const oc=/* @__PURE__ */new Set(["left","top"]);function ac(){return"undefined"!=typeof window}function ic(e){return cc(e)?(e.nodeName||"").toLowerCase():"#document"}function lc(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function sc(e){var t;return null==(t=(cc(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function cc(e){return!!ac()&&(e instanceof Node||e instanceof lc(e).Node)}function dc(e){return!!ac()&&(e instanceof Element||e instanceof lc(e).Element)}function uc(e){return!!ac()&&(e instanceof HTMLElement||e instanceof lc(e).HTMLElement)}function pc(e){return!(!ac()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof lc(e).ShadowRoot)}function fc(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=kc(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function mc(e){return/^(table|td|th)$/.test(ic(e))}function hc(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const gc=/transform|translate|scale|rotate|perspective|filter/,bc=/paint|layout|strict|content/,vc=e=>!!e&&"none"!==e;let yc;function wc(e){const t=dc(e)?kc(e):e;return vc(t.transform)||vc(t.translate)||vc(t.scale)||vc(t.rotate)||vc(t.perspective)||!xc()&&(vc(t.backdropFilter)||vc(t.filter))||gc.test(t.willChange||"")||bc.test(t.contain||"")}function xc(){return null==yc&&(yc="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),yc}function Cc(e){return/^(html|body|#document)$/.test(ic(e))}function kc(e){return lc(e).getComputedStyle(e)}function Nc(e){return dc(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ac(e){if("html"===ic(e))return e;const t=e.assignedSlot||e.parentNode||pc(e)&&e.host||sc(e);return pc(t)?t.host:t}function Mc(e){const t=Ac(e);return Cc(t)?e.ownerDocument?e.ownerDocument.body:e.body:uc(t)&&fc(t)?t:Mc(t)}function Sc(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Mc(e),a=o===(null==(r=e.ownerDocument)?void 0:r.body),i=lc(o);if(a){const e=Rc(i);return t.concat(i,i.visualViewport||[],fc(o)?o:[],e&&n?Sc(e):[])}return t.concat(o,Sc(o,[],n))}function Rc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ec(e){const t=kc(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=uc(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,l=Os(n)!==a||Os(r)!==i;return l&&(n=a,r=i),{width:n,height:r,$:l}}function _c(e){return dc(e)?e:e.contextElement}function Pc(e){const t=_c(e);if(!uc(t))return Ts(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Ec(t);let i=(a?Os(n.width):n.width)/r,l=(a?Os(n.height):n.height)/o;return i&&Number.isFinite(i)||(i=1),l&&Number.isFinite(l)||(l=1),{x:i,y:l}}const Dc=/* @__PURE__ */Ts(0);function Lc(e){const t=lc(e);return xc()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Dc}function Oc(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),a=_c(e);let i=Ts(1);t&&(r?dc(r)&&(i=Pc(r)):i=Pc(e));const l=((e,t,n)=>(void 0===t&&(t=!1),!(!n||t&&n!==lc(e))&&t))(a,n,r)?Lc(a):Ts(0);let s=(o.left+l.x)/i.x,c=(o.top+l.y)/i.y,d=o.width/i.x,u=o.height/i.y;if(a){const e=lc(a),t=r&&dc(r)?lc(r):r;let n=e,o=Rc(n);for(;o&&r&&t!==n;){const e=Pc(o),t=o.getBoundingClientRect(),r=kc(o),a=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,d*=e.x,u*=e.y,s+=a,c+=i,n=lc(o),o=Rc(n)}}return Js({width:d,height:u,x:s,y:c})}function zc(e,t){const n=Nc(e).scrollLeft;return t?t.left+n:Oc(sc(e)).left+n}function Tc(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-zc(e,n),y:n.top+t.scrollTop}}function Ic(e,t,n){let r;if("viewport"===t)r=((e,t)=>{const n=lc(e),r=sc(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,l=0,s=0;if(o){a=o.width,i=o.height;const e=xc();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}const c=zc(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(r.clientWidth-t.clientWidth-o);i<=25&&(a-=i)}else c<=25&&(a+=c);return{width:a,height:i,x:l,y:s}})(e,n);else if("document"===t)r=(e=>{const t=sc(e),n=Nc(e),r=e.ownerDocument.body,o=Ls(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Ls(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+zc(e);const l=-n.scrollTop;return"rtl"===kc(r).direction&&(i+=Ls(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:l}})(sc(e));else if(dc(t))r=((e,t)=>{const n=Oc(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=uc(e)?Pc(e):Ts(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:o*a.x,y:r*a.y}})(t,n);else{const n=Lc(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Js(r)}function Wc(e,t){const n=Ac(e);return!(n===t||!dc(n)||Cc(n))&&("fixed"===kc(n).position||Wc(n,t))}function Fc(e,t,n){const r=uc(t),o=sc(t),a="fixed"===n,i=Oc(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const s=Ts(0);function c(){s.x=zc(o)}if(r||!r&&!a)if(("body"!==ic(t)||fc(o))&&(l=Nc(t)),r){const e=Oc(t,!0,a,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&c();a&&!r&&o&&c();const d=!o||r||a?Ts(0):Tc(o,l);return{x:i.left+l.scrollLeft-s.x-d.x,y:i.top+l.scrollTop-s.y-d.y,width:i.width,height:i.height}}function Bc(e){return"static"===kc(e).position}function jc(e,t){if(!uc(e)||"fixed"===kc(e).position)return null;if(t)return t(e);let n=e.offsetParent;return sc(e)===n&&(n=n.ownerDocument.body),n}function Hc(e,t){const n=lc(e);if(hc(e))return n;if(!uc(e)){let t=Ac(e);for(;t&&!Cc(t);){if(dc(t)&&!Bc(t))return t;t=Ac(t)}return n}let r=jc(e,t);for(;r&&mc(r)&&Bc(r);)r=jc(r,t);return r&&Cc(r)&&Bc(r)&&!wc(r)?n:r||(e=>{let t=Ac(e);for(;uc(t)&&!Cc(t);){if(wc(t))return t;if(hc(t))return null;t=Ac(t)}return null})(e)||n}const Yc={convertOffsetParentRelativeRectToViewportRelativeRect(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a="fixed"===o,i=sc(r),l=!!t&&hc(t.floating);if(r===i||l&&a)return n;let s={scrollLeft:0,scrollTop:0},c=Ts(1);const d=Ts(0),u=uc(r);if((u||!u&&!a)&&(("body"!==ic(r)||fc(i))&&(s=Nc(r)),u)){const e=Oc(r);c=Pc(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}const p=!i||u||a?Ts(0):Tc(i,s);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+d.x+p.x,y:n.y*c.y-s.scrollTop*c.y+d.y+p.y}},getDocumentElement:sc,getClippingRect(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[..."clippingAncestors"===n?hc(t)?[]:((e,t)=>{const n=t.get(e);if(n)return n;let r=Sc(e,[],!1).filter(e=>dc(e)&&"body"!==ic(e)),o=null;const a="fixed"===kc(e).position;let i=a?Ac(e):e;for(;dc(i)&&!Cc(i);){const t=kc(i),n=wc(i);n||"fixed"!==t.position||(o=null),(a?!n&&!o:!n&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||fc(i)&&!n&&Wc(e,i))?r=r.filter(e=>e!==i):o=t,i=Ac(i)}return t.set(e,r),r})(t,this._c):[].concat(n),r],i=Ic(t,a[0],o);let l=i.top,s=i.right,c=i.bottom,d=i.left;for(let u=1;u<a.length;u++){const e=Ic(t,a[u],o);l=Ls(e.top,l),s=Ds(e.right,s),c=Ds(e.bottom,c),d=Ls(e.left,d)}return{width:s-d,height:c-l,x:d,y:l}},getOffsetParent:Hc,async getElementRects(e){const t=this.getOffsetParent||Hc,n=this.getDimensions,r=await n(e.floating);return{reference:Fc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects(e){return Array.from(e.getClientRects())},getDimensions(e){const{width:t,height:n}=Ec(e);return{width:t,height:n}},getScale:Pc,isElement:dc,isRTL(e){return"rtl"===kc(e).direction}};function $c(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}const Vc=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:i,elements:l,middlewareData:s}=t,{element:c,padding:d=0}=Fs(e,t)||{};if(null==c)return{};const u=Zs(d),p={x:n,y:r},f=Vs(o),m=Ys(f),h=await i.getDimensions(c),g="y"===f,b=g?"top":"left",v=g?"bottom":"right",y=g?"clientHeight":"clientWidth",w=a.reference[m]+a.reference[f]-p[f]-a.floating[m],x=p[f]-a.reference[f],C=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c));let k=C?C[y]:0;k&&await(null==i.isElement?void 0:i.isElement(C))||(k=l.floating[y]||a.floating[m]);const N=w/2-x/2,A=k/2-h[m]/2-1,M=Ds(u[b],A),S=Ds(u[v],A),R=M,E=k-h[m]-S,_=k/2-h[m]/2+N,P=Ws(R,_,E),D=!s.arrow&&null!=js(o)&&_!==P&&a.reference[m]/2-(_<R?M:S)-h[m]/2<0,L=D?_<R?_-R:_-E:0;return{[f]:p[f]+L,data:{[f]:P,centerOffset:_-P-L,...D&&{alignmentOffset:L}},reset:D}}}),Gc=e=>(void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:i}=t,{offset:l=0,mainAxis:s=!0,crossAxis:c=!0}=Fs(e,t),d={x:n,y:r},u=$s(o),p=Hs(u);let f=d[p],m=d[u];const h=Fs(l,t),g="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(s){const e="y"===p?"height":"width",t=a.reference[p]-a.floating[e]+g.mainAxis,n=a.reference[p]+a.reference[e]-g.mainAxis;f<t?f=t:f>n&&(f=n)}if(c){var b,v;const e="y"===p?"width":"height",t=oc.has(Bs(o)),n=a.reference[u]-a.floating[e]+(t&&(null==(b=i.offset)?void 0:b[u])||0)+(t?0:g.crossAxis),r=a.reference[u]+a.reference[e]+(t?0:(null==(v=i.offset)?void 0:v[u])||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[p]:f,[u]:m}}});var qc="undefined"!=typeof document?R:()=>{};function Qc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!Qc(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||Qc(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function Uc(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Kc(e,t){const n=Uc(e);return Math.round(t*n)/n}function Xc(e){const t=x.useRef(e);return qc(()=>{t.current=e}),t}const Zc=(e,t)=>{const n=(e=>(void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:i,middlewareData:l}=t,s=await(async(e,t)=>{const{placement:n,platform:r,elements:o}=e,a=await(null==r.isRTL?void 0:r.isRTL(o.floating)),i=Bs(n),l=js(n),s="y"===$s(n),c=oc.has(i)?-1:1,d=a&&s?-1:1,u=Fs(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:m}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return l&&"number"==typeof m&&(f="end"===l?-1*m:m),s?{x:f*d,y:p*c}:{x:p*c,y:f*d}})(t,e);return i===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:o+s.x,y:a+s.y,data:{...s,placement:i}}}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}},Jc=(e,t)=>{const n=(e=>(void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:a}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:s={fn(e){let{x:t,y:n}=e;return{x:t,y:n}}},...c}=Fs(e,t),d={x:n,y:r},u=await a.detectOverflow(t,c),p=$s(Bs(o)),f=Hs(p);let m=d[f],h=d[p];i&&(m=Ws(m+u["y"===f?"top":"left"],m,m-u["y"===f?"bottom":"right"])),l&&(h=Ws(h+u["y"===p?"top":"left"],h,h-u["y"===p?"bottom":"right"]));const g=s.fn({...t,[f]:m,[p]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[f]:i,[p]:l}}}}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}},ed=(e,t)=>({fn:Gc(e).fn,options:[e,t]}),td=(e,t)=>{const n=(e=>(void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:i,initialPlacement:l,platform:s,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...g}=Fs(e,t);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};const b=Bs(o),v=$s(l),y=Bs(l)===l,w=await(null==s.isRTL?void 0:s.isRTL(c.floating)),x=p||(y||!h?[Xs(l)]:(e=>{const t=Xs(e);return[Gs(e),t,Gs(t)]})(l)),C="none"!==m;!p&&C&&x.push(...((e,t,n,r)=>{const o=js(e);let a=((e,t,n)=>{switch(e){case"top":case"bottom":return n?t?Qs:qs:t?qs:Qs;case"left":case"right":return t?Us:Ks;default:return[]}})(Bs(e),"start"===n,r);return o&&(a=a.map(e=>e+"-"+o),t&&(a=a.concat(a.map(Gs)))),a})(l,h,m,w));const k=[l,...x],N=await s.detectOverflow(t,g),A=[];let M=(null==(r=a.flip)?void 0:r.overflows)||[];if(d&&A.push(N[b]),u){const e=((e,t,n)=>{void 0===n&&(n=!1);const r=js(e),o=Vs(e),a=Ys(o);let i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Xs(i)),[i,Xs(i)]})(o,i,w);A.push(N[e[0]],N[e[1]])}if(M=[...M,{placement:o,overflows:A}],!A.every(e=>e<=0)){var S,R;const e=((null==(S=a.flip)?void 0:S.index)||0)+1,t=k[e];if(t&&("alignment"!==u||v===$s(t)||M.every(e=>$s(e.placement)!==v||e.overflows[0]>0)))return{data:{index:e,overflows:M},reset:{placement:t}};let n=null==(R=M.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:R.placement;if(!n)switch(f){case"bestFit":{var E;const e=null==(E=M.filter(e=>{if(C){const t=$s(e.placement);return t===v||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:E[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}},nd=(e,t)=>{const n=(e=>(void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:i,elements:l}=t,{apply:s=()=>{},...c}=Fs(e,t),d=await i.detectOverflow(t,c),u=Bs(o),p=js(o),f="y"===$s(o),{width:m,height:h}=a.floating;let g,b;"top"===u||"bottom"===u?(g=u,b=p===(await(null==i.isRTL?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(b=u,g="end"===p?"top":"bottom");const v=h-d.top-d.bottom,y=m-d.left-d.right;let w=Ds(h-d[g],v),x=Ds(m-d[b],y);if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(x=y),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(w=v),!t.middlewareData.shift&&!p){const e=Ls(d.left,0),t=Ls(d.right,0),n=Ls(d.top,0),r=Ls(d.bottom,0);f?x=m-2*(0!==e||0!==t?e+t:Ls(d.left,d.right)):w=h-2*(0!==n||0!==r?n+r:Ls(d.top,d.bottom))}await s({...t,availableWidth:x,availableHeight:w});const C=await i.getDimensions(l.floating);return m!==C.width||h!==C.height?{reset:{rects:!0}}:{}}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}},rd=(e,t)=>{const n=(e=>(void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...a}=Fs(e,t);switch(o){case"referenceHidden":{const e=nc(await r.detectOverflow(t,{...a,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:rc(e)}}}case"escaped":{const e=nc(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:rc(e)}}}default:return{}}}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}},od=(e,t)=>{const n=(e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&{}.hasOwnProperty.call(n,"current")?null!=n.current?Vc({element:n.current,padding:r}).fn(t):{}:n?Vc({element:n,padding:r}).fn(t):{}}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}};var ad=x.forwardRef((t,n)=>{const{children:r,width:o=10,height:a=5,...i}=t;/* @__PURE__ */
|
|
130
|
+
return e(U.svg,{...i,ref:n,width:o,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:/* @__PURE__ */e("polygon",{points:"0,0 30,0 15,10"})})});ad.displayName="Arrow";var id=ad,ld="Popper",[sd,cd]=O(ld),[dd,ud]=sd(ld),pd=t=>{const{__scopePopper:n,children:r}=t,[o,a]=x.useState(null);/* @__PURE__ */
|
|
131
|
+
return e(dd,{scope:n,anchor:o,onAnchorChange:a,children:r})};pd.displayName=ld;var fd="PopperAnchor",md=x.forwardRef((t,n)=>{const{__scopePopper:r,virtualRef:o,...a}=t,i=ud(fd,r),l=x.useRef(null),s=W(n,l),c=x.useRef(null);return x.useEffect(()=>{const e=c.current;c.current=o?.current||l.current,e!==c.current&&i.onAnchorChange(c.current)}),o?null:/* @__PURE__ */e(U.div,{...a,ref:s})});md.displayName=fd;var hd="PopperContent",[gd,bd]=sd(hd),vd=x.forwardRef((t,n)=>{const{__scopePopper:r,side:o="bottom",sideOffset:a=0,align:i="center",alignOffset:l=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:u=0,sticky:p="partial",hideWhenDetached:f=!1,updatePositionStrategy:m="optimized",onPlaced:h,...g}=t,b=ud(hd,r),[v,y]=x.useState(null),w=W(n,e=>y(e)),[C,k]=x.useState(null),N=rs(C),A=N?.width??0,M=N?.height??0,S=o+("center"!==i?"-"+i:""),R="number"==typeof u?u:{top:0,right:0,bottom:0,left:0,...u},E=Array.isArray(d)?d:[d],P=E.length>0,D={padding:R,boundary:E.filter(Cd),altBoundary:P},{refs:L,floatingStyles:O,placement:z,isPositioned:T,middlewareData:I}=(e=>{void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:i}={},transform:l=!0,whileElementsMounted:s,open:c}=e,[d,u]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=x.useState(r);Qc(p,r)||f(r);const[m,h]=x.useState(null),[g,b]=x.useState(null),v=x.useCallback(e=>{e!==k.current&&(k.current=e,h(e))},[]),y=x.useCallback(e=>{e!==N.current&&(N.current=e,b(e))},[]),w=a||m,C=i||g,k=x.useRef(null),N=x.useRef(null),A=x.useRef(d),M=null!=s,S=Xc(s),R=Xc(o),E=Xc(c),P=x.useCallback(()=>{if(!k.current||!N.current)return;const e={placement:t,strategy:n,middleware:p};R.current&&(e.platform=R.current),((e,t,n)=>{const r={platform:Yc,...n},o={...r.platform,_c:/* @__PURE__ */new Map};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,l=i.detectOverflow?i:{...i,detectOverflow:tc},s=await(null==i.isRTL?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=ec(c,r,s),p=r,f=0;const m={};for(let h=0;h<a.length;h++){const n=a[h];if(!n)continue;const{name:g,fn:b}=n,{x:v,y:y,data:w,reset:x}=await b({x:d,y:u,initialPlacement:r,placement:p,strategy:o,middlewareData:m,rects:c,platform:l,elements:{reference:e,floating:t}});d=null!=v?v:d,u=null!=y?y:u,m[g]={...m[g],...w},x&&f<50&&(f++,"object"==typeof x&&(x.placement&&(p=x.placement),x.rects&&(c=!0===x.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):x.rects),({x:d,y:u}=ec(c,p,s))),h=-1)}return{x:d,y:u,placement:p,strategy:o,middlewareData:m}})(e,t,{...r,platform:o})})(k.current,N.current,e).then(e=>{const t={...e,isPositioned:!1!==E.current};D.current&&!Qc(A.current,t)&&(A.current=t,_.flushSync(()=>{u(t)}))})},[p,t,n,R,E]);qc(()=>{!1===c&&A.current.isPositioned&&(A.current.isPositioned=!1,u(e=>({...e,isPositioned:!1})))},[c]);const D=x.useRef(!1);qc(()=>(D.current=!0,()=>{D.current=!1}),[]),qc(()=>{if(w&&(k.current=w),C&&(N.current=C),w&&C){if(S.current)return S.current(w,C,P);P()}},[w,C,P,S,M]);const L=x.useMemo(()=>({reference:k,floating:N,setReference:v,setFloating:y}),[v,y]),O=x.useMemo(()=>({reference:w,floating:C}),[w,C]),z=x.useMemo(()=>{const e={position:n,left:0,top:0};if(!O.floating)return e;const t=Kc(O.floating,d.x),r=Kc(O.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...Uc(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,l,O.floating,d.x,d.y]);return x.useMemo(()=>({...d,update:P,refs:L,elements:O,floatingStyles:z}),[d,P,L,O,z])})({strategy:"fixed",placement:S,whileElementsMounted(...e){return((e,t,n,r)=>{void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,c=_c(e),d=o||a?[...c?Sc(c):[],...t?Sc(t):[]]:[];d.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),a&&e.addEventListener("resize",n)});const u=c&&l?((e,t)=>{let n,r=null;const o=sc(e);function a(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function i(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),a();const c=e.getBoundingClientRect(),{left:d,top:u,width:p,height:f}=c;if(l||t(),!p||!f)return;const m={rootMargin:-zs(u)+"px "+-zs(o.clientWidth-(d+p))+"px "+-zs(o.clientHeight-(u+f))+"px "+-zs(d)+"px",threshold:Ls(0,Ds(1,s))||1};let h=!0;function g(t){const r=t[0].intersectionRatio;if(r!==s){if(!h)return i();r?i(!1,r):n=setTimeout(()=>{i(!1,1e-7)},1e3)}1!==r||$c(c,e.getBoundingClientRect())||i(),h=!1}try{r=new IntersectionObserver(g,{...m,root:o.ownerDocument})}catch(b){r=new IntersectionObserver(g,m)}r.observe(e)}(!0),a})(c,n):null;let p,f=-1,m=null;i&&(m=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),n()}),c&&!s&&m.observe(c),t&&m.observe(t));let h=s?Oc(e):null;return s&&function t(){const r=Oc(e);h&&!$c(h,r)&&n(),h=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach(e=>{o&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)}),null==u||u(),null==(e=m)||e.disconnect(),m=null,s&&cancelAnimationFrame(p)}})(...e,{animationFrame:"always"===m})},elements:{reference:b.anchor},middleware:[Zc({mainAxis:a+M,alignmentAxis:l}),c&&Jc({mainAxis:!0,crossAxis:!1,limiter:"partial"===p?ed():void 0,...D}),c&&td({...D}),nd({...D,apply({elements:e,rects:t,availableWidth:n,availableHeight:r}){const{width:o,height:a}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${o}px`),i.setProperty("--radix-popper-anchor-height",`${a}px`)}}),C&&od({element:C,padding:s}),kd({arrowWidth:A,arrowHeight:M}),f&&rd({strategy:"referenceHidden",...D})]}),[F,B]=Nd(z),j=ar(h);G(()=>{T&&j?.()},[T,j]);const H=I.arrow?.x,Y=I.arrow?.y,$=0!==I.arrow?.centerOffset,[V,q]=x.useState();return G(()=>{v&&q(window.getComputedStyle(v).zIndex)},[v]),/* @__PURE__ */e("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...O,transform:T?O.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:V,"--radix-popper-transform-origin":[I.transformOrigin?.x,I.transformOrigin?.y].join(" "),...I.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:/* @__PURE__ */e(gd,{scope:r,placedSide:F,onArrowChange:k,arrowX:H,arrowY:Y,shouldHideArrow:$,children:/* @__PURE__ */e(U.div,{"data-side":F,"data-align":B,...g,ref:w,style:{...g.style,animation:T?void 0:"none"}})})})});vd.displayName=hd;var yd="PopperArrow",wd={top:"bottom",right:"left",bottom:"top",left:"right"},xd=x.forwardRef((t,n)=>{const{__scopePopper:r,...o}=t,a=bd(yd,r),i=wd[a.placedSide];
|
|
132
132
|
/* @__PURE__ */
|
|
133
|
-
return e("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:/* @__PURE__ */e(
|
|
134
|
-
return e(
|
|
135
|
-
return e(
|
|
136
|
-
return e(K,{present:o||i.open,children:/* @__PURE__ */e(i.modal
|
|
137
|
-
return e(
|
|
138
|
-
return e(U.button,{type:"button",...o,ref:n,onClick:V(t.onClick,()=>a.onOpenChange(!1))})}).displayName=
|
|
139
|
-
return e(
|
|
140
|
-
/* @__PURE__ */e(zn,{size:"caption3",weight:"bold",className:"text-gray-700",children:t}),o?/* @__PURE__ */e(zn,{size:"caption3",weight:"bold",className:"text-brand",children:"*"}):null,r?/* @__PURE__ */e(zn,{size:"caption3",weight:"regular",className:"text-gray-500",children:r}):null]}):null}const
|
|
133
|
+
return e("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:/* @__PURE__ */e(id,{...o,ref:n,style:{...o.style,display:"block"}})})});function Cd(e){return null!==e}xd.displayName=yd;var kd=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,a=0!==o.arrow?.centerOffset,i=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[s,c]=Nd(n),d={start:"0%",center:"50%",end:"100%"}[c],u=(o.arrow?.x??0)+i/2,p=(o.arrow?.y??0)+l/2;let f="",m="";return"bottom"===s?(f=a?d:`${u}px`,m=-l+"px"):"top"===s?(f=a?d:`${u}px`,m=`${r.floating.height+l}px`):"right"===s?(f=-l+"px",m=a?d:`${p}px`):"left"===s&&(f=`${r.floating.width+l}px`,m=a?d:`${p}px`),{data:{x:f,y:m}}}});function Nd(e){const[t,n="center"]=e.split("-");return[t,n]}var Ad=pd,Md=md,Sd=vd,Rd=xd,Ed="Popover",[_d]=O(Ed,[cd]),Pd=cd(),[Dd,Ld]=_d(Ed),Od=t=>{const{__scopePopover:n,children:r,open:o,defaultOpen:a,onOpenChange:i,modal:l=!1}=t,s=Pd(n),c=x.useRef(null),[d,u]=x.useState(!1),[p,f]=Q({prop:o,defaultProp:a??!1,onChange:i,caller:Ed});/* @__PURE__ */
|
|
134
|
+
return e(Ad,{...s,children:/* @__PURE__ */e(Dd,{scope:n,contentId:ee(),triggerRef:c,open:p,onOpenChange:f,onOpenToggle:x.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:d,onCustomAnchorAdd:x.useCallback(()=>u(!0),[]),onCustomAnchorRemove:x.useCallback(()=>u(!1),[]),modal:l,children:r})})};Od.displayName=Ed;var zd="PopoverAnchor";x.forwardRef((t,n)=>{const{__scopePopover:r,...o}=t,a=Ld(zd,r),i=Pd(r),{onCustomAnchorAdd:l,onCustomAnchorRemove:s}=a;return x.useEffect(()=>(l(),()=>s()),[l,s]),/* @__PURE__ */e(Md,{...i,...o,ref:n})}).displayName=zd;var Td="PopoverTrigger",Id=x.forwardRef((t,n)=>{const{__scopePopover:r,...o}=t,a=Ld(Td,r),i=Pd(r),l=W(n,a.triggerRef),s=/* @__PURE__ */e(U.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Ud(a.open),...o,ref:l,onClick:V(t.onClick,a.onOpenToggle)});return a.hasCustomAnchor?s:/* @__PURE__ */e(Md,{asChild:!0,...i,children:s})});Id.displayName=Td;var Wd="PopoverPortal",[Fd,Bd]=_d(Wd,{forceMount:void 0}),jd=t=>{const{__scopePopover:n,forceMount:r,children:o,container:a}=t,i=Ld(Wd,n);/* @__PURE__ */
|
|
135
|
+
return e(Fd,{scope:n,forceMount:r,children:/* @__PURE__ */e(K,{present:r||i.open,children:/* @__PURE__ */e(Cr,{asChild:!0,container:a,children:o})})})};jd.displayName=Wd;var Hd="PopoverContent",Yd=x.forwardRef((t,n)=>{const r=Bd(Hd,t.__scopePopover),{forceMount:o=r.forceMount,...a}=t,i=Ld(Hd,t.__scopePopover);/* @__PURE__ */
|
|
136
|
+
return e(K,{present:o||i.open,children:/* @__PURE__ */e(i.modal?Vd:Gd,{...a,ref:n})})});Yd.displayName=Hd;var $d=/* @__PURE__ */F("PopoverContent.RemoveScroll"),Vd=x.forwardRef((t,n)=>{const r=Ld(Hd,t.__scopePopover),o=x.useRef(null),a=W(n,o),i=x.useRef(!1);return x.useEffect(()=>{const e=o.current;if(e)return mo(e)},[]),/* @__PURE__ */e(lo,{as:$d,allowPinchZoom:!0,children:/* @__PURE__ */e(qd,{...t,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:V(t.onCloseAutoFocus,e=>{e.preventDefault(),i.current||r.triggerRef.current?.focus()}),onPointerDownOutside:V(t.onPointerDownOutside,e=>{const t=e.detail.originalEvent;i.current=2===t.button||0===t.button&&!0===t.ctrlKey},{checkForDefaultPrevented:!1}),onFocusOutside:V(t.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),Gd=x.forwardRef((t,n)=>{const r=Ld(Hd,t.__scopePopover),o=x.useRef(!1),a=x.useRef(!1);/* @__PURE__ */
|
|
137
|
+
return e(qd,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus(e){t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||r.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,a.current=!1},onInteractOutside(e){t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(a.current=!0));const n=e.target,i=r.triggerRef.current?.contains(n);i&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&a.current&&e.preventDefault()}})}),qd=x.forwardRef((t,n)=>{const{__scopePopover:r,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:u,...p}=t,f=Ld(Hd,r),m=Pd(r);return Nr(),/* @__PURE__ */e(hr,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:i,children:/* @__PURE__ */e(cr,{asChild:!0,disableOutsidePointerEvents:l,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:d,onDismiss(){return f.onOpenChange(!1)},children:/* @__PURE__ */e(Sd,{"data-state":Ud(f.open),role:"dialog",id:f.contentId,...m,...p,ref:n,style:{...p.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Qd="PopoverClose";function Ud(e){return e?"open":"closed"}x.forwardRef((t,n)=>{const{__scopePopover:r,...o}=t,a=Ld(Qd,r);/* @__PURE__ */
|
|
138
|
+
return e(U.button,{type:"button",...o,ref:n,onClick:V(t.onClick,()=>a.onOpenChange(!1))})}).displayName=Qd,x.forwardRef((t,n)=>{const{__scopePopover:r,...o}=t,a=Pd(r);/* @__PURE__ */
|
|
139
|
+
return e(Rd,{...a,...o,ref:n})}).displayName="PopoverArrow";var Kd=Od,Xd=Id,Zd=jd,Jd=Yd;const eu=xn(["w-full transition-[border-color,box-shadow,background-color] duration-150 ease-out outline-none","rounded-2 border border-gray-200 bg-white text-gray-900","placeholder:text-gray-500","hover:border-gray-300","focus-visible:border-brand focus-visible:shadow-[0_0_0_3px_rgba(255,87,34,0.12)]","disabled:cursor-not-allowed disabled:border-gray-200 disabled:bg-gray-100 disabled:text-gray-400","aria-[invalid=true]:border-red-500 aria-[invalid=true]:shadow-[0_0_0_3px_rgba(255,82,82,0.12)]"],{variants:{size:{xs:"h-[26px] text-[11px]",sm:"h-8 text-xs",md:"h-[38px] text-sm",lg:"h-[46px] text-base",xl:"h-[54px] text-[15px]"},hasIconLeft:{true:"",false:""},hasSuffix:{true:"",false:""},multiline:{false:"",true:"h-auto min-h-[80px] resize-y align-top leading-[1.6] rounded-2.5"},state:{default:"",focus:"border-brand shadow-[0_0_0_3px_rgba(255,87,34,0.12)]",filled:"border-gray-300",error:"border-red-500 shadow-[0_0_0_3px_rgba(255,82,82,0.12)]",disabled:"cursor-not-allowed border-gray-200 bg-gray-100 text-gray-400"}},compoundVariants:[{multiline:!1,hasIconLeft:!1,hasSuffix:!1,size:"xs",class:"px-2.5"},{multiline:!1,hasIconLeft:!1,hasSuffix:!1,size:"sm",class:"px-3"},{multiline:!1,hasIconLeft:!1,hasSuffix:!1,size:"md",class:"px-3.5"},{multiline:!1,hasIconLeft:!1,hasSuffix:!1,size:"lg",class:"px-4"},{multiline:!1,hasIconLeft:!1,hasSuffix:!1,size:"xl",class:"px-[18px]"},{multiline:!1,hasIconLeft:!0,hasSuffix:!1,size:"xs",class:"pl-9 pr-2.5"},{multiline:!1,hasIconLeft:!0,hasSuffix:!1,size:"sm",class:"pl-9 pr-3"},{multiline:!1,hasIconLeft:!0,hasSuffix:!1,size:"md",class:"pl-9 pr-3.5"},{multiline:!1,hasIconLeft:!0,hasSuffix:!1,size:"lg",class:"pl-9 pr-4"},{multiline:!1,hasIconLeft:!0,hasSuffix:!1,size:"xl",class:"pl-9 pr-[18px]"},{multiline:!1,hasIconLeft:!1,hasSuffix:!0,size:"xs",class:"pl-2.5 pr-9"},{multiline:!1,hasIconLeft:!1,hasSuffix:!0,size:"sm",class:"pl-3 pr-9"},{multiline:!1,hasIconLeft:!1,hasSuffix:!0,size:"md",class:"pl-3.5 pr-9"},{multiline:!1,hasIconLeft:!1,hasSuffix:!0,size:"lg",class:"pl-4 pr-9"},{multiline:!1,hasIconLeft:!1,hasSuffix:!0,size:"xl",class:"pl-[18px] pr-9"},{multiline:!1,hasIconLeft:!0,hasSuffix:!0,class:"pl-9 pr-9"},{multiline:!0,size:"xs",class:"p-2.5"},{multiline:!0,size:"sm",class:"p-3"},{multiline:!0,size:"md",class:"p-3.5"},{multiline:!0,size:"lg",class:"p-4"},{multiline:!0,size:"xl",class:"p-[18px]"}],defaultVariants:{size:"md",hasIconLeft:!1,hasSuffix:!1,multiline:!1,state:"default"}});function tu({label:t,labelHint:r,required:o,htmlFor:a}){return t?/* @__PURE__ */n("label",{htmlFor:a,className:"mb-1.5 inline-flex items-center gap-1.5",children:[
|
|
140
|
+
/* @__PURE__ */e(zn,{size:"caption3",weight:"bold",className:"text-gray-700",children:t}),o?/* @__PURE__ */e(zn,{size:"caption3",weight:"bold",className:"text-brand",children:"*"}):null,r?/* @__PURE__ */e(zn,{size:"caption3",weight:"regular",className:"text-gray-500",children:r}):null]}):null}const nu=x.forwardRef(({className:t,size:r,state:o,label:a,labelHint:i,helper:l,error:s,type:c,iconLeft:d,iconRight:u,suffix:p,multiline:f=!1,rows:m=8,cols:h,required:g,disabled:b,id:v,...y},w)=>{const x=Boolean(d)&&!f,C=p??u,k=Boolean(C)&&!f,N=s?"error":b?"disabled":o,A=fn(eu({size:r,hasIconLeft:x,hasSuffix:k,multiline:f,state:N}),t);/* @__PURE__ */
|
|
141
141
|
return n("div",{className:"flex w-full flex-col",children:[
|
|
142
|
-
/* @__PURE__ */e(
|
|
143
|
-
/* @__PURE__ */n("div",{className:"relative w-full",children:[x&&/* @__PURE__ */e("span",{"aria-hidden":!0,className:fn("pointer-events-none absolute top-1/2 left-3 flex -translate-y-1/2 items-center","focus"===N?"text-brand":"text-gray-400"),children:d}),k&&/* @__PURE__ */e("span",{"aria-hidden":!0,className:"pointer-events-none absolute top-1/2 right-3 flex -translate-y-1/2 items-center gap-1 text-gray-500 text-xs font-semibold",children:C}),f?/* @__PURE__ */e("textarea",{id:v,rows:m,cols:h,required:g,disabled:b,"aria-invalid":!!s||void 0,className:A,ref:w,...y}):/* @__PURE__ */e("input",{id:v,type:c,required:g,disabled:b,"aria-invalid":!!s||void 0,className:A,ref:w,...y})]}),s||l?/* @__PURE__ */e(zn,{size:"caption3",weight:"regular",className:fn("mt-1.5",s?"text-red-500":"text-gray-500"),children:s||l}):null]})});
|
|
144
|
-
return n("div",{className:fn("flex flex-col",
|
|
145
|
-
/* @__PURE__ */e(zn,{size:"caption3",weight:"bold",className:"text-gray-700",children:r}),
|
|
142
|
+
/* @__PURE__ */e(tu,{label:a,labelHint:i,required:g,htmlFor:v}),
|
|
143
|
+
/* @__PURE__ */n("div",{className:"relative w-full",children:[x&&/* @__PURE__ */e("span",{"aria-hidden":!0,className:fn("pointer-events-none absolute top-1/2 left-3 flex -translate-y-1/2 items-center","focus"===N?"text-brand":"text-gray-400"),children:d}),k&&/* @__PURE__ */e("span",{"aria-hidden":!0,className:"pointer-events-none absolute top-1/2 right-3 flex -translate-y-1/2 items-center gap-1 text-gray-500 text-xs font-semibold",children:C}),f?/* @__PURE__ */e("textarea",{id:v,rows:m,cols:h,required:g,disabled:b,"aria-invalid":!!s||void 0,className:A,ref:w,...y}):/* @__PURE__ */e("input",{id:v,type:c,required:g,disabled:b,"aria-invalid":!!s||void 0,className:A,ref:w,...y})]}),s||l?/* @__PURE__ */e(zn,{size:"caption3",weight:"regular",className:fn("mt-1.5",s?"text-red-500":"text-gray-500"),children:s||l}):null]})});nu.displayName="TextField";const ru={sm:"min-h-[64px] px-3 py-2.5 text-xs",md:"min-h-[80px] px-3.5 py-3 text-sm",lg:"min-h-[96px] px-4 py-3.5 text-base"},ou=x.forwardRef(({className:t,label:r,labelHint:o,helper:a,error:i,count:l,max:s,size:c="md",full:d=!0,rows:u=4,defaultValue:p,value:f,onChange:m,required:h,disabled:g,id:b,maxLength:v,...y},w)=>{const C=x.useId(),k=b||C,N=void 0!==f,[A,M]=x.useState("string"==typeof p?p:""),S=N?f:A,R=S?String(S).length:0;/* @__PURE__ */
|
|
144
|
+
return n("div",{className:fn("flex flex-col",d?"w-full":"w-[380px]"),children:[r?/* @__PURE__ */n("label",{htmlFor:k,className:"mb-1.5 inline-flex items-center gap-1.5",children:[
|
|
145
|
+
/* @__PURE__ */e(zn,{size:"caption3",weight:"bold",className:"text-gray-700",children:r}),h?/* @__PURE__ */e(zn,{size:"caption3",weight:"bold",className:"text-brand",children:"*"}):null,o?/* @__PURE__ */e(zn,{size:"caption3",weight:"regular",className:"text-gray-500",children:o}):null]}):null,
|
|
146
146
|
/* @__PURE__ */n("div",{className:"relative w-full",children:[
|
|
147
|
-
/* @__PURE__ */e("textarea",{id:
|
|
148
|
-
return n(
|
|
149
|
-
/* @__PURE__ */e(
|
|
147
|
+
/* @__PURE__ */e("textarea",{id:k,ref:w,rows:u,value:N?f:A,defaultValue:N?void 0:p,onChange(e){N||M(e.target.value),m?.(e)},maxLength:v??s,required:h,disabled:g,"aria-invalid":!!i||void 0,className:fn("w-full resize-y rounded-2.5 border border-gray-200 bg-white leading-[1.6] text-gray-900",ru[c],"outline-none transition-[border-color,box-shadow,background-color] duration-150","placeholder:text-gray-500 hover:border-gray-300","focus-visible:border-brand focus-visible:shadow-[0_0_0_3px_rgba(255,87,34,0.12)]","disabled:cursor-not-allowed disabled:border-gray-200 disabled:bg-gray-100 disabled:text-gray-400","aria-[invalid=true]:border-red-500 aria-[invalid=true]:shadow-[0_0_0_3px_rgba(255,82,82,0.12)]",l&&"pb-7",t),...y}),l?/* @__PURE__ */n("div",{className:"pointer-events-none absolute right-3 bottom-2.5 text-[11px] font-semibold tabular-nums text-gray-500",children:[R,s?`/${s}`:""]}):null]}),i||a?/* @__PURE__ */e(zn,{size:"caption3",weight:"regular",className:fn("mt-1.5",i?"text-red-500":"text-gray-500"),children:i||a}):null]})});function au({comment:t,isAuthor:r,onDelete:o,onReport:a}){const[i,l]=C.useState(!1),s=r?[{key:"delete",label:"삭제",onClick(){return o?.(t)},className:"text-red-600"}]:[{key:"report",label:"신고",onClick(){return a?.(t)},className:"text-red-600"}];/* @__PURE__ */
|
|
148
|
+
return n(Kd,{open:i,onOpenChange:l,children:[
|
|
149
|
+
/* @__PURE__ */e(Xd,{asChild:!0,children:/* @__PURE__ */n("button",{type:"button","aria-label":"댓글 더보기 메뉴",onClick(e){return e.stopPropagation()},className:fn("inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-full","text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-700"),children:[
|
|
150
150
|
/* @__PURE__ */e("span",{className:"sr-only",children:"더보기"}),
|
|
151
151
|
/* @__PURE__ */n("span",{className:"flex items-center gap-0.5",children:[
|
|
152
152
|
/* @__PURE__ */e("span",{className:"h-[3px] w-[3px] rounded-full bg-current"}),
|
|
153
153
|
/* @__PURE__ */e("span",{className:"h-[3px] w-[3px] rounded-full bg-current"}),
|
|
154
154
|
/* @__PURE__ */e("span",{className:"h-[3px] w-[3px] rounded-full bg-current"})]})]})}),
|
|
155
|
-
/* @__PURE__ */e(
|
|
155
|
+
/* @__PURE__ */e(Zd,{children:/* @__PURE__ */e(Jd,{align:"end",sideOffset:6,className:fn("z-50 min-w-[120px] overflow-hidden rounded-3 border border-gray-200 bg-white p-1.5 shadow-sm","data-[state=closed]:animate-out data-[state=open]:animate-in","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95"),children:/* @__PURE__ */e("div",{className:"flex flex-col gap-0.5",children:s.map(t=>/* @__PURE__ */e("button",{type:"button",className:fn("rounded-2 px-3 py-2 text-left transition-colors hover:bg-gray-100",t.className),onClick(){t.onClick(),l(!1)},children:/* @__PURE__ */e(zn,{size:"caption1",weight:"medium",children:t.label})},t.key))})})})]})}function iu({comment:t,depth:r,isLast:o,currentUserId:a,activeReplyTargetId:i,draftReplyContent:l,replyPlaceholder:s,replySubmitLabel:c,replyCancelLabel:d,replyButtonLabel:u,loadMoreRepliesLabel:p,onReplyOpen:f,onReplyChange:m,onReplySubmit:h,onReplyCancel:g,onLoadMoreReplies:b,onDelete:v,onReport:y}){const w="boolean"==typeof t.isAuthor?t.isAuthor:Boolean(a&&t.author.id===a),x=Boolean(t.replies?.length),C=i===t.id,k=Boolean(t.hasMoreReplies),N=t.replies??[],A=0===r?!x:o;/* @__PURE__ */
|
|
156
156
|
return e("li",{children:/* @__PURE__ */n("div",{className:fn("flex items-start gap-2.5 py-3",!o&&0===r&&"border-b border-gray-100"),children:[
|
|
157
|
-
/* @__PURE__ */e(
|
|
157
|
+
/* @__PURE__ */e(Ss,{imageUrl:t.author.profileImageUrl,size:"sm",className:"shrink-0"}),
|
|
158
158
|
/* @__PURE__ */n("div",{className:"min-w-0 flex-1",children:[
|
|
159
159
|
/* @__PURE__ */n("div",{className:"flex items-baseline justify-between gap-2",children:[
|
|
160
160
|
/* @__PURE__ */e(zn,{size:"caption1",weight:"bold",className:"truncate text-gray-900",children:t.author.nickname}),
|
|
161
161
|
/* @__PURE__ */n("div",{className:"flex shrink-0 items-center gap-1",children:[
|
|
162
162
|
/* @__PURE__ */e(zn,{size:"caption2",weight:"regular",className:"text-gray-500",children:t.createdAt}),
|
|
163
|
-
/* @__PURE__ */e(
|
|
164
|
-
/* @__PURE__ */e(zn,{as:"p",size:"caption1",weight:"regular",className:"mt-1 leading-[1.5] break-words whitespace-pre-wrap text-gray-700",children:t.content}),x?/* @__PURE__ */e("ul",{className:"mt-2 -ml-5 space-y-0 border-l border-gray-100 pl-3",children:N.map((t,n)=>/* @__PURE__ */e(
|
|
163
|
+
/* @__PURE__ */e(au,{comment:t,isAuthor:w,onDelete:v,onReport:y})]})]}),
|
|
164
|
+
/* @__PURE__ */e(zn,{as:"p",size:"caption1",weight:"regular",className:"mt-1 leading-[1.5] break-words whitespace-pre-wrap text-gray-700",children:t.content}),x?/* @__PURE__ */e("ul",{className:"mt-2 -ml-5 space-y-0 border-l border-gray-100 pl-3",children:N.map((t,n)=>/* @__PURE__ */e(iu,{comment:t,depth:r+1,isLast:n===N.length-1,currentUserId:a,activeReplyTargetId:i,draftReplyContent:l,replyPlaceholder:s,replySubmitLabel:c,replyCancelLabel:d,replyButtonLabel:u,loadMoreRepliesLabel:p,onReplyOpen:f,onReplyChange:m,onReplySubmit:h,onReplyCancel:g,onLoadMoreReplies:b,onDelete:v,onReport:y},t.id))}):null,
|
|
165
165
|
/* @__PURE__ */e("div",{"aria-hidden":!C,className:fn("overflow-hidden transition-all duration-200 ease-out",C?"mt-1 max-h-[260px] opacity-100":"mt-0 max-h-0 opacity-0 pointer-events-none"),onClick(e){return e.stopPropagation()},children:/* @__PURE__ */n("div",{className:"flex items-center gap-1.5 p-1",children:[
|
|
166
|
-
/* @__PURE__ */e(
|
|
166
|
+
/* @__PURE__ */e(ou,{value:l,onChange(e){return m(e.target.value)},placeholder:s,rows:1,className:"min-h-[36px] flex-1 text-[12px]"}),
|
|
167
167
|
/* @__PURE__ */e("button",{type:"button",className:"rounded-2 px-2 py-1.5 text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-700",onClick:g,children:/* @__PURE__ */e(zn,{size:"caption2",weight:"medium",children:d})}),
|
|
168
|
-
/* @__PURE__ */e("button",{type:"button",className:fn("rounded-2 bg-
|
|
168
|
+
/* @__PURE__ */e("button",{type:"button",className:fn("rounded-2 bg-brand px-2.5 py-1.5 text-white transition-colors hover:bg-main-700",!l.trim()&&"cursor-not-allowed bg-main-400 hover:bg-main-400"),onClick(){return h(t)},disabled:!l.trim(),children:/* @__PURE__ */e(zn,{size:"caption2",weight:"bold",children:c})})]})}),A&&!C||k?/* @__PURE__ */n("div",{className:"mt-1.5 flex items-center gap-1",children:[A&&!C?/* @__PURE__ */e("button",{type:"button",className:"inline-flex rounded-2 px-1.5 py-0.5 text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-700",onClick(){return f(t)},children:/* @__PURE__ */e(zn,{size:"caption2",weight:"medium",children:u})}):null,k?/* @__PURE__ */e("button",{type:"button",className:"inline-flex rounded-2 px-1.5 py-0.5 text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-700",onClick(){return b?.(t)},disabled:t.isLoadingReplies,children:/* @__PURE__ */e(zn,{size:"caption2",weight:"medium",children:t.isLoadingReplies?"불러오는 중...":`${p}${"number"==typeof t.remainingReplyCount?` (${t.remainingReplyCount})`:""}`})}):null]}):null]})]})})}function lu({comments:t,currentUserId:n,className:r,replyPlaceholder:o="댓글을 입력하세요.",replySubmitLabel:a="등록",replyCancelLabel:i="취소",replyButtonLabel:l="답글 달기",loadMoreRepliesLabel:s="대댓글 더보기",onReplySubmit:c,onLoadMoreReplies:d,onDelete:u,onReport:p}){const[f,m]=C.useState(null),[h,g]=C.useState(""),b=e=>{m(e.id),g("")},v=()=>{m(null),g("")},y=e=>{const t=h.trim();t&&(c?.(e,t),g(""),m(null))};return t.length?/* @__PURE__ */e("ul",{className:fn("flex flex-col",r),children:t.map((r,c)=>/* @__PURE__ */e(iu,{comment:r,depth:0,isLast:c===t.length-1,currentUserId:n,activeReplyTargetId:f,draftReplyContent:h,replyPlaceholder:o,replySubmitLabel:a,replyCancelLabel:i,replyButtonLabel:l,loadMoreRepliesLabel:s,onReplyOpen:b,onReplyChange:g,onReplySubmit:y,onReplyCancel:v,onLoadMoreReplies:d,onDelete:u,onReport:p},r.id))}):/* @__PURE__ */e(zn,{size:"caption1",weight:"regular",className:fn("block py-2 text-gray-500",r),children:"아직 댓글이 없습니다."})}ou.displayName="TextArea";const su=C.forwardRef(({label:t,placeholder:r,className:o,type:a="button",...i},l)=>/* @__PURE__ */n("button",{ref:l,type:a,className:fn("group flex h-10 w-full items-center justify-between gap-3 rounded-3 border border-gray-200 bg-white px-4","outline-none transition-all duration-200","data-[state=open]:border-main-500 hover:border-gray-400 focus-visible:ring-3 focus-visible:ring-main-300/60",o),...i,children:[
|
|
169
169
|
/* @__PURE__ */e(zn,{size:"body2",weight:"medium",className:fn(t?"text-gray-900":"text-gray-500"),children:t??r}),
|
|
170
|
-
/* @__PURE__ */e(Fn,{className:"size-4 text-gray-600",strokeWidth:2.2})]}));function
|
|
171
|
-
return n(
|
|
172
|
-
/* @__PURE__ */e(
|
|
173
|
-
/* @__PURE__ */e(
|
|
174
|
-
return n(
|
|
175
|
-
/* @__PURE__ */e(
|
|
176
|
-
/* @__PURE__ */e(
|
|
177
|
-
return e(Ko,{className:fn("fixed inset-0 z-50 bg-black/45 backdrop-blur-[2px]","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...n})}const
|
|
178
|
-
return n(
|
|
179
|
-
/* @__PURE__ */e(
|
|
180
|
-
/* @__PURE__ */n(Xo,{className:fn(
|
|
170
|
+
/* @__PURE__ */e(Fn,{className:"size-4 text-gray-600",strokeWidth:2.2})]}));function cu(e){return e?{onMouseDownCapture(e){return e.stopPropagation()}}:{}}function du({value:t,onChange:r,className:o,placeholder:a="YYYY/MM/DD",disableClickPropagation:i=!1}){const[l,s]=C.useState(!1),c=t?pi(t,"yyyy/MM/dd"):void 0;/* @__PURE__ */
|
|
171
|
+
return n(Kd,{open:l,onOpenChange:s,children:[
|
|
172
|
+
/* @__PURE__ */e(Xd,{asChild:!0,children:/* @__PURE__ */e(su,{label:c,placeholder:a,className:o})}),
|
|
173
|
+
/* @__PURE__ */e(Zd,{children:/* @__PURE__ */e(Jd,{className:fn("z-50 w-auto rounded-3 border border-gray-200 bg-white p-2 text-gray-900","shadow-lg outline-none","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2"),align:"start",sideOffset:8,...cu(i),children:/* @__PURE__ */e(ql,{mode:"single",selected:t,onSelect(e){r(e),e&&s(!1)},initialFocus:!0})})})]})}function uu({value:t,onChange:r,className:o,placeholder:a="기간을 선택해주세요",disableClickPropagation:i=!1}){const[l,s]=C.useState(!1),c=C.useRef(!1),d=t?.from&&t?.to?`${pi(t.from,"yyyy/MM/dd")} - ${pi(t.to,"yyyy/MM/dd")}`:t?.from?`${pi(t.from,"yyyy/MM/dd")} -`:void 0;/* @__PURE__ */
|
|
174
|
+
return n(Kd,{open:l,onOpenChange(e){s(e),c.current=!!e&&Boolean(t?.from&&t?.to)},children:[
|
|
175
|
+
/* @__PURE__ */e(Xd,{asChild:!0,children:/* @__PURE__ */e(su,{label:d,placeholder:a,className:o})}),
|
|
176
|
+
/* @__PURE__ */e(Zd,{children:/* @__PURE__ */e(Jd,{className:fn("z-50 w-auto rounded-3 border border-gray-200 bg-white p-2 text-gray-900","shadow-lg outline-none","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2"),align:"start",sideOffset:8,...cu(i),children:/* @__PURE__ */e(ql,{mode:"range",selected:t,onSelect(e,t){if(c.current&&t)return r({from:t,to:void 0}),void(c.current=!1);r(e),e?.from&&e?.to&&(s(!1),c.current=!1)},initialFocus:!0})})})]})}su.displayName="PickerTrigger";const pu=qo,fu=Qo,mu=Uo,hu=ea;function gu({className:t,...n}){/* @__PURE__ */
|
|
177
|
+
return e(Ko,{className:fn("fixed inset-0 z-50 bg-black/45 backdrop-blur-[2px]","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...n})}const bu=xn(fn("fixed top-[50%] left-[50%] z-50 flex flex-col","w-[calc(100%-2rem)] max-w-[92vw] -translate-x-1/2 -translate-y-1/2","rounded-4 bg-white shadow-[0_24px_64px_rgba(0,0,0,0.18)]","overflow-hidden","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","duration-200"),{variants:{size:{sm:"sm:w-[360px]",md:"sm:w-[480px]",lg:"sm:w-[600px]",xl:"sm:w-[760px]"}},defaultVariants:{size:"md"}});function vu({className:t,children:r,size:o,showClose:a=!0,...i}){/* @__PURE__ */
|
|
178
|
+
return n(mu,{children:[
|
|
179
|
+
/* @__PURE__ */e(gu,{}),
|
|
180
|
+
/* @__PURE__ */n(Xo,{className:fn(bu({size:o}),t),...i,children:[r,a&&/* @__PURE__ */n(ea,{className:fn("absolute top-4 right-4 flex h-7 w-7 items-center justify-center","rounded-2 bg-gray-100 text-gray-700 transition-colors","hover:bg-gray-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-brand/30"),children:[
|
|
181
181
|
/* @__PURE__ */e(Vn,{width:14,height:14}),
|
|
182
|
-
/* @__PURE__ */e("span",{className:"sr-only",children:"닫기"})]})]})]})}function
|
|
183
|
-
return e("div",{className:fn("flex items-center justify-between px-[22px] pt-[18px] pb-3",t),...n})}function
|
|
184
|
-
return e("div",{className:fn("px-[22px] pt-1 pb-[18px] text-gray-700",t),...n})}function
|
|
185
|
-
return e("div",{className:fn("flex justify-end gap-2 border-t border-gray-100 bg-gray-50 px-[18px] py-[14px]",t),...n})}function
|
|
186
|
-
return e(Zo,{asChild:!0,...r,children:/* @__PURE__ */e(zn,{size:"body2",weight:"extrabold",className:fn("text-black tracking-[-0.3px]",t),children:n})})}function
|
|
187
|
-
return e(Jo,{asChild:!0,...r,children:/* @__PURE__ */e(zn,{size:"caption2",weight:"regular",className:fn("text-gray-700 leading-[1.55]",t),children:n})})}const
|
|
188
|
-
return n(
|
|
189
|
-
/* @__PURE__ */n(
|
|
190
|
-
/* @__PURE__ */e(
|
|
191
|
-
/* @__PURE__ */n(Xo,{className:fn("fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2","w-[360px] max-w-[92vw] rounded-
|
|
182
|
+
/* @__PURE__ */e("span",{className:"sr-only",children:"닫기"})]})]})]})}function yu({className:t,...n}){/* @__PURE__ */
|
|
183
|
+
return e("div",{className:fn("flex items-center justify-between px-[22px] pt-[18px] pb-3",t),...n})}function wu({className:t,...n}){/* @__PURE__ */
|
|
184
|
+
return e("div",{className:fn("px-[22px] pt-1 pb-[18px] text-gray-700",t),...n})}function xu({className:t,...n}){/* @__PURE__ */
|
|
185
|
+
return e("div",{className:fn("flex justify-end gap-2 border-t border-gray-100 bg-gray-50 px-[18px] py-[14px]",t),...n})}function Cu({className:t,children:n,...r}){/* @__PURE__ */
|
|
186
|
+
return e(Zo,{asChild:!0,...r,children:/* @__PURE__ */e(zn,{size:"body2",weight:"extrabold",className:fn("text-black tracking-[-0.3px]",t),children:n})})}function ku({className:t,children:n,...r}){/* @__PURE__ */
|
|
187
|
+
return e(Jo,{asChild:!0,...r,children:/* @__PURE__ */e(zn,{size:"caption2",weight:"regular",className:fn("text-gray-700 leading-[1.55]",t),children:n})})}const Nu={brand:{iconBg:"bg-brand-soft",iconColor:"text-brand",buttonVariant:"primary"},danger:{iconBg:"bg-red-300/40",iconColor:"text-red-600",buttonVariant:"danger"},mint:{iconBg:"bg-mint-200",iconColor:"text-mint-900",buttonVariant:"primary"}};function Au({open:t,defaultOpen:r,onOpenChange:o,tone:a="brand",icon:i="Flag",title:l,description:s,confirmLabel:c="확인",cancelLabel:d="취소",onConfirm:u,onCancel:p,children:f}){const m=Nu[a];/* @__PURE__ */
|
|
188
|
+
return n(pu,{open:t,defaultOpen:r,onOpenChange:o,children:[f&&/* @__PURE__ */e(fu,{asChild:!0,children:f}),
|
|
189
|
+
/* @__PURE__ */n(mu,{children:[
|
|
190
|
+
/* @__PURE__ */e(gu,{}),
|
|
191
|
+
/* @__PURE__ */n(Xo,{className:fn("fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2","w-[360px] max-w-[92vw] rounded-4 bg-white px-[22px] pt-6 pb-[18px] text-center","shadow-[0_24px_64px_rgba(0,0,0,0.18)]","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","duration-200"),children:[
|
|
192
192
|
/* @__PURE__ */e("div",{className:fn("mx-auto mb-3.5 flex h-14 w-14 items-center justify-center rounded-full",m.iconBg),children:/* @__PURE__ */e(Kn,{name:i,size:26,className:m.iconColor})}),
|
|
193
193
|
/* @__PURE__ */e(Zo,{asChild:!0,children:/* @__PURE__ */e(zn,{size:"body2",weight:"extrabold",className:"block text-black tracking-[-0.3px]",children:l})}),s&&/* @__PURE__ */e(Jo,{asChild:!0,children:/* @__PURE__ */e(zn,{size:"caption2",weight:"regular",className:"mt-1.5 block whitespace-pre-line text-gray-600 leading-[1.55]",children:s})}),
|
|
194
194
|
/* @__PURE__ */n("div",{className:"mt-[18px] flex gap-2",children:[
|
|
195
|
-
/* @__PURE__ */e(
|
|
196
|
-
/* @__PURE__ */e(
|
|
195
|
+
/* @__PURE__ */e(hu,{asChild:!0,children:/* @__PURE__ */e(Wn,{variant:"secondary",className:"h-11 flex-1 rounded-2.5",onClick:p,children:d})}),
|
|
196
|
+
/* @__PURE__ */e(hu,{asChild:!0,children:/* @__PURE__ */e(Wn,{variant:m.buttonVariant,className:"h-11 flex-1 rounded-2.5",onClick:u,children:c})})]})]})]})]})}const Mu=xn(["inline-flex w-full items-center justify-between rounded-2 border bg-white text-gray-900 font-medium","transition-[border-color,box-shadow,background-color] duration-150 ease-out outline-none","focus-visible:outline-none","disabled:cursor-not-allowed disabled:bg-gray-100 disabled:text-gray-400"],{variants:{size:{sm:"h-8 px-3 text-xs",md:"h-[38px] px-3.5 text-sm",lg:"h-[46px] px-4 text-base"},open:{true:"border-brand shadow-[0_0_0_3px_rgba(255,87,34,0.12)]",false:"border-gray-200 hover:border-gray-300"}},defaultVariants:{size:"md",open:!1}}),Su=x.forwardRef(({className:t,size:r,open:o,label:a,value:i,placeholder:l="선택",full:s=!1,disabled:c,...d},u)=>{const p=null==i||""===i,f=x.useId();/* @__PURE__ */
|
|
197
197
|
return n("div",{className:fn(s?"w-full":"w-60"),children:[a?/* @__PURE__ */e("label",{htmlFor:f,className:"mb-1.5 inline-block text-[11px] font-bold text-gray-700",children:a}):null,
|
|
198
|
-
/* @__PURE__ */n("button",{ref:u,id:f,type:"button",disabled:c,"aria-haspopup":"listbox","aria-expanded":!!o,className:fn(
|
|
198
|
+
/* @__PURE__ */n("button",{ref:u,id:f,type:"button",disabled:c,"aria-haspopup":"listbox","aria-expanded":!!o,className:fn(Mu({size:r,open:o}),p&&"text-gray-400 font-normal",t),...d,children:[
|
|
199
199
|
/* @__PURE__ */e("span",{className:"truncate",children:p?l:i}),
|
|
200
|
-
/* @__PURE__ */e(mn,{width:14,height:14,className:fn("ml-2 shrink-0 transition-transform duration-150",o&&"rotate-180",c?"text-gray-400":"text-gray-500"),strokeWidth:2})]})]})});function
|
|
201
|
-
return e("div",{"data-slot":"dropdown-menu",role:"listbox",className:fn("rounded-
|
|
202
|
-
return n("div",{role:"option","aria-selected":a,"aria-disabled":t.disabled||void 0,onClick(){return!t.disabled&&o?.(t.value)},className:fn("flex cursor-pointer items-center justify-between rounded-
|
|
203
|
-
/* @__PURE__ */e("span",{className:"truncate",children:t.label}),a?/* @__PURE__ */e(jn,{className:"ml-2 h-3 w-3 shrink-0 text-brand",strokeWidth:10}):null]},t.value)})})}function
|
|
204
|
-
return n("div",{"data-slot":"multi-select",onClick:a,className:fn("flex min-h-[38px] w-80 flex-wrap items-center gap-1.5 rounded-2 border border-gray-200 bg-white px-3 py-2.5",a&&"cursor-pointer transition-colors hover:border-gray-300",i),...l,children:[t.map(t=>/* @__PURE__ */n("span",{className:"inline-flex items-center gap-1 rounded-
|
|
205
|
-
/* @__PURE__ */e("span",{className:"text-xs text-gray-400",children:r})]})}function
|
|
206
|
-
return n("div",{className:fn("flex w-full flex-col gap-2",d),...u,children:[v.map((t,r)=>/* @__PURE__ */n("div",{className:"flex h-10 w-full items-center justify-between rounded-3 border border-gray-
|
|
207
|
-
/* @__PURE__ */e(zn,{size:"
|
|
200
|
+
/* @__PURE__ */e(mn,{width:14,height:14,className:fn("ml-2 shrink-0 transition-transform duration-150",o&&"rotate-180",c?"text-gray-400":"text-gray-500"),strokeWidth:2})]})]})});function Ru({items:t,value:r,onSelect:o,width:a=240,className:i,style:l,...s}){/* @__PURE__ */
|
|
201
|
+
return e("div",{"data-slot":"dropdown-menu",role:"listbox",className:fn("rounded-2.5 border border-gray-200 bg-white p-1.5 shadow-lg",i),style:{width:a,...l},...s,children:t.map(t=>{const a=t.value===r;/* @__PURE__ */
|
|
202
|
+
return n("div",{role:"option","aria-selected":a,"aria-disabled":t.disabled||void 0,onClick(){return!t.disabled&&o?.(t.value)},className:fn("flex cursor-pointer items-center justify-between rounded-1.5 px-3 py-2 text-sm transition-colors",a?"bg-brand-softer font-bold text-brand":"font-medium text-gray-800 hover:bg-gray-50",t.disabled&&"cursor-not-allowed opacity-[0.45]"),children:[
|
|
203
|
+
/* @__PURE__ */e("span",{className:"truncate",children:t.label}),a?/* @__PURE__ */e(jn,{className:"ml-2 h-3 w-3 shrink-0 text-brand",strokeWidth:10}):null]},t.value)})})}function Eu({selected:t,placeholder:r="추가",onRemove:o,onAddClick:a,className:i,...l}){/* @__PURE__ */
|
|
204
|
+
return n("div",{"data-slot":"multi-select",onClick:a,className:fn("flex min-h-[38px] w-80 flex-wrap items-center gap-1.5 rounded-2 border border-gray-200 bg-white px-3 py-2.5",a&&"cursor-pointer transition-colors hover:border-gray-300",i),...l,children:[t.map(t=>/* @__PURE__ */n("span",{className:"inline-flex items-center gap-1 rounded-1.5 bg-brand-soft px-2 py-0.5 text-[11px] font-bold text-brand",children:[t,o?/* @__PURE__ */e("button",{type:"button",onClick(e){e.stopPropagation(),o(t)},"aria-label":`${t} 제거`,className:"ml-0.5 inline-flex h-3 w-3 items-center justify-center rounded-full text-brand transition-colors hover:bg-brand hover:text-white",children:/* @__PURE__ */e("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",children:/* @__PURE__ */e("path",{d:"M2 2l5 5M7 2l-5 5"})})}):null]},t)),
|
|
205
|
+
/* @__PURE__ */e("span",{className:"text-xs text-gray-400",children:r})]})}function _u({goals:t,defaultGoals:r=[],onGoalsChange:o,placeholder:a="목표를 입력하세요",disabled:i=!1,addOnBlur:l=!1,inputAriaLabel:s="목표 입력",maxGoals:c,className:d,...u}){const p=void 0!==t,[f,m]=C.useState(r),[h,g]=C.useState(""),b=C.useRef(!1),v=p?t:f,y=void 0!==c&&v.length>=c,w=e=>{p||m(e),o?.(e)},x=()=>{if(i)return;const e=h.trim();e&&(w([...v,e]),g(""))};/* @__PURE__ */
|
|
206
|
+
return n("div",{className:fn("flex w-full flex-col gap-2",d),...u,children:[v.map((t,r)=>/* @__PURE__ */n("div",{className:"flex h-10 w-full items-center justify-between rounded-3 border border-gray-200 bg-white px-5",children:[
|
|
207
|
+
/* @__PURE__ */e(zn,{size:"caption2",weight:"regular",className:"line-clamp-1 text-gray-900",children:t}),
|
|
208
208
|
/* @__PURE__ */e("button",{type:"button","aria-label":`목표 삭제: ${t}`,disabled:i,onClick(){return(e=>{i||w(v.filter((t,n)=>n!==e))})(r)},className:fn("inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-2 text-gray-500 transition-colors hover:cursor-pointer",!i&&"hover:bg-gray-100 hover:text-gray-700",i&&"cursor-not-allowed text-gray-400"),children:/* @__PURE__ */e(Vn,{className:"h-4 w-4"})})]},`${t}-${r}`)),
|
|
209
|
-
/* @__PURE__ */e(
|
|
210
|
-
return e("div",{"data-slot":"heatmap",role:v?void 0:"img",className:fn("w-full",f),style:{display:"grid",gridTemplateRows:`repeat(${r}, 1fr)`,gridAutoFlow:"column",gridAutoColumns:"1fr",gap:i},...m,children:b.slice(0,g).map((t,n)=>{const r=Math.max(0,Math.min(4,Math.round(t)));return v?/* @__PURE__ */e(
|
|
211
|
-
return n(
|
|
212
|
-
/* @__PURE__ */e(
|
|
213
|
-
/* @__PURE__ */e(
|
|
209
|
+
/* @__PURE__ */e(nu,{value:h,disabled:i||y,"aria-label":s,placeholder:y?`최대 ${c}개까지 입력할 수 있습니다`:a,onChange(e){return g(e.target.value)},onCompositionStart(){b.current=!0},onCompositionEnd(){b.current=!1},onKeyDown(e){"Enter"===e.key&&(e.nativeEvent.isComposing||b.current||229===e.nativeEvent.keyCode||(e.preventDefault(),x()))},onBlur(){l&&x()}})]})}Su.displayName="Dropdown";const Pu={main:["var(--gray-100)","var(--main-300)","var(--main-500)","var(--main-700)","var(--brand)"],mint:["var(--gray-100)","var(--mint-300)","var(--mint-500)","var(--mint-700)","var(--mint-900)"],blue:["var(--gray-100)","var(--blue-300)","var(--blue-400)","var(--blue-500)","var(--blue-600)"],green:["var(--gray-100)","var(--green-200)","var(--green-400)","var(--green-500)","var(--green-700)"],gray:["var(--gray-100)","var(--gray-300)","var(--gray-500)","var(--gray-700)","var(--gray-900)"]};function Du({cells:t,cols:n=20,rows:r=7,tone:o="main",palette:a,gap:i=3,cellRadius:l=3,ariaLabel:s,renderCellTooltip:c,renderCellActions:d,onCellClick:u,onCellHover:p,className:f,...m}){const h=a??Pu[o],g=r*n,b=t??Array.from({length:g},()=>0),v=Boolean(c);/* @__PURE__ */
|
|
210
|
+
return e("div",{"data-slot":"heatmap",role:v?void 0:"img",className:fn("w-full",f),style:{display:"grid",gridTemplateRows:`repeat(${r}, 1fr)`,gridAutoFlow:"column",gridAutoColumns:"1fr",gap:i},...m,children:b.slice(0,g).map((t,n)=>{const r=Math.max(0,Math.min(4,Math.round(t)));return v?/* @__PURE__ */e(Lu,{index:n,level:r,color:h[r],cellRadius:l,ariaLabel:s?.(n,r),renderCellTooltip:c,renderCellActions:d,onCellClick:u,onCellHover:p},n):/* @__PURE__ */e("div",{"aria-label":s?.(n,r),style:{aspectRatio:"1",borderRadius:l,background:h[r]}},n)})})}function Lu({index:t,level:r,color:o,cellRadius:a,ariaLabel:i,renderCellTooltip:l,renderCellActions:s,onCellClick:c,onCellHover:d}){const[u,p]=C.useState(!1),[f,m]=C.useState(!1),h=C.useRef(null),g=C.useRef(!1),b=C.useRef(!1),v={index:t,level:r},y=()=>{null!==h.current&&(clearTimeout(h.current),h.current=null)};/* @__PURE__ */
|
|
211
|
+
return n(Kd,{open:u,onOpenChange(e){if(!e){if(g.current)return void(g.current=!1);p(!1),m(!1),b.current=!0,setTimeout(()=>{b.current=!1},200)}},children:[
|
|
212
|
+
/* @__PURE__ */e(Xd,{asChild:!0,children:/* @__PURE__ */e("button",{type:"button","aria-label":i,className:fn("cursor-pointer transition-[box-shadow,transform] duration-150 ease-out","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-800 focus-visible:ring-offset-1",f&&"ring-2 ring-gray-800 ring-offset-1"),style:{aspectRatio:"1",borderRadius:a,background:o,border:"none",padding:0},onMouseEnter(){y(),d?.(v),f||b.current||p(!0)},onMouseLeave(){d?.(null),f||(h.current=setTimeout(()=>p(!1),80))},onClick(){y(),f?(m(!1),p(!1),b.current=!0,setTimeout(()=>{b.current=!1},200)):(g.current=!0,m(!0),p(!0),c?.(v))}})}),
|
|
213
|
+
/* @__PURE__ */e(Zd,{children:/* @__PURE__ */n(Jd,{side:"top",sideOffset:4,onOpenAutoFocus(e){return e.preventDefault()},onMouseEnter:y,onMouseLeave(){f||p(!1)},className:fn("z-50 min-w-[120px] rounded-xl bg-gray-900 px-3 py-2 text-white shadow-md","animate-in fade-in-0 zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","data-[side=top]:slide-in-from-bottom-2 data-[side=bottom]:slide-in-from-top-2"),children:[l?/* @__PURE__ */e("div",{className:"whitespace-nowrap text-xs",children:l(v)}):null,f&&s?/* @__PURE__ */e("div",{className:"mt-2",children:s(v)}):null]})})]})}function Ou({previewUrl:t,onSelectFile:r,onClear:o,placeholderTitle:a="썸네일 영역을 클릭해 이미지를 선택하세요.",placeholderSubtitle:i="또는 이미지를 드래그해서 놓아주세요.",helperText:l="JPG, PNG, GIF 파일을 업로드할 수 있습니다.",clearLabel:s="선택 해제",dropZoneClassName:c="min-h-[220px] flex-1 lg:min-h-[440px]",className:d}){const u=k(null),[p,f]=N(!1),[m,h]=N(null),g=Boolean(t)&&m!==t,b=Boolean(t),v=()=>{u.current?.click()},y=e=>{e&&e.type.startsWith("image/")&&(h(null),r(e))};/* @__PURE__ */
|
|
214
214
|
return n("div",{className:fn("flex h-full flex-col rounded-2xl border border-gray-200 bg-white p-4",d),children:[
|
|
215
215
|
/* @__PURE__ */n("div",{role:"button",tabIndex:0,"aria-label":"썸네일 이미지 선택",className:fn("relative flex w-full cursor-pointer items-center justify-center overflow-hidden rounded-xl border bg-gray-100 transition outline-none",c,p?"border-main-700 ring-3 ring-main-300":"border-gray-200 hover:border-gray-300"),onClick:v,onKeyDown(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),v())},onDragEnter(e){e.preventDefault(),f(!0)},onDragOver(e){e.preventDefault(),p||f(!0)},onDragLeave(e){e.preventDefault(),f(!1)},onDrop(e){e.preventDefault(),f(!1),y(e.dataTransfer.files?.[0]??null)},children:[g?/* @__PURE__ */e("img",{src:t,alt:"썸네일 미리보기",className:"absolute inset-0 h-full w-full object-cover",onError(){return h(t??null)}}):/* @__PURE__ */n("div",{className:"flex flex-col items-center gap-2 px-4 text-center",children:[
|
|
216
216
|
/* @__PURE__ */e(zn,{size:"body2",weight:"medium",className:"text-gray-700",children:a}),
|
|
217
217
|
/* @__PURE__ */e(zn,{size:"caption1",weight:"regular",className:"text-gray-500",children:i})]}),
|
|
218
218
|
/* @__PURE__ */e("input",{ref:u,type:"file",accept:"image/*",onChange(e){y(e.target.files?.[0]??null),e.target.value=""},className:"hidden"})]}),
|
|
219
219
|
/* @__PURE__ */n("div",{className:"mt-4 flex items-center justify-between gap-3",children:[
|
|
220
|
-
/* @__PURE__ */e(zn,{size:"caption1",weight:"regular",className:"text-gray-500",children:l}),b&&o?/* @__PURE__ */e(Wn,{type:"button",variant:"outlined",size:"small",className:"shrink-0",onClick:o,children:s}):null]})]})}function
|
|
221
|
-
return e("div",{className:fn("flex items-center justify-center bg-
|
|
220
|
+
/* @__PURE__ */e(zn,{size:"caption1",weight:"regular",className:"text-gray-500",children:l}),b&&o?/* @__PURE__ */e(Wn,{type:"button",variant:"outlined",size:"small",className:"shrink-0",onClick:o,children:s}):null]})]})}function zu({className:t,logoSize:n="md"}){/* @__PURE__ */
|
|
221
|
+
return e("div",{className:fn("flex items-center justify-center bg-brand-soft",t),children:/* @__PURE__ */e(Gn,{className:fn("text-main-500",{sm:"w-4 h-6",md:"w-6 h-10",lg:"w-8 h-14"}[n])})})}function Tu(){/* @__PURE__ */
|
|
222
222
|
return n("div",{className:"flex items-end gap-2",children:[
|
|
223
223
|
/* @__PURE__ */e(Gn,{width:24,height:40,className:"text-gray-300"}),
|
|
224
|
-
/* @__PURE__ */e(zn,{size:"body1",weight:"bold",className:"my-2.5 text-gray-300",children:"1D1S"})]})}const
|
|
224
|
+
/* @__PURE__ */e(zn,{size:"body1",weight:"bold",className:"my-2.5 text-gray-300",children:"1D1S"})]})}const Iu={xs:4,sm:6,md:8,lg:12};function Wu({value:t,label:r,showLabel:o,showValueText:a=!0,valueText:i,infinite:l=!1,size:s="md",thickness:c,fillColor:d,trackColor:u,className:p,labelClassName:f,valueClassName:m,trackClassName:h,fillClassName:g,...b}){const v=Math.min(Math.max(t,0),100),y=l?"100%":`${v}%`,w=i??(l?"∞":`${v}%`),x=o??void 0!==r,C=c??Iu[s];/* @__PURE__ */
|
|
225
225
|
return n("div",{className:fn("w-full",p),...b,children:[(x||a)&&/* @__PURE__ */n("div",{className:"flex items-center justify-between gap-3",children:[x?/* @__PURE__ */e(zn,{size:"caption1",weight:"medium",className:fn("line-clamp-1 text-gray-800",f),children:r}):/* @__PURE__ */e("span",{}),a?/* @__PURE__ */e(zn,{size:"caption2",weight:"medium",className:fn("shrink-0 text-gray-600",m),children:w}):null]}),
|
|
226
|
-
/* @__PURE__ */e("div",{className:fn("mt-2 overflow-hidden rounded-full bg-gray-100",h),style:{height:`${C}px`,...u?{backgroundColor:u}:{}},children:/* @__PURE__ */e("div",{className:fn("h-full rounded-full bg-brand transition-[width] duration-300 ease-out",g),style:{width:y,...d?{backgroundColor:d}:{}}})})]})}const
|
|
226
|
+
/* @__PURE__ */e("div",{className:fn("mt-2 overflow-hidden rounded-full bg-gray-100",h),style:{height:`${C}px`,...u?{backgroundColor:u}:{}},children:/* @__PURE__ */e("div",{className:fn("h-full rounded-full bg-brand transition-[width] duration-300 ease-out",g),style:{width:y,...d?{backgroundColor:d}:{}}})})]})}const Fu=x.forwardRef(({className:t,label:r,id:o,disabled:a,...i},l)=>{const s=x.useId(),c=o||s;/* @__PURE__ */
|
|
227
227
|
return n("label",{htmlFor:c,className:fn("inline-flex cursor-pointer items-center gap-2 select-none",a&&"cursor-not-allowed opacity-[0.45]",t),children:[
|
|
228
228
|
/* @__PURE__ */n("span",{className:"relative inline-flex h-[18px] w-[18px] shrink-0 items-center justify-center",children:[
|
|
229
229
|
/* @__PURE__ */e("input",{ref:l,id:c,type:"radio",disabled:a,className:"peer absolute inset-0 m-0 h-full w-full cursor-pointer appearance-none rounded-full border-[1.5px] border-gray-300 bg-white outline-none transition-colors focus-visible:ring-2 focus-visible:ring-brand/30 focus-visible:ring-offset-2 checked:border-brand",...i}),
|
|
230
|
-
/* @__PURE__ */e("span",{className:"pointer-events-none h-[9px] w-[9px] scale-0 rounded-full bg-brand transition-transform duration-150 ease-out peer-checked:scale-100"})]}),r?/* @__PURE__ */e(zn,{size:"caption2",weight:"medium",className:"text-gray-800",children:r}):null]})});function
|
|
231
|
-
return e("div",{role:"radiogroup",className:fn("flex","vertical"===i?"flex-col gap-2":"flex-row gap-4",l),...s,children:n.map(n=>/* @__PURE__ */e(
|
|
230
|
+
/* @__PURE__ */e("span",{className:"pointer-events-none h-[9px] w-[9px] scale-0 rounded-full bg-brand transition-transform duration-150 ease-out peer-checked:scale-100"})]}),r?/* @__PURE__ */e(zn,{size:"caption2",weight:"medium",className:"text-gray-800",children:r}):null]})});function Bu({name:t,options:n,value:r,defaultValue:o,onChange:a,direction:i="vertical",className:l,...s}){const c=void 0!==r,[d,u]=x.useState(o),p=c?r:d;/* @__PURE__ */
|
|
231
|
+
return e("div",{role:"radiogroup",className:fn("flex","vertical"===i?"flex-col gap-2":"flex-row gap-4",l),...s,children:n.map(n=>/* @__PURE__ */e(Fu,{name:t,value:n.value,checked:p===n.value,disabled:n.disabled,onChange(e){c||u(n.value),a?.(n.value)},label:n.label},n.value))})}Fu.displayName="Radio";const ju=["일","월","화","수","목","금","토"];function Hu(e="default"){return"strong"===e?"text-gray-900 font-extrabold":"accent"===e?"text-brand font-extrabold":"muted"===e?"text-gray-400 font-medium":"text-gray-700 font-medium"}function Yu(e="main"){return"soft"===e?"bg-main-600/50":"bg-brand"}function $u({rows:r,weekLabels:o=[...ju],cellMinHeight:a=140,className:i}){/* @__PURE__ */
|
|
232
232
|
return e("div",{className:fn("w-full overflow-hidden rounded-3 border border-gray-200 bg-white",i),children:/* @__PURE__ */n("table",{className:"w-full table-fixed border-collapse",children:[
|
|
233
233
|
/* @__PURE__ */e("thead",{children:/* @__PURE__ */e("tr",{children:o.map((t,n)=>/* @__PURE__ */e("th",{className:fn("h-8 border-b border-r border-gray-200 bg-gray-50 px-1 text-center align-middle sm:h-11 sm:px-2.5",n===o.length-1&&"border-r-0"),scope:"col",children:/* @__PURE__ */e(zn,{size:"caption3",weight:"medium",className:"text-gray-500 sm:text-sm",children:t})},`${t}-${n}`))})}),
|
|
234
234
|
/* @__PURE__ */e("tbody",{children:r.map((r,o)=>/* @__PURE__ */e("tr",{children:r.map((i,l)=>{const s=i.colSpan??1,c=i.id??`r${o}-c${l}`,d=r.slice(0,l+1).reduce((e,t)=>e+(t.colSpan??1),0)>=7;/* @__PURE__ */
|
|
235
|
-
return e("td",{colSpan:s,className:fn("border-r border-b border-gray-200 align-top",d&&"border-r-0"),children:/* @__PURE__ */e("div",{className:fn("flex h-full flex-col gap-1 p-1 transition-colors duration-200 sm:gap-2 sm:p-2",i.muted&&"bg-gray-50",i.highlighted&&"bg-
|
|
235
|
+
return e("td",{colSpan:s,className:fn("border-r border-b border-gray-200 align-top",d&&"border-r-0"),children:/* @__PURE__ */e("div",{className:fn("flex h-full flex-col gap-1 p-1 transition-colors duration-200 sm:gap-2 sm:p-2",i.muted&&"bg-gray-50",i.highlighted&&"bg-brand-soft/70 ring-1 ring-inset ring-main-400"),style:{minHeight:`${a}px`},children:i.content?i.content:/* @__PURE__ */n(t,{children:[void 0!==i.day?/* @__PURE__ */e(zn,{size:"caption3",weight:"medium",className:fn("leading-tight sm:text-base",Hu(i.dayTone)),children:i.day}):null,void 0!==i.title?/* @__PURE__ */e(zn,{size:"caption3",weight:"bold",className:"line-clamp-1 text-gray-900 sm:text-sm",children:i.title}):null,i.bars&&i.bars.length>0?/* @__PURE__ */e("div",{className:"mt-0.5 flex flex-col gap-1",children:i.bars.map((t,n)=>{/* @__PURE__ */return e("span",{className:fn("block h-1 rounded-full transition-all duration-200 sm:h-1.5",Yu(t.tone)),style:{width:(r=t.width,void 0===r?"100%":"number"==typeof r?`${r}%`:r)}},`${c}-bar-${n}`);var r})}):null,void 0!==i.subtitle?/* @__PURE__ */e(zn,{size:"caption3",weight:"medium",className:"hidden text-gray-600 sm:block",children:i.subtitle}):null,"number"==typeof i.participantCount&&i.participantCount>=2?/* @__PURE__ */n("div",{className:"mt-auto inline-flex w-fit items-center gap-0.5 rounded-full bg-brand-soft px-1.5 py-0.5 text-brand sm:gap-1 sm:px-2","aria-label":`${i.participantCount}명 작성`,children:[
|
|
236
236
|
/* @__PURE__ */e(Qn,{className:"size-2.5 sm:size-3",strokeWidth:2.4}),
|
|
237
|
-
/* @__PURE__ */e(zn,{size:"caption3",weight:"bold",className:"leading-none tabular-nums",children:i.participantCount})]}):null]})})},c)})},`row-${o}`))})]})})}function
|
|
237
|
+
/* @__PURE__ */e(zn,{size:"caption3",weight:"bold",className:"leading-none tabular-nums",children:i.participantCount})]}):null]})})},c)})},`row-${o}`))})]})})}function Vu({title:t,subtitle:r,action:o,onActionClick:a,actionLabel:i="전체보기 →",size:l="md",className:s,...c}){const d={sm:"text-sm font-extrabold tracking-[-0.2px]",md:"text-base font-extrabold tracking-[-0.3px]",lg:"text-lg font-extrabold tracking-[-0.4px]"}[l],u={sm:"text-[10px]",md:"text-[11px]",lg:"text-xs"}[l],p=o??(a?/* @__PURE__ */e("button",{type:"button",onClick:a,className:"text-xs font-bold text-brand transition-opacity hover:opacity-80",children:i}):null);/* @__PURE__ */
|
|
238
238
|
return n("div",{"data-slot":"section-header",className:fn("flex items-baseline justify-between gap-3",s),...c,children:[
|
|
239
239
|
/* @__PURE__ */n("div",{className:"min-w-0",children:[
|
|
240
|
-
/* @__PURE__ */e("h2",{className:fn("text-gray-900",d),children:t}),r?/* @__PURE__ */e("div",{className:fn("mt-0.5 text-gray-500",u),children:r}):null]}),p?/* @__PURE__ */e("div",{className:"shrink-0",children:p}):null]})}function
|
|
241
|
-
return e(
|
|
242
|
-
/* @__PURE__ */e(
|
|
243
|
-
return e(
|
|
244
|
-
return e(U.span,{"aria-hidden":!0,...a,ref:n,children:o||"▼"})});
|
|
245
|
-
/* @__PURE__ */e(
|
|
246
|
-
return e(
|
|
247
|
-
return e(
|
|
248
|
-
return e(
|
|
249
|
-
return e(
|
|
240
|
+
/* @__PURE__ */e("h2",{className:fn("text-gray-900",d),children:t}),r?/* @__PURE__ */e("div",{className:fn("mt-0.5 text-gray-500",u),children:r}):null]}),p?/* @__PURE__ */e("div",{className:"shrink-0",children:p}):null]})}function Gu(e,[t,n]){return Math.min(n,Math.max(t,e))}var qu=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Qu=x.forwardRef((t,n)=>/* @__PURE__ */e(U.span,{...t,ref:n,style:{...qu,...t.style}}));Qu.displayName="VisuallyHidden";var Uu=Qu,Ku=[" ","Enter","ArrowUp","ArrowDown"],Xu=[" ","Enter"],Zu="Select",[Ju,ep,tp]=$(Zu),[np]=O(Zu,[tp,cd]),rp=cd(),[op,ap]=np(Zu),[ip,lp]=np(Zu),sp=t=>{const{__scopeSelect:r,children:o,open:a,defaultOpen:i,onOpenChange:l,value:s,defaultValue:c,onValueChange:d,dir:u,name:p,autoComplete:f,disabled:m,required:h,form:g}=t,b=rp(r),[v,y]=x.useState(null),[w,C]=x.useState(null),[k,N]=x.useState(!1),A=be(u),[M,S]=Q({prop:a,defaultProp:i??!1,onChange:l,caller:Zu}),[R,E]=Q({prop:s,defaultProp:c,onChange:d,caller:Zu}),_=x.useRef(null),P=!v||g||!!v.closest("form"),[D,L]=x.useState(/* @__PURE__ */new Set),O=Array.from(D).map(e=>e.props.value).join(";");/* @__PURE__ */
|
|
241
|
+
return e(Ad,{...b,children:/* @__PURE__ */n(op,{required:h,scope:r,trigger:v,onTriggerChange:y,valueNode:w,onValueNodeChange:C,valueNodeHasChildren:k,onValueNodeHasChildrenChange:N,contentId:ee(),value:R,onValueChange:E,open:M,onOpenChange:S,dir:A,triggerPointerDownPosRef:_,disabled:m,children:[
|
|
242
|
+
/* @__PURE__ */e(Ju.Provider,{scope:r,children:/* @__PURE__ */e(ip,{scope:t.__scopeSelect,onNativeOptionAdd:x.useCallback(e=>{L(t=>new Set(t).add(e))},[]),onNativeOptionRemove:x.useCallback(e=>{L(t=>{const n=new Set(t);return n.delete(e),n})},[]),children:o})}),P?/* @__PURE__ */n(Up,{"aria-hidden":!0,required:h,tabIndex:-1,name:p,autoComplete:f,value:R,onChange(e){return E(e.target.value)},disabled:m,form:g,children:[void 0===R?/* @__PURE__ */e("option",{value:""}):null,Array.from(D)]},O):null]})})};sp.displayName=Zu;var cp="SelectTrigger",dp=x.forwardRef((t,n)=>{const{__scopeSelect:r,disabled:o=!1,...a}=t,i=rp(r),l=ap(cp,r),s=l.disabled||o,c=W(n,l.onTriggerChange),d=ep(r),u=x.useRef("touch"),[p,f,m]=Xp(e=>{const t=d().filter(e=>!e.disabled),n=t.find(e=>e.value===l.value),r=Zp(t,e,n);void 0!==r&&l.onValueChange(r.value)}),h=e=>{s||(l.onOpenChange(!0),m()),e&&(l.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};/* @__PURE__ */
|
|
243
|
+
return e(Md,{asChild:!0,...i,children:/* @__PURE__ */e(U.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":Kp(l.value)?"":void 0,...a,ref:c,onClick:V(a.onClick,e=>{e.currentTarget.focus(),"mouse"!==u.current&&h(e)}),onPointerDown:V(a.onPointerDown,e=>{u.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(h(e),e.preventDefault())}),onKeyDown:V(a.onKeyDown,e=>{const t=""!==p.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||f(e.key),t&&" "===e.key||Ku.includes(e.key)&&(h(),e.preventDefault())})})})});dp.displayName=cp;var up="SelectValue",pp=x.forwardRef((n,r)=>{const{__scopeSelect:o,className:a,style:i,children:l,placeholder:s="",...c}=n,d=ap(up,o),{onValueNodeHasChildrenChange:u}=d,p=void 0!==l,f=W(r,d.onValueNodeChange);return G(()=>{u(p)},[u,p]),/* @__PURE__ */e(U.span,{...c,ref:f,style:{pointerEvents:"none"},children:Kp(d.value)?/* @__PURE__ */e(t,{children:s}):l})});pp.displayName=up;var fp=x.forwardRef((t,n)=>{const{__scopeSelect:r,children:o,...a}=t;/* @__PURE__ */
|
|
244
|
+
return e(U.span,{"aria-hidden":!0,...a,ref:n,children:o||"▼"})});fp.displayName="SelectIcon";var mp=t=>/* @__PURE__ */e(Cr,{asChild:!0,...t});mp.displayName="SelectPortal";var hp="SelectContent",gp=x.forwardRef((t,n)=>{const r=ap(hp,t.__scopeSelect),[o,a]=x.useState();if(G(()=>{a(new DocumentFragment)},[]),!r.open){const n=o;return n?_.createPortal(
|
|
245
|
+
/* @__PURE__ */e(vp,{scope:t.__scopeSelect,children:/* @__PURE__ */e(Ju.Slot,{scope:t.__scopeSelect,children:/* @__PURE__ */e("div",{children:t.children})})}),n):null}/* @__PURE__ */
|
|
246
|
+
return e(xp,{...t,ref:n})});gp.displayName=hp;var bp=10,[vp,yp]=np(hp),wp=/* @__PURE__ */F("SelectContent.RemoveScroll"),xp=x.forwardRef((t,n)=>{const{__scopeSelect:r,position:o="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:i,onPointerDownOutside:l,side:s,sideOffset:c,align:d,alignOffset:u,arrowPadding:p,collisionBoundary:f,collisionPadding:m,sticky:h,hideWhenDetached:g,avoidCollisions:b,...v}=t,y=ap(hp,r),[w,C]=x.useState(null),[k,N]=x.useState(null),A=W(n,e=>C(e)),[M,S]=x.useState(null),[R,E]=x.useState(null),_=ep(r),[P,D]=x.useState(!1),L=x.useRef(!1);x.useEffect(()=>{if(w)return mo(w)},[w]),Nr();const O=x.useCallback(e=>{const[t,...n]=_().map(e=>e.ref.current),[r]=n.slice(-1),o=document.activeElement;for(const a of e){if(a===o)return;if(a?.scrollIntoView({block:"nearest"}),a===t&&k&&(k.scrollTop=0),a===r&&k&&(k.scrollTop=k.scrollHeight),a?.focus(),document.activeElement!==o)return}},[_,k]),z=x.useCallback(()=>O([M,w]),[O,M,w]);x.useEffect(()=>{P&&z()},[P,z]);const{onOpenChange:T,triggerPointerDownPosRef:I}=y;x.useEffect(()=>{if(w){let e={x:0,y:0};const t=t=>{e={x:Math.abs(Math.round(t.pageX)-(I.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(I.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():w.contains(n.target)||T(!1),document.removeEventListener("pointermove",t),I.current=null};return null!==I.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[w,T,I]),x.useEffect(()=>{const e=()=>T(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[T]);const[F,B]=Xp(e=>{const t=_().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=Zp(t,e,n);r&&setTimeout(()=>r.ref.current.focus())}),j=x.useCallback((e,t,n)=>{const r=!L.current&&!n;(void 0!==y.value&&y.value===t||r)&&(S(e),r&&(L.current=!0))},[y.value]),H=x.useCallback(()=>w?.focus(),[w]),Y=x.useCallback((e,t,n)=>{(void 0!==y.value&&y.value===t||!L.current&&!n)&&E(e)},[y.value]),$="popper"===o?kp:Cp,G=$===kp?{side:s,sideOffset:c,align:d,alignOffset:u,arrowPadding:p,collisionBoundary:f,collisionPadding:m,sticky:h,hideWhenDetached:g,avoidCollisions:b}:{};/* @__PURE__ */
|
|
247
|
+
return e(vp,{scope:r,content:w,viewport:k,onViewportChange:N,itemRefCallback:j,selectedItem:M,onItemLeave:H,itemTextRefCallback:Y,focusSelectedItem:z,selectedItemText:R,position:o,isPositioned:P,searchRef:F,children:/* @__PURE__ */e(lo,{as:wp,allowPinchZoom:!0,children:/* @__PURE__ */e(hr,{asChild:!0,trapped:y.open,onMountAutoFocus(e){e.preventDefault()},onUnmountAutoFocus:V(a,e=>{y.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:/* @__PURE__ */e(cr,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside(e){return e.preventDefault()},onDismiss(){return y.onOpenChange(!1)},children:/* @__PURE__ */e($,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu(e){return e.preventDefault()},...v,...G,onPlaced(){return D(!0)},ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:V(v.onKeyDown,e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||B(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=_().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=t.indexOf(e.target);t=t.slice(n+1)}setTimeout(()=>O(t)),e.preventDefault()}})})})})})})});xp.displayName="SelectContentImpl";var Cp=x.forwardRef((t,n)=>{const{__scopeSelect:r,onPlaced:o,...a}=t,i=ap(hp,r),l=yp(hp,r),[s,c]=x.useState(null),[d,u]=x.useState(null),p=W(n,e=>u(e)),f=ep(r),m=x.useRef(!1),h=x.useRef(!0),{viewport:g,selectedItem:b,selectedItemText:v,focusSelectedItem:y}=l,w=x.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&d&&g&&b&&v){const e=i.trigger.getBoundingClientRect(),t=d.getBoundingClientRect(),n=i.valueNode.getBoundingClientRect(),r=v.getBoundingClientRect();if("rtl"!==i.dir){const o=n.left-(r.left-t.left),a=e.width+(e.left-o),i=Math.max(a,t.width),l=window.innerWidth-bp,c=Gu(o,[bp,Math.max(bp,l-i)]);s.style.minWidth=a+"px",s.style.left=c+"px"}else{const o=window.innerWidth-n.right-(t.right-r.right),a=window.innerWidth-e.right-o,i=e.width+a,l=Math.max(i,t.width),c=window.innerWidth-bp,d=Gu(o,[bp,Math.max(bp,c-l)]);s.style.minWidth=i+"px",s.style.right=d+"px"}const a=f(),l=window.innerHeight-2*bp,c=g.scrollHeight,u=window.getComputedStyle(d),p=parseInt(u.borderTopWidth,10),h=parseInt(u.paddingTop,10),y=parseInt(u.borderBottomWidth,10),w=p+h+c+parseInt(u.paddingBottom,10)+y,x=Math.min(5*b.offsetHeight,w),C=window.getComputedStyle(g),k=parseInt(C.paddingTop,10),N=parseInt(C.paddingBottom,10),A=e.top+e.height/2-bp,M=l-A,S=b.offsetHeight/2,R=p+h+(b.offsetTop+S),E=w-R;if(R<=A){const e=a.length>0&&b===a[a.length-1].ref.current;s.style.bottom="0px";const t=Math.max(M,S+(e?N:0)+(d.clientHeight-g.offsetTop-g.offsetHeight)+y);s.style.height=R+t+"px"}else{const e=a.length>0&&b===a[0].ref.current;s.style.top="0px";const t=Math.max(A,p+g.offsetTop+(e?k:0)+S);s.style.height=t+E+"px",g.scrollTop=R-A+g.offsetTop}s.style.margin=`${bp}px 0`,s.style.minHeight=x+"px",s.style.maxHeight=l+"px",o?.(),requestAnimationFrame(()=>m.current=!0)}},[f,i.trigger,i.valueNode,s,d,g,b,v,i.dir,o]);G(()=>w(),[w]);const[C,k]=x.useState();G(()=>{d&&k(window.getComputedStyle(d).zIndex)},[d]);const N=x.useCallback(e=>{e&&!0===h.current&&(w(),y?.(),h.current=!1)},[w,y]);/* @__PURE__ */
|
|
248
|
+
return e(Np,{scope:r,contentWrapper:s,shouldExpandOnScrollRef:m,onScrollButtonChange:N,children:/* @__PURE__ */e("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:/* @__PURE__ */e(U.div,{...a,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});Cp.displayName="SelectItemAlignedPosition";var kp=x.forwardRef((t,n)=>{const{__scopeSelect:r,align:o="start",collisionPadding:a=bp,...i}=t,l=rp(r);/* @__PURE__ */
|
|
249
|
+
return e(Sd,{...l,...i,ref:n,align:o,collisionPadding:a,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});kp.displayName="SelectPopperPosition";var[Np,Ap]=np(hp,{}),Mp="SelectViewport",Sp=x.forwardRef((r,o)=>{const{__scopeSelect:a,nonce:i,...l}=r,s=yp(Mp,a),c=Ap(Mp,a),d=W(o,s.onViewportChange),u=x.useRef(0);/* @__PURE__ */
|
|
250
250
|
return n(t,{children:[
|
|
251
251
|
/* @__PURE__ */e("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),
|
|
252
|
-
/* @__PURE__ */e(
|
|
253
|
-
return e(
|
|
254
|
-
return e(U.div,{id:a.id,...o,ref:n})});
|
|
255
|
-
return e(
|
|
256
|
-
/* @__PURE__ */e(U.span,{id:u.textId,...s,ref:h}),u.isSelected&&c.valueNode&&!c.valueNodeHasChildren?_.createPortal(s.children,c.valueNode):null]})});
|
|
257
|
-
return e(U.div,{"aria-hidden":!0,...o,ref:n})});
|
|
258
|
-
return n(
|
|
252
|
+
/* @__PURE__ */e(Ju.Slot,{scope:a,children:/* @__PURE__ */e(U.div,{"data-radix-select-viewport":"",role:"presentation",...l,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...l.style},onScroll:V(l.onScroll,e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=c;if(r?.current&&n){const e=Math.abs(u.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*bp,o=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),i=Math.max(o,a);if(i<r){const o=i+e,a=Math.min(r,o),l=o-a;n.style.height=a+"px","0px"===n.style.bottom&&(t.scrollTop=l>0?l:0,n.style.justifyContent="flex-end")}}}u.current=t.scrollTop})})})]})});Sp.displayName=Mp;var Rp="SelectGroup",[Ep,_p]=np(Rp),Pp=x.forwardRef((t,n)=>{const{__scopeSelect:r,...o}=t,a=ee();/* @__PURE__ */
|
|
253
|
+
return e(Ep,{scope:r,id:a,children:/* @__PURE__ */e(U.div,{role:"group","aria-labelledby":a,...o,ref:n})})});Pp.displayName=Rp;var Dp="SelectLabel",Lp=x.forwardRef((t,n)=>{const{__scopeSelect:r,...o}=t,a=_p(Dp,r);/* @__PURE__ */
|
|
254
|
+
return e(U.div,{id:a.id,...o,ref:n})});Lp.displayName=Dp;var Op="SelectItem",[zp,Tp]=np(Op),Ip=x.forwardRef((t,n)=>{const{__scopeSelect:r,value:o,disabled:a=!1,textValue:i,...l}=t,s=ap(Op,r),c=yp(Op,r),d=s.value===o,[u,p]=x.useState(i??""),[f,m]=x.useState(!1),h=W(n,e=>c.itemRefCallback?.(e,o,a)),g=ee(),b=x.useRef("touch"),v=()=>{a||(s.onValueChange(o),s.onOpenChange(!1))};if(""===o)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");/* @__PURE__ */
|
|
255
|
+
return e(zp,{scope:r,value:o,disabled:a,textId:g,isSelected:d,onItemTextChange:x.useCallback(e=>{p(t=>t||(e?.textContent??"").trim())},[]),children:/* @__PURE__ */e(Ju.ItemSlot,{scope:r,value:o,disabled:a,textValue:u,children:/* @__PURE__ */e(U.div,{role:"option","aria-labelledby":g,"data-highlighted":f?"":void 0,"aria-selected":d&&f,"data-state":d?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...l,ref:h,onFocus:V(l.onFocus,()=>m(!0)),onBlur:V(l.onBlur,()=>m(!1)),onClick:V(l.onClick,()=>{"mouse"!==b.current&&v()}),onPointerUp:V(l.onPointerUp,()=>{"mouse"===b.current&&v()}),onPointerDown:V(l.onPointerDown,e=>{b.current=e.pointerType}),onPointerMove:V(l.onPointerMove,e=>{b.current=e.pointerType,a?c.onItemLeave?.():"mouse"===b.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:V(l.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:V(l.onKeyDown,e=>{""!==c.searchRef?.current&&" "===e.key||(Xu.includes(e.key)&&v()," "===e.key&&e.preventDefault())})})})})});Ip.displayName=Op;var Wp="SelectItemText",Fp=x.forwardRef((r,o)=>{const{__scopeSelect:a,className:i,style:l,...s}=r,c=ap(Wp,a),d=yp(Wp,a),u=Tp(Wp,a),p=lp(Wp,a),[f,m]=x.useState(null),h=W(o,e=>m(e),u.onItemTextChange,e=>d.itemTextRefCallback?.(e,u.value,u.disabled)),g=f?.textContent,b=x.useMemo(()=>/* @__PURE__ */e("option",{value:u.value,disabled:u.disabled,children:g},u.value),[u.disabled,u.value,g]),{onNativeOptionAdd:v,onNativeOptionRemove:y}=p;return G(()=>(v(b),()=>y(b)),[v,y,b]),/* @__PURE__ */n(t,{children:[
|
|
256
|
+
/* @__PURE__ */e(U.span,{id:u.textId,...s,ref:h}),u.isSelected&&c.valueNode&&!c.valueNodeHasChildren?_.createPortal(s.children,c.valueNode):null]})});Fp.displayName=Wp;var Bp="SelectItemIndicator",jp=x.forwardRef((t,n)=>{const{__scopeSelect:r,...o}=t;return Tp(Bp,r).isSelected?/* @__PURE__ */e(U.span,{"aria-hidden":!0,...o,ref:n}):null});jp.displayName=Bp;var Hp="SelectScrollUpButton",Yp=x.forwardRef((t,n)=>{const r=yp(Hp,t.__scopeSelect),o=Ap(Hp,t.__scopeSelect),[a,i]=x.useState(!1),l=W(n,o.onScrollButtonChange);return G(()=>{if(r.viewport&&r.isPositioned){let e=()=>{i(t.scrollTop>0)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),a?/* @__PURE__ */e(Gp,{...t,ref:l,onAutoScroll(){const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});Yp.displayName=Hp;var $p="SelectScrollDownButton",Vp=x.forwardRef((t,n)=>{const r=yp($p,t.__scopeSelect),o=Ap($p,t.__scopeSelect),[a,i]=x.useState(!1),l=W(n,o.onScrollButtonChange);return G(()=>{if(r.viewport&&r.isPositioned){let e=()=>{const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;i(n)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),a?/* @__PURE__ */e(Gp,{...t,ref:l,onAutoScroll(){const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});Vp.displayName=$p;var Gp=x.forwardRef((t,n)=>{const{__scopeSelect:r,onAutoScroll:o,...a}=t,i=yp("SelectScrollButton",r),l=x.useRef(null),s=ep(r),c=x.useCallback(()=>{null!==l.current&&(window.clearInterval(l.current),l.current=null)},[]);return x.useEffect(()=>()=>c(),[c]),G(()=>{const e=s().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[s]),/* @__PURE__ */e(U.div,{"aria-hidden":!0,...a,ref:n,style:{flexShrink:0,...a.style},onPointerDown:V(a.onPointerDown,()=>{null===l.current&&(l.current=window.setInterval(o,50))}),onPointerMove:V(a.onPointerMove,()=>{i.onItemLeave?.(),null===l.current&&(l.current=window.setInterval(o,50))}),onPointerLeave:V(a.onPointerLeave,()=>{c()})})}),qp=x.forwardRef((t,n)=>{const{__scopeSelect:r,...o}=t;/* @__PURE__ */
|
|
257
|
+
return e(U.div,{"aria-hidden":!0,...o,ref:n})});qp.displayName="SelectSeparator";var Qp="SelectArrow";x.forwardRef((t,n)=>{const{__scopeSelect:r,...o}=t,a=rp(r),i=ap(Qp,r),l=yp(Qp,r);return i.open&&"popper"===l.position?/* @__PURE__ */e(Rd,{...a,...o,ref:n}):null}).displayName=Qp;var Up=x.forwardRef(({__scopeSelect:t,value:n,...r},o)=>{const a=x.useRef(null),i=W(o,a),l=ns(n);return x.useEffect(()=>{const e=a.current;if(!e)return;const t=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(l!==n&&r){const t=new Event("change",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}},[l,n]),/* @__PURE__ */e(U.select,{...r,style:{...qu,...r.style},ref:i,defaultValue:n})});function Kp(e){return""===e||void 0===e}function Xp(e){const t=ar(e),n=x.useRef(""),r=x.useRef(0),o=x.useCallback(e=>{const o=n.current+e;t(o),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout(()=>e(""),1e3))}(o)},[t]),a=x.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return x.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function Zp(e,t,n){const r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=(i=e,l=Math.max(o,0),i.map((e,t)=>i[(l+t)%i.length]));var i,l;1===r.length&&(a=a.filter(e=>e!==n));const s=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return s!==n?s:void 0}Up.displayName="SelectBubbleInput";var Jp=dp,ef=fp,tf=mp,nf=gp,rf=Sp,of=Lp,af=Ip,lf=Fp,sf=jp,cf=Yp,df=Vp,uf=qp;const pf=sp,ff=Pp,mf=pp;function hf({className:t,size:r="default",children:o,...a}){/* @__PURE__ */
|
|
258
|
+
return n(Jp,{"data-slot":"select-trigger","data-size":r,className:fn("group flex w-full items-center justify-between whitespace-nowrap border bg-white outline-none transition-all duration-200","disabled:cursor-not-allowed disabled:opacity-50","hover:border-gray-400","data-[placeholder]:text-gray-500 focus-visible:ring-3 focus-visible:ring-main-300/60","sm"===r?"h-10 min-w-[150px] rounded-3 border-gray-200 px-3.5":"h-10 min-w-[150px] rounded-3 border-gray-200 px-4",t),...a,children:[
|
|
259
259
|
/* @__PURE__ */e(zn,{size:"body2",weight:"medium",className:"line-clamp-1 text-gray-900",children:o}),
|
|
260
|
-
/* @__PURE__ */e(
|
|
261
|
-
return n(
|
|
262
|
-
/* @__PURE__ */e("span",{className:"absolute right-3 flex size-4 items-center justify-center",children:/* @__PURE__ */e(
|
|
263
|
-
/* @__PURE__ */e(
|
|
264
|
-
return e(
|
|
265
|
-
return e(
|
|
266
|
-
return e(
|
|
267
|
-
return e(
|
|
268
|
-
/* @__PURE__ */e(
|
|
269
|
-
/* @__PURE__ */e(
|
|
270
|
-
/* @__PURE__ */e(
|
|
271
|
-
return e(
|
|
260
|
+
/* @__PURE__ */e(ef,{asChild:!0,children:/* @__PURE__ */e(mn,{"data-slot":"select-chevron",className:fn("pointer-events-none shrink-0 text-gray-600 transition-transform duration-200 group-data-[state=open]:rotate-180","h-4 w-4"),strokeWidth:2.8})})]})}function gf({className:t,children:r,...o}){/* @__PURE__ */
|
|
261
|
+
return n(af,{"data-slot":"select-item",className:fn("relative flex w-full cursor-pointer items-center gap-3 rounded-2 px-3.5 py-2.5 outline-hidden select-none","text-gray-900 transition-colors focus:bg-gray-100 focus:text-gray-900","data-disabled:pointer-events-none data-disabled:opacity-50",t),...o,children:[
|
|
262
|
+
/* @__PURE__ */e("span",{className:"absolute right-3 flex size-4 items-center justify-center",children:/* @__PURE__ */e(sf,{children:/* @__PURE__ */e(jn,{className:"size-4 text-brand"})})}),
|
|
263
|
+
/* @__PURE__ */e(lf,{children:/* @__PURE__ */e(zn,{size:"body2",weight:"medium",children:r})})]})}function bf({className:t,...n}){/* @__PURE__ */
|
|
264
|
+
return e(uf,{"data-slot":"select-separator",className:fn("pointer-events-none my-1 h-px bg-gray-200",t),...n})}function vf({className:t,...n}){/* @__PURE__ */
|
|
265
|
+
return e(cf,{"data-slot":"select-scroll-up-button",className:fn("flex cursor-default items-center justify-center py-1 text-gray-600",t),...n,children:/* @__PURE__ */e($n,{className:"size-4"})})}function yf({className:t,...n}){/* @__PURE__ */
|
|
266
|
+
return e(df,{"data-slot":"select-scroll-down-button",className:fn("flex cursor-default items-center justify-center py-1 text-gray-600",t),...n,children:/* @__PURE__ */e(mn,{className:"size-4"})})}function wf({className:t,children:r,position:o="popper",...a}){/* @__PURE__ */
|
|
267
|
+
return e(tf,{children:/* @__PURE__ */n(nf,{"data-slot":"select-content",className:fn("relative z-50 max-h-(--radix-select-content-available-height) min-w-32 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===o&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1","rounded-4 border border-gray-200 bg-white",t),position:o,...a,children:[
|
|
268
|
+
/* @__PURE__ */e(vf,{}),
|
|
269
|
+
/* @__PURE__ */e(rf,{className:fn("p-2","popper"===o&&"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width) scroll-my-1"),children:r}),
|
|
270
|
+
/* @__PURE__ */e(yf,{})]})})}function xf({className:t,...n}){/* @__PURE__ */
|
|
271
|
+
return e(of,{"data-slot":"select-label",className:fn("px-4 py-2 text-xs font-bold text-gray-500",t),...n})}function Cf({text:t,action:r,onAction:o,className:a,...i}){/* @__PURE__ */
|
|
272
272
|
return n("div",{role:"status","aria-live":"polite",className:fn("inline-flex items-center gap-4 px-4 py-3","rounded-2.5 bg-gray-900 text-white shadow-lg","text-sm font-semibold",a),...i,children:[
|
|
273
|
-
/* @__PURE__ */e("span",{children:t}),r&&/* @__PURE__ */e("button",{type:"button",onClick:o,className:"bg-transparent text-main-500 font-extrabold hover:underline focus:outline-none focus-visible:ring-2 focus-visible:ring-main-500/40 rounded-1",children:r})]})}const
|
|
274
|
-
/* @__PURE__ */e("div",{className:fn("pointer-events-none fixed left-1/2 z-[1000] flex -translate-x-1/2",
|
|
275
|
-
return n("div",{"data-slot":"stat-card",className:fn(
|
|
273
|
+
/* @__PURE__ */e("span",{children:t}),r&&/* @__PURE__ */e("button",{type:"button",onClick:o,className:"bg-transparent text-main-500 font-extrabold hover:underline focus:outline-none focus-visible:ring-2 focus-visible:ring-main-500/40 rounded-1",children:r})]})}const kf=x.createContext(null),Nf={top:"top-4",bottom:"bottom-4"};function Af({children:t,position:r="bottom"}){const[o,a]=x.useState(null),i=x.useRef(0),l=x.useRef(null),s=x.useCallback(e=>{l.current&&(clearTimeout(l.current),l.current=null),a(t=>t?.id===e?null:t)},[]),c=x.useCallback(e=>{i.current+=1;const t=i.current,n=e.duration??3e3;return l.current&&clearTimeout(l.current),a({...e,id:t}),n>0&&(l.current=setTimeout(()=>{a(e=>e?.id===t?null:e),l.current=null},n)),t},[]);x.useEffect(()=>()=>{l.current&&clearTimeout(l.current)},[]);const d=x.useMemo(()=>({show:c,dismiss:s}),[c,s]),[u,p]=x.useState(!1);return x.useEffect(()=>p(!0),[]),/* @__PURE__ */n(kf.Provider,{value:d,children:[t,u&&D(
|
|
274
|
+
/* @__PURE__ */e("div",{className:fn("pointer-events-none fixed left-1/2 z-[1000] flex -translate-x-1/2",Nf[r]),children:o&&/* @__PURE__ */e("div",{className:"pointer-events-auto animate-in fade-in-0 slide-in-from-bottom-2 duration-300",children:/* @__PURE__ */e(Cf,{text:o.text,action:o.action,onAction(){o.onAction?.(),s(o.id)}})},o.id)}),document.body)]})}function Mf(){const e=x.useContext(kf);if(!e)throw new Error("useSnackbar must be used within <SnackbarProvider />");return e}const Sf=xn("rounded-3 border border-gray-200",{variants:{tone:{white:"bg-white",brand:"bg-brand-softer border-brand-soft",mint:"bg-mint-200/40 border-mint-200",blue:"bg-blue-200/40 border-blue-200",gray:"bg-gray-50"},size:{sm:"min-w-[120px] p-3",md:"min-w-[140px] p-4",lg:"min-w-[160px] p-5"}},defaultVariants:{tone:"white",size:"md"}}),Rf={sm:"text-lg",md:"text-2xl",lg:"text-3xl"};function Ef({label:t,value:r,helper:o,tone:a,size:i,className:l,...s}){const c=i??"md";/* @__PURE__ */
|
|
275
|
+
return n("div",{"data-slot":"stat-card",className:fn(Sf({tone:a,size:i}),l),...s,children:[
|
|
276
276
|
/* @__PURE__ */e("div",{className:"text-[10px] font-semibold text-gray-500",children:t}),
|
|
277
|
-
/* @__PURE__ */e("div",{className:fn("mt-1.5 font-extrabold tracking-[-0.4px] leading-none text-gray-900 tabular-nums",
|
|
277
|
+
/* @__PURE__ */e("div",{className:fn("mt-1.5 font-extrabold tracking-[-0.4px] leading-none text-gray-900 tabular-nums",Rf[c]),children:r}),o?/* @__PURE__ */e("div",{className:"mt-1.5 text-[10px] text-gray-500",children:o}):null]})}const _f={sm:{circle:"h-7 w-7",trackTop:"top-3.5",checkIcon:"h-3 w-3",numberSize:"caption1",labelSize:"body2",labelMargin:"mt-3"},md:{circle:"h-10 w-10",trackTop:"top-5",checkIcon:"h-4 w-4",numberSize:"body1",labelSize:"heading2",labelMargin:"mt-5"},lg:{circle:"h-14 w-14",trackTop:"top-7",checkIcon:"h-5 w-5",numberSize:"body1",labelSize:"heading1",labelMargin:"mt-7"}};function Pf({steps:t,currentStep:r,size:o="md",className:a}){const i=_f[o];if(0===t.length)/* @__PURE__ */
|
|
278
278
|
return e("div",{className:fn("w-full",a)});const l=Math.max(t.length-1,0),s=Math.min(Math.max(r-1,0),l),c=100/(2*t.length)+"%",d=0===l?100:s/l*100;/* @__PURE__ */
|
|
279
279
|
return e("div",{className:fn("w-full",a),children:/* @__PURE__ */n("div",{className:"relative",children:[t.length>1?/* @__PURE__ */n("div",{className:fn("absolute",i.trackTop),style:{left:c,right:c},children:[
|
|
280
280
|
/* @__PURE__ */e("div",{className:"h-0.5 w-full bg-gray-200"}),
|
|
281
|
-
/* @__PURE__ */e("div",{className:"absolute top-0 left-0 h-0.5 bg-
|
|
281
|
+
/* @__PURE__ */e("div",{className:"absolute top-0 left-0 h-0.5 bg-brand transition-all duration-300 ease-in-out",style:{width:`${d}%`}})]}):null,
|
|
282
282
|
/* @__PURE__ */e("ol",{className:"relative z-10 flex items-start",children:t.map((t,r)=>{const o=r<s,a=r===s,l=t.id??`step-${r}`;/* @__PURE__ */
|
|
283
283
|
return n("li",{className:"flex flex-1 flex-col items-center",children:[
|
|
284
|
-
/* @__PURE__ */e("span",{className:fn("flex items-center justify-center rounded-full border-2 bg-white transition-colors duration-200",i.circle,o&&"border-
|
|
285
|
-
/* @__PURE__ */e(zn,{size:i.labelSize,weight:a?"bold":"medium",className:fn("text-center leading-tight",i.labelMargin,o&&"text-gray-900",a&&"text-
|
|
286
|
-
return e("div",{className:fn("w-full overflow-x-auto pb-2",a),children:/* @__PURE__ */e("div",{className:"grid w-max grid-flow-col grid-rows-7",style:{gridTemplateRows:`repeat(7, ${r}px)`,gridAutoColumns:`${r}px`,gap:`${o}px`},children:t.map((t,o)=>{/* @__PURE__ */return n(
|
|
287
|
-
/* @__PURE__ */e(
|
|
288
|
-
/* @__PURE__ */e(
|
|
289
|
-
/* @__PURE__ */n("p",{className:"whitespace-nowrap text-xs",children:[t.date," · ",t.count,"회 활동"]}),c===o&&i?/* @__PURE__ */e("div",{className:"mt-2",children:i(t)}):null]})})]},o);var a})})})}function
|
|
290
|
-
return n("span",{"data-slot":"streak-chip",className:fn("inline-flex items-center gap-1 rounded-full border border-
|
|
284
|
+
/* @__PURE__ */e("span",{className:fn("flex items-center justify-center rounded-full border-2 bg-white transition-colors duration-200",i.circle,o&&"border-brand bg-brand text-white",a&&"border-brand bg-brand text-white ring-4 ring-main-300",!o&&!a&&"border-gray-300 text-gray-600"),"aria-current":a?"step":void 0,children:o?/* @__PURE__ */e(jn,{className:i.checkIcon,strokeWidth:2.5}):/* @__PURE__ */e(zn,{size:i.numberSize,weight:"bold",className:fn(a?"text-white":"text-gray-600"),children:r+1})}),
|
|
285
|
+
/* @__PURE__ */e(zn,{size:i.labelSize,weight:a?"bold":"medium",className:fn("text-center leading-tight",i.labelMargin,o&&"text-gray-900",a&&"text-brand",!o&&!a&&"text-gray-600"),children:t.label})]},l)})})]})})}function Df({data:t=[],size:r=26,gap:o=8,className:a,renderCellActions:i}){const[l,s]=C.useState(null),[c,d]=C.useState(null),u=C.useRef(null),p=C.useRef(!1),f=C.useRef(!1),m=()=>{null!==u.current&&(clearTimeout(u.current),u.current=null)};/* @__PURE__ */
|
|
286
|
+
return e("div",{className:fn("w-full overflow-x-auto pb-2",a),children:/* @__PURE__ */e("div",{className:"grid w-max grid-flow-col grid-rows-7",style:{gridTemplateRows:`repeat(7, ${r}px)`,gridAutoColumns:`${r}px`,gap:`${o}px`},children:t.map((t,o)=>{/* @__PURE__ */return n(Kd,{open:l===o,onOpenChange(e){if(!e){if(p.current)return void(p.current=!1);s(null),d(null),f.current=!0,setTimeout(()=>{f.current=!1},200)}},children:[
|
|
287
|
+
/* @__PURE__ */e(Xd,{asChild:!0,children:/* @__PURE__ */e("button",{type:"button","aria-label":`${t.date} · ${t.count}회 활동`,className:fn("cursor-pointer transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-800 focus-visible:ring-offset-1",(a=t.count,a<=0?"bg-gray-100":1===a?"bg-main-300":2===a?"bg-main-500":3===a?"bg-main-700":"bg-brand"),c===o&&"ring-2 ring-gray-800 ring-offset-1"),style:{width:r,height:r,borderRadius:`${Math.max(4,Math.round(.23*r))}px`},onMouseEnter(){m(),null!==c||f.current||s(o)},onMouseLeave(){null===c&&(u.current=setTimeout(()=>s(null),80))},onClick(){m(),c===o?(d(null),s(null),f.current=!0,setTimeout(()=>{f.current=!1},200)):(p.current=!0,d(o),s(o))}})}),
|
|
288
|
+
/* @__PURE__ */e(Zd,{children:/* @__PURE__ */n(Jd,{side:"top",sideOffset:4,onOpenAutoFocus(e){return e.preventDefault()},onMouseEnter(){m()},onMouseLeave(){null===c&&s(null)},className:fn("z-50 min-w-[120px] rounded-xl bg-gray-900 px-3 py-2 text-white shadow-md","animate-in fade-in-0 zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","data-[side=top]:slide-in-from-bottom-2 data-[side=bottom]:slide-in-from-top-2"),children:[
|
|
289
|
+
/* @__PURE__ */n("p",{className:"whitespace-nowrap text-xs",children:[t.date," · ",t.count,"회 활동"]}),c===o&&i?/* @__PURE__ */e("div",{className:"mt-2",children:i(t)}):null]})})]},o);var a})})})}function Lf({days:t,icon:r="🔥",unit:o,className:a,...i}){/* @__PURE__ */
|
|
290
|
+
return n("span",{"data-slot":"streak-chip",className:fn("inline-flex items-center gap-1 rounded-full border border-brand-soft bg-brand-softer","px-3 py-1.5 text-sm font-extrabold text-brand tabular-nums",a),...i,children:[
|
|
291
291
|
/* @__PURE__ */e("span",{"aria-hidden":!0,className:"leading-none",children:r}),
|
|
292
|
-
/* @__PURE__ */n("span",{children:[t,o?/* @__PURE__ */e("span",{className:"ml-0.5",children:o}):null]})]})}function
|
|
293
|
-
return n("div",{"data-slot":"streak-hero",className:fn("min-w-[200px] rounded-4 border border-
|
|
292
|
+
/* @__PURE__ */n("span",{children:[t,o?/* @__PURE__ */e("span",{className:"ml-0.5",children:o}):null]})]})}function Of({days:t,label:r="현재 스트릭",unit:o="일째",icon:a="🔥",meta:i,className:l,...s}){/* @__PURE__ */
|
|
293
|
+
return n("div",{"data-slot":"streak-hero",className:fn("min-w-[200px] rounded-4 border border-brand-soft p-4","bg-[linear-gradient(135deg,#fff8f5,#ffe9e0)]",l),...s,children:[
|
|
294
294
|
/* @__PURE__ */n("div",{className:"mb-2 flex items-center justify-between",children:[
|
|
295
295
|
/* @__PURE__ */e("span",{className:"text-[11px] font-bold text-gray-600",children:r}),
|
|
296
296
|
/* @__PURE__ */e("span",{"aria-hidden":!0,className:"text-lg animate-flame-flicker leading-none",children:a})]}),
|
|
297
297
|
/* @__PURE__ */n("div",{className:"flex items-baseline gap-1",children:[
|
|
298
298
|
/* @__PURE__ */e("span",{className:"text-[32px] font-extrabold leading-none tracking-[-0.6px] text-brand tabular-nums",children:t}),
|
|
299
|
-
/* @__PURE__ */e("span",{className:"text-sm font-bold text-gray-700",children:o})]}),i?/* @__PURE__ */e("div",{className:"mt-1.5 text-[10px] text-gray-600",children:i}):null]})}function
|
|
299
|
+
/* @__PURE__ */e("span",{className:"text-sm font-bold text-gray-700",children:o})]}),i?/* @__PURE__ */e("div",{className:"mt-1.5 text-[10px] text-gray-600",children:i}):null]})}function zf({items:t,activeId:r,onChange:o,fullWidth:a=!1,size:i="md",className:l,...s}){const c={sm:"px-4 py-2 text-xs",md:"px-5 py-2.5 text-sm",lg:"px-6 py-3 text-base"}[i];/* @__PURE__ */
|
|
300
300
|
return e("div",{"data-slot":"tabs",role:"tablist",className:fn("flex border-b border-gray-200",a?"":"gap-1",l),...s,children:t.map(t=>{const i=r===t.id;/* @__PURE__ */
|
|
301
301
|
return n("button",{type:"button",role:"tab","aria-selected":i,"aria-current":i?"page":void 0,onClick(){o?.(t.id),t.onClick?.()},className:fn("relative -mb-px inline-flex items-center justify-center gap-1.5 border-b-2 font-bold transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/30",a&&"flex-1",c,i?"border-brand text-brand":"border-transparent text-gray-500 hover:text-gray-700"),children:[
|
|
302
|
-
/* @__PURE__ */e("span",{children:t.label}),void 0!==t.badge?/* @__PURE__ */e("span",{className:fn("text-[11px] font-semibold tabular-nums",i?"text-brand/70":"text-gray-400"),children:t.badge}):null]},t.id)})})}const
|
|
303
|
-
return n("span",{"data-slot":"tag",className:fn(
|
|
304
|
-
return n("button",{"data-slot":"filter-chip",type:i,"data-active":r?"true":"false","aria-pressed":r??!1,className:fn(
|
|
305
|
-
return n("span",{"data-slot":"challenge-tag",className:fn("inline-flex items-center rounded-full border border-
|
|
302
|
+
/* @__PURE__ */e("span",{children:t.label}),void 0!==t.badge?/* @__PURE__ */e("span",{className:fn("text-[11px] font-semibold tabular-nums",i?"text-brand/70":"text-gray-400"),children:t.badge}):null]},t.id)})})}const Tf=xn("inline-flex items-center justify-center font-bold whitespace-nowrap",{variants:{tone:{gray:"bg-gray-100 text-gray-700",brand:"bg-brand-soft text-brand",mint:"bg-mint-200 text-mint-900",blue:"bg-blue-200 text-blue-600",red:"bg-red-300 text-red-700",green:"bg-green-200 text-green-700"},size:{xs:"text-[9px] py-0.5 px-1.5 gap-0.5",sm:"text-[10px] py-[3px] px-2 gap-1",md:"text-[11px] py-1 px-2.5 gap-1",lg:"text-xs py-[5px] px-3 gap-1"},pill:{true:"rounded-full",false:"rounded-1"}},defaultVariants:{tone:"brand",size:"md",pill:!0}});function If({className:e,tone:t,size:r,pill:o,icon:a,children:i,...l}){/* @__PURE__ */
|
|
303
|
+
return n("span",{"data-slot":"tag",className:fn(Tf({tone:t,size:r,pill:o,className:e})),...l,children:[a,i]})}const Wf=xn("inline-flex items-center justify-center rounded-full border font-bold whitespace-nowrap transition-[background-color,border-color,color] duration-150 ease-out active:scale-[0.97] disabled:cursor-not-allowed disabled:opacity-[0.45] disabled:active:scale-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/30 focus-visible:ring-offset-2",{variants:{size:{sm:"text-[11px] py-1.5 px-3 gap-1",md:"text-xs py-[7px] px-3.5 gap-1",lg:"text-sm py-2 px-4 gap-1.5"},active:{true:"bg-brand text-white border-brand",false:"bg-white text-gray-700 border-gray-200 hover:bg-gray-50 hover:border-gray-300"}},defaultVariants:{size:"md",active:!1}});function Ff({className:e,size:t,active:r,icon:o,children:a,type:i="button",...l}){/* @__PURE__ */
|
|
304
|
+
return n("button",{"data-slot":"filter-chip",type:i,"data-active":r?"true":"false","aria-pressed":r??!1,className:fn(Wf({size:t,active:r,className:e})),...l,children:[o,a]})}function Bf({children:t,icon:r,size:o="md",className:a,...i}){const l="sm"===o?10:11;/* @__PURE__ */
|
|
305
|
+
return n("span",{"data-slot":"challenge-tag",className:fn("inline-flex items-center rounded-full border border-brand-soft bg-brand-softer font-bold text-brand",{sm:"text-[10px] px-2 py-1 gap-1",md:"text-[11px] px-2.5 py-[5px] gap-1.5"}[o],a),...i,children:[
|
|
306
306
|
/* @__PURE__ */e("span",{"aria-hidden":!0,className:"flex items-center",children:r??/* @__PURE__ */e(Bn,{width:l,height:l})}),
|
|
307
|
-
/* @__PURE__ */e("span",{children:t})]})}const
|
|
308
|
-
return n("div",{role:"status","aria-live":"polite",className:fn(
|
|
309
|
-
/* @__PURE__ */n("div",{className:"min-w-0 flex-1",children:[o&&/* @__PURE__ */e(zn,{size:"caption2",weight:"extrabold",className:"block tracking-[-0.2px] text-black",children:o}),a&&/* @__PURE__ */e(zn,{size:"caption3",weight:"regular",className:"mt-0.5 block text-gray-600",children:a})]}),i&&/* @__PURE__ */e("button",{type:"button",onClick:l,className:"shrink-0 bg-transparent px-1 text-xs font-bold text-brand hover:underline focus:outline-none focus-visible:ring-2 focus-visible:ring-brand/30",children:i})]})}const
|
|
310
|
-
/* @__PURE__ */e("div",{"aria-live":"polite","aria-atomic":"true",className:fn("pointer-events-none fixed z-[1000] flex max-w-[calc(100%-32px)] flex-col gap-2",
|
|
307
|
+
/* @__PURE__ */e("span",{children:t})]})}const jf={brand:{bg:"bg-brand-soft",color:"text-brand"},success:{bg:"bg-mint-200",color:"text-mint-900"},danger:{bg:"bg-red-300",color:"text-red-700"},info:{bg:"bg-blue-200",color:"text-blue-600"}},Hf=xn(fn("flex items-center gap-3 px-3.5 py-3 bg-white","rounded-3 border border-gray-200 shadow-lg","min-w-[280px] max-w-[360px]"));function Yf({tone:t="brand",icon:r,title:o,body:a,action:i,onAction:l,className:s,...c}){const d=jf[t];/* @__PURE__ */
|
|
308
|
+
return n("div",{role:"status","aria-live":"polite",className:fn(Hf(),s),...c,children:[r&&/* @__PURE__ */e("div",{className:fn("flex h-8 w-8 shrink-0 items-center justify-center rounded-full",d.bg),children:/* @__PURE__ */e(Kn,{name:r,size:16,className:d.color})}),
|
|
309
|
+
/* @__PURE__ */n("div",{className:"min-w-0 flex-1",children:[o&&/* @__PURE__ */e(zn,{size:"caption2",weight:"extrabold",className:"block tracking-[-0.2px] text-black",children:o}),a&&/* @__PURE__ */e(zn,{size:"caption3",weight:"regular",className:"mt-0.5 block text-gray-600",children:a})]}),i&&/* @__PURE__ */e("button",{type:"button",onClick:l,className:"shrink-0 bg-transparent px-1 text-xs font-bold text-brand hover:underline focus:outline-none focus-visible:ring-2 focus-visible:ring-brand/30",children:i})]})}const $f=x.createContext(null),Vf={top:"top-4 left-1/2 -translate-x-1/2 items-center","top-right":"top-4 right-4 items-end","top-left":"top-4 left-4 items-start",bottom:"bottom-4 left-1/2 -translate-x-1/2 items-center","bottom-right":"bottom-4 right-4 items-end","bottom-left":"bottom-4 left-4 items-start"};function Gf({children:t,position:r="top-right",max:o=5}){const[a,i]=x.useState([]),l=x.useRef(0),s=x.useRef(/* @__PURE__ */new Map),c=x.useCallback(e=>{const t=s.current.get(e);t&&(clearTimeout(t),s.current.delete(e)),i(t=>t.filter(t=>t.id!==e))},[]),d=x.useCallback(e=>{l.current+=1;const t=l.current,n=e.duration??4e3;if(i(n=>{const r=[...n,{...e,id:t}];return r.length>o?r.slice(r.length-o):r}),n>0){const e=setTimeout(()=>c(t),n);s.current.set(t,e)}return t},[c,o]);x.useEffect(()=>{const e=s.current;return()=>{e.forEach(e=>clearTimeout(e)),e.clear()}},[]);const u=x.useMemo(()=>({show:d,dismiss:c}),[d,c]),[p,f]=x.useState(!1);return x.useEffect(()=>f(!0),[]),/* @__PURE__ */n($f.Provider,{value:u,children:[t,p&&D(
|
|
310
|
+
/* @__PURE__ */e("div",{"aria-live":"polite","aria-atomic":"true",className:fn("pointer-events-none fixed z-[1000] flex max-w-[calc(100%-32px)] flex-col gap-2",Vf[r]),children:a.map(t=>/* @__PURE__ */e("div",{className:"pointer-events-auto animate-in fade-in-0 slide-in-from-top-2 duration-300",children:/* @__PURE__ */e(Yf,{tone:t.tone,icon:t.icon,title:t.title,body:t.body,action:t.action,onAction(){t.onAction?.(),c(t.id)}})},t.id))}),document.body)]})}function qf(){const e=x.useContext($f);if(!e)throw new Error("useToast must be used within <ToastProvider />");return e}const Qf=x.forwardRef(({className:t,label:r,labelPosition:o="right",id:a,disabled:i,...l},s)=>{const c=x.useId(),d=a||c,u=/* @__PURE__ */n("span",{className:"relative inline-flex h-[22px] w-[38px] shrink-0 items-center",children:[
|
|
311
311
|
/* @__PURE__ */e("input",{ref:s,id:d,type:"checkbox",disabled:i,className:"peer absolute inset-0 m-0 h-full w-full cursor-pointer appearance-none rounded-full bg-gray-300 outline-none transition-colors duration-150 focus-visible:ring-2 focus-visible:ring-brand/30 focus-visible:ring-offset-2 checked:bg-brand disabled:cursor-not-allowed",...l}),
|
|
312
312
|
/* @__PURE__ */e("span",{className:"pointer-events-none absolute top-[2px] left-[2px] h-[18px] w-[18px] rounded-full bg-white shadow-[0_1px_3px_rgba(0,0,0,0.15)] transition-transform duration-150 ease-out peer-checked:translate-x-4"})]});/* @__PURE__ */
|
|
313
|
-
return n("label",{htmlFor:d,className:fn("inline-flex cursor-pointer items-center gap-2 select-none",i&&"cursor-not-allowed opacity-[0.45]",t),children:[r&&"left"===o?/* @__PURE__ */e(zn,{size:"caption2",weight:"medium",className:"text-gray-800",children:r}):null,u,r&&"right"===o?/* @__PURE__ */e(zn,{size:"caption2",weight:"medium",className:"text-gray-800",children:r}):null]})});
|
|
314
|
-
return e(U.button,{type:"button","aria-pressed":l,"data-state":l?"on":"off","data-disabled":t.disabled?"":void 0,...i,ref:n,onClick:V(t.onClick,()=>{t.disabled||s(!l)})})});
|
|
315
|
-
return e(
|
|
316
|
-
return e(
|
|
317
|
-
return e(
|
|
318
|
-
return e(
|
|
319
|
-
return e(
|
|
320
|
-
return e(
|
|
321
|
-
return e(
|
|
322
|
-
return n(
|
|
323
|
-
/* @__PURE__ */e(zn,{size:"body2",weight:"bold",className:"text-inherit",children:o})]})}var[
|
|
324
|
-
return e(
|
|
325
|
-
return e(K,{present:o||l.open,children:/* @__PURE__ */e(l.disableHoverableContent?
|
|
326
|
-
/* @__PURE__ */e(
|
|
327
|
-
/* @__PURE__ */e(
|
|
328
|
-
return e(
|
|
329
|
-
return e(
|
|
313
|
+
return n("label",{htmlFor:d,className:fn("inline-flex cursor-pointer items-center gap-2 select-none",i&&"cursor-not-allowed opacity-[0.45]",t),children:[r&&"left"===o?/* @__PURE__ */e(zn,{size:"caption2",weight:"medium",className:"text-gray-800",children:r}):null,u,r&&"right"===o?/* @__PURE__ */e(zn,{size:"caption2",weight:"medium",className:"text-gray-800",children:r}):null]})});Qf.displayName="Toggle";var Uf="rovingFocusGroup.onEntryFocus",Kf={bubbles:!1,cancelable:!0},Xf="RovingFocusGroup",[Zf,Jf,em]=$(Xf),[tm,nm]=O(Xf,[em]),[rm,om]=tm(Xf),am=x.forwardRef((t,n)=>/* @__PURE__ */e(Zf.Provider,{scope:t.__scopeRovingFocusGroup,children:/* @__PURE__ */e(Zf.Slot,{scope:t.__scopeRovingFocusGroup,children:/* @__PURE__ */e(im,{...t,ref:n})})}));am.displayName=Xf;var im=x.forwardRef((t,n)=>{const{__scopeRovingFocusGroup:r,orientation:o,loop:a=!1,dir:i,currentTabStopId:l,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:d,preventScrollOnEntryFocus:u=!1,...p}=t,f=x.useRef(null),m=W(n,f),h=be(i),[g,b]=Q({prop:l,defaultProp:s??null,onChange:c,caller:Xf}),[v,y]=x.useState(!1),w=ar(d),C=Jf(r),k=x.useRef(!1),[N,A]=x.useState(0);return x.useEffect(()=>{const e=f.current;if(e)return e.addEventListener(Uf,w),()=>e.removeEventListener(Uf,w)},[w]),/* @__PURE__ */e(rm,{scope:r,orientation:o,dir:h,loop:a,currentTabStopId:g,onItemFocus:x.useCallback(e=>b(e),[b]),onItemShiftTab:x.useCallback(()=>y(!0),[]),onFocusableItemAdd:x.useCallback(()=>A(e=>e+1),[]),onFocusableItemRemove:x.useCallback(()=>A(e=>e-1),[]),children:/* @__PURE__ */e(U.div,{tabIndex:v||0===N?-1:0,"data-orientation":o,...p,ref:m,style:{outline:"none",...t.style},onMouseDown:V(t.onMouseDown,()=>{k.current=!0}),onFocus:V(t.onFocus,e=>{if(e.target===e.currentTarget&&!k.current&&!v){const t=new CustomEvent(Uf,Kf);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=C().filter(e=>e.focusable);dm([e.find(e=>e.active),e.find(e=>e.id===g),...e].filter(Boolean).map(e=>e.ref.current),u)}}k.current=!1}),onBlur:V(t.onBlur,()=>y(!1))})})}),lm="RovingFocusGroupItem",sm=x.forwardRef((t,n)=>{const{__scopeRovingFocusGroup:r,focusable:o=!0,active:a=!1,tabStopId:i,children:l,...s}=t,c=ee(),d=i||c,u=om(lm,r),p=u.currentTabStopId===d,f=Jf(r),{onFocusableItemAdd:m,onFocusableItemRemove:h,currentTabStopId:g}=u;return x.useEffect(()=>{if(o)return m(),()=>h()},[o,m,h]),/* @__PURE__ */e(Zf.ItemSlot,{scope:r,id:d,focusable:o,active:a,children:/* @__PURE__ */e(U.span,{tabIndex:p?0:-1,"data-orientation":u.orientation,...s,ref:n,onMouseDown:V(t.onMouseDown,e=>{o?u.onItemFocus(d):e.preventDefault()}),onFocus:V(t.onFocus,()=>u.onItemFocus(d)),onKeyDown:V(t.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void u.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=((e,t,n)=>{const r=((e,t)=>"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e)(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:cm[r]})(e,u.orientation,u.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let o=f().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const a=o.indexOf(e.currentTarget);o=u.loop?(r=a+1,(n=o).map((e,t)=>n[(r+t)%n.length])):o.slice(a+1)}setTimeout(()=>dm(o))}var n,r}),children:"function"==typeof l?l({isCurrentTabStop:p,hasTabStop:null!=g}):l})})});sm.displayName=lm;var cm={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function dm(e,t=!1){const n=document.activeElement;for(const r of e){if(r===n)return;if(r.focus({preventScroll:t}),document.activeElement!==n)return}}var um=am,pm=sm,fm="Toggle",mm=x.forwardRef((t,n)=>{const{pressed:r,defaultPressed:o,onPressedChange:a,...i}=t,[l,s]=Q({prop:r,onChange:a,defaultProp:o??!1,caller:fm});/* @__PURE__ */
|
|
314
|
+
return e(U.button,{type:"button","aria-pressed":l,"data-state":l?"on":"off","data-disabled":t.disabled?"":void 0,...i,ref:n,onClick:V(t.onClick,()=>{t.disabled||s(!l)})})});mm.displayName=fm;var hm="ToggleGroup",[gm]=O(hm,[nm]),bm=nm(),vm=C.forwardRef((t,n)=>{const{type:r,...o}=t;if("single"===r)/* @__PURE__ */
|
|
315
|
+
return e(xm,{...o,ref:n});if("multiple"===r)/* @__PURE__ */
|
|
316
|
+
return e(Cm,{...o,ref:n});throw new Error(`Missing prop \`type\` expected on \`${hm}\``)});vm.displayName=hm;var[ym,wm]=gm(hm),xm=C.forwardRef((t,n)=>{const{value:r,defaultValue:o,onValueChange:a=()=>{},...i}=t,[l,s]=Q({prop:r,defaultProp:o??"",onChange:a,caller:hm});/* @__PURE__ */
|
|
317
|
+
return e(ym,{scope:t.__scopeToggleGroup,type:"single",value:C.useMemo(()=>l?[l]:[],[l]),onItemActivate:s,onItemDeactivate:C.useCallback(()=>s(""),[s]),children:/* @__PURE__ */e(Am,{...i,ref:n})})}),Cm=C.forwardRef((t,n)=>{const{value:r,defaultValue:o,onValueChange:a=()=>{},...i}=t,[l,s]=Q({prop:r,defaultProp:o??[],onChange:a,caller:hm}),c=C.useCallback(e=>s((t=[])=>[...t,e]),[s]),d=C.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);/* @__PURE__ */
|
|
318
|
+
return e(ym,{scope:t.__scopeToggleGroup,type:"multiple",value:l,onItemActivate:c,onItemDeactivate:d,children:/* @__PURE__ */e(Am,{...i,ref:n})})});vm.displayName=hm;var[km,Nm]=gm(hm),Am=C.forwardRef((t,n)=>{const{__scopeToggleGroup:r,disabled:o=!1,rovingFocus:a=!0,orientation:i,dir:l,loop:s=!0,...c}=t,d=bm(r),u=be(l),p={role:"group",dir:u,...c};/* @__PURE__ */
|
|
319
|
+
return e(km,{scope:r,rovingFocus:a,disabled:o,children:a?/* @__PURE__ */e(um,{asChild:!0,...d,orientation:i,dir:u,loop:s,children:/* @__PURE__ */e(U.div,{...p,ref:n})}):/* @__PURE__ */e(U.div,{...p,ref:n})})}),Mm="ToggleGroupItem",Sm=C.forwardRef((t,n)=>{const r=wm(Mm,t.__scopeToggleGroup),o=Nm(Mm,t.__scopeToggleGroup),a=bm(t.__scopeToggleGroup),i=r.value.includes(t.value),l=o.disabled||t.disabled,s={...t,pressed:i,disabled:l},c=C.useRef(null);return o.rovingFocus?/* @__PURE__ */e(pm,{asChild:!0,...a,focusable:!l,active:i,ref:c,children:/* @__PURE__ */e(Rm,{...s,ref:n})}):/* @__PURE__ */e(Rm,{...s,ref:n})});Sm.displayName=Mm;var Rm=C.forwardRef((t,n)=>{const{__scopeToggleGroup:r,value:o,...a}=t,i=wm(Mm,r);/* @__PURE__ */
|
|
320
|
+
return e(mm,{..."single"===i.type?{role:"radio","aria-checked":t.pressed,"aria-pressed":void 0}:void 0,...a,ref:n,onPressedChange(e){e?i.onItemActivate(o):i.onItemDeactivate(o)}})}),Em=vm,_m=Sm;const Pm=xn(["inline-flex w-fit items-center justify-center gap-2.5 border bg-white whitespace-nowrap","text-gray-700 transition-all duration-200 ease-out active:scale-95","cursor-pointer disabled:pointer-events-none disabled:opacity-50 disabled:active:scale-100","focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-main-300/60","hover:border-gray-400 hover:bg-gray-100","data-[state=on]:border-brand data-[state=on]:bg-brand data-[state=on]:text-white","data-[state=on]:hover:bg-main-600 data-[state=on]:hover:border-main-600","data-[state=on]:shadow-[0_4px_10px_rgba(255,87,34,0.22)]"],{variants:{shape:{rounded:"h-10 rounded-full px-5",square:"h-10 rounded-3 px-4"}},defaultVariants:{shape:"rounded"}});function Dm({children:t,className:n,...r}){/* @__PURE__ */
|
|
321
|
+
return e(Em,{"data-slot":"toggle-group",className:fn("flex flex-wrap gap-4 rounded-none",n),...r,children:t})}function Lm({icon:t,shape:r="rounded",children:o,className:a,...i}){/* @__PURE__ */
|
|
322
|
+
return n(_m,{"data-slot":"toggle-group-item",className:fn(Pm({shape:r}),a),...i,children:[t?/* @__PURE__ */e("span",{className:"inline-flex items-center justify-center text-[18px] leading-none text-inherit [&>svg]:h-5 [&>svg]:w-5",children:t}):null,
|
|
323
|
+
/* @__PURE__ */e(zn,{size:"body2",weight:"bold",className:"text-inherit",children:o})]})}var[Om]=O("Tooltip",[cd]),zm=cd(),Tm="TooltipProvider",Im=700,Wm="tooltip.open",[Fm,Bm]=Om(Tm),jm=t=>{const{__scopeTooltip:n,delayDuration:r=Im,skipDelayDuration:o=300,disableHoverableContent:a=!1,children:i}=t,l=x.useRef(!0),s=x.useRef(!1),c=x.useRef(0);return x.useEffect(()=>{const e=c.current;return()=>window.clearTimeout(e)},[]),/* @__PURE__ */e(Fm,{scope:n,isOpenDelayedRef:l,delayDuration:r,onOpen:x.useCallback(()=>{window.clearTimeout(c.current),l.current=!1},[]),onClose:x.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>l.current=!0,o)},[o]),isPointerInTransitRef:s,onPointerInTransitChange:x.useCallback(e=>{s.current=e},[]),disableHoverableContent:a,children:i})};jm.displayName=Tm;var Hm="Tooltip",[Ym,$m]=Om(Hm),Vm=t=>{const{__scopeTooltip:n,children:r,open:o,defaultOpen:a,onOpenChange:i,disableHoverableContent:l,delayDuration:s}=t,c=Bm(Hm,t.__scopeTooltip),d=zm(n),[u,p]=x.useState(null),f=ee(),m=x.useRef(0),h=l??c.disableHoverableContent,g=s??c.delayDuration,b=x.useRef(!1),[v,y]=Q({prop:o,defaultProp:a??!1,onChange(e){e?(c.onOpen(),document.dispatchEvent(new CustomEvent(Wm))):c.onClose(),i?.(e)},caller:Hm}),w=x.useMemo(()=>v?b.current?"delayed-open":"instant-open":"closed",[v]),C=x.useCallback(()=>{window.clearTimeout(m.current),m.current=0,b.current=!1,y(!0)},[y]),k=x.useCallback(()=>{window.clearTimeout(m.current),m.current=0,y(!1)},[y]),N=x.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{b.current=!0,y(!0),m.current=0},g)},[g,y]);return x.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),/* @__PURE__ */e(Ad,{...d,children:/* @__PURE__ */e(Ym,{scope:n,contentId:f,open:v,stateAttribute:w,trigger:u,onTriggerChange:p,onTriggerEnter:x.useCallback(()=>{c.isOpenDelayedRef.current?N():C()},[c.isOpenDelayedRef,N,C]),onTriggerLeave:x.useCallback(()=>{h?k():(window.clearTimeout(m.current),m.current=0)},[k,h]),onOpen:C,onClose:k,disableHoverableContent:h,children:r})})};Vm.displayName=Hm;var Gm="TooltipTrigger",qm=x.forwardRef((t,n)=>{const{__scopeTooltip:r,...o}=t,a=$m(Gm,r),i=Bm(Gm,r),l=zm(r),s=W(n,x.useRef(null),a.onTriggerChange),c=x.useRef(!1),d=x.useRef(!1),u=x.useCallback(()=>c.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",u),[u]),/* @__PURE__ */e(Md,{asChild:!0,...l,children:/* @__PURE__ */e(U.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...o,ref:s,onPointerMove:V(t.onPointerMove,e=>{"touch"!==e.pointerType&&(d.current||i.isPointerInTransitRef.current||(a.onTriggerEnter(),d.current=!0))}),onPointerLeave:V(t.onPointerLeave,()=>{a.onTriggerLeave(),d.current=!1}),onPointerDown:V(t.onPointerDown,()=>{a.open&&a.onClose(),c.current=!0,document.addEventListener("pointerup",u,{once:!0})}),onFocus:V(t.onFocus,()=>{c.current||a.onOpen()}),onBlur:V(t.onBlur,a.onClose),onClick:V(t.onClick,a.onClose)})})});qm.displayName=Gm;var Qm="TooltipPortal",[Um,Km]=Om(Qm,{forceMount:void 0}),Xm=t=>{const{__scopeTooltip:n,forceMount:r,children:o,container:a}=t,i=$m(Qm,n);/* @__PURE__ */
|
|
324
|
+
return e(Um,{scope:n,forceMount:r,children:/* @__PURE__ */e(K,{present:r||i.open,children:/* @__PURE__ */e(Cr,{asChild:!0,container:a,children:o})})})};Xm.displayName=Qm;var Zm="TooltipContent",Jm=x.forwardRef((t,n)=>{const r=Km(Zm,t.__scopeTooltip),{forceMount:o=r.forceMount,side:a="top",...i}=t,l=$m(Zm,t.__scopeTooltip);/* @__PURE__ */
|
|
325
|
+
return e(K,{present:o||l.open,children:/* @__PURE__ */e(l.disableHoverableContent?oh:eh,{side:a,...i,ref:n})})}),eh=x.forwardRef((t,n)=>{const r=$m(Zm,t.__scopeTooltip),o=Bm(Zm,t.__scopeTooltip),a=x.useRef(null),i=W(n,a),[l,s]=x.useState(null),{trigger:c,onClose:d}=r,u=a.current,{onPointerInTransitChange:p}=o,f=x.useCallback(()=>{s(null),p(!1)},[p]),m=x.useCallback((e,t)=>{const n={x:e.clientX,y:e.clientY},r=((e,t,n=5)=>{const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r})(n,((e,t)=>{const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}})(n,e.currentTarget.getBoundingClientRect())),o=(e=>{const t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),(e=>{if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const n=e[r];for(;t.length>=2;){const e=t[t.length-1],r=t[t.length-2];if(!((e.x-r.x)*(n.y-r.y)>=(e.y-r.y)*(n.x-r.x)))break;t.pop()}t.push(n)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const t=e[r];for(;n.length>=2;){const e=n[n.length-1],r=n[n.length-2];if(!((e.x-r.x)*(t.y-r.y)>=(e.y-r.y)*(t.x-r.x)))break;n.pop()}n.push(t)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)})(t)})([...r,...(e=>{const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]})(t.getBoundingClientRect())]);s(o),p(!0)},[p]);return x.useEffect(()=>()=>f(),[f]),x.useEffect(()=>{if(c&&u){const e=e=>m(e,u),t=e=>m(e,c);return c.addEventListener("pointerleave",e),u.addEventListener("pointerleave",t),()=>{c.removeEventListener("pointerleave",e),u.removeEventListener("pointerleave",t)}}},[c,u,m,f]),x.useEffect(()=>{if(l){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),o=!((e,t)=>{const{x:n,y:r}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const e=t[a],l=t[i],s=e.x,c=e.y,d=l.y;c>r!=d>r&&n<(l.x-s)*(r-c)/(d-c)+s&&(o=!o)}return o})(n,l);r?f():o&&(f(),d())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[c,u,l,d,f]),/* @__PURE__ */e(oh,{...t,ref:i})}),[th,nh]=Om(Hm,{isInside:!1}),rh=/* @__PURE__ */H("TooltipContent"),oh=x.forwardRef((t,r)=>{const{__scopeTooltip:o,children:a,"aria-label":i,onEscapeKeyDown:l,onPointerDownOutside:s,...c}=t,d=$m(Zm,o),u=zm(o),{onClose:p}=d;return x.useEffect(()=>(document.addEventListener(Wm,p),()=>document.removeEventListener(Wm,p)),[p]),x.useEffect(()=>{if(d.trigger){const e=e=>{const t=e.target;t?.contains(d.trigger)&&p()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[d.trigger,p]),/* @__PURE__ */e(cr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside(e){return e.preventDefault()},onDismiss:p,children:/* @__PURE__ */n(Sd,{"data-state":d.stateAttribute,...u,...c,ref:r,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[
|
|
326
|
+
/* @__PURE__ */e(rh,{children:a}),
|
|
327
|
+
/* @__PURE__ */e(th,{scope:o,isInside:!0,children:/* @__PURE__ */e(Uu,{id:d.contentId,role:"tooltip",children:i||a})})]})})});Jm.displayName=Zm;var ah="TooltipArrow";x.forwardRef((t,n)=>{const{__scopeTooltip:r,...o}=t,a=zm(r);return nh(ah,r).isInside?null:/* @__PURE__ */e(Rd,{...a,...o,ref:n})}).displayName=ah;var ih=jm,lh=Xm,sh=Jm;function ch({delayDuration:t=200,...n}){/* @__PURE__ */
|
|
328
|
+
return e(ih,{delayDuration:t,...n})}const dh=Vm,uh=qm;function ph({className:t,sideOffset:n=4,...r}){/* @__PURE__ */
|
|
329
|
+
return e(lh,{children:/* @__PURE__ */e(sh,{sideOffset:n,className:fn("z-50 overflow-hidden rounded-xl bg-gray-900 px-3 py-2 text-caption2 text-white shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...r})})}function fh({brand:t,items:r,activeId:o,onChange:a,end:i,compact:l=!1,className:s,...c}){/* @__PURE__ */
|
|
330
330
|
return n("header",{"data-slot":"top-nav",className:fn("sticky top-0 z-30 flex w-full items-center border-b border-gray-200 bg-white",l?"h-14 gap-4 px-4":"h-[62px] gap-6 px-7",s),...c,children:[t?/* @__PURE__ */e("div",{className:"flex shrink-0 items-center",children:t}):null,r&&r.length>0?/* @__PURE__ */e("nav",{className:fn("flex items-center gap-1",l?"ml-2":"ml-4"),children:r.map(t=>{const n=o===t.id;/* @__PURE__ */
|
|
331
|
-
return e("button",{type:"button","aria-current":n?"page":void 0,onClick(){a?.(t.id),t.onClick?.()},className:fn("rounded-2 px-3.5 py-2 text-sm transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/30",n?"bg-
|
|
331
|
+
return e("button",{type:"button","aria-current":n?"page":void 0,onClick(){a?.(t.id),t.onClick?.()},className:fn("rounded-2 px-3.5 py-2 text-sm transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/30",n?"bg-brand-softer font-bold text-brand":"font-medium text-gray-700 hover:bg-gray-100",l&&"px-2.5 py-1.5"),children:t.label},t.id)})}):null,i?/* @__PURE__ */e("div",{className:"ml-auto flex shrink-0 items-center gap-2.5",children:i}):null]})}function mh({letters:t,name:r,onLogoClick:o,className:a,...i}){/* @__PURE__ */
|
|
332
332
|
return n("div",{"data-slot":"top-nav-brand",className:fn("flex items-center gap-2.5",a),...i,children:[
|
|
333
|
-
/* @__PURE__ */e("div",{onClick:o,className:fn("flex h-[30px] w-[30px] shrink-0 items-center justify-center rounded-
|
|
333
|
+
/* @__PURE__ */e("div",{onClick:o,className:fn("flex h-[30px] w-[30px] shrink-0 items-center justify-center rounded-2","bg-[linear-gradient(135deg,#ff7043,#ff5722)] text-xs font-extrabold text-white","shadow-warm",o&&"cursor-pointer"),children:t}),r?/* @__PURE__ */e("div",{className:"text-[15px] font-extrabold tracking-[-0.3px] text-gray-900",children:r}):null]})}fh.Brand=mh;export{hn as Accordion,vn as AccordionContent,gn as AccordionItem,bn as AccordionTrigger,An as AchievementBadge,Xn as AvatarImagePicker,nr as Banner,rr as BannerCarousel,or as BottomNav,ta as BottomSheet,oa as BottomSheetClose,ia as BottomSheetContent,da as BottomSheetDescription,sa as BottomSheetFooter,la as BottomSheetHeader,aa as BottomSheetOverlay,ra as BottomSheetPortal,ca as BottomSheetTitle,na as BottomSheetTrigger,Wn as Button,ql as Calendar,Ul as Card,Xl as CardBody,Jl as CardMeta,es as CardOverlay,Kl as CardThumb,Zl as CardTitle,Bf as ChallengeTag,ts as CheckContainer,xs as CheckList,ys as Checkbox,Ss as CircleAvatar,Es as CircularProgress,_s as CommentRow,lu as CommentThread,Au as ConfirmDialog,du as DatePicker,pu as Dialog,wu as DialogBody,hu as DialogClose,vu as DialogContent,ku as DialogDescription,xu as DialogFooter,yu as DialogHeader,gu as DialogOverlay,mu as DialogPortal,Cu as DialogTitle,fu as DialogTrigger,Su as Dropdown,Ru as DropdownMenu,Ff as FilterChip,_u as GoalAddList,Du as Heatmap,Kn as Icon,Ou as ImagePicker,zu as ImagePlaceholder,Eu as MultiSelect,Tu as PageWatermark,Wu as ProgressBar,Fu as Radio,Bu as RadioGroup,uu as RangeDatePicker,$u as ScheduleCalendar,Vu as SectionHeader,pf as Select,wf as SelectContent,ff as SelectGroup,gf as SelectItem,xf as SelectLabel,yf as SelectScrollDownButton,vf as SelectScrollUpButton,bf as SelectSeparator,hf as SelectTrigger,mf as SelectValue,Cf as Snackbar,Af as SnackbarProvider,Ef as StatCard,er as StatusBadge,Pf as StepIndicator,Df as Streak,Lf as StreakChip,Of as StreakHero,As as Stripe,zf as Tabs,If as Tag,zn as Text,ou as TextArea,nu as TextField,Yf as Toast,Gf as ToastProvider,Qf as Toggle,Dm as ToggleGroup,Lm as ToggleGroupItem,dh as Tooltip,ph as TooltipContent,ch as TooltipProvider,uh as TooltipTrigger,fh as TopNav,mh as TopNavBrand,fn as cn,ks as resolveStripeTone,Ns as stripeBackground,On as textVariants,Mf as useSnackbar,qf as useToast};
|