@yoopta/themes-shadcn 6.0.0-beta.21 → 6.0.0-beta.22

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.
Files changed (91) hide show
  1. package/dist/accordion.js +1 -1
  2. package/dist/callout.js +4 -4
  3. package/dist/carousel.js +1 -1
  4. package/dist/chunks/{Combination-7354175a.js → Combination-575d4475.js} +1 -1
  5. package/dist/chunks/{arrow-right-07affdbc.js → arrow-right-38c3a9bd.js} +3 -3
  6. package/dist/chunks/{button-ab297929.js → button-7aec29d6.js} +1 -1
  7. package/dist/chunks/{card-94325fef.js → card-05710740.js} +1 -1
  8. package/dist/chunks/{check-9adcfdfa.js → check-06bd6a78.js} +2 -2
  9. package/dist/chunks/chevron-down-28dfb290.js +7 -0
  10. package/dist/chunks/chevron-up-9a13532e.js +7 -0
  11. package/dist/chunks/{code-734dab76.js → code-d31bdce0.js} +2 -2
  12. package/dist/chunks/createLucideIcon-8605f860.js +13 -0
  13. package/dist/chunks/dropdown-menu-eb328f8d.js +13 -0
  14. package/dist/chunks/external-link-1579dd7f.js +7 -0
  15. package/dist/chunks/file-text-ad3e3ebb.js +7 -0
  16. package/dist/chunks/{hover-card-cb328908.js → hover-card-d6a71398.js} +1 -1
  17. package/dist/chunks/{index-e9d6a4a8.js → index-0bca29df.js} +2 -2
  18. package/dist/chunks/{index-1b1b490b.js → index-1674c2c8.js} +1 -1
  19. package/dist/chunks/index-17323747.js +1 -0
  20. package/dist/chunks/index-23c7fb16.js +1 -0
  21. package/dist/chunks/{index-52395f9b.js → index-23db6fea.js} +1 -1
  22. package/dist/chunks/{index-3b428d14.js → index-87b75648.js} +3 -3
  23. package/dist/chunks/index-a5cba5f7.js +1 -0
  24. package/dist/chunks/{index-f99f24ae.js → index-ba3032f8.js} +1 -1
  25. package/dist/chunks/{index-71413c7f.js → index-ce60ba41.js} +1 -1
  26. package/dist/chunks/index-f85dae42.js +1 -0
  27. package/dist/chunks/{index-94aa31ed.js → index-ff0e3962.js} +1 -1
  28. package/dist/chunks/{input-2708c7f4.js → input-b2431223.js} +1 -1
  29. package/dist/chunks/label-21d46c31.js +1 -0
  30. package/dist/chunks/{language-select-6b2deae6.js → language-select-89735035.js} +1 -1
  31. package/dist/chunks/play-998f23d2.js +7 -0
  32. package/dist/chunks/{plus-b90f410e.js → plus-840fe920.js} +2 -2
  33. package/dist/chunks/popover-8e6ee2ab.js +1 -0
  34. package/dist/chunks/{scroll-area-2c9499bc.js → scroll-area-dae47c2c.js} +1 -1
  35. package/dist/chunks/select-a8bcd8b5.js +1 -0
  36. package/dist/chunks/separator-219dc1f7.js +1 -0
  37. package/dist/chunks/{settings-2-0a0fb1a1.js → settings-2-84fe63d9.js} +2 -2
  38. package/dist/chunks/sparkles-ae42eae3.js +7 -0
  39. package/dist/chunks/{tabs-e125dd17.js → tabs-294764a6.js} +1 -1
  40. package/dist/chunks/tooltip-65b9c3a0.js +12 -0
  41. package/dist/chunks/{trash-2-1f1de20b.js → trash-2-f36597ff.js} +2 -2
  42. package/dist/chunks/upload-b1dd210d.js +13 -0
  43. package/dist/chunks/utils-3345eade.js +1 -0
  44. package/dist/chunks/x-9bfeb90f.js +7 -0
  45. package/dist/code-group/elements/code-group-container.d.ts.map +1 -1
  46. package/dist/code-group.js +1 -1
  47. package/dist/code.js +1 -1
  48. package/dist/divider.js +1 -1
  49. package/dist/embed.js +4 -4
  50. package/dist/emoji/elements/emoji/emoji-dropdown.d.ts +7 -0
  51. package/dist/emoji/elements/emoji/emoji-dropdown.d.ts.map +1 -0
  52. package/dist/emoji/elements/emoji/emoji-item.d.ts +10 -0
  53. package/dist/emoji/elements/emoji/emoji-item.d.ts.map +1 -0
  54. package/dist/emoji/index.d.ts +3 -0
  55. package/dist/emoji/index.d.ts.map +1 -0
  56. package/dist/emoji.js +1 -0
  57. package/dist/file.js +4 -4
  58. package/dist/headings/heading-one/elements/heading-one.d.ts.map +1 -1
  59. package/dist/image.js +2 -2
  60. package/dist/index.d.ts +1 -0
  61. package/dist/index.d.ts.map +1 -1
  62. package/dist/index.js +1 -1
  63. package/dist/link.js +3 -3
  64. package/dist/lists.js +1 -1
  65. package/dist/mention.js +4 -4
  66. package/dist/steps.js +1 -1
  67. package/dist/table-of-contents.js +1 -1
  68. package/dist/table.js +5 -5
  69. package/dist/tabs.js +1 -1
  70. package/dist/video.js +3 -3
  71. package/package.json +18 -15
  72. package/LICENSE +0 -21
  73. package/dist/chunks/chevron-down-47d86a8a.js +0 -7
  74. package/dist/chunks/chevron-up-55ec92f0.js +0 -7
  75. package/dist/chunks/createLucideIcon-70ab5429.js +0 -26
  76. package/dist/chunks/dropdown-menu-7657ebe2.js +0 -13
  77. package/dist/chunks/external-link-956d49c0.js +0 -7
  78. package/dist/chunks/file-text-f268c203.js +0 -7
  79. package/dist/chunks/index-285e9c7c.js +0 -1
  80. package/dist/chunks/index-2ad64d02.js +0 -1
  81. package/dist/chunks/index-e0ae135e.js +0 -1
  82. package/dist/chunks/label-316e96b1.js +0 -1
  83. package/dist/chunks/play-4b3629e3.js +0 -7
  84. package/dist/chunks/popover-52a21f62.js +0 -1
  85. package/dist/chunks/select-1ae00227.js +0 -1
  86. package/dist/chunks/separator-7be92037.js +0 -1
  87. package/dist/chunks/sparkles-c8608d1b.js +0 -7
  88. package/dist/chunks/tooltip-c244369a.js +0 -12
  89. package/dist/chunks/upload-9a7846e3.js +0 -13
  90. package/dist/chunks/utils-de9c4c2b.js +0 -1
  91. package/dist/chunks/x-1b93e306.js +0 -7
