@radui/ui 0.0.37 → 0.0.38

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.
@@ -1 +1 @@
1
- 'use client';import e,{createContext as n,useRef as t,useState as r,useId as i,useEffect as o,forwardRef as a,useContext as l,useCallback as c}from"react";function u(e){var n,t,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(n=0;n<i;n++)e[n]&&(t=u(e[n]))&&(r&&(r+=" "),r+=t)}else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function d(){for(var e,n,t=0,r="",i=arguments.length;t<i;t++)(e=arguments[t])&&(n=u(e))&&(r&&(r+=" "),r+=n);return r}var s=n({rootClass:"",activeItems:[],setActiveItems:function(){},accordionRef:void 0,transitionDuration:0,transitionTimingFunction:"ease-out",openMultiple:!1}),f=function(){return f=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e},f.apply(this,arguments)};function v(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(t[r[i]]=e[r[i]])}return t}function m(e,n,t){if(t||2===arguments.length)for(var r,i=0,o=n.length;i<o;i++)!r&&i in n||(r||(r=Array.prototype.slice.call(n,0,i)),r[i]=n[i]);return e.concat(r||Array.prototype.slice.call(n))}"function"==typeof SuppressedError&&SuppressedError;var p=["div","span","button","input"].reduce((function(n,t){return n[t]=function(n){var t=e.forwardRef((function(t,r){var i=t.asChild,o=void 0!==i&&i,a=t.children,l=v(t,["asChild","children"]);if(o){var c=e.Children.toArray(a);if(1!==c.length||!e.isValidElement(c[0]))return console.warn("Primitive.".concat(n,": asChild prop requires exactly one valid child element.")),e.createElement(n,f(f({},l),{ref:r}),a);var u=c[0];return e.cloneElement(u,f(f(f({},l),u.props),r?{ref:function(e){"function"==typeof r?r(e):r&&(r.current=e);var n=u.ref;"function"==typeof n?n(e):n&&(n.current=e)}}:{}))}return e.createElement(n,f(f({},l),{ref:r}),a)}));return t.displayName="Primitive.".concat(n),t}(t),n}),{}),h=n({orientation:"horizontal",loop:!0}),b=n({focusedItemId:null,setFocusedItemId:function(){},focusItems:[],setFocusItems:function(){},addFocusItem:function(){},groupRef:null}),g=a((function(n,t){var r,a=n.children,c=n["aria-label"],u=n["aria-labelledby"],d=v(n,["children","aria-label","aria-labelledby"]),s=i(),m=l(b),g=m.focusedItemId,C=m.setFocusedItemId,y=m.addFocusItem,I=m.focusItems,E=m.groupRef,w=l(h),A=w.orientation,F=w.loop,D=e.Children.toArray(a)[0],O=!0===(null===(r=null==D?void 0:D.props)||void 0===r?void 0:r.disabled),N=g===s;o((function(){I.includes(s)||y(s)}),[I,g,s,y]);var P=function(e){if(E&&E.current){C(e);var n=CSS.escape(e),t=E.current.querySelector("#".concat(n));t&&t.focus()}},R=function(e,n){for(var t,r=e,i=0;i<I.length;i++){if(r+=n,F)r<0&&(r=I.length-1),r>=I.length&&(r=0);else if(r<0||r>=I.length)return-1;var o=I[r],a=null===(t=null==E?void 0:E.current)||void 0===t?void 0:t.querySelector("#".concat(CSS.escape(o)));if(a)if(!("true"===a.getAttribute("data-child-disabled")))return r}return-1},T=function(){var e=I.indexOf(s),n=R(e,-1);-1!==n&&P(I[n])},x=function(){var e=I.indexOf(s),n=R(e,1);-1!==n&&P(I[n])};return e.createElement(p.button,f({asChild:!0,onFocus:function(e){e.preventDefault(),O||C(s)},tabIndex:!O&&N?0:-1,ref:t,id:s,onKeyDown:function(e){if(!O)switch(e.key){case"ArrowUp":e.preventDefault(),"vertical"===A&&T();break;case"ArrowLeft":e.preventDefault(),"horizontal"===A&&T();break;case"ArrowDown":e.preventDefault(),"vertical"===A&&x();break;case"ArrowRight":e.preventDefault(),"horizontal"===A&&x();break;case"Home":e.preventDefault(),function(){if(I.length>0){var e=R(-1,1);-1!==e&&P(I[e])}}();break;case"End":e.preventDefault(),function(){if(I.length>0){var e=R(I.length,-1);-1!==e&&P(I[e])}}()}},"data-child-disabled":O,role:"option","aria-selected":N,"aria-disabled":O,"aria-label":c,"aria-labelledby":u},d),a)}));g.displayName="RovingFocusItem";var C={Root:function(n){var t=n.children,r=n.orientation,i=void 0===r?"horizontal":r,o=n.loop,a=void 0===o||o,l=n["aria-label"],c=n["aria-labelledby"],u=v(n,["children","orientation","loop","aria-label","aria-labelledby"]),d={orientation:i,loop:a};return e.createElement(h.Provider,{value:d},e.createElement(p.div,f({role:"listbox","aria-orientation":i,"aria-label":l,"aria-labelledby":c},u),t))},Group:function(n){var a=n.children,l=n["aria-label"],c=n["aria-labelledby"],u=v(n,["children","aria-label","aria-labelledby"]),d=t(null),s=r([]),h=s[0],g=s[1],C=r(null),y=C[0],I=C[1],E=i();o((function(){!y&&h.length>0&&I(h[0])}),[h,y]);var w={focusedItemId:y,setFocusedItemId:I,focusItems:h,setFocusItems:g,addFocusItem:function(e){g((function(n){return m(m([],n,!0),[e],!1)}))},groupRef:d};return e.createElement(b.Provider,{value:w},e.createElement(p.div,f({id:E,ref:d,role:"group","aria-label":l,"aria-labelledby":c},u),a))},Item:g},y=n({itemValue:0,setItemValue:function(){},disabled:!1}),I=n(void 0),E=function(){var e=l(I);if(!e)throw new Error("Collapsible compound components must be used within a CollapsiblePrimitive.Root component");return e};var w=e.forwardRef((function(n,i){var a=n.children,l=n.className;n.asChild;var c=v(n,["children","className","asChild"]),u=E(),d=u.open,s=u.contentId,m=u.transitionDuration,h=u.transitionTimingFunction,b=t(null),g=i||b,C=r(d?void 0:0),y=C[0],I=C[1],w=r(d),A=w[0],F=w[1],D=t(),O=t();return o((function(){d&&F(!0)}),[d]),o((function(){if(D.current&&clearTimeout(D.current),O.current&&cancelAnimationFrame(O.current),b.current){if(0===m)return I(d?void 0:0),void(d||setTimeout((function(){return F(!1)}),0));if(d)I(0),O.current=requestAnimationFrame((function(){var e;null===(e=b.current)||void 0===e||e.offsetHeight,O.current=requestAnimationFrame((function(){if(b.current){var e=b.current.scrollHeight;I(e)}}))})),D.current=setTimeout((function(){I(void 0)}),m);else{var e=b.current.scrollHeight;I(e),O.current=requestAnimationFrame((function(){var e;null===(e=b.current)||void 0===e||e.offsetHeight,O.current=requestAnimationFrame((function(){I(0)}))})),D.current=setTimeout((function(){F(!1)}),m)}return function(){D.current&&clearTimeout(D.current),O.current&&cancelAnimationFrame(O.current)}}}),[d,m]),A||d?e.createElement(p.div,f({id:s,ref:g,"aria-hidden":!d,"data-state":d?"open":"closed",className:l,style:f({height:void 0!==y?"".concat(y,"px"):void 0,overflow:"hidden"},m>0?{transition:"height ".concat(m,"ms ").concat(h)}:{})},c),a):null}));w.displayName="CollapsiblePrimitiveContent";var A=e.forwardRef((function(n,t){var r=n.children,i=n.asChild,o=void 0!==i&&i,a=v(n,["children","asChild"]),l=E(),c=l.open,u=l.onOpenChange,d=l.disabled,s=l.contentId;return e.createElement(p.button,f({"aria-controls":s,"aria-expanded":c,"data-state":c?"open":"closed","data-disabled":d?"true":void 0,ref:t,onClick:function(e){var n;null===(n=a.onClick)||void 0===n||n.call(a,e),d||u(!c)},asChild:o},a),r)}));A.displayName="CollapsiblePrimitiveTrigger";var F=function(){return console.warn("Direct usage of CollapsiblePrimitive is not supported. Please use CollapsiblePrimitive.Root, CollapsiblePrimitive.Content, etc. instead."),null};F.Root=function(n){var a=n.children,l=n.defaultOpen,u=void 0!==l&&l,d=n.open,s=n.onOpenChange,m=n.disabled,h=void 0!==m&&m,b=n.transitionDuration,g=void 0===b?300:b,C=n.transitionTimingFunction,y=void 0===C?"linear":C,E=v(n,["children","defaultOpen","open","onOpenChange","disabled","transitionDuration","transitionTimingFunction"]),w=i(),A=function(e,n,i){var a=r(n),l=a[0],u=a[1],d=void 0!==e,s=d?e:l,f=t(d),v=t(e);o((function(){"production"!==process.env.NODE_ENV&&(f.current!==d&&console.warn("Component changed from ".concat(f.current?"controlled":"uncontrolled"," to ").concat(d?"controlled":"uncontrolled",".")),f.current=d)}),[d]),o((function(){"production"!==process.env.NODE_ENV&&d&&!i&&e!==v.current&&console.warn("A component is changing a controlled value without an onChange handler. This will render a controlled component as uncontrolled."),v.current=e}),[e,d,i]);var m=c((function(e){var n="function"==typeof e?e(s):e;d||u(n),i&&i(n)}),[d,i,s]);return[s,m]}(d,u,s),F=A[0],D=A[1];return e.createElement(I.Provider,{value:{open:F,onOpenChange:function(e){h||D(e)},disabled:h,contentId:w,transitionDuration:g,transitionTimingFunction:y}},e.createElement(p.div,f({},E,{"data-state":F?"open":"closed","data-disabled":h?"":void 0}),a))},F.Content=w,F.Trigger=A;var D=function(){return console.warn("Direct usage of Accordion is not supported. Please use Accordion.Root, Accordion.Item, etc. instead."),null};D.Root=function(n){var i=n.children,o=n.orientation,a=void 0===o?"vertical":o,l=n.asChild,c=n.transitionDuration,u=void 0===c?0:c,f=n.transitionTimingFunction,v=void 0===f?"linear":f,m=n.customRootClass,h=n.loop,b=void 0===h||h,g=n.openMultiple,y=void 0!==g&&g,I=t(null),E=function(e,n){if(void 0===e&&(e=""),e)return e;var t=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(t)}(m,"Accordion"),w=r([]),A=w[0],F=w[1];return e.createElement(s.Provider,{value:{rootClass:E,activeItems:A,setActiveItems:F,accordionRef:I,transitionDuration:u,transitionTimingFunction:v,openMultiple:y}},e.createElement(C.Root,{orientation:a,loop:b},e.createElement(C.Group,null,e.createElement(p.div,{className:d("".concat(E,"-root")),ref:I,asChild:l},i))))},D.Item=function(n){var a=n.children,c=n.value,u=n.className,m=void 0===u?"":u,h=n.disabled,b=void 0!==h&&h;n.asChild;var g=v(n,["children","value","className","disabled","asChild"]),C=t(null),I=r(null!=c?c:0),E=I[0],w=I[1],A=l(s),D=A.rootClass,O=A.activeItems,N=A.transitionDuration,P=A.transitionTimingFunction,R=r(O.includes(E)),T=R[0],x=R[1];o((function(){x(O.includes(E))}),[O,E]);var S=i();return o((function(){void 0!==c&&c!==E&&w(c)}),[c]),e.createElement(y.Provider,{value:{itemValue:E,setItemValue:w,disabled:b}},e.createElement(F.Root,{open:T,disabled:b,transitionDuration:N,transitionTimingFunction:P,asChild:!0},e.createElement(p.div,f({ref:C,className:d("".concat(D,"-item"),m)},g,{id:"accordion-data-item-".concat(S),role:"region","data-state":T?"open":"closed"}),a)))},D.Header=function(n){var t=n.children,r=n.className,i=void 0===r?"":r,o=l(s).rootClass;return e.createElement("div",{className:d("".concat(o,"-header"),i)},t)},D.Trigger=function(n){var r=n.children,i=n.index,o=n.className,a=void 0===o?"":o,c=t(null),u=l(s),f=u.setActiveItems,v=u.rootClass,h=u.activeItems,b=u.openMultiple,g=l(y),I=g.itemValue,E=g.disabled;return e.createElement(C.Item,null,e.createElement(F.Trigger,{disabled:E,asChild:!0},e.createElement(p.button,{className:d("".concat(v,"-trigger"),a),ref:c,"aria-disabled":E,onClick:function(e){var n=h||[];b?n.includes(I)?f(n.filter((function(e){return e!==I}))):f(m(m([],n,!0),[I],!1)):n.includes(I)?f([]):f([I])},"aria-expanded":h.includes(I),"aria-controls":"content-".concat(i)},r)))},D.Content=function(n){var t=n.children,r=n.index,i=n.className,o=void 0===i?"":i,a=l(s),c=a.activeItems,u=a.rootClass,f=l(y).itemValue,v=c.includes(f);return v?e.createElement(F.Content,{asChild:!0,className:d("".concat(u,"-content"),o),id:"content-".concat(r),role:"region","aria-labelledby":"section-".concat(r),"aria-hidden":!v},t):null};export{D as default};
1
+ 'use client';import e,{createContext as n,useState as t,useRef as r,useEffect as i,useCallback as o,useId as a,forwardRef as l,useContext as c}from"react";function u(e){var n,t,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(n=0;n<i;n++)e[n]&&(t=u(e[n]))&&(r&&(r+=" "),r+=t)}else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function d(){for(var e,n,t=0,r="",i=arguments.length;t<i;t++)(e=arguments[t])&&(n=u(e))&&(r&&(r+=" "),r+=n);return r}var s=n({rootClass:"",activeItems:[],setActiveItems:function(){},accordionRef:void 0,transitionDuration:0,transitionTimingFunction:"ease-out",openMultiple:!1});function f(e,n,a){var l=t(n),c=l[0],u=l[1],d=void 0!==e,s=d?e:c,f=r(d),v=r(e);i((function(){"production"!==process.env.NODE_ENV&&(f.current!==d&&console.warn("Component changed from ".concat(f.current?"controlled":"uncontrolled"," to ").concat(d?"controlled":"uncontrolled",".")),f.current=d)}),[d]),i((function(){"production"!==process.env.NODE_ENV&&d&&!a&&e!==v.current&&console.warn("A component is changing a controlled value without an onChange handler. This will render a controlled component as uncontrolled."),v.current=e}),[e,d,a]);var m=o((function(e){var n="function"==typeof e?e(s):e;d||u(n),a&&a(n)}),[d,a,s]);return[s,m]}var v=function(){return v=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e},v.apply(this,arguments)};function m(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(t[r[i]]=e[r[i]])}return t}function p(e,n,t){if(t||2===arguments.length)for(var r,i=0,o=n.length;i<o;i++)!r&&i in n||(r||(r=Array.prototype.slice.call(n,0,i)),r[i]=n[i]);return e.concat(r||Array.prototype.slice.call(n))}"function"==typeof SuppressedError&&SuppressedError;var b=["div","span","button","input","a"].reduce((function(n,t){return n[t]=function(n){var t=e.forwardRef((function(t,r){var i=t.asChild,o=void 0!==i&&i,a=t.children,l=m(t,["asChild","children"]);if(o){var c=e.Children.toArray(a);if(1!==c.length||!e.isValidElement(c[0]))return console.warn("Primitive.".concat(n,": asChild prop requires exactly one valid child element.")),e.createElement(n,v(v({},l),{ref:r}),a);var u=c[0];return e.cloneElement(u,v(v(v({},l),u.props),r?{ref:function(e){"function"==typeof r?r(e):r&&(r.current=e);var n=u.ref;"function"==typeof n?n(e):n&&(n.current=e)}}:{}))}return e.createElement(n,v(v({},l),{ref:r}),a)}));return t.displayName="Primitive.".concat(n),t}(t),n}),{}),h=n({orientation:"horizontal",loop:!0,disableTabIndexing:!1}),g=n({focusedItemId:null,setFocusedItemId:function(){},focusItems:[],setFocusItems:function(){},addFocusItem:function(){},groupRef:null}),C=l((function(n,t){var r,o=n.children,l=n["aria-label"],u=n["aria-labelledby"],d=m(n,["children","aria-label","aria-labelledby"]),s=a(),f=c(g),p=f.focusedItemId,C=f.setFocusedItemId,y=f.addFocusItem,I=f.focusItems,E=f.groupRef,w=c(h),A=w.orientation,T=w.loop,F=w.disableTabIndexing,D=e.Children.toArray(o)[0],O=!0===(null===(r=null==D?void 0:D.props)||void 0===r?void 0:r.disabled),N=p===s,x=F||!O&&N?0:-1;i((function(){I.includes(s)||y(s)}),[I,p,s,y]);var P=function(e){if(E&&E.current){C(e);var n=CSS.escape(e),t=E.current.querySelector("#".concat(n));t&&t.focus()}},R=function(e,n){for(var t,r=e,i=0;i<I.length;i++){if(r+=n,T)r<0&&(r=I.length-1),r>=I.length&&(r=0);else if(r<0||r>=I.length)return-1;var o=I[r],a=null===(t=null==E?void 0:E.current)||void 0===t?void 0:t.querySelector("#".concat(CSS.escape(o)));if(a)if(!("true"===a.getAttribute("data-child-disabled")))return r}return-1},V=function(){var e=I.indexOf(s),n=R(e,-1);-1!==n&&P(I[n])},S=function(){var e=I.indexOf(s),n=R(e,1);-1!==n&&P(I[n])};return e.createElement(b.button,v({asChild:!0,onFocus:function(e){e.preventDefault(),O||C(s)},tabIndex:x,ref:t,id:s,onKeyDown:function(e){if(!O)switch(e.key){case"ArrowUp":e.preventDefault(),"vertical"===A&&V();break;case"ArrowLeft":e.preventDefault(),"horizontal"===A&&V();break;case"ArrowDown":e.preventDefault(),"vertical"===A&&S();break;case"ArrowRight":e.preventDefault(),"horizontal"===A&&S();break;case"Home":e.preventDefault(),function(){if(I.length>0){var e=R(-1,1);-1!==e&&P(I[e])}}();break;case"End":e.preventDefault(),function(){if(I.length>0){var e=R(I.length,-1);-1!==e&&P(I[e])}}()}},"data-child-disabled":O,role:"option","aria-selected":N,"aria-disabled":O,"aria-label":l,"aria-labelledby":u},d),o)}));C.displayName="RovingFocusItem";var y={Root:function(n){var t=n.children,r=n.orientation,i=void 0===r?"horizontal":r,o=n.loop,a=void 0===o||o,l=n["aria-label"],c=n["aria-labelledby"],u=n.disableTabIndexing,d=void 0!==u&&u,s=m(n,["children","orientation","loop","aria-label","aria-labelledby","disableTabIndexing"]),f={orientation:i,loop:a,disableTabIndexing:d};return e.createElement(h.Provider,{value:f},e.createElement(b.div,v({role:"listbox","aria-orientation":i,"aria-label":l,"aria-labelledby":c},s),t))},Group:function(n){var o=n.children,l=n["aria-label"],c=n["aria-labelledby"],u=m(n,["children","aria-label","aria-labelledby"]),d=r(null),s=t([]),f=s[0],h=s[1],C=t(null),y=C[0],I=C[1],E=a();i((function(){!y&&f.length>0&&I(f[0])}),[f,y]);var w={focusedItemId:y,setFocusedItemId:I,focusItems:f,setFocusItems:h,addFocusItem:function(e){h((function(n){return p(p([],n,!0),[e],!1)}))},groupRef:d};return e.createElement(g.Provider,{value:w},e.createElement(b.div,v({id:E,ref:d,role:"group","aria-label":l,"aria-labelledby":c},u),o))},Item:C},I=n({itemValue:0,setItemValue:function(){},disabled:!1}),E=n(void 0),w=function(){var e=c(E);if(!e)throw new Error("Collapsible compound components must be used within a CollapsiblePrimitive.Root component");return e},A=e.forwardRef((function(n,o){var a=n.children,l=n.className;n.asChild;var c=m(n,["children","className","asChild"]),u=w(),d=u.open,s=u.contentId,f=u.transitionDuration,p=u.transitionTimingFunction,h=r(null),g=o||h,C=t(d?void 0:0),y=C[0],I=C[1],E=t(d),A=E[0],T=E[1],F=r(),D=r();return i((function(){d&&T(!0)}),[d]),i((function(){if(F.current&&clearTimeout(F.current),D.current&&cancelAnimationFrame(D.current),h.current){if(0===f)return I(d?void 0:0),void(d||setTimeout((function(){return T(!1)}),0));if(d)I(0),D.current=requestAnimationFrame((function(){var e;null===(e=h.current)||void 0===e||e.offsetHeight,D.current=requestAnimationFrame((function(){if(h.current){var e=h.current.scrollHeight;I(e)}}))})),F.current=setTimeout((function(){I(void 0)}),f);else{var e=h.current.scrollHeight;I(e),D.current=requestAnimationFrame((function(){var e;null===(e=h.current)||void 0===e||e.offsetHeight,D.current=requestAnimationFrame((function(){I(0)}))})),F.current=setTimeout((function(){T(!1)}),f)}return function(){F.current&&clearTimeout(F.current),D.current&&cancelAnimationFrame(D.current)}}}),[d,f]),A||d?e.createElement(b.div,v({id:s,ref:g,"aria-hidden":!d,"data-state":d?"open":"closed",className:l,style:v({height:void 0!==y?"".concat(y,"px"):void 0,overflow:"hidden"},f>0?{transition:"height ".concat(f,"ms ").concat(p)}:{})},c),a):null}));A.displayName="CollapsiblePrimitiveContent";var T=e.forwardRef((function(n,t){var r=n.children,i=n.asChild,o=void 0!==i&&i,a=m(n,["children","asChild"]),l=w(),c=l.open,u=l.onOpenChange,d=l.disabled,s=l.contentId;return e.createElement(b.button,v({"aria-controls":s,"aria-expanded":c,"data-state":c?"open":"closed","data-disabled":d?"true":void 0,ref:t,onClick:function(e){var n;null===(n=a.onClick)||void 0===n||n.call(a,e),d||u(!c)},asChild:o},a),r)}));T.displayName="CollapsiblePrimitiveTrigger";var F=function(){return console.warn("Direct usage of CollapsiblePrimitive is not supported. Please use CollapsiblePrimitive.Root, CollapsiblePrimitive.Content, etc. instead."),null};F.Root=function(n){var t=n.children,r=n.defaultOpen,i=void 0!==r&&r,o=n.open,l=n.onOpenChange,c=n.disabled,u=void 0!==c&&c,d=n.transitionDuration,s=void 0===d?300:d,p=n.transitionTimingFunction,h=void 0===p?"linear":p,g=m(n,["children","defaultOpen","open","onOpenChange","disabled","transitionDuration","transitionTimingFunction"]),C=a(),y=f(o,i,l),I=y[0],w=y[1];return e.createElement(E.Provider,{value:{open:I,onOpenChange:function(e){u||w(e)},disabled:u,contentId:C,transitionDuration:s,transitionTimingFunction:h}},e.createElement(b.div,v({},g,{"data-state":I?"open":"closed","data-disabled":u?"":void 0}),t))},F.Content=A,F.Trigger=T;var D=function(){return console.warn("Direct usage of Accordion is not supported. Please use Accordion.Root, Accordion.Item, etc. instead."),null};D.Root=function(n){var t=n.children,i=n.orientation,o=void 0===i?"vertical":i,a=n.disableTabIndexing,l=void 0===a||a,c=n.asChild,u=n.transitionDuration,v=void 0===u?0:u,m=n.transitionTimingFunction,p=void 0===m?"linear":m,h=n.customRootClass,g=n.loop,C=void 0===g||g,I=n.openMultiple,E=void 0!==I&&I,w=n.value,A=n.defaultValue,T=void 0===A?[]:A,F=n.onValueChange,D=r(null),O=function(e,n){if(void 0===e&&(e=""),e)return e;var t=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(t)}(h,"Accordion"),N=f(void 0!==w?E?w:w.length>0?[w[0]]:[]:void 0,E?T:T.length>0?[T[0]]:[],F),x=N[0],P=N[1];return e.createElement(s.Provider,{value:{rootClass:O,activeItems:x,setActiveItems:P,accordionRef:D,transitionDuration:v,transitionTimingFunction:p,openMultiple:E}},e.createElement(y.Root,{orientation:o,loop:C,disableTabIndexing:l},e.createElement(y.Group,null,e.createElement(b.div,{className:d("".concat(O,"-root")),ref:D,asChild:c},t))))},D.Item=function(n){var o=n.children,l=n.value,u=n.className,f=void 0===u?"":u,p=n.disabled,h=void 0!==p&&p;n.asChild;var g=m(n,["children","value","className","disabled","asChild"]),C=r(null),y=t(null!=l?l:0),E=y[0],w=y[1],A=c(s),T=A.rootClass,D=A.activeItems,O=A.transitionDuration,N=A.transitionTimingFunction,x=t(D.includes(E)),P=x[0],R=x[1];i((function(){R(D.includes(E))}),[D,E]);var V=a();return i((function(){void 0!==l&&l!==E&&w(l)}),[l]),e.createElement(I.Provider,{value:{itemValue:E,setItemValue:w,disabled:h}},e.createElement(F.Root,{open:P,disabled:h,transitionDuration:O,transitionTimingFunction:N,asChild:!0},e.createElement(b.div,v({ref:C,className:d("".concat(T,"-item"),f)},g,{id:"accordion-data-item-".concat(V),role:"region","data-state":P?"open":"closed"}),o)))},D.Header=function(n){var t=n.children,r=n.className,i=void 0===r?"":r,o=c(s).rootClass;return e.createElement("div",{className:d("".concat(o,"-header"),i)},t)},D.Trigger=function(n){var t=n.children,i=n.index,o=n.className,a=void 0===o?"":o,l=r(null),u=c(s),f=u.setActiveItems,v=u.rootClass,m=u.activeItems,h=u.openMultiple,g=c(I),C=g.itemValue,E=g.disabled;return e.createElement(y.Item,null,e.createElement(F.Trigger,{disabled:E,asChild:!0},e.createElement(b.button,{className:d("".concat(v,"-trigger"),a),ref:l,"aria-disabled":E,onClick:function(e){var n=m||[];h?n.includes(C)?f(n.filter((function(e){return e!==C}))):f(p(p([],n,!0),[C],!1)):n.includes(C)?f([]):f([C])},"aria-expanded":m.includes(C),"aria-controls":"content-".concat(i)},t)))},D.Content=function(n){var t=n.children,r=n.index,i=n.className,o=void 0===i?"":i,a=c(s),l=a.activeItems,u=a.rootClass,f=c(I).itemValue,v=l.includes(f);return v?e.createElement(F.Content,{asChild:!0,className:d("".concat(u,"-content"),o),id:"content-".concat(r),role:"region","aria-labelledby":"section-".concat(r),"aria-hidden":!v},t):null};export{D as default};
@@ -2,4 +2,4 @@
2
2
  /*!
3
3
  * tabbable 6.2.0
4
4
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
5
- */var pe=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"].join(","),me="undefined"==typeof Element,ve=me?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,he=!me&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},ge=function e(t,n){var r;void 0===n&&(n=!0);var o=null==t||null===(r=t.getAttribute)||void 0===r?void 0:r.call(t,"inert");return""===o||"true"===o||n&&t&&e(t.parentNode)},ye=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var l=i.shift();if(!ge(l,!1))if("SLOT"===l.tagName){var u=l.assignedElements(),c=e(u.length?u:l.children,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:l,candidates:c})}else{ve.call(l,pe)&&r.filter(l)&&(n||!t.includes(l))&&o.push(l);var s=l.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(l),a=!ge(s,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(s&&a){var f=e(!0===s?l.children:s.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:l,candidates:f})}else i.unshift.apply(i,l.children)}}return o},we=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},be=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!we(e)?0:e.tabIndex},xe=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Ee=function(e){return"INPUT"===e.tagName},Re=function(e){return function(e){return Ee(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||he(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)},Ce=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},Oe=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=ve.call(e,"details>summary:first-of-type")?e.parentElement:e;if(ve.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return Ce(e)}else{if("function"==typeof r){for(var i=e;e;){var l=e.parentElement,u=he(e);if(l&&!l.shadowRoot&&!0===r(l))return Ce(e);e=e.assignedSlot?e.assignedSlot:l||u===e.ownerDocument?l:u.host}e=i}if(function(e){var t,n,r,o,i=e&&he(e),l=null===(t=i)||void 0===t?void 0:t.host,u=!1;if(i&&i!==e)for(u=!!(null!==(n=l)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(l)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!u&&l;){var c,s,a;u=!(null===(s=l=null===(c=i=he(l))||void 0===c?void 0:c.host)||void 0===s||null===(a=s.ownerDocument)||void 0===a||!a.contains(l))}return u}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},Le=function(e,t){return!(t.disabled||ge(t)||function(e){return Ee(e)&&"hidden"===e.type}(t)||Oe(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!ve.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},Se=function(e,t){return!(Re(t)||be(t)<0||!Le(e,t))},Ae=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},ke=function e(t){var n=[],r=[];return t.forEach((function(t,o){var i=!!t.scopeParent,l=i?t.scopeParent:t,u=function(e,t){var n=be(e);return n<0&&t&&!we(e)?0:n}(l,i),c=i?e(t.candidates):l;0===u?i?n.push.apply(n,c):n.push(l):r.push({documentOrder:o,tabIndex:u,item:t,isScope:i,content:c})})),r.sort(xe).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},Te=function(e,t){var n;return n=(t=t||{}).getShadowRoot?ye([e],t.includeContainer,{filter:Se.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Ae}):function(e,t,n){if(ge(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(pe));return t&&ve.call(e,pe)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,Se.bind(null,t)),ke(n)};function Pe(e,t,n){let{reference:r,floating:o}=e;const i=ue(t),l=ce(t),u=le(l),c=re(t),s="y"===i,a=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[u]/2-o[u]/2;let p;switch(c){case"top":p={x:a,y:r.y-o.height};break;case"bottom":p={x:a,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-o.width,y:f};break;default:p={x:r.x,y:r.y}}switch(oe(t)){case"start":p[l]-=d*(n&&s?-1:1);break;case"end":p[l]+=d*(n&&s?-1:1)}return p}async function Me(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:l,elements:u,strategy:c}=e,{boundary:s="clippingAncestors",rootBoundary:a="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=ne(t,e),m=fe(p),v=u[d?"floating"===f?"reference":"floating":f],h=de(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(v)))||n?v:v.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(u.floating)),boundary:s,rootBoundary:a,strategy:c})),g="floating"===f?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(u.floating)),w=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},b=de(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:g,offsetParent:y,strategy:c}):g);return{top:(h.top-b.top+m.top)/w.y,bottom:(b.bottom-h.bottom+m.bottom)/w.y,left:(h.left-b.left+m.left)/w.x,right:(b.right-h.right+m.right)/w.x}}function Ne(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function De(e){return $.some((t=>e[t]>=0))}function Ie(e){const t=k(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=x(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,u=G(n)!==i||G(r)!==l;return u&&(n=i,r=l),{width:n,height:r,$:u}}function Fe(e){return b(e)?e:e.contextElement}function We(e){const t=Fe(e);if(!x(t))return Q(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Ie(t);let l=(i?G(n.width):n.width)/r,u=(i?G(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),u&&Number.isFinite(u)||(u=1),{x:l,y:u}}const je=Q(0);function Be(e){const t=g(e);return S()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:je}function He(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Fe(e);let l=Q(1);t&&(r?b(r)&&(l=We(r)):l=We(e));const u=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==g(e))&&t}(i,n,r)?Be(i):Q(0);let c=(o.left+u.x)/l.x,s=(o.top+u.y)/l.y,a=o.width/l.x,f=o.height/l.y;if(i){const e=g(i),t=r&&b(r)?g(r):r;let n=e,o=D(n);for(;o&&r&&t!==n;){const e=We(o),t=o.getBoundingClientRect(),r=k(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,s*=e.y,a*=e.x,f*=e.y,c+=i,s+=l,n=g(o),o=D(n)}}return de({width:a,height:f,x:c,y:s})}function Ve(e,t){const n=T(e).scrollLeft;return t?t.left+n:He(y(e)).left+n}function _e(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:Ve(e,r)),y:r.top+t.scrollTop}}function qe(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=g(e),r=y(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,u=0,c=0;if(o){i=o.width,l=o.height;const e=S();(!e||e&&"fixed"===t)&&(u=o.offsetLeft,c=o.offsetTop)}return{width:i,height:l,x:u,y:c}}(e,n);else if("document"===t)r=function(e){const t=y(e),n=T(e),r=e.ownerDocument.body,o=Z(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Z(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+Ve(e);const u=-n.scrollTop;return"rtl"===k(r).direction&&(l+=Z(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:u}}(y(e));else if(b(t))r=function(e,t){const n=He(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=x(e)?We(e):Q(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Be(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return de(r)}function Ke(e,t){const n=P(e);return!(n===t||!b(n)||A(n))&&("fixed"===k(n).position||Ke(n,t))}function Xe(e,t,n){const r=x(t),o=y(t),i="fixed"===n,l=He(e,!0,i,t);let u={scrollLeft:0,scrollTop:0};const c=Q(0);if(r||!r&&!i)if(("body"!==h(t)||R(o))&&(u=T(t)),r){const e=He(t,!0,i,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else o&&(c.x=Ve(o));const s=!o||r||i?Q(0):_e(o,u);return{x:l.left+u.scrollLeft-c.x-s.x,y:l.top+u.scrollTop-c.y-s.y,width:l.width,height:l.height}}function Ue(e){return"static"===k(e).position}function Ye(e,t){if(!x(e)||"fixed"===k(e).position)return null;if(t)return t(e);let n=e.offsetParent;return y(e)===n&&(n=n.ownerDocument.body),n}function $e(e,t){const n=g(e);if(O(e))return n;if(!x(e)){let t=P(e);for(;t&&!A(t);){if(b(t)&&!Ue(t))return t;t=P(t)}return n}let r=Ye(e,t);for(;r&&C(r)&&Ue(r);)r=Ye(r,t);return r&&A(r)&&Ue(r)&&!L(r)?n:r||function(e){let t=P(e);for(;x(t)&&!A(t);){if(L(t))return t;if(O(t))return null;t=P(t)}return null}(e)||n}const ze={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,l=y(r),u=!!t&&O(t.floating);if(r===l||u&&i)return n;let c={scrollLeft:0,scrollTop:0},s=Q(1);const a=Q(0),f=x(r);if((f||!f&&!i)&&(("body"!==h(r)||R(l))&&(c=T(r)),x(r))){const e=He(r);s=We(r),a.x=e.x+r.clientLeft,a.y=e.y+r.clientTop}const d=!l||f||i?Q(0):_e(l,c,!0);return{width:n.width*s.x,height:n.height*s.y,x:n.x*s.x-c.scrollLeft*s.x+a.x+d.x,y:n.y*s.y-c.scrollTop*s.y+a.y+d.y}},getDocumentElement:y,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?O(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=N(e,[],!1).filter((e=>b(e)&&"body"!==h(e))),o=null;const i="fixed"===k(e).position;let l=i?P(e):e;for(;b(l)&&!A(l);){const t=k(l),n=L(l);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||R(l)&&!n&&Ke(e,l))?r=r.filter((e=>e!==l)):o=t,l=P(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],l=i[0],u=i.reduce(((e,n)=>{const r=qe(t,n,o);return e.top=Z(r.top,e.top),e.right=z(r.right,e.right),e.bottom=z(r.bottom,e.bottom),e.left=Z(r.left,e.left),e}),qe(t,l,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}},getOffsetParent:$e,getElementRects:async function(e){const t=this.getOffsetParent||$e,n=this.getDimensions,r=await n(e.floating);return{reference:Xe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Ie(e);return{width:t,height:n}},getScale:We,isElement:b,isRTL:function(e){return"rtl"===k(e).direction}},Ze=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:l,middlewareData:u}=t,c=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),l=re(n),u=oe(n),c="y"===ue(n),s=["left","top"].includes(l)?-1:1,a=i&&c?-1:1,f=ne(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:m}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return u&&"number"==typeof m&&(p="end"===u?-1*m:m),c?{x:p*a,y:d*s}:{x:d*s,y:p*a}}(t,e);return l===(null==(n=u.offset)?void 0:n.placement)&&null!=(r=u.arrow)&&r.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:l}}}}},Ge=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:u={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=ne(e,t),s={x:n,y:r},a=await Me(t,c),f=ue(re(o)),d=ie(f);let p=s[d],m=s[f];if(i){const e="y"===d?"bottom":"right";p=te(p+a["y"===d?"top":"left"],p,p-a[e])}if(l){const e="y"===f?"bottom":"right";m=te(m+a["y"===f?"top":"left"],m,m-a[e])}const v=u.fn({...t,[d]:p,[f]:m});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[d]:i,[f]:l}}}}}},Qe=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:l,initialPlacement:u,platform:c,elements:s}=t,{mainAxis:a=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:v=!0,...h}=ne(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const g=re(o),y=ue(u),w=re(u)===u,b=await(null==c.isRTL?void 0:c.isRTL(s.floating)),x=d||(w||!v?[ae(u)]:function(e){const t=ae(e);return[se(e),t,se(t)]}(u)),E="none"!==m;!d&&E&&x.push(...function(e,t,n,r){const o=oe(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:l;default:return[]}}(re(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(se)))),i}(u,v,m,b));const R=[u,...x],C=await Me(t,h),O=[];let L=(null==(r=i.flip)?void 0:r.overflows)||[];if(a&&O.push(C[g]),f){const e=function(e,t,n){void 0===n&&(n=!1);const r=oe(e),o=ce(e),i=le(o);let l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=ae(l)),[l,ae(l)]}(o,l,b);O.push(C[e[0]],C[e[1]])}if(L=[...L,{placement:o,overflows:O}],!O.every((e=>e<=0))){var S,A;const e=((null==(S=i.flip)?void 0:S.index)||0)+1,t=R[e];if(t)return{data:{index:e,overflows:L},reset:{placement:t}};let n=null==(A=L.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:A.placement;if(!n)switch(p){case"bestFit":{var k;const e=null==(k=L.filter((e=>{if(E){const t=ue(e.placement);return t===y||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:k[0];e&&(n=e);break}case"initialPlacement":n=u}if(o!==n)return{reset:{placement:n}}}return{}}}},Je=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=ne(e,t);switch(r){case"referenceHidden":{const e=Ne(await Me(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:De(e)}}}case"escaped":{const e=Ne(await Me(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:De(e)}}}default:return{}}}}},et=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:l,elements:u,middlewareData:c}=t,{element:s,padding:a=0}=ne(e,t)||{};if(null==s)return{};const f=fe(a),d={x:n,y:r},p=ce(o),m=le(p),v=await l.getDimensions(s),h="y"===p,g=h?"top":"left",y=h?"bottom":"right",w=h?"clientHeight":"clientWidth",b=i.reference[m]+i.reference[p]-d[p]-i.floating[m],x=d[p]-i.reference[p],E=await(null==l.getOffsetParent?void 0:l.getOffsetParent(s));let R=E?E[w]:0;R&&await(null==l.isElement?void 0:l.isElement(E))||(R=u.floating[w]||i.floating[m]);const C=b/2-x/2,O=R/2-v[m]/2-1,L=z(f[g],O),S=z(f[y],O),A=L,k=R-v[m]-S,T=R/2-v[m]/2+C,P=te(A,T,k),M=!c.arrow&&null!=oe(o)&&T!==P&&i.reference[m]/2-(T<A?L:S)-v[m]/2<0,N=M?T<A?T-A:T-k:0;return{[p]:d[p]+N,data:{[p]:P,centerOffset:T-P-N,...M&&{alignmentOffset:N}},reset:M}}}),tt=(e,t,n)=>{const r=new Map,o={platform:ze,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,u=i.filter(Boolean),c=await(null==l.isRTL?void 0:l.isRTL(t));let s=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:a,y:f}=Pe(s,r,c),d=r,p={},m=0;for(let n=0;n<u.length;n++){const{name:i,fn:v}=u[n],{x:h,y:g,data:y,reset:w}=await v({x:a,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:p,rects:s,platform:l,elements:{reference:e,floating:t}});a=null!=h?h:a,f=null!=g?g:f,p={...p,[i]:{...p[i],...y}},w&&m<=50&&(m++,"object"==typeof w&&(w.placement&&(d=w.placement),w.rects&&(s=!0===w.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):w.rects),({x:a,y:f}=Pe(s,d,c))),n=-1)}return{x:a,y:f,placement:d,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var nt="undefined"!=typeof document?r:o;function rt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!rt(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!rt(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function ot(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function it(e,t){const n=ot(e);return Math.round(t*n)/n}function lt(t){const n=e.useRef(t);return nt((()=>{n.current=t})),n}const ut=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?et({element:n.current,padding:r}).fn(t):{}:n?et({element:n,padding:r}).fn(t):{};var o}});function ct(t){return e.useMemo((()=>t.every((e=>null==e))?null:e=>{t.forEach((t=>{"function"==typeof t?t(e):null!=t&&(t.current=e)}))}),t)}const st={...e},at=st.useInsertionEffect||(e=>e());function ft(t){const n=e.useRef((()=>{if("production"!==process.env.NODE_ENV)throw new Error("Cannot call an event handler while rendering.")}));return at((()=>{n.current=t})),e.useCallback((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return null==n.current?void 0:n.current(...t)}),[])}var dt="undefined"!=typeof document?r:o;let pt=!1,mt=0;const vt=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+mt++;const ht=st.useId||function(){const[t,n]=e.useState((()=>pt?vt():void 0));return dt((()=>{null==t&&n(vt())}),[]),e.useEffect((()=>{pt=!0}),[]),t};let gt;"production"!==process.env.NODE_ENV&&(gt=new Set);const yt=e.forwardRef((function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i,shift:l}},width:u=14,height:a=7,tipRadius:f=0,strokeWidth:d=0,staticOffset:p,stroke:m,d:v,style:{transform:h,...g}={},...y}=t;"production"!==process.env.NODE_ENV&&(n||function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");var i;null!=(e=gt)&&e.has(o)||(null==(i=gt)||i.add(o),console.warn(o))}("The `ref` prop is required for `FloatingArrow`."));const w=ht(),[b,x]=e.useState(!1);if(dt((()=>{if(!o)return;"rtl"===k(o).direction&&x(!0)}),[o]),!o)return null;const[E,R]=r.split("-"),C="top"===E||"bottom"===E;let O=p;(C&&null!=l&&l.x||!C&&null!=l&&l.y)&&(O=null);const L=2*d,S=L/2,A=u/2*(f/-8+1),T=a/2*f/4,P=!!v,M=O&&"end"===R?"bottom":"top";let N=O&&"end"===R?"right":"left";O&&b&&(N="end"===R?"left":"right");const D=null!=(null==i?void 0:i.x)?O||i.x:"",I=null!=(null==i?void 0:i.y)?O||i.y:"",F=v||"M0,0 H"+u+" L"+(u-A)+","+(a-T)+" Q"+u/2+","+a+" "+A+","+(a-T)+" Z",W={top:P?"rotate(180deg)":"",left:P?"rotate(90deg)":"rotate(-90deg)",bottom:P?"":"rotate(180deg)",right:P?"rotate(-90deg)":"rotate(90deg)"}[E];return c("svg",{...y,"aria-hidden":!0,ref:n,width:P?u:u+L,height:u,viewBox:"0 0 "+u+" "+(a>u?a:u),style:{position:"absolute",pointerEvents:"none",[N]:D,[M]:I,[E]:C||P?"100%":"calc(100% - "+L/2+"px)",transform:[W,h].filter((e=>!!e)).join(" "),...g},children:[L>0&&s("path",{clipPath:"url(#"+w+")",fill:"none",stroke:m,strokeWidth:L+(v?0:1),d:F}),s("path",{stroke:L&&!v?y.fill:"none",d:F}),s("clipPath",{id:w,children:s("rect",{x:-S,y:S*(P?-1:1),width:u+L,height:u})})]})}));const wt=e.createContext(null),bt=e.createContext(null),xt=()=>{var t;return(null==(t=e.useContext(wt))?void 0:t.id)||null},Et=()=>e.useContext(bt);function Rt(e){return"data-floating-ui-"+e}function Ct(e){const t=i(e);return dt((()=>{t.current=e})),t}const Ot=Rt("safe-polygon");function Lt(e,t,n){return n&&!_(n)?0:"number"==typeof e?e:null==e?void 0:e[t]}let St=0;function At(e,t){void 0===t&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(St);const i=()=>null==e?void 0:e.focus({preventScroll:n});o?i():St=requestAnimationFrame(i)}function kt(e,t){var n;let r=[],o=null==(n=e.find((e=>e.id===t)))?void 0:n.parentId;for(;o;){const t=e.find((e=>e.id===o));o=null==t?void 0:t.parentId,t&&(r=r.concat(t))}return r}function Tt(e,t){let n=e.filter((e=>{var n;return e.parentId===t&&(null==(n=e.context)?void 0:n.open)})),r=n;for(;r.length;)r=e.filter((e=>{var t;return null==(t=r)?void 0:t.some((t=>{var n;return e.parentId===t.id&&(null==(n=e.context)?void 0:n.open)}))})),n=n.concat(r);return n}let Pt=new WeakMap,Mt=new WeakSet,Nt={},Dt=0;const It=e=>e&&(e.host||It(e.parentNode));function Ft(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,l=(u=t,e.map((e=>{if(u.contains(e))return e;const t=It(e);return u.contains(t)?t:null})).filter((e=>null!=e)));var u;const c=new Set,s=new Set(l),a=[];Nt[o]||(Nt[o]=new WeakMap);const f=Nt[o];return l.forEach((function e(t){if(!t||c.has(t))return;c.add(t),t.parentNode&&e(t.parentNode)})),function e(t){if(!t||s.has(t))return;[].forEach.call(t.children,(t=>{if("script"!==h(t))if(c.has(t))e(t);else{const e=i?t.getAttribute(i):null,n=null!==e&&"false"!==e,r=Pt.get(t)||0,l=i?r+1:r,u=(f.get(t)||0)+1;Pt.set(t,l),f.set(t,u),a.push(t),1===l&&n&&Mt.add(t),1===u&&t.setAttribute(o,""),!n&&i&&t.setAttribute(i,"true")}}))}(t),c.clear(),Dt++,()=>{a.forEach((e=>{const t=Pt.get(e)||0,n=i?t-1:t,r=(f.get(e)||0)-1;Pt.set(e,n),f.set(e,r),n||(!Mt.has(e)&&i&&e.removeAttribute(i),Mt.delete(e)),r||e.removeAttribute(o)})),Dt--,Dt||(Pt=new WeakMap,Pt=new WeakMap,Mt=new WeakSet,Nt={})}}function Wt(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=q(e[0]).body;return Ft(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const jt=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Bt(e,t){const n=Te(e,jt());"prev"===t&&n.reverse();const r=n.indexOf(I(q(e)));return n.slice(r+1)[0]}function Ht(){return Bt(document.body,"next")}function Vt(){return Bt(document.body,"prev")}function _t(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!F(n,r)}function qt(e){Te(e,jt()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function Kt(e){e.querySelectorAll("[data-tabindex]").forEach((e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")}))}const Xt={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};function Ut(e){"Tab"===e.key&&(e.target,clearTimeout(undefined))}const Yt=e.forwardRef((function(t,n){const[r,o]=e.useState();dt((()=>(H()&&o("button"),document.addEventListener("keydown",Ut),()=>{document.removeEventListener("keydown",Ut)})),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":!r||void 0,[Rt("focus-guard")]:"",style:Xt};return s("span",{...t,...i})})),$t=e.createContext(null),zt=Rt("portal");const Zt=()=>e.useContext($t),Gt="data-floating-ui-focusable";function Qt(e){return e?e.hasAttribute(Gt)?e:e.querySelector("["+Gt+"]")||e:null}let Jt=[];function en(e){Jt=Jt.filter((e=>e.isConnected)),e&&"body"!==h(e)&&(Jt.push(e),Jt.length>20&&(Jt=Jt.slice(-20)))}function tn(){return Jt.slice().reverse().find((e=>e.isConnected))}function nn(e){const t=jt();return function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==ve.call(e,pe)&&Se(t,e)}(e,t)?e:Te(e,t)[0]||e}const rn=e.forwardRef((function(e,t){return s("button",{...e,type:"button",ref:t,tabIndex:-1,style:Xt})}));let on=0;let ln=()=>{};const un=e.forwardRef((function(e,t){const{lockScroll:n=!1,...r}=e;return dt((()=>{if(n)return on++,1===on&&(ln=function(){const e=/iP(hone|ad|od)|iOS/.test(W()),t=document.body.style,n=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",r=window.innerWidth-document.documentElement.clientWidth,o=t.left?parseFloat(t.left):window.scrollX,i=t.top?parseFloat(t.top):window.scrollY;if(t.overflow="hidden",r&&(t[n]=r+"px"),e){var l,u;const e=(null==(l=window.visualViewport)?void 0:l.offsetLeft)||0,n=(null==(u=window.visualViewport)?void 0:u.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(i-Math.floor(n))+"px",left:-(o-Math.floor(e))+"px",right:"0"})}return()=>{Object.assign(t,{overflow:"",[n]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(o,i))}}()),()=>{on--,0===on&&ln()}}),[n]),s("div",{ref:t,...r,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...r.style}})})),cn={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},sn={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},an=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function fn(t){const{open:n=!1,onOpenChange:r,elements:o}=t,i=ht(),l=e.useRef({}),[u]=e.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter((e=>e!==n)))||[])}}}())),c=null!=xt();if("production"!==process.env.NODE_ENV){const e=o.reference;e&&!b(e)&&function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");var i;null!=(e=gt)&&e.has(o)||(null==(i=gt)||i.add(o),console.error(o))}("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[s,a]=e.useState(o.reference),f=ft(((e,t,n)=>{l.current.openEvent=e?t:void 0,u.emit("openchange",{open:e,event:t,reason:n,nested:c}),null==r||r(e,t,n)})),d=e.useMemo((()=>({setPositionReference:a})),[]),p=e.useMemo((()=>({reference:s||o.reference||null,floating:o.floating||null,domReference:o.reference})),[s,o.reference,o.floating]);return e.useMemo((()=>({dataRef:l,open:n,onOpenChange:f,elements:p,events:u,floatingId:i,refs:d})),[n,f,p,u,i,d])}const dn="active",pn="selected";function mn(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[dn]:t,[pn]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,[Gt]:""},...i,...t.map((t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r})).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[n,i]=t;var l;o&&[dn,pn].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(l=r.get(n))||l.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=r.get(n))?void 0:e.map((e=>e(...o))).find((e=>void 0!==e))})):e[n]=i)})),e):e),{})}}const vn=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);var hn={Portal:function(t){const{children:n,id:r,root:o,preserveTabOrder:i=!0}=t,l=function(t){void 0===t&&(t={});const{id:n,root:r}=t,o=ht(),i=Zt(),[l,u]=e.useState(null),c=e.useRef(null);return dt((()=>()=>{null==l||l.remove(),queueMicrotask((()=>{c.current=null}))}),[l]),dt((()=>{if(!o)return;if(c.current)return;const e=n?document.getElementById(n):null;if(!e)return;const t=document.createElement("div");t.id=o,t.setAttribute(zt,""),e.appendChild(t),c.current=t,u(t)}),[n,o]),dt((()=>{if(null===r)return;if(!o)return;if(c.current)return;let e=r||(null==i?void 0:i.portalNode);e&&!b(e)&&(e=e.current),e=e||document.body;let t=null;n&&(t=document.createElement("div"),t.id=n,e.appendChild(t));const l=document.createElement("div");l.id=o,l.setAttribute(zt,""),e=t||e,e.appendChild(l),c.current=l,u(l)}),[n,r,o,i]),l}({id:r,root:o}),[u,a]=e.useState(null),d=e.useRef(null),p=e.useRef(null),m=e.useRef(null),v=e.useRef(null),h=null==u?void 0:u.modal,g=null==u?void 0:u.open,y=!!u&&!u.modal&&u.open&&i&&!(!o&&!l);return e.useEffect((()=>{if(l&&i&&!h)return l.addEventListener("focusin",e,!0),l.addEventListener("focusout",e,!0),()=>{l.removeEventListener("focusin",e,!0),l.removeEventListener("focusout",e,!0)};function e(e){if(l&&_t(e)){("focusin"===e.type?Kt:qt)(l)}}}),[l,i,h]),e.useEffect((()=>{l&&(g||Kt(l))}),[g,l]),c($t.Provider,{value:e.useMemo((()=>({preserveTabOrder:i,beforeOutsideRef:d,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:v,portalNode:l,setFocusManagerState:a})),[i,l]),children:[y&&l&&s(Yt,{"data-type":"outside",ref:d,onFocus:e=>{if(_t(e,l)){var t;null==(t=m.current)||t.focus()}else{const e=Vt()||(null==u?void 0:u.domReference);null==e||e.focus()}}}),y&&l&&s("span",{"aria-owns":l.id,style:Xt}),l&&f.createPortal(n,l),y&&l&&s(Yt,{"data-type":"outside",ref:p,onFocus:e=>{if(_t(e,l)){var t;null==(t=v.current)||t.focus()}else{const t=Ht()||(null==u?void 0:u.domReference);null==t||t.focus(),(null==u?void 0:u.closeOnFocusOut)&&(null==u||u.onOpenChange(!1,e.nativeEvent,"focus-out"))}}})]})},Overlay:un,FocusManager:function(t){const{context:n,children:r,disabled:o=!1,order:i=["content"],guards:l=!0,initialFocus:u=0,returnFocus:f=!0,restoreFocus:d=!1,modal:p=!0,visuallyHiddenDismiss:m=!1,closeOnFocusOut:v=!0,outsideElementsInert:h=!1}=t,{open:g,onOpenChange:y,events:w,dataRef:b,elements:{domReference:E,floating:R}}=n,C=ft((()=>{var e;return null==(e=b.current.floatingContext)?void 0:e.nodeId})),O="number"==typeof u&&u<0,L=!!(S=E)&&"combobox"===S.getAttribute("role")&&U(S)&&O;var S;const A="undefined"!=typeof HTMLElement&&"inert"in HTMLElement.prototype,k=!A||l,T=!k||A&&h,P=Ct(i),M=Ct(u),N=Ct(f),D=Et(),W=Zt(),j=e.useRef(null),H=e.useRef(null),_=e.useRef(!1),K=e.useRef(!1),$=e.useRef(-1),z=null!=W,Z=Qt(R),G=ft((function(e){return void 0===e&&(e=Z),e?Te(e,jt()):[]})),Q=ft((e=>{const t=G(e);return P.current.map((e=>E&&"reference"===e?E:Z&&"floating"===e?Z:t)).filter(Boolean).flat()}));e.useEffect((()=>{if(o)return;if(!p)return;function e(e){if("Tab"===e.key){F(Z,I(q(Z)))&&0===G().length&&!L&&Y(e);const t=Q(),n=X(e);"reference"===P.current[0]&&n===E&&(Y(e),e.shiftKey?At(t[t.length-1]):At(t[1])),"floating"===P.current[1]&&n===Z&&e.shiftKey&&(Y(e),At(t[0]))}}const t=q(Z);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}}),[o,E,Z,p,P,L,G,Q]),e.useEffect((()=>{if(!o&&R)return R.addEventListener("focusin",e),()=>{R.removeEventListener("focusin",e)};function e(e){const t=X(e),n=G().indexOf(t);-1!==n&&($.current=n)}}),[o,R,G]),e.useEffect((()=>{if(!o&&v)return R&&x(E)?(E.addEventListener("focusout",t),E.addEventListener("pointerdown",e),R.addEventListener("focusout",t),()=>{E.removeEventListener("focusout",t),E.removeEventListener("pointerdown",e),R.removeEventListener("focusout",t)}):void 0;function e(){K.current=!0,setTimeout((()=>{K.current=!1}))}function t(e){const t=e.relatedTarget;queueMicrotask((()=>{const n=C(),r=!(F(E,t)||F(R,t)||F(t,R)||F(null==W?void 0:W.portalNode,t)||null!=t&&t.hasAttribute(Rt("focus-guard"))||D&&(Tt(D.nodesRef.current,n).find((e=>{var n,r;return F(null==(n=e.context)?void 0:n.elements.floating,t)||F(null==(r=e.context)?void 0:r.elements.domReference,t)}))||kt(D.nodesRef.current,n).find((e=>{var n,r,o;return[null==(n=e.context)?void 0:n.elements.floating,Qt(null==(r=e.context)?void 0:r.elements.floating)].includes(t)||(null==(o=e.context)?void 0:o.elements.domReference)===t}))));if(d&&r&&I(q(Z))===q(Z).body){x(Z)&&Z.focus();const e=$.current,t=G(),n=t[e]||t[t.length-1]||Z;x(n)&&n.focus()}!L&&p||!t||!r||K.current||t===tn()||(_.current=!0,y(!1,e,"focus-out"))}))}}),[o,E,R,Z,p,D,W,y,v,d,G,L,C]);const J=e.useRef(null),ee=e.useRef(null),te=ct([J,null==W?void 0:W.beforeInsideRef]),ne=ct([ee,null==W?void 0:W.afterInsideRef]);function re(e){return!o&&m&&p?s(rn,{ref:"start"===e?j:H,onClick:e=>y(!1,e.nativeEvent),children:"string"==typeof m?m:"Dismiss"}):null}e.useEffect((()=>{var e;if(o)return;if(!R)return;const t=Array.from((null==W||null==(e=W.portalNode)?void 0:e.querySelectorAll("["+Rt("portal")+"]"))||[]),n=D&&!p?kt(null==D?void 0:D.nodesRef.current,C()).map((e=>{var t;return null==(t=e.context)?void 0:t.elements.floating})):[],r=[R,...t,...n,j.current,H.current,J.current,ee.current,null==W?void 0:W.beforeOutsideRef.current,null==W?void 0:W.afterOutsideRef.current,P.current.includes("reference")||L?E:null].filter((e=>null!=e)),i=p||L?Wt(r,!T,T):Wt(r);return()=>{i()}}),[o,E,R,p,P,W,L,k,T,D,C]),dt((()=>{if(o||!x(Z))return;const e=I(q(Z));queueMicrotask((()=>{const t=Q(Z),n=M.current,r=("number"==typeof n?t[n]:n.current)||Z,o=F(Z,e);O||o||!g||At(r,{preventScroll:r===Z})}))}),[o,g,Z,O,Q,M]),dt((()=>{if(o||!Z)return;let e=!1;const t=q(Z),n=I(t);let r=b.current.openEvent;function i(t){let{open:n,reason:o,event:i,nested:l}=t;n&&(r=i),"escape-key"===o&&E&&en(E),["hover","safe-polygon"].includes(o)&&"mouseleave"===i.type&&(_.current=!0),"outside-press"===o&&(l?(_.current=!1,e=!0):_.current=!(function(e){return!(0!==e.mozInputSource||!e.isTrusted)||(V()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}(i)||B(i)))}en(n),w.on("openchange",i);const l=t.createElement("span");return l.setAttribute("tabindex","-1"),l.setAttribute("aria-hidden","true"),Object.assign(l.style,Xt),z&&E&&E.insertAdjacentElement("afterend",l),()=>{w.off("openchange",i);const n=I(t),o=F(R,n)||D&&Tt(D.nodesRef.current,C()).some((e=>{var t;return F(null==(t=e.context)?void 0:t.elements.floating,n)}));(o||r&&["click","mousedown"].includes(r.type))&&E&&en(E);const u="boolean"==typeof N.current?tn()||l:N.current.current||l;queueMicrotask((()=>{const r=nn(u);N.current&&!_.current&&x(r)&&(r===n||n===t.body||o)&&r.focus({preventScroll:e}),l.remove()}))}}),[o,R,Z,N,b,w,D,z,E,C]),e.useEffect((()=>{queueMicrotask((()=>{_.current=!1}))}),[o]),dt((()=>{if(!o&&W)return W.setFocusManagerState({modal:p,closeOnFocusOut:v,open:g,onOpenChange:y,domReference:E}),()=>{W.setFocusManagerState(null)}}),[o,W,p,g,y,v,E]),dt((()=>{if(o)return;if(!Z)return;if("function"!=typeof MutationObserver)return;if(O)return;const e=()=>{const e=Z.getAttribute("tabindex"),t=G(),n=I(q(R)),r=t.indexOf(n);-1!==r&&($.current=r),P.current.includes("floating")||n!==E&&0===t.length?"0"!==e&&Z.setAttribute("tabindex","0"):"-1"!==e&&Z.setAttribute("tabindex","-1")};e();const t=new MutationObserver(e);return t.observe(Z,{childList:!0,subtree:!0,attributes:!0}),()=>{t.disconnect()}}),[o,R,Z,E,P,G,O]);const oe=!o&&k&&(!p||!L)&&(z||p);return c(a,{children:[oe&&s(Yt,{"data-type":"inside",ref:te,onFocus:e=>{if(p){const e=Q();At("reference"===i[0]?e[0]:e[e.length-1])}else if(null!=W&&W.preserveTabOrder&&W.portalNode)if(_.current=!1,_t(e,W.portalNode)){const e=Ht()||E;null==e||e.focus()}else{var t;null==(t=W.beforeOutsideRef.current)||t.focus()}}}),!L&&re("start"),r,re("end"),oe&&s(Yt,{"data-type":"inside",ref:ne,onFocus:e=>{if(p)At(Q()[0]);else if(null!=W&&W.preserveTabOrder&&W.portalNode)if(v&&(_.current=!0),_t(e,W.portalNode)){const e=Vt()||E;null==e||e.focus()}else{var t;null==(t=W.afterOutsideRef.current)||t.focus()}}})]})},useFloating:function(t){void 0===t&&(t={});const{nodeId:n}=t,r=fn({...t,elements:{reference:null,floating:null,...t.elements}}),o=t.rootContext||r,i=o.elements,[l,u]=e.useState(null),[c,s]=e.useState(null),a=(null==i?void 0:i.domReference)||l,d=e.useRef(null),p=Et();dt((()=>{a&&(d.current=a)}),[a]);const m=function(t){void 0===t&&(t={});const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:i,elements:{reference:l,floating:u}={},transform:c=!0,whileElementsMounted:s,open:a}=t,[d,p]=e.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[m,v]=e.useState(o);rt(m,o)||v(o);const[h,g]=e.useState(null),[y,w]=e.useState(null),b=e.useCallback((e=>{e!==C.current&&(C.current=e,g(e))}),[]),x=e.useCallback((e=>{e!==O.current&&(O.current=e,w(e))}),[]),E=l||h,R=u||y,C=e.useRef(null),O=e.useRef(null),L=e.useRef(d),S=null!=s,A=lt(s),k=lt(i),T=lt(a),P=e.useCallback((()=>{if(!C.current||!O.current)return;const e={placement:n,strategy:r,middleware:m};k.current&&(e.platform=k.current),tt(C.current,O.current,e).then((e=>{const t={...e,isPositioned:!1!==T.current};M.current&&!rt(L.current,t)&&(L.current=t,f.flushSync((()=>{p(t)})))}))}),[m,n,r,k,T]);nt((()=>{!1===a&&L.current.isPositioned&&(L.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[a]);const M=e.useRef(!1);nt((()=>(M.current=!0,()=>{M.current=!1})),[]),nt((()=>{if(E&&(C.current=E),R&&(O.current=R),E&&R){if(A.current)return A.current(E,R,P);P()}}),[E,R,P,A,S]);const N=e.useMemo((()=>({reference:C,floating:O,setReference:b,setFloating:x})),[b,x]),D=e.useMemo((()=>({reference:E,floating:R})),[E,R]),I=e.useMemo((()=>{const e={position:r,left:0,top:0};if(!D.floating)return e;const t=it(D.floating,d.x),n=it(D.floating,d.y);return c?{...e,transform:"translate("+t+"px, "+n+"px)",...ot(D.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}}),[r,c,D.floating,d.x,d.y]);return e.useMemo((()=>({...d,update:P,refs:N,elements:D,floatingStyles:I})),[d,P,N,D,I])}({...t,elements:{...i,...c&&{reference:c}}}),v=e.useCallback((e=>{const t=b(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;s(t),m.refs.setReference(t)}),[m.refs]),h=e.useCallback((e=>{(b(e)||null===e)&&(d.current=e,u(e)),(b(m.refs.reference.current)||null===m.refs.reference.current||null!==e&&!b(e))&&m.refs.setReference(e)}),[m.refs]),g=e.useMemo((()=>({...m.refs,setReference:h,setPositionReference:v,domReference:d})),[m.refs,h,v]),y=e.useMemo((()=>({...m.elements,domReference:a})),[m.elements,a]),w=e.useMemo((()=>({...m,...o,refs:g,elements:y,nodeId:n})),[m,g,y,n,o]);return dt((()=>{o.dataRef.current.floatingContext=w;const e=null==p?void 0:p.nodesRef.current.find((e=>e.id===n));e&&(e.context=w)})),e.useMemo((()=>({...m,context:w,refs:g,elements:y})),[m,g,y,w])},Arrow:yt,arrow:(e,t)=>({...ut(e),options:[e,t]}),useRole:function(t,n){var r;void 0===n&&(n={});const{open:o,floatingId:i}=t,{enabled:l=!0,role:u="dialog"}=n,c=null!=(r=vn.get(u))?r:u,s=ht(),a=null!=xt(),f=e.useMemo((()=>"tooltip"===c||"label"===u?{["aria-"+("label"===u?"labelledby":"describedby")]:o?i:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":"alertdialog"===c?"dialog":c,"aria-controls":o?i:void 0,..."listbox"===c&&{role:"combobox"},..."menu"===c&&{id:s},..."menu"===c&&a&&{role:"menuitem"},..."select"===u&&{"aria-autocomplete":"none"},..."combobox"===u&&{"aria-autocomplete":"list"}}),[c,i,a,o,s,u]),d=e.useMemo((()=>{const e={id:i,...c&&{role:c}};return"tooltip"===c||"label"===u?e:{...e,..."menu"===c&&{"aria-labelledby":s}}}),[c,i,s,u]),p=e.useCallback((e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:i+"-option"}};switch(u){case"select":return{...r,"aria-selected":t&&n};case"combobox":return{...r,...t&&{"aria-selected":!0}}}return{}}),[i,u]);return e.useMemo((()=>l?{reference:f,floating:d,item:p}:{}),[l,f,d,p])},useFocus:function(t,n){void 0===n&&(n={});const{open:r,onOpenChange:o,events:i,dataRef:l,elements:u}=t,{enabled:c=!0,visibleOnly:s=!0}=n,a=e.useRef(!1),f=e.useRef(),d=e.useRef(!0);e.useEffect((()=>{if(!c)return;const e=g(u.domReference);function t(){!r&&x(u.domReference)&&u.domReference===I(q(u.domReference))&&(a.current=!0)}function n(){d.current=!0}return e.addEventListener("blur",t),e.addEventListener("keydown",n,!0),()=>{e.removeEventListener("blur",t),e.removeEventListener("keydown",n,!0)}}),[u.domReference,r,c]),e.useEffect((()=>{if(c)return i.on("openchange",e),()=>{i.off("openchange",e)};function e(e){let{reason:t}=e;"reference-press"!==t&&"escape-key"!==t||(a.current=!0)}}),[i,c]),e.useEffect((()=>()=>{clearTimeout(f.current)}),[]);const p=e.useMemo((()=>({onPointerDown(e){B(e.nativeEvent)||(d.current=!1)},onMouseLeave(){a.current=!1},onFocus(e){if(a.current)return;const t=X(e.nativeEvent);if(s&&b(t))try{if(H()&&W().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints)throw Error();if(!t.matches(":focus-visible"))return}catch(e){if(!d.current&&!U(t))return}o(!0,e.nativeEvent,"focus")},onBlur(e){a.current=!1;const t=e.relatedTarget,n=e.nativeEvent,r=b(t)&&t.hasAttribute(Rt("focus-guard"))&&"outside"===t.getAttribute("data-type");f.current=window.setTimeout((()=>{var e;const i=I(u.domReference?u.domReference.ownerDocument:document);(t||i!==u.domReference)&&(F(null==(e=l.current.floatingContext)?void 0:e.refs.floating.current,i)||F(u.domReference,i)||r||o(!1,n,"focus"))}))}})),[l,u.domReference,o,s]);return e.useMemo((()=>c?{reference:p}:{}),[c,p])},useInteractions:function(t){void 0===t&&(t=[]);const n=t.map((e=>null==e?void 0:e.reference)),r=t.map((e=>null==e?void 0:e.floating)),o=t.map((e=>null==e?void 0:e.item)),i=e.useCallback((e=>mn(e,t,"reference")),n),l=e.useCallback((e=>mn(e,t,"floating")),r),u=e.useCallback((e=>mn(e,t,"item")),o);return e.useMemo((()=>({getReferenceProps:i,getFloatingProps:l,getItemProps:u})),[i,l,u])},useDismiss:function(t,n){void 0===n&&(n={});const{open:r,onOpenChange:o,elements:i,dataRef:l}=t,{enabled:u=!0,escapeKey:c=!0,outsidePress:s=!0,outsidePressEvent:a="pointerdown",referencePress:f=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:m,capture:v}=n,h=Et(),g=ft("function"==typeof s?s:()=>!1),y="function"==typeof s?g:s,w=e.useRef(!1),E=e.useRef(!1),{escapeKey:R,outsidePress:C}=an(m),{escapeKey:O,outsidePress:L}=an(v),T=e.useRef(!1),M=ft((e=>{var t;if(!r||!u||!c||"Escape"!==e.key)return;if(T.current)return;const n=null==(t=l.current.floatingContext)?void 0:t.nodeId,i=h?Tt(h.nodesRef.current,n):[];if(!R&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)})),!e)return}o(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")})),D=ft((e=>{var t;const n=()=>{var t;M(e),null==(t=X(e))||t.removeEventListener("keydown",n)};null==(t=X(e))||t.addEventListener("keydown",n)})),I=ft((e=>{var t;const n=w.current;w.current=!1;const r=E.current;if(E.current=!1,"click"===a&&r)return;if(n)return;if("function"==typeof y&&!y(e))return;const u=X(e),c="["+Rt("inert")+"]",s=q(i.floating).querySelectorAll(c);let f=b(u)?u:null;for(;f&&!A(f);){const e=P(f);if(A(e)||!b(e))break;f=e}if(s.length&&b(u)&&!u.matches("html,body")&&!F(u,i.floating)&&Array.from(s).every((e=>!F(f,e))))return;if(x(u)&&B){const t=A(u),n=k(u),r=/auto|scroll/,o=t||r.test(n.overflowX),i=t||r.test(n.overflowY),l=o&&u.clientWidth>0&&u.scrollWidth>u.clientWidth,c=i&&u.clientHeight>0&&u.scrollHeight>u.clientHeight,s="rtl"===n.direction,a=c&&(s?e.offsetX<=u.offsetWidth-u.clientWidth:e.offsetX>u.clientWidth),f=l&&e.offsetY>u.clientHeight;if(a||f)return}const d=null==(t=l.current.floatingContext)?void 0:t.nodeId,p=h&&Tt(h.nodesRef.current,d).some((t=>{var n;return K(e,null==(n=t.context)?void 0:n.elements.floating)}));if(K(e,i.floating)||K(e,i.domReference)||p)return;const m=h?Tt(h.nodesRef.current,d):[];if(m.length>0){let e=!0;if(m.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}o(!1,e,"outside-press")})),W=ft((e=>{var t;const n=()=>{var t;I(e),null==(t=X(e))||t.removeEventListener(a,n)};null==(t=X(e))||t.addEventListener(a,n)}));e.useEffect((()=>{if(!r||!u)return;l.current.__escapeKeyBubbles=R,l.current.__outsidePressBubbles=C;let e=-1;function t(e){o(!1,e,"ancestor-scroll")}function n(){window.clearTimeout(e),T.current=!0}function s(){e=window.setTimeout((()=>{T.current=!1}),S()?5:0)}const f=q(i.floating);c&&(f.addEventListener("keydown",O?D:M,O),f.addEventListener("compositionstart",n),f.addEventListener("compositionend",s)),y&&f.addEventListener(a,L?W:I,L);let d=[];return p&&(b(i.domReference)&&(d=N(i.domReference)),b(i.floating)&&(d=d.concat(N(i.floating))),!b(i.reference)&&i.reference&&i.reference.contextElement&&(d=d.concat(N(i.reference.contextElement)))),d=d.filter((e=>{var t;return e!==(null==(t=f.defaultView)?void 0:t.visualViewport)})),d.forEach((e=>{e.addEventListener("scroll",t,{passive:!0})})),()=>{c&&(f.removeEventListener("keydown",O?D:M,O),f.removeEventListener("compositionstart",n),f.removeEventListener("compositionend",s)),y&&f.removeEventListener(a,L?W:I,L),d.forEach((e=>{e.removeEventListener("scroll",t)})),window.clearTimeout(e)}}),[l,i,c,y,a,r,o,p,u,R,C,M,O,D,I,L,W]),e.useEffect((()=>{w.current=!1}),[y,a]);const j=e.useMemo((()=>({onKeyDown:M,...f&&{[cn[d]]:e=>{o(!1,e.nativeEvent,"reference-press")},..."click"!==d&&{onClick(e){o(!1,e.nativeEvent,"reference-press")}}}})),[M,o,f,d]),B=e.useMemo((()=>({onKeyDown:M,onMouseDown(){E.current=!0},onMouseUp(){E.current=!0},[sn[a]]:()=>{w.current=!0}})),[M,a]);return e.useMemo((()=>u?{reference:j,floating:B}:{}),[u,j,B])},useHover:function(t,n){void 0===n&&(n={});const{open:r,onOpenChange:o,dataRef:i,events:l,elements:u}=t,{enabled:c=!0,delay:s=0,handleClose:a=null,mouseOnly:f=!1,restMs:d=0,move:p=!0}=n,m=Et(),v=xt(),h=Ct(a),g=Ct(s),y=Ct(r),w=e.useRef(),x=e.useRef(-1),E=e.useRef(),R=e.useRef(-1),C=e.useRef(!0),O=e.useRef(!1),L=e.useRef((()=>{})),S=e.useRef(!1),A=e.useCallback((()=>{var e;const t=null==(e=i.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t}),[i]);e.useEffect((()=>{if(c)return l.on("openchange",e),()=>{l.off("openchange",e)};function e(e){let{open:t}=e;t||(clearTimeout(x.current),clearTimeout(R.current),C.current=!0,S.current=!1)}}),[c,l]),e.useEffect((()=>{if(!c)return;if(!h.current)return;if(!r)return;function e(e){A()&&o(!1,e,"hover")}const t=q(u.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}}),[u.floating,r,o,c,h,A]);const k=e.useCallback((function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");const r=Lt(g.current,"close",w.current);r&&!E.current?(clearTimeout(x.current),x.current=window.setTimeout((()=>o(!1,e,n)),r)):t&&(clearTimeout(x.current),o(!1,e,n))}),[g,o]),T=ft((()=>{L.current(),E.current=void 0})),P=ft((()=>{if(O.current){const e=q(u.floating).body;e.style.pointerEvents="",e.removeAttribute(Ot),O.current=!1}})),M=ft((()=>!!i.current.openEvent&&["click","mousedown"].includes(i.current.openEvent.type)));e.useEffect((()=>{if(c&&b(u.domReference)){var e;const o=u.domReference;return r&&o.addEventListener("mouseleave",l),null==(e=u.floating)||e.addEventListener("mouseleave",l),p&&o.addEventListener("mousemove",t,{once:!0}),o.addEventListener("mouseenter",t),o.addEventListener("mouseleave",n),()=>{var e;r&&o.removeEventListener("mouseleave",l),null==(e=u.floating)||e.removeEventListener("mouseleave",l),p&&o.removeEventListener("mousemove",t),o.removeEventListener("mouseenter",t),o.removeEventListener("mouseleave",n)}}function t(e){if(clearTimeout(x.current),C.current=!1,f&&!_(w.current)||d>0&&!Lt(g.current,"open"))return;const t=Lt(g.current,"open",w.current);t?x.current=window.setTimeout((()=>{y.current||o(!0,e,"hover")}),t):r||o(!0,e,"hover")}function n(e){if(M())return;L.current();const t=q(u.floating);if(clearTimeout(R.current),S.current=!1,h.current&&i.current.floatingContext){r||clearTimeout(x.current),E.current=h.current({...i.current.floatingContext,tree:m,x:e.clientX,y:e.clientY,onClose(){P(),T(),M()||k(e,!0,"safe-polygon")}});const n=E.current;return t.addEventListener("mousemove",n),void(L.current=()=>{t.removeEventListener("mousemove",n)})}("touch"!==w.current||!F(u.floating,e.relatedTarget))&&k(e)}function l(e){M()||i.current.floatingContext&&(null==h.current||h.current({...i.current.floatingContext,tree:m,x:e.clientX,y:e.clientY,onClose(){P(),T(),M()||k(e)}})(e))}}),[u,c,t,f,d,p,k,T,P,o,r,y,m,g,h,i,M]),dt((()=>{var e;if(c&&r&&null!=(e=h.current)&&e.__options.blockPointerEvents&&A()){O.current=!0;const e=u.floating;if(b(u.domReference)&&e){var t;const n=q(u.floating).body;n.setAttribute(Ot,"");const r=u.domReference,o=null==m||null==(t=m.nodesRef.current.find((e=>e.id===v)))||null==(t=t.context)?void 0:t.elements.floating;return o&&(o.style.pointerEvents=""),n.style.pointerEvents="none",r.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{n.style.pointerEvents="",r.style.pointerEvents="",e.style.pointerEvents=""}}}}),[c,r,v,u,m,h,A]),dt((()=>{r||(w.current=void 0,S.current=!1,T(),P())}),[r,T,P]),e.useEffect((()=>()=>{T(),clearTimeout(x.current),clearTimeout(R.current),P()}),[c,u.domReference,T,P]);const N=e.useMemo((()=>{function e(e){w.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e;function n(){C.current||y.current||o(!0,t,"hover")}f&&!_(w.current)||r||0===d||S.current&&e.movementX**2+e.movementY**2<2||(clearTimeout(R.current),"touch"===w.current?n():(S.current=!0,R.current=window.setTimeout(n,d)))}}}),[f,o,r,y,d]),D=e.useMemo((()=>({onMouseEnter(){clearTimeout(x.current)},onMouseLeave(e){M()||k(e.nativeEvent,!1)}})),[k,M]);return e.useMemo((()=>c?{reference:N,floating:D}:{}),[c,N,D])},flip:(e,t)=>({...Qe(e),options:[e,t]}),shift:(e,t)=>({...Ge(e),options:[e,t]}),hide:(e,t)=>({...Je(e),options:[e,t]}),offset:(e,t)=>({...Ze(e),options:[e,t]}),useMergeRefs:ct},gn="AlertDialog",yn=function(e){var n=e.children,r=e.customRootClass,o=void 0===r?"":r,i=e.open,u=e.onOpenChange,c=e.onClickOutside,s=void 0===c?function(){}:c,a=hn.useFloating().context,f=function(e,t){if(void 0===e&&(e=""),e)return e;var n=t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(n)}(o,gn),p=l(i),v=p[0],h=p[1],g={isOpen:v,handleOpenChange:function(e){h(e),u(e)},floaterContext:a,rootClass:f,handleOverlayClick:function(){s()}};return t.createElement(d.Provider,{value:g},t.createElement("div",{className:m(f)},n))};yn.displayName=gn;var wn=function(e){var n=e.children,r=u(d),o=r.isOpen,i=r.rootClass;return t.createElement(t.Fragment,null,o&&t.createElement("div",{className:m("".concat(i,"-content"))},n))},bn=function(){return bn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},bn.apply(this,arguments)};function xn(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}"function"==typeof SuppressedError&&SuppressedError;var En=["div","span","button","input"].reduce((function(e,n){return e[n]=function(e){var n=t.forwardRef((function(n,r){var o=n.asChild,i=void 0!==o&&o,l=n.children,u=xn(n,["asChild","children"]);if(i){var c=t.Children.toArray(l);if(1!==c.length||!t.isValidElement(c[0]))return console.warn("Primitive.".concat(e,": asChild prop requires exactly one valid child element.")),t.createElement(e,bn(bn({},u),{ref:r}),l);var s=c[0];return t.cloneElement(s,bn(bn(bn({},u),s.props),r?{ref:function(e){"function"==typeof r?r(e):r&&(r.current=e);var t=s.ref;"function"==typeof t?t(e):t&&(t.current=e)}}:{}))}return t.createElement(e,bn(bn({},u),{ref:r}),l)}));return n.displayName="Primitive.".concat(e),n}(n),e}),{}),Rn=function(e){var n=e.role,r=void 0===n?"button":n,o=e.label,i=void 0===o?"":o,l=e.description,u=void 0===l?"":l,c=e.disabled,s=void 0!==c&&c,a=e.children,f=xn(e,["role","label","description","disabled","children"]);return i&&(f["aria-label"]=i),u&&(f["aria-description"]=u),s&&(f["aria-disabled"]="true",u||(f["aria-description"]="Disabled Button")),t.createElement(En.button,bn({role:r,disabled:s},f),a)},Cn=function(e){var n=e.children,r=xn(e,["children"]),o=u(d),i=o.rootClass,l=o.handleOpenChange;return t.createElement(Rn,bn({onClick:function(){return l(!0)}},r,{className:m("".concat(i,"-trigger"))}),n)},On=function(e){var n=e.children,r=u(d).rootClass,o=document.getElementsByClassName(r)[0];return t.createElement(hn.Portal,{root:o||document.body},n)},Ln=function(){var e=u(d),n=e.isOpen,r=e.rootClass,o=e.handleOverlayClick;return t.createElement(t.Fragment,null,n&&t.createElement(hn.Overlay,{className:m("".concat(r,"-overlay")),onClick:o}))},Sn=function(e){var n=e.children,r=u(d),o=r.rootClass,i=r.handleOpenChange;return t.createElement(Rn,{onClick:function(){return i(!1)},className:m("".concat(o,"-cancel"))},n)},An=function(e){var n=e.children,r=u(d),o=r.rootClass,i=r.handleOpenChange;return t.createElement(Rn,{onClick:function(){return i(!1)},className:m("".concat(o,"-action"))},n)},kn=function(e){var n=e.children,r=e.open,o=void 0!==r&&r,i=e.onOpenChange,u=void 0===i?function(){}:i,c=e.content,s=l(o),a=s[0],f=s[1];return t.createElement(yn,{open:a,onOpenChange:function(e){f(e),u(e)}},t.createElement(Cn,null,n),t.createElement(On,null,t.createElement(Ln,null),t.createElement(wn,null,c,t.createElement(Sn,null,"Cancel"),t.createElement(An,null,"Continue"))))};kn.Root=yn,kn.Content=wn,kn.Trigger=Cn,kn.Portal=On,kn.Overlay=Ln,kn.Cancel=Sn,kn.Action=An;export{kn as default};
5
+ */var pe=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"].join(","),me="undefined"==typeof Element,ve=me?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,he=!me&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},ge=function e(t,n){var r;void 0===n&&(n=!0);var o=null==t||null===(r=t.getAttribute)||void 0===r?void 0:r.call(t,"inert");return""===o||"true"===o||n&&t&&e(t.parentNode)},ye=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var l=i.shift();if(!ge(l,!1))if("SLOT"===l.tagName){var u=l.assignedElements(),c=e(u.length?u:l.children,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:l,candidates:c})}else{ve.call(l,pe)&&r.filter(l)&&(n||!t.includes(l))&&o.push(l);var s=l.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(l),a=!ge(s,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(s&&a){var f=e(!0===s?l.children:s.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:l,candidates:f})}else i.unshift.apply(i,l.children)}}return o},we=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},be=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!we(e)?0:e.tabIndex},xe=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Ee=function(e){return"INPUT"===e.tagName},Re=function(e){return function(e){return Ee(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||he(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)},Ce=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},Oe=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=ve.call(e,"details>summary:first-of-type")?e.parentElement:e;if(ve.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return Ce(e)}else{if("function"==typeof r){for(var i=e;e;){var l=e.parentElement,u=he(e);if(l&&!l.shadowRoot&&!0===r(l))return Ce(e);e=e.assignedSlot?e.assignedSlot:l||u===e.ownerDocument?l:u.host}e=i}if(function(e){var t,n,r,o,i=e&&he(e),l=null===(t=i)||void 0===t?void 0:t.host,u=!1;if(i&&i!==e)for(u=!!(null!==(n=l)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(l)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!u&&l;){var c,s,a;u=!(null===(s=l=null===(c=i=he(l))||void 0===c?void 0:c.host)||void 0===s||null===(a=s.ownerDocument)||void 0===a||!a.contains(l))}return u}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},Le=function(e,t){return!(t.disabled||ge(t)||function(e){return Ee(e)&&"hidden"===e.type}(t)||Oe(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!ve.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},Se=function(e,t){return!(Re(t)||be(t)<0||!Le(e,t))},Ae=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},ke=function e(t){var n=[],r=[];return t.forEach((function(t,o){var i=!!t.scopeParent,l=i?t.scopeParent:t,u=function(e,t){var n=be(e);return n<0&&t&&!we(e)?0:n}(l,i),c=i?e(t.candidates):l;0===u?i?n.push.apply(n,c):n.push(l):r.push({documentOrder:o,tabIndex:u,item:t,isScope:i,content:c})})),r.sort(xe).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},Te=function(e,t){var n;return n=(t=t||{}).getShadowRoot?ye([e],t.includeContainer,{filter:Se.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Ae}):function(e,t,n){if(ge(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(pe));return t&&ve.call(e,pe)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,Se.bind(null,t)),ke(n)};function Pe(e,t,n){let{reference:r,floating:o}=e;const i=ue(t),l=ce(t),u=le(l),c=re(t),s="y"===i,a=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[u]/2-o[u]/2;let p;switch(c){case"top":p={x:a,y:r.y-o.height};break;case"bottom":p={x:a,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-o.width,y:f};break;default:p={x:r.x,y:r.y}}switch(oe(t)){case"start":p[l]-=d*(n&&s?-1:1);break;case"end":p[l]+=d*(n&&s?-1:1)}return p}async function Me(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:l,elements:u,strategy:c}=e,{boundary:s="clippingAncestors",rootBoundary:a="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=ne(t,e),m=fe(p),v=u[d?"floating"===f?"reference":"floating":f],h=de(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(v)))||n?v:v.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(u.floating)),boundary:s,rootBoundary:a,strategy:c})),g="floating"===f?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(u.floating)),w=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},b=de(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:g,offsetParent:y,strategy:c}):g);return{top:(h.top-b.top+m.top)/w.y,bottom:(b.bottom-h.bottom+m.bottom)/w.y,left:(h.left-b.left+m.left)/w.x,right:(b.right-h.right+m.right)/w.x}}function Ne(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function De(e){return $.some((t=>e[t]>=0))}function Ie(e){const t=k(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=x(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,u=G(n)!==i||G(r)!==l;return u&&(n=i,r=l),{width:n,height:r,$:u}}function Fe(e){return b(e)?e:e.contextElement}function We(e){const t=Fe(e);if(!x(t))return Q(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Ie(t);let l=(i?G(n.width):n.width)/r,u=(i?G(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),u&&Number.isFinite(u)||(u=1),{x:l,y:u}}const je=Q(0);function Be(e){const t=g(e);return S()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:je}function He(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Fe(e);let l=Q(1);t&&(r?b(r)&&(l=We(r)):l=We(e));const u=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==g(e))&&t}(i,n,r)?Be(i):Q(0);let c=(o.left+u.x)/l.x,s=(o.top+u.y)/l.y,a=o.width/l.x,f=o.height/l.y;if(i){const e=g(i),t=r&&b(r)?g(r):r;let n=e,o=D(n);for(;o&&r&&t!==n;){const e=We(o),t=o.getBoundingClientRect(),r=k(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,s*=e.y,a*=e.x,f*=e.y,c+=i,s+=l,n=g(o),o=D(n)}}return de({width:a,height:f,x:c,y:s})}function Ve(e,t){const n=T(e).scrollLeft;return t?t.left+n:He(y(e)).left+n}function _e(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:Ve(e,r)),y:r.top+t.scrollTop}}function qe(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=g(e),r=y(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,u=0,c=0;if(o){i=o.width,l=o.height;const e=S();(!e||e&&"fixed"===t)&&(u=o.offsetLeft,c=o.offsetTop)}return{width:i,height:l,x:u,y:c}}(e,n);else if("document"===t)r=function(e){const t=y(e),n=T(e),r=e.ownerDocument.body,o=Z(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Z(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+Ve(e);const u=-n.scrollTop;return"rtl"===k(r).direction&&(l+=Z(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:u}}(y(e));else if(b(t))r=function(e,t){const n=He(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=x(e)?We(e):Q(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Be(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return de(r)}function Ke(e,t){const n=P(e);return!(n===t||!b(n)||A(n))&&("fixed"===k(n).position||Ke(n,t))}function Xe(e,t,n){const r=x(t),o=y(t),i="fixed"===n,l=He(e,!0,i,t);let u={scrollLeft:0,scrollTop:0};const c=Q(0);if(r||!r&&!i)if(("body"!==h(t)||R(o))&&(u=T(t)),r){const e=He(t,!0,i,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else o&&(c.x=Ve(o));const s=!o||r||i?Q(0):_e(o,u);return{x:l.left+u.scrollLeft-c.x-s.x,y:l.top+u.scrollTop-c.y-s.y,width:l.width,height:l.height}}function Ue(e){return"static"===k(e).position}function Ye(e,t){if(!x(e)||"fixed"===k(e).position)return null;if(t)return t(e);let n=e.offsetParent;return y(e)===n&&(n=n.ownerDocument.body),n}function $e(e,t){const n=g(e);if(O(e))return n;if(!x(e)){let t=P(e);for(;t&&!A(t);){if(b(t)&&!Ue(t))return t;t=P(t)}return n}let r=Ye(e,t);for(;r&&C(r)&&Ue(r);)r=Ye(r,t);return r&&A(r)&&Ue(r)&&!L(r)?n:r||function(e){let t=P(e);for(;x(t)&&!A(t);){if(L(t))return t;if(O(t))return null;t=P(t)}return null}(e)||n}const ze={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,l=y(r),u=!!t&&O(t.floating);if(r===l||u&&i)return n;let c={scrollLeft:0,scrollTop:0},s=Q(1);const a=Q(0),f=x(r);if((f||!f&&!i)&&(("body"!==h(r)||R(l))&&(c=T(r)),x(r))){const e=He(r);s=We(r),a.x=e.x+r.clientLeft,a.y=e.y+r.clientTop}const d=!l||f||i?Q(0):_e(l,c,!0);return{width:n.width*s.x,height:n.height*s.y,x:n.x*s.x-c.scrollLeft*s.x+a.x+d.x,y:n.y*s.y-c.scrollTop*s.y+a.y+d.y}},getDocumentElement:y,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?O(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=N(e,[],!1).filter((e=>b(e)&&"body"!==h(e))),o=null;const i="fixed"===k(e).position;let l=i?P(e):e;for(;b(l)&&!A(l);){const t=k(l),n=L(l);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||R(l)&&!n&&Ke(e,l))?r=r.filter((e=>e!==l)):o=t,l=P(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],l=i[0],u=i.reduce(((e,n)=>{const r=qe(t,n,o);return e.top=Z(r.top,e.top),e.right=z(r.right,e.right),e.bottom=z(r.bottom,e.bottom),e.left=Z(r.left,e.left),e}),qe(t,l,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}},getOffsetParent:$e,getElementRects:async function(e){const t=this.getOffsetParent||$e,n=this.getDimensions,r=await n(e.floating);return{reference:Xe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Ie(e);return{width:t,height:n}},getScale:We,isElement:b,isRTL:function(e){return"rtl"===k(e).direction}},Ze=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:l,middlewareData:u}=t,c=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),l=re(n),u=oe(n),c="y"===ue(n),s=["left","top"].includes(l)?-1:1,a=i&&c?-1:1,f=ne(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:m}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return u&&"number"==typeof m&&(p="end"===u?-1*m:m),c?{x:p*a,y:d*s}:{x:d*s,y:p*a}}(t,e);return l===(null==(n=u.offset)?void 0:n.placement)&&null!=(r=u.arrow)&&r.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:l}}}}},Ge=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:u={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=ne(e,t),s={x:n,y:r},a=await Me(t,c),f=ue(re(o)),d=ie(f);let p=s[d],m=s[f];if(i){const e="y"===d?"bottom":"right";p=te(p+a["y"===d?"top":"left"],p,p-a[e])}if(l){const e="y"===f?"bottom":"right";m=te(m+a["y"===f?"top":"left"],m,m-a[e])}const v=u.fn({...t,[d]:p,[f]:m});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[d]:i,[f]:l}}}}}},Qe=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:l,initialPlacement:u,platform:c,elements:s}=t,{mainAxis:a=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:v=!0,...h}=ne(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const g=re(o),y=ue(u),w=re(u)===u,b=await(null==c.isRTL?void 0:c.isRTL(s.floating)),x=d||(w||!v?[ae(u)]:function(e){const t=ae(e);return[se(e),t,se(t)]}(u)),E="none"!==m;!d&&E&&x.push(...function(e,t,n,r){const o=oe(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:l;default:return[]}}(re(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(se)))),i}(u,v,m,b));const R=[u,...x],C=await Me(t,h),O=[];let L=(null==(r=i.flip)?void 0:r.overflows)||[];if(a&&O.push(C[g]),f){const e=function(e,t,n){void 0===n&&(n=!1);const r=oe(e),o=ce(e),i=le(o);let l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=ae(l)),[l,ae(l)]}(o,l,b);O.push(C[e[0]],C[e[1]])}if(L=[...L,{placement:o,overflows:O}],!O.every((e=>e<=0))){var S,A;const e=((null==(S=i.flip)?void 0:S.index)||0)+1,t=R[e];if(t)return{data:{index:e,overflows:L},reset:{placement:t}};let n=null==(A=L.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:A.placement;if(!n)switch(p){case"bestFit":{var k;const e=null==(k=L.filter((e=>{if(E){const t=ue(e.placement);return t===y||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:k[0];e&&(n=e);break}case"initialPlacement":n=u}if(o!==n)return{reset:{placement:n}}}return{}}}},Je=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=ne(e,t);switch(r){case"referenceHidden":{const e=Ne(await Me(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:De(e)}}}case"escaped":{const e=Ne(await Me(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:De(e)}}}default:return{}}}}},et=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:l,elements:u,middlewareData:c}=t,{element:s,padding:a=0}=ne(e,t)||{};if(null==s)return{};const f=fe(a),d={x:n,y:r},p=ce(o),m=le(p),v=await l.getDimensions(s),h="y"===p,g=h?"top":"left",y=h?"bottom":"right",w=h?"clientHeight":"clientWidth",b=i.reference[m]+i.reference[p]-d[p]-i.floating[m],x=d[p]-i.reference[p],E=await(null==l.getOffsetParent?void 0:l.getOffsetParent(s));let R=E?E[w]:0;R&&await(null==l.isElement?void 0:l.isElement(E))||(R=u.floating[w]||i.floating[m]);const C=b/2-x/2,O=R/2-v[m]/2-1,L=z(f[g],O),S=z(f[y],O),A=L,k=R-v[m]-S,T=R/2-v[m]/2+C,P=te(A,T,k),M=!c.arrow&&null!=oe(o)&&T!==P&&i.reference[m]/2-(T<A?L:S)-v[m]/2<0,N=M?T<A?T-A:T-k:0;return{[p]:d[p]+N,data:{[p]:P,centerOffset:T-P-N,...M&&{alignmentOffset:N}},reset:M}}}),tt=(e,t,n)=>{const r=new Map,o={platform:ze,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,u=i.filter(Boolean),c=await(null==l.isRTL?void 0:l.isRTL(t));let s=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:a,y:f}=Pe(s,r,c),d=r,p={},m=0;for(let n=0;n<u.length;n++){const{name:i,fn:v}=u[n],{x:h,y:g,data:y,reset:w}=await v({x:a,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:p,rects:s,platform:l,elements:{reference:e,floating:t}});a=null!=h?h:a,f=null!=g?g:f,p={...p,[i]:{...p[i],...y}},w&&m<=50&&(m++,"object"==typeof w&&(w.placement&&(d=w.placement),w.rects&&(s=!0===w.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):w.rects),({x:a,y:f}=Pe(s,d,c))),n=-1)}return{x:a,y:f,placement:d,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var nt="undefined"!=typeof document?r:o;function rt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!rt(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!rt(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function ot(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function it(e,t){const n=ot(e);return Math.round(t*n)/n}function lt(t){const n=e.useRef(t);return nt((()=>{n.current=t})),n}const ut=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?et({element:n.current,padding:r}).fn(t):{}:n?et({element:n,padding:r}).fn(t):{};var o}});function ct(t){return e.useMemo((()=>t.every((e=>null==e))?null:e=>{t.forEach((t=>{"function"==typeof t?t(e):null!=t&&(t.current=e)}))}),t)}const st={...e},at=st.useInsertionEffect||(e=>e());function ft(t){const n=e.useRef((()=>{if("production"!==process.env.NODE_ENV)throw new Error("Cannot call an event handler while rendering.")}));return at((()=>{n.current=t})),e.useCallback((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return null==n.current?void 0:n.current(...t)}),[])}var dt="undefined"!=typeof document?r:o;let pt=!1,mt=0;const vt=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+mt++;const ht=st.useId||function(){const[t,n]=e.useState((()=>pt?vt():void 0));return dt((()=>{null==t&&n(vt())}),[]),e.useEffect((()=>{pt=!0}),[]),t};let gt;"production"!==process.env.NODE_ENV&&(gt=new Set);const yt=e.forwardRef((function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i,shift:l}},width:u=14,height:a=7,tipRadius:f=0,strokeWidth:d=0,staticOffset:p,stroke:m,d:v,style:{transform:h,...g}={},...y}=t;"production"!==process.env.NODE_ENV&&(n||function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");var i;null!=(e=gt)&&e.has(o)||(null==(i=gt)||i.add(o),console.warn(o))}("The `ref` prop is required for `FloatingArrow`."));const w=ht(),[b,x]=e.useState(!1);if(dt((()=>{if(!o)return;"rtl"===k(o).direction&&x(!0)}),[o]),!o)return null;const[E,R]=r.split("-"),C="top"===E||"bottom"===E;let O=p;(C&&null!=l&&l.x||!C&&null!=l&&l.y)&&(O=null);const L=2*d,S=L/2,A=u/2*(f/-8+1),T=a/2*f/4,P=!!v,M=O&&"end"===R?"bottom":"top";let N=O&&"end"===R?"right":"left";O&&b&&(N="end"===R?"left":"right");const D=null!=(null==i?void 0:i.x)?O||i.x:"",I=null!=(null==i?void 0:i.y)?O||i.y:"",F=v||"M0,0 H"+u+" L"+(u-A)+","+(a-T)+" Q"+u/2+","+a+" "+A+","+(a-T)+" Z",W={top:P?"rotate(180deg)":"",left:P?"rotate(90deg)":"rotate(-90deg)",bottom:P?"":"rotate(180deg)",right:P?"rotate(-90deg)":"rotate(90deg)"}[E];return c("svg",{...y,"aria-hidden":!0,ref:n,width:P?u:u+L,height:u,viewBox:"0 0 "+u+" "+(a>u?a:u),style:{position:"absolute",pointerEvents:"none",[N]:D,[M]:I,[E]:C||P?"100%":"calc(100% - "+L/2+"px)",transform:[W,h].filter((e=>!!e)).join(" "),...g},children:[L>0&&s("path",{clipPath:"url(#"+w+")",fill:"none",stroke:m,strokeWidth:L+(v?0:1),d:F}),s("path",{stroke:L&&!v?y.fill:"none",d:F}),s("clipPath",{id:w,children:s("rect",{x:-S,y:S*(P?-1:1),width:u+L,height:u})})]})}));const wt=e.createContext(null),bt=e.createContext(null),xt=()=>{var t;return(null==(t=e.useContext(wt))?void 0:t.id)||null},Et=()=>e.useContext(bt);function Rt(e){return"data-floating-ui-"+e}function Ct(e){const t=i(e);return dt((()=>{t.current=e})),t}const Ot=Rt("safe-polygon");function Lt(e,t,n){return n&&!_(n)?0:"number"==typeof e?e:null==e?void 0:e[t]}let St=0;function At(e,t){void 0===t&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(St);const i=()=>null==e?void 0:e.focus({preventScroll:n});o?i():St=requestAnimationFrame(i)}function kt(e,t){var n;let r=[],o=null==(n=e.find((e=>e.id===t)))?void 0:n.parentId;for(;o;){const t=e.find((e=>e.id===o));o=null==t?void 0:t.parentId,t&&(r=r.concat(t))}return r}function Tt(e,t){let n=e.filter((e=>{var n;return e.parentId===t&&(null==(n=e.context)?void 0:n.open)})),r=n;for(;r.length;)r=e.filter((e=>{var t;return null==(t=r)?void 0:t.some((t=>{var n;return e.parentId===t.id&&(null==(n=e.context)?void 0:n.open)}))})),n=n.concat(r);return n}let Pt=new WeakMap,Mt=new WeakSet,Nt={},Dt=0;const It=e=>e&&(e.host||It(e.parentNode));function Ft(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,l=(u=t,e.map((e=>{if(u.contains(e))return e;const t=It(e);return u.contains(t)?t:null})).filter((e=>null!=e)));var u;const c=new Set,s=new Set(l),a=[];Nt[o]||(Nt[o]=new WeakMap);const f=Nt[o];return l.forEach((function e(t){if(!t||c.has(t))return;c.add(t),t.parentNode&&e(t.parentNode)})),function e(t){if(!t||s.has(t))return;[].forEach.call(t.children,(t=>{if("script"!==h(t))if(c.has(t))e(t);else{const e=i?t.getAttribute(i):null,n=null!==e&&"false"!==e,r=Pt.get(t)||0,l=i?r+1:r,u=(f.get(t)||0)+1;Pt.set(t,l),f.set(t,u),a.push(t),1===l&&n&&Mt.add(t),1===u&&t.setAttribute(o,""),!n&&i&&t.setAttribute(i,"true")}}))}(t),c.clear(),Dt++,()=>{a.forEach((e=>{const t=Pt.get(e)||0,n=i?t-1:t,r=(f.get(e)||0)-1;Pt.set(e,n),f.set(e,r),n||(!Mt.has(e)&&i&&e.removeAttribute(i),Mt.delete(e)),r||e.removeAttribute(o)})),Dt--,Dt||(Pt=new WeakMap,Pt=new WeakMap,Mt=new WeakSet,Nt={})}}function Wt(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=q(e[0]).body;return Ft(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const jt=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Bt(e,t){const n=Te(e,jt());"prev"===t&&n.reverse();const r=n.indexOf(I(q(e)));return n.slice(r+1)[0]}function Ht(){return Bt(document.body,"next")}function Vt(){return Bt(document.body,"prev")}function _t(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!F(n,r)}function qt(e){Te(e,jt()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function Kt(e){e.querySelectorAll("[data-tabindex]").forEach((e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")}))}const Xt={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};function Ut(e){"Tab"===e.key&&(e.target,clearTimeout(undefined))}const Yt=e.forwardRef((function(t,n){const[r,o]=e.useState();dt((()=>(H()&&o("button"),document.addEventListener("keydown",Ut),()=>{document.removeEventListener("keydown",Ut)})),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":!r||void 0,[Rt("focus-guard")]:"",style:Xt};return s("span",{...t,...i})})),$t=e.createContext(null),zt=Rt("portal");const Zt=()=>e.useContext($t),Gt="data-floating-ui-focusable";function Qt(e){return e?e.hasAttribute(Gt)?e:e.querySelector("["+Gt+"]")||e:null}let Jt=[];function en(e){Jt=Jt.filter((e=>e.isConnected)),e&&"body"!==h(e)&&(Jt.push(e),Jt.length>20&&(Jt=Jt.slice(-20)))}function tn(){return Jt.slice().reverse().find((e=>e.isConnected))}function nn(e){const t=jt();return function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==ve.call(e,pe)&&Se(t,e)}(e,t)?e:Te(e,t)[0]||e}const rn=e.forwardRef((function(e,t){return s("button",{...e,type:"button",ref:t,tabIndex:-1,style:Xt})}));let on=0;let ln=()=>{};const un=e.forwardRef((function(e,t){const{lockScroll:n=!1,...r}=e;return dt((()=>{if(n)return on++,1===on&&(ln=function(){const e=/iP(hone|ad|od)|iOS/.test(W()),t=document.body.style,n=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",r=window.innerWidth-document.documentElement.clientWidth,o=t.left?parseFloat(t.left):window.scrollX,i=t.top?parseFloat(t.top):window.scrollY;if(t.overflow="hidden",r&&(t[n]=r+"px"),e){var l,u;const e=(null==(l=window.visualViewport)?void 0:l.offsetLeft)||0,n=(null==(u=window.visualViewport)?void 0:u.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(i-Math.floor(n))+"px",left:-(o-Math.floor(e))+"px",right:"0"})}return()=>{Object.assign(t,{overflow:"",[n]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(o,i))}}()),()=>{on--,0===on&&ln()}}),[n]),s("div",{ref:t,...r,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...r.style}})})),cn={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},sn={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},an=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function fn(t){const{open:n=!1,onOpenChange:r,elements:o}=t,i=ht(),l=e.useRef({}),[u]=e.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter((e=>e!==n)))||[])}}}())),c=null!=xt();if("production"!==process.env.NODE_ENV){const e=o.reference;e&&!b(e)&&function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");var i;null!=(e=gt)&&e.has(o)||(null==(i=gt)||i.add(o),console.error(o))}("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[s,a]=e.useState(o.reference),f=ft(((e,t,n)=>{l.current.openEvent=e?t:void 0,u.emit("openchange",{open:e,event:t,reason:n,nested:c}),null==r||r(e,t,n)})),d=e.useMemo((()=>({setPositionReference:a})),[]),p=e.useMemo((()=>({reference:s||o.reference||null,floating:o.floating||null,domReference:o.reference})),[s,o.reference,o.floating]);return e.useMemo((()=>({dataRef:l,open:n,onOpenChange:f,elements:p,events:u,floatingId:i,refs:d})),[n,f,p,u,i,d])}const dn="active",pn="selected";function mn(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[dn]:t,[pn]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,[Gt]:""},...i,...t.map((t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r})).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[n,i]=t;var l;o&&[dn,pn].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(l=r.get(n))||l.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=r.get(n))?void 0:e.map((e=>e(...o))).find((e=>void 0!==e))})):e[n]=i)})),e):e),{})}}const vn=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);var hn={Portal:function(t){const{children:n,id:r,root:o,preserveTabOrder:i=!0}=t,l=function(t){void 0===t&&(t={});const{id:n,root:r}=t,o=ht(),i=Zt(),[l,u]=e.useState(null),c=e.useRef(null);return dt((()=>()=>{null==l||l.remove(),queueMicrotask((()=>{c.current=null}))}),[l]),dt((()=>{if(!o)return;if(c.current)return;const e=n?document.getElementById(n):null;if(!e)return;const t=document.createElement("div");t.id=o,t.setAttribute(zt,""),e.appendChild(t),c.current=t,u(t)}),[n,o]),dt((()=>{if(null===r)return;if(!o)return;if(c.current)return;let e=r||(null==i?void 0:i.portalNode);e&&!b(e)&&(e=e.current),e=e||document.body;let t=null;n&&(t=document.createElement("div"),t.id=n,e.appendChild(t));const l=document.createElement("div");l.id=o,l.setAttribute(zt,""),e=t||e,e.appendChild(l),c.current=l,u(l)}),[n,r,o,i]),l}({id:r,root:o}),[u,a]=e.useState(null),d=e.useRef(null),p=e.useRef(null),m=e.useRef(null),v=e.useRef(null),h=null==u?void 0:u.modal,g=null==u?void 0:u.open,y=!!u&&!u.modal&&u.open&&i&&!(!o&&!l);return e.useEffect((()=>{if(l&&i&&!h)return l.addEventListener("focusin",e,!0),l.addEventListener("focusout",e,!0),()=>{l.removeEventListener("focusin",e,!0),l.removeEventListener("focusout",e,!0)};function e(e){if(l&&_t(e)){("focusin"===e.type?Kt:qt)(l)}}}),[l,i,h]),e.useEffect((()=>{l&&(g||Kt(l))}),[g,l]),c($t.Provider,{value:e.useMemo((()=>({preserveTabOrder:i,beforeOutsideRef:d,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:v,portalNode:l,setFocusManagerState:a})),[i,l]),children:[y&&l&&s(Yt,{"data-type":"outside",ref:d,onFocus:e=>{if(_t(e,l)){var t;null==(t=m.current)||t.focus()}else{const e=Vt()||(null==u?void 0:u.domReference);null==e||e.focus()}}}),y&&l&&s("span",{"aria-owns":l.id,style:Xt}),l&&f.createPortal(n,l),y&&l&&s(Yt,{"data-type":"outside",ref:p,onFocus:e=>{if(_t(e,l)){var t;null==(t=v.current)||t.focus()}else{const t=Ht()||(null==u?void 0:u.domReference);null==t||t.focus(),(null==u?void 0:u.closeOnFocusOut)&&(null==u||u.onOpenChange(!1,e.nativeEvent,"focus-out"))}}})]})},Overlay:un,FocusManager:function(t){const{context:n,children:r,disabled:o=!1,order:i=["content"],guards:l=!0,initialFocus:u=0,returnFocus:f=!0,restoreFocus:d=!1,modal:p=!0,visuallyHiddenDismiss:m=!1,closeOnFocusOut:v=!0,outsideElementsInert:h=!1}=t,{open:g,onOpenChange:y,events:w,dataRef:b,elements:{domReference:E,floating:R}}=n,C=ft((()=>{var e;return null==(e=b.current.floatingContext)?void 0:e.nodeId})),O="number"==typeof u&&u<0,L=!!(S=E)&&"combobox"===S.getAttribute("role")&&U(S)&&O;var S;const A="undefined"!=typeof HTMLElement&&"inert"in HTMLElement.prototype,k=!A||l,T=!k||A&&h,P=Ct(i),M=Ct(u),N=Ct(f),D=Et(),W=Zt(),j=e.useRef(null),H=e.useRef(null),_=e.useRef(!1),K=e.useRef(!1),$=e.useRef(-1),z=null!=W,Z=Qt(R),G=ft((function(e){return void 0===e&&(e=Z),e?Te(e,jt()):[]})),Q=ft((e=>{const t=G(e);return P.current.map((e=>E&&"reference"===e?E:Z&&"floating"===e?Z:t)).filter(Boolean).flat()}));e.useEffect((()=>{if(o)return;if(!p)return;function e(e){if("Tab"===e.key){F(Z,I(q(Z)))&&0===G().length&&!L&&Y(e);const t=Q(),n=X(e);"reference"===P.current[0]&&n===E&&(Y(e),e.shiftKey?At(t[t.length-1]):At(t[1])),"floating"===P.current[1]&&n===Z&&e.shiftKey&&(Y(e),At(t[0]))}}const t=q(Z);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}}),[o,E,Z,p,P,L,G,Q]),e.useEffect((()=>{if(!o&&R)return R.addEventListener("focusin",e),()=>{R.removeEventListener("focusin",e)};function e(e){const t=X(e),n=G().indexOf(t);-1!==n&&($.current=n)}}),[o,R,G]),e.useEffect((()=>{if(!o&&v)return R&&x(E)?(E.addEventListener("focusout",t),E.addEventListener("pointerdown",e),R.addEventListener("focusout",t),()=>{E.removeEventListener("focusout",t),E.removeEventListener("pointerdown",e),R.removeEventListener("focusout",t)}):void 0;function e(){K.current=!0,setTimeout((()=>{K.current=!1}))}function t(e){const t=e.relatedTarget;queueMicrotask((()=>{const n=C(),r=!(F(E,t)||F(R,t)||F(t,R)||F(null==W?void 0:W.portalNode,t)||null!=t&&t.hasAttribute(Rt("focus-guard"))||D&&(Tt(D.nodesRef.current,n).find((e=>{var n,r;return F(null==(n=e.context)?void 0:n.elements.floating,t)||F(null==(r=e.context)?void 0:r.elements.domReference,t)}))||kt(D.nodesRef.current,n).find((e=>{var n,r,o;return[null==(n=e.context)?void 0:n.elements.floating,Qt(null==(r=e.context)?void 0:r.elements.floating)].includes(t)||(null==(o=e.context)?void 0:o.elements.domReference)===t}))));if(d&&r&&I(q(Z))===q(Z).body){x(Z)&&Z.focus();const e=$.current,t=G(),n=t[e]||t[t.length-1]||Z;x(n)&&n.focus()}!L&&p||!t||!r||K.current||t===tn()||(_.current=!0,y(!1,e,"focus-out"))}))}}),[o,E,R,Z,p,D,W,y,v,d,G,L,C]);const J=e.useRef(null),ee=e.useRef(null),te=ct([J,null==W?void 0:W.beforeInsideRef]),ne=ct([ee,null==W?void 0:W.afterInsideRef]);function re(e){return!o&&m&&p?s(rn,{ref:"start"===e?j:H,onClick:e=>y(!1,e.nativeEvent),children:"string"==typeof m?m:"Dismiss"}):null}e.useEffect((()=>{var e;if(o)return;if(!R)return;const t=Array.from((null==W||null==(e=W.portalNode)?void 0:e.querySelectorAll("["+Rt("portal")+"]"))||[]),n=D&&!p?kt(null==D?void 0:D.nodesRef.current,C()).map((e=>{var t;return null==(t=e.context)?void 0:t.elements.floating})):[],r=[R,...t,...n,j.current,H.current,J.current,ee.current,null==W?void 0:W.beforeOutsideRef.current,null==W?void 0:W.afterOutsideRef.current,P.current.includes("reference")||L?E:null].filter((e=>null!=e)),i=p||L?Wt(r,!T,T):Wt(r);return()=>{i()}}),[o,E,R,p,P,W,L,k,T,D,C]),dt((()=>{if(o||!x(Z))return;const e=I(q(Z));queueMicrotask((()=>{const t=Q(Z),n=M.current,r=("number"==typeof n?t[n]:n.current)||Z,o=F(Z,e);O||o||!g||At(r,{preventScroll:r===Z})}))}),[o,g,Z,O,Q,M]),dt((()=>{if(o||!Z)return;let e=!1;const t=q(Z),n=I(t);let r=b.current.openEvent;function i(t){let{open:n,reason:o,event:i,nested:l}=t;n&&(r=i),"escape-key"===o&&E&&en(E),["hover","safe-polygon"].includes(o)&&"mouseleave"===i.type&&(_.current=!0),"outside-press"===o&&(l?(_.current=!1,e=!0):_.current=!(function(e){return!(0!==e.mozInputSource||!e.isTrusted)||(V()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}(i)||B(i)))}en(n),w.on("openchange",i);const l=t.createElement("span");return l.setAttribute("tabindex","-1"),l.setAttribute("aria-hidden","true"),Object.assign(l.style,Xt),z&&E&&E.insertAdjacentElement("afterend",l),()=>{w.off("openchange",i);const n=I(t),o=F(R,n)||D&&Tt(D.nodesRef.current,C()).some((e=>{var t;return F(null==(t=e.context)?void 0:t.elements.floating,n)}));(o||r&&["click","mousedown"].includes(r.type))&&E&&en(E);const u="boolean"==typeof N.current?tn()||l:N.current.current||l;queueMicrotask((()=>{const r=nn(u);N.current&&!_.current&&x(r)&&(r===n||n===t.body||o)&&r.focus({preventScroll:e}),l.remove()}))}}),[o,R,Z,N,b,w,D,z,E,C]),e.useEffect((()=>{queueMicrotask((()=>{_.current=!1}))}),[o]),dt((()=>{if(!o&&W)return W.setFocusManagerState({modal:p,closeOnFocusOut:v,open:g,onOpenChange:y,domReference:E}),()=>{W.setFocusManagerState(null)}}),[o,W,p,g,y,v,E]),dt((()=>{if(o)return;if(!Z)return;if("function"!=typeof MutationObserver)return;if(O)return;const e=()=>{const e=Z.getAttribute("tabindex"),t=G(),n=I(q(R)),r=t.indexOf(n);-1!==r&&($.current=r),P.current.includes("floating")||n!==E&&0===t.length?"0"!==e&&Z.setAttribute("tabindex","0"):"-1"!==e&&Z.setAttribute("tabindex","-1")};e();const t=new MutationObserver(e);return t.observe(Z,{childList:!0,subtree:!0,attributes:!0}),()=>{t.disconnect()}}),[o,R,Z,E,P,G,O]);const oe=!o&&k&&(!p||!L)&&(z||p);return c(a,{children:[oe&&s(Yt,{"data-type":"inside",ref:te,onFocus:e=>{if(p){const e=Q();At("reference"===i[0]?e[0]:e[e.length-1])}else if(null!=W&&W.preserveTabOrder&&W.portalNode)if(_.current=!1,_t(e,W.portalNode)){const e=Ht()||E;null==e||e.focus()}else{var t;null==(t=W.beforeOutsideRef.current)||t.focus()}}}),!L&&re("start"),r,re("end"),oe&&s(Yt,{"data-type":"inside",ref:ne,onFocus:e=>{if(p)At(Q()[0]);else if(null!=W&&W.preserveTabOrder&&W.portalNode)if(v&&(_.current=!0),_t(e,W.portalNode)){const e=Vt()||E;null==e||e.focus()}else{var t;null==(t=W.afterOutsideRef.current)||t.focus()}}})]})},useFloating:function(t){void 0===t&&(t={});const{nodeId:n}=t,r=fn({...t,elements:{reference:null,floating:null,...t.elements}}),o=t.rootContext||r,i=o.elements,[l,u]=e.useState(null),[c,s]=e.useState(null),a=(null==i?void 0:i.domReference)||l,d=e.useRef(null),p=Et();dt((()=>{a&&(d.current=a)}),[a]);const m=function(t){void 0===t&&(t={});const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:i,elements:{reference:l,floating:u}={},transform:c=!0,whileElementsMounted:s,open:a}=t,[d,p]=e.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[m,v]=e.useState(o);rt(m,o)||v(o);const[h,g]=e.useState(null),[y,w]=e.useState(null),b=e.useCallback((e=>{e!==C.current&&(C.current=e,g(e))}),[]),x=e.useCallback((e=>{e!==O.current&&(O.current=e,w(e))}),[]),E=l||h,R=u||y,C=e.useRef(null),O=e.useRef(null),L=e.useRef(d),S=null!=s,A=lt(s),k=lt(i),T=lt(a),P=e.useCallback((()=>{if(!C.current||!O.current)return;const e={placement:n,strategy:r,middleware:m};k.current&&(e.platform=k.current),tt(C.current,O.current,e).then((e=>{const t={...e,isPositioned:!1!==T.current};M.current&&!rt(L.current,t)&&(L.current=t,f.flushSync((()=>{p(t)})))}))}),[m,n,r,k,T]);nt((()=>{!1===a&&L.current.isPositioned&&(L.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[a]);const M=e.useRef(!1);nt((()=>(M.current=!0,()=>{M.current=!1})),[]),nt((()=>{if(E&&(C.current=E),R&&(O.current=R),E&&R){if(A.current)return A.current(E,R,P);P()}}),[E,R,P,A,S]);const N=e.useMemo((()=>({reference:C,floating:O,setReference:b,setFloating:x})),[b,x]),D=e.useMemo((()=>({reference:E,floating:R})),[E,R]),I=e.useMemo((()=>{const e={position:r,left:0,top:0};if(!D.floating)return e;const t=it(D.floating,d.x),n=it(D.floating,d.y);return c?{...e,transform:"translate("+t+"px, "+n+"px)",...ot(D.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}}),[r,c,D.floating,d.x,d.y]);return e.useMemo((()=>({...d,update:P,refs:N,elements:D,floatingStyles:I})),[d,P,N,D,I])}({...t,elements:{...i,...c&&{reference:c}}}),v=e.useCallback((e=>{const t=b(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;s(t),m.refs.setReference(t)}),[m.refs]),h=e.useCallback((e=>{(b(e)||null===e)&&(d.current=e,u(e)),(b(m.refs.reference.current)||null===m.refs.reference.current||null!==e&&!b(e))&&m.refs.setReference(e)}),[m.refs]),g=e.useMemo((()=>({...m.refs,setReference:h,setPositionReference:v,domReference:d})),[m.refs,h,v]),y=e.useMemo((()=>({...m.elements,domReference:a})),[m.elements,a]),w=e.useMemo((()=>({...m,...o,refs:g,elements:y,nodeId:n})),[m,g,y,n,o]);return dt((()=>{o.dataRef.current.floatingContext=w;const e=null==p?void 0:p.nodesRef.current.find((e=>e.id===n));e&&(e.context=w)})),e.useMemo((()=>({...m,context:w,refs:g,elements:y})),[m,g,y,w])},Arrow:yt,arrow:(e,t)=>({...ut(e),options:[e,t]}),useRole:function(t,n){var r;void 0===n&&(n={});const{open:o,floatingId:i}=t,{enabled:l=!0,role:u="dialog"}=n,c=null!=(r=vn.get(u))?r:u,s=ht(),a=null!=xt(),f=e.useMemo((()=>"tooltip"===c||"label"===u?{["aria-"+("label"===u?"labelledby":"describedby")]:o?i:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":"alertdialog"===c?"dialog":c,"aria-controls":o?i:void 0,..."listbox"===c&&{role:"combobox"},..."menu"===c&&{id:s},..."menu"===c&&a&&{role:"menuitem"},..."select"===u&&{"aria-autocomplete":"none"},..."combobox"===u&&{"aria-autocomplete":"list"}}),[c,i,a,o,s,u]),d=e.useMemo((()=>{const e={id:i,...c&&{role:c}};return"tooltip"===c||"label"===u?e:{...e,..."menu"===c&&{"aria-labelledby":s}}}),[c,i,s,u]),p=e.useCallback((e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:i+"-option"}};switch(u){case"select":return{...r,"aria-selected":t&&n};case"combobox":return{...r,...t&&{"aria-selected":!0}}}return{}}),[i,u]);return e.useMemo((()=>l?{reference:f,floating:d,item:p}:{}),[l,f,d,p])},useFocus:function(t,n){void 0===n&&(n={});const{open:r,onOpenChange:o,events:i,dataRef:l,elements:u}=t,{enabled:c=!0,visibleOnly:s=!0}=n,a=e.useRef(!1),f=e.useRef(),d=e.useRef(!0);e.useEffect((()=>{if(!c)return;const e=g(u.domReference);function t(){!r&&x(u.domReference)&&u.domReference===I(q(u.domReference))&&(a.current=!0)}function n(){d.current=!0}return e.addEventListener("blur",t),e.addEventListener("keydown",n,!0),()=>{e.removeEventListener("blur",t),e.removeEventListener("keydown",n,!0)}}),[u.domReference,r,c]),e.useEffect((()=>{if(c)return i.on("openchange",e),()=>{i.off("openchange",e)};function e(e){let{reason:t}=e;"reference-press"!==t&&"escape-key"!==t||(a.current=!0)}}),[i,c]),e.useEffect((()=>()=>{clearTimeout(f.current)}),[]);const p=e.useMemo((()=>({onPointerDown(e){B(e.nativeEvent)||(d.current=!1)},onMouseLeave(){a.current=!1},onFocus(e){if(a.current)return;const t=X(e.nativeEvent);if(s&&b(t))try{if(H()&&W().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints)throw Error();if(!t.matches(":focus-visible"))return}catch(e){if(!d.current&&!U(t))return}o(!0,e.nativeEvent,"focus")},onBlur(e){a.current=!1;const t=e.relatedTarget,n=e.nativeEvent,r=b(t)&&t.hasAttribute(Rt("focus-guard"))&&"outside"===t.getAttribute("data-type");f.current=window.setTimeout((()=>{var e;const i=I(u.domReference?u.domReference.ownerDocument:document);(t||i!==u.domReference)&&(F(null==(e=l.current.floatingContext)?void 0:e.refs.floating.current,i)||F(u.domReference,i)||r||o(!1,n,"focus"))}))}})),[l,u.domReference,o,s]);return e.useMemo((()=>c?{reference:p}:{}),[c,p])},useInteractions:function(t){void 0===t&&(t=[]);const n=t.map((e=>null==e?void 0:e.reference)),r=t.map((e=>null==e?void 0:e.floating)),o=t.map((e=>null==e?void 0:e.item)),i=e.useCallback((e=>mn(e,t,"reference")),n),l=e.useCallback((e=>mn(e,t,"floating")),r),u=e.useCallback((e=>mn(e,t,"item")),o);return e.useMemo((()=>({getReferenceProps:i,getFloatingProps:l,getItemProps:u})),[i,l,u])},useDismiss:function(t,n){void 0===n&&(n={});const{open:r,onOpenChange:o,elements:i,dataRef:l}=t,{enabled:u=!0,escapeKey:c=!0,outsidePress:s=!0,outsidePressEvent:a="pointerdown",referencePress:f=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:m,capture:v}=n,h=Et(),g=ft("function"==typeof s?s:()=>!1),y="function"==typeof s?g:s,w=e.useRef(!1),E=e.useRef(!1),{escapeKey:R,outsidePress:C}=an(m),{escapeKey:O,outsidePress:L}=an(v),T=e.useRef(!1),M=ft((e=>{var t;if(!r||!u||!c||"Escape"!==e.key)return;if(T.current)return;const n=null==(t=l.current.floatingContext)?void 0:t.nodeId,i=h?Tt(h.nodesRef.current,n):[];if(!R&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)})),!e)return}o(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")})),D=ft((e=>{var t;const n=()=>{var t;M(e),null==(t=X(e))||t.removeEventListener("keydown",n)};null==(t=X(e))||t.addEventListener("keydown",n)})),I=ft((e=>{var t;const n=w.current;w.current=!1;const r=E.current;if(E.current=!1,"click"===a&&r)return;if(n)return;if("function"==typeof y&&!y(e))return;const u=X(e),c="["+Rt("inert")+"]",s=q(i.floating).querySelectorAll(c);let f=b(u)?u:null;for(;f&&!A(f);){const e=P(f);if(A(e)||!b(e))break;f=e}if(s.length&&b(u)&&!u.matches("html,body")&&!F(u,i.floating)&&Array.from(s).every((e=>!F(f,e))))return;if(x(u)&&B){const t=A(u),n=k(u),r=/auto|scroll/,o=t||r.test(n.overflowX),i=t||r.test(n.overflowY),l=o&&u.clientWidth>0&&u.scrollWidth>u.clientWidth,c=i&&u.clientHeight>0&&u.scrollHeight>u.clientHeight,s="rtl"===n.direction,a=c&&(s?e.offsetX<=u.offsetWidth-u.clientWidth:e.offsetX>u.clientWidth),f=l&&e.offsetY>u.clientHeight;if(a||f)return}const d=null==(t=l.current.floatingContext)?void 0:t.nodeId,p=h&&Tt(h.nodesRef.current,d).some((t=>{var n;return K(e,null==(n=t.context)?void 0:n.elements.floating)}));if(K(e,i.floating)||K(e,i.domReference)||p)return;const m=h?Tt(h.nodesRef.current,d):[];if(m.length>0){let e=!0;if(m.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}o(!1,e,"outside-press")})),W=ft((e=>{var t;const n=()=>{var t;I(e),null==(t=X(e))||t.removeEventListener(a,n)};null==(t=X(e))||t.addEventListener(a,n)}));e.useEffect((()=>{if(!r||!u)return;l.current.__escapeKeyBubbles=R,l.current.__outsidePressBubbles=C;let e=-1;function t(e){o(!1,e,"ancestor-scroll")}function n(){window.clearTimeout(e),T.current=!0}function s(){e=window.setTimeout((()=>{T.current=!1}),S()?5:0)}const f=q(i.floating);c&&(f.addEventListener("keydown",O?D:M,O),f.addEventListener("compositionstart",n),f.addEventListener("compositionend",s)),y&&f.addEventListener(a,L?W:I,L);let d=[];return p&&(b(i.domReference)&&(d=N(i.domReference)),b(i.floating)&&(d=d.concat(N(i.floating))),!b(i.reference)&&i.reference&&i.reference.contextElement&&(d=d.concat(N(i.reference.contextElement)))),d=d.filter((e=>{var t;return e!==(null==(t=f.defaultView)?void 0:t.visualViewport)})),d.forEach((e=>{e.addEventListener("scroll",t,{passive:!0})})),()=>{c&&(f.removeEventListener("keydown",O?D:M,O),f.removeEventListener("compositionstart",n),f.removeEventListener("compositionend",s)),y&&f.removeEventListener(a,L?W:I,L),d.forEach((e=>{e.removeEventListener("scroll",t)})),window.clearTimeout(e)}}),[l,i,c,y,a,r,o,p,u,R,C,M,O,D,I,L,W]),e.useEffect((()=>{w.current=!1}),[y,a]);const j=e.useMemo((()=>({onKeyDown:M,...f&&{[cn[d]]:e=>{o(!1,e.nativeEvent,"reference-press")},..."click"!==d&&{onClick(e){o(!1,e.nativeEvent,"reference-press")}}}})),[M,o,f,d]),B=e.useMemo((()=>({onKeyDown:M,onMouseDown(){E.current=!0},onMouseUp(){E.current=!0},[sn[a]]:()=>{w.current=!0}})),[M,a]);return e.useMemo((()=>u?{reference:j,floating:B}:{}),[u,j,B])},useHover:function(t,n){void 0===n&&(n={});const{open:r,onOpenChange:o,dataRef:i,events:l,elements:u}=t,{enabled:c=!0,delay:s=0,handleClose:a=null,mouseOnly:f=!1,restMs:d=0,move:p=!0}=n,m=Et(),v=xt(),h=Ct(a),g=Ct(s),y=Ct(r),w=e.useRef(),x=e.useRef(-1),E=e.useRef(),R=e.useRef(-1),C=e.useRef(!0),O=e.useRef(!1),L=e.useRef((()=>{})),S=e.useRef(!1),A=e.useCallback((()=>{var e;const t=null==(e=i.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t}),[i]);e.useEffect((()=>{if(c)return l.on("openchange",e),()=>{l.off("openchange",e)};function e(e){let{open:t}=e;t||(clearTimeout(x.current),clearTimeout(R.current),C.current=!0,S.current=!1)}}),[c,l]),e.useEffect((()=>{if(!c)return;if(!h.current)return;if(!r)return;function e(e){A()&&o(!1,e,"hover")}const t=q(u.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}}),[u.floating,r,o,c,h,A]);const k=e.useCallback((function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");const r=Lt(g.current,"close",w.current);r&&!E.current?(clearTimeout(x.current),x.current=window.setTimeout((()=>o(!1,e,n)),r)):t&&(clearTimeout(x.current),o(!1,e,n))}),[g,o]),T=ft((()=>{L.current(),E.current=void 0})),P=ft((()=>{if(O.current){const e=q(u.floating).body;e.style.pointerEvents="",e.removeAttribute(Ot),O.current=!1}})),M=ft((()=>!!i.current.openEvent&&["click","mousedown"].includes(i.current.openEvent.type)));e.useEffect((()=>{if(c&&b(u.domReference)){var e;const o=u.domReference;return r&&o.addEventListener("mouseleave",l),null==(e=u.floating)||e.addEventListener("mouseleave",l),p&&o.addEventListener("mousemove",t,{once:!0}),o.addEventListener("mouseenter",t),o.addEventListener("mouseleave",n),()=>{var e;r&&o.removeEventListener("mouseleave",l),null==(e=u.floating)||e.removeEventListener("mouseleave",l),p&&o.removeEventListener("mousemove",t),o.removeEventListener("mouseenter",t),o.removeEventListener("mouseleave",n)}}function t(e){if(clearTimeout(x.current),C.current=!1,f&&!_(w.current)||d>0&&!Lt(g.current,"open"))return;const t=Lt(g.current,"open",w.current);t?x.current=window.setTimeout((()=>{y.current||o(!0,e,"hover")}),t):r||o(!0,e,"hover")}function n(e){if(M())return;L.current();const t=q(u.floating);if(clearTimeout(R.current),S.current=!1,h.current&&i.current.floatingContext){r||clearTimeout(x.current),E.current=h.current({...i.current.floatingContext,tree:m,x:e.clientX,y:e.clientY,onClose(){P(),T(),M()||k(e,!0,"safe-polygon")}});const n=E.current;return t.addEventListener("mousemove",n),void(L.current=()=>{t.removeEventListener("mousemove",n)})}("touch"!==w.current||!F(u.floating,e.relatedTarget))&&k(e)}function l(e){M()||i.current.floatingContext&&(null==h.current||h.current({...i.current.floatingContext,tree:m,x:e.clientX,y:e.clientY,onClose(){P(),T(),M()||k(e)}})(e))}}),[u,c,t,f,d,p,k,T,P,o,r,y,m,g,h,i,M]),dt((()=>{var e;if(c&&r&&null!=(e=h.current)&&e.__options.blockPointerEvents&&A()){O.current=!0;const e=u.floating;if(b(u.domReference)&&e){var t;const n=q(u.floating).body;n.setAttribute(Ot,"");const r=u.domReference,o=null==m||null==(t=m.nodesRef.current.find((e=>e.id===v)))||null==(t=t.context)?void 0:t.elements.floating;return o&&(o.style.pointerEvents=""),n.style.pointerEvents="none",r.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{n.style.pointerEvents="",r.style.pointerEvents="",e.style.pointerEvents=""}}}}),[c,r,v,u,m,h,A]),dt((()=>{r||(w.current=void 0,S.current=!1,T(),P())}),[r,T,P]),e.useEffect((()=>()=>{T(),clearTimeout(x.current),clearTimeout(R.current),P()}),[c,u.domReference,T,P]);const N=e.useMemo((()=>{function e(e){w.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e;function n(){C.current||y.current||o(!0,t,"hover")}f&&!_(w.current)||r||0===d||S.current&&e.movementX**2+e.movementY**2<2||(clearTimeout(R.current),"touch"===w.current?n():(S.current=!0,R.current=window.setTimeout(n,d)))}}}),[f,o,r,y,d]),D=e.useMemo((()=>({onMouseEnter(){clearTimeout(x.current)},onMouseLeave(e){M()||k(e.nativeEvent,!1)}})),[k,M]);return e.useMemo((()=>c?{reference:N,floating:D}:{}),[c,N,D])},flip:(e,t)=>({...Qe(e),options:[e,t]}),shift:(e,t)=>({...Ge(e),options:[e,t]}),hide:(e,t)=>({...Je(e),options:[e,t]}),offset:(e,t)=>({...Ze(e),options:[e,t]}),useMergeRefs:ct},gn="AlertDialog",yn=function(e){var n=e.children,r=e.customRootClass,o=void 0===r?"":r,i=e.open,u=e.onOpenChange,c=e.onClickOutside,s=void 0===c?function(){}:c,a=hn.useFloating().context,f=function(e,t){if(void 0===e&&(e=""),e)return e;var n=t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(n)}(o,gn),p=l(i),v=p[0],h=p[1],g={isOpen:v,handleOpenChange:function(e){h(e),u(e)},floaterContext:a,rootClass:f,handleOverlayClick:function(){s()}};return t.createElement(d.Provider,{value:g},t.createElement("div",{className:m(f)},n))};yn.displayName=gn;var wn=function(e){var n=e.children,r=u(d),o=r.isOpen,i=r.rootClass;return t.createElement(t.Fragment,null,o&&t.createElement("div",{className:m("".concat(i,"-content"))},n))},bn=function(){return bn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},bn.apply(this,arguments)};function xn(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}"function"==typeof SuppressedError&&SuppressedError;var En=["div","span","button","input","a"].reduce((function(e,n){return e[n]=function(e){var n=t.forwardRef((function(n,r){var o=n.asChild,i=void 0!==o&&o,l=n.children,u=xn(n,["asChild","children"]);if(i){var c=t.Children.toArray(l);if(1!==c.length||!t.isValidElement(c[0]))return console.warn("Primitive.".concat(e,": asChild prop requires exactly one valid child element.")),t.createElement(e,bn(bn({},u),{ref:r}),l);var s=c[0];return t.cloneElement(s,bn(bn(bn({},u),s.props),r?{ref:function(e){"function"==typeof r?r(e):r&&(r.current=e);var t=s.ref;"function"==typeof t?t(e):t&&(t.current=e)}}:{}))}return t.createElement(e,bn(bn({},u),{ref:r}),l)}));return n.displayName="Primitive.".concat(e),n}(n),e}),{}),Rn=function(e){var n=e.role,r=void 0===n?"button":n,o=e.label,i=void 0===o?"":o,l=e.description,u=void 0===l?"":l,c=e.disabled,s=void 0!==c&&c,a=e.children,f=xn(e,["role","label","description","disabled","children"]);return i&&(f["aria-label"]=i),u&&(f["aria-description"]=u),s&&(f["aria-disabled"]="true",u||(f["aria-description"]="Disabled Button")),t.createElement(En.button,bn({role:r,disabled:s},f),a)},Cn=function(e){var n=e.children,r=xn(e,["children"]),o=u(d),i=o.rootClass,l=o.handleOpenChange;return t.createElement(Rn,bn({onClick:function(){return l(!0)}},r,{className:m("".concat(i,"-trigger"))}),n)},On=function(e){var n=e.children,r=u(d).rootClass,o=document.getElementsByClassName(r)[0];return t.createElement(hn.Portal,{root:o||document.body},n)},Ln=function(){var e=u(d),n=e.isOpen,r=e.rootClass,o=e.handleOverlayClick;return t.createElement(t.Fragment,null,n&&t.createElement(hn.Overlay,{className:m("".concat(r,"-overlay")),onClick:o}))},Sn=function(e){var n=e.children,r=u(d),o=r.rootClass,i=r.handleOpenChange;return t.createElement(Rn,{onClick:function(){return i(!1)},className:m("".concat(o,"-cancel"))},n)},An=function(e){var n=e.children,r=u(d),o=r.rootClass,i=r.handleOpenChange;return t.createElement(Rn,{onClick:function(){return i(!1)},className:m("".concat(o,"-action"))},n)},kn=function(e){var n=e.children,r=e.open,o=void 0!==r&&r,i=e.onOpenChange,u=void 0===i?function(){}:i,c=e.content,s=l(o),a=s[0],f=s[1];return t.createElement(yn,{open:a,onOpenChange:function(e){f(e),u(e)}},t.createElement(Cn,null,n),t.createElement(On,null,t.createElement(Ln,null),t.createElement(wn,null,c,t.createElement(Sn,null,"Cancel"),t.createElement(An,null,"Continue"))))};kn.Root=yn,kn.Content=wn,kn.Trigger=Cn,kn.Portal=On,kn.Overlay=Ln,kn.Cancel=Sn,kn.Action=An;export{kn as default};
@@ -1 +1 @@
1
- 'use client';import r,{createContext as a,useState as e,useContext as t,useCallback as o}from"react";var n=function(){return n=Object.assign||function(r){for(var a,e=1,t=arguments.length;e<t;e++)for(var o in a=arguments[e])Object.prototype.hasOwnProperty.call(a,o)&&(r[o]=a[o]);return r},n.apply(this,arguments)};function c(r,a){var e={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&a.indexOf(t)<0&&(e[t]=r[t]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(t=Object.getOwnPropertySymbols(r);o<t.length;o++)a.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(r,t[o])&&(e[t[o]]=r[t[o]])}return e}function l(r){var a,e,t="";if("string"==typeof r||"number"==typeof r)t+=r;else if("object"==typeof r)if(Array.isArray(r)){var o=r.length;for(a=0;a<o;a++)r[a]&&(e=l(r[a]))&&(t&&(t+=" "),t+=e)}else for(e in r)r[e]&&(t&&(t+=" "),t+=e);return t}function s(){for(var r,a,e=0,t="",o=arguments.length;e<o;e++)(r=arguments[e])&&(a=l(r))&&(t&&(t+=" "),t+=a);return t}"function"==typeof SuppressedError&&SuppressedError;var i=a({}),u=function(r,a){if(void 0===r&&(r=""),void 0===a&&(a=""),r)return r;if(!a)return"";var e=a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(e)},f=function(a){var t=a.children,o=a.className,l=void 0===o?"":o,f=a.customRootClass,v=void 0===f?"":f,m=a.src,p=c(a,["children","className","customRootClass","src"]),d=u(v,"Avatar"),y=u(v,"Fallback"),g=e(!1),h=g[0],b=g[1],E=e(!m),O=E[0],N=E[1],j={rootClass:d,fallBackRootClass:y,isImageLoaded:h,hasError:O,setHasError:N,handleLoadImage:function(){b(!0),N(!1)},handleErrorImage:function(){b(!1),N(!0)},src:m};return r.createElement(i.Provider,{value:j},r.createElement("span",n({className:s(d,l)},p),t))},v=function(a){var e=a.children,o=a.className,n=void 0===o?"":o,c=a.color,l=void 0===c?"":c,u=t(i),f=u.hasError,v=u.fallBackRootClass;return f?r.createElement("span",{className:s(v,n),"data-accent-color":l},e):null},m=function(a){var e=a.src,o=a.alt,l=void 0===o?"Avatar":o,u=a.className,f=void 0===u?"":u,v=c(a,["src","alt","className"]),m=t(i),p=m.handleErrorImage,d=m.handleLoadImage,y=m.hasError;return!e||y?null:r.createElement("img",n({src:e,alt:l,onError:p,onLoad:d,className:s(f)},v))},p=function(r,a){return o((function(){return a?Object.fromEntries(Object.entries(a).filter((function(r){r[0];var a=r[1];return void 0!==a&&""!==a})).map((function(a){var e=a[0],t=a[1];return["data-".concat(r,"-").concat(e),t]}))):{}}),[r,a])},d=function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];return o((function(){return Object.assign.apply(Object,function(r,a,e){if(e||2===arguments.length)for(var t,o=0,n=a.length;o<n;o++)!t&&o in a||(t||(t=Array.prototype.slice.call(a,0,o)),t[o]=a[o]);return r.concat(t||Array.prototype.slice.call(a))}([{}],r.filter((function(r){return null!==r})),!1))}),[r])},y=function(a){var e=a.customRootClass,t=void 0===e?"":e,o=a.fallback,l=a.className,i=a.src,u=a.alt,y=a.variant,g=void 0===y?"":y,h=a.size,b=void 0===h?"":h,E=a.color,O=c(a,["customRootClass","fallback","className","src","alt","variant","size","color"]),N=p("avatar",{variant:g,size:b}),j=p("accent",{color:E}),C=d(N(),j());return r.createElement(f,n({src:i,customRootClass:t},C()),r.createElement(m,n({src:i,alt:u,className:s(l)},O)),r.createElement(v,{color:E},o))};y.displayName="Avatar",y.Root=f,y.Image=m,y.Fallback=v;export{y as default};
1
+ 'use client';import r,{createContext as e,useState as a,useContext as t,useEffect as n,useCallback as o}from"react";var l=function(){return l=Object.assign||function(r){for(var e,a=1,t=arguments.length;a<t;a++)for(var n in e=arguments[a])Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},l.apply(this,arguments)};function c(r,e){var a={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&e.indexOf(t)<0&&(a[t]=r[t]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(t=Object.getOwnPropertySymbols(r);n<t.length;n++)e.indexOf(t[n])<0&&Object.prototype.propertyIsEnumerable.call(r,t[n])&&(a[t[n]]=r[t[n]])}return a}function i(r){var e,a,t="";if("string"==typeof r||"number"==typeof r)t+=r;else if("object"==typeof r)if(Array.isArray(r)){var n=r.length;for(e=0;e<n;e++)r[e]&&(a=i(r[e]))&&(t&&(t+=" "),t+=a)}else for(a in r)r[a]&&(t&&(t+=" "),t+=a);return t}function s(){for(var r,e,a=0,t="",n=arguments.length;a<n;a++)(r=arguments[a])&&(e=i(r))&&(t&&(t+=" "),t+=e);return t}"function"==typeof SuppressedError&&SuppressedError;var u=e({}),f=function(r,e){if(void 0===r&&(r=""),void 0===e&&(e=""),r)return r;if(!e)return"";var a=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(a)},d=["div","span","button","input","a"].reduce((function(e,a){return e[a]=function(e){var a=r.forwardRef((function(a,t){var n=a.asChild,o=void 0!==n&&n,i=a.children,s=c(a,["asChild","children"]);if(o){var u=r.Children.toArray(i);if(1!==u.length||!r.isValidElement(u[0]))return console.warn("Primitive.".concat(e,": asChild prop requires exactly one valid child element.")),r.createElement(e,l(l({},s),{ref:t}),i);var f=u[0];return r.cloneElement(f,l(l(l({},s),f.props),t?{ref:function(r){"function"==typeof t?t(r):t&&(t.current=r);var e=f.ref;"function"==typeof e?e(r):e&&(e.current=r)}}:{}))}return r.createElement(e,l(l({},s),{ref:t}),i)}));return a.displayName="Primitive.".concat(e),a}(a),e}),{}),v=function(e){var t=e.children,n=e.className,o=void 0===n?"":n,i=e.customRootClass,v=void 0===i?"":i,m=e.asChild,p=void 0!==m&&m,h=c(e,["children","className","customRootClass","asChild"]),y=f(v,"Avatar"),E=f(v,"Fallback"),g=a(!1),C=g[0],b=g[1],O=a(!1),N=O[0],j=O[1],A={rootClass:y,fallBackRootClass:E,isImageLoaded:C,hasError:N,setHasError:j,handleLoadImage:function(){b(!0),j(!1)},handleErrorImage:function(){b(!1),j(!0)}};return r.createElement(u.Provider,{value:A},r.createElement(d.span,l({className:s(y,o),asChild:p},h),t))},m=function(e){var a=e.children,n=e.className,o=void 0===n?"":n,l=e.color,c=void 0===l?"":l,i=e.asChild,f=void 0!==i&&i,v=t(u),m=v.hasError,p=v.fallBackRootClass;return m?r.createElement(d.span,{className:s(p,o),"data-rad-ui-accent-color":c,asChild:f},a):null},p=function(e){var a=e.src,o=e.alt,i=void 0===o?"Avatar":o,f=e.className,d=void 0===f?"":f,v=c(e,["src","alt","className"]),m=t(u),p=m.handleErrorImage,h=m.handleLoadImage,y=m.hasError;return y?null:(n((function(){a||y||p()}),[a,p,y]),r.createElement("img",l({src:a,alt:i,onError:p,onLoad:h,className:s(d)},v)))},h=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return o((function(){return Object.assign.apply(Object,function(r,e,a){if(a||2===arguments.length)for(var t,n=0,o=e.length;n<o;n++)!t&&n in e||(t||(t=Array.prototype.slice.call(e,0,n)),t[n]=e[n]);return r.concat(t||Array.prototype.slice.call(e))}([{}],r.filter((function(r){return null!==r})),!1))}),[r])},y=function(e){var a,t,n=e.customRootClass,i=void 0===n?"":n,u=e.fallback,f=e.className,d=e.src,y=e.alt,E=e.variant,g=void 0===E?"":E,C=e.size,b=void 0===C?"":C,O=e.asChild,N=void 0!==O&&O,j=e.color,A=void 0===j?"":j,R=c(e,["customRootClass","fallback","className","src","alt","variant","size","asChild","color"]),w=o((function(){return t?Object.fromEntries(Object.entries(t).filter((function(r){r[0];var e=r[1];return void 0!==e&&""!==e})).map((function(r){var e=r[0],t=r[1];return["data-".concat(a,"-").concat(e),t]}))):{}}),[a="avatar",t={variant:g,size:b}]),I=function(r){return o((function(){return r?{"data-rad-ui-accent-color":r}:{}}),[r])}(A),P=h(w(),I());return r.createElement(v,l({customRootClass:i,asChild:N},P()),r.createElement(p,l({src:d,alt:y,className:s(f)},R)),r.createElement(m,{color:A},u))};y.displayName="Avatar",y.Root=v,y.Image=p,y.Fallback=m;export{y as default};
@@ -1 +1 @@
1
- 'use client';import r,{createContext as a,useState as e,useContext as t}from"react";var o=function(){return o=Object.assign||function(r){for(var a,e=1,t=arguments.length;e<t;e++)for(var o in a=arguments[e])Object.prototype.hasOwnProperty.call(a,o)&&(r[o]=a[o]);return r},o.apply(this,arguments)};function s(r,a){var e={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&a.indexOf(t)<0&&(e[t]=r[t]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(t=Object.getOwnPropertySymbols(r);o<t.length;o++)a.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(r,t[o])&&(e[t[o]]=r[t[o]])}return e}function n(r){var a,e,t="";if("string"==typeof r||"number"==typeof r)t+=r;else if("object"==typeof r)if(Array.isArray(r)){var o=r.length;for(a=0;a<o;a++)r[a]&&(e=n(r[a]))&&(t&&(t+=" "),t+=e)}else for(e in r)r[e]&&(t&&(t+=" "),t+=e);return t}function c(){for(var r,a,e=0,t="",o=arguments.length;e<o;e++)(r=arguments[e])&&(a=n(r))&&(t&&(t+=" "),t+=a);return t}"function"==typeof SuppressedError&&SuppressedError;var l=function(r,a){if(void 0===r&&(r=""),void 0===a&&(a=""),r)return r;if(!a)return"";var e=a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(e)},i=function(a){var e=a.customRootClass,t=void 0===e?"":e,n=a.children,i=a.className,u=s(a,["customRootClass","children","className"]),m=l(t,"AvatarGroup");return r.createElement("div",o({className:c(m,i)},u),n)},u=a({}),m=function(a){var t=a.children,n=a.className,i=void 0===n?"":n,m=a.customRootClass,f=void 0===m?"":m,v=a.src,d=s(a,["children","className","customRootClass","src"]),p=l(f,"Avatar"),y=l(f,"Fallback"),h=e(!1),E=h[0],g=h[1],N=e(!v),b=N[0],O=N[1],C={rootClass:p,fallBackRootClass:y,isImageLoaded:E,hasError:b,setHasError:O,handleLoadImage:function(){g(!0),O(!1)},handleErrorImage:function(){g(!1),O(!0)},src:v};return r.createElement(u.Provider,{value:C},r.createElement("span",o({className:c(p,i)},d),t))},f=function(a){var e=a.children,o=a.className,s=void 0===o?"":o,n=a.color,l=void 0===n?"":n,i=t(u),m=i.hasError,f=i.fallBackRootClass;return m?r.createElement("span",{className:c(f,s),"data-accent-color":l},e):null},v=function(a){var e=a.src,n=a.alt,l=void 0===n?"Avatar":n,i=a.className,m=void 0===i?"":i,f=s(a,["src","alt","className"]),v=t(u),d=v.handleErrorImage,p=v.handleLoadImage,y=v.hasError;return!e||y?null:r.createElement("img",o({src:e,alt:l,onError:d,onLoad:p,className:c(m)},f))},d=function(a){var e=a.avatars,t=void 0===e?[]:e;a.size;var n=a.customRootClass,l=void 0===n?"":n,u=a.className,d=a.color,p=s(a,["avatars","size","customRootClass","className","color"]);return r.createElement(i,o({customRootClass:l,className:c(u)},p),t.map((function(a,e){return r.createElement(m,{key:e,src:a.src},r.createElement(v,{src:a.src,alt:a.alt}),r.createElement(f,{color:d},a.fallback))})))};d.displayName="AvatarGroup",d.Root=i,d.AvatarRoot=m,d.AvatarImage=v,d.AvatarFallback=f;export{d as default};
1
+ 'use client';import r,{createContext as e,useState as a,useContext as t,useEffect as o}from"react";var n=function(){return n=Object.assign||function(r){for(var e,a=1,t=arguments.length;a<t;a++)for(var o in e=arguments[a])Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o]);return r},n.apply(this,arguments)};function l(r,e){var a={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&e.indexOf(t)<0&&(a[t]=r[t]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(t=Object.getOwnPropertySymbols(r);o<t.length;o++)e.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(r,t[o])&&(a[t[o]]=r[t[o]])}return a}function c(r){var e,a,t="";if("string"==typeof r||"number"==typeof r)t+=r;else if("object"==typeof r)if(Array.isArray(r)){var o=r.length;for(e=0;e<o;e++)r[e]&&(a=c(r[e]))&&(t&&(t+=" "),t+=a)}else for(a in r)r[a]&&(t&&(t+=" "),t+=a);return t}function s(){for(var r,e,a=0,t="",o=arguments.length;a<o;a++)(r=arguments[a])&&(e=c(r))&&(t&&(t+=" "),t+=e);return t}"function"==typeof SuppressedError&&SuppressedError;var i=function(r,e){if(void 0===r&&(r=""),void 0===e&&(e=""),r)return r;if(!e)return"";var a=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(a)},u=function(e){var a=e.customRootClass,t=void 0===a?"":a,o=e.children,c=e.className,u=l(e,["customRootClass","children","className"]),f=i(t,"AvatarGroup");return r.createElement("div",n({className:s(f,c)},u),o)},f=e({}),d=["div","span","button","input","a"].reduce((function(e,a){return e[a]=function(e){var a=r.forwardRef((function(a,t){var o=a.asChild,c=void 0!==o&&o,s=a.children,i=l(a,["asChild","children"]);if(c){var u=r.Children.toArray(s);if(1!==u.length||!r.isValidElement(u[0]))return console.warn("Primitive.".concat(e,": asChild prop requires exactly one valid child element.")),r.createElement(e,n(n({},i),{ref:t}),s);var f=u[0];return r.cloneElement(f,n(n(n({},i),f.props),t?{ref:function(r){"function"==typeof t?t(r):t&&(t.current=r);var e=f.ref;"function"==typeof e?e(r):e&&(e.current=r)}}:{}))}return r.createElement(e,n(n({},i),{ref:t}),s)}));return a.displayName="Primitive.".concat(e),a}(a),e}),{}),m=function(e){var t=e.children,o=e.className,c=void 0===o?"":o,u=e.customRootClass,m=void 0===u?"":u,v=e.asChild,p=void 0!==v&&v,h=l(e,["children","className","customRootClass","asChild"]),y=i(m,"Avatar"),E=i(m,"Fallback"),C=a(!1),g=C[0],N=C[1],b=a(!1),O=b[0],R=b[1],A={rootClass:y,fallBackRootClass:E,isImageLoaded:g,hasError:O,setHasError:R,handleLoadImage:function(){N(!0),R(!1)},handleErrorImage:function(){N(!1),R(!0)}};return r.createElement(f.Provider,{value:A},r.createElement(d.span,n({className:s(y,c),asChild:p},h),t))},v=function(e){var a=e.children,o=e.className,n=void 0===o?"":o,l=e.color,c=void 0===l?"":l,i=e.asChild,u=void 0!==i&&i,m=t(f),v=m.hasError,p=m.fallBackRootClass;return v?r.createElement(d.span,{className:s(p,n),"data-rad-ui-accent-color":c,asChild:u},a):null},p=function(e){var a=e.src,c=e.alt,i=void 0===c?"Avatar":c,u=e.className,d=void 0===u?"":u,m=l(e,["src","alt","className"]),v=t(f),p=v.handleErrorImage,h=v.handleLoadImage,y=v.hasError;return y?null:(o((function(){a||y||p()}),[a,p,y]),r.createElement("img",n({src:a,alt:i,onError:p,onLoad:h,className:s(d)},m)))},h=function(e){var a=e.avatars,t=void 0===a?[]:a;e.size;var o=e.customRootClass,c=void 0===o?"":o,i=e.className,f=e.color,d=l(e,["avatars","size","customRootClass","className","color"]);return r.createElement(u,n({customRootClass:c,className:s(i)},d),t.map((function(e,a){return r.createElement(m,{key:a},r.createElement(p,{src:e.src,alt:e.alt}),r.createElement(v,{color:f},e.fallback))})))};h.displayName="AvatarGroup",h.Root=u,h.AvatarRoot=m,h.AvatarImage=p,h.AvatarFallback=v;export{h as default};
@@ -1 +1 @@
1
- 'use client';import r from"react";var e=function(){return e=Object.assign||function(r){for(var e,t=1,o=arguments.length;t<o;t++)for(var a in e=arguments[t])Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=e[a]);return r},e.apply(this,arguments)};function t(r,e){var t={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&e.indexOf(o)<0&&(t[o]=r[o]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(o=Object.getOwnPropertySymbols(r);a<o.length;a++)e.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(r,o[a])&&(t[o[a]]=r[o[a]])}return t}"function"==typeof SuppressedError&&SuppressedError;function o(r){var e,t,a="";if("string"==typeof r||"number"==typeof r)a+=r;else if("object"==typeof r)if(Array.isArray(r)){var n=r.length;for(e=0;e<n;e++)r[e]&&(t=o(r[e]))&&(a&&(a+=" "),a+=t)}else for(t in r)r[t]&&(a&&(a+=" "),a+=t);return a}function a(){for(var r,e,t=0,a="",n=arguments.length;t<n;t++)(r=arguments[t])&&(e=o(r))&&(a&&(a+=" "),a+=e);return a}var n="Badge",c=function(o){var c=o.children,i=o.customRootClass,s=o.className,l=o.variant,u=void 0===l?"":l,f=o.size,v=void 0===f?"":f,p=o.color,d=void 0===p?"":p,m=t(o,["children","customRootClass","className","variant","size","color"]),y=function(r,e){if(void 0===r&&(r=""),r)return r;var t=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(t)}(i,n),b={};return u&&(b["data-badge-variant"]=u),v&&(b["data-badge-size"]=v),d&&(b["data-accent-color"]=d),r.createElement("span",e({className:a(y,s)},b,m),c)};c.displayName=n;var i=function(e){var t=e.children;return r.createElement(r.Fragment,null,t)},s=function(o){var a=o.children,n=o.customRootClass,s=void 0===n?"":n,l=o.className,u=void 0===l?"":l,f=o.color,v=void 0===f?"":f,p=o.variant,d=void 0===p?"":p,m=o.size,y=void 0===m?"":m,b=t(o,["children","customRootClass","className","color","variant","size"]);return r.createElement(c,e({customRootClass:s,className:u,color:v,variant:d,size:y},b),r.createElement(i,null,a))};s.Root=c,s.Content=i;export{s as default};
1
+ 'use client';import r from"react";var e=function(){return e=Object.assign||function(r){for(var e,t=1,o=arguments.length;t<o;t++)for(var a in e=arguments[t])Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=e[a]);return r},e.apply(this,arguments)};function t(r,e){var t={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&e.indexOf(o)<0&&(t[o]=r[o]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(o=Object.getOwnPropertySymbols(r);a<o.length;a++)e.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(r,o[a])&&(t[o[a]]=r[o[a]])}return t}"function"==typeof SuppressedError&&SuppressedError;function o(r){var e,t,a="";if("string"==typeof r||"number"==typeof r)a+=r;else if("object"==typeof r)if(Array.isArray(r)){var n=r.length;for(e=0;e<n;e++)r[e]&&(t=o(r[e]))&&(a&&(a+=" "),a+=t)}else for(t in r)r[t]&&(a&&(a+=" "),a+=t);return a}function a(){for(var r,e,t=0,a="",n=arguments.length;t<n;t++)(r=arguments[t])&&(e=o(r))&&(a&&(a+=" "),a+=e);return a}var n="Badge",c=function(o){var c=o.children,i=o.customRootClass,s=o.className,l=o.variant,u=void 0===l?"":l,f=o.size,v=void 0===f?"":f,d=o.color,p=void 0===d?"":d,m=t(o,["children","customRootClass","className","variant","size","color"]),y=function(r,e){if(void 0===r&&(r=""),r)return r;var t=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(t)}(i,n),b={};return u&&(b["data-badge-variant"]=u),v&&(b["data-badge-size"]=v),p&&(b["data-rad-ui-accent-color"]=p),r.createElement("span",e({className:a(y,s)},b,m),c)};c.displayName=n;var i=function(e){var t=e.children;return r.createElement(r.Fragment,null,t)},s=function(o){var a=o.children,n=o.customRootClass,s=void 0===n?"":n,l=o.className,u=void 0===l?"":l,f=o.color,v=void 0===f?"":f,d=o.variant,p=void 0===d?"":d,m=o.size,y=void 0===m?"":m,b=t(o,["children","customRootClass","className","color","variant","size"]);return r.createElement(c,e({customRootClass:s,className:u,color:v,variant:p,size:y},b),r.createElement(i,null,a))};s.Root=c,s.Content=i;export{s as default};
@@ -1 +1 @@
1
- 'use client';import r from"react";var e=function(){return e=Object.assign||function(r){for(var e,t=1,o=arguments.length;t<o;t++)for(var a in e=arguments[t])Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=e[a]);return r},e.apply(this,arguments)};function t(r){var e,o,a="";if("string"==typeof r||"number"==typeof r)a+=r;else if("object"==typeof r)if(Array.isArray(r)){var n=r.length;for(e=0;e<n;e++)r[e]&&(o=t(r[e]))&&(a&&(a+=" "),a+=o)}else for(o in r)r[o]&&(a&&(a+=" "),a+=o);return a}function o(){for(var r,e,o=0,a="",n=arguments.length;o<n;o++)(r=arguments[o])&&(e=t(r))&&(a&&(a+=" "),a+=e);return a}"function"==typeof SuppressedError&&SuppressedError;var a="BlockQuote",n=function(t){var n=t.children,c=t.customRootClass,i=void 0===c?"":c,l=t.className,s=void 0===l?"":l,f=t.color,u=void 0===f?"":f,p=t.variant,v=void 0===p?"":p,y=t.size,d=void 0===y?"":y,b=function(r,e){var t={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&e.indexOf(o)<0&&(t[o]=r[o]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(o=Object.getOwnPropertySymbols(r);a<o.length;a++)e.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(r,o[a])&&(t[o[a]]=r[o[a]])}return t}(t,["children","customRootClass","className","color","variant","size"]),m=function(r,e){if(void 0===r&&(r=""),r)return r;var t=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(t)}(i,a),O={};return v&&(O["data-block-quote-variant"]=v),d&&(O["data-block-quote-size"]=d),u&&(O["data-accent-color"]=u),r.createElement("blockquote",e({className:o(m,s)},b,O)," ",n)};n.displayName=a;export{n as default};
1
+ 'use client';import r from"react";var e=function(){return e=Object.assign||function(r){for(var e,t=1,o=arguments.length;t<o;t++)for(var a in e=arguments[t])Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=e[a]);return r},e.apply(this,arguments)};function t(r){var e,o,a="";if("string"==typeof r||"number"==typeof r)a+=r;else if("object"==typeof r)if(Array.isArray(r)){var n=r.length;for(e=0;e<n;e++)r[e]&&(o=t(r[e]))&&(a&&(a+=" "),a+=o)}else for(o in r)r[o]&&(a&&(a+=" "),a+=o);return a}function o(){for(var r,e,o=0,a="",n=arguments.length;o<n;o++)(r=arguments[o])&&(e=t(r))&&(a&&(a+=" "),a+=e);return a}"function"==typeof SuppressedError&&SuppressedError;var a="BlockQuote",n=function(t){var n=t.children,c=t.customRootClass,i=void 0===c?"":c,l=t.className,s=void 0===l?"":l,u=t.color,f=void 0===u?"":u,p=t.variant,v=void 0===p?"":p,d=t.size,y=void 0===d?"":d,b=function(r,e){var t={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&e.indexOf(o)<0&&(t[o]=r[o]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(o=Object.getOwnPropertySymbols(r);a<o.length;a++)e.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(r,o[a])&&(t[o[a]]=r[o[a]])}return t}(t,["children","customRootClass","className","color","variant","size"]),m=function(r,e){if(void 0===r&&(r=""),r)return r;var t=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(t)}(i,a),O={};return v&&(O["data-block-quote-variant"]=v),y&&(O["data-block-quote-size"]=y),f&&(O["data-rad-ui-accent-color"]=f),r.createElement("blockquote",e({className:o(m,s)},b,O)," ",n)};n.displayName=a;export{n as default};
@@ -1 +1 @@
1
- 'use client';import r,{useCallback as e}from"react";var t=function(){return t=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++)for(var o in e=arguments[t])Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o]);return r},t.apply(this,arguments)};function n(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(r);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(r,n[o])&&(t[n[o]]=r[n[o]])}return t}"function"==typeof SuppressedError&&SuppressedError;function o(r){var e,t,n="";if("string"==typeof r||"number"==typeof r)n+=r;else if("object"==typeof r)if(Array.isArray(r)){var i=r.length;for(e=0;e<i;e++)r[e]&&(t=o(r[e]))&&(n&&(n+=" "),n+=t)}else for(t in r)r[t]&&(n&&(n+=" "),n+=t);return n}function i(){for(var r,e,t=0,n="",i=arguments.length;t<i;t++)(r=arguments[t])&&(e=o(r))&&(n&&(n+=" "),n+=e);return n}var a=["div","span","button","input"].reduce((function(e,o){return e[o]=function(e){var o=r.forwardRef((function(o,i){var a=o.asChild,c=void 0!==a&&a,l=o.children,u=n(o,["asChild","children"]);if(c){var f=r.Children.toArray(l);if(1!==f.length||!r.isValidElement(f[0]))return console.warn("Primitive.".concat(e,": asChild prop requires exactly one valid child element.")),r.createElement(e,t(t({},u),{ref:i}),l);var s=f[0];return r.cloneElement(s,t(t(t({},u),s.props),i?{ref:function(r){"function"==typeof i?i(r):i&&(i.current=r);var e=s.ref;"function"==typeof e?e(r):e&&(e.current=r)}}:{}))}return r.createElement(e,t(t({},u),{ref:i}),l)}));return o.displayName="Primitive.".concat(e),o}(o),e}),{}),c=function(e){var o=e.role,i=void 0===o?"button":o,c=e.label,l=void 0===c?"":c,u=e.description,f=void 0===u?"":u,s=e.disabled,d=void 0!==s&&s,p=e.children,v=n(e,["role","label","description","disabled","children"]);return l&&(v["aria-label"]=l),f&&(v["aria-description"]=f),d&&(v["aria-disabled"]="true",f||(v["aria-description"]="Disabled Button")),r.createElement(a.button,t({role:i,disabled:d},v),p)},l=function(r,t){return e((function(){return t?Object.fromEntries(Object.entries(t).filter((function(r){r[0];var e=r[1];return void 0!==e&&""!==e})).map((function(e){var t=e[0],n=e[1];return["data-".concat(r,"-").concat(t),n]}))):{}}),[r,t])},u=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return e((function(){return Object.assign.apply(Object,function(r,e,t){if(t||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return r.concat(n||Array.prototype.slice.call(e))}([{}],r.filter((function(r){return null!==r})),!1))}),[r])},f="Button",s=function(e){var o=e.children,a=e.type,s=void 0===a?"button":a,d=e.customRootClass,p=void 0===d?"":d,v=e.className,y=void 0===v?"":v,b=e.variant,m=void 0===b?"":b,h=e.size,O=void 0===h?"":h,g=e.color,j=void 0===g?"":g,E=n(e,["children","type","customRootClass","className","variant","size","color"]),w=function(r,e){if(void 0===r&&(r=""),r)return r;var t=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(t)}(p,f),C=l("button",{variant:m,size:O}),A=l("accent",{color:j}),P=u(C(),A());return r.createElement(c,t({type:s,className:i(w,y)},P(),E),o)};s.displayName=f;export{s as default};
1
+ 'use client';import r,{useCallback as e}from"react";var t=function(){return t=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++)for(var o in e=arguments[t])Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o]);return r},t.apply(this,arguments)};function n(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(r);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(r,n[o])&&(t[n[o]]=r[n[o]])}return t}"function"==typeof SuppressedError&&SuppressedError;function o(r){var e,t,n="";if("string"==typeof r||"number"==typeof r)n+=r;else if("object"==typeof r)if(Array.isArray(r)){var i=r.length;for(e=0;e<i;e++)r[e]&&(t=o(r[e]))&&(n&&(n+=" "),n+=t)}else for(t in r)r[t]&&(n&&(n+=" "),n+=t);return n}function i(){for(var r,e,t=0,n="",i=arguments.length;t<i;t++)(r=arguments[t])&&(e=o(r))&&(n&&(n+=" "),n+=e);return n}var a=["div","span","button","input","a"].reduce((function(e,o){return e[o]=function(e){var o=r.forwardRef((function(o,i){var a=o.asChild,c=void 0!==a&&a,l=o.children,u=n(o,["asChild","children"]);if(c){var f=r.Children.toArray(l);if(1!==f.length||!r.isValidElement(f[0]))return console.warn("Primitive.".concat(e,": asChild prop requires exactly one valid child element.")),r.createElement(e,t(t({},u),{ref:i}),l);var s=f[0];return r.cloneElement(s,t(t(t({},u),s.props),i?{ref:function(r){"function"==typeof i?i(r):i&&(i.current=r);var e=s.ref;"function"==typeof e?e(r):e&&(e.current=r)}}:{}))}return r.createElement(e,t(t({},u),{ref:i}),l)}));return o.displayName="Primitive.".concat(e),o}(o),e}),{}),c=function(e){var o=e.role,i=void 0===o?"button":o,c=e.label,l=void 0===c?"":c,u=e.description,f=void 0===u?"":u,s=e.disabled,d=void 0!==s&&s,p=e.children,v=n(e,["role","label","description","disabled","children"]);return l&&(v["aria-label"]=l),f&&(v["aria-description"]=f),d&&(v["aria-disabled"]="true",f||(v["aria-description"]="Disabled Button")),r.createElement(a.button,t({role:i,disabled:d},v),p)},l=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return e((function(){return Object.assign.apply(Object,function(r,e,t){if(t||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return r.concat(n||Array.prototype.slice.call(e))}([{}],r.filter((function(r){return null!==r})),!1))}),[r])},u="Button",f=function(o){var a,f,s=o.children,d=o.type,p=void 0===d?"button":d,v=o.customRootClass,y=void 0===v?"":v,b=o.className,m=void 0===b?"":b,h=o.variant,O=void 0===h?"":h,g=o.size,j=void 0===g?"":g,E=o.color,w=void 0===E?"":E,C=n(o,["children","type","customRootClass","className","variant","size","color"]),A=function(r,e){if(void 0===r&&(r=""),r)return r;var t=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(t)}(y,u),P=e((function(){return f?Object.fromEntries(Object.entries(f).filter((function(r){r[0];var e=r[1];return void 0!==e&&""!==e})).map((function(r){var e=r[0],t=r[1];return["data-".concat(a,"-").concat(e),t]}))):{}}),[a="button",f={variant:O,size:j}]),N=function(r){return e((function(){return r?{"data-rad-ui-accent-color":r}:{}}),[r])}(w),x=l(P(),N());return r.createElement(c,t({type:p,className:i(A,m)},x(),C),s)};f.displayName=u;export{f as default};
@@ -1 +1 @@
1
- 'use client';import r from"react";var o=function(){return o=Object.assign||function(r){for(var o,t=1,e=arguments.length;t<e;t++)for(var a in o=arguments[t])Object.prototype.hasOwnProperty.call(o,a)&&(r[a]=o[a]);return r},o.apply(this,arguments)};function t(r,o){var t={};for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&o.indexOf(e)<0&&(t[e]=r[e]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(e=Object.getOwnPropertySymbols(r);a<e.length;a++)o.indexOf(e[a])<0&&Object.prototype.propertyIsEnumerable.call(r,e[a])&&(t[e[a]]=r[e[a]])}return t}function e(r){var o,t,a="";if("string"==typeof r||"number"==typeof r)a+=r;else if("object"==typeof r)if(Array.isArray(r)){var n=r.length;for(o=0;o<n;o++)r[o]&&(t=e(r[o]))&&(a&&(a+=" "),a+=t)}else for(t in r)r[t]&&(a&&(a+=" "),a+=t);return a}function a(){for(var r,o,t=0,a="",n=arguments.length;t<n;t++)(r=arguments[t])&&(o=e(r))&&(a&&(a+=" "),a+=o);return a}"function"==typeof SuppressedError&&SuppressedError;var n="Callout",l=function(e){var l=e.children,c=e.className,i=e.color,s=e.variant,u=void 0===s?"":s,f=e.size,v=void 0===f?"":f,p=e.customRootClass,d=t(e,["children","className","color","variant","size","customRootClass"]),m=function(r,o){if(void 0===r&&(r=""),r)return r;var t=o.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(t)}(p,n),y={};return u&&(y["data-callout-variant"]=u),v&&(y["data-callout-size"]=v),i&&(y["data-accent-color"]=i),r.createElement("div",o({className:a(m,c),"data-accent-color":null!=i?i:void 0},y,d),l)};l.displayName=n;var c=function(e){var n=e.children,c=e.className,i=void 0===c?"":c,s=e.color,u=e.variant,f=void 0===u?"":u,v=e.size,p=void 0===v?"":v,d=e.customRootClass,m=t(e,["children","className","color","variant","size","customRootClass"]);return r.createElement(l,o({customRootClass:d,className:a(i),color:null!=s?s:void 0,variant:f,size:p},m),n)};c.displayName="Callout",c.Root=l;export{c as default};
1
+ 'use client';import r from"react";var o=function(){return o=Object.assign||function(r){for(var o,t=1,a=arguments.length;t<a;t++)for(var e in o=arguments[t])Object.prototype.hasOwnProperty.call(o,e)&&(r[e]=o[e]);return r},o.apply(this,arguments)};function t(r,o){var t={};for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&o.indexOf(a)<0&&(t[a]=r[a]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var e=0;for(a=Object.getOwnPropertySymbols(r);e<a.length;e++)o.indexOf(a[e])<0&&Object.prototype.propertyIsEnumerable.call(r,a[e])&&(t[a[e]]=r[a[e]])}return t}function a(r){var o,t,e="";if("string"==typeof r||"number"==typeof r)e+=r;else if("object"==typeof r)if(Array.isArray(r)){var n=r.length;for(o=0;o<n;o++)r[o]&&(t=a(r[o]))&&(e&&(e+=" "),e+=t)}else for(t in r)r[t]&&(e&&(e+=" "),e+=t);return e}function e(){for(var r,o,t=0,e="",n=arguments.length;t<n;t++)(r=arguments[t])&&(o=a(r))&&(e&&(e+=" "),e+=o);return e}"function"==typeof SuppressedError&&SuppressedError;var n="Callout",l=function(a){var l=a.children,c=a.className,i=a.color,s=a.variant,u=void 0===s?"":s,f=a.size,v=void 0===f?"":f,p=a.customRootClass,d=t(a,["children","className","color","variant","size","customRootClass"]),m=function(r,o){if(void 0===r&&(r=""),r)return r;var t=o.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(t)}(p,n),y={};return u&&(y["data-callout-variant"]=u),v&&(y["data-callout-size"]=v),i&&(y["data-rad-ui-accent-color"]=i),r.createElement("div",o({className:e(m,c),"data-rad-ui-accent-color":null!=i?i:void 0},y,d),l)};l.displayName=n;var c=function(a){var n=a.children,c=a.className,i=void 0===c?"":c,s=a.color,u=a.variant,f=void 0===u?"":u,v=a.size,p=void 0===v?"":v,d=a.customRootClass,m=t(a,["children","className","color","variant","size","customRootClass"]);return r.createElement(l,o({customRootClass:d,className:e(i),color:null!=s?s:void 0,variant:f,size:p},m),n)};c.displayName="Callout",c.Root=l;export{c as default};
@@ -1 +1 @@
1
- 'use client';import r from"react";var e=function(){return e=Object.assign||function(r){for(var e,t=1,o=arguments.length;t<o;t++)for(var a in e=arguments[t])Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=e[a]);return r},e.apply(this,arguments)};function t(r,e){var t={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&e.indexOf(o)<0&&(t[o]=r[o]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(o=Object.getOwnPropertySymbols(r);a<o.length;a++)e.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(r,o[a])&&(t[o[a]]=r[o[a]])}return t}"function"==typeof SuppressedError&&SuppressedError;function o(r){var e,t,a="";if("string"==typeof r||"number"==typeof r)a+=r;else if("object"==typeof r)if(Array.isArray(r)){var n=r.length;for(e=0;e<n;e++)r[e]&&(t=o(r[e]))&&(a&&(a+=" "),a+=t)}else for(t in r)r[t]&&(a&&(a+=" "),a+=t);return a}function a(){for(var r,e,t=0,a="",n=arguments.length;t<n;t++)(r=arguments[t])&&(e=o(r))&&(a&&(a+=" "),a+=e);return a}var n="Card",s=function(o){var s=o.children,c=o.customRootClass,l=o.className,i=void 0===l?"":l,f=t(o,["children","customRootClass","className"]),u=function(r,e){if(void 0===r&&(r=""),r)return r;var t=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(t)}(c,n);return r.createElement("div",e({className:a(u,i)},f),s)};s.displayName=n;var c=function(o){var n=o.children,c=o.className,l=void 0===c?"":c,i=o.customRootClass,f=t(o,["children","className","customRootClass"]);return r.createElement(s,e({className:a(l),customRootClass:i},f),n)};c.Root=s;export{c as default};
1
+ 'use client';import r,{useCallback as t}from"react";var e=function(){return e=Object.assign||function(r){for(var t,e=1,o=arguments.length;e<o;e++)for(var a in t=arguments[e])Object.prototype.hasOwnProperty.call(t,a)&&(r[a]=t[a]);return r},e.apply(this,arguments)};function o(r,t){var e={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(e[o]=r[o]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(o=Object.getOwnPropertySymbols(r);a<o.length;a++)t.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(r,o[a])&&(e[o[a]]=r[o[a]])}return e}"function"==typeof SuppressedError&&SuppressedError;function a(r){var t,e,o="";if("string"==typeof r||"number"==typeof r)o+=r;else if("object"==typeof r)if(Array.isArray(r)){var n=r.length;for(t=0;t<n;t++)r[t]&&(e=a(r[t]))&&(o&&(o+=" "),o+=e)}else for(e in r)r[e]&&(o&&(o+=" "),o+=e);return o}function n(){for(var r,t,e=0,o="",n=arguments.length;e<n;e++)(r=arguments[e])&&(t=a(r))&&(o&&(o+=" "),o+=t);return o}var i="Card",s=function(a){var s,c,l=a.children,u=a.customRootClass,f=a.className,v=void 0===f?"":f,p=a.variant,d=void 0===p?"":p,m=a.size,y=void 0===m?"":m,O=o(a,["children","customRootClass","className","variant","size"]),b=function(r,t){if(void 0===r&&(r=""),r)return r;var e=t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(e)}(u,i),h=t((function(){return c?Object.fromEntries(Object.entries(c).filter((function(r){r[0];var t=r[1];return void 0!==t&&""!==t})).map((function(r){var t=r[0],e=r[1];return["data-".concat(s,"-").concat(t),e]}))):{}}),[s="card",c={variant:d,size:y}]);return r.createElement("div",e({className:n(b,v)},h(),O),l)};s.displayName=i;var c=function(t){var a=t.children,i=t.className,c=void 0===i?"":i,l=t.customRootClass,u=t.variant,f=void 0===u?"":u,v=t.size,p=void 0===v?"":v,d=o(t,["children","className","customRootClass","variant","size"]);return r.createElement(s,e({className:n(c),customRootClass:l,variant:f,size:p},d),a)};c.Root=s;export{c as default};
@@ -1 +1 @@
1
- 'use client';import r from"react";var e=function(){return e=Object.assign||function(r){for(var e,t=1,o=arguments.length;t<o;t++)for(var a in e=arguments[t])Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=e[a]);return r},e.apply(this,arguments)};function t(r){var e,o,a="";if("string"==typeof r||"number"==typeof r)a+=r;else if("object"==typeof r)if(Array.isArray(r)){var n=r.length;for(e=0;e<n;e++)r[e]&&(o=t(r[e]))&&(a&&(a+=" "),a+=o)}else for(o in r)r[o]&&(a&&(a+=" "),a+=o);return a}function o(){for(var r,e,o=0,a="",n=arguments.length;o<n;o++)(r=arguments[o])&&(e=t(r))&&(a&&(a+=" "),a+=e);return a}"function"==typeof SuppressedError&&SuppressedError;var a=function(t){var a=t.children,n=t.customRootClass,i=void 0===n?"":n,c=t.color,f=void 0===c?"":c,s=t.variant,u=void 0===s?"":s,d=t.size,l=void 0===d?"":d,p=function(r,e){if(void 0===r&&(r=""),r)return r;var t=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(t)}(i,"Code"),v={};return u&&(v["data-code-variant"]=u),l&&(v["data-code-size"]=l),f&&(v["data-accent-color"]=f),r.createElement("code",e({className:o(p)},v),a)};export{a as default};
1
+ 'use client';import r from"react";var e=function(){return e=Object.assign||function(r){for(var e,t=1,o=arguments.length;t<o;t++)for(var a in e=arguments[t])Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=e[a]);return r},e.apply(this,arguments)};function t(r){var e,o,a="";if("string"==typeof r||"number"==typeof r)a+=r;else if("object"==typeof r)if(Array.isArray(r)){var n=r.length;for(e=0;e<n;e++)r[e]&&(o=t(r[e]))&&(a&&(a+=" "),a+=o)}else for(o in r)r[o]&&(a&&(a+=" "),a+=o);return a}function o(){for(var r,e,o=0,a="",n=arguments.length;o<n;o++)(r=arguments[o])&&(e=t(r))&&(a&&(a+=" "),a+=e);return a}"function"==typeof SuppressedError&&SuppressedError;var a=function(t){var a=t.children,n=t.customRootClass,i=void 0===n?"":n,c=t.color,f=void 0===c?"":c,s=t.variant,u=void 0===s?"":s,d=t.size,l=void 0===d?"":d,p=function(r,e){if(void 0===r&&(r=""),r)return r;var t=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(t)}(i,"Code"),v={};return u&&(v["data-code-variant"]=u),l&&(v["data-code-size"]=l),f&&(v["data-rad-ui-accent-color"]=f),r.createElement("code",e({className:o(p)},v),a)};export{a as default};
@@ -1 +1 @@
1
- 'use client';import n,{createContext as e,useContext as t,useState as r,useRef as o,useEffect as i,useCallback as a,useId as c}from"react";function l(n){var e,t,r="";if("string"==typeof n||"number"==typeof n)r+=n;else if("object"==typeof n)if(Array.isArray(n)){var o=n.length;for(e=0;e<o;e++)n[e]&&(t=l(n[e]))&&(r&&(r+=" "),r+=t)}else for(t in n)n[t]&&(r&&(r+=" "),r+=t);return r}function u(){for(var n,e,t=0,r="",o=arguments.length;t<o;t++)(n=arguments[t])&&(e=l(n))&&(r&&(r+=" "),r+=e);return r}var s=e({rootClass:"",open:!1,onOpenChange:function(){},disabled:!1,defaultOpen:!1}),d=function(){return d=Object.assign||function(n){for(var e,t=1,r=arguments.length;t<r;t++)for(var o in e=arguments[t])Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n},d.apply(this,arguments)};function f(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(n);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(n,r[o])&&(t[r[o]]=n[r[o]])}return t}"function"==typeof SuppressedError&&SuppressedError;var p=["div","span","button","input"].reduce((function(e,t){return e[t]=function(e){var t=n.forwardRef((function(t,r){var o=t.asChild,i=void 0!==o&&o,a=t.children,c=f(t,["asChild","children"]);if(i){var l=n.Children.toArray(a);if(1!==l.length||!n.isValidElement(l[0]))return console.warn("Primitive.".concat(e,": asChild prop requires exactly one valid child element.")),n.createElement(e,d(d({},c),{ref:r}),a);var u=l[0];return n.cloneElement(u,d(d(d({},c),u.props),r?{ref:function(n){"function"==typeof r?r(n):r&&(r.current=n);var e=u.ref;"function"==typeof e?e(n):e&&(e.current=n)}}:{}))}return n.createElement(e,d(d({},c),{ref:r}),a)}));return t.displayName="Primitive.".concat(e),t}(t),e}),{}),v=e(void 0),m=function(){var n=t(v);if(!n)throw new Error("Collapsible compound components must be used within a CollapsiblePrimitive.Root component");return n};var h=n.forwardRef((function(e,t){var a=e.children,c=e.className;e.asChild;var l=f(e,["children","className","asChild"]),u=m(),s=u.open,v=u.contentId,h=u.transitionDuration,g=u.transitionTimingFunction,C=o(null),b=t||C,y=r(s?void 0:0),O=y[0],E=y[1],w=r(s),N=w[0],T=w[1],P=o(),A=o();return i((function(){s&&T(!0)}),[s]),i((function(){if(P.current&&clearTimeout(P.current),A.current&&cancelAnimationFrame(A.current),C.current){if(0===h)return E(s?void 0:0),void(s||setTimeout((function(){return T(!1)}),0));if(s)E(0),A.current=requestAnimationFrame((function(){var n;null===(n=C.current)||void 0===n||n.offsetHeight,A.current=requestAnimationFrame((function(){if(C.current){var n=C.current.scrollHeight;E(n)}}))})),P.current=setTimeout((function(){E(void 0)}),h);else{var n=C.current.scrollHeight;E(n),A.current=requestAnimationFrame((function(){var n;null===(n=C.current)||void 0===n||n.offsetHeight,A.current=requestAnimationFrame((function(){E(0)}))})),P.current=setTimeout((function(){T(!1)}),h)}return function(){P.current&&clearTimeout(P.current),A.current&&cancelAnimationFrame(A.current)}}}),[s,h]),N||s?n.createElement(p.div,d({id:v,ref:b,"aria-hidden":!s,"data-state":s?"open":"closed",className:c,style:d({height:void 0!==O?"".concat(O,"px"):void 0,overflow:"hidden"},h>0?{transition:"height ".concat(h,"ms ").concat(g)}:{})},l),a):null}));h.displayName="CollapsiblePrimitiveContent";var g=n.forwardRef((function(e,t){var r=e.children,o=e.asChild,i=void 0!==o&&o,a=f(e,["children","asChild"]),c=m(),l=c.open,u=c.onOpenChange,s=c.disabled,v=c.contentId;return n.createElement(p.button,d({"aria-controls":v,"aria-expanded":l,"data-state":l?"open":"closed","data-disabled":s?"true":void 0,ref:t,onClick:function(n){var e;null===(e=a.onClick)||void 0===e||e.call(a,n),s||u(!l)},asChild:i},a),r)}));g.displayName="CollapsiblePrimitiveTrigger";var C=function(){return console.warn("Direct usage of CollapsiblePrimitive is not supported. Please use CollapsiblePrimitive.Root, CollapsiblePrimitive.Content, etc. instead."),null};C.Root=function(e){var t=e.children,l=e.defaultOpen,u=void 0!==l&&l,s=e.open,m=e.onOpenChange,h=e.disabled,g=void 0!==h&&h,C=e.transitionDuration,b=void 0===C?300:C,y=e.transitionTimingFunction,O=void 0===y?"linear":y,E=f(e,["children","defaultOpen","open","onOpenChange","disabled","transitionDuration","transitionTimingFunction"]),w=c(),N=function(n,e,t){var c=r(e),l=c[0],u=c[1],s=void 0!==n,d=s?n:l,f=o(s),p=o(n);i((function(){"production"!==process.env.NODE_ENV&&(f.current!==s&&console.warn("Component changed from ".concat(f.current?"controlled":"uncontrolled"," to ").concat(s?"controlled":"uncontrolled",".")),f.current=s)}),[s]),i((function(){"production"!==process.env.NODE_ENV&&s&&!t&&n!==p.current&&console.warn("A component is changing a controlled value without an onChange handler. This will render a controlled component as uncontrolled."),p.current=n}),[n,s,t]);var v=a((function(n){var e="function"==typeof n?n(d):n;s||u(e),t&&t(e)}),[s,t,d]);return[d,v]}(s,u,m),T=N[0],P=N[1];return n.createElement(v.Provider,{value:{open:T,onOpenChange:function(n){g||P(n)},disabled:g,contentId:w,transitionDuration:b,transitionTimingFunction:O}},n.createElement(p.div,d({},E,{"data-state":T?"open":"closed","data-disabled":g?"":void 0}),t))},C.Content=h,C.Trigger=g;var b=function(){return console.warn("Direct usage of Tabs is not supported. Please use Tabs.Root, Tabs.List, etc. instead."),null};b.Root=function(e){var t=e.children,r=e.className,o=void 0===r?"":r,i=e.transitionDuration,a=void 0===i?0:i,c=e.disabled,l=e.customRootClass,d=e.open,f=e.defaultOpen,p=e.onOpenChange,v=function(n,e){if(void 0===n&&(n=""),n)return n;var t=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(t)}(l,"Collapsible");return n.createElement(s.Provider,{value:{rootClass:v}},n.createElement(C.Root,{className:u(v,o),defaultOpen:f,open:d,onOpenChange:p,disabled:c,transitionDuration:a},t))},b.Trigger=function(e){var r=e.children,o=e.className,i=f(e,["children","className"]),a=t(s).rootClass,c=a?"".concat(a,"-trigger"):"";return n.createElement(C.Trigger,d({className:u(c,o)},i),r)},b.Content=function(e){var r=e.children,o=e.className,i=void 0===o?"":o,a=t(s).rootClass,c=a?"".concat(a,"-content"):"";return n.createElement(C.Content,{className:u(c,i)},r)};export{b as default};
1
+ 'use client';import n,{createContext as e,useContext as t,useState as r,useRef as o,useEffect as i,useCallback as a,useId as c}from"react";function l(n){var e,t,r="";if("string"==typeof n||"number"==typeof n)r+=n;else if("object"==typeof n)if(Array.isArray(n)){var o=n.length;for(e=0;e<o;e++)n[e]&&(t=l(n[e]))&&(r&&(r+=" "),r+=t)}else for(t in n)n[t]&&(r&&(r+=" "),r+=t);return r}function u(){for(var n,e,t=0,r="",o=arguments.length;t<o;t++)(n=arguments[t])&&(e=l(n))&&(r&&(r+=" "),r+=e);return r}var s=e({rootClass:"",open:!1,onOpenChange:function(){},disabled:!1,defaultOpen:!1}),d=function(){return d=Object.assign||function(n){for(var e,t=1,r=arguments.length;t<r;t++)for(var o in e=arguments[t])Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n},d.apply(this,arguments)};function f(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(n);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(n,r[o])&&(t[r[o]]=n[r[o]])}return t}"function"==typeof SuppressedError&&SuppressedError;var p=["div","span","button","input","a"].reduce((function(e,t){return e[t]=function(e){var t=n.forwardRef((function(t,r){var o=t.asChild,i=void 0!==o&&o,a=t.children,c=f(t,["asChild","children"]);if(i){var l=n.Children.toArray(a);if(1!==l.length||!n.isValidElement(l[0]))return console.warn("Primitive.".concat(e,": asChild prop requires exactly one valid child element.")),n.createElement(e,d(d({},c),{ref:r}),a);var u=l[0];return n.cloneElement(u,d(d(d({},c),u.props),r?{ref:function(n){"function"==typeof r?r(n):r&&(r.current=n);var e=u.ref;"function"==typeof e?e(n):e&&(e.current=n)}}:{}))}return n.createElement(e,d(d({},c),{ref:r}),a)}));return t.displayName="Primitive.".concat(e),t}(t),e}),{}),v=e(void 0),m=function(){var n=t(v);if(!n)throw new Error("Collapsible compound components must be used within a CollapsiblePrimitive.Root component");return n};var h=n.forwardRef((function(e,t){var a=e.children,c=e.className;e.asChild;var l=f(e,["children","className","asChild"]),u=m(),s=u.open,v=u.contentId,h=u.transitionDuration,g=u.transitionTimingFunction,C=o(null),b=t||C,y=r(s?void 0:0),O=y[0],E=y[1],w=r(s),N=w[0],T=w[1],P=o(),A=o();return i((function(){s&&T(!0)}),[s]),i((function(){if(P.current&&clearTimeout(P.current),A.current&&cancelAnimationFrame(A.current),C.current){if(0===h)return E(s?void 0:0),void(s||setTimeout((function(){return T(!1)}),0));if(s)E(0),A.current=requestAnimationFrame((function(){var n;null===(n=C.current)||void 0===n||n.offsetHeight,A.current=requestAnimationFrame((function(){if(C.current){var n=C.current.scrollHeight;E(n)}}))})),P.current=setTimeout((function(){E(void 0)}),h);else{var n=C.current.scrollHeight;E(n),A.current=requestAnimationFrame((function(){var n;null===(n=C.current)||void 0===n||n.offsetHeight,A.current=requestAnimationFrame((function(){E(0)}))})),P.current=setTimeout((function(){T(!1)}),h)}return function(){P.current&&clearTimeout(P.current),A.current&&cancelAnimationFrame(A.current)}}}),[s,h]),N||s?n.createElement(p.div,d({id:v,ref:b,"aria-hidden":!s,"data-state":s?"open":"closed",className:c,style:d({height:void 0!==O?"".concat(O,"px"):void 0,overflow:"hidden"},h>0?{transition:"height ".concat(h,"ms ").concat(g)}:{})},l),a):null}));h.displayName="CollapsiblePrimitiveContent";var g=n.forwardRef((function(e,t){var r=e.children,o=e.asChild,i=void 0!==o&&o,a=f(e,["children","asChild"]),c=m(),l=c.open,u=c.onOpenChange,s=c.disabled,v=c.contentId;return n.createElement(p.button,d({"aria-controls":v,"aria-expanded":l,"data-state":l?"open":"closed","data-disabled":s?"true":void 0,ref:t,onClick:function(n){var e;null===(e=a.onClick)||void 0===e||e.call(a,n),s||u(!l)},asChild:i},a),r)}));g.displayName="CollapsiblePrimitiveTrigger";var C=function(){return console.warn("Direct usage of CollapsiblePrimitive is not supported. Please use CollapsiblePrimitive.Root, CollapsiblePrimitive.Content, etc. instead."),null};C.Root=function(e){var t=e.children,l=e.defaultOpen,u=void 0!==l&&l,s=e.open,m=e.onOpenChange,h=e.disabled,g=void 0!==h&&h,C=e.transitionDuration,b=void 0===C?300:C,y=e.transitionTimingFunction,O=void 0===y?"linear":y,E=f(e,["children","defaultOpen","open","onOpenChange","disabled","transitionDuration","transitionTimingFunction"]),w=c(),N=function(n,e,t){var c=r(e),l=c[0],u=c[1],s=void 0!==n,d=s?n:l,f=o(s),p=o(n);i((function(){"production"!==process.env.NODE_ENV&&(f.current!==s&&console.warn("Component changed from ".concat(f.current?"controlled":"uncontrolled"," to ").concat(s?"controlled":"uncontrolled",".")),f.current=s)}),[s]),i((function(){"production"!==process.env.NODE_ENV&&s&&!t&&n!==p.current&&console.warn("A component is changing a controlled value without an onChange handler. This will render a controlled component as uncontrolled."),p.current=n}),[n,s,t]);var v=a((function(n){var e="function"==typeof n?n(d):n;s||u(e),t&&t(e)}),[s,t,d]);return[d,v]}(s,u,m),T=N[0],P=N[1];return n.createElement(v.Provider,{value:{open:T,onOpenChange:function(n){g||P(n)},disabled:g,contentId:w,transitionDuration:b,transitionTimingFunction:O}},n.createElement(p.div,d({},E,{"data-state":T?"open":"closed","data-disabled":g?"":void 0}),t))},C.Content=h,C.Trigger=g;var b=function(){return console.warn("Direct usage of Tabs is not supported. Please use Tabs.Root, Tabs.List, etc. instead."),null};b.Root=function(e){var t=e.children,r=e.className,o=void 0===r?"":r,i=e.transitionDuration,a=void 0===i?0:i,c=e.disabled,l=e.customRootClass,d=e.open,f=e.defaultOpen,p=e.onOpenChange,v=function(n,e){if(void 0===n&&(n=""),n)return n;var t=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(t)}(l,"Collapsible");return n.createElement(s.Provider,{value:{rootClass:v}},n.createElement(C.Root,{className:u(v,o),defaultOpen:f,open:d,onOpenChange:p,disabled:c,transitionDuration:a},t))},b.Trigger=function(e){var r=e.children,o=e.className,i=f(e,["children","className"]),a=t(s).rootClass,c=a?"".concat(a,"-trigger"):"";return n.createElement(C.Trigger,d({className:u(c,o)},i),r)},b.Content=function(e){var r=e.children,o=e.className,i=void 0===o?"":o,a=t(s).rootClass,c=a?"".concat(a,"-content"):"";return n.createElement(C.Content,{className:u(c,i)},r)};export{b as default};
@@ -0,0 +1 @@
1
+ 'use client';import e,{createContext as t,useContext as r}from"react";var a=function(){return a=Object.assign||function(e){for(var t,r=1,a=arguments.length;r<a;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};function o(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(r[a[o]]=e[a[o]])}return r}"function"==typeof SuppressedError&&SuppressedError;var n=t({rootClass:"DataList"});function s(e){var t,r,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=s(e[t]))&&(a&&(a+=" "),a+=r)}else for(r in e)e[r]&&(a&&(a+=" "),a+=r);return a}function c(){for(var e,t,r=0,a="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=s(e))&&(a&&(a+=" "),a+=t);return a}var l=function(){return console.warn("Direct usage of DataList is not supported. Please use DataList.Root, DataList.Item, etc. instead."),null};l.Root=function(t){var r=t.children,s=t.className,l=void 0===s?"":s,i=t.customRootClass,u=void 0===i?"":i,f=o(t,["children","className","customRootClass"]),d=function(e,t){if(void 0===e&&(e=""),e)return e;var r=t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();return"".concat("rad-ui","-").concat(r)}(u,"DataList");return e.createElement(n.Provider,{value:{rootClass:d}},e.createElement("div",a({className:c(d,l)},f),r))},l.Item=function(t){var s=t.children,l=t.className,i=void 0===l?"":l,u=o(t,["children","className"]),f=r(n).rootClass;return e.createElement("div",a({className:c("".concat(f,"-item"),i)},u),s)},l.Label=function(t){var s=t.children,l=t.className,i=void 0===l?"":l,u=o(t,["children","className"]),f=r(n).rootClass;return e.createElement("dt",a({className:c("".concat(f,"-label"),i)},u),s)},l.Value=function(t){var s=t.children,l=t.className,i=void 0===l?"":l,u=o(t,["children","className"]),f=r(n).rootClass;return e.createElement("dd",a({className:c("".concat(f,"-value"),i)},u),s)};export{l as default};