package/dist/accordion.js CHANGED
@@ -1 +1 @@
1
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import{_ as n}from"./chunks/_tslib-35bb891d.js";import*as o from"react";import r,{forwardRef as i,useReducer as a,useMemo as s,useCallback as c}from"react";import{c as d,P as l,a as p,u}from"./chunks/index-2ad64d02.js";import{c as f}from"./chunks/index-e0ae135e.js";import{u as m}from"./chunks/index-91a5b8d5.js";import{u as h}from"./chunks/index-94aa31ed.js";import{P as b}from"./chunks/index-52395f9b.js";import{u as g}from"./chunks/index-71413c7f.js";import{u as y}from"./chunks/index-13505606.js";import{c as v}from"./chunks/utils-de9c4c2b.js";import{useYooptaEditor as k,Blocks as x,Elements as w}from"@yoopta/editor";import{Editor as j,Path as N,Transforms as C,Element as O}from"slate";import{P as _}from"./chunks/plus-b90f410e.js";import{T as A}from"./chunks/trash-2-1f1de20b.js";import{C as I}from"./chunks/chevron-down-47d86a8a.js";import{s as E}from"./chunks/style-inject.es-e87a8d02.js";import"react-dom";import"./chunks/createLucideIcon-70ab5429.js";var R="Collapsible",[D,P]=d(R),[S,B]=D(R),T=o.forwardRef((t,n)=>{const{__scopeCollapsible:r,open:i,defaultOpen:a,disabled:s,onOpenChange:c,...d}=t,[p,u]=h({prop:i,defaultProp:a??!1,onChange:c,caller:R});return e(S,{scope:r,disabled:s,contentId:g(),open:p,onOpenToggle:o.useCallback(()=>u(e=>!e),[u]),children:e(l.div,{"data-state":K(p),"data-disabled":s?"":void 0,...d,ref:n})})});T.displayName=R;var V="CollapsibleTrigger",z=o.forwardRef((t,n)=>{const{__scopeCollapsible:o,...r}=t,i=B(V,o);return e(l.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":K(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:n,onClick:p(t.onClick,i.onOpenToggle)})});z.displayName=V;var H="CollapsibleContent",L=o.forwardRef((t,n)=>{const{forceMount:o,...r}=t,i=B(H,t.__scopeCollapsible);return e(b,{present:o||i.open,children:({present:t})=>e(F,{...r,ref:n,present:t})})});L.displayName=H;var F=o.forwardRef((t,n)=>{const{__scopeCollapsible:r,present:i,children:a,...s}=t,c=B(H,r),[d,p]=o.useState(i),f=o.useRef(null),h=m(n,f),b=o.useRef(0),g=b.current,y=o.useRef(0),v=y.current,k=c.open||d,x=o.useRef(k),w=o.useRef(void 0);return o.useEffect(()=>{const e=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(e)},[]),u(()=>{const e=f.current;if(e){w.current=w.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";const t=e.getBoundingClientRect();b.current=t.height,y.current=t.width,x.current||(e.style.transitionDuration=w.current.transitionDuration,e.style.animationName=w.current.animationName),p(i)}},[c.open,i]),e(l.div,{"data-state":K(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!k,...s,ref:h,style:{"--radix-collapsible-content-height":g?`${g}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...t.style},children:k&&a})});function K(e){return e?"open":"closed"}var M=T,U=z,$=L,q="Accordion",G=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[J,Q,W]=f(q),[X,Y]=d(q,[W,P]),Z=P(),ee=r.forwardRef((t,n)=>{const{type:o,...r}=t,i=r,a=r;return e(J.Provider,{scope:t.__scopeAccordion,children:"multiple"===o?e(ae,{...a,ref:n}):e(ie,{...i,ref:n})})});ee.displayName=q;var[te,ne]=X(q),[oe,re]=X(q,{collapsible:!1}),ie=r.forwardRef((t,n)=>{const{value:o,defaultValue:i,onValueChange:a=()=>{},collapsible:s=!1,...c}=t,[d,l]=h({prop:o,defaultProp:i??"",onChange:a,caller:q});return e(te,{scope:t.__scopeAccordion,value:r.useMemo(()=>d?[d]:[],[d]),onItemOpen:l,onItemClose:r.useCallback(()=>s&&l(""),[s,l]),children:e(oe,{scope:t.__scopeAccordion,collapsible:s,children:e(de,{...c,ref:n})})})}),ae=r.forwardRef((t,n)=>{const{value:o,defaultValue:i,onValueChange:a=()=>{},...s}=t,[c,d]=h({prop:o,defaultProp:i??[],onChange:a,caller:q}),l=r.useCallback(e=>d((t=[])=>[...t,e]),[d]),p=r.useCallback(e=>d((t=[])=>t.filter(t=>t!==e)),[d]);return e(te,{scope:t.__scopeAccordion,value:c,onItemOpen:l,onItemClose:p,children:e(oe,{scope:t.__scopeAccordion,collapsible:!0,children:e(de,{...s,ref:n})})})}),[se,ce]=X(q),de=r.forwardRef((t,n)=>{const{__scopeAccordion:o,disabled:i,dir:a,orientation:s="vertical",...c}=t,d=r.useRef(null),u=m(d,n),f=Q(o),h="ltr"===y(a),b=p(t.onKeyDown,e=>{if(!G.includes(e.key))return;const t=e.target,n=f().filter(e=>!e.ref.current?.disabled),o=n.findIndex(e=>e.ref.current===t),r=n.length;if(-1===o)return;e.preventDefault();let i=o;const a=r-1,c=()=>{i=o+1,i>a&&(i=0)},d=()=>{i=o-1,i<0&&(i=a)};switch(e.key){case"Home":i=0;break;case"End":i=a;break;case"ArrowRight":"horizontal"===s&&(h?c():d());break;case"ArrowDown":"vertical"===s&&c();break;case"ArrowLeft":"horizontal"===s&&(h?d():c());break;case"ArrowUp":"vertical"===s&&d()}const l=i%r;n[l].ref.current?.focus()});return e(se,{scope:o,disabled:i,direction:a,orientation:s,children:e(J.Slot,{scope:o,children:e(l.div,{...c,"data-orientation":s,ref:u,onKeyDown:i?void 0:b})})})}),le="AccordionItem",[pe,ue]=X(le),fe=r.forwardRef((t,n)=>{const{__scopeAccordion:o,value:r,...i}=t,a=ce(le,o),s=ne(le,o),c=Z(o),d=g(),l=r&&s.value.includes(r)||!1,p=a.disabled||t.disabled;return e(pe,{scope:o,open:l,disabled:p,triggerId:d,children:e(M,{"data-orientation":a.orientation,"data-state":ve(l),...c,...i,ref:n,disabled:p,open:l,onOpenChange:e=>{e?s.onItemOpen(r):s.onItemClose(r)}})})});fe.displayName=le;var me="AccordionHeader";r.forwardRef((t,n)=>{const{__scopeAccordion:o,...r}=t,i=ce(q,o),a=ue(me,o);return e(l.h3,{"data-orientation":i.orientation,"data-state":ve(a.open),"data-disabled":a.disabled?"":void 0,...r,ref:n})}).displayName=me;var he="AccordionTrigger",be=r.forwardRef((t,n)=>{const{__scopeAccordion:o,...r}=t,i=ce(q,o),a=ue(he,o),s=re(he,o),c=Z(o);return e(J.ItemSlot,{scope:o,children:e(U,{"aria-disabled":a.open&&!s.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId,...c,...r,ref:n})})});be.displayName=he;var ge="AccordionContent",ye=r.forwardRef((t,n)=>{const{__scopeAccordion:o,...r}=t,i=ce(q,o),a=ue(ge,o),s=Z(o);return e($,{role:"region","aria-labelledby":a.triggerId,"data-orientation":i.orientation,...s,...r,ref:n,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}})});function ve(e){return e?"open":"closed"}ye.displayName=ge;var ke=ee,xe=fe,we=be,je=ye;const Ne=i((t,o)=>{var{children:r,className:i}=t,a=n(t,["children","className"]);return e(ke,Object.assign({},a,{className:v("w-full rounded-md border",i),ref:o,"data-slot":"accordion"},{children:r}))});Ne.displayName="Accordion";const Ce=i((t,o)=>{var{children:r}=t,i=n(t,["children"]);return e(xe,Object.assign({},i,{ref:o,"data-slot":"accordion-item",className:"border-b last:border-b-0"},{children:r}))});Ce.displayName="AccordionItem";const Oe=t=>{var{children:o}=t,r=n(t,["children"]);return e(we,Object.assign({},r,{type:"button",contentEditable:!1,"data-slot":"accordion-trigger",className:"flex shrink-0 items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"},{children:o}))},_e=i((t,o)=>{var{children:r}=t,i=n(t,["children"]);return e(je,Object.assign({},i,{ref:o,"data-slot":"accordion-content",className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm"},{children:e("div",Object.assign({className:"pt-0 pb-4 text-muted-foreground px-5"},{children:r}))}))});_e.displayName="AccordionContent";E("[data-element-type=accordion-list-item-content] [data-slate-node=element],[data-element-type=accordion-list-item-heading] [data-slate-node=element]{margin:0}");const Ae={"accordion-list":{render:t=>{const{attributes:n,children:o,blockId:r,element:i}=t,a=k(),c=s(()=>{const e=[];return i.children.forEach(t=>{var n;"accordion-list-item"===t.type&&(null===(n=t.props)||void 0===n?void 0:n.isExpanded)&&e.push(t.id)}),e},[i]);return e(Ne,Object.assign({},n,{type:"multiple",value:c,onValueChange:e=>{const t=x.getBlockSlate(a,{id:r});if(!t)return;const n=j.nodes(t,{match:e=>O.isElement(e)&&"accordion-list-item"===e.type});j.withoutNormalizing(t,()=>{var o;for(const[r,i]of n){const n=r,a=n.id,s=e.includes(a);(null===(o=n.props)||void 0===o?void 0:o.isExpanded)!==s&&C.setNodes(t,{props:Object.assign(Object.assign({},n.props),{isExpanded:s})},{at:i})}})},className:"w-full mt-2 rounded-md border"},{children:o}))}},"accordion-list-item":{render:t=>{var n;const{attributes:o,children:r,element:i}=t;return e(Ce,Object.assign({value:i.id,"data-state":(null===(n=i.props)||void 0===n?void 0:n.isExpanded)?"open":"closed"},o,{children:r}))}},"accordion-list-item-heading":{render:n=>{var o,r;const{attributes:i,children:d,element:l,blockId:p}=n,u=k(),[,f]=a(e=>e+1,0),m=s(()=>{const e=x.getBlockSlate(u,{id:p});if(e)try{const t=w.getElementPath(u,{blockId:p,element:l});return j.parent(e,t)[0]}catch(e){}},[u,p,l]),h=s(()=>{if(!m)return;if(x.getBlockSlate(u,{id:p}))try{return w.getElementPath(u,{blockId:p,element:m})}catch(e){}},[u,p,m]),b=null!==(r=null===(o=null==m?void 0:m.props)||void 0===o?void 0:o.isExpanded)&&void 0!==r&&r,g=c(()=>{m&&h&&w.updateElement(u,{blockId:p,type:m.type,props:Object.assign(Object.assign({},m.props),{isExpanded:!b}),path:h}),f()},[u,p,m,h,b]),y=c(e=>{if(u.readOnly)return;if(e.preventDefault(),e.stopPropagation(),!m||!h)return;const t=w.getElementChildren(u,{blockId:p,type:"accordion-list"});1!==(null==t?void 0:t.length)?w.deleteElement(u,{blockId:p,type:"accordion-list-item",path:h}):x.deleteBlock(u,{blockId:p})},[u,p,m,h]),v=c(e=>{if(u.readOnly)return;e.preventDefault(),e.stopPropagation();const t=x.getBlockSlate(u,{id:p});if(!t||!h)return;const n=u.y("accordion-list-item",{props:{isExpanded:!1},children:[u.y("accordion-list-item-heading"),u.y("accordion-list-item-content")]});j.withoutNormalizing(t,()=>{const e=N.next(h);C.insertNodes(t,n,{at:e});const o=[...e,0,0];setTimeout(()=>{C.select(t,{offset:0,path:o})},0)})},[u,p,h]);return t("div",Object.assign({},i,{className:"flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all px-5"},{children:[e("div",Object.assign({className:"flex-1 min-w-0"},{children:d})),t("div",Object.assign({className:"flex shrink-0 items-center gap-1",contentEditable:!1},{children:[!u.readOnly&&e("button",Object.assign({type:"button",contentEditable:!1,onClick:v,className:"flex items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 p-1",title:"Add accordion item"},{children:e(_,{className:"h-4 w-4 shrink-0 text-muted-foreground"})})),!u.readOnly&&e("button",Object.assign({type:"button",contentEditable:!1,onClick:y,className:"flex items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 p-1",title:"Delete accordion item"},{children:e(A,{className:"h-4 w-4 shrink-0 text-muted-foreground"})})),e(Oe,Object.assign({type:"button",contentEditable:!1,"data-slot":"accordion-trigger",onClick:g,className:"flex shrink-0 items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"},{children:e(I,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200 "+(b?"rotate-180":"")})}))]}))]}))}},"accordion-list-item-content":{render:t=>{const{attributes:n,children:o}=t;return e(_e,Object.assign({},n,{className:"text-muted-foreground px-5"},{children:o}))}}};export{Ae as AccordionUI};
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{_ as n}from"./chunks/_tslib-35bb891d.js";import*as o from"react";import r,{forwardRef as i,useReducer as a,useMemo as s,useCallback as c}from"react";import{c as d,P as l,a as p,u}from"./chunks/index-17323747.js";import{c as f}from"./chunks/index-f85dae42.js";import{u as m}from"./chunks/index-91a5b8d5.js";import{u as h}from"./chunks/index-ff0e3962.js";import{P as b}from"./chunks/index-23db6fea.js";import{u as g}from"./chunks/index-ce60ba41.js";import{u as y}from"./chunks/index-13505606.js";import{c as v}from"./chunks/utils-3345eade.js";import{useYooptaEditor as k,Blocks as x,Elements as w}from"@yoopta/editor";import{Editor as j,Path as N,Transforms as C,Element as O}from"slate";import{P as _}from"./chunks/plus-840fe920.js";import{T as A}from"./chunks/trash-2-f36597ff.js";import{C as I}from"./chunks/chevron-down-28dfb290.js";import{s as E}from"./chunks/style-inject.es-e87a8d02.js";import"react-dom";import"./chunks/createLucideIcon-8605f860.js";var R="Collapsible",[D,P]=d(R),[S,B]=D(R),T=o.forwardRef((t,n)=>{const{__scopeCollapsible:r,open:i,defaultOpen:a,disabled:s,onOpenChange:c,...d}=t,[p,u]=h({prop:i,defaultProp:a??!1,onChange:c,caller:R});return e(S,{scope:r,disabled:s,contentId:g(),open:p,onOpenToggle:o.useCallback(()=>u(e=>!e),[u]),children:e(l.div,{"data-state":F(p),"data-disabled":s?"":void 0,...d,ref:n})})});T.displayName=R;var V="CollapsibleTrigger",z=o.forwardRef((t,n)=>{const{__scopeCollapsible:o,...r}=t,i=B(V,o);return e(l.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":F(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:n,onClick:p(t.onClick,i.onOpenToggle)})});z.displayName=V;var H="CollapsibleContent",L=o.forwardRef((t,n)=>{const{forceMount:o,...r}=t,i=B(H,t.__scopeCollapsible);return e(b,{present:o||i.open,children:({present:t})=>e(q,{...r,ref:n,present:t})})});L.displayName=H;var q=o.forwardRef((t,n)=>{const{__scopeCollapsible:r,present:i,children:a,...s}=t,c=B(H,r),[d,p]=o.useState(i),f=o.useRef(null),h=m(n,f),b=o.useRef(0),g=b.current,y=o.useRef(0),v=y.current,k=c.open||d,x=o.useRef(k),w=o.useRef(void 0);return o.useEffect(()=>{const e=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(e)},[]),u(()=>{const e=f.current;if(e){w.current=w.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";const t=e.getBoundingClientRect();b.current=t.height,y.current=t.width,x.current||(e.style.transitionDuration=w.current.transitionDuration,e.style.animationName=w.current.animationName),p(i)}},[c.open,i]),e(l.div,{"data-state":F(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!k,...s,ref:h,style:{"--radix-collapsible-content-height":g?`${g}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...t.style},children:k&&a})});function F(e){return e?"open":"closed"}var K=T,M=z,U=L,$="Accordion",G=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[J,Q,W]=f($),[X,Y]=d($,[W,P]),Z=P(),ee=r.forwardRef((t,n)=>{const{type:o,...r}=t,i=r,a=r;return e(J.Provider,{scope:t.__scopeAccordion,children:"multiple"===o?e(ae,{...a,ref:n}):e(ie,{...i,ref:n})})});ee.displayName=$;var[te,ne]=X($),[oe,re]=X($,{collapsible:!1}),ie=r.forwardRef((t,n)=>{const{value:o,defaultValue:i,onValueChange:a=()=>{},collapsible:s=!1,...c}=t,[d,l]=h({prop:o,defaultProp:i??"",onChange:a,caller:$});return e(te,{scope:t.__scopeAccordion,value:r.useMemo(()=>d?[d]:[],[d]),onItemOpen:l,onItemClose:r.useCallback(()=>s&&l(""),[s,l]),children:e(oe,{scope:t.__scopeAccordion,collapsible:s,children:e(de,{...c,ref:n})})})}),ae=r.forwardRef((t,n)=>{const{value:o,defaultValue:i,onValueChange:a=()=>{},...s}=t,[c,d]=h({prop:o,defaultProp:i??[],onChange:a,caller:$}),l=r.useCallback(e=>d((t=[])=>[...t,e]),[d]),p=r.useCallback(e=>d((t=[])=>t.filter(t=>t!==e)),[d]);return e(te,{scope:t.__scopeAccordion,value:c,onItemOpen:l,onItemClose:p,children:e(oe,{scope:t.__scopeAccordion,collapsible:!0,children:e(de,{...s,ref:n})})})}),[se,ce]=X($),de=r.forwardRef((t,n)=>{const{__scopeAccordion:o,disabled:i,dir:a,orientation:s="vertical",...c}=t,d=r.useRef(null),u=m(d,n),f=Q(o),h="ltr"===y(a),b=p(t.onKeyDown,e=>{if(!G.includes(e.key))return;const t=e.target,n=f().filter(e=>!e.ref.current?.disabled),o=n.findIndex(e=>e.ref.current===t),r=n.length;if(-1===o)return;e.preventDefault();let i=o;const a=r-1,c=()=>{i=o+1,i>a&&(i=0)},d=()=>{i=o-1,i<0&&(i=a)};switch(e.key){case"Home":i=0;break;case"End":i=a;break;case"ArrowRight":"horizontal"===s&&(h?c():d());break;case"ArrowDown":"vertical"===s&&c();break;case"ArrowLeft":"horizontal"===s&&(h?d():c());break;case"ArrowUp":"vertical"===s&&d()}const l=i%r;n[l].ref.current?.focus()});return e(se,{scope:o,disabled:i,direction:a,orientation:s,children:e(J.Slot,{scope:o,children:e(l.div,{...c,"data-orientation":s,ref:u,onKeyDown:i?void 0:b})})})}),le="AccordionItem",[pe,ue]=X(le),fe=r.forwardRef((t,n)=>{const{__scopeAccordion:o,value:r,...i}=t,a=ce(le,o),s=ne(le,o),c=Z(o),d=g(),l=r&&s.value.includes(r)||!1,p=a.disabled||t.disabled;return e(pe,{scope:o,open:l,disabled:p,triggerId:d,children:e(K,{"data-orientation":a.orientation,"data-state":ve(l),...c,...i,ref:n,disabled:p,open:l,onOpenChange:e=>{e?s.onItemOpen(r):s.onItemClose(r)}})})});fe.displayName=le;var me="AccordionHeader";r.forwardRef((t,n)=>{const{__scopeAccordion:o,...r}=t,i=ce($,o),a=ue(me,o);return e(l.h3,{"data-orientation":i.orientation,"data-state":ve(a.open),"data-disabled":a.disabled?"":void 0,...r,ref:n})}).displayName=me;var he="AccordionTrigger",be=r.forwardRef((t,n)=>{const{__scopeAccordion:o,...r}=t,i=ce($,o),a=ue(he,o),s=re(he,o),c=Z(o);return e(J.ItemSlot,{scope:o,children:e(M,{"aria-disabled":a.open&&!s.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId,...c,...r,ref:n})})});be.displayName=he;var ge="AccordionContent",ye=r.forwardRef((t,n)=>{const{__scopeAccordion:o,...r}=t,i=ce($,o),a=ue(ge,o),s=Z(o);return e(U,{role:"region","aria-labelledby":a.triggerId,"data-orientation":i.orientation,...s,...r,ref:n,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}})});function ve(e){return e?"open":"closed"}ye.displayName=ge;var ke=ee,xe=fe,we=be,je=ye;const Ne=i((t,o)=>{var{children:r,className:i}=t,a=n(t,["children","className"]);return e(ke,Object.assign({},a,{className:v("w-full rounded-md border",i),ref:o,"data-slot":"accordion"},{children:r}))});Ne.displayName="Accordion";const Ce=i((t,o)=>{var{children:r}=t,i=n(t,["children"]);return e(xe,Object.assign({},i,{ref:o,"data-slot":"accordion-item",className:"border-b last:border-b-0"},{children:r}))});Ce.displayName="AccordionItem";const Oe=t=>{var{children:o}=t,r=n(t,["children"]);return e(we,Object.assign({},r,{type:"button",contentEditable:!1,"data-slot":"accordion-trigger",className:"flex shrink-0 items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"},{children:o}))},_e=i((t,o)=>{var{children:r}=t,i=n(t,["children"]);return e(je,Object.assign({},i,{ref:o,"data-slot":"accordion-content",className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm"},{children:e("div",Object.assign({className:"pt-0 pb-4 text-muted-foreground px-5"},{children:r}))}))});_e.displayName="AccordionContent";E("[data-element-type=accordion-list-item-content] [data-slate-node=element],[data-element-type=accordion-list-item-heading] [data-slate-node=element]{margin:0}");const Ae={"accordion-list":{render:t=>{const{attributes:n,children:o,blockId:r,element:i}=t,a=k(),c=s(()=>{const e=[];return i.children.forEach(t=>{var n;"accordion-list-item"===t.type&&(null===(n=t.props)||void 0===n?void 0:n.isExpanded)&&e.push(t.id)}),e},[i]);return e(Ne,Object.assign({},n,{type:"multiple",value:c,onValueChange:e=>{const t=x.getBlockSlate(a,{id:r});if(!t)return;const n=j.nodes(t,{match:e=>O.isElement(e)&&"accordion-list-item"===e.type});j.withoutNormalizing(t,()=>{var o;for(const[r,i]of n){const n=r,a=n.id,s=e.includes(a);(null===(o=n.props)||void 0===o?void 0:o.isExpanded)!==s&&C.setNodes(t,{props:Object.assign(Object.assign({},n.props),{isExpanded:s})},{at:i})}})},className:"w-full mt-2 rounded-md border"},{children:o}))}},"accordion-list-item":{render:t=>{var n;const{attributes:o,children:r,element:i}=t;return e(Ce,Object.assign({value:i.id,"data-state":(null===(n=i.props)||void 0===n?void 0:n.isExpanded)?"open":"closed"},o,{children:r}))}},"accordion-list-item-heading":{render:n=>{var o,r;const{attributes:i,children:d,element:l,blockId:p}=n,u=k(),[,f]=a(e=>e+1,0),m=s(()=>{const e=x.getBlockSlate(u,{id:p});if(e)try{const t=w.getElementPath(u,{blockId:p,element:l});return j.parent(e,t)[0]}catch(e){}},[u,p,l]),h=s(()=>{if(!m)return;if(x.getBlockSlate(u,{id:p}))try{return w.getElementPath(u,{blockId:p,element:m})}catch(e){}},[u,p,m]),b=null!==(r=null===(o=null==m?void 0:m.props)||void 0===o?void 0:o.isExpanded)&&void 0!==r&&r,g=c(()=>{m&&h&&w.updateElement(u,{blockId:p,type:m.type,props:Object.assign(Object.assign({},m.props),{isExpanded:!b}),path:h}),f()},[u,p,m,h,b]),y=c(e=>{if(u.readOnly)return;if(e.preventDefault(),e.stopPropagation(),!m||!h)return;const t=w.getElementChildren(u,{blockId:p,type:"accordion-list"});1!==(null==t?void 0:t.length)?w.deleteElement(u,{blockId:p,type:"accordion-list-item",path:h}):x.deleteBlock(u,{blockId:p})},[u,p,m,h]),v=c(e=>{if(u.readOnly)return;e.preventDefault(),e.stopPropagation();const t=x.getBlockSlate(u,{id:p});if(!t||!h)return;const n=u.y("accordion-list-item",{props:{isExpanded:!1},children:[u.y("accordion-list-item-heading"),u.y("accordion-list-item-content")]});j.withoutNormalizing(t,()=>{const e=N.next(h);C.insertNodes(t,n,{at:e});const o=[...e,0,0];setTimeout(()=>{C.select(t,{offset:0,path:o})},0)})},[u,p,h]);return t("div",Object.assign({},i,{className:"flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all px-5"},{children:[e("div",Object.assign({className:"flex-1 min-w-0"},{children:d})),t("div",Object.assign({className:"flex shrink-0 items-center gap-1",contentEditable:!1},{children:[!u.readOnly&&e("button",Object.assign({type:"button",contentEditable:!1,onClick:v,className:"flex items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 p-1",title:"Add accordion item"},{children:e(_,{className:"h-4 w-4 shrink-0 text-muted-foreground"})})),!u.readOnly&&e("button",Object.assign({type:"button",contentEditable:!1,onClick:y,className:"flex items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 p-1",title:"Delete accordion item"},{children:e(A,{className:"h-4 w-4 shrink-0 text-muted-foreground"})})),e(Oe,Object.assign({type:"button",contentEditable:!1,"data-slot":"accordion-trigger",onClick:g,className:"flex shrink-0 items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"},{children:e(I,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200 "+(b?"rotate-180":"")})}))]}))]}))}},"accordion-list-item-content":{render:t=>{const{attributes:n,children:o}=t;return e(_e,Object.assign({},n,{className:"text-muted-foreground px-5"},{children:o}))}}};export{Ae as AccordionUI};
package/dist/callout.js CHANGED
@@ -1,12 +1,12 @@
1
- import{jsx as e,jsxs as r}from"react/jsx-runtime";import{useElementOptions as l,useUpdateElementProps as t,ElementOptions as a}from"@yoopta/ui/element-options";import{c as o}from"./chunks/utils-de9c4c2b.js";import{c as d}from"./chunks/createLucideIcon-70ab5429.js";import"react";
1
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import{useElementOptions as l,useUpdateElementProps as t,ElementOptions as a}from"@yoopta/ui/element-options";import{c as o}from"./chunks/utils-3345eade.js";import{c as d}from"./chunks/createLucideIcon-8605f860.js";import"react";
2
2
  /**
3
- * @license lucide-react v0.378.0 - ISC
3
+ * @license lucide-react v0.294.0 - ISC
4
4
  *
5
5
  * This source code is licensed under the ISC license.
6
6
  * See the LICENSE file in the root directory of this source tree.
7
- */const n=d("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),c=d("CircleCheckBig",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]),i=d("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]),s=d("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),u=d("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]),b=[{value:"default",label:"Default",icon:e(u,{className:"h-4 w-4"})},{value:"info",label:"Info",icon:e(s,{className:"h-4 w-4 text-blue-500"})},{value:"success",label:"Success",icon:e(c,{className:"h-4 w-4 text-green-500"})},{value:"warning",label:"Warning",icon:e(n,{className:"h-4 w-4 text-yellow-500"})},{value:"error",label:"Error",icon:e(i,{className:"h-4 w-4 text-red-500"})}],m=()=>{var o,d;const{element:n}=l(),c=t();return e(a.Content,Object.assign({side:"bottom",align:"end",sideOffset:8,className:"min-w-[160px] rounded-lg border bg-popover p-2 shadow-md"},{children:r(a.Group,Object.assign({className:"flex flex-col gap-1"},{children:[e(a.Label,Object.assign({className:"px-2 text-xs font-medium text-muted-foreground"},{children:"Theme"})),e(a.Select,{value:null!==(d=null===(o=n.props)||void 0===o?void 0:o.theme)&&void 0!==d?d:"default",options:b,onValueChange:e=>c({theme:e}),className:"flex h-8 w-full items-center justify-between rounded-md border border-input bg-background px-3 text-sm hover:bg-accent",renderOption:e=>r("span",Object.assign({className:"flex items-center gap-2"},{children:[e.icon,e.label]})),renderValue:e=>{var l;return r("span",Object.assign({className:"flex items-center gap-2"},{children:[null==e?void 0:e.icon,null!==(l=null==e?void 0:e.label)&&void 0!==l?l:"Select theme"]}))}})]}))}))},g=(e="default")=>({default:"bg-muted text-muted-foreground border-muted-foreground/20",info:"bg-blue-50 text-blue-900 border-blue-200 dark:bg-blue-950 dark:text-blue-100 dark:border-blue-800",success:"bg-green-50 text-green-900 border-green-200 dark:bg-green-950 dark:text-green-100 dark:border-green-800",warning:"bg-yellow-50 text-yellow-900 border-yellow-200 dark:bg-yellow-950 dark:text-yellow-100 dark:border-yellow-800",error:"bg-red-50 text-red-900 border-red-200 dark:bg-red-950 dark:text-red-100 dark:border-red-800"}[e]),p={callout:{render:l=>{var t,d;const{attributes:n,children:c,element:i,blockId:s}=l,u=null!==(d=null===(t=i.props)||void 0===t?void 0:t.theme)&&void 0!==d?d:"default";return r("div",Object.assign({},n,{className:o("mt-4 group relative rounded-lg border-l-4 p-4 [&>p]:m-0 [&>p]:text-sm",g(u))},{children:[r(a.Root,Object.assign({blockId:s,element:i},{children:[e(a.Trigger,{className:"absolute right-0 top-0 opacity-0 group-hover:opacity-100 transition-opacity rounded-md p-1 hover:bg-black/5 dark:hover:bg-white/10"}),e(m,{})]})),c]}))}}};
7
+ */const n=d("AlertCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),c=d("CheckCircle",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]),i=d("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),s=d("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]),u=d("XCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]),b=[{value:"default",label:"Default",icon:e(s,{className:"h-4 w-4"})},{value:"info",label:"Info",icon:e(i,{className:"h-4 w-4 text-blue-500"})},{value:"success",label:"Success",icon:e(c,{className:"h-4 w-4 text-green-500"})},{value:"warning",label:"Warning",icon:e(n,{className:"h-4 w-4 text-yellow-500"})},{value:"error",label:"Error",icon:e(u,{className:"h-4 w-4 text-red-500"})}],m=()=>{var o,d;const{element:n}=l(),c=t();return e(a.Content,Object.assign({side:"bottom",align:"end",sideOffset:8,className:"min-w-[160px] rounded-lg border bg-popover p-2 shadow-md"},{children:r(a.Group,Object.assign({className:"flex flex-col gap-1"},{children:[e(a.Label,Object.assign({className:"px-2 text-xs font-medium text-muted-foreground"},{children:"Theme"})),e(a.Select,{value:null!==(d=null===(o=n.props)||void 0===o?void 0:o.theme)&&void 0!==d?d:"default",options:b,onValueChange:e=>c({theme:e}),className:"flex h-8 w-full items-center justify-between rounded-md border border-input bg-background px-3 text-sm hover:bg-accent",renderOption:e=>r("span",Object.assign({className:"flex items-center gap-2"},{children:[e.icon,e.label]})),renderValue:e=>{var l;return r("span",Object.assign({className:"flex items-center gap-2"},{children:[null==e?void 0:e.icon,null!==(l=null==e?void 0:e.label)&&void 0!==l?l:"Select theme"]}))}})]}))}))},g=(e="default")=>({default:"bg-muted text-muted-foreground border-muted-foreground/20",info:"bg-blue-50 text-blue-900 border-blue-200 dark:bg-blue-950 dark:text-blue-100 dark:border-blue-800",success:"bg-green-50 text-green-900 border-green-200 dark:bg-green-950 dark:text-green-100 dark:border-green-800",warning:"bg-yellow-50 text-yellow-900 border-yellow-200 dark:bg-yellow-950 dark:text-yellow-100 dark:border-yellow-800",error:"bg-red-50 text-red-900 border-red-200 dark:bg-red-950 dark:text-red-100 dark:border-red-800"}[e]),p={callout:{render:l=>{var t,d;const{attributes:n,children:c,element:i,blockId:s}=l,u=null!==(d=null===(t=i.props)||void 0===t?void 0:t.theme)&&void 0!==d?d:"default";return r("div",Object.assign({},n,{className:o("mt-4 group relative rounded-lg border-l-4 p-4 [&>p]:m-0 [&>p]:text-sm",g(u))},{children:[r(a.Root,Object.assign({blockId:s,element:i},{children:[e(a.Trigger,{className:"absolute right-0 top-0 opacity-0 group-hover:opacity-100 transition-opacity rounded-md p-1 hover:bg-black/5 dark:hover:bg-white/10"}),e(m,{})]})),c]}))}}};
8
8
  /**
9
- * @license lucide-react v0.378.0 - ISC
9
+ * @license lucide-react v0.294.0 - ISC
10
10
  *
11
11
  * This source code is licensed under the ISC license.
12
12
  * See the LICENSE file in the root directory of this source tree.
package/dist/carousel.js CHANGED
@@ -1 +1 @@
1
- import{jsx as n,jsxs as t}from"react/jsx-runtime";import{useRef as e,useState as r,useCallback as o,useEffect as i,createContext as s,forwardRef as c,useMemo as a,useContext as u}from"react";import{_ as l}from"./chunks/_tslib-35bb891d.js";import{B as d}from"./chunks/button-ab297929.js";import{c as f}from"./chunks/utils-de9c4c2b.js";import{A as p,a as m}from"./chunks/arrow-right-07affdbc.js";import{C as g,a as h}from"./chunks/card-94325fef.js";import"./chunks/createLucideIcon-70ab5429.js";function v(n){return function(n){return"[object Object]"===Object.prototype.toString.call(n)}(n)||Array.isArray(n)}function x(n,t){const e=Object.keys(n),r=Object.keys(t);if(e.length!==r.length)return!1;return JSON.stringify(Object.keys(n.breakpoints||{}))===JSON.stringify(Object.keys(t.breakpoints||{}))&&e.every(e=>{const r=n[e],o=t[e];return"function"==typeof r?`${r}`==`${o}`:v(r)&&v(o)?x(r,o):r===o})}function b(n){return n.concat().sort((n,t)=>n.name>t.name?1:-1).map(n=>n.options)}function y(n){return"number"==typeof n}function w(n){return"string"==typeof n}function S(n){return"boolean"==typeof n}function N(n){return"[object Object]"===Object.prototype.toString.call(n)}function O(n){return Math.abs(n)}function j(n){return Math.sign(n)}function E(n,t){return O(n-t)}function L(n){return I(n).map(Number)}function k(n){return n[z(n)]}function z(n){return Math.max(0,n.length-1)}function A(n,t){return t===z(n)}function D(n,t=0){return Array.from(Array(n),(n,e)=>t+e)}function I(n){return Object.keys(n)}function P(n,t){return[n,t].reduce((n,t)=>(I(t).forEach(e=>{const r=n[e],o=t[e],i=N(r)&&N(o);n[e]=i?P(r,o):o}),n),{})}function M(n,t){return void 0!==t.MouseEvent&&n instanceof t.MouseEvent}function F(){let n=[];const t={add:function(e,r,o,i={passive:!0}){let s;if("addEventListener"in e)e.addEventListener(r,o,i),s=()=>e.removeEventListener(r,o,i);else{const n=e;n.addListener(o),s=()=>n.removeListener(o)}return n.push(s),t},clear:function(){n=n.filter(n=>n())}};return t}function T(n,t,e,r){const o=F(),i=1e3/60;let s=null,c=0,a=0;function u(n){if(!a)return;s||(s=n,e(),e());const o=n-s;for(s=n,c+=o;c>=i;)e(),c-=i;r(c/i),a&&(a=t.requestAnimationFrame(u))}function l(){t.cancelAnimationFrame(a),s=null,c=0,a=0}return{init:function(){o.add(n,"visibilitychange",()=>{n.hidden&&(s=null,c=0)})},destroy:function(){l(),o.clear()},start:function(){a||(a=t.requestAnimationFrame(u))},stop:l,update:e,render:r}}function C(n=0,t=0){const e=O(n-t);function r(t){return t<n}function o(n){return n>t}function i(n){return r(n)||o(n)}return{length:e,max:t,min:n,constrain:function(e){return i(e)?r(e)?n:t:e},reachedAny:i,reachedMax:o,reachedMin:r,removeOffset:function(n){return e?n-e*Math.ceil((n-t)/e):n}}}function H(n,t,e){const{constrain:r}=C(0,n),o=n+1;let i=s(t);function s(n){return e?O((o+n)%o):r(n)}function c(){return i}function a(){return H(n,c(),e)}const u={get:c,set:function(n){return i=s(n),u},add:function(n){return a().set(c()+n)},clone:a};return u}function V(n,t,e,r,o,i,s,c,a,u,l,d,f,p,m,g,h,v,x){const{cross:b,direction:y}=n,w=["INPUT","SELECT","TEXTAREA"],N={passive:!1},L=F(),k=F(),z=C(50,225).constrain(p.measure(20)),A={mouse:300,touch:400},D={mouse:500,touch:600},I=m?43:25;let P=!1,T=0,H=0,V=!1,B=!1,R=!1,q=!1;function G(n){if(!M(n,r)&&n.touches.length>=2)return $(n);const t=i.readPoint(n),e=i.readPoint(n,b),s=E(t,T),a=E(e,H);if(!B&&!q){if(!n.cancelable)return $(n);if(B=s>a,!B)return $(n)}const l=i.pointerMove(n);s>g&&(R=!0),u.useFriction(.3).useDuration(.75),c.start(),o.add(y(l)),n.preventDefault()}function $(n){const t=l.byDistance(0,!1).index!==d.get(),e=i.pointerUp(n)*(m?D:A)[q?"mouse":"touch"],r=function(n,t){const e=d.add(-1*j(n)),r=l.byDistance(n,!m).distance;return m||O(n)<z?r:h&&t?.5*r:l.byIndex(e.get(),0).distance}(y(e),t),o=function(n,t){if(0===n||0===t)return 0;if(O(n)<=O(t))return 0;const e=E(O(n),O(t));return O(e/n)}(e,r),s=I-10*o,c=v+o/50;B=!1,V=!1,k.clear(),u.useDuration(s).useFriction(c),a.distance(r,!m),q=!1,f.emit("pointerUp")}function U(n){R&&(n.stopPropagation(),n.preventDefault(),R=!1)}return{init:function(n){if(!x)return;function c(c){(S(x)||x(n,c))&&function(n){const c=M(n,r);if(q=c,R=m&&c&&!n.buttons&&P,P=E(o.get(),s.get())>=2,c&&0!==n.button)return;if(function(n){const t=n.nodeName||"";return w.includes(t)}(n.target))return;V=!0,i.pointerDown(n),u.useFriction(0).useDuration(0),o.set(s),function(){const n=q?e:t;k.add(n,"touchmove",G,N).add(n,"touchend",$).add(n,"mousemove",G,N).add(n,"mouseup",$)}(),T=i.readPoint(n),H=i.readPoint(n,b),f.emit("pointerDown")}(c)}const a=t;L.add(a,"dragstart",n=>n.preventDefault(),N).add(a,"touchmove",()=>{},N).add(a,"touchend",()=>{}).add(a,"touchstart",c).add(a,"mousedown",c).add(a,"touchcancel",$).add(a,"contextmenu",$).add(a,"click",U,!0)},destroy:function(){L.clear(),k.clear()},pointerDown:function(){return V}}}function B(n,t){let e,r;function o(n){return n.timeStamp}function i(e,r){const o="client"+("x"===(r||n.scroll)?"X":"Y");return(M(e,t)?e:e.touches[0])[o]}return{pointerDown:function(n){return e=n,r=n,i(n)},pointerMove:function(n){const t=i(n)-i(r),s=o(n)-o(e)>170;return r=n,s&&(e=n),t},pointerUp:function(n){if(!e||!r)return 0;const t=i(r)-i(e),s=o(n)-o(e),c=o(n)-o(r)>170,a=t/s;return s&&!c&&O(a)>.1?a:0},readPoint:i}}function R(n,t,e,r,o,i,s){const c=[n].concat(r);let a,u,l=[],d=!1;function f(n){return o.measureSize(s.measure(n))}return{init:function(o){i&&(u=f(n),l=r.map(f),a=new ResizeObserver(e=>{(S(i)||i(o,e))&&function(e){for(const i of e){if(d)return;const e=i.target===n,s=r.indexOf(i.target),c=e?u:l[s];if(O(f(e?n:r[s])-c)>=.5){o.reInit(),t.emit("resize");break}}}(e)}),e.requestAnimationFrame(()=>{c.forEach(n=>a.observe(n))}))},destroy:function(){d=!0,a&&a.disconnect()}}}function q(n,t,e,r,o){const i=o.measure(10),s=o.measure(50),c=C(.1,.99);let a=!1;function u(){return!a&&(!!n.reachedAny(e.get())&&!!n.reachedAny(t.get()))}return{shouldConstrain:u,constrain:function(o){if(!u())return;const a=n.reachedMin(t.get())?"min":"max",l=O(n[a]-t.get()),d=e.get()-t.get(),f=c.constrain(l/s);e.subtract(d*f),!o&&O(d)<i&&(e.set(n.constrain(e.get())),r.useDuration(25).useBaseFriction())},toggleActive:function(n){a=!n}}}function G(n,t,e,r){const o=t.min+.1,i=t.max+.1,{reachedMin:s,reachedMax:c}=C(o,i);return{loop:function(t){if(!function(n){return 1===n?c(e.get()):-1===n&&s(e.get())}(t))return;const o=n*(-1*t);r.forEach(n=>n.add(o))}}}function $(n,t,e,r,o){const{reachedAny:i,removeOffset:s,constrain:c}=r;function a(n){return n.concat().sort((n,t)=>O(n)-O(t))[0]}function u(t,r){const o=[t,t+e,t-e];if(!n)return t;if(!r)return a(o);const i=o.filter(n=>j(n)===r);return i.length?a(i):k(o)-e}return{byDistance:function(e,r){const a=o.get()+e,{index:l,distance:d}=function(e){const r=n?s(e):c(e),o=t.map((n,t)=>({diff:u(n-r,0),index:t})).sort((n,t)=>O(n.diff)-O(t.diff)),{index:i}=o[0];return{index:i,distance:r}}(a),f=!n&&i(a);return!r||f?{index:l,distance:e}:{index:l,distance:e+u(t[l]-d,0)}},byIndex:function(n,e){return{index:n,distance:u(t[n]-o.get(),e)}},shortcut:u}}function U(n,t,e,r,o,i,s,c){const a={passive:!0,capture:!0};let u=0;function l(n){"Tab"===n.code&&(u=(new Date).getTime())}return{init:function(d){c&&(i.add(document,"keydown",l,!1),t.forEach((t,l)=>{i.add(t,"focus",t=>{(S(c)||c(d,t))&&function(t){if((new Date).getTime()-u>10)return;s.emit("slideFocusStart"),n.scrollLeft=0;const i=e.findIndex(n=>n.includes(t));y(i)&&(o.useDuration(0),r.index(i,0),s.emit("slideFocus"))}(l)},a)}))}}}function W(n){let t=n;function e(n){return y(n)?n:n.get()}return{get:function(){return t},set:function(n){t=e(n)},add:function(n){t+=e(n)},subtract:function(n){t-=e(n)}}}function J(n,t){const e="x"===n.scroll?function(n){return`translate3d(${n}px,0px,0px)`}:function(n){return`translate3d(0px,${n}px,0px)`},r=t.style;let o=null,i=!1;return{clear:function(){i||(r.transform="",t.getAttribute("style")||t.removeAttribute("style"))},to:function(t){if(i)return;const s=(c=n.direction(t),Math.round(100*c)/100);var c;s!==o&&(r.transform=e(s),o=s)},toggleActive:function(n){i=!n}}}function Q(n,t,e,r,o,i,s,c,a){const u=L(o),l=L(o).reverse(),d=function(){const n=s[0];return m(p(l,n),e,!1)}().concat(function(){const n=t-s[0]-1;return m(p(u,n),-e,!0)}());function f(n,t){return n.reduce((n,t)=>n-o[t],t)}function p(n,t){return n.reduce((n,e)=>f(n,t)>0?n.concat([e]):n,[])}function m(o,s,u){const l=function(n){return i.map((e,o)=>({start:e-r[o]+.5+n,end:e+t-.5+n}))}(s);return o.map(t=>{const r=u?0:-e,o=u?e:0,i=u?"end":"start",s=l[t][i];return{index:t,loopPoint:s,slideLocation:W(-1),translate:J(n,a[t]),target:()=>c.get()>s?r:o}})}return{canLoop:function(){return d.every(({index:n})=>f(u.filter(t=>t!==n),t)<=.1)},clear:function(){d.forEach(n=>n.translate.clear())},loop:function(){d.forEach(n=>{const{target:t,translate:e,slideLocation:r}=n,o=t();o!==r.get()&&(e.to(o),r.set(o))})},loopPoints:d}}function X(n,t,e){let r,o=!1;return{init:function(i){e&&(r=new MutationObserver(n=>{o||(S(e)||e(i,n))&&function(n){for(const e of n)if("childList"===e.type){i.reInit(),t.emit("slidesChanged");break}}(n)}),r.observe(n,{childList:!0}))},destroy:function(){r&&r.disconnect(),o=!0}}}function _(n,t,e,r){const o={};let i,s=null,c=null,a=!1;return{init:function(){i=new IntersectionObserver(n=>{a||(n.forEach(n=>{const e=t.indexOf(n.target);o[e]=n}),s=null,c=null,e.emit("slidesInView"))},{root:n.parentElement,threshold:r}),t.forEach(n=>i.observe(n))},destroy:function(){i&&i.disconnect(),a=!0},get:function(n=!0){if(n&&s)return s;if(!n&&c)return c;const t=function(n){return I(o).reduce((t,e)=>{const r=parseInt(e),{isIntersecting:i}=o[r];return(n&&i||!n&&!i)&&t.push(r),t},[])}(n);return n&&(s=t),n||(c=t),t}}}function K(n,t,e,r,o,i,s,c,a){const{startEdge:u,endEdge:l,direction:d}=n,f=y(e);return{groupSlides:function(n){return f?function(n,t){return L(n).filter(n=>n%t===0).map(e=>n.slice(e,e+t))}(n,e):function(n){return n.length?L(n).reduce((e,f,p)=>{const m=k(e)||0,g=0===m,h=f===z(n),v=o[u]-i[m][u],x=o[u]-i[f][l],b=!r&&g?d(s):0,y=O(x-(!r&&h?d(c):0)-(v+b));return p&&y>t+a&&e.push(f),h&&e.push(n.length),e},[]).map((t,e,r)=>{const o=Math.max(r[e-1]||0);return n.slice(o,t)}):[]}(n)}}}function Y(n,t,e,r,o,i,s){const{align:c,axis:a,direction:u,startIndex:l,loop:d,duration:f,dragFree:p,dragThreshold:m,inViewThreshold:g,slidesToScroll:h,skipSnaps:v,containScroll:x,watchResize:b,watchSlides:y,watchDrag:S,watchFocus:N}=i,I={measure:function(n){const{offsetTop:t,offsetLeft:e,offsetWidth:r,offsetHeight:o}=n;return{top:t,right:e+r,bottom:t+o,left:e,width:r,height:o}}},P=I.measure(t),M=e.map(I.measure),Y=function(n,t){const e="rtl"===t,r="y"===n,o=!r&&e?-1:1;return{scroll:r?"y":"x",cross:r?"x":"y",startEdge:r?"top":e?"right":"left",endEdge:r?"bottom":e?"left":"right",measureSize:function(n){const{height:t,width:e}=n;return r?t:e},direction:function(n){return n*o}}}(a,u),Z=Y.measureSize(P),nn=function(n){return{measure:function(t){return n*(t/100)}}}(Z),tn=function(n,t){const e={start:function(){return 0},center:function(n){return r(n)/2},end:r};function r(n){return t-n}return{measure:function(r,o){return w(n)?e[n](r):n(t,r,o)}}}(c,Z),en=!d&&!!x,rn=d||!!x,{slideSizes:on,slideSizesWithGaps:sn,startGap:cn,endGap:an}=function(n,t,e,r,o,i){const{measureSize:s,startEdge:c,endEdge:a}=n,u=e[0]&&o,l=function(){if(!u)return 0;const n=e[0];return O(t[c]-n[c])}(),d=function(){if(!u)return 0;const n=i.getComputedStyle(k(r));return parseFloat(n.getPropertyValue(`margin-${a}`))}(),f=e.map(s),p=e.map((n,t,e)=>{const r=!t,o=A(e,t);return r?f[t]+l:o?f[t]+d:e[t+1][c]-n[c]}).map(O);return{slideSizes:f,slideSizesWithGaps:p,startGap:l,endGap:d}}(Y,P,M,e,rn,o),un=K(Y,Z,h,d,P,M,cn,an,2),{snaps:ln,snapsAligned:dn}=function(n,t,e,r,o){const{startEdge:i,endEdge:s}=n,{groupSlides:c}=o,a=c(r).map(n=>k(n)[s]-n[0][i]).map(O).map(t.measure),u=r.map(n=>e[i]-n[i]).map(n=>-O(n)),l=c(u).map(n=>n[0]).map((n,t)=>n+a[t]);return{snaps:u,snapsAligned:l}}(Y,tn,P,M,un),fn=-k(ln)+k(sn),{snapsContained:pn,scrollContainLimit:mn}=function(n,t,e,r,o){const i=C(-t+n,0),s=e.map((n,t)=>{const{min:r,max:o}=i,s=i.constrain(n),c=!t,u=A(e,t);return c?o:u||a(r,s)?r:a(o,s)?o:s}).map(n=>parseFloat(n.toFixed(3))),c=function(){const n=s[0],t=k(s);return C(s.lastIndexOf(n),s.indexOf(t)+1)}();function a(n,t){return E(n,t)<=1}return{snapsContained:function(){if(t<=n+o)return[i.max];if("keepSnaps"===r)return s;const{min:e,max:a}=c;return s.slice(e,a)}(),scrollContainLimit:c}}(Z,fn,dn,x,2),gn=en?pn:dn,{limit:hn}=function(n,t,e){const r=t[0];return{limit:C(e?r-n:k(t),r)}}(fn,gn,d),vn=H(z(gn),l,d),xn=vn.clone(),bn=L(e),yn=T(r,o,()=>(({dragHandler:n,scrollBody:t,scrollBounds:e,options:{loop:r}})=>{r||e.constrain(n.pointerDown()),t.seek()})(Mn),n=>(({scrollBody:n,translate:t,location:e,offsetLocation:r,previousLocation:o,scrollLooper:i,slideLooper:s,dragHandler:c,animation:a,eventHandler:u,scrollBounds:l,options:{loop:d}},f)=>{const p=n.settled(),m=!l.shouldConstrain(),g=d?p:p&&m,h=g&&!c.pointerDown();h&&a.stop();const v=e.get()*f+o.get()*(1-f);r.set(v),d&&(i.loop(n.direction()),s.loop()),t.to(r.get()),h&&u.emit("settle"),g||u.emit("scroll")})(Mn,n)),wn=gn[vn.get()],Sn=W(wn),Nn=W(wn),On=W(wn),jn=W(wn),En=function(n,t,e,r,o,i){let s=0,c=0,a=o,u=i,l=n.get(),d=0;function f(n){return a=n,m}function p(n){return u=n,m}const m={direction:function(){return c},duration:function(){return a},velocity:function(){return s},seek:function(){const t=r.get()-n.get();let o=0;return a?(e.set(n),s+=t/a,s*=u,l+=s,n.add(s),o=l-d):(s=0,e.set(r),n.set(r),o=t),c=j(o),d=l,m},settled:function(){return O(r.get()-t.get())<.001},useBaseFriction:function(){return p(i)},useBaseDuration:function(){return f(o)},useFriction:p,useDuration:f};return m}(Sn,On,Nn,jn,f,.68),Ln=$(d,gn,fn,hn,jn),kn=function(n,t,e,r,o,i,s){function c(o){const c=o.distance,a=o.index!==t.get();i.add(c),c&&(r.duration()?n.start():(n.update(),n.render(1),n.update())),a&&(e.set(t.get()),t.set(o.index),s.emit("select"))}return{distance:function(n,t){c(o.byDistance(n,t))},index:function(n,e){const r=t.clone().set(n);c(o.byIndex(r.get(),e))}}}(yn,vn,xn,En,Ln,jn,s),zn=function(n){const{max:t,length:e}=n;return{get:function(n){return e?(n-t)/-e:0}}}(hn),An=F(),Dn=_(t,e,s,g),{slideRegistry:In}=function(n,t,e,r,o,i){const{groupSlides:s}=o,{min:c,max:a}=r;return{slideRegistry:function(){const r=s(i),o=!n||"keepSnaps"===t;return 1===e.length?[i]:o?r:r.slice(c,a).map((n,t,e)=>{const r=!t,o=A(e,t);return r?D(k(e[0])+1):o?D(z(i)-k(e)[0]+1,k(e)[0]):n})}()}}(en,x,gn,mn,un,bn),Pn=U(n,e,In,kn,En,An,s,N),Mn={ownerDocument:r,ownerWindow:o,eventHandler:s,containerRect:P,slideRects:M,animation:yn,axis:Y,dragHandler:V(Y,n,r,o,jn,B(Y,o),Sn,yn,kn,En,Ln,vn,s,nn,p,m,v,.68,S),eventStore:An,percentOfView:nn,index:vn,indexPrevious:xn,limit:hn,location:Sn,offsetLocation:On,previousLocation:Nn,options:i,resizeHandler:R(t,s,o,e,Y,b,I),scrollBody:En,scrollBounds:q(hn,On,jn,En,nn),scrollLooper:G(fn,hn,On,[Sn,On,Nn,jn]),scrollProgress:zn,scrollSnapList:gn.map(zn.get),scrollSnaps:gn,scrollTarget:Ln,scrollTo:kn,slideLooper:Q(Y,Z,fn,on,sn,ln,gn,On,e),slideFocus:Pn,slidesHandler:X(t,s,y),slidesInView:Dn,slideIndexes:bn,slideRegistry:In,slidesToScroll:un,target:jn,translate:J(Y,t)};return Mn}const Z={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function nn(n){function t(n,t){return P(n,t||{})}const e={mergeOptions:t,optionsAtMedia:function(e){const r=e.breakpoints||{},o=I(r).filter(t=>n.matchMedia(t).matches).map(n=>r[n]).reduce((n,e)=>t(n,e),{});return t(e,o)},optionsMediaQueries:function(t){return t.map(n=>I(n.breakpoints||{})).reduce((n,t)=>n.concat(t),[]).map(n.matchMedia)}};return e}function tn(n,t,e){const r=n.ownerDocument,o=r.defaultView,i=nn(o),s=function(n){let t=[];return{init:function(e,r){return t=r.filter(({options:t})=>!1!==n.optionsAtMedia(t).active),t.forEach(t=>t.init(e,n)),r.reduce((n,t)=>Object.assign(n,{[t.name]:t}),{})},destroy:function(){t=t.filter(n=>n.destroy())}}}(i),c=F(),a=function(){let n,t={};function e(n){return t[n]||[]}const r={init:function(t){n=t},emit:function(t){return e(t).forEach(e=>e(n,t)),r},off:function(n,o){return t[n]=e(n).filter(n=>n!==o),r},on:function(n,o){return t[n]=e(n).concat([o]),r},clear:function(){t={}}};return r}(),{mergeOptions:u,optionsAtMedia:l,optionsMediaQueries:d}=i,{on:f,off:p,emit:m}=a,g=L;let h,v,x,b,y=!1,S=u(Z,tn.globalOptions),N=u(S),O=[];function j(t){const e=Y(n,x,b,r,o,t,a);if(t.loop&&!e.slideLooper.canLoop()){return j(Object.assign({},t,{loop:!1}))}return e}function E(t,e){y||(S=u(S,t),N=l(S),O=e||O,function(){const{container:t,slides:e}=N,r=w(t)?n.querySelector(t):t;x=r||n.children[0];const o=w(e)?x.querySelectorAll(e):e;b=[].slice.call(o||x.children)}(),h=j(N),d([S,...O.map(({options:n})=>n)]).forEach(n=>c.add(n,"change",L)),N.active&&(h.translate.to(h.location.get()),h.animation.init(),h.slidesInView.init(),h.slideFocus.init(D),h.eventHandler.init(D),h.resizeHandler.init(D),h.slidesHandler.init(D),h.options.loop&&h.slideLooper.loop(),x.offsetParent&&b.length&&h.dragHandler.init(D),v=s.init(D,O)))}function L(n,t){const e=A();k(),E(u({startIndex:e},n),t),a.emit("reInit")}function k(){h.dragHandler.destroy(),h.eventStore.clear(),h.translate.clear(),h.slideLooper.clear(),h.resizeHandler.destroy(),h.slidesHandler.destroy(),h.slidesInView.destroy(),h.animation.destroy(),s.destroy(),c.clear()}function z(n,t,e){N.active&&!y&&(h.scrollBody.useBaseFriction().useDuration(!0===t?0:N.duration),h.scrollTo.index(n,e||0))}function A(){return h.index.get()}const D={canScrollNext:function(){return h.index.add(1).get()!==A()},canScrollPrev:function(){return h.index.add(-1).get()!==A()},containerNode:function(){return x},internalEngine:function(){return h},destroy:function(){y||(y=!0,c.clear(),k(),a.emit("destroy"),a.clear())},off:p,on:f,emit:m,plugins:function(){return v},previousScrollSnap:function(){return h.indexPrevious.get()},reInit:g,rootNode:function(){return n},scrollNext:function(n){z(h.index.add(1).get(),n,-1)},scrollPrev:function(n){z(h.index.add(-1).get(),n,1)},scrollProgress:function(){return h.scrollProgress.get(h.offsetLocation.get())},scrollSnapList:function(){return h.scrollSnapList},scrollTo:z,selectedScrollSnap:A,slideNodes:function(){return b},slidesInView:function(){return h.slidesInView.get()},slidesNotInView:function(){return h.slidesInView.get(!1)}};return E(t,e),setTimeout(()=>a.emit("init"),0),D}function en(n={},t=[]){const s=e(n),c=e(t),[a,u]=r(),[l,d]=r(),f=o(()=>{a&&a.reInit(s.current,c.current)},[a]);return i(()=>{x(s.current,n)||(s.current=n,f())},[n,f]),i(()=>{(function(n,t){if(n.length!==t.length)return!1;const e=b(n),r=b(t);return e.every((n,t)=>x(n,r[t]))})(c.current,t)||(c.current=t,f())},[t,f]),i(()=>{if("undefined"!=typeof window&&window.document&&window.document.createElement&&l){tn.globalOptions=en.globalOptions;const n=tn(l,s.current,c.current);return u(n),()=>n.destroy()}u(void 0)},[l,u]),[d,a]}tn.globalOptions=void 0,en.globalOptions=void 0;const rn=s(null);function on(){const n=u(rn);if(!n)throw new Error("useCarousel must be used within a <Carousel />");return n}const sn=c((t,e)=>{var{orientation:s="horizontal",opts:c,setApi:u,plugins:d,className:p,children:m}=t,g=l(t,["orientation","opts","setApi","plugins","className","children"]);const[h,v]=en(Object.assign(Object.assign({},c),{axis:"horizontal"===s?"x":"y"}),d),[x,b]=r(!1),[y,w]=r(!1),S=o(n=>{n&&(b(n.canScrollPrev()),w(n.canScrollNext()))},[]),N=o(()=>{null==v||v.scrollPrev()},[v]),O=o(()=>{null==v||v.scrollNext()},[v]),j=o(n=>{"ArrowLeft"===n.key?(n.preventDefault(),N()):"ArrowRight"===n.key&&(n.preventDefault(),O())},[N,O]);i(()=>{v&&u&&u(v)},[v,u]),i(()=>{if(v)return S(v),v.on("reInit",S),v.on("select",S),()=>{null==v||v.off("select",S)}},[v,S]);const E=a(()=>({carouselRef:h,api:v,opts:c,orientation:s||("y"===(null==c?void 0:c.axis)?"vertical":"horizontal"),scrollPrev:N,scrollNext:O,canScrollPrev:x,canScrollNext:y}),[h,v,c,s,N,O,x,y]);return n(rn.Provider,Object.assign({value:E},{children:n("div",Object.assign({onKeyDownCapture:j,className:f("relative",p),role:"region","aria-roledescription":"carousel","data-slot":"carousel",ref:e},g,{children:m}))}))});sn.displayName="Carousel";const cn=c((t,e)=>{var{className:r}=t,o=l(t,["className"]);const{carouselRef:i,orientation:s}=on();return n("div",Object.assign({ref:i,className:"overflow-hidden","data-slot":"carousel-content"},{children:n("div",Object.assign({ref:e,className:f("flex","horizontal"===s?"-ml-4":"-mt-4 flex-col",r)},o))}))});cn.displayName="CarouselContent";const an=c((t,e)=>{var{className:r}=t,o=l(t,["className"]);const{orientation:i}=on();return n("div",Object.assign({ref:e,role:"group","aria-roledescription":"slide","data-slot":"carousel-item",className:f("min-w-0 shrink-0 grow-0 basis-full","horizontal"===i?"pl-4":"pt-4",r)},o))});an.displayName="CarouselItem";const un=e=>{var{className:r,variant:o="outline",size:i="icon"}=e,s=l(e,["className","variant","size"]);const{orientation:c,scrollPrev:a,canScrollPrev:u}=on();return t(d,Object.assign({"data-slot":"carousel-previous",variant:o,size:i,className:f("absolute size-8 rounded-full","horizontal"===c?"top-1/2 -left-12 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",r),disabled:!u,onClick:a},s,{children:[n(p,{}),n("span",Object.assign({className:"sr-only"},{children:"Previous slide"}))]}))},ln=e=>{var{className:r,variant:o="outline",size:i="icon"}=e,s=l(e,["className","variant","size"]);const{orientation:c,scrollNext:a,canScrollNext:u}=on();return t(d,Object.assign({"data-slot":"carousel-next",variant:o,size:i,className:f("absolute size-8 rounded-full","horizontal"===c?"top-1/2 -right-12 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",r),disabled:!u,onClick:a},s,{children:[n(m,{}),n("span",Object.assign({className:"sr-only"},{children:"Next slide"}))]}))},dn={"carousel-container":{render:e=>{const{attributes:o,children:s}=e,[c,a]=r(),[u,l]=r(0),[d,f]=r(0);return i(()=>{c&&(f(c.scrollSnapList().length),l(c.selectedScrollSnap()+1),c.on("select",()=>{l(c.selectedScrollSnap()+1)}))},[c]),n("div",Object.assign({className:"flex w-full justify-center data-[align=center]:items-center data-[align=end]:items-end data-[align=start]:items-start"},{children:t("div",Object.assign({className:"mx-auto\n "},{children:[t(sn,Object.assign({},o,{setApi:a,opts:{align:"start",axis:"x",loop:!0},orientation:"horizontal",className:"w-full max-w-lg"},{children:[n(cn,{children:s}),n(un,{contentEditable:!1,className:"select-none"}),n(ln,{contentEditable:!1,className:"select-none"})]})),t("div",Object.assign({contentEditable:!1,className:"select-none text-muted-foreground py-2 text-center text-sm"},{children:["Slide ",u," of ",d]}))]}))}))}},"carousel-list-item":{render:t=>{const{children:e}=t;return n(an,Object.assign({className:"md:basis-1/2 lg:basis-1/3"},{children:n("div",Object.assign({className:"p-1"},{children:n(g,{children:n(h,Object.assign({className:"flex aspect-square items-center justify-center p-6"},{children:e}))})}))}))}}};export{dn as CarouselUI};
1
+ import{jsx as n,jsxs as t}from"react/jsx-runtime";import{useRef as e,useState as r,useCallback as o,useEffect as i,createContext as s,forwardRef as c,useMemo as a,useContext as u}from"react";import{_ as l}from"./chunks/_tslib-35bb891d.js";import{B as d}from"./chunks/button-7aec29d6.js";import{c as f}from"./chunks/utils-3345eade.js";import{A as p,a as m}from"./chunks/arrow-right-38c3a9bd.js";import{C as g,c as h}from"./chunks/card-05710740.js";import"./chunks/createLucideIcon-8605f860.js";function v(n){return function(n){return"[object Object]"===Object.prototype.toString.call(n)}(n)||Array.isArray(n)}function x(n,t){const e=Object.keys(n),r=Object.keys(t);if(e.length!==r.length)return!1;return JSON.stringify(Object.keys(n.breakpoints||{}))===JSON.stringify(Object.keys(t.breakpoints||{}))&&e.every(e=>{const r=n[e],o=t[e];return"function"==typeof r?`${r}`==`${o}`:v(r)&&v(o)?x(r,o):r===o})}function b(n){return n.concat().sort((n,t)=>n.name>t.name?1:-1).map(n=>n.options)}function y(n){return"number"==typeof n}function w(n){return"string"==typeof n}function S(n){return"boolean"==typeof n}function N(n){return"[object Object]"===Object.prototype.toString.call(n)}function O(n){return Math.abs(n)}function j(n){return Math.sign(n)}function E(n,t){return O(n-t)}function L(n){return I(n).map(Number)}function z(n){return n[k(n)]}function k(n){return Math.max(0,n.length-1)}function A(n,t){return t===k(n)}function D(n,t=0){return Array.from(Array(n),(n,e)=>t+e)}function I(n){return Object.keys(n)}function P(n,t){return[n,t].reduce((n,t)=>(I(t).forEach(e=>{const r=n[e],o=t[e],i=N(r)&&N(o);n[e]=i?P(r,o):o}),n),{})}function M(n,t){return void 0!==t.MouseEvent&&n instanceof t.MouseEvent}function F(){let n=[];const t={add:function(e,r,o,i={passive:!0}){let s;if("addEventListener"in e)e.addEventListener(r,o,i),s=()=>e.removeEventListener(r,o,i);else{const n=e;n.addListener(o),s=()=>n.removeListener(o)}return n.push(s),t},clear:function(){n=n.filter(n=>n())}};return t}function T(n,t,e,r){const o=F(),i=1e3/60;let s=null,c=0,a=0;function u(n){if(!a)return;s||(s=n,e(),e());const o=n-s;for(s=n,c+=o;c>=i;)e(),c-=i;r(c/i),a&&(a=t.requestAnimationFrame(u))}function l(){t.cancelAnimationFrame(a),s=null,c=0,a=0}return{init:function(){o.add(n,"visibilitychange",()=>{n.hidden&&(s=null,c=0)})},destroy:function(){l(),o.clear()},start:function(){a||(a=t.requestAnimationFrame(u))},stop:l,update:e,render:r}}function C(n=0,t=0){const e=O(n-t);function r(t){return t<n}function o(n){return n>t}function i(n){return r(n)||o(n)}return{length:e,max:t,min:n,constrain:function(e){return i(e)?r(e)?n:t:e},reachedAny:i,reachedMax:o,reachedMin:r,removeOffset:function(n){return e?n-e*Math.ceil((n-t)/e):n}}}function H(n,t,e){const{constrain:r}=C(0,n),o=n+1;let i=s(t);function s(n){return e?O((o+n)%o):r(n)}function c(){return i}function a(){return H(n,c(),e)}const u={get:c,set:function(n){return i=s(n),u},add:function(n){return a().set(c()+n)},clone:a};return u}function V(n,t,e,r,o,i,s,c,a,u,l,d,f,p,m,g,h,v,x){const{cross:b,direction:y}=n,w=["INPUT","SELECT","TEXTAREA"],N={passive:!1},L=F(),z=F(),k=C(50,225).constrain(p.measure(20)),A={mouse:300,touch:400},D={mouse:500,touch:600},I=m?43:25;let P=!1,T=0,H=0,V=!1,B=!1,R=!1,q=!1;function G(n){if(!M(n,r)&&n.touches.length>=2)return $(n);const t=i.readPoint(n),e=i.readPoint(n,b),s=E(t,T),a=E(e,H);if(!B&&!q){if(!n.cancelable)return $(n);if(B=s>a,!B)return $(n)}const l=i.pointerMove(n);s>g&&(R=!0),u.useFriction(.3).useDuration(.75),c.start(),o.add(y(l)),n.preventDefault()}function $(n){const t=l.byDistance(0,!1).index!==d.get(),e=i.pointerUp(n)*(m?D:A)[q?"mouse":"touch"],r=function(n,t){const e=d.add(-1*j(n)),r=l.byDistance(n,!m).distance;return m||O(n)<k?r:h&&t?.5*r:l.byIndex(e.get(),0).distance}(y(e),t),o=function(n,t){if(0===n||0===t)return 0;if(O(n)<=O(t))return 0;const e=E(O(n),O(t));return O(e/n)}(e,r),s=I-10*o,c=v+o/50;B=!1,V=!1,z.clear(),u.useDuration(s).useFriction(c),a.distance(r,!m),q=!1,f.emit("pointerUp")}function U(n){R&&(n.stopPropagation(),n.preventDefault(),R=!1)}return{init:function(n){if(!x)return;function c(c){(S(x)||x(n,c))&&function(n){const c=M(n,r);if(q=c,R=m&&c&&!n.buttons&&P,P=E(o.get(),s.get())>=2,c&&0!==n.button)return;if(function(n){const t=n.nodeName||"";return w.includes(t)}(n.target))return;V=!0,i.pointerDown(n),u.useFriction(0).useDuration(0),o.set(s),function(){const n=q?e:t;z.add(n,"touchmove",G,N).add(n,"touchend",$).add(n,"mousemove",G,N).add(n,"mouseup",$)}(),T=i.readPoint(n),H=i.readPoint(n,b),f.emit("pointerDown")}(c)}const a=t;L.add(a,"dragstart",n=>n.preventDefault(),N).add(a,"touchmove",()=>{},N).add(a,"touchend",()=>{}).add(a,"touchstart",c).add(a,"mousedown",c).add(a,"touchcancel",$).add(a,"contextmenu",$).add(a,"click",U,!0)},destroy:function(){L.clear(),z.clear()},pointerDown:function(){return V}}}function B(n,t){let e,r;function o(n){return n.timeStamp}function i(e,r){const o="client"+("x"===(r||n.scroll)?"X":"Y");return(M(e,t)?e:e.touches[0])[o]}return{pointerDown:function(n){return e=n,r=n,i(n)},pointerMove:function(n){const t=i(n)-i(r),s=o(n)-o(e)>170;return r=n,s&&(e=n),t},pointerUp:function(n){if(!e||!r)return 0;const t=i(r)-i(e),s=o(n)-o(e),c=o(n)-o(r)>170,a=t/s;return s&&!c&&O(a)>.1?a:0},readPoint:i}}function R(n,t,e,r,o,i,s){const c=[n].concat(r);let a,u,l=[],d=!1;function f(n){return o.measureSize(s.measure(n))}return{init:function(o){i&&(u=f(n),l=r.map(f),a=new ResizeObserver(e=>{(S(i)||i(o,e))&&function(e){for(const i of e){if(d)return;const e=i.target===n,s=r.indexOf(i.target),c=e?u:l[s];if(O(f(e?n:r[s])-c)>=.5){o.reInit(),t.emit("resize");break}}}(e)}),e.requestAnimationFrame(()=>{c.forEach(n=>a.observe(n))}))},destroy:function(){d=!0,a&&a.disconnect()}}}function q(n,t,e,r,o){const i=o.measure(10),s=o.measure(50),c=C(.1,.99);let a=!1;function u(){return!a&&(!!n.reachedAny(e.get())&&!!n.reachedAny(t.get()))}return{shouldConstrain:u,constrain:function(o){if(!u())return;const a=n.reachedMin(t.get())?"min":"max",l=O(n[a]-t.get()),d=e.get()-t.get(),f=c.constrain(l/s);e.subtract(d*f),!o&&O(d)<i&&(e.set(n.constrain(e.get())),r.useDuration(25).useBaseFriction())},toggleActive:function(n){a=!n}}}function G(n,t,e,r){const o=t.min+.1,i=t.max+.1,{reachedMin:s,reachedMax:c}=C(o,i);return{loop:function(t){if(!function(n){return 1===n?c(e.get()):-1===n&&s(e.get())}(t))return;const o=n*(-1*t);r.forEach(n=>n.add(o))}}}function $(n,t,e,r,o){const{reachedAny:i,removeOffset:s,constrain:c}=r;function a(n){return n.concat().sort((n,t)=>O(n)-O(t))[0]}function u(t,r){const o=[t,t+e,t-e];if(!n)return t;if(!r)return a(o);const i=o.filter(n=>j(n)===r);return i.length?a(i):z(o)-e}return{byDistance:function(e,r){const a=o.get()+e,{index:l,distance:d}=function(e){const r=n?s(e):c(e),o=t.map((n,t)=>({diff:u(n-r,0),index:t})).sort((n,t)=>O(n.diff)-O(t.diff)),{index:i}=o[0];return{index:i,distance:r}}(a),f=!n&&i(a);return!r||f?{index:l,distance:e}:{index:l,distance:e+u(t[l]-d,0)}},byIndex:function(n,e){return{index:n,distance:u(t[n]-o.get(),e)}},shortcut:u}}function U(n,t,e,r,o,i,s,c){const a={passive:!0,capture:!0};let u=0;function l(n){"Tab"===n.code&&(u=(new Date).getTime())}return{init:function(d){c&&(i.add(document,"keydown",l,!1),t.forEach((t,l)=>{i.add(t,"focus",t=>{(S(c)||c(d,t))&&function(t){if((new Date).getTime()-u>10)return;s.emit("slideFocusStart"),n.scrollLeft=0;const i=e.findIndex(n=>n.includes(t));y(i)&&(o.useDuration(0),r.index(i,0),s.emit("slideFocus"))}(l)},a)}))}}}function W(n){let t=n;function e(n){return y(n)?n:n.get()}return{get:function(){return t},set:function(n){t=e(n)},add:function(n){t+=e(n)},subtract:function(n){t-=e(n)}}}function J(n,t){const e="x"===n.scroll?function(n){return`translate3d(${n}px,0px,0px)`}:function(n){return`translate3d(0px,${n}px,0px)`},r=t.style;let o=null,i=!1;return{clear:function(){i||(r.transform="",t.getAttribute("style")||t.removeAttribute("style"))},to:function(t){if(i)return;const s=(c=n.direction(t),Math.round(100*c)/100);var c;s!==o&&(r.transform=e(s),o=s)},toggleActive:function(n){i=!n}}}function Q(n,t,e,r,o,i,s,c,a){const u=L(o),l=L(o).reverse(),d=function(){const n=s[0];return m(p(l,n),e,!1)}().concat(function(){const n=t-s[0]-1;return m(p(u,n),-e,!0)}());function f(n,t){return n.reduce((n,t)=>n-o[t],t)}function p(n,t){return n.reduce((n,e)=>f(n,t)>0?n.concat([e]):n,[])}function m(o,s,u){const l=function(n){return i.map((e,o)=>({start:e-r[o]+.5+n,end:e+t-.5+n}))}(s);return o.map(t=>{const r=u?0:-e,o=u?e:0,i=u?"end":"start",s=l[t][i];return{index:t,loopPoint:s,slideLocation:W(-1),translate:J(n,a[t]),target:()=>c.get()>s?r:o}})}return{canLoop:function(){return d.every(({index:n})=>f(u.filter(t=>t!==n),t)<=.1)},clear:function(){d.forEach(n=>n.translate.clear())},loop:function(){d.forEach(n=>{const{target:t,translate:e,slideLocation:r}=n,o=t();o!==r.get()&&(e.to(o),r.set(o))})},loopPoints:d}}function X(n,t,e){let r,o=!1;return{init:function(i){e&&(r=new MutationObserver(n=>{o||(S(e)||e(i,n))&&function(n){for(const e of n)if("childList"===e.type){i.reInit(),t.emit("slidesChanged");break}}(n)}),r.observe(n,{childList:!0}))},destroy:function(){r&&r.disconnect(),o=!0}}}function _(n,t,e,r){const o={};let i,s=null,c=null,a=!1;return{init:function(){i=new IntersectionObserver(n=>{a||(n.forEach(n=>{const e=t.indexOf(n.target);o[e]=n}),s=null,c=null,e.emit("slidesInView"))},{root:n.parentElement,threshold:r}),t.forEach(n=>i.observe(n))},destroy:function(){i&&i.disconnect(),a=!0},get:function(n=!0){if(n&&s)return s;if(!n&&c)return c;const t=function(n){return I(o).reduce((t,e)=>{const r=parseInt(e),{isIntersecting:i}=o[r];return(n&&i||!n&&!i)&&t.push(r),t},[])}(n);return n&&(s=t),n||(c=t),t}}}function K(n,t,e,r,o,i,s,c,a){const{startEdge:u,endEdge:l,direction:d}=n,f=y(e);return{groupSlides:function(n){return f?function(n,t){return L(n).filter(n=>n%t===0).map(e=>n.slice(e,e+t))}(n,e):function(n){return n.length?L(n).reduce((e,f,p)=>{const m=z(e)||0,g=0===m,h=f===k(n),v=o[u]-i[m][u],x=o[u]-i[f][l],b=!r&&g?d(s):0,y=O(x-(!r&&h?d(c):0)-(v+b));return p&&y>t+a&&e.push(f),h&&e.push(n.length),e},[]).map((t,e,r)=>{const o=Math.max(r[e-1]||0);return n.slice(o,t)}):[]}(n)}}}function Y(n,t,e,r,o,i,s){const{align:c,axis:a,direction:u,startIndex:l,loop:d,duration:f,dragFree:p,dragThreshold:m,inViewThreshold:g,slidesToScroll:h,skipSnaps:v,containScroll:x,watchResize:b,watchSlides:y,watchDrag:S,watchFocus:N}=i,I={measure:function(n){const{offsetTop:t,offsetLeft:e,offsetWidth:r,offsetHeight:o}=n;return{top:t,right:e+r,bottom:t+o,left:e,width:r,height:o}}},P=I.measure(t),M=e.map(I.measure),Y=function(n,t){const e="rtl"===t,r="y"===n,o=!r&&e?-1:1;return{scroll:r?"y":"x",cross:r?"x":"y",startEdge:r?"top":e?"right":"left",endEdge:r?"bottom":e?"left":"right",measureSize:function(n){const{height:t,width:e}=n;return r?t:e},direction:function(n){return n*o}}}(a,u),Z=Y.measureSize(P),nn=function(n){return{measure:function(t){return n*(t/100)}}}(Z),tn=function(n,t){const e={start:function(){return 0},center:function(n){return r(n)/2},end:r};function r(n){return t-n}return{measure:function(r,o){return w(n)?e[n](r):n(t,r,o)}}}(c,Z),en=!d&&!!x,rn=d||!!x,{slideSizes:on,slideSizesWithGaps:sn,startGap:cn,endGap:an}=function(n,t,e,r,o,i){const{measureSize:s,startEdge:c,endEdge:a}=n,u=e[0]&&o,l=function(){if(!u)return 0;const n=e[0];return O(t[c]-n[c])}(),d=function(){if(!u)return 0;const n=i.getComputedStyle(z(r));return parseFloat(n.getPropertyValue(`margin-${a}`))}(),f=e.map(s),p=e.map((n,t,e)=>{const r=!t,o=A(e,t);return r?f[t]+l:o?f[t]+d:e[t+1][c]-n[c]}).map(O);return{slideSizes:f,slideSizesWithGaps:p,startGap:l,endGap:d}}(Y,P,M,e,rn,o),un=K(Y,Z,h,d,P,M,cn,an,2),{snaps:ln,snapsAligned:dn}=function(n,t,e,r,o){const{startEdge:i,endEdge:s}=n,{groupSlides:c}=o,a=c(r).map(n=>z(n)[s]-n[0][i]).map(O).map(t.measure),u=r.map(n=>e[i]-n[i]).map(n=>-O(n)),l=c(u).map(n=>n[0]).map((n,t)=>n+a[t]);return{snaps:u,snapsAligned:l}}(Y,tn,P,M,un),fn=-z(ln)+z(sn),{snapsContained:pn,scrollContainLimit:mn}=function(n,t,e,r,o){const i=C(-t+n,0),s=e.map((n,t)=>{const{min:r,max:o}=i,s=i.constrain(n),c=!t,u=A(e,t);return c?o:u||a(r,s)?r:a(o,s)?o:s}).map(n=>parseFloat(n.toFixed(3))),c=function(){const n=s[0],t=z(s);return C(s.lastIndexOf(n),s.indexOf(t)+1)}();function a(n,t){return E(n,t)<=1}return{snapsContained:function(){if(t<=n+o)return[i.max];if("keepSnaps"===r)return s;const{min:e,max:a}=c;return s.slice(e,a)}(),scrollContainLimit:c}}(Z,fn,dn,x,2),gn=en?pn:dn,{limit:hn}=function(n,t,e){const r=t[0];return{limit:C(e?r-n:z(t),r)}}(fn,gn,d),vn=H(k(gn),l,d),xn=vn.clone(),bn=L(e),yn=T(r,o,()=>(({dragHandler:n,scrollBody:t,scrollBounds:e,options:{loop:r}})=>{r||e.constrain(n.pointerDown()),t.seek()})(Mn),n=>(({scrollBody:n,translate:t,location:e,offsetLocation:r,previousLocation:o,scrollLooper:i,slideLooper:s,dragHandler:c,animation:a,eventHandler:u,scrollBounds:l,options:{loop:d}},f)=>{const p=n.settled(),m=!l.shouldConstrain(),g=d?p:p&&m,h=g&&!c.pointerDown();h&&a.stop();const v=e.get()*f+o.get()*(1-f);r.set(v),d&&(i.loop(n.direction()),s.loop()),t.to(r.get()),h&&u.emit("settle"),g||u.emit("scroll")})(Mn,n)),wn=gn[vn.get()],Sn=W(wn),Nn=W(wn),On=W(wn),jn=W(wn),En=function(n,t,e,r,o,i){let s=0,c=0,a=o,u=i,l=n.get(),d=0;function f(n){return a=n,m}function p(n){return u=n,m}const m={direction:function(){return c},duration:function(){return a},velocity:function(){return s},seek:function(){const t=r.get()-n.get();let o=0;return a?(e.set(n),s+=t/a,s*=u,l+=s,n.add(s),o=l-d):(s=0,e.set(r),n.set(r),o=t),c=j(o),d=l,m},settled:function(){return O(r.get()-t.get())<.001},useBaseFriction:function(){return p(i)},useBaseDuration:function(){return f(o)},useFriction:p,useDuration:f};return m}(Sn,On,Nn,jn,f,.68),Ln=$(d,gn,fn,hn,jn),zn=function(n,t,e,r,o,i,s){function c(o){const c=o.distance,a=o.index!==t.get();i.add(c),c&&(r.duration()?n.start():(n.update(),n.render(1),n.update())),a&&(e.set(t.get()),t.set(o.index),s.emit("select"))}return{distance:function(n,t){c(o.byDistance(n,t))},index:function(n,e){const r=t.clone().set(n);c(o.byIndex(r.get(),e))}}}(yn,vn,xn,En,Ln,jn,s),kn=function(n){const{max:t,length:e}=n;return{get:function(n){return e?(n-t)/-e:0}}}(hn),An=F(),Dn=_(t,e,s,g),{slideRegistry:In}=function(n,t,e,r,o,i){const{groupSlides:s}=o,{min:c,max:a}=r;return{slideRegistry:function(){const r=s(i),o=!n||"keepSnaps"===t;return 1===e.length?[i]:o?r:r.slice(c,a).map((n,t,e)=>{const r=!t,o=A(e,t);return r?D(z(e[0])+1):o?D(k(i)-z(e)[0]+1,z(e)[0]):n})}()}}(en,x,gn,mn,un,bn),Pn=U(n,e,In,zn,En,An,s,N),Mn={ownerDocument:r,ownerWindow:o,eventHandler:s,containerRect:P,slideRects:M,animation:yn,axis:Y,dragHandler:V(Y,n,r,o,jn,B(Y,o),Sn,yn,zn,En,Ln,vn,s,nn,p,m,v,.68,S),eventStore:An,percentOfView:nn,index:vn,indexPrevious:xn,limit:hn,location:Sn,offsetLocation:On,previousLocation:Nn,options:i,resizeHandler:R(t,s,o,e,Y,b,I),scrollBody:En,scrollBounds:q(hn,On,jn,En,nn),scrollLooper:G(fn,hn,On,[Sn,On,Nn,jn]),scrollProgress:kn,scrollSnapList:gn.map(kn.get),scrollSnaps:gn,scrollTarget:Ln,scrollTo:zn,slideLooper:Q(Y,Z,fn,on,sn,ln,gn,On,e),slideFocus:Pn,slidesHandler:X(t,s,y),slidesInView:Dn,slideIndexes:bn,slideRegistry:In,slidesToScroll:un,target:jn,translate:J(Y,t)};return Mn}const Z={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function nn(n){function t(n,t){return P(n,t||{})}const e={mergeOptions:t,optionsAtMedia:function(e){const r=e.breakpoints||{},o=I(r).filter(t=>n.matchMedia(t).matches).map(n=>r[n]).reduce((n,e)=>t(n,e),{});return t(e,o)},optionsMediaQueries:function(t){return t.map(n=>I(n.breakpoints||{})).reduce((n,t)=>n.concat(t),[]).map(n.matchMedia)}};return e}function tn(n,t,e){const r=n.ownerDocument,o=r.defaultView,i=nn(o),s=function(n){let t=[];return{init:function(e,r){return t=r.filter(({options:t})=>!1!==n.optionsAtMedia(t).active),t.forEach(t=>t.init(e,n)),r.reduce((n,t)=>Object.assign(n,{[t.name]:t}),{})},destroy:function(){t=t.filter(n=>n.destroy())}}}(i),c=F(),a=function(){let n,t={};function e(n){return t[n]||[]}const r={init:function(t){n=t},emit:function(t){return e(t).forEach(e=>e(n,t)),r},off:function(n,o){return t[n]=e(n).filter(n=>n!==o),r},on:function(n,o){return t[n]=e(n).concat([o]),r},clear:function(){t={}}};return r}(),{mergeOptions:u,optionsAtMedia:l,optionsMediaQueries:d}=i,{on:f,off:p,emit:m}=a,g=L;let h,v,x,b,y=!1,S=u(Z,tn.globalOptions),N=u(S),O=[];function j(t){const e=Y(n,x,b,r,o,t,a);if(t.loop&&!e.slideLooper.canLoop()){return j(Object.assign({},t,{loop:!1}))}return e}function E(t,e){y||(S=u(S,t),N=l(S),O=e||O,function(){const{container:t,slides:e}=N,r=w(t)?n.querySelector(t):t;x=r||n.children[0];const o=w(e)?x.querySelectorAll(e):e;b=[].slice.call(o||x.children)}(),h=j(N),d([S,...O.map(({options:n})=>n)]).forEach(n=>c.add(n,"change",L)),N.active&&(h.translate.to(h.location.get()),h.animation.init(),h.slidesInView.init(),h.slideFocus.init(D),h.eventHandler.init(D),h.resizeHandler.init(D),h.slidesHandler.init(D),h.options.loop&&h.slideLooper.loop(),x.offsetParent&&b.length&&h.dragHandler.init(D),v=s.init(D,O)))}function L(n,t){const e=A();z(),E(u({startIndex:e},n),t),a.emit("reInit")}function z(){h.dragHandler.destroy(),h.eventStore.clear(),h.translate.clear(),h.slideLooper.clear(),h.resizeHandler.destroy(),h.slidesHandler.destroy(),h.slidesInView.destroy(),h.animation.destroy(),s.destroy(),c.clear()}function k(n,t,e){N.active&&!y&&(h.scrollBody.useBaseFriction().useDuration(!0===t?0:N.duration),h.scrollTo.index(n,e||0))}function A(){return h.index.get()}const D={canScrollNext:function(){return h.index.add(1).get()!==A()},canScrollPrev:function(){return h.index.add(-1).get()!==A()},containerNode:function(){return x},internalEngine:function(){return h},destroy:function(){y||(y=!0,c.clear(),z(),a.emit("destroy"),a.clear())},off:p,on:f,emit:m,plugins:function(){return v},previousScrollSnap:function(){return h.indexPrevious.get()},reInit:g,rootNode:function(){return n},scrollNext:function(n){k(h.index.add(1).get(),n,-1)},scrollPrev:function(n){k(h.index.add(-1).get(),n,1)},scrollProgress:function(){return h.scrollProgress.get(h.offsetLocation.get())},scrollSnapList:function(){return h.scrollSnapList},scrollTo:k,selectedScrollSnap:A,slideNodes:function(){return b},slidesInView:function(){return h.slidesInView.get()},slidesNotInView:function(){return h.slidesInView.get(!1)}};return E(t,e),setTimeout(()=>a.emit("init"),0),D}function en(n={},t=[]){const s=e(n),c=e(t),[a,u]=r(),[l,d]=r(),f=o(()=>{a&&a.reInit(s.current,c.current)},[a]);return i(()=>{x(s.current,n)||(s.current=n,f())},[n,f]),i(()=>{(function(n,t){if(n.length!==t.length)return!1;const e=b(n),r=b(t);return e.every((n,t)=>x(n,r[t]))})(c.current,t)||(c.current=t,f())},[t,f]),i(()=>{if("undefined"!=typeof window&&window.document&&window.document.createElement&&l){tn.globalOptions=en.globalOptions;const n=tn(l,s.current,c.current);return u(n),()=>n.destroy()}u(void 0)},[l,u]),[d,a]}tn.globalOptions=void 0,en.globalOptions=void 0;const rn=s(null);function on(){const n=u(rn);if(!n)throw new Error("useCarousel must be used within a <Carousel />");return n}const sn=c((t,e)=>{var{orientation:s="horizontal",opts:c,setApi:u,plugins:d,className:p,children:m}=t,g=l(t,["orientation","opts","setApi","plugins","className","children"]);const[h,v]=en(Object.assign(Object.assign({},c),{axis:"horizontal"===s?"x":"y"}),d),[x,b]=r(!1),[y,w]=r(!1),S=o(n=>{n&&(b(n.canScrollPrev()),w(n.canScrollNext()))},[]),N=o(()=>{null==v||v.scrollPrev()},[v]),O=o(()=>{null==v||v.scrollNext()},[v]),j=o(n=>{"ArrowLeft"===n.key?(n.preventDefault(),N()):"ArrowRight"===n.key&&(n.preventDefault(),O())},[N,O]);i(()=>{v&&u&&u(v)},[v,u]),i(()=>{if(v)return S(v),v.on("reInit",S),v.on("select",S),()=>{null==v||v.off("select",S)}},[v,S]);const E=a(()=>({carouselRef:h,api:v,opts:c,orientation:s||("y"===(null==c?void 0:c.axis)?"vertical":"horizontal"),scrollPrev:N,scrollNext:O,canScrollPrev:x,canScrollNext:y}),[h,v,c,s,N,O,x,y]);return n(rn.Provider,Object.assign({value:E},{children:n("div",Object.assign({onKeyDownCapture:j,className:f("relative",p),role:"region","aria-roledescription":"carousel","data-slot":"carousel",ref:e},g,{children:m}))}))});sn.displayName="Carousel";const cn=c((t,e)=>{var{className:r}=t,o=l(t,["className"]);const{carouselRef:i,orientation:s}=on();return n("div",Object.assign({ref:i,className:"overflow-hidden","data-slot":"carousel-content"},{children:n("div",Object.assign({ref:e,className:f("flex","horizontal"===s?"-ml-4":"-mt-4 flex-col",r)},o))}))});cn.displayName="CarouselContent";const an=c((t,e)=>{var{className:r}=t,o=l(t,["className"]);const{orientation:i}=on();return n("div",Object.assign({ref:e,role:"group","aria-roledescription":"slide","data-slot":"carousel-item",className:f("min-w-0 shrink-0 grow-0 basis-full","horizontal"===i?"pl-4":"pt-4",r)},o))});an.displayName="CarouselItem";const un=e=>{var{className:r,variant:o="outline",size:i="icon"}=e,s=l(e,["className","variant","size"]);const{orientation:c,scrollPrev:a,canScrollPrev:u}=on();return t(d,Object.assign({"data-slot":"carousel-previous",variant:o,size:i,className:f("absolute size-8 rounded-full","horizontal"===c?"top-1/2 -left-12 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",r),disabled:!u,onClick:a},s,{children:[n(p,{}),n("span",Object.assign({className:"sr-only"},{children:"Previous slide"}))]}))},ln=e=>{var{className:r,variant:o="outline",size:i="icon"}=e,s=l(e,["className","variant","size"]);const{orientation:c,scrollNext:a,canScrollNext:u}=on();return t(d,Object.assign({"data-slot":"carousel-next",variant:o,size:i,className:f("absolute size-8 rounded-full","horizontal"===c?"top-1/2 -right-12 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",r),disabled:!u,onClick:a},s,{children:[n(m,{}),n("span",Object.assign({className:"sr-only"},{children:"Next slide"}))]}))},dn={"carousel-container":{render:e=>{const{attributes:o,children:s}=e,[c,a]=r(),[u,l]=r(0),[d,f]=r(0);return i(()=>{c&&(f(c.scrollSnapList().length),l(c.selectedScrollSnap()+1),c.on("select",()=>{l(c.selectedScrollSnap()+1)}))},[c]),n("div",Object.assign({className:"flex w-full justify-center data-[align=center]:items-center data-[align=end]:items-end data-[align=start]:items-start"},{children:t("div",Object.assign({className:"mx-auto\n "},{children:[t(sn,Object.assign({},o,{setApi:a,opts:{align:"start",axis:"x",loop:!0},orientation:"horizontal",className:"w-full max-w-lg"},{children:[n(cn,{children:s}),n(un,{contentEditable:!1,className:"select-none"}),n(ln,{contentEditable:!1,className:"select-none"})]})),t("div",Object.assign({contentEditable:!1,className:"select-none text-muted-foreground py-2 text-center text-sm"},{children:["Slide ",u," of ",d]}))]}))}))}},"carousel-list-item":{render:t=>{const{children:e}=t;return n(an,Object.assign({className:"md:basis-1/2 lg:basis-1/3"},{children:n("div",Object.assign({className:"p-1"},{children:n(g,{children:n(h,Object.assign({className:"flex aspect-square items-center justify-center p-6"},{children:e}))})}))}))}}};export{dn as CarouselUI};
@@ -1 +1 @@
1
- import*as e from"react";import{useState as t}from"react";import{u as n}from"./index-91a5b8d5.js";import{P as r}from"./index-2ad64d02.js";import{u as o}from"./index-70f4e709.js";import{jsx as a}from"react/jsx-runtime";import{b as c,_ as i,c as u}from"./_tslib-35bb891d.js";var s=0;function l(){e.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??d()),document.body.insertAdjacentElement("beforeend",e[1]??d()),s++,()=>{1===s&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),s--}},[])}function d(){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 f="focusScope.autoFocusOnMount",v="focusScope.autoFocusOnUnmount",m={bubbles:!1,cancelable:!0},p=e.forwardRef((t,c)=>{const{loop:i=!1,trapped:u=!1,onMountAutoFocus:s,onUnmountAutoFocus:l,...d}=t,[p,y]=e.useState(null),w=o(s),S=o(l),C=e.useRef(null),N=n(c,e=>y(e)),k=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect(()=>{if(u){let e=function(e){if(k.paused||!p)return;const t=e.target;p.contains(t)?C.current=t:E(C.current,{select:!0})},t=function(e){if(k.paused||!p)return;const t=e.relatedTarget;null!==t&&(p.contains(t)||E(C.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&E(p)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return p&&r.observe(p,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[u,p,k.paused]),e.useEffect(()=>{if(p){b.add(k);const t=document.activeElement;if(!p.contains(t)){const n=new CustomEvent(f,m);p.addEventListener(f,w),p.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(E(r,{select:t}),document.activeElement!==n)return}((e=h(p),e.filter(e=>"A"!==e.tagName)),{select:!0}),document.activeElement===t&&E(p))}return()=>{p.removeEventListener(f,w),setTimeout(()=>{const e=new CustomEvent(v,m);p.addEventListener(v,S),p.dispatchEvent(e),e.defaultPrevented||E(t??document.body,{select:!0}),p.removeEventListener(v,S),b.remove(k)},0)}}var e},[p,w,S,k]);const M=e.useCallback(e=>{if(!i&&!u)return;if(k.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[r,o]=function(e){const t=h(e),n=g(t,e),r=g(t.reverse(),e);return[n,r]}(t);r&&o?e.shiftKey||n!==o?e.shiftKey&&n===r&&(e.preventDefault(),i&&E(o,{select:!0})):(e.preventDefault(),i&&E(r,{select:!0})):n===t&&e.preventDefault()}},[i,u,k.paused]);return a(r.div,{tabIndex:-1,...d,ref:N,onKeyDown:M})});function h(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function g(e,t){for(const n of e)if(!y(n,{upTo:t}))return n}function y(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 E(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}p.displayName="FocusScope";var b=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=w(e,t),e.unshift(t)},remove(t){e=w(e,t),e[0]?.resume()}}}();function w(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var S=new WeakMap,C=new WeakMap,N={},k=0,M=function(e){return e&&(e.host||M(e.parentNode))},R=function(e,t,n,r){var o=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=M(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(e){return Boolean(e)})}(t,Array.isArray(e)?e:[e]);N[n]||(N[n]=new WeakMap);var a=N[n],c=[],i=new Set,u=new Set(o),s=function(e){e&&!i.has(e)&&(i.add(e),s(e.parentNode))};o.forEach(s);var l=function(e){e&&!u.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(i.has(e))l(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,u=(S.get(e)||0)+1,s=(a.get(e)||0)+1;S.set(e,u),a.set(e,s),c.push(e),1===u&&o&&C.set(e,!0),1===s&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return l(t),i.clear(),k++,function(){c.forEach(function(e){var t=S.get(e)-1,o=a.get(e)-1;S.set(e,t),a.set(e,o),t||(C.has(e)||e.removeAttribute(r),C.delete(e)),o||e.removeAttribute(n)}),--k||(S=new WeakMap,S=new WeakMap,C=new WeakMap,N={})}},A=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||function(e){return"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"))),R(r,o,n,"aria-hidden")):function(){return null}},T="right-scroll-bar-position",L="width-before-scroll-bar";function x(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var P="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,_=new WeakMap;function F(e,n){var r,o,a,c=(r=n||null,o=function(t){return e.forEach(function(e){return x(e,t)})},(a=t(function(){return{value:r,callback:o,facade:{get current(){return a.value},set current(e){var t=a.value;t!==e&&(a.value=e,a.callback(e,t))}}}})[0]).callback=o,a.facade);return P(function(){var t=_.get(c);if(t){var n=new Set(t),r=new Set(e),o=c.current;n.forEach(function(e){r.has(e)||x(e,null)}),r.forEach(function(e){n.has(e)||x(e,o)})}_.set(c,e)},[e]),c}function I(e){return e}var W=function(t){var n=t.sideCar,r=i(t,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=n.read();if(!o)throw new Error("Sidecar medium not found");return e.createElement(o,c({},r))};W.isSideCarExport=!0;var D=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=I);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter(function(e){return e!==o})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},c=function(){return Promise.resolve().then(a)};c(),n={push:function(e){t.push(e),c()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=c({async:!0,ssr:!1},e),t}(),B=function(){},j=e.forwardRef(function(t,n){var r=e.useRef(null),o=e.useState({onScrollCapture:B,onWheelCapture:B,onTouchMoveCapture:B}),a=o[0],u=o[1],s=t.forwardProps,l=t.children,d=t.className,f=t.removeScrollBar,v=t.enabled,m=t.shards,p=t.sideCar,h=t.noRelative,g=t.noIsolation,y=t.inert,E=t.allowPinchZoom,b=t.as,w=void 0===b?"div":b,S=t.gapMode,C=i(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=p,k=F([r,n]),M=c(c({},C),a);return e.createElement(e.Fragment,null,v&&e.createElement(N,{sideCar:D,removeScrollBar:f,shards:m,noRelative:h,noIsolation:g,inert:y,setCallbacks:u,allowPinchZoom:!!E,lockRef:r,gapMode:S}),s?e.cloneElement(e.Children.only(l),c(c({},M),{ref:k})):e.createElement(w,c({},M,{className:d,ref:k}),l))});j.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},j.classNames={fullWidth:L,zeroRight:T};function K(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var O=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=K())&&(o=n,(r=t).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},X=function(){var t,n=(t=O(),function(n,r){e.useEffect(function(){return t.add(n),function(){t.remove()}},[n&&r])});return function(e){var t=e.styles,r=e.dynamic;return n(t,r),null}},Y={left:0,top:0,right:0,gap:0},H=function(e){return parseInt(e||"",10)||0},U=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Y;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[H(n),H(r),H(o)]}(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])}},Z=X(),q="data-scroll-locked",z=function(e,t,n,r){var o=e.left,a=e.top,c=e.right,i=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(i,"px ").concat(r,";\n }\n body[").concat(q,"] {\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(c,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(i,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(T," {\n right: ").concat(i,"px ").concat(r,";\n }\n \n .").concat(L," {\n margin-right: ").concat(i,"px ").concat(r,";\n }\n \n .").concat(T," .").concat(T," {\n right: 0 ").concat(r,";\n }\n \n .").concat(L," .").concat(L," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(q,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(i,"px;\n }\n")},G=function(){var e=parseInt(document.body.getAttribute(q)||"0",10);return isFinite(e)?e:0},J=function(t){var n=t.noRelative,r=t.noImportant,o=t.gapMode,a=void 0===o?"margin":o;e.useEffect(function(){return document.body.setAttribute(q,(G()+1).toString()),function(){var e=G()-1;e<=0?document.body.removeAttribute(q):document.body.setAttribute(q,e.toString())}},[]);var c=e.useMemo(function(){return U(a)},[a]);return e.createElement(Z,{styles:z(c,!n,a,r?"":"!important")})},Q=!1;if("undefined"!=typeof window)try{var V=Object.defineProperty({},"passive",{get:function(){return Q=!0,!0}});window.addEventListener("test",V,V),window.removeEventListener("test",V,V)}catch(e){Q=!1}var $=!!Q&&{passive:!1},ee=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},te=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),ne(e,r)){var o=re(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ne=function(e,t){return"v"===e?function(e){return ee(e,"overflowY")}(t):function(e){return ee(e,"overflowX")}(t)},re=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},oe=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ae=function(e){return[e.deltaX,e.deltaY]},ce=function(e){return e&&"current"in e?e.current:e},ie=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},ue=0,se=[];function le(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var de,fe=(de=function(t){var n=e.useRef([]),r=e.useRef([0,0]),o=e.useRef(),a=e.useState(ue++)[0],c=e.useState(X)[0],i=e.useRef(t);e.useEffect(function(){i.current=t},[t]),e.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(a));var e=u([t.lockRef.current],(t.shards||[]).map(ce),!0).filter(Boolean);return e.forEach(function(e){return e.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),e.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(a))})}}},[t.inert,t.lockRef.current,t.shards]);var s=e.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var n,a=oe(e),c=r.current,u="deltaX"in e?e.deltaX:c[0]-a[0],s="deltaY"in e?e.deltaY:c[1]-a[1],l=e.target,d=Math.abs(u)>Math.abs(s)?"h":"v";if("touches"in e&&"h"===d&&"range"===l.type)return!1;var f=window.getSelection(),v=f&&f.anchorNode;if(v&&(v===l||v.contains(l)))return!1;var m=te(d,l);if(!m)return!0;if(m?n=d:(n="v"===d?"h":"v",m=te(d,l)),!m)return!1;if(!o.current&&"changedTouches"in e&&(u||s)&&(o.current=n),!n)return!0;var p=o.current||n;return function(e,t,n,r,o){var a=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),c=a*r,i=n.target,u=t.contains(i),s=!1,l=c>0,d=0,f=0;do{if(!i)break;var v=re(e,i),m=v[0],p=v[1]-v[2]-a*m;(m||p)&&ne(e,i)&&(d+=p,f+=m);var h=i.parentNode;i=h&&h.nodeType===Node.DOCUMENT_FRAGMENT_NODE?h.host:h}while(!u&&i!==document.body||u&&(t.contains(i)||t===i));return(l&&(o&&Math.abs(d)<1||!o&&c>d)||!l&&(o&&Math.abs(f)<1||!o&&-c>f))&&(s=!0),s}(p,t,e,"h"===p?u:s,!0)},[]),l=e.useCallback(function(e){var t=e;if(se.length&&se[se.length-1]===c){var r="deltaY"in t?ae(t):oe(t),o=n.current.filter(function(e){return e.name===t.type&&(e.target===t.target||t.target===e.shadowParent)&&(n=e.delta,o=r,n[0]===o[0]&&n[1]===o[1]);var n,o})[0];if(o&&o.should)t.cancelable&&t.preventDefault();else if(!o){var a=(i.current.shards||[]).map(ce).filter(Boolean).filter(function(e){return e.contains(t.target)});(a.length>0?s(t,a[0]):!i.current.noIsolation)&&t.cancelable&&t.preventDefault()}}},[]),d=e.useCallback(function(e,t,r,o){var a={name:e,delta:t,target:r,should:o,shadowParent:le(r)};n.current.push(a),setTimeout(function(){n.current=n.current.filter(function(e){return e!==a})},1)},[]),f=e.useCallback(function(e){r.current=oe(e),o.current=void 0},[]),v=e.useCallback(function(e){d(e.type,ae(e),e.target,s(e,t.lockRef.current))},[]),m=e.useCallback(function(e){d(e.type,oe(e),e.target,s(e,t.lockRef.current))},[]);e.useEffect(function(){return se.push(c),t.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:m}),document.addEventListener("wheel",l,$),document.addEventListener("touchmove",l,$),document.addEventListener("touchstart",f,$),function(){se=se.filter(function(e){return e!==c}),document.removeEventListener("wheel",l,$),document.removeEventListener("touchmove",l,$),document.removeEventListener("touchstart",f,$)}},[]);var p=t.removeScrollBar,h=t.inert;return e.createElement(e.Fragment,null,h?e.createElement(c,{styles:ie(a)}):null,p?e.createElement(J,{noRelative:t.noRelative,gapMode:t.gapMode}):null)},D.useMedium(de),W),ve=e.forwardRef(function(t,n){return e.createElement(j,c({},t,{ref:n,sideCar:fe}))});ve.classNames=j.classNames;var me=ve;export{p as F,me as R,A as h,l as u};
1
+ import*as e from"react";import{useState as t}from"react";import{u as n}from"./index-91a5b8d5.js";import{P as r}from"./index-17323747.js";import{u as o}from"./index-70f4e709.js";import{jsx as a}from"react/jsx-runtime";import{b as c,_ as i,c as u}from"./_tslib-35bb891d.js";var s=0;function l(){e.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??d()),document.body.insertAdjacentElement("beforeend",e[1]??d()),s++,()=>{1===s&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),s--}},[])}function d(){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 f="focusScope.autoFocusOnMount",v="focusScope.autoFocusOnUnmount",m={bubbles:!1,cancelable:!0},p=e.forwardRef((t,c)=>{const{loop:i=!1,trapped:u=!1,onMountAutoFocus:s,onUnmountAutoFocus:l,...d}=t,[p,y]=e.useState(null),w=o(s),S=o(l),C=e.useRef(null),N=n(c,e=>y(e)),k=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect(()=>{if(u){let e=function(e){if(k.paused||!p)return;const t=e.target;p.contains(t)?C.current=t:E(C.current,{select:!0})},t=function(e){if(k.paused||!p)return;const t=e.relatedTarget;null!==t&&(p.contains(t)||E(C.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&E(p)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return p&&r.observe(p,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[u,p,k.paused]),e.useEffect(()=>{if(p){b.add(k);const t=document.activeElement;if(!p.contains(t)){const n=new CustomEvent(f,m);p.addEventListener(f,w),p.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(E(r,{select:t}),document.activeElement!==n)return}((e=h(p),e.filter(e=>"A"!==e.tagName)),{select:!0}),document.activeElement===t&&E(p))}return()=>{p.removeEventListener(f,w),setTimeout(()=>{const e=new CustomEvent(v,m);p.addEventListener(v,S),p.dispatchEvent(e),e.defaultPrevented||E(t??document.body,{select:!0}),p.removeEventListener(v,S),b.remove(k)},0)}}var e},[p,w,S,k]);const M=e.useCallback(e=>{if(!i&&!u)return;if(k.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[r,o]=function(e){const t=h(e),n=g(t,e),r=g(t.reverse(),e);return[n,r]}(t);r&&o?e.shiftKey||n!==o?e.shiftKey&&n===r&&(e.preventDefault(),i&&E(o,{select:!0})):(e.preventDefault(),i&&E(r,{select:!0})):n===t&&e.preventDefault()}},[i,u,k.paused]);return a(r.div,{tabIndex:-1,...d,ref:N,onKeyDown:M})});function h(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function g(e,t){for(const n of e)if(!y(n,{upTo:t}))return n}function y(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 E(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}p.displayName="FocusScope";var b=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=w(e,t),e.unshift(t)},remove(t){e=w(e,t),e[0]?.resume()}}}();function w(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var S=new WeakMap,C=new WeakMap,N={},k=0,M=function(e){return e&&(e.host||M(e.parentNode))},R=function(e,t,n,r){var o=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=M(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(e){return Boolean(e)})}(t,Array.isArray(e)?e:[e]);N[n]||(N[n]=new WeakMap);var a=N[n],c=[],i=new Set,u=new Set(o),s=function(e){e&&!i.has(e)&&(i.add(e),s(e.parentNode))};o.forEach(s);var l=function(e){e&&!u.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(i.has(e))l(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,u=(S.get(e)||0)+1,s=(a.get(e)||0)+1;S.set(e,u),a.set(e,s),c.push(e),1===u&&o&&C.set(e,!0),1===s&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return l(t),i.clear(),k++,function(){c.forEach(function(e){var t=S.get(e)-1,o=a.get(e)-1;S.set(e,t),a.set(e,o),t||(C.has(e)||e.removeAttribute(r),C.delete(e)),o||e.removeAttribute(n)}),--k||(S=new WeakMap,S=new WeakMap,C=new WeakMap,N={})}},A=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||function(e){return"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"))),R(r,o,n,"aria-hidden")):function(){return null}},T="right-scroll-bar-position",L="width-before-scroll-bar";function x(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var P="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,_=new WeakMap;function F(e,n){var r,o,a,c=(r=n||null,o=function(t){return e.forEach(function(e){return x(e,t)})},(a=t(function(){return{value:r,callback:o,facade:{get current(){return a.value},set current(e){var t=a.value;t!==e&&(a.value=e,a.callback(e,t))}}}})[0]).callback=o,a.facade);return P(function(){var t=_.get(c);if(t){var n=new Set(t),r=new Set(e),o=c.current;n.forEach(function(e){r.has(e)||x(e,null)}),r.forEach(function(e){n.has(e)||x(e,o)})}_.set(c,e)},[e]),c}function I(e){return e}var W=function(t){var n=t.sideCar,r=i(t,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=n.read();if(!o)throw new Error("Sidecar medium not found");return e.createElement(o,c({},r))};W.isSideCarExport=!0;var D=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=I);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter(function(e){return e!==o})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},c=function(){return Promise.resolve().then(a)};c(),n={push:function(e){t.push(e),c()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=c({async:!0,ssr:!1},e),t}(),B=function(){},j=e.forwardRef(function(t,n){var r=e.useRef(null),o=e.useState({onScrollCapture:B,onWheelCapture:B,onTouchMoveCapture:B}),a=o[0],u=o[1],s=t.forwardProps,l=t.children,d=t.className,f=t.removeScrollBar,v=t.enabled,m=t.shards,p=t.sideCar,h=t.noRelative,g=t.noIsolation,y=t.inert,E=t.allowPinchZoom,b=t.as,w=void 0===b?"div":b,S=t.gapMode,C=i(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=p,k=F([r,n]),M=c(c({},C),a);return e.createElement(e.Fragment,null,v&&e.createElement(N,{sideCar:D,removeScrollBar:f,shards:m,noRelative:h,noIsolation:g,inert:y,setCallbacks:u,allowPinchZoom:!!E,lockRef:r,gapMode:S}),s?e.cloneElement(e.Children.only(l),c(c({},M),{ref:k})):e.createElement(w,c({},M,{className:d,ref:k}),l))});j.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},j.classNames={fullWidth:L,zeroRight:T};function K(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var O=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=K())&&(o=n,(r=t).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},X=function(){var t,n=(t=O(),function(n,r){e.useEffect(function(){return t.add(n),function(){t.remove()}},[n&&r])});return function(e){var t=e.styles,r=e.dynamic;return n(t,r),null}},Y={left:0,top:0,right:0,gap:0},H=function(e){return parseInt(e||"",10)||0},U=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Y;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[H(n),H(r),H(o)]}(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])}},Z=X(),q="data-scroll-locked",z=function(e,t,n,r){var o=e.left,a=e.top,c=e.right,i=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(i,"px ").concat(r,";\n }\n body[").concat(q,"] {\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(c,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(i,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(T," {\n right: ").concat(i,"px ").concat(r,";\n }\n \n .").concat(L," {\n margin-right: ").concat(i,"px ").concat(r,";\n }\n \n .").concat(T," .").concat(T," {\n right: 0 ").concat(r,";\n }\n \n .").concat(L," .").concat(L," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(q,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(i,"px;\n }\n")},G=function(){var e=parseInt(document.body.getAttribute(q)||"0",10);return isFinite(e)?e:0},J=function(t){var n=t.noRelative,r=t.noImportant,o=t.gapMode,a=void 0===o?"margin":o;e.useEffect(function(){return document.body.setAttribute(q,(G()+1).toString()),function(){var e=G()-1;e<=0?document.body.removeAttribute(q):document.body.setAttribute(q,e.toString())}},[]);var c=e.useMemo(function(){return U(a)},[a]);return e.createElement(Z,{styles:z(c,!n,a,r?"":"!important")})},Q=!1;if("undefined"!=typeof window)try{var V=Object.defineProperty({},"passive",{get:function(){return Q=!0,!0}});window.addEventListener("test",V,V),window.removeEventListener("test",V,V)}catch(e){Q=!1}var $=!!Q&&{passive:!1},ee=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},te=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),ne(e,r)){var o=re(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ne=function(e,t){return"v"===e?function(e){return ee(e,"overflowY")}(t):function(e){return ee(e,"overflowX")}(t)},re=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},oe=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ae=function(e){return[e.deltaX,e.deltaY]},ce=function(e){return e&&"current"in e?e.current:e},ie=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},ue=0,se=[];function le(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var de,fe=(de=function(t){var n=e.useRef([]),r=e.useRef([0,0]),o=e.useRef(),a=e.useState(ue++)[0],c=e.useState(X)[0],i=e.useRef(t);e.useEffect(function(){i.current=t},[t]),e.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(a));var e=u([t.lockRef.current],(t.shards||[]).map(ce),!0).filter(Boolean);return e.forEach(function(e){return e.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),e.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(a))})}}},[t.inert,t.lockRef.current,t.shards]);var s=e.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var n,a=oe(e),c=r.current,u="deltaX"in e?e.deltaX:c[0]-a[0],s="deltaY"in e?e.deltaY:c[1]-a[1],l=e.target,d=Math.abs(u)>Math.abs(s)?"h":"v";if("touches"in e&&"h"===d&&"range"===l.type)return!1;var f=window.getSelection(),v=f&&f.anchorNode;if(v&&(v===l||v.contains(l)))return!1;var m=te(d,l);if(!m)return!0;if(m?n=d:(n="v"===d?"h":"v",m=te(d,l)),!m)return!1;if(!o.current&&"changedTouches"in e&&(u||s)&&(o.current=n),!n)return!0;var p=o.current||n;return function(e,t,n,r,o){var a=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),c=a*r,i=n.target,u=t.contains(i),s=!1,l=c>0,d=0,f=0;do{if(!i)break;var v=re(e,i),m=v[0],p=v[1]-v[2]-a*m;(m||p)&&ne(e,i)&&(d+=p,f+=m);var h=i.parentNode;i=h&&h.nodeType===Node.DOCUMENT_FRAGMENT_NODE?h.host:h}while(!u&&i!==document.body||u&&(t.contains(i)||t===i));return(l&&(o&&Math.abs(d)<1||!o&&c>d)||!l&&(o&&Math.abs(f)<1||!o&&-c>f))&&(s=!0),s}(p,t,e,"h"===p?u:s,!0)},[]),l=e.useCallback(function(e){var t=e;if(se.length&&se[se.length-1]===c){var r="deltaY"in t?ae(t):oe(t),o=n.current.filter(function(e){return e.name===t.type&&(e.target===t.target||t.target===e.shadowParent)&&(n=e.delta,o=r,n[0]===o[0]&&n[1]===o[1]);var n,o})[0];if(o&&o.should)t.cancelable&&t.preventDefault();else if(!o){var a=(i.current.shards||[]).map(ce).filter(Boolean).filter(function(e){return e.contains(t.target)});(a.length>0?s(t,a[0]):!i.current.noIsolation)&&t.cancelable&&t.preventDefault()}}},[]),d=e.useCallback(function(e,t,r,o){var a={name:e,delta:t,target:r,should:o,shadowParent:le(r)};n.current.push(a),setTimeout(function(){n.current=n.current.filter(function(e){return e!==a})},1)},[]),f=e.useCallback(function(e){r.current=oe(e),o.current=void 0},[]),v=e.useCallback(function(e){d(e.type,ae(e),e.target,s(e,t.lockRef.current))},[]),m=e.useCallback(function(e){d(e.type,oe(e),e.target,s(e,t.lockRef.current))},[]);e.useEffect(function(){return se.push(c),t.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:m}),document.addEventListener("wheel",l,$),document.addEventListener("touchmove",l,$),document.addEventListener("touchstart",f,$),function(){se=se.filter(function(e){return e!==c}),document.removeEventListener("wheel",l,$),document.removeEventListener("touchmove",l,$),document.removeEventListener("touchstart",f,$)}},[]);var p=t.removeScrollBar,h=t.inert;return e.createElement(e.Fragment,null,h?e.createElement(c,{styles:ie(a)}):null,p?e.createElement(J,{noRelative:t.noRelative,gapMode:t.gapMode}):null)},D.useMedium(de),W),ve=e.forwardRef(function(t,n){return e.createElement(j,c({},t,{ref:n,sideCar:fe}))});ve.classNames=j.classNames;var me=ve;export{p as F,me as R,A as h,l as u};
@@ -1,12 +1,12 @@
1
- import{c as a}from"./createLucideIcon-70ab5429.js";
1
+ import{c as a}from"./createLucideIcon-8605f860.js";
2
2
  /**
3
- * @license lucide-react v0.378.0 - ISC
3
+ * @license lucide-react v0.294.0 - ISC
4
4
  *
5
5
  * This source code is licensed under the ISC license.
6
6
  * See the LICENSE file in the root directory of this source tree.
7
7
  */const t=a("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]),e=a("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);
8
8
  /**
9
- * @license lucide-react v0.378.0 - ISC
9
+ * @license lucide-react v0.294.0 - ISC
10
10
  *
11
11
  * This source code is licensed under the ISC license.
12
12
  * See the LICENSE file in the root directory of this source tree.
@@ -1 +1 @@
1
- import{_ as e}from"./_tslib-35bb891d.js";import{jsx as r}from"react/jsx-runtime";import*as t from"react";import{a,c as s}from"./utils-de9c4c2b.js";const n=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,o=a,i=(e,r)=>t=>{var a;if(null==(null==r?void 0:r.variants))return o(e,null==t?void 0:t.class,null==t?void 0:t.className);const{variants:s,defaultVariants:i}=r,l=Object.keys(s).map(e=>{const r=null==t?void 0:t[e],a=null==i?void 0:i[e];if(null===r)return null;const o=n(r)||n(a);return s[e][o]}),d=t&&Object.entries(t).reduce((e,r)=>{let[t,a]=r;return void 0===a||(e[t]=a),e},{}),u=null==r||null===(a=r.compoundVariants)||void 0===a?void 0:a.reduce((e,r)=>{let{class:t,className:a,...s}=r;return Object.entries(s).every(e=>{let[r,t]=e;return Array.isArray(t)?t.includes({...i,...d}[r]):{...i,...d}[r]===t})?[...e,t,a]:e},[]);return o(e,l,u,null==t?void 0:t.class,null==t?void 0:t.className)},l=i("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),d=t.forwardRef((t,a)=>{var{className:n,variant:o,size:i}=t,d=e(t,["className","variant","size"]);return r("button",Object.assign({className:s(l({variant:o,size:i,className:n})),ref:a},d))});d.displayName="Button";export{d as B,i as c};
1
+ import{_ as e}from"./_tslib-35bb891d.js";import{jsx as r}from"react/jsx-runtime";import*as t from"react";import{a,c as s}from"./utils-3345eade.js";const n=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,o=a,i=(e,r)=>t=>{var a;if(null==(null==r?void 0:r.variants))return o(e,null==t?void 0:t.class,null==t?void 0:t.className);const{variants:s,defaultVariants:i}=r,l=Object.keys(s).map(e=>{const r=null==t?void 0:t[e],a=null==i?void 0:i[e];if(null===r)return null;const o=n(r)||n(a);return s[e][o]}),d=t&&Object.entries(t).reduce((e,r)=>{let[t,a]=r;return void 0===a||(e[t]=a),e},{}),u=null==r||null===(a=r.compoundVariants)||void 0===a?void 0:a.reduce((e,r)=>{let{class:t,className:a,...s}=r;return Object.entries(s).every(e=>{let[r,t]=e;return Array.isArray(t)?t.includes({...i,...d}[r]):{...i,...d}[r]===t})?[...e,t,a]:e},[]);return o(e,l,u,null==t?void 0:t.class,null==t?void 0:t.className)},l=i("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),d=t.forwardRef((t,a)=>{var{className:n,variant:o,size:i}=t,d=e(t,["className","variant","size"]);return r("button",Object.assign({className:s(l({variant:o,size:i,className:n})),ref:a},d))});d.displayName="Button";export{d as B,i as c};
@@ -1 +1 @@
1
- import{_ as a}from"./_tslib-35bb891d.js";import{jsx as e}from"react/jsx-runtime";import*as s from"react";import{c as r}from"./utils-de9c4c2b.js";const t=s.forwardRef((s,t)=>{var{className:c}=s,d=a(s,["className"]);return e("div",Object.assign({ref:t,className:r("rounded-xl border bg-card text-card-foreground shadow",c)},d))});t.displayName="Card";const c=s.forwardRef((s,t)=>{var{className:c}=s,d=a(s,["className"]);return e("div",Object.assign({ref:t,className:r("flex flex-col space-y-1.5 p-6",c)},d))});c.displayName="CardHeader";const d=s.forwardRef((s,t)=>{var{className:c,children:d}=s,l=a(s,["className","children"]);return e("h3",Object.assign({ref:t,className:r("font-semibold leading-none tracking-tight",c)},l,{children:d}))});d.displayName="CardTitle";s.forwardRef((s,t)=>{var{className:c}=s,d=a(s,["className"]);return e("p",Object.assign({ref:t,className:r("text-sm text-muted-foreground",c)},d))}).displayName="CardDescription";const l=s.forwardRef((s,t)=>{var{className:c}=s,d=a(s,["className"]);return e("div",Object.assign({ref:t,className:r("p-6 pt-0",c)},d))});l.displayName="CardContent";s.forwardRef((s,t)=>{var{className:c}=s,d=a(s,["className"]);return e("div",Object.assign({ref:t,className:r("flex items-center p-6 pt-0",c)},d))}).displayName="CardFooter";export{t as C,l as a,c as b,d as c};
1
+ import{_ as a}from"./_tslib-35bb891d.js";import{jsx as e}from"react/jsx-runtime";import*as s from"react";import{c as r}from"./utils-3345eade.js";const t=s.forwardRef((s,t)=>{var{className:c}=s,d=a(s,["className"]);return e("div",Object.assign({ref:t,className:r("rounded-xl border bg-card text-card-foreground shadow",c)},d))});t.displayName="Card";const c=s.forwardRef((s,t)=>{var{className:c}=s,d=a(s,["className"]);return e("div",Object.assign({ref:t,className:r("flex flex-col space-y-1.5 p-6",c)},d))});c.displayName="CardHeader";const d=s.forwardRef((s,t)=>{var{className:c,children:d}=s,l=a(s,["className","children"]);return e("h3",Object.assign({ref:t,className:r("font-semibold leading-none tracking-tight",c)},l,{children:d}))});d.displayName="CardTitle";s.forwardRef((s,t)=>{var{className:c}=s,d=a(s,["className"]);return e("p",Object.assign({ref:t,className:r("text-sm text-muted-foreground",c)},d))}).displayName="CardDescription";const l=s.forwardRef((s,t)=>{var{className:c}=s,d=a(s,["className"]);return e("div",Object.assign({ref:t,className:r("p-6 pt-0",c)},d))});l.displayName="CardContent";s.forwardRef((s,t)=>{var{className:c}=s,d=a(s,["className"]);return e("div",Object.assign({ref:t,className:r("flex items-center p-6 pt-0",c)},d))}).displayName="CardFooter";export{t as C,c as a,d as b,l as c};
@@ -1,6 +1,6 @@
1
- import{c}from"./createLucideIcon-70ab5429.js";
1
+ import{c}from"./createLucideIcon-8605f860.js";
2
2
  /**
3
- * @license lucide-react v0.378.0 - ISC
3
+ * @license lucide-react v0.294.0 - ISC
4
4
  *
5
5
  * This source code is licensed under the ISC license.
6
6
  * See the LICENSE file in the root directory of this source tree.
@@ -0,0 +1,7 @@
1
+ import{c as o}from"./createLucideIcon-8605f860.js";
2
+ /**
3
+ * @license lucide-react v0.294.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */const e=o("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);export{e as C};
@@ -0,0 +1,7 @@
1
+ import{c as e}from"./createLucideIcon-8605f860.js";
2
+ /**
3
+ * @license lucide-react v0.294.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */const o=e("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);export{o as C};
@@ -1,6 +1,6 @@
1
- import{c as e}from"./createLucideIcon-70ab5429.js";
1
+ import{c as e}from"./createLucideIcon-8605f860.js";
2
2
  /**
3
- * @license lucide-react v0.378.0 - ISC
3
+ * @license lucide-react v0.294.0 - ISC
4
4
  *
5
5
  * This source code is licensed under the ISC license.
6
6
  * See the LICENSE file in the root directory of this source tree.
@@ -0,0 +1,13 @@
1
+ import{forwardRef as r,createElement as e}from"react";
2
+ /**
3
+ * @license lucide-react v0.294.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */var t={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};
8
+ /**
9
+ * @license lucide-react v0.294.0 - ISC
10
+ *
11
+ * This source code is licensed under the ISC license.
12
+ * See the LICENSE file in the root directory of this source tree.
13
+ */const o=(o,i)=>{const s=r(({color:r="currentColor",size:s=24,strokeWidth:a=2,absoluteStrokeWidth:n,className:c="",children:l,...d},h)=>{return e("svg",{ref:h,...t,width:s,height:s,stroke:r,strokeWidth:n?24*Number(a)/Number(s):a,className:["lucide",`lucide-${u=o,u.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim()}`,c].join(" "),...d},[...i.map(([r,t])=>e(r,t)),...Array.isArray(l)?l:[l]]);var u});return s.displayName=`${o}`,s};export{o as c};
@@ -0,0 +1,13 @@
1
+ import{c as e}from"./createLucideIcon-8605f860.js";import{_ as n}from"./_tslib-35bb891d.js";import{jsx as r,jsxs as t}from"react/jsx-runtime";import*as o from"react";import{c as a,a as s,P as i,d}from"./index-17323747.js";import{c,u}from"./index-91a5b8d5.js";import{u as l}from"./index-ff0e3962.js";import{c as p}from"./index-f85dae42.js";import{u as f}from"./index-13505606.js";import{c as m,A as g,D as h,C as v,a as w,R as y,P as _}from"./index-23c7fb16.js";import{h as b,u as M,F as x,R as C}from"./Combination-575d4475.js";import{u as D}from"./index-ce60ba41.js";import{P as R}from"./index-23db6fea.js";import{c as O,R as k,I as P}from"./index-ba3032f8.js";import{u as N}from"./index-70f4e709.js";import{c as E}from"./utils-3345eade.js";
2
+ /**
3
+ * @license lucide-react v0.294.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */const I=e("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]),S=e("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]),T=e("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),F=e("MoreVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);
8
+ /**
9
+ * @license lucide-react v0.294.0 - ISC
10
+ *
11
+ * This source code is licensed under the ISC license.
12
+ * See the LICENSE file in the root directory of this source tree.
13
+ */function j(e){const n=o.forwardRef((e,n)=>{const{children:r,...t}=e;if(o.isValidElement(r)){const e=function(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning;if(r)return e.ref;if(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(r),a=function(e,n){const r={...n};for(const t in n){const o=e[t],a=n[t];/^on[A-Z]/.test(t)?o&&a?r[t]=(...e)=>{const n=a(...e);return o(...e),n}:o&&(r[t]=o):"style"===t?r[t]={...o,...a}:"className"===t&&(r[t]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}(t,r.props);return r.type!==o.Fragment&&(a.ref=n?c(n,e):e),o.cloneElement(r,a)}return o.Children.count(r)>1?o.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var A=Symbol("radix.slottable");function L(e){return o.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===A}var K=["Enter"," "],V=["ArrowUp","PageDown","End"],z=["ArrowDown","PageUp","Home",...V],G={ltr:[...K,"ArrowRight"],rtl:[...K,"ArrowLeft"]},U={ltr:["ArrowLeft"],rtl:["ArrowRight"]},B="Menu",[W,X,q]=p(B),[Y,Z]=a(B,[q,m,O]),$=m(),H=O(),[J,Q]=Y(B),[ee,ne]=Y(B),re=e=>{const{__scopeMenu:n,open:t=!1,children:a,dir:s,onOpenChange:i,modal:d=!0}=e,c=$(n),[u,l]=o.useState(null),p=o.useRef(!1),m=N(i),g=f(s);return o.useEffect(()=>{const e=()=>{p.current=!0,document.addEventListener("pointerdown",n,{capture:!0,once:!0}),document.addEventListener("pointermove",n,{capture:!0,once:!0})},n=()=>p.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",n,{capture:!0}),document.removeEventListener("pointermove",n,{capture:!0})}},[]),r(y,{...c,children:r(J,{scope:n,open:t,onOpenChange:m,content:u,onContentChange:l,children:r(ee,{scope:n,onClose:o.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:p,dir:g,modal:d,children:a})})})};re.displayName=B;var te=o.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e,a=$(t);return r(g,{...a,...o,ref:n})});te.displayName="MenuAnchor";var oe="MenuPortal",[ae,se]=Y(oe,{forceMount:void 0}),ie=e=>{const{__scopeMenu:n,forceMount:t,children:o,container:a}=e,s=Q(oe,n);return r(ae,{scope:n,forceMount:t,children:r(R,{present:t||s.open,children:r(_,{asChild:!0,container:a,children:o})})})};ie.displayName=oe;var de="MenuContent",[ce,ue]=Y(de),le=o.forwardRef((e,n)=>{const t=se(de,e.__scopeMenu),{forceMount:o=t.forceMount,...a}=e,s=Q(de,e.__scopeMenu),i=ne(de,e.__scopeMenu);return r(W.Provider,{scope:e.__scopeMenu,children:r(R,{present:o||s.open,children:r(W.Slot,{scope:e.__scopeMenu,children:i.modal?r(pe,{...a,ref:n}):r(fe,{...a,ref:n})})})})}),pe=o.forwardRef((e,n)=>{const t=Q(de,e.__scopeMenu),a=o.useRef(null),i=u(n,a);return o.useEffect(()=>{const e=a.current;if(e)return b(e)},[]),r(ge,{...e,ref:i,trapFocus:t.open,disableOutsidePointerEvents:t.open,disableOutsideScroll:!0,onFocusOutside:s(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>t.onOpenChange(!1)})}),fe=o.forwardRef((e,n)=>{const t=Q(de,e.__scopeMenu);return r(ge,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>t.onOpenChange(!1)})}),me=function(e){const n=j(e),t=o.forwardRef((e,t)=>{const{children:a,...s}=e,i=o.Children.toArray(a),d=i.find(L);if(d){const e=d.props.children,a=i.map(n=>n===d?o.Children.count(e)>1?o.Children.only(null):o.isValidElement(e)?e.props.children:null:n);return r(n,{...s,ref:t,children:o.isValidElement(e)?o.cloneElement(e,void 0,a):null})}return r(n,{...s,ref:t,children:a})});return t.displayName=`${e}.Slot`,t}("MenuContent.ScrollLock"),ge=o.forwardRef((e,n)=>{const{__scopeMenu:t,loop:a=!1,trapFocus:i,onOpenAutoFocus:d,onCloseAutoFocus:c,disableOutsidePointerEvents:l,onEntryFocus:p,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:g,onInteractOutside:w,onDismiss:y,disableOutsideScroll:_,...b}=e,D=Q(de,t),R=ne(de,t),O=$(t),P=H(t),N=X(t),[E,I]=o.useState(null),S=o.useRef(null),T=u(n,S,D.onContentChange),F=o.useRef(0),j=o.useRef(""),A=o.useRef(0),L=o.useRef(null),K=o.useRef("right"),G=o.useRef(0),U=_?C:o.Fragment,B=_?{as:me,allowPinchZoom:!0}:void 0,W=e=>{const n=j.current+e,r=N().filter(e=>!e.disabled),t=document.activeElement,o=r.find(e=>e.ref.current===t)?.textValue,a=function(e,n,r){const t=n.length>1&&Array.from(n).every(e=>e===n[0]),o=t?n[0]:n,a=r?e.indexOf(r):-1;let s=(i=e,d=Math.max(a,0),i.map((e,n)=>i[(d+n)%i.length]));var i,d;1===o.length&&(s=s.filter(e=>e!==r));const c=s.find(e=>e.toLowerCase().startsWith(o.toLowerCase()));return c!==r?c:void 0}(r.map(e=>e.textValue),n,o),s=r.find(e=>e.textValue===a)?.ref.current;!function e(n){j.current=n,window.clearTimeout(F.current),""!==n&&(F.current=window.setTimeout(()=>e(""),1e3))}(n),s&&setTimeout(()=>s.focus())};o.useEffect(()=>()=>window.clearTimeout(F.current),[]),M();const q=o.useCallback(e=>K.current===L.current?.side&&function(e,n){if(!n)return!1;const r={x:e.clientX,y:e.clientY};return function(e,n){const{x:r,y:t}=e;let o=!1;for(let e=0,a=n.length-1;e<n.length;a=e++){const s=n[e],i=n[a],d=s.x,c=s.y,u=i.x,l=i.y;c>t!=l>t&&r<(u-d)*(t-c)/(l-c)+d&&(o=!o)}return o}(r,n)}(e,L.current?.area),[]);return r(ce,{scope:t,searchRef:j,onItemEnter:o.useCallback(e=>{q(e)&&e.preventDefault()},[q]),onItemLeave:o.useCallback(e=>{q(e)||(S.current?.focus(),I(null))},[q]),onTriggerLeave:o.useCallback(e=>{q(e)&&e.preventDefault()},[q]),pointerGraceTimerRef:A,onPointerGraceIntentChange:o.useCallback(e=>{L.current=e},[]),children:r(U,{...B,children:r(x,{asChild:!0,trapped:i,onMountAutoFocus:s(d,e=>{e.preventDefault(),S.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:r(h,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:g,onInteractOutside:w,onDismiss:y,children:r(k,{asChild:!0,...P,dir:R.dir,orientation:"vertical",loop:a,currentTabStopId:E,onCurrentTabStopIdChange:I,onEntryFocus:s(p,e=>{R.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:r(v,{role:"menu","aria-orientation":"vertical","data-state":Ue(D.open),"data-radix-menu-content":"",dir:R.dir,...O,...b,ref:T,style:{outline:"none",...b.style},onKeyDown:s(b.onKeyDown,e=>{const n=e.target.closest("[data-radix-menu-content]")===e.currentTarget,r=e.ctrlKey||e.altKey||e.metaKey,t=1===e.key.length;n&&("Tab"===e.key&&e.preventDefault(),!r&&t&&W(e.key));const o=S.current;if(e.target!==o)return;if(!z.includes(e.key))return;e.preventDefault();const a=N().filter(e=>!e.disabled).map(e=>e.ref.current);V.includes(e.key)&&a.reverse(),function(e){const n=document.activeElement;for(const r of e){if(r===n)return;if(r.focus(),document.activeElement!==n)return}}(a)}),onBlur:s(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(F.current),j.current="")}),onPointerMove:s(e.onPointerMove,Xe(e=>{const n=e.target,r=G.current!==e.clientX;if(e.currentTarget.contains(n)&&r){const n=e.clientX>G.current?"right":"left";K.current=n,G.current=e.clientX}}))})})})})})})});le.displayName=de;var he=o.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e;return r(i.div,{role:"group",...o,ref:n})});he.displayName="MenuGroup";var ve=o.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e;return r(i.div,{...o,ref:n})});ve.displayName="MenuLabel";var we="MenuItem",ye="menu.itemSelect",_e=o.forwardRef((e,n)=>{const{disabled:t=!1,onSelect:a,...i}=e,c=o.useRef(null),l=ne(we,e.__scopeMenu),p=ue(we,e.__scopeMenu),f=u(n,c),m=o.useRef(!1);return r(be,{...i,ref:f,disabled:t,onClick:s(e.onClick,()=>{const e=c.current;if(!t&&e){const n=new CustomEvent(ye,{bubbles:!0,cancelable:!0});e.addEventListener(ye,e=>a?.(e),{once:!0}),d(e,n),n.defaultPrevented?m.current=!1:l.onClose()}}),onPointerDown:n=>{e.onPointerDown?.(n),m.current=!0},onPointerUp:s(e.onPointerUp,e=>{m.current||e.currentTarget?.click()}),onKeyDown:s(e.onKeyDown,e=>{const n=""!==p.searchRef.current;t||n&&" "===e.key||K.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});_e.displayName=we;var be=o.forwardRef((e,n)=>{const{__scopeMenu:t,disabled:a=!1,textValue:d,...c}=e,l=ue(we,t),p=H(t),f=o.useRef(null),m=u(n,f),[g,h]=o.useState(!1),[v,w]=o.useState("");return o.useEffect(()=>{const e=f.current;e&&w((e.textContent??"").trim())},[c.children]),r(W.ItemSlot,{scope:t,disabled:a,textValue:d??v,children:r(P,{asChild:!0,...p,focusable:!a,children:r(i.div,{role:"menuitem","data-highlighted":g?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...c,ref:m,onPointerMove:s(e.onPointerMove,Xe(e=>{if(a)l.onItemLeave(e);else if(l.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus({preventScroll:!0})}})),onPointerLeave:s(e.onPointerLeave,Xe(e=>l.onItemLeave(e))),onFocus:s(e.onFocus,()=>h(!0)),onBlur:s(e.onBlur,()=>h(!1))})})})}),Me=o.forwardRef((e,n)=>{const{checked:t=!1,onCheckedChange:o,...a}=e;return r(Ne,{scope:e.__scopeMenu,checked:t,children:r(_e,{role:"menuitemcheckbox","aria-checked":Be(t)?"mixed":t,...a,ref:n,"data-state":We(t),onSelect:s(a.onSelect,()=>o?.(!!Be(t)||!t),{checkForDefaultPrevented:!1})})})});Me.displayName="MenuCheckboxItem";var xe="MenuRadioGroup",[Ce,De]=Y(xe,{value:void 0,onValueChange:()=>{}}),Re=o.forwardRef((e,n)=>{const{value:t,onValueChange:o,...a}=e,s=N(o);return r(Ce,{scope:e.__scopeMenu,value:t,onValueChange:s,children:r(he,{...a,ref:n})})});Re.displayName=xe;var Oe="MenuRadioItem",ke=o.forwardRef((e,n)=>{const{value:t,...o}=e,a=De(Oe,e.__scopeMenu),i=t===a.value;return r(Ne,{scope:e.__scopeMenu,checked:i,children:r(_e,{role:"menuitemradio","aria-checked":i,...o,ref:n,"data-state":We(i),onSelect:s(o.onSelect,()=>a.onValueChange?.(t),{checkForDefaultPrevented:!1})})})});ke.displayName=Oe;var Pe="MenuItemIndicator",[Ne,Ee]=Y(Pe,{checked:!1}),Ie=o.forwardRef((e,n)=>{const{__scopeMenu:t,forceMount:o,...a}=e,s=Ee(Pe,t);return r(R,{present:o||Be(s.checked)||!0===s.checked,children:r(i.span,{...a,ref:n,"data-state":We(s.checked)})})});Ie.displayName=Pe;var Se=o.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e;return r(i.div,{role:"separator","aria-orientation":"horizontal",...o,ref:n})});Se.displayName="MenuSeparator";var Te=o.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e,a=$(t);return r(w,{...a,...o,ref:n})});Te.displayName="MenuArrow";var Fe="MenuSub",[je,Ae]=Y(Fe),Le=e=>{const{__scopeMenu:n,children:t,open:a=!1,onOpenChange:s}=e,i=Q(Fe,n),d=$(n),[c,u]=o.useState(null),[l,p]=o.useState(null),f=N(s);return o.useEffect(()=>(!1===i.open&&f(!1),()=>f(!1)),[i.open,f]),r(y,{...d,children:r(J,{scope:n,open:a,onOpenChange:f,content:l,onContentChange:p,children:r(je,{scope:n,contentId:D(),triggerId:D(),trigger:c,onTriggerChange:u,children:t})})})};Le.displayName=Fe;var Ke="MenuSubTrigger",Ve=o.forwardRef((e,n)=>{const t=Q(Ke,e.__scopeMenu),a=ne(Ke,e.__scopeMenu),i=Ae(Ke,e.__scopeMenu),d=ue(Ke,e.__scopeMenu),u=o.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:p}=d,f={__scopeMenu:e.__scopeMenu},m=o.useCallback(()=>{u.current&&window.clearTimeout(u.current),u.current=null},[]);return o.useEffect(()=>m,[m]),o.useEffect(()=>{const e=l.current;return()=>{window.clearTimeout(e),p(null)}},[l,p]),r(te,{asChild:!0,...f,children:r(be,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":t.open,"aria-controls":i.contentId,"data-state":Ue(t.open),...e,ref:c(n,i.onTriggerChange),onClick:n=>{e.onClick?.(n),e.disabled||n.defaultPrevented||(n.currentTarget.focus(),t.open||t.onOpenChange(!0))},onPointerMove:s(e.onPointerMove,Xe(n=>{d.onItemEnter(n),n.defaultPrevented||e.disabled||t.open||u.current||(d.onPointerGraceIntentChange(null),u.current=window.setTimeout(()=>{t.onOpenChange(!0),m()},100))})),onPointerLeave:s(e.onPointerLeave,Xe(e=>{m();const n=t.content?.getBoundingClientRect();if(n){const r=t.content?.dataset.side,o="right"===r,a=o?-5:5,s=n[o?"left":"right"],i=n[o?"right":"left"];d.onPointerGraceIntentChange({area:[{x:e.clientX+a,y:e.clientY},{x:s,y:n.top},{x:i,y:n.top},{x:i,y:n.bottom},{x:s,y:n.bottom}],side:r}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>d.onPointerGraceIntentChange(null),300)}else{if(d.onTriggerLeave(e),e.defaultPrevented)return;d.onPointerGraceIntentChange(null)}})),onKeyDown:s(e.onKeyDown,n=>{const r=""!==d.searchRef.current;e.disabled||r&&" "===n.key||G[a.dir].includes(n.key)&&(t.onOpenChange(!0),t.content?.focus(),n.preventDefault())})})})});Ve.displayName=Ke;var ze="MenuSubContent",Ge=o.forwardRef((e,n)=>{const t=se(de,e.__scopeMenu),{forceMount:a=t.forceMount,...i}=e,d=Q(de,e.__scopeMenu),c=ne(de,e.__scopeMenu),l=Ae(ze,e.__scopeMenu),p=o.useRef(null),f=u(n,p);return r(W.Provider,{scope:e.__scopeMenu,children:r(R,{present:a||d.open,children:r(W.Slot,{scope:e.__scopeMenu,children:r(ge,{id:l.contentId,"aria-labelledby":l.triggerId,...i,ref:f,align:"start",side:"rtl"===c.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{c.isUsingKeyboardRef.current&&p.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:s(e.onFocusOutside,e=>{e.target!==l.trigger&&d.onOpenChange(!1)}),onEscapeKeyDown:s(e.onEscapeKeyDown,e=>{c.onClose(),e.preventDefault()}),onKeyDown:s(e.onKeyDown,e=>{const n=e.currentTarget.contains(e.target),r=U[c.dir].includes(e.key);n&&r&&(d.onOpenChange(!1),l.trigger?.focus(),e.preventDefault())})})})})})});function Ue(e){return e?"open":"closed"}function Be(e){return"indeterminate"===e}function We(e){return Be(e)?"indeterminate":e?"checked":"unchecked"}function Xe(e){return n=>"mouse"===n.pointerType?e(n):void 0}Ge.displayName=ze;var qe=re,Ye=te,Ze=ie,$e=le,He=he,Je=ve,Qe=_e,en=Me,nn=Re,rn=ke,tn=Ie,on=Se,an=Te,sn=Le,dn=Ve,cn=Ge,un="DropdownMenu",[ln,pn]=a(un,[Z]),fn=Z(),[mn,gn]=ln(un),hn=e=>{const{__scopeDropdownMenu:n,children:t,dir:a,open:s,defaultOpen:i,onOpenChange:d,modal:c=!0}=e,u=fn(n),p=o.useRef(null),[f,m]=l({prop:s,defaultProp:i??!1,onChange:d,caller:un});return r(mn,{scope:n,triggerId:D(),triggerRef:p,contentId:D(),open:f,onOpenChange:m,onOpenToggle:o.useCallback(()=>m(e=>!e),[m]),modal:c,children:r(qe,{...u,open:f,onOpenChange:m,dir:a,modal:c,children:t})})};hn.displayName=un;var vn="DropdownMenuTrigger",wn=o.forwardRef((e,n)=>{const{__scopeDropdownMenu:t,disabled:o=!1,...a}=e,d=gn(vn,t),u=fn(t);return r(Ye,{asChild:!0,...u,children:r(i.button,{type:"button",id:d.triggerId,"aria-haspopup":"menu","aria-expanded":d.open,"aria-controls":d.open?d.contentId:void 0,"data-state":d.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...a,ref:c(n,d.triggerRef),onPointerDown:s(e.onPointerDown,e=>{o||0!==e.button||!1!==e.ctrlKey||(d.onOpenToggle(),d.open||e.preventDefault())}),onKeyDown:s(e.onKeyDown,e=>{o||(["Enter"," "].includes(e.key)&&d.onOpenToggle(),"ArrowDown"===e.key&&d.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())})})})});wn.displayName=vn;var yn=e=>{const{__scopeDropdownMenu:n,...t}=e,o=fn(n);return r(Ze,{...o,...t})};yn.displayName="DropdownMenuPortal";var _n="DropdownMenuContent",bn=o.forwardRef((e,n)=>{const{__scopeDropdownMenu:t,...a}=e,i=gn(_n,t),d=fn(t),c=o.useRef(!1);return r($e,{id:i.contentId,"aria-labelledby":i.triggerId,...d,...a,ref:n,onCloseAutoFocus:s(e.onCloseAutoFocus,e=>{c.current||i.triggerRef.current?.focus(),c.current=!1,e.preventDefault()}),onInteractOutside:s(e.onInteractOutside,e=>{const n=e.detail.originalEvent,r=0===n.button&&!0===n.ctrlKey,t=2===n.button||r;i.modal&&!t||(c.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});bn.displayName=_n;o.forwardRef((e,n)=>{const{__scopeDropdownMenu:t,...o}=e,a=fn(t);return r(He,{...a,...o,ref:n})}).displayName="DropdownMenuGroup";o.forwardRef((e,n)=>{const{__scopeDropdownMenu:t,...o}=e,a=fn(t);return r(Je,{...a,...o,ref:n})}).displayName="DropdownMenuLabel";var Mn=o.forwardRef((e,n)=>{const{__scopeDropdownMenu:t,...o}=e,a=fn(t);return r(Qe,{...a,...o,ref:n})});Mn.displayName="DropdownMenuItem";o.forwardRef((e,n)=>{const{__scopeDropdownMenu:t,...o}=e,a=fn(t);return r(en,{...a,...o,ref:n})}).displayName="DropdownMenuCheckboxItem";o.forwardRef((e,n)=>{const{__scopeDropdownMenu:t,...o}=e,a=fn(t);return r(nn,{...a,...o,ref:n})}).displayName="DropdownMenuRadioGroup";o.forwardRef((e,n)=>{const{__scopeDropdownMenu:t,...o}=e,a=fn(t);return r(rn,{...a,...o,ref:n})}).displayName="DropdownMenuRadioItem";o.forwardRef((e,n)=>{const{__scopeDropdownMenu:t,...o}=e,a=fn(t);return r(tn,{...a,...o,ref:n})}).displayName="DropdownMenuItemIndicator";var xn=o.forwardRef((e,n)=>{const{__scopeDropdownMenu:t,...o}=e,a=fn(t);return r(on,{...a,...o,ref:n})});xn.displayName="DropdownMenuSeparator";o.forwardRef((e,n)=>{const{__scopeDropdownMenu:t,...o}=e,a=fn(t);return r(an,{...a,...o,ref:n})}).displayName="DropdownMenuArrow";var Cn=o.forwardRef((e,n)=>{const{__scopeDropdownMenu:t,...o}=e,a=fn(t);return r(dn,{...a,...o,ref:n})});Cn.displayName="DropdownMenuSubTrigger";var Dn=o.forwardRef((e,n)=>{const{__scopeDropdownMenu:t,...o}=e,a=fn(t);return r(cn,{...a,...o,ref:n,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Dn.displayName="DropdownMenuSubContent";var Rn=hn,On=wn,kn=yn,Pn=bn,Nn=Mn,En=xn,In=e=>{const{__scopeDropdownMenu:n,children:t,open:o,onOpenChange:a,defaultOpen:s}=e,i=fn(n),[d,c]=l({prop:o,defaultProp:s??!1,onChange:a,caller:"DropdownMenuSub"});return r(sn,{...i,open:d,onOpenChange:c,children:t})},Sn=Cn,Tn=Dn;const Fn=e=>{var t=n(e,[]);return r(Rn,Object.assign({"data-slot":"dropdown-menu"},t))},jn=e=>{var t=n(e,[]);return r(On,Object.assign({"data-slot":"dropdown-menu-trigger"},t))},An=e=>{var{className:t,sideOffset:o=4}=e,a=n(e,["className","sideOffset"]);return r(kn,{children:r(Pn,Object.assign({"data-slot":"dropdown-menu-content",sideOffset:o,className:E("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",t)},a))})},Ln=e=>{var{className:t,inset:o,variant:a="default"}=e,s=n(e,["className","inset","variant"]);return r(Nn,Object.assign({"data-slot":"dropdown-menu-item","data-inset":o,"data-variant":a,className:E("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t)},s))},Kn=e=>{var{className:t}=e,o=n(e,["className"]);return r(En,Object.assign({"data-slot":"dropdown-menu-separator",className:E("bg-border -mx-1 my-1 h-px",t)},o))},Vn=e=>{var t=n(e,[]);return r(In,Object.assign({"data-slot":"dropdown-menu-sub"},t))},zn=e=>{var{className:o,inset:a,children:s}=e,i=n(e,["className","inset","children"]);return t(Sn,Object.assign({"data-slot":"dropdown-menu-sub-trigger","data-inset":a,className:E("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o)},i,{children:[s,r(T,{className:"ml-auto size-4"})]}))},Gn=e=>{var{className:t}=e,o=n(e,["className"]);return r(Tn,Object.assign({"data-slot":"dropdown-menu-sub-content",className:E("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",t)},o))};export{S as A,Fn as D,F as M,jn as a,An as b,Ln as c,I as d,Kn as e,Vn as f,zn as g,Gn as h};
@@ -0,0 +1,7 @@
1
+ import{c as a}from"./createLucideIcon-8605f860.js";
2
+ /**
3
+ * @license lucide-react v0.294.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */const e=a("ExternalLink",[["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}],["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["line",{x1:"10",x2:"21",y1:"14",y2:"3",key:"18c3s4"}]]);export{e as E};
@@ -0,0 +1,7 @@
1
+ import{c as e}from"./createLucideIcon-8605f860.js";
2
+ /**
3
+ * @license lucide-react v0.294.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */const y=e("FileText",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["line",{x1:"16",x2:"8",y1:"13",y2:"13",key:"14keom"}],["line",{x1:"16",x2:"8",y1:"17",y2:"17",key:"17nazh"}],["line",{x1:"10",x2:"8",y1:"9",y2:"9",key:"1a5vjj"}]]);export{y as F};
@@ -1 +1 @@
1
- import{_ as e}from"./_tslib-35bb891d.js";import{jsx as r}from"react/jsx-runtime";import*as t from"react";import{c as o,P as n,a}from"./index-2ad64d02.js";import{u as s}from"./index-94aa31ed.js";import{u as i}from"./index-91a5b8d5.js";import{c,A as d,D as l,C as u,b as p,R as f,P as m}from"./index-285e9c7c.js";import{P as v}from"./index-52395f9b.js";import{c as h}from"./utils-de9c4c2b.js";var g,C="HoverCard",[w,b]=o(C,[c]),O=c(),[P,x]=w(C),R=e=>{const{__scopeHoverCard:o,children:n,open:a,defaultOpen:i,onOpenChange:c,openDelay:d=700,closeDelay:l=300}=e,u=O(o),p=t.useRef(0),m=t.useRef(0),v=t.useRef(!1),h=t.useRef(!1),[g,w]=s({prop:a,defaultProp:i??!1,onChange:c,caller:C}),b=t.useCallback(()=>{clearTimeout(m.current),p.current=window.setTimeout(()=>w(!0),d)},[d,w]),x=t.useCallback(()=>{clearTimeout(p.current),v.current||h.current||(m.current=window.setTimeout(()=>w(!1),l))},[l,w]),R=t.useCallback(()=>w(!1),[w]);return t.useEffect(()=>()=>{clearTimeout(p.current),clearTimeout(m.current)},[]),r(P,{scope:o,open:g,onOpenChange:w,onOpen:b,onClose:x,onDismiss:R,hasSelectionRef:v,isPointerDownOnContentRef:h,children:r(f,{...u,children:n})})};R.displayName=C;var E="HoverCardTrigger",S=t.forwardRef((e,t)=>{const{__scopeHoverCard:o,...s}=e,i=x(E,o),c=O(o);return r(d,{asChild:!0,...c,children:r(n.a,{"data-state":i.open?"open":"closed",...s,ref:t,onPointerEnter:a(e.onPointerEnter,F(i.onOpen)),onPointerLeave:a(e.onPointerLeave,F(i.onClose)),onFocus:a(e.onFocus,i.onOpen),onBlur:a(e.onBlur,i.onClose),onTouchStart:a(e.onTouchStart,e=>e.preventDefault())})})});S.displayName=E;var y="HoverCardPortal",[D,_]=w(y,{forceMount:void 0}),T=e=>{const{__scopeHoverCard:t,forceMount:o,children:n,container:a}=e,s=x(y,t);return r(D,{scope:t,forceMount:o,children:r(v,{present:o||s.open,children:r(m,{asChild:!0,container:a,children:n})})})};T.displayName=y;var N="HoverCardContent",H=t.forwardRef((e,t)=>{const o=_(N,e.__scopeHoverCard),{forceMount:n=o.forceMount,...s}=e,i=x(N,e.__scopeHoverCard);return r(v,{present:n||i.open,children:r(j,{"data-state":i.open?"open":"closed",...s,onPointerEnter:a(e.onPointerEnter,F(i.onOpen)),onPointerLeave:a(e.onPointerLeave,F(i.onClose)),ref:t})})});H.displayName=N;var j=t.forwardRef((e,o)=>{const{__scopeHoverCard:n,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:p,...f}=e,m=x(N,n),v=O(n),h=t.useRef(null),C=i(o,h),[w,b]=t.useState(!1);return t.useEffect(()=>{if(w){const e=document.body;return g=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=g,e.style.webkitUserSelect=g}}},[w]),t.useEffect(()=>{if(h.current){const e=()=>{b(!1),m.isPointerDownOnContentRef.current=!1,setTimeout(()=>{""!==document.getSelection()?.toString()&&(m.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerup",e),m.hasSelectionRef.current=!1,m.isPointerDownOnContentRef.current=!1}}},[m.isPointerDownOnContentRef,m.hasSelectionRef]),t.useEffect(()=>{if(h.current){(function(e){const r=[],t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;t.nextNode();)r.push(t.currentNode);return r})(h.current).forEach(e=>e.setAttribute("tabindex","-1"))}}),r(l,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:p,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:a(d,e=>{e.preventDefault()}),onDismiss:m.onDismiss,children:r(u,{...v,...f,onPointerDown:a(f.onPointerDown,e=>{e.currentTarget.contains(e.target)&&b(!0),m.hasSelectionRef.current=!1,m.isPointerDownOnContentRef.current=!0}),ref:C,style:{...f.style,userSelect:w?"text":void 0,WebkitUserSelect:w?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})});function F(e){return r=>"touch"===r.pointerType?void 0:e()}t.forwardRef((e,t)=>{const{__scopeHoverCard:o,...n}=e,a=O(o);return r(p,{...a,...n,ref:t})}).displayName="HoverCardArrow";var L=R,k=S,I=T,M=H;const A=t=>{var o=e(t,[]);return r(L,Object.assign({"data-slot":"hover-card"},o))},U=t=>{var o=e(t,[]);return r(k,Object.assign({"data-slot":"hover-card-trigger"},o))},z=t=>{var{className:o,align:n="center",sideOffset:a=4}=t,s=e(t,["className","align","sideOffset"]);return r(I,Object.assign({"data-slot":"hover-card-portal"},{children:r(M,Object.assign({"data-slot":"hover-card-content",align:n,sideOffset:a,className:h("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",o)},s))}))};export{A as H,U as a,z as b};
1
+ import{_ as e}from"./_tslib-35bb891d.js";import{jsx as r}from"react/jsx-runtime";import*as t from"react";import{c as o,P as n,a}from"./index-17323747.js";import{u as s}from"./index-ff0e3962.js";import{u as i}from"./index-91a5b8d5.js";import{c,A as d,D as l,C as u,a as p,R as f,P as m}from"./index-23c7fb16.js";import{P as v}from"./index-23db6fea.js";import{c as h}from"./utils-3345eade.js";var g,C="HoverCard",[w,O]=o(C,[c]),b=c(),[P,x]=w(C),R=e=>{const{__scopeHoverCard:o,children:n,open:a,defaultOpen:i,onOpenChange:c,openDelay:d=700,closeDelay:l=300}=e,u=b(o),p=t.useRef(0),m=t.useRef(0),v=t.useRef(!1),h=t.useRef(!1),[g,w]=s({prop:a,defaultProp:i??!1,onChange:c,caller:C}),O=t.useCallback(()=>{clearTimeout(m.current),p.current=window.setTimeout(()=>w(!0),d)},[d,w]),x=t.useCallback(()=>{clearTimeout(p.current),v.current||h.current||(m.current=window.setTimeout(()=>w(!1),l))},[l,w]),R=t.useCallback(()=>w(!1),[w]);return t.useEffect(()=>()=>{clearTimeout(p.current),clearTimeout(m.current)},[]),r(P,{scope:o,open:g,onOpenChange:w,onOpen:O,onClose:x,onDismiss:R,hasSelectionRef:v,isPointerDownOnContentRef:h,children:r(f,{...u,children:n})})};R.displayName=C;var y="HoverCardTrigger",E=t.forwardRef((e,t)=>{const{__scopeHoverCard:o,...s}=e,i=x(y,o),c=b(o);return r(d,{asChild:!0,...c,children:r(n.a,{"data-state":i.open?"open":"closed",...s,ref:t,onPointerEnter:a(e.onPointerEnter,F(i.onOpen)),onPointerLeave:a(e.onPointerLeave,F(i.onClose)),onFocus:a(e.onFocus,i.onOpen),onBlur:a(e.onBlur,i.onClose),onTouchStart:a(e.onTouchStart,e=>e.preventDefault())})})});E.displayName=y;var S="HoverCardPortal",[D,_]=w(S,{forceMount:void 0}),T=e=>{const{__scopeHoverCard:t,forceMount:o,children:n,container:a}=e,s=x(S,t);return r(D,{scope:t,forceMount:o,children:r(v,{present:o||s.open,children:r(m,{asChild:!0,container:a,children:n})})})};T.displayName=S;var N="HoverCardContent",H=t.forwardRef((e,t)=>{const o=_(N,e.__scopeHoverCard),{forceMount:n=o.forceMount,...s}=e,i=x(N,e.__scopeHoverCard);return r(v,{present:n||i.open,children:r(j,{"data-state":i.open?"open":"closed",...s,onPointerEnter:a(e.onPointerEnter,F(i.onOpen)),onPointerLeave:a(e.onPointerLeave,F(i.onClose)),ref:t})})});H.displayName=N;var j=t.forwardRef((e,o)=>{const{__scopeHoverCard:n,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:p,...f}=e,m=x(N,n),v=b(n),h=t.useRef(null),C=i(o,h),[w,O]=t.useState(!1);return t.useEffect(()=>{if(w){const e=document.body;return g=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=g,e.style.webkitUserSelect=g}}},[w]),t.useEffect(()=>{if(h.current){const e=()=>{O(!1),m.isPointerDownOnContentRef.current=!1,setTimeout(()=>{""!==document.getSelection()?.toString()&&(m.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerup",e),m.hasSelectionRef.current=!1,m.isPointerDownOnContentRef.current=!1}}},[m.isPointerDownOnContentRef,m.hasSelectionRef]),t.useEffect(()=>{if(h.current){(function(e){const r=[],t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;t.nextNode();)r.push(t.currentNode);return r})(h.current).forEach(e=>e.setAttribute("tabindex","-1"))}}),r(l,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:p,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:a(d,e=>{e.preventDefault()}),onDismiss:m.onDismiss,children:r(u,{...v,...f,onPointerDown:a(f.onPointerDown,e=>{e.currentTarget.contains(e.target)&&O(!0),m.hasSelectionRef.current=!1,m.isPointerDownOnContentRef.current=!0}),ref:C,style:{...f.style,userSelect:w?"text":void 0,WebkitUserSelect:w?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})});function F(e){return r=>"touch"===r.pointerType?void 0:e()}t.forwardRef((e,t)=>{const{__scopeHoverCard:o,...n}=e,a=b(o);return r(p,{...a,...n,ref:t})}).displayName="HoverCardArrow";var L=R,k=E,I=T,M=H;const A=t=>{var o=e(t,[]);return r(L,Object.assign({"data-slot":"hover-card"},o))},U=t=>{var o=e(t,[]);return r(k,Object.assign({"data-slot":"hover-card-trigger"},o))},z=t=>{var{className:o,align:n="center",sideOffset:a=4}=t,s=e(t,["className","align","sideOffset"]);return r(I,Object.assign({"data-slot":"hover-card-portal"},{children:r(M,Object.assign({"data-slot":"hover-card-content",align:n,sideOffset:a,className:h("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",o)},s))}))};export{A as H,U as a,z as b};
@@ -1,6 +1,6 @@
1
- import{c as e}from"./createLucideIcon-70ab5429.js";function t(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(a){if("default"!==a&&!(a in e)){var o=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(e,a,o.get?o:{enumerable:!0,get:function(){return t[a]}})}})}),Object.freeze(e)}
1
+ import{c as e}from"./createLucideIcon-8605f860.js";function t(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(a){if("default"!==a&&!(a in e)){var o=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(e,a,o.get?o:{enumerable:!0,get:function(){return t[a]}})}})}),Object.freeze(e)}
2
2
  /**
3
- * @license lucide-react v0.378.0 - ISC
3
+ * @license lucide-react v0.294.0 - ISC
4
4
  *
5
5
  * This source code is licensed under the ISC license.
6
6
  * See the LICENSE file in the root directory of this source tree.
@@ -1 +1 @@
1
- import*as r from"react";import{P as e}from"./index-2ad64d02.js";import{jsx as a}from"react/jsx-runtime";var i=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"}),o=r.forwardRef((r,o)=>a(e.span,{...r,ref:o,style:{...i,...r.style}}));o.displayName="VisuallyHidden";var t=o;export{t as R,i as V};
1
+ import*as r from"react";import{P as e}from"./index-17323747.js";import{jsx as a}from"react/jsx-runtime";var i=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"}),o=r.forwardRef((r,o)=>a(e.span,{...r,ref:o,style:{...i,...r.style}}));o.displayName="VisuallyHidden";var t=o;export{t as R,i as V};
@@ -0,0 +1 @@
1
+ import*as e from"react";import{jsx as n}from"react/jsx-runtime";import*as r from"react-dom";import{c as t}from"./index-91a5b8d5.js";function o(r,t=[]){let o=[];const c=()=>{const n=o.map(n=>e.createContext(n));return function(t){const o=t?.[r]||n;return e.useMemo(()=>({[`__scope${r}`]:{...t,[r]:o}}),[t,o])}};return c.scopeName=r,[function(t,i){const c=e.createContext(i),s=o.length;o=[...o,i];const u=t=>{const{scope:o,children:i,...u}=t,a=o?.[r]?.[s]||c,l=e.useMemo(()=>u,Object.values(u));return n(a.Provider,{value:l,children:i})};return u.displayName=t+"Provider",[u,function(n,o){const u=o?.[r]?.[s]||c,a=e.useContext(u);if(a)return a;if(void 0!==i)return i;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},i(c,...t)]}function i(...n){const r=n[0];if(1===n.length)return r;const t=()=>{const t=n.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(n){const o=t.reduce((e,{useScope:r,scopeName:t})=>({...e,...r(n)[`__scope${t}`]}),{});return e.useMemo(()=>({[`__scope${r.scopeName}`]:o}),[o])}};return t.scopeName=r.scopeName,t}function c(e,n,{checkForDefaultPrevented:r=!0}={}){return function(t){if(e?.(t),!1===r||!t.defaultPrevented)return n?.(t)}}var s=globalThis?.document?e.useLayoutEffect:()=>{};function u(n){const r=e.forwardRef((n,r)=>{const{children:o,...i}=n;if(e.isValidElement(o)){const n=function(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning;if(r)return e.ref;if(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(o),c=function(e,n){const r={...n};for(const t in n){const o=e[t],i=n[t];/^on[A-Z]/.test(t)?o&&i?r[t]=(...e)=>{const n=i(...e);return o(...e),n}:o&&(r[t]=o):"style"===t?r[t]={...o,...i}:"className"===t&&(r[t]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}(i,o.props);return o.type!==e.Fragment&&(c.ref=r?t(r,n):n),e.cloneElement(o,c)}return e.Children.count(o)>1?e.Children.only(null):null});return r.displayName=`${n}.SlotClone`,r}var a=Symbol("radix.slottable");function l(n){return e.isValidElement(n)&&"function"==typeof n.type&&"__radixId"in n.type&&n.type.__radixId===a}var f=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((r,t)=>{const o=function(r){const t=u(r),o=e.forwardRef((r,o)=>{const{children:i,...c}=r,s=e.Children.toArray(i),u=s.find(l);if(u){const r=u.props.children,i=s.map(n=>n===u?e.Children.count(r)>1?e.Children.only(null):e.isValidElement(r)?r.props.children:null:n);return n(t,{...c,ref:o,children:e.isValidElement(r)?e.cloneElement(r,void 0,i):null})}return n(t,{...c,ref:o,children:i})});return o.displayName=`${r}.Slot`,o}(`Primitive.${t}`),i=e.forwardRef((e,r)=>{const{asChild:i,...c}=e,s=i?o:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),n(s,{...c,ref:r})});return i.displayName=`Primitive.${t}`,{...r,[t]:i}},{});function d(e,n){e&&r.flushSync(()=>e.dispatchEvent(n))}export{f as P,c as a,o as c,d,s as u};