dst-rg 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/index-BOTEqled.js +198 -0
- package/dist/assets/index-CFvpPuYw.css +1 -0
- package/dist/index.d.ts +4 -3
- package/dist/index.html +2 -2
- package/dist/index.js +16 -5
- package/dist/index.mjs +15 -4
- package/dist/style.css +1 -1
- package/package.json +5 -3
- package/src/components/Breadcrumbs/_.stories.tsx +1 -1
- package/src/components/Breadcrumbs/_.type.ts +1 -0
- package/src/components/Breadcrumbs/index.tsx +16 -9
- package/src/components/Input/_.stories.tsx +2 -7
- package/src/components/Input/_.style.ts +5 -9
- package/src/components/Input/_.test.tsx +8 -33
- package/src/components/Input/_.types.ts +1 -2
- package/src/components/Input/index.tsx +14 -14
- package/src/components/InputTags/_.stories.tsx +0 -6
- package/src/components/InputTags/_.style.ts +3 -3
- package/src/components/InputTags/_.test.tsx +4 -11
- package/src/components/InputTags/_.types.ts +1 -2
- package/src/components/InputTags/index.tsx +9 -10
- package/src/components/Select/_.stories.tsx +1 -1
- package/src/components/Select/_.types.ts +1 -1
- package/src/components/Select/index.tsx +4 -4
- package/src/components/TextArea/_.stories.tsx +3 -12
- package/src/components/TextArea/_.style.ts +3 -3
- package/src/components/TextArea/_.test.tsx +3 -5
- package/src/components/TextArea/_.types.ts +1 -2
- package/src/components/TextArea/index.tsx +7 -8
- package/src/components/developers/AmirHossein.tsx +4 -6
- package/src/components/developers/Rasoul.tsx +18 -1
- package/src/main.tsx +10 -3
- package/dist/assets/index-3jvN1gZ8.js +0 -186
- package/dist/assets/index-Mg-hjQGu.css +0 -1
- package/src/components/Breadcrumbs/_.test.tsx +0 -29
package/dist/index.js
CHANGED
|
@@ -1,27 +1,38 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),t=require("react"),r=require("react-dom");function n(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}}),t.default=e,Object.freeze(t)}var o=n(t),s=n(r);function a(t,r=[]){let n=[];const s=()=>{const e=n.map(e=>o.createContext(e));return function(r){const n=r?.[t]||e;return o.useMemo(()=>({[`__scope${t}`]:{...r,[t]:n}}),[r,n])}};return s.scopeName=t,[function(r,s){const a=o.createContext(s),i=n.length;n=[...n,s];const l=r=>{const{scope:n,children:s,...l}=r,d=n?.[t]?.[i]||a,c=o.useMemo(()=>l,Object.values(l));return e.jsx(d.Provider,{value:c,children:s})};return l.displayName=r+"Provider",[l,function(e,n){const l=n?.[t]?.[i]||a,d=o.useContext(l);if(d)return d;if(void 0!==s)return s;throw new Error(`\`${e}\` must be used within \`${r}\``)}]},i(s,...r)]}function i(...e){const t=e[0];if(1===e.length)return t;const r=()=>{const r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const n=r.reduce((t,{useScope:r,scopeName:n})=>({...t,...r(e)[`__scope${n}`]}),{});return o.useMemo(()=>({[`__scope${t.scopeName}`]:n}),[n])}};return r.scopeName=t.scopeName,r}function l(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function d(...e){return t=>{let r=!1;const n=e.map(e=>{const n=l(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){const r=n[t];"function"==typeof r?r():l(e[t],null)}}}}function c(...e){return o.useCallback(d(...e),e)}function u(t){const r=f(t),n=o.forwardRef((t,n)=>{const{children:s,...a}=t,i=o.Children.toArray(s),l=i.find(h);if(l){const t=l.props.children,s=i.map(e=>e===l?o.Children.count(t)>1?o.Children.only(null):o.isValidElement(t)?t.props.children:null:e);return e.jsx(r,{...a,ref:n,children:o.isValidElement(t)?o.cloneElement(t,void 0,s):null})}return e.jsx(r,{...a,ref:n,children:s})});return n.displayName=`${t}.Slot`,n}var m=u("Slot");function f(e){const t=o.forwardRef((e,t)=>{const{children:r,...n}=e;if(o.isValidElement(r)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(r),s=function(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...e)=>{const t=s(...e);return o(...e),t}:o&&(r[n]=o):"style"===n?r[n]={...o,...s}:"className"===n&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props);return r.type!==o.Fragment&&(s.ref=t?d(t,e):e),o.cloneElement(r,s)}return o.Children.count(r)>1?o.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var p=Symbol("radix.slottable");function h(e){return o.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===p}function x(r){const n=r+"CollectionProvider",[o,s]=a(n),[i,l]=o(n,{collectionRef:{current:null},itemMap:new Map}),d=r=>{const{scope:n,children:o}=r,s=t.useRef(null),a=t.useRef(new Map).current;return e.jsx(i,{scope:n,itemMap:a,collectionRef:s,children:o})};d.displayName=n;const m=r+"CollectionSlot",f=u(m),p=t.forwardRef((t,r)=>{const{scope:n,children:o}=t,s=c(r,l(m,n).collectionRef);return e.jsx(f,{ref:s,children:o})});p.displayName=m;const h=r+"CollectionItemSlot",x="data-radix-collection-item",g=u(h),b=t.forwardRef((r,n)=>{const{scope:o,children:s,...a}=r,i=t.useRef(null),d=c(n,i),u=l(h,o);return t.useEffect(()=>(u.itemMap.set(i,{ref:i,...a}),()=>{u.itemMap.delete(i)})),e.jsx(g,{[x]:"",ref:d,children:s})});return b.displayName=h,[{Provider:d,Slot:p,ItemSlot:b},function(e){const n=l(r+"CollectionConsumer",e);return t.useCallback(()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${x}]`));return Array.from(n.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[n.collectionRef,n.itemMap])},s]}function g(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}var b=globalThis?.document?o.useLayoutEffect:()=>{},y=o[" useInsertionEffect ".trim().toString()]||b;function v({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[s,a,i]=function({defaultProp:e,onChange:t}){const[r,n]=o.useState(e),s=o.useRef(r),a=o.useRef(t);return y(()=>{a.current=t},[t]),o.useEffect(()=>{s.current!==r&&(a.current?.(r),s.current=r)},[r,s]),[r,n,a]}({defaultProp:t,onChange:r}),l=void 0!==e,d=l?e:s;{const t=o.useRef(void 0!==e);o.useEffect(()=>{const e=t.current;if(e!==l){const t=e?"controlled":"uncontrolled",r=l?"controlled":"uncontrolled";console.warn(`${n} is changing from ${t} to ${r}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=l},[l,n])}const c=o.useCallback(t=>{if(l){const r=function(e){return"function"==typeof e}(t)?t(e):t;r!==e&&i.current?.(r)}else a(t)},[l,e,a,i]);return[d,c]}var w=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,r)=>{const n=u(`Primitive.${r}`),s=o.forwardRef((t,o)=>{const{asChild:s,...a}=t,i=s?n:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),e.jsx(i,{...a,ref:o})});return s.displayName=`Primitive.${r}`,{...t,[r]:s}},{});var j=e=>{const{present:t,children:r}=e,n=function(e){const[t,r]=o.useState(),n=o.useRef(null),s=o.useRef(e),a=o.useRef("none"),i=e?"mounted":"unmounted",[l,d]=function(e,t){return o.useReducer((e,r)=>t[e][r]??e,e)}(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return o.useEffect(()=>{const e=k(n.current);a.current="mounted"===l?e:"none"},[l]),b(()=>{const t=n.current,r=s.current;if(r!==e){const n=a.current,o=k(t);if(e)d("MOUNT");else if("none"===o||"none"===t?.display)d("UNMOUNT");else{d(r&&n!==o?"ANIMATION_OUT":"UNMOUNT")}s.current=e}},[e,d]),b(()=>{if(t){let e;const r=t.ownerDocument.defaultView??window,o=o=>{const a=k(n.current).includes(CSS.escape(o.animationName));if(o.target===t&&a&&(d("ANIMATION_END"),!s.current)){const n=t.style.animationFillMode;t.style.animationFillMode="forwards",e=r.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=n)})}},i=e=>{e.target===t&&(a.current=k(n.current))};return t.addEventListener("animationstart",i),t.addEventListener("animationcancel",o),t.addEventListener("animationend",o),()=>{r.clearTimeout(e),t.removeEventListener("animationstart",i),t.removeEventListener("animationcancel",o),t.removeEventListener("animationend",o)}}d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:o.useCallback(e=>{n.current=e?getComputedStyle(e):null,r(e)},[])}}(t),s="function"==typeof r?r({present:n.isPresent}):o.Children.only(r),a=c(n.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(s));return"function"==typeof r||n.isPresent?o.cloneElement(s,{ref:a}):null};function k(e){return e?.animationName||"none"}j.displayName="Presence";var N=o[" useId ".trim().toString()]||(()=>{}),C=0;function z(e){const[t,r]=o.useState(N());return b(()=>{r(e=>e??String(C++))},[e]),e||(t?`radix-${t}`:"")}var P="Collapsible",[S,E]=a(P),[R,T]=S(P),L=o.forwardRef((t,r)=>{const{__scopeCollapsible:n,open:s,defaultOpen:a,disabled:i,onOpenChange:l,...d}=t,[c,u]=v({prop:s,defaultProp:a??!1,onChange:l,caller:P});return e.jsx(R,{scope:n,disabled:i,contentId:z(),open:c,onOpenToggle:o.useCallback(()=>u(e=>!e),[u]),children:e.jsx(w.div,{"data-state":O(c),"data-disabled":i?"":void 0,...d,ref:r})})});L.displayName=P;var M="CollapsibleTrigger",D=o.forwardRef((t,r)=>{const{__scopeCollapsible:n,...o}=t,s=T(M,n);return e.jsx(w.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":O(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...o,ref:r,onClick:g(t.onClick,s.onOpenToggle)})});D.displayName=M;var I="CollapsibleContent",A=o.forwardRef((t,r)=>{const{forceMount:n,...o}=t,s=T(I,t.__scopeCollapsible);return e.jsx(j,{present:n||s.open,children:({present:t})=>e.jsx(_,{...o,ref:r,present:t})})});A.displayName=I;var _=o.forwardRef((t,r)=>{const{__scopeCollapsible:n,present:s,children:a,...i}=t,l=T(I,n),[d,u]=o.useState(s),m=o.useRef(null),f=c(r,m),p=o.useRef(0),h=p.current,x=o.useRef(0),g=x.current,y=l.open||d,v=o.useRef(y),j=o.useRef(void 0);return o.useEffect(()=>{const e=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(e)},[]),b(()=>{const e=m.current;if(e){j.current=j.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";const t=e.getBoundingClientRect();p.current=t.height,x.current=t.width,v.current||(e.style.transitionDuration=j.current.transitionDuration,e.style.animationName=j.current.animationName),u(s)}},[l.open,s]),e.jsx(w.div,{"data-state":O(l.open),"data-disabled":l.disabled?"":void 0,id:l.contentId,hidden:!y,...i,ref:f,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...t.style},children:y&&a})});function O(e){return e?"open":"closed"}var $=L,F=D,V=A,B=o.createContext(void 0);function W(e){const t=o.useContext(B);return e||t||"ltr"}var H="Accordion",G=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[q,K,U]=x(H),[X]=a(H,[U,E]),Y=E(),Z=t.forwardRef((t,r)=>{const{type:n,...o}=t,s=o,a=o;return e.jsx(q.Provider,{scope:t.__scopeAccordion,children:"multiple"===n?e.jsx(ne,{...a,ref:r}):e.jsx(re,{...s,ref:r})})});Z.displayName=H;var[J,Q]=X(H),[ee,te]=X(H,{collapsible:!1}),re=t.forwardRef((r,n)=>{const{value:o,defaultValue:s,onValueChange:a=()=>{},collapsible:i=!1,...l}=r,[d,c]=v({prop:o,defaultProp:s??"",onChange:a,caller:H});return e.jsx(J,{scope:r.__scopeAccordion,value:t.useMemo(()=>d?[d]:[],[d]),onItemOpen:c,onItemClose:t.useCallback(()=>i&&c(""),[i,c]),children:e.jsx(ee,{scope:r.__scopeAccordion,collapsible:i,children:e.jsx(ae,{...l,ref:n})})})}),ne=t.forwardRef((r,n)=>{const{value:o,defaultValue:s,onValueChange:a=()=>{},...i}=r,[l,d]=v({prop:o,defaultProp:s??[],onChange:a,caller:H}),c=t.useCallback(e=>d((t=[])=>[...t,e]),[d]),u=t.useCallback(e=>d((t=[])=>t.filter(t=>t!==e)),[d]);return e.jsx(J,{scope:r.__scopeAccordion,value:l,onItemOpen:c,onItemClose:u,children:e.jsx(ee,{scope:r.__scopeAccordion,collapsible:!0,children:e.jsx(ae,{...i,ref:n})})})}),[oe,se]=X(H),ae=t.forwardRef((r,n)=>{const{__scopeAccordion:o,disabled:s,dir:a,orientation:i="vertical",...l}=r,d=c(t.useRef(null),n),u=K(o),m="ltr"===W(a),f=g(r.onKeyDown,e=>{if(!G.includes(e.key))return;const t=e.target,r=u().filter(e=>!e.ref.current?.disabled),n=r.findIndex(e=>e.ref.current===t),o=r.length;if(-1===n)return;e.preventDefault();let s=n;const a=o-1,l=()=>{s=n+1,s>a&&(s=0)},d=()=>{s=n-1,s<0&&(s=a)};switch(e.key){case"Home":s=0;break;case"End":s=a;break;case"ArrowRight":"horizontal"===i&&(m?l():d());break;case"ArrowDown":"vertical"===i&&l();break;case"ArrowLeft":"horizontal"===i&&(m?d():l());break;case"ArrowUp":"vertical"===i&&d()}const c=s%o;r[c].ref.current?.focus()});return e.jsx(oe,{scope:o,disabled:s,direction:a,orientation:i,children:e.jsx(q.Slot,{scope:o,children:e.jsx(w.div,{...l,"data-orientation":i,ref:d,onKeyDown:s?void 0:f})})})}),ie="AccordionItem",[le,de]=X(ie),ce=t.forwardRef((t,r)=>{const{__scopeAccordion:n,value:o,...s}=t,a=se(ie,n),i=Q(ie,n),l=Y(n),d=z(),c=o&&i.value.includes(o)||!1,u=a.disabled||t.disabled;return e.jsx(le,{scope:n,open:c,disabled:u,triggerId:d,children:e.jsx($,{"data-orientation":a.orientation,"data-state":ge(c),...l,...s,ref:r,disabled:u,open:c,onOpenChange:e=>{e?i.onItemOpen(o):i.onItemClose(o)}})})});ce.displayName=ie;var ue="AccordionHeader",me=t.forwardRef((t,r)=>{const{__scopeAccordion:n,...o}=t,s=se(H,n),a=de(ue,n);return e.jsx(w.h3,{"data-orientation":s.orientation,"data-state":ge(a.open),"data-disabled":a.disabled?"":void 0,...o,ref:r})});me.displayName=ue;var fe="AccordionTrigger",pe=t.forwardRef((t,r)=>{const{__scopeAccordion:n,...o}=t,s=se(H,n),a=de(fe,n),i=te(fe,n),l=Y(n);return e.jsx(q.ItemSlot,{scope:n,children:e.jsx(F,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":s.orientation,id:a.triggerId,...l,...o,ref:r})})});pe.displayName=fe;var he="AccordionContent",xe=t.forwardRef((t,r)=>{const{__scopeAccordion:n,...o}=t,s=se(H,n),a=de(he,n),i=Y(n);return e.jsx(V,{role:"region","aria-labelledby":a.triggerId,"data-orientation":s.orientation,...i,...o,ref:r,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}})});function ge(e){return e?"open":"closed"}xe.displayName=he;var be=Z,ye=ce,ve=me,we=pe,je=xe;
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),t=require("react"),r=require("react-dom");function n(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}}),t.default=e,Object.freeze(t)}var o=n(t),a=n(r);function s(t,r=[]){let n=[];const a=()=>{const e=n.map(e=>o.createContext(e));return function(r){const n=r?.[t]||e;return o.useMemo(()=>({[`__scope${t}`]:{...r,[t]:n}}),[r,n])}};return a.scopeName=t,[function(r,a){const s=o.createContext(a),i=n.length;n=[...n,a];const l=r=>{const{scope:n,children:a,...l}=r,c=n?.[t]?.[i]||s,d=o.useMemo(()=>l,Object.values(l));return e.jsx(c.Provider,{value:d,children:a})};return l.displayName=r+"Provider",[l,function(e,n){const l=n?.[t]?.[i]||s,c=o.useContext(l);if(c)return c;if(void 0!==a)return a;throw new Error(`\`${e}\` must be used within \`${r}\``)}]},i(a,...r)]}function i(...e){const t=e[0];if(1===e.length)return t;const r=()=>{const r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const n=r.reduce((t,{useScope:r,scopeName:n})=>({...t,...r(e)[`__scope${n}`]}),{});return o.useMemo(()=>({[`__scope${t.scopeName}`]:n}),[n])}};return r.scopeName=t.scopeName,r}function l(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function c(...e){return t=>{let r=!1;const n=e.map(e=>{const n=l(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){const r=n[t];"function"==typeof r?r():l(e[t],null)}}}}function d(...e){return o.useCallback(c(...e),e)}function u(t){const r=f(t),n=o.forwardRef((t,n)=>{const{children:a,...s}=t,i=o.Children.toArray(a),l=i.find(h);if(l){const t=l.props.children,a=i.map(e=>e===l?o.Children.count(t)>1?o.Children.only(null):o.isValidElement(t)?t.props.children:null:e);return e.jsx(r,{...s,ref:n,children:o.isValidElement(t)?o.cloneElement(t,void 0,a):null})}return e.jsx(r,{...s,ref:n,children:a})});return n.displayName=`${t}.Slot`,n}var m=u("Slot");function f(e){const t=o.forwardRef((e,t)=>{const{children:r,...n}=e;if(o.isValidElement(r)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(r),a=function(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(r[n]=o):"style"===n?r[n]={...o,...a}:"className"===n&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props);return r.type!==o.Fragment&&(a.ref=t?c(t,e):e),o.cloneElement(r,a)}return o.Children.count(r)>1?o.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var p=Symbol("radix.slottable");function h(e){return o.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===p}function g(r){const n=r+"CollectionProvider",[o,a]=s(n),[i,l]=o(n,{collectionRef:{current:null},itemMap:new Map}),c=r=>{const{scope:n,children:o}=r,a=t.useRef(null),s=t.useRef(new Map).current;return e.jsx(i,{scope:n,itemMap:s,collectionRef:a,children:o})};c.displayName=n;const m=r+"CollectionSlot",f=u(m),p=t.forwardRef((t,r)=>{const{scope:n,children:o}=t,a=d(r,l(m,n).collectionRef);return e.jsx(f,{ref:a,children:o})});p.displayName=m;const h=r+"CollectionItemSlot",g="data-radix-collection-item",x=u(h),b=t.forwardRef((r,n)=>{const{scope:o,children:a,...s}=r,i=t.useRef(null),c=d(n,i),u=l(h,o);return t.useEffect(()=>(u.itemMap.set(i,{ref:i,...s}),()=>{u.itemMap.delete(i)})),e.jsx(x,{[g]:"",ref:c,children:a})});return b.displayName=h,[{Provider:c,Slot:p,ItemSlot:b},function(e){const n=l(r+"CollectionConsumer",e);return t.useCallback(()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${g}]`));return Array.from(n.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[n.collectionRef,n.itemMap])},a]}function x(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}var b=globalThis?.document?o.useLayoutEffect:()=>{},v=o[" useInsertionEffect ".trim().toString()]||b;function y({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[a,s,i]=function({defaultProp:e,onChange:t}){const[r,n]=o.useState(e),a=o.useRef(r),s=o.useRef(t);return v(()=>{s.current=t},[t]),o.useEffect(()=>{a.current!==r&&(s.current?.(r),a.current=r)},[r,a]),[r,n,s]}({defaultProp:t,onChange:r}),l=void 0!==e,c=l?e:a;{const t=o.useRef(void 0!==e);o.useEffect(()=>{const e=t.current;if(e!==l){const t=e?"controlled":"uncontrolled",r=l?"controlled":"uncontrolled";console.warn(`${n} is changing from ${t} to ${r}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=l},[l,n])}const d=o.useCallback(t=>{if(l){const r=function(e){return"function"==typeof e}(t)?t(e):t;r!==e&&i.current?.(r)}else s(t)},[l,e,s,i]);return[c,d]}var w=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,r)=>{const n=u(`Primitive.${r}`),a=o.forwardRef((t,o)=>{const{asChild:a,...s}=t,i=a?n:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),e.jsx(i,{...s,ref:o})});return a.displayName=`Primitive.${r}`,{...t,[r]:a}},{});var j=e=>{const{present:t,children:r}=e,n=function(e){const[t,r]=o.useState(),n=o.useRef(null),a=o.useRef(e),s=o.useRef("none"),i=e?"mounted":"unmounted",[l,c]=function(e,t){return o.useReducer((e,r)=>t[e][r]??e,e)}(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return o.useEffect(()=>{const e=k(n.current);s.current="mounted"===l?e:"none"},[l]),b(()=>{const t=n.current,r=a.current;if(r!==e){const n=s.current,o=k(t);if(e)c("MOUNT");else if("none"===o||"none"===t?.display)c("UNMOUNT");else{c(r&&n!==o?"ANIMATION_OUT":"UNMOUNT")}a.current=e}},[e,c]),b(()=>{if(t){let e;const r=t.ownerDocument.defaultView??window,o=o=>{const s=k(n.current).includes(CSS.escape(o.animationName));if(o.target===t&&s&&(c("ANIMATION_END"),!a.current)){const n=t.style.animationFillMode;t.style.animationFillMode="forwards",e=r.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=n)})}},i=e=>{e.target===t&&(s.current=k(n.current))};return t.addEventListener("animationstart",i),t.addEventListener("animationcancel",o),t.addEventListener("animationend",o),()=>{r.clearTimeout(e),t.removeEventListener("animationstart",i),t.removeEventListener("animationcancel",o),t.removeEventListener("animationend",o)}}c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:o.useCallback(e=>{n.current=e?getComputedStyle(e):null,r(e)},[])}}(t),a="function"==typeof r?r({present:n.isPresent}):o.Children.only(r),s=d(n.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(a));return"function"==typeof r||n.isPresent?o.cloneElement(a,{ref:s}):null};function k(e){return e?.animationName||"none"}j.displayName="Presence";var C=o[" useId ".trim().toString()]||(()=>{}),N=0;function R(e){const[t,r]=o.useState(C());return b(()=>{r(e=>e??String(N++))},[e]),e||(t?`radix-${t}`:"")}var E="Collapsible",[S,P]=s(E),[T,z]=S(E),L=o.forwardRef((t,r)=>{const{__scopeCollapsible:n,open:a,defaultOpen:s,disabled:i,onOpenChange:l,...c}=t,[d,u]=y({prop:a,defaultProp:s??!1,onChange:l,caller:E});return e.jsx(T,{scope:n,disabled:i,contentId:R(),open:d,onOpenToggle:o.useCallback(()=>u(e=>!e),[u]),children:e.jsx(w.div,{"data-state":O(d),"data-disabled":i?"":void 0,...c,ref:r})})});L.displayName=E;var D="CollapsibleTrigger",M=o.forwardRef((t,r)=>{const{__scopeCollapsible:n,...o}=t,a=z(D,n);return e.jsx(w.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":O(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...o,ref:r,onClick:x(t.onClick,a.onOpenToggle)})});M.displayName=D;var A="CollapsibleContent",I=o.forwardRef((t,r)=>{const{forceMount:n,...o}=t,a=z(A,t.__scopeCollapsible);return e.jsx(j,{present:n||a.open,children:({present:t})=>e.jsx($,{...o,ref:r,present:t})})});I.displayName=A;var $=o.forwardRef((t,r)=>{const{__scopeCollapsible:n,present:a,children:s,...i}=t,l=z(A,n),[c,u]=o.useState(a),m=o.useRef(null),f=d(r,m),p=o.useRef(0),h=p.current,g=o.useRef(0),x=g.current,v=l.open||c,y=o.useRef(v),j=o.useRef(void 0);return o.useEffect(()=>{const e=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(e)},[]),b(()=>{const e=m.current;if(e){j.current=j.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";const t=e.getBoundingClientRect();p.current=t.height,g.current=t.width,y.current||(e.style.transitionDuration=j.current.transitionDuration,e.style.animationName=j.current.animationName),u(a)}},[l.open,a]),e.jsx(w.div,{"data-state":O(l.open),"data-disabled":l.disabled?"":void 0,id:l.contentId,hidden:!v,...i,ref:f,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...t.style},children:v&&s})});function O(e){return e?"open":"closed"}var _=L,F=M,B=I,W=o.createContext(void 0);function V(e){const t=o.useContext(W);return e||t||"ltr"}var H="Accordion",U=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[G,q,K]=g(H),[Y]=s(H,[K,P]),X=P(),Z=t.forwardRef((t,r)=>{const{type:n,...o}=t,a=o,s=o;return e.jsx(G.Provider,{scope:t.__scopeAccordion,children:"multiple"===n?e.jsx(ne,{...s,ref:r}):e.jsx(re,{...a,ref:r})})});Z.displayName=H;var[J,Q]=Y(H),[ee,te]=Y(H,{collapsible:!1}),re=t.forwardRef((r,n)=>{const{value:o,defaultValue:a,onValueChange:s=()=>{},collapsible:i=!1,...l}=r,[c,d]=y({prop:o,defaultProp:a??"",onChange:s,caller:H});return e.jsx(J,{scope:r.__scopeAccordion,value:t.useMemo(()=>c?[c]:[],[c]),onItemOpen:d,onItemClose:t.useCallback(()=>i&&d(""),[i,d]),children:e.jsx(ee,{scope:r.__scopeAccordion,collapsible:i,children:e.jsx(se,{...l,ref:n})})})}),ne=t.forwardRef((r,n)=>{const{value:o,defaultValue:a,onValueChange:s=()=>{},...i}=r,[l,c]=y({prop:o,defaultProp:a??[],onChange:s,caller:H}),d=t.useCallback(e=>c((t=[])=>[...t,e]),[c]),u=t.useCallback(e=>c((t=[])=>t.filter(t=>t!==e)),[c]);return e.jsx(J,{scope:r.__scopeAccordion,value:l,onItemOpen:d,onItemClose:u,children:e.jsx(ee,{scope:r.__scopeAccordion,collapsible:!0,children:e.jsx(se,{...i,ref:n})})})}),[oe,ae]=Y(H),se=t.forwardRef((r,n)=>{const{__scopeAccordion:o,disabled:a,dir:s,orientation:i="vertical",...l}=r,c=d(t.useRef(null),n),u=q(o),m="ltr"===V(s),f=x(r.onKeyDown,e=>{if(!U.includes(e.key))return;const t=e.target,r=u().filter(e=>!e.ref.current?.disabled),n=r.findIndex(e=>e.ref.current===t),o=r.length;if(-1===n)return;e.preventDefault();let a=n;const s=o-1,l=()=>{a=n+1,a>s&&(a=0)},c=()=>{a=n-1,a<0&&(a=s)};switch(e.key){case"Home":a=0;break;case"End":a=s;break;case"ArrowRight":"horizontal"===i&&(m?l():c());break;case"ArrowDown":"vertical"===i&&l();break;case"ArrowLeft":"horizontal"===i&&(m?c():l());break;case"ArrowUp":"vertical"===i&&c()}const d=a%o;r[d].ref.current?.focus()});return e.jsx(oe,{scope:o,disabled:a,direction:s,orientation:i,children:e.jsx(G.Slot,{scope:o,children:e.jsx(w.div,{...l,"data-orientation":i,ref:c,onKeyDown:a?void 0:f})})})}),ie="AccordionItem",[le,ce]=Y(ie),de=t.forwardRef((t,r)=>{const{__scopeAccordion:n,value:o,...a}=t,s=ae(ie,n),i=Q(ie,n),l=X(n),c=R(),d=o&&i.value.includes(o)||!1,u=s.disabled||t.disabled;return e.jsx(le,{scope:n,open:d,disabled:u,triggerId:c,children:e.jsx(_,{"data-orientation":s.orientation,"data-state":xe(d),...l,...a,ref:r,disabled:u,open:d,onOpenChange:e=>{e?i.onItemOpen(o):i.onItemClose(o)}})})});de.displayName=ie;var ue="AccordionHeader",me=t.forwardRef((t,r)=>{const{__scopeAccordion:n,...o}=t,a=ae(H,n),s=ce(ue,n);return e.jsx(w.h3,{"data-orientation":a.orientation,"data-state":xe(s.open),"data-disabled":s.disabled?"":void 0,...o,ref:r})});me.displayName=ue;var fe="AccordionTrigger",pe=t.forwardRef((t,r)=>{const{__scopeAccordion:n,...o}=t,a=ae(H,n),s=ce(fe,n),i=te(fe,n),l=X(n);return e.jsx(G.ItemSlot,{scope:n,children:e.jsx(F,{"aria-disabled":s.open&&!i.collapsible||void 0,"data-orientation":a.orientation,id:s.triggerId,...l,...o,ref:r})})});pe.displayName=fe;var he="AccordionContent",ge=t.forwardRef((t,r)=>{const{__scopeAccordion:n,...o}=t,a=ae(H,n),s=ce(he,n),i=X(n);return e.jsx(B,{role:"region","aria-labelledby":s.triggerId,"data-orientation":a.orientation,...i,...o,ref:r,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}})});function xe(e){return e?"open":"closed"}ge.displayName=he;var be=Z,ve=de,ye=me,we=pe,je=ge;
|
|
2
2
|
/**
|
|
3
3
|
* @license lucide-react v0.487.0 - ISC
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the ISC license.
|
|
6
6
|
* See the LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
|
-
const ke=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)},
|
|
8
|
+
const ke=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ce=(...e)=>e.filter((e,t,r)=>Boolean(e)&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim();
|
|
9
9
|
/**
|
|
10
10
|
* @license lucide-react v0.487.0 - ISC
|
|
11
11
|
*
|
|
12
12
|
* This source code is licensed under the ISC license.
|
|
13
13
|
* See the LICENSE file in the root directory of this source tree.
|
|
14
14
|
*/
|
|
15
|
-
var
|
|
15
|
+
var Ne={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};
|
|
16
16
|
/**
|
|
17
17
|
* @license lucide-react v0.487.0 - ISC
|
|
18
18
|
*
|
|
19
19
|
* This source code is licensed under the ISC license.
|
|
20
20
|
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const
|
|
21
|
+
*/const Re=t.forwardRef(({color:e="currentColor",size:r=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:a="",children:s,iconNode:i,...l},c)=>t.createElement("svg",{ref:c,...Ne,width:r,height:r,stroke:e,strokeWidth:o?24*Number(n)/Number(r):n,className:Ce("lucide",a),...l},[...i.map(([e,r])=>t.createElement(e,r)),...Array.isArray(s)?s:[s]])),Ee=(e,r)=>{const n=t.forwardRef(({className:n,...o},a)=>{return t.createElement(Re,{ref:a,iconNode:r,className:Ce(`lucide-${s=ke(e),s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,n),...o});var s});return n.displayName=ke(e),n},Se=Ee("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Pe=Ee("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),Te=Ee("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),ze=Ee("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),Le=Ee("chevrons-left",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]),De=Ee("chevrons-right",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]),Me=Ee("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]),Ae=Ee("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]),Ie=Ee("cloud-upload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]),$e=Ee("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),Oe=Ee("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]),_e=Ee("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),Fe=Ee("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),Be=Ee("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),We=Ee("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),Ve=Ee("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);
|
|
22
22
|
/**
|
|
23
23
|
* @license lucide-react v0.487.0 - ISC
|
|
24
24
|
*
|
|
25
25
|
* This source code is licensed under the ISC license.
|
|
26
26
|
* See the LICENSE file in the root directory of this source tree.
|
|
27
|
-
*/function He(e){var t,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=He(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Ge(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=He(e))&&(n&&(n+=" "),n+=t);return n}const qe=e=>{const t=Ye(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:e=>{const r=e.split("-");return""===r[0]&&1!==r.length&&r.shift(),Ke(r,t)||Xe(e)},getConflictingClassGroupIds:(e,t)=>{const o=r[e]||[];return t&&n[e]?[...o,...n[e]]:o}}},Ke=(e,t)=>{if(0===e.length)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),o=n?Ke(e.slice(1),n):void 0;if(o)return o;if(0===t.validators.length)return;const s=e.join("-");return t.validators.find(({validator:e})=>e(s))?.classGroupId},Ue=/^\[(.+)\]$/,Xe=e=>{if(Ue.test(e)){const t=Ue.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Ye=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const e in r)Ze(r[e],n,e,t);return n},Ze=(e,t,r,n)=>{e.forEach(e=>{if("string"==typeof e){return void((""===e?t:Je(t,e)).classGroupId=r)}if("function"==typeof e)return Qe(e)?void Ze(e(n),t,r,n):void t.validators.push({validator:e,classGroupId:r});Object.entries(e).forEach(([e,o])=>{Ze(o,Je(t,e),r,n)})})},Je=(e,t)=>{let r=e;return t.split("-").forEach(e=>{r.nextPart.has(e)||r.nextPart.set(e,{nextPart:new Map,validators:[]}),r=r.nextPart.get(e)}),r},Qe=e=>e.isThemeGetter,et=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const o=(o,s)=>{r.set(o,s),t++,t>e&&(t=0,n=r,r=new Map)};return{get(e){let t=r.get(e);return void 0!==t?t:void 0!==(t=n.get(e))?(o(e,t),t):void 0},set(e,t){r.has(e)?r.set(e,t):o(e,t)}}},tt=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=e=>{const t=[];let r,n=0,o=0,s=0;for(let a=0;a<e.length;a++){let i=e[a];if(0===n&&0===o){if(":"===i){t.push(e.slice(s,a)),s=a+1;continue}if("/"===i){r=a;continue}}"["===i?n++:"]"===i?n--:"("===i?o++:")"===i&&o--}const a=0===t.length?e:e.substring(s),i=rt(a);return{modifiers:t,hasImportantModifier:i!==a,baseClassName:i,maybePostfixModifierPosition:r&&r>s?r-s:void 0}};if(t){const e=t+":",r=n;n=t=>t.startsWith(e)?r(t.substring(e.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:t,maybePostfixModifierPosition:void 0}}if(r){const e=n;n=t=>r({className:t,parseClassName:e})}return n},rt=e=>e.endsWith("!")?e.substring(0,e.length-1):e.startsWith("!")?e.substring(1):e,nt=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(e=>[e,!0]));return e=>{if(e.length<=1)return e;const r=[];let n=[];return e.forEach(e=>{"["===e[0]||t[e]?(r.push(...n.sort(),e),n=[]):n.push(e)}),r.push(...n.sort()),r}},ot=/\s+/;function st(){let e,t,r=0,n="";for(;r<arguments.length;)(e=arguments[r++])&&(t=at(e))&&(n&&(n+=" "),n+=t);return n}const at=e=>{if("string"==typeof e)return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=at(e[n]))&&(r&&(r+=" "),r+=t);return r};function it(e,...t){let r,n,o,s=function(i){const l=t.reduce((e,t)=>t(e),e());return r=(e=>({cache:et(e.cacheSize),parseClassName:tt(e),sortModifiers:nt(e),...qe(e)}))(l),n=r.cache.get,o=r.cache.set,s=a,a(i)};function a(e){const t=n(e);if(t)return t;const s=((e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:s}=t,a=[],i=e.trim().split(ot);let l="";for(let e=i.length-1;e>=0;e-=1){const t=i[e],{isExternal:d,modifiers:c,hasImportantModifier:u,baseClassName:m,maybePostfixModifierPosition:f}=r(t);if(d){l=t+(l.length>0?" "+l:l);continue}let p=!!f,h=n(p?m.substring(0,f):m);if(!h){if(!p){l=t+(l.length>0?" "+l:l);continue}if(h=n(m),!h){l=t+(l.length>0?" "+l:l);continue}p=!1}const x=s(c).join(":"),g=u?x+"!":x,b=g+h;if(a.includes(b))continue;a.push(b);const y=o(h,p);for(let e=0;e<y.length;++e){const t=y[e];a.push(g+t)}l=t+(l.length>0?" "+l:l)}return l})(e,r);return o(e,s),s}return function(){return s(st.apply(null,arguments))}}const lt=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},dt=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ct=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ut=/^\d+\/\d+$/,mt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ft=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,pt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ht=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,xt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,gt=e=>ut.test(e),bt=e=>!!e&&!Number.isNaN(Number(e)),yt=e=>!!e&&Number.isInteger(Number(e)),vt=e=>e.endsWith("%")&&bt(e.slice(0,-1)),wt=e=>mt.test(e),jt=()=>!0,kt=e=>ft.test(e)&&!pt.test(e),Nt=()=>!1,Ct=e=>ht.test(e),zt=e=>xt.test(e),Pt=e=>!Et(e)&&!It(e),St=e=>Bt(e,qt,Nt),Et=e=>dt.test(e),Rt=e=>Bt(e,Kt,kt),Tt=e=>Bt(e,Ut,bt),Lt=e=>Bt(e,Ht,Nt),Mt=e=>Bt(e,Gt,zt),Dt=e=>Bt(e,Yt,Ct),It=e=>ct.test(e),At=e=>Wt(e,Kt),_t=e=>Wt(e,Xt),Ot=e=>Wt(e,Ht),$t=e=>Wt(e,qt),Ft=e=>Wt(e,Gt),Vt=e=>Wt(e,Yt,!0),Bt=(e,t,r)=>{const n=dt.exec(e);return!!n&&(n[1]?t(n[1]):r(n[2]))},Wt=(e,t,r=!1)=>{const n=ct.exec(e);return!!n&&(n[1]?t(n[1]):r)},Ht=e=>"position"===e||"percentage"===e,Gt=e=>"image"===e||"url"===e,qt=e=>"length"===e||"size"===e||"bg-size"===e,Kt=e=>"length"===e,Ut=e=>"number"===e,Xt=e=>"family-name"===e,Yt=e=>"shadow"===e,Zt=it(()=>{const e=lt("color"),t=lt("font"),r=lt("text"),n=lt("font-weight"),o=lt("tracking"),s=lt("leading"),a=lt("breakpoint"),i=lt("container"),l=lt("spacing"),d=lt("radius"),c=lt("shadow"),u=lt("inset-shadow"),m=lt("text-shadow"),f=lt("drop-shadow"),p=lt("blur"),h=lt("perspective"),x=lt("aspect"),g=lt("ease"),b=lt("animate"),y=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",It,Et],v=()=>[It,Et,l],w=()=>[gt,"full","auto",...v()],j=()=>[yt,"none","subgrid",It,Et],k=()=>["auto",{span:["full",yt,It,Et]},yt,It,Et],N=()=>[yt,"auto",It,Et],C=()=>["auto","min","max","fr",It,Et],z=()=>["auto",...v()],P=()=>[gt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...v()],S=()=>[e,It,Et],E=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",Ot,Lt,{position:[It,Et]}],R=()=>["auto","cover","contain",$t,St,{size:[It,Et]}],T=()=>[vt,At,Rt],L=()=>["","none","full",d,It,Et],M=()=>["",bt,At,Rt],D=()=>[bt,vt,Ot,Lt],I=()=>["","none",p,It,Et],A=()=>["none",bt,It,Et],_=()=>["none",bt,It,Et],O=()=>[bt,It,Et],$=()=>[gt,"full",...v()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[wt],breakpoint:[wt],color:[jt],container:[wt],"drop-shadow":[wt],ease:["in","out","in-out"],font:[Pt],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[wt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[wt],shadow:[wt],spacing:["px",bt],text:[wt],"text-shadow":[wt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",gt,Et,It,x]}],container:["container"],columns:[{columns:[bt,Et,It,i]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:y()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:w()}],"inset-x":[{"inset-x":w()}],"inset-y":[{"inset-y":w()}],start:[{start:w()}],end:[{end:w()}],top:[{top:w()}],right:[{right:w()}],bottom:[{bottom:w()}],left:[{left:w()}],visibility:["visible","invisible","collapse"],z:[{z:[yt,"auto",It,Et]}],basis:[{basis:[gt,"full","auto",i,...v()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[bt,gt,"auto","initial","none",Et]}],grow:[{grow:["",bt,It,Et]}],shrink:[{shrink:["",bt,It,Et]}],order:[{order:[yt,"first","last","none",It,Et]}],"grid-cols":[{"grid-cols":j()}],"col-start-end":[{col:k()}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":j()}],"row-start-end":[{row:k()}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":C()}],"auto-rows":[{"auto-rows":C()}],gap:[{gap:v()}],"gap-x":[{"gap-x":v()}],"gap-y":[{"gap-y":v()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:v()}],px:[{px:v()}],py:[{py:v()}],ps:[{ps:v()}],pe:[{pe:v()}],pt:[{pt:v()}],pr:[{pr:v()}],pb:[{pb:v()}],pl:[{pl:v()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":v()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":v()}],"space-y-reverse":["space-y-reverse"],size:[{size:P()}],w:[{w:[i,"screen",...P()]}],"min-w":[{"min-w":[i,"screen","none",...P()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[a]},...P()]}],h:[{h:["screen","lh",...P()]}],"min-h":[{"min-h":["screen","lh","none",...P()]}],"max-h":[{"max-h":["screen","lh",...P()]}],"font-size":[{text:["base",r,At,Rt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,It,Tt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",vt,Et]}],"font-family":[{font:[_t,Et,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,It,Et]}],"line-clamp":[{"line-clamp":[bt,"none",It,Tt]}],leading:[{leading:[s,...v()]}],"list-image":[{"list-image":["none",It,Et]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",It,Et]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:S()}],"text-color":[{text:S()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[bt,"from-font","auto",It,Rt]}],"text-decoration-color":[{decoration:S()}],"underline-offset":[{"underline-offset":[bt,"auto",It,Et]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:v()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",It,Et]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",It,Et]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:E()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:R()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},yt,It,Et],radial:["",It,Et],conic:[yt,It,Et]},Ft,Mt]}],"bg-color":[{bg:S()}],"gradient-from-pos":[{from:T()}],"gradient-via-pos":[{via:T()}],"gradient-to-pos":[{to:T()}],"gradient-from":[{from:S()}],"gradient-via":[{via:S()}],"gradient-to":[{to:S()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:M()}],"border-w-x":[{"border-x":M()}],"border-w-y":[{"border-y":M()}],"border-w-s":[{"border-s":M()}],"border-w-e":[{"border-e":M()}],"border-w-t":[{"border-t":M()}],"border-w-r":[{"border-r":M()}],"border-w-b":[{"border-b":M()}],"border-w-l":[{"border-l":M()}],"divide-x":[{"divide-x":M()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":M()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:S()}],"border-color-x":[{"border-x":S()}],"border-color-y":[{"border-y":S()}],"border-color-s":[{"border-s":S()}],"border-color-e":[{"border-e":S()}],"border-color-t":[{"border-t":S()}],"border-color-r":[{"border-r":S()}],"border-color-b":[{"border-b":S()}],"border-color-l":[{"border-l":S()}],"divide-color":[{divide:S()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[bt,It,Et]}],"outline-w":[{outline:["",bt,At,Rt]}],"outline-color":[{outline:S()}],shadow:[{shadow:["","none",c,Vt,Dt]}],"shadow-color":[{shadow:S()}],"inset-shadow":[{"inset-shadow":["none",u,Vt,Dt]}],"inset-shadow-color":[{"inset-shadow":S()}],"ring-w":[{ring:M()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:S()}],"ring-offset-w":[{"ring-offset":[bt,Rt]}],"ring-offset-color":[{"ring-offset":S()}],"inset-ring-w":[{"inset-ring":M()}],"inset-ring-color":[{"inset-ring":S()}],"text-shadow":[{"text-shadow":["none",m,Vt,Dt]}],"text-shadow-color":[{"text-shadow":S()}],opacity:[{opacity:[bt,It,Et]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[bt]}],"mask-image-linear-from-pos":[{"mask-linear-from":D()}],"mask-image-linear-to-pos":[{"mask-linear-to":D()}],"mask-image-linear-from-color":[{"mask-linear-from":S()}],"mask-image-linear-to-color":[{"mask-linear-to":S()}],"mask-image-t-from-pos":[{"mask-t-from":D()}],"mask-image-t-to-pos":[{"mask-t-to":D()}],"mask-image-t-from-color":[{"mask-t-from":S()}],"mask-image-t-to-color":[{"mask-t-to":S()}],"mask-image-r-from-pos":[{"mask-r-from":D()}],"mask-image-r-to-pos":[{"mask-r-to":D()}],"mask-image-r-from-color":[{"mask-r-from":S()}],"mask-image-r-to-color":[{"mask-r-to":S()}],"mask-image-b-from-pos":[{"mask-b-from":D()}],"mask-image-b-to-pos":[{"mask-b-to":D()}],"mask-image-b-from-color":[{"mask-b-from":S()}],"mask-image-b-to-color":[{"mask-b-to":S()}],"mask-image-l-from-pos":[{"mask-l-from":D()}],"mask-image-l-to-pos":[{"mask-l-to":D()}],"mask-image-l-from-color":[{"mask-l-from":S()}],"mask-image-l-to-color":[{"mask-l-to":S()}],"mask-image-x-from-pos":[{"mask-x-from":D()}],"mask-image-x-to-pos":[{"mask-x-to":D()}],"mask-image-x-from-color":[{"mask-x-from":S()}],"mask-image-x-to-color":[{"mask-x-to":S()}],"mask-image-y-from-pos":[{"mask-y-from":D()}],"mask-image-y-to-pos":[{"mask-y-to":D()}],"mask-image-y-from-color":[{"mask-y-from":S()}],"mask-image-y-to-color":[{"mask-y-to":S()}],"mask-image-radial":[{"mask-radial":[It,Et]}],"mask-image-radial-from-pos":[{"mask-radial-from":D()}],"mask-image-radial-to-pos":[{"mask-radial-to":D()}],"mask-image-radial-from-color":[{"mask-radial-from":S()}],"mask-image-radial-to-color":[{"mask-radial-to":S()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[bt]}],"mask-image-conic-from-pos":[{"mask-conic-from":D()}],"mask-image-conic-to-pos":[{"mask-conic-to":D()}],"mask-image-conic-from-color":[{"mask-conic-from":S()}],"mask-image-conic-to-color":[{"mask-conic-to":S()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:E()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:R()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",It,Et]}],filter:[{filter:["","none",It,Et]}],blur:[{blur:I()}],brightness:[{brightness:[bt,It,Et]}],contrast:[{contrast:[bt,It,Et]}],"drop-shadow":[{"drop-shadow":["","none",f,Vt,Dt]}],"drop-shadow-color":[{"drop-shadow":S()}],grayscale:[{grayscale:["",bt,It,Et]}],"hue-rotate":[{"hue-rotate":[bt,It,Et]}],invert:[{invert:["",bt,It,Et]}],saturate:[{saturate:[bt,It,Et]}],sepia:[{sepia:["",bt,It,Et]}],"backdrop-filter":[{"backdrop-filter":["","none",It,Et]}],"backdrop-blur":[{"backdrop-blur":I()}],"backdrop-brightness":[{"backdrop-brightness":[bt,It,Et]}],"backdrop-contrast":[{"backdrop-contrast":[bt,It,Et]}],"backdrop-grayscale":[{"backdrop-grayscale":["",bt,It,Et]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[bt,It,Et]}],"backdrop-invert":[{"backdrop-invert":["",bt,It,Et]}],"backdrop-opacity":[{"backdrop-opacity":[bt,It,Et]}],"backdrop-saturate":[{"backdrop-saturate":[bt,It,Et]}],"backdrop-sepia":[{"backdrop-sepia":["",bt,It,Et]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":v()}],"border-spacing-x":[{"border-spacing-x":v()}],"border-spacing-y":[{"border-spacing-y":v()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",It,Et]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[bt,"initial",It,Et]}],ease:[{ease:["linear","initial",g,It,Et]}],delay:[{delay:[bt,It,Et]}],animate:[{animate:["none",b,It,Et]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,It,Et]}],"perspective-origin":[{"perspective-origin":y()}],rotate:[{rotate:A()}],"rotate-x":[{"rotate-x":A()}],"rotate-y":[{"rotate-y":A()}],"rotate-z":[{"rotate-z":A()}],scale:[{scale:_()}],"scale-x":[{"scale-x":_()}],"scale-y":[{"scale-y":_()}],"scale-z":[{"scale-z":_()}],"scale-3d":["scale-3d"],skew:[{skew:O()}],"skew-x":[{"skew-x":O()}],"skew-y":[{"skew-y":O()}],transform:[{transform:[It,Et,"","none","gpu","cpu"]}],"transform-origin":[{origin:y()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:$()}],"translate-x":[{"translate-x":$()}],"translate-y":[{"translate-y":$()}],"translate-z":[{"translate-z":$()}],"translate-none":["translate-none"],accent:[{accent:S()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:S()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",It,Et]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":v()}],"scroll-mx":[{"scroll-mx":v()}],"scroll-my":[{"scroll-my":v()}],"scroll-ms":[{"scroll-ms":v()}],"scroll-me":[{"scroll-me":v()}],"scroll-mt":[{"scroll-mt":v()}],"scroll-mr":[{"scroll-mr":v()}],"scroll-mb":[{"scroll-mb":v()}],"scroll-ml":[{"scroll-ml":v()}],"scroll-p":[{"scroll-p":v()}],"scroll-px":[{"scroll-px":v()}],"scroll-py":[{"scroll-py":v()}],"scroll-ps":[{"scroll-ps":v()}],"scroll-pe":[{"scroll-pe":v()}],"scroll-pt":[{"scroll-pt":v()}],"scroll-pr":[{"scroll-pr":v()}],"scroll-pb":[{"scroll-pb":v()}],"scroll-pl":[{"scroll-pl":v()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",It,Et]}],fill:[{fill:["none",...S()]}],"stroke-w":[{stroke:[bt,At,Rt,Tt]}],stroke:[{stroke:["none",...S()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function Jt(...e){return Zt(Ge(e))}function Qt({type:r="single",collapsible:n=!1,className:o,children:s,...a}){const[i,l]=t.useState("multiple"===r?[]:"");return"multiple"===r?e.jsx(be,{type:"multiple",className:o,value:i,onValueChange:e=>l(e),"data-slot":"accordion",...a,children:t.Children.map(s,e=>t.isValidElement(e)?t.cloneElement(e,{openValue:i}):e)}):e.jsx(be,{type:"single",collapsible:n,className:o,value:i,onValueChange:e=>l(e),"data-slot":"accordion",...a,children:t.Children.map(s,e=>t.isValidElement(e)?t.cloneElement(e,{...e.props??{},openValue:i}):e)})}function er({className:r,openValue:n,value:o,children:s,...a}){return e.jsx(ye,{"data-slot":"accordion-item",className:Jt("border-b last:border-b-0",r),value:o,...a,children:t.Children.map(s,e=>t.isValidElement(e)?t.cloneElement(e,{itemValue:o,openValue:n}):e)})}function tr({className:t,children:r,iconOpen:n=Te,iconClosed:o=Se,itemValue:s,openValue:a,...i}){const l=Array.isArray(a)&&s?a.includes(s):a===s;return e.jsx(ve,{className:"flex w-full",children:e.jsxs(we,{"data-slot":"accordion-trigger",className:Jt("focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50",t,l?"rounded-t-md":"rounded-md"),...i,children:[r,l?e.jsx(n,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200"}):e.jsx(o,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200"})]})})}function rr({className:t,children:r,...n}){return e.jsx(je,{"data-slot":"accordion-content",className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",...n,children:e.jsx("div",{className:Jt("pt-0 pb-4",t),children:r})})}const nr={xs:"w-6 h-6",sm:"w-8 h-8 ",md:"w-10 h-10 ",lg:"w-12 h-12 ",xl:"w-14 h-14 ","2xl":"w-16 h-16 "},or={xs:"w-1.5 h-1.5",sm:"w-2 h-2 ",md:"w-2.5 h-2.5 ",lg:"w-3 h-3 ",xl:"w-3.5 h-3.5 ","2xl":"w-4 h-4 "},sr={xs:"w-2.5 h-2.5",sm:"w-3 h-3",md:"w-3.5 h-3.5",lg:"w-4 h-4",xl:"w-4.5 h-4.5 ","2xl":"w-5 h-5 "},ar={xs:"gap-2",sm:"gap-2.5",md:"gap-3",lg:"gap-3.5",xl:"gap-4","2xl":"gap-4.5"},ir={xs:"text-sm",sm:"text-sm",md:"text-sm",lg:"text-md",xl:"text-lg","2xl":"text-lg"},lr=({title:t,description:r,size:n})=>e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:Jt("text-rtext-secondary-700 font-semibold",ir[n]),children:t}),e.jsx("span",{className:Jt("font-normal text-rtext-tertiary-600",ir[n]),children:r})]});function dr(e){const t=o.useRef(e);return o.useEffect(()=>{t.current=e}),o.useMemo(()=>(...e)=>t.current?.(...e),[])}var cr,ur="dismissableLayer.update",mr="dismissableLayer.pointerDownOutside",fr="dismissableLayer.focusOutside",pr=o.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),hr=o.forwardRef((t,r)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:l,onDismiss:d,...u}=t,m=o.useContext(pr),[f,p]=o.useState(null),h=f?.ownerDocument??globalThis?.document,[,x]=o.useState({}),b=c(r,e=>p(e)),y=Array.from(m.layers),[v]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),j=y.indexOf(v),k=f?y.indexOf(f):-1,N=m.layersWithOutsidePointerEventsDisabled.size>0,C=k>=j,z=function(e,t=globalThis?.document){const r=dr(e),n=o.useRef(!1),s=o.useRef(()=>{});return o.useEffect(()=>{const e=e=>{if(e.target&&!n.current){let n=function(){gr(mr,r,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",s.current),s.current=n,t.addEventListener("click",s.current,{once:!0})):n()}else t.removeEventListener("click",s.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}(e=>{const t=e.target,r=[...m.branches].some(e=>e.contains(t));C&&!r&&(a?.(e),l?.(e),e.defaultPrevented||d?.())},h),P=function(e,t=globalThis?.document){const r=dr(e),n=o.useRef(!1);return o.useEffect(()=>{const e=e=>{if(e.target&&!n.current){gr(fr,r,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}(e=>{const t=e.target;[...m.branches].some(e=>e.contains(t))||(i?.(e),l?.(e),e.defaultPrevented||d?.())},h);return function(e,t=globalThis?.document){const r=dr(e);o.useEffect(()=>{const e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[r,t])}(e=>{k===m.layers.size-1&&(s?.(e),!e.defaultPrevented&&d&&(e.preventDefault(),d()))},h),o.useEffect(()=>{if(f)return n&&(0===m.layersWithOutsidePointerEventsDisabled.size&&(cr=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(f)),m.layers.add(f),xr(),()=>{n&&1===m.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=cr)}},[f,h,n,m]),o.useEffect(()=>()=>{f&&(m.layers.delete(f),m.layersWithOutsidePointerEventsDisabled.delete(f),xr())},[f,m]),o.useEffect(()=>{const e=()=>x({});return document.addEventListener(ur,e),()=>document.removeEventListener(ur,e)},[]),e.jsx(w.div,{...u,ref:b,style:{pointerEvents:N?C?"auto":"none":void 0,...t.style},onFocusCapture:g(t.onFocusCapture,P.onFocusCapture),onBlurCapture:g(t.onBlurCapture,P.onBlurCapture),onPointerDownCapture:g(t.onPointerDownCapture,z.onPointerDownCapture)})});hr.displayName="DismissableLayer";function xr(){const e=new CustomEvent(ur);document.dispatchEvent(e)}function gr(e,t,r,{discrete:n}){const o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?function(e,t){e&&s.flushSync(()=>e.dispatchEvent(t))}(o,a):o.dispatchEvent(a)}o.forwardRef((t,r)=>{const n=o.useContext(pr),s=o.useRef(null),a=c(r,s);return o.useEffect(()=>{const e=s.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),e.jsx(w.div,{...t,ref:a})}).displayName="DismissableLayerBranch";const br=["top","right","bottom","left"],yr=Math.min,vr=Math.max,wr=Math.round,jr=Math.floor,kr=e=>({x:e,y:e}),Nr={left:"right",right:"left",bottom:"top",top:"bottom"},Cr={start:"end",end:"start"};function zr(e,t,r){return vr(e,yr(t,r))}function Pr(e,t){return"function"==typeof e?e(t):e}function Sr(e){return e.split("-")[0]}function Er(e){return e.split("-")[1]}function Rr(e){return"x"===e?"y":"x"}function Tr(e){return"y"===e?"height":"width"}const Lr=new Set(["top","bottom"]);function Mr(e){return Lr.has(Sr(e))?"y":"x"}function Dr(e){return Rr(Mr(e))}function Ir(e){return e.replace(/start|end/g,e=>Cr[e])}const Ar=["left","right"],_r=["right","left"],Or=["top","bottom"],$r=["bottom","top"];function Fr(e,t,r,n){const o=Er(e);let s=function(e,t,r){switch(e){case"top":case"bottom":return r?t?_r:Ar:t?Ar:_r;case"left":case"right":return t?Or:$r;default:return[]}}(Sr(e),"start"===r,n);return o&&(s=s.map(e=>e+"-"+o),t&&(s=s.concat(s.map(Ir)))),s}function Vr(e){return e.replace(/left|right|bottom|top/g,e=>Nr[e])}function Br(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Wr(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function Hr(e,t,r){let{reference:n,floating:o}=e;const s=Mr(t),a=Dr(t),i=Tr(a),l=Sr(t),d="y"===s,c=n.x+n.width/2-o.width/2,u=n.y+n.height/2-o.height/2,m=n[i]/2-o[i]/2;let f;switch(l){case"top":f={x:c,y:n.y-o.height};break;case"bottom":f={x:c,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:u};break;case"left":f={x:n.x-o.width,y:u};break;default:f={x:n.x,y:n.y}}switch(Er(t)){case"start":f[a]-=m*(r&&d?-1:1);break;case"end":f[a]+=m*(r&&d?-1:1)}return f}async function Gr(e,t){var r;void 0===t&&(t={});const{x:n,y:o,platform:s,rects:a,elements:i,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:c="viewport",elementContext:u="floating",altBoundary:m=!1,padding:f=0}=Pr(t,e),p=Br(f),h=i[m?"floating"===u?"reference":"floating":u],x=Wr(await s.getClippingRect({element:null==(r=await(null==s.isElement?void 0:s.isElement(h)))||r?h:h.contextElement||await(null==s.getDocumentElement?void 0:s.getDocumentElement(i.floating)),boundary:d,rootBoundary:c,strategy:l})),g="floating"===u?{x:n,y:o,width:a.floating.width,height:a.floating.height}:a.reference,b=await(null==s.getOffsetParent?void 0:s.getOffsetParent(i.floating)),y=await(null==s.isElement?void 0:s.isElement(b))&&await(null==s.getScale?void 0:s.getScale(b))||{x:1,y:1},v=Wr(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:g,offsetParent:b,strategy:l}):g);return{top:(x.top-v.top+p.top)/y.y,bottom:(v.bottom-x.bottom+p.bottom)/y.y,left:(x.left-v.left+p.left)/y.x,right:(v.right-x.right+p.right)/y.x}}function qr(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Kr(e){return br.some(t=>e[t]>=0)}const Ur=new Set(["left","top"]);function Xr(){return"undefined"!=typeof window}function Yr(e){return Qr(e)?(e.nodeName||"").toLowerCase():"#document"}function Zr(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Jr(e){var t;return null==(t=(Qr(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Qr(e){return!!Xr()&&(e instanceof Node||e instanceof Zr(e).Node)}function en(e){return!!Xr()&&(e instanceof Element||e instanceof Zr(e).Element)}function tn(e){return!!Xr()&&(e instanceof HTMLElement||e instanceof Zr(e).HTMLElement)}function rn(e){return!(!Xr()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Zr(e).ShadowRoot)}const nn=new Set(["inline","contents"]);function on(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=gn(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!nn.has(o)}const sn=new Set(["table","td","th"]);function an(e){return sn.has(Yr(e))}const ln=[":popover-open",":modal"];function dn(e){return ln.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const cn=["transform","translate","scale","rotate","perspective"],un=["transform","translate","scale","rotate","perspective","filter"],mn=["paint","layout","strict","content"];function fn(e){const t=pn(),r=en(e)?gn(e):e;return cn.some(e=>!!r[e]&&"none"!==r[e])||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||un.some(e=>(r.willChange||"").includes(e))||mn.some(e=>(r.contain||"").includes(e))}function pn(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const hn=new Set(["html","body","#document"]);function xn(e){return hn.has(Yr(e))}function gn(e){return Zr(e).getComputedStyle(e)}function bn(e){return en(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function yn(e){if("html"===Yr(e))return e;const t=e.assignedSlot||e.parentNode||rn(e)&&e.host||Jr(e);return rn(t)?t.host:t}function vn(e){const t=yn(e);return xn(t)?e.ownerDocument?e.ownerDocument.body:e.body:tn(t)&&on(t)?t:vn(t)}function wn(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);const o=vn(e),s=o===(null==(n=e.ownerDocument)?void 0:n.body),a=Zr(o);if(s){const e=jn(a);return t.concat(a,a.visualViewport||[],on(o)?o:[],e&&r?wn(e):[])}return t.concat(o,wn(o,[],r))}function jn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function kn(e){const t=gn(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=tn(e),s=o?e.offsetWidth:r,a=o?e.offsetHeight:n,i=wr(r)!==s||wr(n)!==a;return i&&(r=s,n=a),{width:r,height:n,$:i}}function Nn(e){return en(e)?e:e.contextElement}function Cn(e){const t=Nn(e);if(!tn(t))return kr(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:s}=kn(t);let a=(s?wr(r.width):r.width)/n,i=(s?wr(r.height):r.height)/o;return a&&Number.isFinite(a)||(a=1),i&&Number.isFinite(i)||(i=1),{x:a,y:i}}const zn=kr(0);function Pn(e){const t=Zr(e);return pn()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:zn}function Sn(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);const o=e.getBoundingClientRect(),s=Nn(e);let a=kr(1);t&&(n?en(n)&&(a=Cn(n)):a=Cn(e));const i=function(e,t,r){return void 0===t&&(t=!1),!(!r||t&&r!==Zr(e))&&t}(s,r,n)?Pn(s):kr(0);let l=(o.left+i.x)/a.x,d=(o.top+i.y)/a.y,c=o.width/a.x,u=o.height/a.y;if(s){const e=Zr(s),t=n&&en(n)?Zr(n):n;let r=e,o=jn(r);for(;o&&n&&t!==r;){const e=Cn(o),t=o.getBoundingClientRect(),n=gn(o),s=t.left+(o.clientLeft+parseFloat(n.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(n.paddingTop))*e.y;l*=e.x,d*=e.y,c*=e.x,u*=e.y,l+=s,d+=a,r=Zr(o),o=jn(r)}}return Wr({width:c,height:u,x:l,y:d})}function En(e,t){const r=bn(e).scrollLeft;return t?t.left+r:Sn(Jr(e)).left+r}function Rn(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-En(e,r),y:r.top+t.scrollTop}}const Tn=new Set(["absolute","fixed"]);function Ln(e,t,r){let n;if("viewport"===t)n=function(e,t){const r=Zr(e),n=Jr(e),o=r.visualViewport;let s=n.clientWidth,a=n.clientHeight,i=0,l=0;if(o){s=o.width,a=o.height;const e=pn();(!e||e&&"fixed"===t)&&(i=o.offsetLeft,l=o.offsetTop)}const d=En(n);if(d<=0){const e=n.ownerDocument,t=e.body,r=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(r.marginLeft)+parseFloat(r.marginRight)||0,a=Math.abs(n.clientWidth-t.clientWidth-o);a<=25&&(s-=a)}else d<=25&&(s+=d);return{width:s,height:a,x:i,y:l}}(e,r);else if("document"===t)n=function(e){const t=Jr(e),r=bn(e),n=e.ownerDocument.body,o=vr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=vr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+En(e);const i=-r.scrollTop;return"rtl"===gn(n).direction&&(a+=vr(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:a,y:i}}(Jr(e));else if(en(t))n=function(e,t){const r=Sn(e,!0,"fixed"===t),n=r.top+e.clientTop,o=r.left+e.clientLeft,s=tn(e)?Cn(e):kr(1);return{width:e.clientWidth*s.x,height:e.clientHeight*s.y,x:o*s.x,y:n*s.y}}(t,r);else{const r=Pn(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Wr(n)}function Mn(e,t){const r=yn(e);return!(r===t||!en(r)||xn(r))&&("fixed"===gn(r).position||Mn(r,t))}function Dn(e,t,r){const n=tn(t),o=Jr(t),s="fixed"===r,a=Sn(e,!0,s,t);let i={scrollLeft:0,scrollTop:0};const l=kr(0);function d(){l.x=En(o)}if(n||!n&&!s)if(("body"!==Yr(t)||on(o))&&(i=bn(t)),n){const e=Sn(t,!0,s,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&d();s&&!n&&o&&d();const c=!o||n||s?kr(0):Rn(o,i);return{x:a.left+i.scrollLeft-l.x-c.x,y:a.top+i.scrollTop-l.y-c.y,width:a.width,height:a.height}}function In(e){return"static"===gn(e).position}function An(e,t){if(!tn(e)||"fixed"===gn(e).position)return null;if(t)return t(e);let r=e.offsetParent;return Jr(e)===r&&(r=r.ownerDocument.body),r}function _n(e,t){const r=Zr(e);if(dn(e))return r;if(!tn(e)){let t=yn(e);for(;t&&!xn(t);){if(en(t)&&!In(t))return t;t=yn(t)}return r}let n=An(e,t);for(;n&&an(n)&&In(n);)n=An(n,t);return n&&xn(n)&&In(n)&&!fn(n)?r:n||function(e){let t=yn(e);for(;tn(t)&&!xn(t);){if(fn(t))return t;if(dn(t))return null;t=yn(t)}return null}(e)||r}const On={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const s="fixed"===o,a=Jr(n),i=!!t&&dn(t.floating);if(n===a||i&&s)return r;let l={scrollLeft:0,scrollTop:0},d=kr(1);const c=kr(0),u=tn(n);if((u||!u&&!s)&&(("body"!==Yr(n)||on(a))&&(l=bn(n)),tn(n))){const e=Sn(n);d=Cn(n),c.x=e.x+n.clientLeft,c.y=e.y+n.clientTop}const m=!a||u||s?kr(0):Rn(a,l);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-l.scrollLeft*d.x+c.x+m.x,y:r.y*d.y-l.scrollTop*d.y+c.y+m.y}},getDocumentElement:Jr,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const s=[..."clippingAncestors"===r?dn(t)?[]:function(e,t){const r=t.get(e);if(r)return r;let n=wn(e,[],!1).filter(e=>en(e)&&"body"!==Yr(e)),o=null;const s="fixed"===gn(e).position;let a=s?yn(e):e;for(;en(a)&&!xn(a);){const t=gn(a),r=fn(a);r||"fixed"!==t.position||(o=null),(s?!r&&!o:!r&&"static"===t.position&&o&&Tn.has(o.position)||on(a)&&!r&&Mn(e,a))?n=n.filter(e=>e!==a):o=t,a=yn(a)}return t.set(e,n),n}(t,this._c):[].concat(r),n],a=s[0],i=s.reduce((e,r)=>{const n=Ln(t,r,o);return e.top=vr(n.top,e.top),e.right=yr(n.right,e.right),e.bottom=yr(n.bottom,e.bottom),e.left=vr(n.left,e.left),e},Ln(t,a,o));return{width:i.right-i.left,height:i.bottom-i.top,x:i.left,y:i.top}},getOffsetParent:_n,getElementRects:async function(e){const t=this.getOffsetParent||_n,r=this.getDimensions,n=await r(e.floating);return{reference:Dn(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:r}=kn(e);return{width:t,height:r}},getScale:Cn,isElement:en,isRTL:function(e){return"rtl"===gn(e).direction}};function $n(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Fn(e,t,r,n){void 0===n&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:i="function"==typeof IntersectionObserver,animationFrame:l=!1}=n,d=Nn(e),c=o||s?[...d?wn(d):[],...wn(t)]:[];c.forEach(e=>{o&&e.addEventListener("scroll",r,{passive:!0}),s&&e.addEventListener("resize",r)});const u=d&&i?function(e,t){let r,n=null;const o=Jr(e);function s(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return function a(i,l){void 0===i&&(i=!1),void 0===l&&(l=1),s();const d=e.getBoundingClientRect(),{left:c,top:u,width:m,height:f}=d;if(i||t(),!m||!f)return;const p={rootMargin:-jr(u)+"px "+-jr(o.clientWidth-(c+m))+"px "+-jr(o.clientHeight-(u+f))+"px "+-jr(c)+"px",threshold:vr(0,yr(1,l))||1};let h=!0;function x(t){const n=t[0].intersectionRatio;if(n!==l){if(!h)return a();n?a(!1,n):r=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==n||$n(d,e.getBoundingClientRect())||a(),h=!1}try{n=new IntersectionObserver(x,{...p,root:o.ownerDocument})}catch(e){n=new IntersectionObserver(x,p)}n.observe(e)}(!0),s}(d,r):null;let m,f=-1,p=null;a&&(p=new ResizeObserver(e=>{let[n]=e;n&&n.target===d&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;null==(e=p)||e.observe(t)})),r()}),d&&!l&&p.observe(d),p.observe(t));let h=l?Sn(e):null;return l&&function t(){const n=Sn(e);h&&!$n(h,n)&&r();h=n,m=requestAnimationFrame(t)}(),r(),()=>{var e;c.forEach(e=>{o&&e.removeEventListener("scroll",r),s&&e.removeEventListener("resize",r)}),null==u||u(),null==(e=p)||e.disconnect(),p=null,l&&cancelAnimationFrame(m)}}const Vn=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:s,placement:a,middlewareData:i}=t,l=await async function(e,t){const{placement:r,platform:n,elements:o}=e,s=await(null==n.isRTL?void 0:n.isRTL(o.floating)),a=Sr(r),i=Er(r),l="y"===Mr(r),d=Ur.has(a)?-1:1,c=s&&l?-1:1,u=Pr(t,e);let{mainAxis:m,crossAxis:f,alignmentAxis:p}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return i&&"number"==typeof p&&(f="end"===i?-1*p:p),l?{x:f*c,y:m*d}:{x:m*d,y:f*c}}(t,e);return a===(null==(r=i.offset)?void 0:r.placement)&&null!=(n=i.arrow)&&n.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:a}}}}},Bn=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:i={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...l}=Pr(e,t),d={x:r,y:n},c=await Gr(t,l),u=Mr(Sr(o)),m=Rr(u);let f=d[m],p=d[u];if(s){const e="y"===m?"bottom":"right";f=zr(f+c["y"===m?"top":"left"],f,f-c[e])}if(a){const e="y"===u?"bottom":"right";p=zr(p+c["y"===u?"top":"left"],p,p-c[e])}const h=i.fn({...t,[m]:f,[u]:p});return{...h,data:{x:h.x-r,y:h.y-n,enabled:{[m]:s,[u]:a}}}}}},Wn=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:s,rects:a,initialPlacement:i,platform:l,elements:d}=t,{mainAxis:c=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:h=!0,...x}=Pr(e,t);if(null!=(r=s.arrow)&&r.alignmentOffset)return{};const g=Sr(o),b=Mr(i),y=Sr(i)===i,v=await(null==l.isRTL?void 0:l.isRTL(d.floating)),w=m||(y||!h?[Vr(i)]:function(e){const t=Vr(e);return[Ir(e),t,Ir(t)]}(i)),j="none"!==p;!m&&j&&w.push(...Fr(i,h,p,v));const k=[i,...w],N=await Gr(t,x),C=[];let z=(null==(n=s.flip)?void 0:n.overflows)||[];if(c&&C.push(N[g]),u){const e=function(e,t,r){void 0===r&&(r=!1);const n=Er(e),o=Dr(e),s=Tr(o);let a="x"===o?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=Vr(a)),[a,Vr(a)]}(o,a,v);C.push(N[e[0]],N[e[1]])}if(z=[...z,{placement:o,overflows:C}],!C.every(e=>e<=0)){var P,S;const e=((null==(P=s.flip)?void 0:P.index)||0)+1,t=k[e];if(t){if(!("alignment"===u&&b!==Mr(t))||z.every(e=>Mr(e.placement)!==b||e.overflows[0]>0))return{data:{index:e,overflows:z},reset:{placement:t}}}let r=null==(S=z.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:S.placement;if(!r)switch(f){case"bestFit":{var E;const e=null==(E=z.filter(e=>{if(j){const t=Mr(e.placement);return t===b||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:E[0];e&&(r=e);break}case"initialPlacement":r=i}if(o!==r)return{reset:{placement:r}}}return{}}}},Hn=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:s,platform:a,elements:i}=t,{apply:l=()=>{},...d}=Pr(e,t),c=await Gr(t,d),u=Sr(o),m=Er(o),f="y"===Mr(o),{width:p,height:h}=s.floating;let x,g;"top"===u||"bottom"===u?(x=u,g=m===(await(null==a.isRTL?void 0:a.isRTL(i.floating))?"start":"end")?"left":"right"):(g=u,x="end"===m?"top":"bottom");const b=h-c.top-c.bottom,y=p-c.left-c.right,v=yr(h-c[x],b),w=yr(p-c[g],y),j=!t.middlewareData.shift;let k=v,N=w;if(null!=(r=t.middlewareData.shift)&&r.enabled.x&&(N=y),null!=(n=t.middlewareData.shift)&&n.enabled.y&&(k=b),j&&!m){const e=vr(c.left,0),t=vr(c.right,0),r=vr(c.top,0),n=vr(c.bottom,0);f?N=p-2*(0!==e||0!==t?e+t:vr(c.left,c.right)):k=h-2*(0!==r||0!==n?r+n:vr(c.top,c.bottom))}await l({...t,availableWidth:N,availableHeight:k});const C=await a.getDimensions(i.floating);return p!==C.width||h!==C.height?{reset:{rects:!0}}:{}}}},Gn=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=Pr(e,t);switch(n){case"referenceHidden":{const e=qr(await Gr(t,{...o,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Kr(e)}}}case"escaped":{const e=qr(await Gr(t,{...o,altBoundary:!0}),r.floating);return{data:{escapedOffsets:e,escaped:Kr(e)}}}default:return{}}}}},qn=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:s,platform:a,elements:i,middlewareData:l}=t,{element:d,padding:c=0}=Pr(e,t)||{};if(null==d)return{};const u=Br(c),m={x:r,y:n},f=Dr(o),p=Tr(f),h=await a.getDimensions(d),x="y"===f,g=x?"top":"left",b=x?"bottom":"right",y=x?"clientHeight":"clientWidth",v=s.reference[p]+s.reference[f]-m[f]-s.floating[p],w=m[f]-s.reference[f],j=await(null==a.getOffsetParent?void 0:a.getOffsetParent(d));let k=j?j[y]:0;k&&await(null==a.isElement?void 0:a.isElement(j))||(k=i.floating[y]||s.floating[p]);const N=v/2-w/2,C=k/2-h[p]/2-1,z=yr(u[g],C),P=yr(u[b],C),S=z,E=k-h[p]-P,R=k/2-h[p]/2+N,T=zr(S,R,E),L=!l.arrow&&null!=Er(o)&&R!==T&&s.reference[p]/2-(R<S?z:P)-h[p]/2<0,M=L?R<S?R-S:R-E:0;return{[f]:m[f]+M,data:{[f]:T,centerOffset:R-T-M,...L&&{alignmentOffset:M}},reset:L}}}),Kn=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:s,middlewareData:a}=t,{offset:i=0,mainAxis:l=!0,crossAxis:d=!0}=Pr(e,t),c={x:r,y:n},u=Mr(o),m=Rr(u);let f=c[m],p=c[u];const h=Pr(i,t),x="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const e="y"===m?"height":"width",t=s.reference[m]-s.floating[e]+x.mainAxis,r=s.reference[m]+s.reference[e]-x.mainAxis;f<t?f=t:f>r&&(f=r)}if(d){var g,b;const e="y"===m?"width":"height",t=Ur.has(Sr(o)),r=s.reference[u]-s.floating[e]+(t&&(null==(g=a.offset)?void 0:g[u])||0)+(t?0:x.crossAxis),n=s.reference[u]+s.reference[e]+(t?0:(null==(b=a.offset)?void 0:b[u])||0)-(t?x.crossAxis:0);p<r?p=r:p>n&&(p=n)}return{[m]:f,[u]:p}}}},Un=(e,t,r)=>{const n=new Map,o={platform:On,...r},s={...o.platform,_c:n};return(async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:a}=r,i=s.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let d=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:u}=Hr(d,n,l),m=n,f={},p=0;for(let r=0;r<i.length;r++){const{name:s,fn:h}=i[r],{x:x,y:g,data:b,reset:y}=await h({x:c,y:u,initialPlacement:n,placement:m,strategy:o,middlewareData:f,rects:d,platform:a,elements:{reference:e,floating:t}});c=null!=x?x:c,u=null!=g?g:u,f={...f,[s]:{...f[s],...b}},y&&p<=50&&(p++,"object"==typeof y&&(y.placement&&(m=y.placement),y.rects&&(d=!0===y.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):y.rects),({x:c,y:u}=Hr(d,m,l))),r=-1)}return{x:c,y:u,placement:m,strategy:o,middlewareData:f}})(e,t,{...o,platform:s})};var Xn="undefined"!=typeof document?t.useLayoutEffect:function(){};function Yn(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 r,n,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;0!==n--;)if(!Yn(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;0!==n--;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;0!==n--;){const r=o[n];if(("_owner"!==r||!e.$$typeof)&&!Yn(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function Zn(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Jn(e,t){const r=Zn(e);return Math.round(t*r)/r}function Qn(e){const t=o.useRef(e);return Xn(()=>{t.current=e}),t}const eo=e=>({name:"arrow",options:e,fn(t){const{element:r,padding:n}="function"==typeof e?e(t):e;return r&&(o=r,{}.hasOwnProperty.call(o,"current"))?null!=r.current?qn({element:r.current,padding:n}).fn(t):{}:r?qn({element:r,padding:n}).fn(t):{};var o}}),to=(e,t)=>({...Bn(e),options:[e,t]}),ro=(e,t)=>({...Kn(e),options:[e,t]}),no=(e,t)=>({...Wn(e),options:[e,t]}),oo=(e,t)=>({...Hn(e),options:[e,t]}),so=(e,t)=>({...Gn(e),options:[e,t]}),ao=(e,t)=>({...eo(e),options:[e,t]});var io=o.forwardRef((t,r)=>{const{children:n,width:o=10,height:s=5,...a}=t;return e.jsx(w.svg,{...a,ref:r,width:o,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:e.jsx("polygon",{points:"0,0 30,0 15,10"})})});io.displayName="Arrow";var lo=io;function co(e){const[t,r]=o.useState(void 0);return b(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t))return;if(!t.length)return;const n=t[0];let o,s;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,s=t.blockSize}else o=e.offsetWidth,s=e.offsetHeight;r({width:o,height:s})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)},[e]),t}var uo="Popper",[mo,fo]=a(uo),[po,ho]=mo(uo),xo=t=>{const{__scopePopper:r,children:n}=t,[s,a]=o.useState(null);return e.jsx(po,{scope:r,anchor:s,onAnchorChange:a,children:n})};xo.displayName=uo;var go="PopperAnchor",bo=o.forwardRef((t,r)=>{const{__scopePopper:n,virtualRef:s,...a}=t,i=ho(go,n),l=o.useRef(null),d=c(r,l),u=o.useRef(null);return o.useEffect(()=>{const e=u.current;u.current=s?.current||l.current,e!==u.current&&i.onAnchorChange(u.current)}),s?null:e.jsx(w.div,{...a,ref:d})});bo.displayName=go;var yo="PopperContent",[vo,wo]=mo(yo),jo=o.forwardRef((t,r)=>{const{__scopePopper:n,side:a="bottom",sideOffset:i=0,align:l="center",alignOffset:d=0,arrowPadding:u=0,avoidCollisions:m=!0,collisionBoundary:f=[],collisionPadding:p=0,sticky:h="partial",hideWhenDetached:x=!1,updatePositionStrategy:g="optimized",onPlaced:y,...v}=t,j=ho(yo,n),[k,N]=o.useState(null),C=c(r,e=>N(e)),[z,P]=o.useState(null),S=co(z),E=S?.width??0,R=S?.height??0,T=a+("center"!==l?"-"+l:""),L="number"==typeof p?p:{top:0,right:0,bottom:0,left:0,...p},M=Array.isArray(f)?f:[f],D=M.length>0,I={padding:L,boundary:M.filter(zo),altBoundary:D},{refs:A,floatingStyles:_,placement:O,isPositioned:$,middlewareData:F}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:a,elements:{reference:i,floating:l}={},transform:d=!0,whileElementsMounted:c,open:u}=e,[m,f]=o.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=o.useState(n);Yn(p,n)||h(n);const[x,g]=o.useState(null),[b,y]=o.useState(null),v=o.useCallback(e=>{e!==N.current&&(N.current=e,g(e))},[]),w=o.useCallback(e=>{e!==C.current&&(C.current=e,y(e))},[]),j=i||x,k=l||b,N=o.useRef(null),C=o.useRef(null),z=o.useRef(m),P=null!=c,S=Qn(c),E=Qn(a),R=Qn(u),T=o.useCallback(()=>{if(!N.current||!C.current)return;const e={placement:t,strategy:r,middleware:p};E.current&&(e.platform=E.current),Un(N.current,C.current,e).then(e=>{const t={...e,isPositioned:!1!==R.current};L.current&&!Yn(z.current,t)&&(z.current=t,s.flushSync(()=>{f(t)}))})},[p,t,r,E,R]);Xn(()=>{!1===u&&z.current.isPositioned&&(z.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[u]);const L=o.useRef(!1);Xn(()=>(L.current=!0,()=>{L.current=!1}),[]),Xn(()=>{if(j&&(N.current=j),k&&(C.current=k),j&&k){if(S.current)return S.current(j,k,T);T()}},[j,k,T,S,P]);const M=o.useMemo(()=>({reference:N,floating:C,setReference:v,setFloating:w}),[v,w]),D=o.useMemo(()=>({reference:j,floating:k}),[j,k]),I=o.useMemo(()=>{const e={position:r,left:0,top:0};if(!D.floating)return e;const t=Jn(D.floating,m.x),n=Jn(D.floating,m.y);return d?{...e,transform:"translate("+t+"px, "+n+"px)",...Zn(D.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,d,D.floating,m.x,m.y]);return o.useMemo(()=>({...m,update:T,refs:M,elements:D,floatingStyles:I}),[m,T,M,D,I])}({strategy:"fixed",placement:T,whileElementsMounted:(...e)=>Fn(...e,{animationFrame:"always"===g}),elements:{reference:j.anchor},middleware:[(V={mainAxis:i+R,alignmentAxis:d},{...Vn(V),options:[V,B]}),m&&to({mainAxis:!0,crossAxis:!1,limiter:"partial"===h?ro():void 0,...I}),m&&no({...I}),oo({...I,apply:({elements:e,rects:t,availableWidth:r,availableHeight:n})=>{const{width:o,height:s}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${r}px`),a.setProperty("--radix-popper-available-height",`${n}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${s}px`)}}),z&&ao({element:z,padding:u}),Po({arrowWidth:E,arrowHeight:R}),x&&so({strategy:"referenceHidden",...I})]});var V,B;const[W,H]=So(O),G=dr(y);b(()=>{$&&G?.()},[$,G]);const q=F.arrow?.x,K=F.arrow?.y,U=0!==F.arrow?.centerOffset,[X,Y]=o.useState();return b(()=>{k&&Y(window.getComputedStyle(k).zIndex)},[k]),e.jsx("div",{ref:A.setFloating,"data-radix-popper-content-wrapper":"",style:{..._,transform:$?_.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(" "),...F.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:e.jsx(vo,{scope:n,placedSide:W,onArrowChange:P,arrowX:q,arrowY:K,shouldHideArrow:U,children:e.jsx(w.div,{"data-side":W,"data-align":H,...v,ref:C,style:{...v.style,animation:$?void 0:"none"}})})})});jo.displayName=yo;var ko="PopperArrow",No={top:"bottom",right:"left",bottom:"top",left:"right"},Co=o.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,s=wo(ko,n),a=No[s.placedSide];return e.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:e.jsx(lo,{...o,ref:r,style:{...o.style,display:"block"}})})});function zo(e){return null!==e}Co.displayName=ko;var Po=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:o}=t,s=0!==o.arrow?.centerOffset,a=s?0:e.arrowWidth,i=s?0:e.arrowHeight,[l,d]=So(r),c={start:"0%",center:"50%",end:"100%"}[d],u=(o.arrow?.x??0)+a/2,m=(o.arrow?.y??0)+i/2;let f="",p="";return"bottom"===l?(f=s?c:`${u}px`,p=-i+"px"):"top"===l?(f=s?c:`${u}px`,p=`${n.floating.height+i}px`):"right"===l?(f=-i+"px",p=s?c:`${m}px`):"left"===l&&(f=`${n.floating.width+i}px`,p=s?c:`${m}px`),{data:{x:f,y:p}}}});function So(e){const[t,r="center"]=e.split("-");return[t,r]}var Eo=xo,Ro=bo,To=jo,Lo=Co,Mo=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Do=o.forwardRef((t,r)=>e.jsx(w.span,{...t,ref:r,style:{...Mo,...t.style}}));Do.displayName="VisuallyHidden";var Io=Do,[Ao]=a("Tooltip",[fo]),_o=fo(),Oo="TooltipProvider",$o=700,Fo="tooltip.open",[Vo,Bo]=Ao(Oo),Wo=t=>{const{__scopeTooltip:r,delayDuration:n=$o,skipDelayDuration:s=300,disableHoverableContent:a=!1,children:i}=t,l=o.useRef(!0),d=o.useRef(!1),c=o.useRef(0);return o.useEffect(()=>{const e=c.current;return()=>window.clearTimeout(e)},[]),e.jsx(Vo,{scope:r,isOpenDelayedRef:l,delayDuration:n,onOpen:o.useCallback(()=>{window.clearTimeout(c.current),l.current=!1},[]),onClose:o.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>l.current=!0,s)},[s]),isPointerInTransitRef:d,onPointerInTransitChange:o.useCallback(e=>{d.current=e},[]),disableHoverableContent:a,children:i})};Wo.displayName=Oo;var Ho="Tooltip",[Go,qo]=Ao(Ho),Ko=t=>{const{__scopeTooltip:r,children:n,open:s,defaultOpen:a,onOpenChange:i,disableHoverableContent:l,delayDuration:d}=t,c=Bo(Ho,t.__scopeTooltip),u=_o(r),[m,f]=o.useState(null),p=z(),h=o.useRef(0),x=l??c.disableHoverableContent,g=d??c.delayDuration,b=o.useRef(!1),[y,w]=v({prop:s,defaultProp:a??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(Fo))):c.onClose(),i?.(e)},caller:Ho}),j=o.useMemo(()=>y?b.current?"delayed-open":"instant-open":"closed",[y]),k=o.useCallback(()=>{window.clearTimeout(h.current),h.current=0,b.current=!1,w(!0)},[w]),N=o.useCallback(()=>{window.clearTimeout(h.current),h.current=0,w(!1)},[w]),C=o.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{b.current=!0,w(!0),h.current=0},g)},[g,w]);return o.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),e.jsx(Eo,{...u,children:e.jsx(Go,{scope:r,contentId:p,open:y,stateAttribute:j,trigger:m,onTriggerChange:f,onTriggerEnter:o.useCallback(()=>{c.isOpenDelayedRef.current?C():k()},[c.isOpenDelayedRef,C,k]),onTriggerLeave:o.useCallback(()=>{x?N():(window.clearTimeout(h.current),h.current=0)},[N,x]),onOpen:k,onClose:N,disableHoverableContent:x,children:n})})};Ko.displayName=Ho;var Uo="TooltipTrigger",Xo=o.forwardRef((t,r)=>{const{__scopeTooltip:n,...s}=t,a=qo(Uo,n),i=Bo(Uo,n),l=_o(n),d=c(r,o.useRef(null),a.onTriggerChange),u=o.useRef(!1),m=o.useRef(!1),f=o.useCallback(()=>u.current=!1,[]);return o.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),e.jsx(Ro,{asChild:!0,...l,children:e.jsx(w.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...s,ref:d,onPointerMove:g(t.onPointerMove,e=>{"touch"!==e.pointerType&&(m.current||i.isPointerInTransitRef.current||(a.onTriggerEnter(),m.current=!0))}),onPointerLeave:g(t.onPointerLeave,()=>{a.onTriggerLeave(),m.current=!1}),onPointerDown:g(t.onPointerDown,()=>{a.open&&a.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:g(t.onFocus,()=>{u.current||a.onOpen()}),onBlur:g(t.onBlur,a.onClose),onClick:g(t.onClick,a.onClose)})})});Xo.displayName=Uo;var[Yo,Zo]=Ao("TooltipPortal",{forceMount:void 0}),Jo="TooltipContent",Qo=o.forwardRef((t,r)=>{const n=Zo(Jo,t.__scopeTooltip),{forceMount:o=n.forceMount,side:s="top",...a}=t,i=qo(Jo,t.__scopeTooltip);return e.jsx(j,{present:o||i.open,children:i.disableHoverableContent?e.jsx(os,{side:s,...a,ref:r}):e.jsx(es,{side:s,...a,ref:r})})}),es=o.forwardRef((t,r)=>{const n=qo(Jo,t.__scopeTooltip),s=Bo(Jo,t.__scopeTooltip),a=o.useRef(null),i=c(r,a),[l,d]=o.useState(null),{trigger:u,onClose:m}=n,f=a.current,{onPointerInTransitChange:p}=s,h=o.useCallback(()=>{d(null),p(!1)},[p]),x=o.useCallback((e,t)=>{const r=e.currentTarget,n={x:e.clientX,y:e.clientY},o=function(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r})}return n}(n,function(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(r,n,o,s)){case s:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}(n,r.getBoundingClientRect())),s=function(e){const t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),function(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const n=e[r];for(;t.length>=2;){const e=t[t.length-1],r=t[t.length-2];if(!((e.x-r.x)*(n.y-r.y)>=(e.y-r.y)*(n.x-r.x)))break;t.pop()}t.push(n)}t.pop();const r=[];for(let t=e.length-1;t>=0;t--){const n=e[t];for(;r.length>=2;){const e=r[r.length-1],t=r[r.length-2];if(!((e.x-t.x)*(n.y-t.y)>=(e.y-t.y)*(n.x-t.x)))break;r.pop()}r.push(n)}return r.pop(),1===t.length&&1===r.length&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}(t)}([...o,...function(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}(t.getBoundingClientRect())]);d(s),p(!0)},[p]);return o.useEffect(()=>()=>h(),[h]),o.useEffect(()=>{if(u&&f){const e=e=>x(e,f),t=e=>x(e,u);return u.addEventListener("pointerleave",e),f.addEventListener("pointerleave",t),()=>{u.removeEventListener("pointerleave",e),f.removeEventListener("pointerleave",t)}}},[u,f,x,h]),o.useEffect(()=>{if(l){const e=e=>{const t=e.target,r={x:e.clientX,y:e.clientY},n=u?.contains(t)||f?.contains(t),o=!function(e,t){const{x:r,y:n}=e;let o=!1;for(let e=0,s=t.length-1;e<t.length;s=e++){const a=t[e],i=t[s],l=a.x,d=a.y,c=i.x,u=i.y;d>n!=u>n&&r<(c-l)*(n-d)/(u-d)+l&&(o=!o)}return o}(r,l);n?h():o&&(h(),m())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[u,f,l,m,h]),e.jsx(os,{...t,ref:i})}),[ts,rs]=Ao(Ho,{isInside:!1}),ns=function(t){const r=({children:t})=>e.jsx(e.Fragment,{children:t});return r.displayName=`${t}.Slottable`,r.__radixId=p,r}("TooltipContent"),os=o.forwardRef((t,r)=>{const{__scopeTooltip:n,children:s,"aria-label":a,onEscapeKeyDown:i,onPointerDownOutside:l,...d}=t,c=qo(Jo,n),u=_o(n),{onClose:m}=c;return o.useEffect(()=>(document.addEventListener(Fo,m),()=>document.removeEventListener(Fo,m)),[m]),o.useEffect(()=>{if(c.trigger){const e=e=>{const t=e.target;t?.contains(c.trigger)&&m()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[c.trigger,m]),e.jsx(hr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:e=>e.preventDefault(),onDismiss:m,children:e.jsxs(To,{"data-state":c.stateAttribute,...u,...d,ref:r,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[e.jsx(ns,{children:s}),e.jsx(ts,{scope:n,isInside:!0,children:e.jsx(Io,{id:c.contentId,role:"tooltip",children:a||s})})]})})});Qo.displayName=Jo;var ss="TooltipArrow",as=o.forwardRef((t,r)=>{const{__scopeTooltip:n,...o}=t,s=_o(n);return rs(ss,n).isInside?null:e.jsx(Lo,{...s,...o,ref:r})});as.displayName=ss;var is=Wo,ls=Ko,ds=Xo,cs=Qo,us=as;const ms={none:{side:"top",align:"center"},top:{side:"top",align:"center"},topstart:{side:"top",align:"start"},topcenter:{side:"top",align:"center"},topend:{side:"top",align:"end"},bottom:{side:"bottom",align:"center"},bottomstart:{side:"bottom",align:"start"},bottomcenter:{side:"bottom",align:"center"},bottomend:{side:"bottom",align:"end"},left:{side:"left",align:"center"},leftstart:{side:"left",align:"start"},leftcenter:{side:"left",align:"center"},leftend:{side:"left",align:"end"},right:{side:"right",align:"center"},rightstart:{side:"right",align:"start"},rightcenter:{side:"right",align:"center"},rightend:{side:"right",align:"end"}},fs=o.forwardRef(({className:t,sideOffset:r=4,...n},o)=>e.jsx(cs,{ref:o,sideOffset:r,className:Jt("z-50 overflow-hidden rounded-md border bg-black px-3 py-1.5 text-sm text-white shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",t),...n,children:n.children}));fs.displayName=cs.displayName;const ps=({children:t,content:r,description:n,className:o,contentClassName:s,descriptionClassName:a,sideOffset:i=4,position:l="none",dir:d="rtl"})=>{const c="ltr"===d,u=ms[l]||{side:"top",align:c?"start":"end"},m="none"!==l;return e.jsx(is,{children:e.jsxs(ls,{delayDuration:50,children:[e.jsx(ds,{asChild:!0,children:t}),e.jsxs(fs,{className:Jt(o),sideOffset:i,side:u.side,align:u.align,dir:d,children:[e.jsxs("div",{className:"flex flex-col",dir:d,children:[e.jsx("span",{className:Jt("text-base font-medium",s),children:r}),n&&e.jsx("span",{className:Jt("text-xs opacity-70 mt-1",c?"text-start":"text-end",a),children:n})]}),m&&e.jsx(us,{className:"fill-black",width:16,height:6})]})]})})},hs=t.memo(({stroke:t="",fill:r="none",width:n="12",height:o="12"})=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:n,height:o,viewBox:"0 0 12 12",fill:r,children:e.jsx("path",{d:"M6 2.5V9.5M2.5 6H9.5",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})),xs=({imgList:t,size:r,showAmount:n=5,showAddBtn:o=!1,tooltip:s,addBtnAction:a})=>{const i=t.slice(0,n),l=t.length-n;return e.jsxs("div",{className:"flex -space-x-1 w-full",children:[i.map((t,n)=>e.jsx("img",{alt:"",className:Jt("inline-block rounded-full ring-2 ring-white",nr[r]),style:{zIndex:n},...t},n)),l>0&&e.jsx("div",{className:Jt("inline-flex items-center justify-center rounded-full bg-gray-100 border-2 border-white font-medium text-gray-700 shadow-2xs align-middle hover:bg-gray-200 focus:outline-hidden focus:bg-gray-300 text-sm dark:bg-neutral-700 dark:text-white dark:hover:bg-neutral-600 dark:focus:bg-neutral-600 dark:border-neutral-800",nr[r]),style:{zIndex:n},children:e.jsxs("span",{className:"font-medium text-xs",children:["+",l]})}),o&&s?e.jsx(ps,{...s,children:e.jsx("button",{className:Jt("mx-2 p-1 flex justify-center items-center cursor-pointer stroke-rfg-quinary-400 rounded-full bg-rbg-primary border border-dashed border-rborder-primary hover:bg-rbg-primary-hover disabled:bg-rbg-disabled-subtle disabled:cur",nr[r]),onClick:a,children:e.jsx(hs,{})})}):e.jsx("button",{className:Jt("mx-2 p-1 flex justify-center items-center cursor-pointer stroke-rfg-quinary-400 rounded-full bg-rbg-primary border border-dashed border-rborder-primary hover:bg-rbg-primary-hover disabled:bg-rbg-disabled-subtle disabled:cur",nr[r]),onClick:a,children:e.jsx(hs,{})})]})},gs=({img:t,size:r,notifyColor:n="",notifyIcon:o="",iconBorder:s})=>e.jsxs("div",{className:Jt("relative inline-block",nr[r]),children:[e.jsx("img",{alt:"",...t,className:Jt("rounded-full object-cover ring-2 ring-white",nr[r])}),n&&e.jsx("span",{className:Jt(`absolute bottom-0 right-1 block rounded-full ${n} ring-2 ring-white`,or[r])}),o&&e.jsx("span",{className:Jt("absolute bottom-0 right-1 block rounded-full",sr[r],`has-[>svg]:${sr[r]} ${s&&"ring-2 ring-white"}`),children:o})]}),bs=t.memo(({stroke:t="",fill:r="none",width:n="12",className:o="",height:s="12"})=>e.jsx("svg",{"data-testid":"icon-x-close",xmlns:"http://www.w3.org/2000/svg",width:n,role:"x-icon",height:s,className:o,viewBox:"0 0 12 12",fill:r,children:e.jsx("path",{d:"M9 3L3 9M3 3L9 9",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})),ys=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,vs=Ge,ws=(e,t)=>r=>{var n;if(null==(null==t?void 0:t.variants))return vs(e,null==r?void 0:r.class,null==r?void 0:r.className);const{variants:o,defaultVariants:s}=t,a=Object.keys(o).map(e=>{const t=null==r?void 0:r[e],n=null==s?void 0:s[e];if(null===t)return null;const a=ys(t)||ys(n);return o[e][a]}),i=r&&Object.entries(r).reduce((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e},{}),l=null==t||null===(n=t.compoundVariants)||void 0===n?void 0:n.reduce((e,t)=>{let{class:r,className:n,...o}=t;return Object.entries(o).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...s,...i}[t]):{...s,...i}[t]===r})?[...e,r,n]:e},[]);return vs(e,a,l,null==r?void 0:r.class,null==r?void 0:r.className)},js=ws("flex items-center font-medium",{variants:{size:{sm:"px-2 py-0.5 gap-1 has-[>svg]:text-sm text-xs",md:"px-2.5 py-0.5 gap-1.5 has-[>svg]:text-md text-sm",lg:"px-3 py-1 gap-2 has-[>svg]:text-lg text-sm"},type:{pillColor:"rounded-full border",pillOutline:"rounded-full border-[1.5px]",badgeColor:"rounded-sm border",badgeModern:"rounded-md shadow-sm border has-[>svg]:stroke-current"},dir:{ltr:"flex-row",rtl:"flex-row-reverse"},color:{gray:"bg-utility-gray-50 text-utility-gray-700 border-utility-gray-200 has-[>svg]:stroke-utility-gray-light-400",brand:"bg-utility-brand-50 text-utility-brand-700 border-utility-brand-200 has-[>svg]:stroke-utility-brand-400",error:"bg-utility-error-50 text-utility-error-700 border-utility-error-200 has-[>svg]:stroke-utility-error-400",success:"bg-utility-success-50 text-utility-success-700 border-utility-success-200 has-[>svg]:stroke-utility-success-400",grayBlue:"bg-utility-gray-blue-50 text-utility-gray-blue-700 border-utility-gray-blue-200 has-[>svg]:stroke-utility-gray-blue-400",blueLight:"bg-utility-blue-light-50 text-utility-blue-light-700 border-utility-blue-light-200 has-[>svg]:stroke-utility-blue-light-400",blue:"bg-utility-blue-50 text-utility-blue-700 border-utility-blue-200 has-[>svg]:stroke-utility-blue-400",indigo:"bg-utility-indigo-50 text-utility-indigo-700 border-utility-indigo-200 has-[>svg]:stroke-utility-indigo-400",purple:"bg-utility-purple-50 text-utility-purple-700 border-utility-purple-200 has-[>svg]:stroke-utility-purple-400",pink:"bg-utility-pink-50 text-utility-pink-700 border-utility-pink-200 has-[>svg]:stroke-utility-pink-400",orange:"bg-utility-orange-50 text-utility-orange-700 border-utility-orange-200 has-[>svg]:stroke-utility-orange-400 fill-red-500"}},defaultVariants:{size:"sm",type:"pillColor",dir:"ltr",color:"blue"}});function ks({className:t,size:r="sm",type:n="pillColor",color:o="blue",dir:s="rtl",icon:a,closable:i=!1,onClose:l,children:d,...c}){return e.jsxs("div",{className:Jt("w-fit",js({size:r,type:n,dir:s,color:o}),"badgeModern"===n&&"bg-transparent border-primary text-secondary",t),...c,children:[a,d,i&&e.jsx("button",{onClick:l,className:"ml-1",children:e.jsx(bs,{className:"w-3 h-3 stroke-current"})})]})}const Ns=t.memo(()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:e.jsx("path",{d:"M10 12L6 8L10 4",stroke:"#D0D5DD",strokeWidth:"1.33333",strokeLinecap:"round",strokeLinejoin:"round"})})),Cs=t.memo(()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"6",height:"10",viewBox:"0 0 6 10",fill:"none",children:e.jsx("path",{d:"M1 9L5 5L1 1",stroke:"#D0D5DD",strokeWidth:"1.33333",strokeLinecap:"round",strokeLinejoin:"round"})})),zs=t.memo(()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:e.jsx("path",{d:"M6.66667 14.1667H13.3333M9.18141 2.30333L3.52949 6.69927C3.15168 6.99312 2.96278 7.14005 2.82669 7.32405C2.70614 7.48704 2.61633 7.67065 2.56169 7.86588C2.5 8.08627 2.5 8.32558 2.5 8.80421V14.8333C2.5 15.7667 2.5 16.2335 2.68166 16.59C2.84144 16.9036 3.09641 17.1585 3.41002 17.3183C3.76654 17.5 4.23325 17.5 5.16667 17.5H14.8333C15.7668 17.5 16.2335 17.5 16.59 17.3183C16.9036 17.1585 17.1586 16.9036 17.3183 16.59C17.5 16.2335 17.5 15.7667 17.5 14.8333V8.80421C17.5 8.32558 17.5 8.08627 17.4383 7.86588C17.3837 7.67065 17.2939 7.48704 17.1733 7.32405C17.0372 7.14005 16.8483 6.99312 16.4705 6.69927L10.8186 2.30333C10.5258 2.07562 10.3794 1.96177 10.2178 1.918C10.0752 1.87938 9.92484 1.87938 9.78221 1.918C9.62057 1.96177 9.47418 2.07562 9.18141 2.30333Z",stroke:"#667085",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})})),Ps=t.memo(()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:e.jsx("path",{d:"M6.66667 14.1667H13.3333M9.18141 2.30333L3.52949 6.69927C3.15168 6.99312 2.96278 7.14005 2.82669 7.32405C2.70614 7.48704 2.61633 7.67065 2.56169 7.86588C2.5 8.08627 2.5 8.32558 2.5 8.80421V14.8333C2.5 15.7667 2.5 16.2335 2.68166 16.59C2.84144 16.9036 3.09641 17.1585 3.41002 17.3183C3.76654 17.5 4.23325 17.5 5.16667 17.5H14.8333C15.7668 17.5 16.2335 17.5 16.59 17.3183C16.9036 17.1585 17.1586 16.9036 17.3183 16.59C17.5 16.2335 17.5 15.7667 17.5 14.8333V8.80421C17.5 8.32558 17.5 8.08627 17.4383 7.86588C17.3837 7.67065 17.2939 7.48704 17.1733 7.32405C17.0372 7.14005 16.8483 6.99312 16.4705 6.69927L10.8186 2.30333C10.5258 2.07562 10.3794 1.96177 10.2178 1.918C10.0752 1.87938 9.92484 1.87938 9.78221 1.918C9.62057 1.96177 9.47418 2.07562 9.18141 2.30333Z",stroke:"#0050FF",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})})),Ss=ws("inline-flex items-center justify-center font-medium focus:outline-none transition-all w-fit rounded-md border transition-all duration-300 cursor-pointer relative",{variants:{loading:{true:"pointer-events-none"},size:{sm:"text-sm px-3 py-2 gap-1",md:"text-base px-3.5 py-2.5 gap-1",lg:"text-lg px-4 py-2.5 gap-1.5",xl:"text-lg px-4.5 py-3 gap-1.5","2xl":"rounded-lg text-lg px-5.5 py-4 gap-2"},fullWidth:{true:"w-full"},disabled:{true:"pointer-events-none"},dir:{rtl:"flex-row",ltr:"flex-row-reverse"},variant:{primary:"border-gradient-border bg-rbutton-primary-bg hover:bg-rbutton-primary-bg-hover focus:bg-rbutton-primary-bg shadow-xs-skeuomorphic focus:shadow-focus-ring-shadow-xs-skeuomorphic text-rbutton-primary-fg has-[>svg]:text-rbutton-primary-fg disabled:bg-rbg-disabled disabled:border-rborder-disabled-subtle disabled:text-rfg-disabled has-[>svg]:disabled:text-rfg-disabled disabled:shadow-xs",secondaryGray:"text-rbutton-secondary-fg has-[>svg]:stroke-rbutton-secondary-fg border-gradient-border bg-rbutton-secondary-bg hover:bg-rbutton-secondary-bg-hover shadow-xs-skeuomorphic disabled:bg-rbg-primary disabled:border-rborder-disabled-subtle disabled:text-rfg-disabled has-[>svg]:disabled:text-rfg-disabled disabled:shadow-xs",secondaryColor:"text-rbutton-secondary-color-fg bg-rbutton-secondary-color-bg border-rbutton-secondary-color-border hover:text-rbutton-secondary-color-fg-hover hover:bg-rbutton-secondary-color-bg-hover border-rbutton-secondary-color-border-hover disabled:bg-rbg-primary disabled:border-rborder-disabled-subtle disabled:text-rfg-disabled disabled:shadow-xs",tertiaryGray:"border-0 text-rbutton-tertiary-fg hover:text-rbutton-tertiary-fg-hover hover:bg-rbutton-tertiary-bg-hover disabled:text-rfg-disabled",tertiaryColor:"border-0 text-rbutton-tertiary-color-fg hover:text-rbutton-tertiary-color-fg-hover hover:bg-rbutton-tertiary-color-bg-hover disabled:text-rfg-disabled",linkGray:"border-0 text-rbutton-tertiary-fg hover:text-rbutton-tertiary-fg-hover disabled:text-rfg-disabled !p-0",linkColor:"border-0 text-rbutton-tertiary-color-fg hover:text-rbutton-tertiary-color-fg-hover disabled:text-rfg-disabled !p-0"}},defaultVariants:{variant:"primary",size:"md"}}),Es=({size:t="sm"})=>e.jsx("div",{"aria-label":"loading",className:Ge("border-2 border-t-transparent rounded-full animate-spin",{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6",xl:"h-7 w-7","2xl":"h-7 w-7"}[t])}),Rs=({variant:t="primary",size:r="md",fullWidth:n,disabled:o=!1,loading:s=!1,leftIcon:a,rightIcon:i,children:l,className:d,onClick:c,asChild:u=!1,...f})=>{const p=u?m:"button";return e.jsxs(p,{className:Ss({variant:t,size:r,fullWidth:n,disabled:o,className:d,loading:s}),disabled:o,onClick:s?()=>{}:c,...f,children:[s&&e.jsx("div",{className:"absolute inset-0 flex justify-center items-center",children:e.jsx(Es,{size:r??"md"})}),e.jsxs("span",{className:Ge({invisible:s},"flex items-center gap-2"),children:[a,l,i]})]})},Ts=t.memo(({stroke:t="white",fill:r="none",width:n="10",className:o="",height:s="10"})=>e.jsx(e.Fragment,{children:e.jsx("svg",{width:n,"data-testid":"minus-icon",height:s,className:o,fill:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 12",children:e.jsx("path",{d:"M2.5 6H9.5",stroke:t,strokeWidth:"1.666",strokeLinecap:"round",strokeLinejoin:"round"})})})),Ls=t.memo(({stroke:t="#fff",fill:r="none",width:n="10",height:o="10"})=>e.jsx("svg",{width:n,height:o,"data-testid":"tickbox-icon",viewBox:"0 0 10 10",className:"border-white",fill:r,xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M8.33341 2.5L3.75008 7.08333L1.66675 5",stroke:t,strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})})),Ms=ws("border-rborder-primary rounded-xs border-[1px] peer-checked:border-rbg-brand-solid peer-checked:bg-rbg-brand-solid flex items-center justify-center",{variants:{size:{sm:"w-3.5 h-3.5",md:"w-4 h-4",lg:"w-4.5 h-4.5"},disabled:{true:" bg-rbg-disabled-subtle cursor-auto",false:" group cursor-pointer",undefined:"group cursor-pointer"}},defaultVariants:{size:"sm"}}),Ds={sm:"p-1",md:"p-[5px]",lg:"p-1.5"},Is=({size:r="sm",children:n,id:o,disabled:s=!1,checkboxIndex:a=1,isIndeterminate:i=!1,checked:l,onChange:d,onClick:c,defaultChecked:u,name:m,label:f,...p})=>{const h=t.useRef(null);t.useEffect(()=>{h.current&&(h.current.indeterminate=i)},[i]);const x=s?"#D0D5DD":"white";let g=null;return s?l&&(g=i?e.jsx(Ts,{stroke:x}):e.jsx(Ls,{stroke:x})):g=i?e.jsx(Ts,{stroke:x}):e.jsx(Ls,{stroke:x}),e.jsxs("div",{className:"flex items-center cursor-pointer gap-2 justify-start",children:[e.jsx("input",{type:"checkbox","data-testid":"checkbox",id:o,ref:h,onChange:e=>!s&&d&&d(e),onClick:c,disabled:s,checked:l,defaultChecked:u,className:"peer hidden",...p}),e.jsx("label",{htmlFor:o??m,tabIndex:a,className:Jt(Ms({size:r,disabled:s}),`${s&&"!bg-rbg-disabled !border-rborder-primary"} `),children:e.jsx("div",{className:`${Ds[r]} ${!s&&"group-focus-within:border-2 border-rbg-brand-solid "} flex items-center justify-center rounded-md`,children:g})}),(n??f)&&e.jsx("div",{className:"leading-none",onClick:()=>{h.current&&!s&&(h.current.click(),h.current.focus())},children:n??f})]})},As="rounded-full border-[1px] flex items-center justify-center peer-checked:border-[5px]",_s={sm:"text-xs",md:"text-sm"},Os={sm:"p-2.5",md:"p-3"},$s=ws(As,{variants:{size:{sm:"w-4 h-4",md:"w-5 h-5 !peer-checked:border-[6px]"},disabled:{true:" cursor-auto bg-rbg-disabled-subtle !border-rfg-disabled-subtle !border-[1px] ",false:"group cursor-pointer border-rbg-brand-solid",undefined:"group cursor-pointer border-rbg-brand-solid"}},defaultVariants:{size:"sm"}}),Fs=({name:t,value:r,checked:n,onChange:o,size:s="sm",disabled:a,className:i,children:l,id:d,...c})=>e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsxs("label",{htmlFor:d,className:"inline-flex w-fit items-center cursor-pointer relative",children:[e.jsx("input",{type:"radio",name:t,value:r,checked:n,onChange:o,className:"sr-only peer",disabled:a,id:d,...c}),e.jsx("div",{className:Jt($s({size:s,disabled:a}),As)}),e.jsx("div",{className:`peer-focus:border-2 peer-focus-within:border-1 border-brand-500 rounded-full absolute top-1/2 left-1/2 -translate-1/2 ${Os[s]} ${n&&a&&("sm"===s?"!border-4":"!border-5")+" !border-rfg-disabled-subtle !p-0 "} `})]}),l&&e.jsx("label",{htmlFor:d,className:`cursor-pointer ${_s[s]} ${i}`,children:l})]}),Vs={sm:"text-sm",md:"text-md"},Bs={sm:"16",md:"20"},Ws={sm:"text-sm",md:"text-md"},Hs=t.memo(({stroke:t="#344054",fill:r="none",width:n="16",className:o="",height:s="16"})=>e.jsx(e.Fragment,{children:e.jsx("svg",{"data-testid":"layer-icon",xmlns:"http://www.w3.org/2000/svg",width:n,height:s,className:o,viewBox:"0 0 16 16",fill:r,children:e.jsx("path",{d:"M1.33325 9.66669L7.7614 12.8808C7.84886 12.9245 7.89259 12.9464 7.93845 12.955C7.97908 12.9626 8.02076 12.9626 8.06139 12.955C8.10725 12.9464 8.15098 12.9245 8.23843 12.8808L14.6666 9.66669M1.33325 6.33336L7.7614 3.11928C7.84886 3.07555 7.89259 3.05369 7.93845 3.04508C7.97908 3.03746 8.02076 3.03746 8.06139 3.04508C8.10725 3.05369 8.15098 3.07555 8.23843 3.11928L14.6666 6.33336L8.23843 9.54743C8.15098 9.59116 8.10725 9.61302 8.06139 9.62163C8.02076 9.62925 7.97908 9.62925 7.93845 9.62163C7.89259 9.61302 7.84886 9.59116 7.7614 9.54743L1.33325 6.33336Z",stroke:t,strokeWidth:"1.333",strokeLinecap:"round",strokeLinejoin:"round"})})}));function Gs({children:t,className:r,...n}){return e.jsx("div",{className:`${r} flex items-center justify-center border border-disabled-subtle-br rounded-md shadow-rshadow-sm-01 p-2.5 w-fit h-fit`,...n,children:t})}function qs({per:t,size:r="sm",title:n="",description:o,price:s,id:a,checkboxIndex:i,checked:l,name:d="",value:c="",inputProps:u,onChange:m,type:f,onCardClick:p,disabled:h}){return e.jsxs(e.Fragment,{children:[e.jsx(Gs,{"data-testid":"icon-wrapper",children:e.jsx(Hs,{width:Bs[r],height:Bs[r]})}),e.jsxs("div",{onClick:p,className:"flex flex-col grow justify-between",children:[e.jsxs("div",{className:"flex",children:[e.jsx("h3",{className:"font-medium text-foreground text-rtext-secondary-700",children:n})," ",e.jsxs("span",{children:[s,"/",t]})]}),e.jsx("div",{className:"text-muted-foreground",children:o})]}),e.jsx("div",{className:"flex items-start gap-2",children:"radio"===f?e.jsx(Fs,{onChange:m,checked:l,disabled:h,value:c,name:d,size:r,id:a,...u}):e.jsx(Is,{...u,disabled:h,id:a,name:d,onChange:m,size:r,value:c,checkboxIndex:i,checked:l})})]})}const Ks=({title:t,size:r,disabled:n,checkboxIndex:o,id:s,name:a="",value:i="",onChange:l,inputProps:d,checked:c,type:u,...m})=>{const f=n||"group-focus-within:border-rbg-brand-solid group-focus-within:border-b-2 border-b";return e.jsxs("div",{"data-testid":"header",className:`flex items-center border-b-2 border-rborder-secondary p-4 w-full gap-2 ${f}`,...m,children:[e.jsx(Gs,{children:e.jsx(Hs,{width:"20",height:"20"})}),e.jsx("div",{className:"flex flex-col grow justify-between",children:e.jsx("div",{className:"flex text-sm",children:e.jsx("h3",{className:"font-medium text-foreground text-rtext-secondary-700",children:t})})}),e.jsx("div",{className:"flex items-start gap-2",children:"radio"===u?e.jsx(Fs,{onChange:l,checked:c,disabled:n,value:i,name:a,size:r,id:s,...d}):e.jsx(Is,{checkboxIndex:o,disabled:n,id:s,name:a,onChange:l,size:r,value:i,...d})})]})};function Us({per:t,size:r="sm",title:n="",price:o,description:s,checked:a,badgeContent:i,checkboxIndex:l=1,id:d="",value:c="value",name:u="",onChange:m,disabled:f,type:p}){return e.jsxs(e.Fragment,{children:[e.jsx(Ks,{type:p,onChange:m,name:u,disabled:f,checked:a,value:c,"data-testid":"header",checkboxIndex:l,title:n,size:r,id:d}),e.jsxs("div",{className:"p-4 flex w-full",children:[e.jsxs("div",{className:"grow space-y-1",children:[e.jsxs("div",{className:"flex items-end text-sm gap-1",children:[e.jsx("span",{className:"text-3xl font-semibold text-foreground text-rtext-secondary-700",children:o}),e.jsx("span",{className:"h-fit",children:t})]}),e.jsx("div",{children:s})]}),e.jsx("span",{children:i&&e.jsx(ks,{size:"md",type:"badgeColor",dir:"rtl",color:"success",className:"!bg-white !border-rborder-primary !text-rtext-secondary-700",icon:e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-rfg-success-primary"}),children:i})})]})]})}const Xs={sm:"text-sm",md:"text-md"},Ys={sm:"w-8 h-8",md:"w-10 h-10"},Zs=(e,t=50)=>t+10*e,Js=(e,t=40)=>t+10*e,Qs=ws("",{variants:{direction:{down:"",up:"",left:"",right:""},alignment:{left:"",right:"",top:"",bottom:""}},compoundVariants:[{direction:"down",alignment:"left",class:"origin-top-right right-0 mt-2"},{direction:"down",alignment:"right",class:"origin-top-left left-0 mt-2"},{direction:"down",alignment:"top",class:"origin-top-center left-1/2 -translate-x-1/2 mt-2"},{direction:"down",alignment:"bottom",class:"origin-top-center left-1/2 -translate-x-1/2 mt-2"},{direction:"up",alignment:"left",class:"origin-bottom-right right-0 bottom-full mb-2"},{direction:"up",alignment:"right",class:"origin-bottom-left left-0 bottom-full mb-2"},{direction:"up",alignment:"top",class:"origin-bottom-center left-1/2 -translate-x-1/2 bottom-full mb-2"},{direction:"up",alignment:"bottom",class:"origin-bottom-center left-1/2 -translate-x-1/2 bottom-full mb-2"},{direction:"left",alignment:"top",class:"origin-top-right top-0 right-full mr-2"},{direction:"left",alignment:"bottom",class:"origin-bottom-right bottom-0 right-full mr-2"},{direction:"left",alignment:"left",class:"origin-center right-full mr-2 top-1/2 -translate-y-1/2"},{direction:"left",alignment:"right",class:"origin-center right-full mr-2 top-1/2 -translate-y-1/2"},{direction:"right",alignment:"top",class:"origin-top-left top-0 left-full ml-2"},{direction:"right",alignment:"bottom",class:"origin-bottom-left bottom-0 left-full ml-2"},{direction:"right",alignment:"left",class:"origin-center left-full ml-2 top-1/2 -translate-y-1/2"},{direction:"right",alignment:"right",class:"origin-center left-full ml-2 top-1/2 -translate-y-1/2"}],defaultVariants:{direction:"down",alignment:"right"}}),ea=({icon:t,mainText:r,subText:n,formatText:o,acceptableFormats:s,disable:a,multiItem:i,onChange:l})=>e.jsx("div",{className:Jt("relative w-full py-4 px-6 flex justify-center items-center gap-1 rounded-xl border border-rborder-secondary bg-rbg-primary ",a&&"bg-rbg-disabled-subtle",!a&&"hover:border-rborder-brand focus:border-rborder-brand focus-within:border-rborder-brand"),children:e.jsxs("div",{className:"text-center flex flex-col justify-center items-center gap-2",children:[t??e.jsx(Rs,{variant:"secondaryGray","aria-hidden":"true",disabled:a,children:e.jsx(Ae,{"data-testid":"default-uploadcloud"})}),e.jsxs("div",{className:"flex flex-col justify-center items-center gap-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsxs("label",{htmlFor:"file-upload",className:Jt(" cursor-pointer rounded-md text-rbutton-tertiary-color-fg font-normal text-sm",a&&"text-rbg-disabled-subtle"),children:[e.jsx("span",{className:Jt(a&&"text-rfg-disabled"),children:r}),e.jsx("input",{id:"file-upload",name:"file-upload","data-testid":"file-input",type:"file",className:"absolute overflow-hidden top-0 left-0 w-full h-full opacity-0 cursor-pointer",disabled:a,multiple:i,accept:s?Array.isArray(s)?s.map(e=>e.startsWith(".")?e:`.${e}`).join(", "):s:void 0,onChange:l})]}),e.jsx("p",{className:"text-rtext-tertiary-600 text-sm",children:n})]}),e.jsx("p",{className:"text-xs text-rtext-tertiary-600 font-normal",children:o})]})]})});var ta="Progress",ra=100,[na]=a(ta),[oa,sa]=na(ta),aa=o.forwardRef((t,r)=>{const{__scopeProgress:n,value:o=null,max:s,getValueLabel:a=da,...i}=t;!s&&0!==s||ma(s)||console.error(`Invalid prop \`max\` of value \`${`${s}`}\` supplied to \`${"Progress"}\`. Only numbers greater than 0 are valid max values. Defaulting to \`100\`.`);const l=ma(s)?s:ra;null===o||fa(o,l)||console.error(function(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:\n - a positive number\n - less than the value passed to \`max\` (or 100 if no \`max\` prop is set)\n - \`null\` or \`undefined\` if the progress is indeterminate.\n\nDefaulting to \`null\`.`}(`${o}`,"Progress"));const d=fa(o,l)?o:null,c=ua(d)?a(d,l):void 0;return e.jsx(oa,{scope:n,value:d,max:l,children:e.jsx(w.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":ua(d)?d:void 0,"aria-valuetext":c,role:"progressbar","data-state":ca(d,l),"data-value":d??void 0,"data-max":l,...i,ref:r})})});aa.displayName=ta;var ia="ProgressIndicator",la=o.forwardRef((t,r)=>{const{__scopeProgress:n,...o}=t,s=sa(ia,n);return e.jsx(w.div,{"data-state":ca(s.value,s.max),"data-value":s.value??void 0,"data-max":s.max,...o,ref:r})});function da(e,t){return`${Math.round(e/t*100)}%`}function ca(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function ua(e){return"number"==typeof e}function ma(e){return ua(e)&&!isNaN(e)&&e>0}function fa(e,t){return ua(e)&&!isNaN(e)&&e<=t&&e>=0}la.displayName=ia;var pa=aa,ha=la;const xa={xxs:"w-[64px] h-[64px]",xs:"w-[160px] h-[160px]",sm:"w-[200px] h-[200px]",md:"w-[240px] h-[240px]",lg:"w-[280px] h-[280px]"},ga={xxs:64,xs:160,sm:200,md:240,lg:280},ba=o.forwardRef(({type:t="line",value:r=0,label:n,labelClassName:o,backgroundVariant:s,indicatorVariant:a,className:i,size:l="md",strokeWidth:d=16,svgClassName:c,...u},m)=>{const f=Math.min(Math.max(r??0,0),100),p=ga[l]||240,h=(p-d)/2;if("half-circle"===t){const t=Math.PI*h,r=t-f/100*t;return e.jsxs("div",{className:Jt("relative flex items-center justify-center",xa[l],i),ref:m,...u,children:[e.jsxs("svg",{width:p,height:p/2,className:Jt("rotate-[-90deg]",c),children:[e.jsx("circle",{stroke:"#e5e7eb",fill:"transparent",strokeWidth:d,r:h,cx:p/2,cy:p/2}),e.jsx("circle",{fill:"transparent",strokeWidth:d,strokeLinecap:"round",strokeDasharray:t,strokeDashoffset:t-r,r:h,cx:p/2,cy:p/2,style:{transition:"stroke-dashoffset 0.5s ease"},className:a})]}),void 0!==n&&e.jsxs("span",{className:Jt("absolute text-sm font-semibold text-muted-foreground",o),children:[n,"%"]})]})}if("circle"===t){const t=2*Math.PI*h,r=t-f/100*t;return e.jsxs("div",{className:Jt("relative flex items-center justify-center",xa[l],i),ref:m,...u,children:[e.jsxs("svg",{width:p,height:p,className:Jt("rotate-[-90deg]",c),children:[e.jsx("circle",{stroke:"#e5e7eb",fill:"transparent",strokeWidth:d,r:h,cx:p/2,cy:p/2}),e.jsx("circle",{fill:"transparent",strokeWidth:d,strokeLinecap:"round",strokeDasharray:t,strokeDashoffset:r,r:h,cx:p/2,cy:p/2,style:{transition:"stroke-dashoffset 0.5s ease"},className:a})]}),void 0!==n&&e.jsxs("span",{className:Jt("absolute text-sm font-semibold text-muted-foreground",o),children:[n,"%"]})]})}return e.jsxs("div",{className:"flex items-center gap-4 w-full",children:[e.jsx(pa,{ref:m,className:Jt("relative h-4 w-full overflow-hidden rounded-full bg-muted",s,i),...u,children:e.jsx(ha,{className:Jt("h-full transition-transform duration-300",a),style:{transform:`translateX(-${100-r}%)`}})}),"number"==typeof n&&e.jsxs("span",{className:Jt("text-sm text-muted-foreground min-w-[40px] text-right",o),children:[n,"%"]})]})});ba.displayName="Progress";const ya=({width:t=40,height:r=40})=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:r,viewBox:"0 0 20 20",fill:"none",children:e.jsx("path",{d:"M11.6667 1.89118V5.33329C11.6667 5.8 11.6667 6.03336 11.7575 6.21162C11.8374 6.36842 11.9649 6.4959 12.1217 6.5758C12.3 6.66663 12.5333 6.66663 13 6.66663H16.4422M16.6667 8.32348V14.3333C16.6667 15.7334 16.6667 16.4335 16.3942 16.9683C16.1545 17.4387 15.7721 17.8211 15.3017 18.0608C14.7669 18.3333 14.0668 18.3333 12.6667 18.3333H7.33337C5.93324 18.3333 5.23318 18.3333 4.6984 18.0608C4.22799 17.8211 3.84554 17.4387 3.60586 16.9683C3.33337 16.4335 3.33337 15.7334 3.33337 14.3333V5.66663C3.33337 4.26649 3.33337 3.56643 3.60586 3.03165C3.84554 2.56124 4.22799 2.17879 4.6984 1.93911C5.23318 1.66663 5.93324 1.66663 7.33337 1.66663H10.0099C10.6213 1.66663 10.9271 1.66663 11.2148 1.7357C11.4699 1.79694 11.7137 1.89795 11.9374 2.03503C12.1897 2.18963 12.4059 2.40582 12.8383 2.8382L15.4951 5.49505C15.9275 5.92743 16.1437 6.14362 16.2983 6.39591C16.4354 6.61959 16.5364 6.86346 16.5976 7.11855C16.6667 7.40627 16.6667 7.712 16.6667 8.32348Z",stroke:"#98A2B3",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),va=({item:t,loadType:r,onDelete:n})=>e.jsxs("div",{className:Jt("p-4 flex gap-3 w-full rounded-xl border border-rborder-secondary bg-rbg-primary","failed"==t?.status&&"border-rborder-error"),children:[e.jsx("div",{className:" flex justify-start items-start w-10 h-10",children:t?.icon??e.jsx(ya,{width:20,height:20,"data-testid":"fallback-icon"})}),e.jsxs("div",{className:"flex flex-col gap-1 w-full",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsxs("div",{className:"flex flex-col w-1/2",children:[e.jsx("span",{className:"font-medium text-rtext-secondary-700 overflow-hidden text-ellipsis text-sm",children:t?.title}),e.jsx("span",{className:"text-rtext-tertiary-600 font-normal text-sm overflow-hidden text-ellipsis",children:t?.size})]}),e.jsx(Rs,{className:Jt("self-centertext-rbutton-tertiary-fg","failed"==t?.status&&"text-rbutton-secondary-error-fg"),onClick:()=>{n(t?.id)},variant:"linkGray",children:e.jsx(Ve,{width:20,height:20})})]}),"progressBar"==r&&e.jsx(ba,{type:"line",value:t?.progressValue,label:t?.percentage,size:"lg",indicatorVariant:"bg-rfg-brand-primary-600",backgroundVariant:"bg-rbg-quaternary",dir:"rtl",className:"h-2",labelClassName:"text-end"})]})]}),wa=(e,t,r)=>Math.min(Math.max(e,t),r),ja={x:0,y:0};const ka={sm:"text-xs ps-2 pe-2",md:"text-sm ps-5 pe-5",lg:"text-base ps-8 pe-8",xl:"text-base ps-11 pe-11"},Na=ws("rounded-md px-2 shadow-xs w-fit bg-white border border-rborder-primary focus:outline-2 focus:outline-rborder-brand disabled:bg-rbg-disabled-subtle disabled:border-rborder-disabled",{variants:{size:{sm:"h-9.5 py-2.5",md:"h-10.5 pt-3 pb-3"},inputType:{default:"pe-8",iconLeading:"ps-10",leadingDropdown:"pe-8",trailingDropdown:"pe-8 ps-6",leadingText:"pe-8 ps-20",trailingButton:"pe-8",shaba:"pe-12"}},defaultVariants:{size:"sm",inputType:"default"}}),Ca=({id:t,label:r,required:n,labelClass:o,labelStarClass:s})=>e.jsxs("label",{htmlFor:t,className:Zt("text-sm font-medium text-rtext-secondary-700",o),children:[r,n&&e.jsx("span",{className:Zt("dv-required-label text-rtext-brand-tertiary-600 mx-1",s),children:"*"})]}),za=t.memo(({stroke:t="#98A2B3",fill:r="none",width:n="16",height:o="16"})=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:n,height:o,viewBox:"0 0 16 16",fill:r,children:e.jsx("path",{d:"M6.05998 5.99998C6.21672 5.55442 6.52608 5.17872 6.93328 4.9394C7.34048 4.70009 7.81924 4.61261 8.28476 4.69245C8.75028 4.7723 9.17252 5.01433 9.4767 5.37567C9.78087 5.737 9.94735 6.19433 9.94665 6.66665C9.94665 7.99998 7.94665 8.66665 7.94665 8.66665M7.99998 11.3333H8.00665M14.6666 7.99998C14.6666 11.6819 11.6819 14.6666 7.99998 14.6666C4.31808 14.6666 1.33331 11.6819 1.33331 7.99998C1.33331 4.31808 4.31808 1.33331 7.99998 1.33331C11.6819 1.33331 14.6666 4.31808 14.6666 7.99998Z",stroke:t,strokeWidth:"1.33333",strokeLinecap:"round",strokeLinejoin:"round"})})),Pa=(e,r)=>{t.useEffect(()=>{const t=t=>{e.current&&!e.current.contains(t.target)&&r()};return document.addEventListener("mousedown",t),document.addEventListener("touchstart",t),()=>{document.removeEventListener("mousedown",t),document.removeEventListener("touchstart",t)}},[e,r])},Sa=({config:r,isLoading:n=!1,disabled:o=!1,className:s,tooltipClass:a,tooltipTitle:i,selectedValueLabel:l,onChange:d,options:c,buttonClass:u,contentClass:m,labelClass:f,labelStarClass:p})=>{const{label:h,name:x,errorText:g,hintText:b,isRequiredInput:y=!1,canSelectZero:v=!1}=r||{},[w,j]=t.useState(!1),[k,N]=t.useState(-50),[C,z]=t.useState(!1),[P,S]=t.useState(5),E=t.useRef(null);Pa(E,()=>z(!1));const R=t.useRef(null);return t.useEffect(()=>{w&&(()=>{if(R.current){const e=R.current.offsetHeight;N(-e+window.scrollY+40)}})()},[w]),Pa(R,()=>j(!1)),e.jsxs("div",{className:Zt("relative flex w-full flex-col gap-1",s),children:[h&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Ca,{labelClass:f,labelStarClass:p,id:x,label:h,required:y}),i&&e.jsx("button",{type:"button",onClick:i?()=>j(e=>!e):()=>{},className:"flex-center h-4 w-4 rounded-full bg-blue-400 text-xs text-white",children:"i"})]}),e.jsxs("div",{className:"relative",children:[e.jsxs("button",{type:"button",className:Zt("flex items-center justify-between w-full bg-white border border-rborder-primary rounded-md px-2 shadow-xs text-sm text-dark/80 focus:outline-2 focus:outline-rborder-brand disabled:bg-rbg-disabled-subtle disabled:border-rborder-disabled disabled:cursor-not-allowed disabled:bg-gray-100 disabled:text-gray-500 px-4 py-2 text-left",u),onClick:()=>z(e=>!e),disabled:n||o,children:[l,C?e.jsx(Te,{className:"h-4 w-4 opacity-50"}):e.jsx(Se,{className:"h-4 w-4 opacity-50"})]}),C&&e.jsx("div",{ref:E,className:Zt("absolute left-0 mt-1 w-full rounded-md bg-gray-50 shadow-lg border border-rborder-primary z-50",m),children:e.jsxs("ul",{className:"max-h-48 overflow-auto p-2 text-sm text-start",onScroll:e=>{const{scrollTop:t,scrollHeight:r,clientHeight:n}=e.currentTarget;t+n>=r-10&&S(e=>Math.min(e+5,c?.length))},style:{maxHeight:"150px"},children:[!v&&e.jsx("li",{children:e.jsx("button",{type:"button",className:"w-full p-2 text-start text-gray-500 cursor-not-allowed",onClick:()=>z(!1),children:"-"})}),c?.slice(0,P)?.map(t=>e.jsx("li",{children:e.jsx("button",{type:"button",className:"w-full p-2 text-start cursor-pointer hover:bg-gray-100",onClick:()=>{return e=t.value,d({name:x,value:e}),void z(!1);var e},children:t.title})},t.value))]})})]}),i&&w&&e.jsx("div",{ref:R,className:Zt("absolute left-1/2 z-10 max-h-[200px] w-72 -translate-x-1/2 -translate-y-11 transform overflow-auto rounded bg-gray-500 p-3 text-start text-xs text-white shadow-md transition-all duration-200",a),style:{top:`${k}px`},dangerouslySetInnerHTML:{__html:i}}),!g&&b&&e.jsx("p",{className:"text-sm text-rtext-tertiary-600",children:b}),g&&e.jsx("p",{className:"text-sm text-rtext-error-primary-600",children:g})]})},Ea=ws("w-full flex flex-col py-2.5 px-3.5 gap-2",{variants:{sender:{admin:"",user:""},variant:{primary:"bg-rbg-brand-solid text-rtext-white text-md font-normal",gray:"bg-rbg-secondary border border-rborder-secondary text-rtext-primary-900 text-md font-normal",white:"bg-rbg-primary border border-rborder-secondary"},direction:{ltr:"",rtl:""}},compoundVariants:[{sender:"admin",direction:"ltr",class:"rounded-tl-md rounded-tr-none rounded-br-md rounded-bl-md "},{sender:"user",direction:"ltr",class:"rounded-tl-none rounded-tr-md rounded-br-md rounded-bl-md"},{sender:"admin",direction:"rtl",class:" rounded-tl-md rounded-tr-none rounded-br-md rounded-bl-md"},{sender:"user",direction:"rtl",class:"rounded-tl-none rounded-tr-md rounded-br-md rounded-bl-md"}],defaultVariants:{variant:"primary",direction:"rtl"}}),Ra=ws("",{variants:{direction:{ltr:"",rtl:""},sender:{admin:"",user:""}},compoundVariants:[{sender:"admin",direction:"ltr",class:"flex-row-reverse"},{sender:"admin",direction:"rtl",class:"flex-row"},{sender:"user",direction:"ltr",class:"flex-row"},{sender:"user",direction:"rtl",class:"flex-row-reverse"}],defaultVariants:{direction:"ltr",sender:"user"}});function Ta({className:t,...r}){return e.jsx("div",{"data-slot":"card",className:Jt("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",t),...r})}function La({className:t,...r}){return e.jsx("div",{"data-slot":"card-header",className:Jt("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",t),...r})}function Ma({className:t,...r}){return e.jsx("div",{"data-slot":"card-action",className:Jt("col-start-2 row-span-2 row-start-1 self-start justify-self-end",t),...r})}const Da={success:"w-12 h-12 flex items-center justify-center rounded-full bg-rbg-success-secondary",notification:"w-12 h-12 flex items-center justify-center rounded-full bg-rbg-brand-secondary",secondary:"w-12 h-12 flex items-center justify-center rounded-lg bg-rbg-primary border border-gray-light-200 shadow-xs-skeuomorphic"},Ia={normal:"font-medium text-sm text-rtext-tertiary-600",bold:"text-rtext-primary-900 font-normal text-md"},Aa=ws("modal-container fixed left-1/2 right-auto flex max-h-[80dvh] w-4/5 cursor-default flex-col rounded bg-white text-center",{variants:{size:{sm:"max-w-rsm",md:"max-w-rmd",lg:"max-w-rlg"},overflow:{hidden:"overflow-hidden",auto:"overflow-auto"},position:{center:"top-1/2 -translate-y-1/2 animate-slide-in-center",bottom:"bottom-0 animate-slide-in-bottom"}},defaultVariants:{size:"md"}});let _a=0;const Oa=t.memo(()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:e.jsx("path",{d:"M15.8334 9.99996H4.16675M4.16675 9.99996L10.0001 15.8333M4.16675 9.99996L10.0001 4.16663",stroke:"#344054",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})})),$a=t.memo(()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:e.jsx("path",{d:"M4.16675 10H15.8334M15.8334 10L10.0001 4.16669M15.8334 10L10.0001 15.8334",stroke:"#344054",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})})),Fa=t.forwardRef(({className:t,...r},n)=>e.jsx("ul",{ref:n,className:Jt("flex flex-row items-center cursor-pointer",t),...r}));Fa.displayName="PaginationContent";const Va=t.forwardRef(({className:t,...r},n)=>e.jsx("li",{ref:n,className:Jt("flex items-center ",t),...r}));Va.displayName="PaginationItem";const Ba=({className:t,isActive:r,activeClassName:n,disabled:o,...s})=>{const a=r?n||"rounded-md border bg-[#F9FAFB] text-[#182230] border-[#F9FAFB]":"",i=o?"pointer-events-none opacity-50":"";return e.jsx("a",{"aria-current":r?"page":void 0,className:Jt("cursor-pointer inline-flex items-center gap-1.5 px-4 py-1.5 justify-center transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",r?"border border-primary text-primary":"hover:bg-accent hover:text-accent-foreground",a,i,t),...s,"aria-disabled":o,onClick:e=>{o?e.preventDefault():s.onClick?.(e)}})},Wa=({currentPage:t,totalPages:r,onPageChange:n,dir:o="rtl",labels:s,previousClassName:a,nextClassName:i,className:l,prevIcon:d,nextIcon:c,...u})=>{const m="rtl"===o;return e.jsx("nav",{role:"navigation","aria-label":"pagination",className:Jt("",l),...u,children:e.jsxs(Fa,{className:"flex justify-between items-center",children:[e.jsxs("div",{className:"flex",children:[e.jsx(Va,{className:"md:block hidden",children:e.jsx(Ba,{size:"default","aria-label":"Go to first page",disabled:1===t,onClick:()=>n?.(1),children:s?.first})}),e.jsx(Va,{children:e.jsxs(Ba,{"aria-label":"Go to previous page",size:"default",className:Jt("gap-1",a),onClick:()=>n?.(t-1),disabled:1===t,children:[e.jsx("div",{className:"md:block hidden",children:s?.prev||"قبلی"}),e.jsx("div",{className:"md:hidden block",children:m?d||e.jsx($a,{}):c||e.jsx(Oa,{})})]})})]}),e.jsxs("span",{className:"text-sm font-medium",children:[s?.page," ",t," ",s?.of," ",r]}),e.jsxs("div",{className:"flex",children:[e.jsx(Va,{children:e.jsxs(Ba,{"aria-label":"Go to next page",size:"default",className:Jt("gap-1",i),onClick:()=>n?.(t+1),disabled:t===r,children:[e.jsx("span",{className:"md:block hidden",children:s?.next||"بعدی"}),e.jsx("div",{className:"md:hidden block",children:m?d||e.jsx(Oa,{}):c||e.jsx($a,{})})]})}),e.jsx(Va,{className:"md:block hidden",children:e.jsx(Ba,{size:"default","aria-label":"Go to last page",disabled:t===r,onClick:()=>n?.(r),children:s?.last})})]})]})})},Ha=({currentPage:t,totalPages:r,onPageChange:n,dir:o="rtl",labels:s,previousClassName:a,nextClassName:i,className:l,...d})=>{const c="rtl"===o;return e.jsxs("nav",{role:"navigation","aria-label":"pagination",className:Jt("flex w-full items-center justify-between text-sm text-muted-foreground",l),...d,children:[e.jsxs("span",{children:[s?.page," ",t," ",s?.of," ",r]}),e.jsxs(Fa,{className:"flex items-center gap-2",children:[e.jsx(Va,{children:e.jsx(Ba,{"aria-label":"Go to first page",size:"default",className:"gap-1 px-2.5",onClick:()=>n?.(1),disabled:1===t||r<2,children:e.jsx("span",{children:s?.first})})}),e.jsx(Va,{children:e.jsx(Ba,{"aria-label":"Go to previous page",size:"default",className:Jt("gap-1",a),onClick:()=>n?.(c?t+1:t-1),disabled:c?t===r:1===t,children:e.jsx("span",{children:c?s?.next:s?.prev})})}),e.jsx(Va,{children:e.jsx(Ba,{"aria-label":"Go to next page",size:"default",className:Jt("gap-1",i),onClick:()=>n?.(c?t-1:t+1),disabled:c?1===t:t===r,children:e.jsx("span",{children:c?s?.prev:s?.next})})}),e.jsx(Va,{children:e.jsx(Ba,{"aria-label":"Go to last page",size:"default",className:"gap-1 px-2.5",onClick:()=>n?.(r),disabled:t===r,children:e.jsx("span",{children:s?.last})})})]})]})},Ga=({currentPage:t,totalPages:r,onPageChange:n,labels:o,previousClassName:s,className:a,activeClassName:i,nextClassName:l,dir:d="rtl",prevIcon:c,nextIcon:u,firstIcon:m,lastIcon:f,showFirstLast:p=!0,hasText:h=!0})=>{const x=((e,t,r)=>{const n=[],o="rtl"===r;if(t<=6)for(let e=1;e<=t;e++)n.push(e);else if(e>3)if(e<t-2)n.push(1,"...",e-1,e,e+1,"...",t);else{n.push(1,2,3,"...");for(let e=t-2;e<=t;e++)n.push(e)}else{for(let e=1;e<=3;e++)n.push(e);n.push("...",t-2,t-1,t)}return o?[...n].reverse():n})(t,r,d),g="rtl"===d,b=g?[...x].reverse():x;return e.jsxs("nav",{role:"navigation","aria-label":"pagination",className:Jt("mx-auto flex w-full justify-center","rtl"===d?"rtl":"ltr",a),children:[e.jsxs("div",{className:Jt("flex gap-2",g?"ml-auto":"mr-auto"),children:[p&&e.jsxs(Ba,{"aria-label":"Go to first page",size:"default",className:"gap-1 px-2.5",onClick:()=>n?.(1),disabled:1===t,children:[g?m||e.jsx(Me,{}):f||e.jsx(Le,{}),h&&e.jsx("span",{children:o?.first})]}),e.jsxs(Ba,{"aria-label":"Go to previous page",size:"default",className:Jt("flex items-center",s),onClick:()=>n?.(t-1),disabled:1===t,children:[g?u||e.jsx(Re,{}):c||e.jsx(Ee,{}),h&&e.jsx("span",{children:o?.prev})]})]}),e.jsx(Fa,{children:b.map((r,o)=>e.jsx(Va,{children:"..."===r?e.jsx("span",{className:"px-2",children:"..."}):e.jsx(Ba,{isActive:r===t,onClick:()=>n?.(Number(r)),activeClassName:Zt(i,"rounded-md"),children:r})},o))}),e.jsxs("div",{className:Jt("flex gap-2",g?"mr-auto":"ml-auto"),children:[e.jsxs(Ba,{"aria-label":"Go to next page",size:"default",className:Jt("flex items-center",l),onClick:()=>n?.(t+1),disabled:t===r,children:[h&&e.jsx("span",{children:o?.next}),g?c||e.jsx(Ee,{}):u||e.jsx(Re,{})]}),p&&e.jsxs(Ba,{"aria-label":"Go to last page",size:"default",className:"gap-1 px-2.5",onClick:()=>n?.(r),disabled:t===r,children:[h&&e.jsx("span",{children:o?.last}),g?f||e.jsx(Le,{}):m||e.jsx(Me,{})]})]})]})},qa=({currentPage:t,totalPages:r,onPageChange:n,dir:o="rtl",labels:s,renderPageNumbers:a,justifyClassName:i,prevIcon:l,nextIcon:d,hasText:c})=>{const u="rtl"===o;return e.jsx("nav",{role:"navigation","aria-label":"pagination",className:Jt("w-full flex",i),children:e.jsxs(Fa,{className:"border border-gray-200 rounded-md",children:[e.jsx(Va,{children:e.jsx(Ba,{size:"default",className:"px-3 py-1 text-sm disabled:opacity-50 flex items-center",onClick:()=>n?.(t-1),disabled:1===t,children:e.jsx("div",{className:"flex items-center gap-1",children:u?e.jsxs(e.Fragment,{children:[l||e.jsx(Re,{size:16}),c&&e.jsx("span",{className:"hidden md:block",children:s?.prev})]}):e.jsxs(e.Fragment,{children:[d||e.jsx(Ee,{size:16}),c&&e.jsx("span",{className:"hidden md:block",children:s?.prev})]})})})}),a(),e.jsx(Va,{children:e.jsx(Ba,{size:"default",className:"px-3 py-1 text-sm disabled:opacity-50 flex items-center",onClick:()=>n?.(t+1),disabled:t===r,children:e.jsx("div",{className:"flex items-center gap-1",children:u?e.jsxs(e.Fragment,{children:[c&&e.jsx("span",{className:"hidden md:block",children:s?.next}),d||e.jsx(Ee,{size:16})]}):e.jsxs(e.Fragment,{children:[c&&e.jsx("span",{className:"hidden md:block",children:s?.next}),l||e.jsx(Re,{size:16})]})})})})]})})},Ka=({currentPage:t,totalPages:r,onPageChange:n,dir:o="rtl",labels:s,previousClassName:a,nextClassName:i,className:l,...d})=>{const c="rtl"===o;return e.jsxs("nav",{role:"navigation","aria-label":"pagination",className:Jt("flex w-full items-center justify-between text-sm text-muted-foreground",l),...d,children:[e.jsxs(Fa,{className:"flex gap-2 items-center",children:[e.jsx(Va,{children:e.jsx(Ba,{"aria-label":"Go to first page",size:"default",className:"gap-1 px-2.5",onClick:()=>n?.(1),disabled:1===t,children:e.jsx("span",{children:s?.first})})}),e.jsx(Va,{children:e.jsx(Ba,{"aria-label":"Go to previous page",size:"default",className:Jt("gap-1",a),onClick:()=>n?.(c?t+1:t-1),disabled:c?t===r:1===t,children:e.jsx("span",{children:c?s?.next:s?.prev})})}),e.jsx(Va,{children:e.jsx(Ba,{"aria-label":"Go to next page",size:"default",className:Jt("gap-1",i),onClick:()=>n?.(c?t-1:t+1),disabled:c?1===t:t===r,children:e.jsx("span",{children:c?s?.prev:s?.next})})}),e.jsx(Va,{children:e.jsx(Ba,{"aria-label":"Go to last page",size:"default",className:"gap-1 px-2.5",onClick:()=>n?.(r),disabled:t===r,children:e.jsx("span",{children:s?.last})})})]}),e.jsxs("span",{children:[s?.page," ",t," ",s?.of," ",r]})]})};function Ua(e,[t,r]){return Math.min(r,Math.max(t,e))}function Xa(e){const t=o.useRef({value:e,previous:e});return o.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Ya=["PageUp","PageDown"],Za=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Ja={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Qa="Slider",[ei,ti,ri]=x(Qa),[ni]=a(Qa,[ri]),[oi,si]=ni(Qa),ai=o.forwardRef((t,r)=>{const{name:n,min:s=0,max:a=100,step:i=1,orientation:l="horizontal",disabled:d=!1,minStepsBetweenThumbs:c=0,defaultValue:u=[s],value:m,onValueChange:f=()=>{},onValueCommit:p=()=>{},inverted:h=!1,form:x,...b}=t,y=o.useRef(new Set),w=o.useRef(0),j="horizontal"===l?di:ci,[k=[],N]=v({prop:m,defaultProp:u,onChange:e=>{const t=[...y.current];t[w.current]?.focus(),f(e)}}),C=o.useRef(k);function z(e,t,{commit:r}={commit:!1}){const n=function(e){return(String(e).split(".")[1]||"").length}(i),o=function(e,t){const r=Math.pow(10,t);return Math.round(e*r)/r}(Math.round((e-s)/i)*i+s,n),l=Ua(o,[s,a]);N((e=[])=>{const n=function(e=[],t,r){const n=[...e];return n[r]=t,n.sort((e,t)=>e-t)}(e,l,t);if(function(e,t){if(t>0){const r=function(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}(e);return Math.min(...r)>=t}return!0}(n,c*i)){w.current=n.indexOf(l);const t=String(n)!==String(e);return t&&r&&p(n),t?n:e}return e})}return e.jsx(oi,{scope:t.__scopeSlider,name:n,disabled:d,min:s,max:a,valueIndexToChangeRef:w,thumbs:y.current,values:k,orientation:l,form:x,children:e.jsx(ei.Provider,{scope:t.__scopeSlider,children:e.jsx(ei.Slot,{scope:t.__scopeSlider,children:e.jsx(j,{"aria-disabled":d,"data-disabled":d?"":void 0,...b,ref:r,onPointerDown:g(b.onPointerDown,()=>{d||(C.current=k)}),min:s,max:a,inverted:h,onSlideStart:d?void 0:function(e){const t=function(e,t){if(1===e.length)return 0;const r=e.map(e=>Math.abs(e-t)),n=Math.min(...r);return r.indexOf(n)}(k,e);z(e,t)},onSlideMove:d?void 0:function(e){z(e,w.current)},onSlideEnd:d?void 0:function(){const e=C.current[w.current];k[w.current]!==e&&p(k)},onHomeKeyDown:()=>!d&&z(s,0,{commit:!0}),onEndKeyDown:()=>!d&&z(a,k.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!d){const r=Ya.includes(e.key)||e.shiftKey&&Za.includes(e.key)?10:1,n=w.current;z(k[n]+i*r*t,n,{commit:!0})}}})})})})});ai.displayName=Qa;var[ii,li]=ni(Qa,{startEdge:"left",endEdge:"right",size:"width",direction:1}),di=o.forwardRef((t,r)=>{const{min:n,max:s,dir:a,inverted:i,onSlideStart:l,onSlideMove:d,onSlideEnd:u,onStepKeyDown:m,...f}=t,[p,h]=o.useState(null),x=c(r,e=>h(e)),g=o.useRef(void 0),b=W(a),y="ltr"===b,v=y&&!i||!y&&i;function w(e){const t=g.current||p.getBoundingClientRect(),r=wi([0,t.width],v?[n,s]:[s,n]);return g.current=t,r(e-t.left)}return e.jsx(ii,{scope:t.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:e.jsx(ui,{dir:b,"data-orientation":"horizontal",...f,ref:x,style:{...f.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{const t=w(e.clientX);l?.(t)},onSlideMove:e=>{const t=w(e.clientX);d?.(t)},onSlideEnd:()=>{g.current=void 0,u?.()},onStepKeyDown:e=>{const t=Ja[v?"from-left":"from-right"].includes(e.key);m?.({event:e,direction:t?-1:1})}})})}),ci=o.forwardRef((t,r)=>{const{min:n,max:s,inverted:a,onSlideStart:i,onSlideMove:l,onSlideEnd:d,onStepKeyDown:u,...m}=t,f=o.useRef(null),p=c(r,f),h=o.useRef(void 0),x=!a;function g(e){const t=h.current||f.current.getBoundingClientRect(),r=wi([0,t.height],x?[s,n]:[n,s]);return h.current=t,r(e-t.top)}return e.jsx(ii,{scope:t.__scopeSlider,startEdge:x?"bottom":"top",endEdge:x?"top":"bottom",size:"height",direction:x?1:-1,children:e.jsx(ui,{"data-orientation":"vertical",...m,ref:p,style:{...m.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{const t=g(e.clientY);i?.(t)},onSlideMove:e=>{const t=g(e.clientY);l?.(t)},onSlideEnd:()=>{h.current=void 0,d?.()},onStepKeyDown:e=>{const t=Ja[x?"from-bottom":"from-top"].includes(e.key);u?.({event:e,direction:t?-1:1})}})})}),ui=o.forwardRef((t,r)=>{const{__scopeSlider:n,onSlideStart:o,onSlideMove:s,onSlideEnd:a,onHomeKeyDown:i,onEndKeyDown:l,onStepKeyDown:d,...c}=t,u=si(Qa,n);return e.jsx(w.span,{...c,ref:r,onKeyDown:g(t.onKeyDown,e=>{"Home"===e.key?(i(e),e.preventDefault()):"End"===e.key?(l(e),e.preventDefault()):Ya.concat(Za).includes(e.key)&&(d(e),e.preventDefault())}),onPointerDown:g(t.onPointerDown,e=>{const t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():o(e)}),onPointerMove:g(t.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&s(e)}),onPointerUp:g(t.onPointerUp,e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))})})}),mi="SliderTrack",fi=o.forwardRef((t,r)=>{const{__scopeSlider:n,...o}=t,s=si(mi,n);return e.jsx(w.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...o,ref:r})});fi.displayName=mi;var pi="SliderRange",hi=o.forwardRef((t,r)=>{const{__scopeSlider:n,...s}=t,a=si(pi,n),i=li(pi,n),l=c(r,o.useRef(null)),d=a.values.length,u=a.values.map(e=>vi(e,a.min,a.max)),m=d>1?Math.min(...u):0,f=100-Math.max(...u);return e.jsx(w.span,{"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,...s,ref:l,style:{...t.style,[i.startEdge]:m+"%",[i.endEdge]:f+"%"}})});hi.displayName=pi;var xi="SliderThumb",gi=o.forwardRef((t,r)=>{const n=ti(t.__scopeSlider),[s,a]=o.useState(null),i=c(r,e=>a(e)),l=o.useMemo(()=>s?n().findIndex(e=>e.ref.current===s):-1,[n,s]);return e.jsx(bi,{...t,ref:i,index:l})}),bi=o.forwardRef((t,r)=>{const{__scopeSlider:n,index:s,name:a,...i}=t,l=si(xi,n),d=li(xi,n),[u,m]=o.useState(null),f=c(r,e=>m(e)),p=!u||(l.form||!!u.closest("form")),h=co(u),x=l.values[s],b=void 0===x?0:vi(x,l.min,l.max),y=function(e,t){return t>2?`Value ${e+1} of ${t}`:2===t?["Minimum","Maximum"][e]:void 0}(s,l.values.length),v=h?.[d.size],j=v?function(e,t,r){const n=e/2,o=wi([0,50],[0,n]);return(n-o(t)*r)*r}(v,b,d.direction):0;return o.useEffect(()=>{if(u)return l.thumbs.add(u),()=>{l.thumbs.delete(u)}},[u,l.thumbs]),e.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[d.startEdge]:`calc(${b}% + ${j}px)`},children:[e.jsx(ei.ItemSlot,{scope:t.__scopeSlider,children:e.jsx(w.span,{role:"slider","aria-label":t["aria-label"]||y,"aria-valuemin":l.min,"aria-valuenow":x,"aria-valuemax":l.max,"aria-orientation":l.orientation,"data-orientation":l.orientation,"data-disabled":l.disabled?"":void 0,tabIndex:l.disabled?void 0:0,...i,ref:f,style:void 0===x?{display:"none"}:t.style,onFocus:g(t.onFocus,()=>{l.valueIndexToChangeRef.current=s})})}),p&&e.jsx(yi,{name:a??(l.name?l.name+(l.values.length>1?"[]":""):void 0),form:l.form,value:x},s)]})});gi.displayName=xi;var yi=o.forwardRef(({__scopeSlider:t,value:r,...n},s)=>{const a=o.useRef(null),i=c(a,s),l=Xa(r);return o.useEffect(()=>{const e=a.current;if(!e)return;const t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"value").set;if(l!==r&&n){const t=new Event("input",{bubbles:!0});n.call(e,r),e.dispatchEvent(t)}},[l,r]),e.jsx(w.input,{style:{display:"none"},...n,ref:i,defaultValue:r})});function vi(e,t,r){return Ua(100/(r-t)*(e-t),[0,100])}function wi(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}yi.displayName="RadioBubbleInput";var ji=ai,ki=fi,Ni=hi,Ci=gi;var zi="Switch",[Pi]=a(zi),[Si,Ei]=Pi(zi),Ri=o.forwardRef((t,r)=>{const{__scopeSwitch:n,name:s,checked:a,defaultChecked:i,required:l,disabled:d,value:u="on",onCheckedChange:m,form:f,...p}=t,[h,x]=o.useState(null),b=c(r,e=>x(e)),y=o.useRef(!1),j=!h||(f||!!h.closest("form")),[k,N]=v({prop:a,defaultProp:i??!1,onChange:m,caller:zi});return e.jsxs(Si,{scope:n,checked:k,disabled:d,children:[e.jsx(w.button,{type:"button",role:"switch","aria-checked":k,"aria-required":l,"data-state":Di(k),"data-disabled":d?"":void 0,disabled:d,value:u,...p,ref:b,onClick:g(t.onClick,e=>{N(e=>!e),j&&(y.current=e.isPropagationStopped(),y.current||e.stopPropagation())})}),j&&e.jsx(Mi,{control:h,bubbles:!y.current,name:s,value:u,checked:k,required:l,disabled:d,form:f,style:{transform:"translateX(-100%)"}})]})});Ri.displayName=zi;var Ti="SwitchThumb",Li=o.forwardRef((t,r)=>{const{__scopeSwitch:n,...o}=t,s=Ei(Ti,n);return e.jsx(w.span,{"data-state":Di(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:r})});Li.displayName=Ti;var Mi=o.forwardRef(({__scopeSwitch:t,control:r,checked:n,bubbles:s=!0,...a},i)=>{const l=o.useRef(null),d=c(l,i),u=Xa(n),m=co(r);return o.useEffect(()=>{const e=l.current;if(!e)return;const t=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(t,"checked").set;if(u!==n&&r){const t=new Event("click",{bubbles:s});r.call(e,n),e.dispatchEvent(t)}},[u,n,s]),e.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...a,tabIndex:-1,ref:d,style:{...a.style,...m,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function Di(e){return e?"checked":"unchecked"}Mi.displayName="SwitchBubbleInput";var Ii=Ri,Ai=Li;function _i({label:t,labelClassName:r,handleClick:n,description:o,descriptionClassName:s}){return e.jsxs("div",{className:"flex flex-col gap-1",children:[t&&e.jsx(Rs,{type:"button",variant:"linkGray",className:Jt("text-sm",r),onClick:n,children:t}),o&&e.jsx("span",{className:Jt("text-xs text-gray-500",s),children:o})]})}const Oi=o.forwardRef(({className:t,thumbClassName:r,label:n,labelClassName:s,descriptionClassName:a,description:i,onToggle:l,...d},c)=>{const[u,m]=o.useState(!1),f=()=>{m(e=>!e),l()};return e.jsxs("div",{className:Jt("flex gap-1",i?"items-start":"items-center"),children:[e.jsx(Ii,{ref:c,className:Jt("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-start rounded-full border-2 border-transparent transition-colors focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-brand-600 data-[state=unchecked]:bg-gray-light-100",t,i?"mt-0.5":"mt-0"),onCheckedChange:f,checked:u,...d,children:e.jsx(Ai,{className:Jt("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:-translate-x-5 data-[state=checked]:ltr:translate-x-5 data-[state=unchecked]:-translate-x-0",r)})}),e.jsx(_i,{label:n,labelClassName:s,handleClick:f,description:i,descriptionClassName:a})]})});Oi.displayName="Switch";var $i="rovingFocusGroup.onEntryFocus",Fi={bubbles:!1,cancelable:!0},Vi="RovingFocusGroup",[Bi,Wi,Hi]=x(Vi),[Gi,qi]=a(Vi,[Hi]),[Ki,Ui]=Gi(Vi),Xi=o.forwardRef((t,r)=>e.jsx(Bi.Provider,{scope:t.__scopeRovingFocusGroup,children:e.jsx(Bi.Slot,{scope:t.__scopeRovingFocusGroup,children:e.jsx(Yi,{...t,ref:r})})}));Xi.displayName=Vi;var Yi=o.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:n,orientation:s,loop:a=!1,dir:i,currentTabStopId:l,defaultCurrentTabStopId:d,onCurrentTabStopIdChange:u,onEntryFocus:m,preventScrollOnEntryFocus:f=!1,...p}=t,h=o.useRef(null),x=c(r,h),b=W(i),[y,j]=v({prop:l,defaultProp:d??null,onChange:u,caller:Vi}),[k,N]=o.useState(!1),C=dr(m),z=Wi(n),P=o.useRef(!1),[S,E]=o.useState(0);return o.useEffect(()=>{const e=h.current;if(e)return e.addEventListener($i,C),()=>e.removeEventListener($i,C)},[C]),e.jsx(Ki,{scope:n,orientation:s,dir:b,loop:a,currentTabStopId:y,onItemFocus:o.useCallback(e=>j(e),[j]),onItemShiftTab:o.useCallback(()=>N(!0),[]),onFocusableItemAdd:o.useCallback(()=>E(e=>e+1),[]),onFocusableItemRemove:o.useCallback(()=>E(e=>e-1),[]),children:e.jsx(w.div,{tabIndex:k||0===S?-1:0,"data-orientation":s,...p,ref:x,style:{outline:"none",...t.style},onMouseDown:g(t.onMouseDown,()=>{P.current=!0}),onFocus:g(t.onFocus,e=>{const t=!P.current;if(e.target===e.currentTarget&&t&&!k){const t=new CustomEvent($i,Fi);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=z().filter(e=>e.focusable);el([e.find(e=>e.active),e.find(e=>e.id===y),...e].filter(Boolean).map(e=>e.ref.current),f)}}P.current=!1}),onBlur:g(t.onBlur,()=>N(!1))})})}),Zi="RovingFocusGroupItem",Ji=o.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:n,focusable:s=!0,active:a=!1,tabStopId:i,children:l,...d}=t,c=z(),u=i||c,m=Ui(Zi,n),f=m.currentTabStopId===u,p=Wi(n),{onFocusableItemAdd:h,onFocusableItemRemove:x,currentTabStopId:b}=m;return o.useEffect(()=>{if(s)return h(),()=>x()},[s,h,x]),e.jsx(Bi.ItemSlot,{scope:n,id:u,focusable:s,active:a,children:e.jsx(w.span,{tabIndex:f?0:-1,"data-orientation":m.orientation,...d,ref:r,onMouseDown:g(t.onMouseDown,e=>{s?m.onItemFocus(u):e.preventDefault()}),onFocus:g(t.onFocus,()=>m.onItemFocus(u)),onKeyDown:g(t.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void m.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,r){const n=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,r);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(n)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(n)?void 0:Qi[n]}(e,m.orientation,m.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let o=p().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const s=o.indexOf(e.currentTarget);o=m.loop?(n=s+1,(r=o).map((e,t)=>r[(n+t)%r.length])):o.slice(s+1)}setTimeout(()=>el(o))}var r,n}),children:"function"==typeof l?l({isCurrentTabStop:f,hasTabStop:null!=b}):l})})});Ji.displayName=Zi;var Qi={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function el(e,t=!1){const r=document.activeElement;for(const n of e){if(n===r)return;if(n.focus({preventScroll:t}),document.activeElement!==r)return}}var tl=Xi,rl=Ji,nl="Tabs",[ol]=a(nl,[qi]),sl=qi(),[al,il]=ol(nl),ll=o.forwardRef((t,r)=>{const{__scopeTabs:n,value:o,onValueChange:s,defaultValue:a,orientation:i="horizontal",dir:l,activationMode:d="automatic",...c}=t,u=W(l),[m,f]=v({prop:o,onChange:s,defaultProp:a??"",caller:nl});return e.jsx(al,{scope:n,baseId:z(),value:m,onValueChange:f,orientation:i,dir:u,activationMode:d,children:e.jsx(w.div,{dir:u,"data-orientation":i,...c,ref:r})})});ll.displayName=nl;var dl="TabsList",cl=o.forwardRef((t,r)=>{const{__scopeTabs:n,loop:o=!0,...s}=t,a=il(dl,n),i=sl(n);return e.jsx(tl,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:o,children:e.jsx(w.div,{role:"tablist","aria-orientation":a.orientation,...s,ref:r})})});cl.displayName=dl;var ul="TabsTrigger",ml=o.forwardRef((t,r)=>{const{__scopeTabs:n,value:o,disabled:s=!1,...a}=t,i=il(ul,n),l=sl(n),d=hl(i.baseId,o),c=xl(i.baseId,o),u=o===i.value;return e.jsx(rl,{asChild:!0,...l,focusable:!s,active:u,children:e.jsx(w.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:d,...a,ref:r,onMouseDown:g(t.onMouseDown,e=>{s||0!==e.button||!1!==e.ctrlKey?e.preventDefault():i.onValueChange(o)}),onKeyDown:g(t.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&i.onValueChange(o)}),onFocus:g(t.onFocus,()=>{const e="manual"!==i.activationMode;u||s||!e||i.onValueChange(o)})})})});ml.displayName=ul;var fl="TabsContent",pl=o.forwardRef((t,r)=>{const{__scopeTabs:n,value:s,forceMount:a,children:i,...l}=t,d=il(fl,n),c=hl(d.baseId,s),u=xl(d.baseId,s),m=s===d.value,f=o.useRef(m);return o.useEffect(()=>{const e=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(e)},[]),e.jsx(j,{present:a||m,children:({present:n})=>e.jsx(w.div,{"data-state":m?"active":"inactive","data-orientation":d.orientation,role:"tabpanel","aria-labelledby":c,hidden:!n,id:u,tabIndex:0,...l,ref:r,style:{...t.style,animationDuration:f.current?"0s":void 0},children:n&&i})})});function hl(e,t){return`${e}-trigger-${t}`}function xl(e,t){return`${e}-content-${t}`}pl.displayName=fl;var gl=ll,bl=cl,yl=ml,vl=pl;const wl=ws(" text-muted-foreground inline-flex flex-row h-9 items-center",{variants:{listVariant:{brand:"",gray:"",outlined:"border-b border-rborder-secondary gap-2",bordered:"rounded-lg border border-rborder-secondary bg-rbg-secondary-alt p-1",minimal:" rounded-md border border-rborder-secondary bg-rbg-secondary-alt !gap-0.5"},fullWidth:{true:"justify-between",false:"justify-start gap-1"},direction:{vertical:"flex-col min-h-fit max-w-fit ",horizontal:"flex-row w-full"}},defaultVariants:{listVariant:"brand",fullWidth:!0,direction:"horizontal"}}),jl=ws(" h-full py-2 px-3 cursor-pointer inline-flex items-center justify-center gap-2 text-sm font-normal whitespace-nowrap transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{triggerVariant:{brand:"text-rtext-quaternary-500 data-[state=active]:rounded-sm data-[state=active]:bg-rbg-brand-primary-alt data-[state=active]:text-rtext-brand-secondary-700 ",gray:"text-rtext-quaternary-500 data-[state=active]:rounded-sm data-[state=active]:bg-rbg-active data-[state=active]:text-rtext-secondary-700 ",outlined:"text-rtext-quaternary-500 data-[state=active]:text-rtext-brand-secondary-700 pb-2.5 data-[state=active]:pb-2 data-[state=active]:border-b-2 data-[state=active]:border-rgf-brand-primary-alt",bordered:"text-rtext-quaternary-500 data-[state=active]:rounded-sm data-[state=active]:text-rtext-secondary-700 data-[state=active]:bg-rbg-primary-alt data-[state=active]:shadow-sm",minimal:"text-rtext-quaternary-500 data-[state=active]:rounded-md data-[state=active]:text-rtext-secondary-700 data-[state=active]:bg-rbg-primary-alt data-[state=active]:border data-[state=active]:border-rborder-primary data-[state=active]:shadow-xs"},fullWidth:{true:"w-full",false:"w-fit justify-start gap-1 items-center"}},defaultVariants:{triggerVariant:"gray",fullWidth:!0}});const kl=Object.assign(({className:t,direction:r="horizontal",dir:n="rtl",...o})=>e.jsx(gl,{"data-slot":"tabs",dir:n,className:Jt("flex gap-2","horizontal"==r?"flex-col":"flex-row",t),...o}),{List:function({className:t,listVariant:r,direction:n="horizontal",fullWidth:o=!1,...s}){return e.jsx(bl,{"data-slot":"tabs-list",className:Jt(wl({fullWidth:o,listVariant:r,direction:n}),t),...s})},Trigger:function({className:t,triggerVariant:r,fullWidth:n,...o}){return e.jsx(yl,{"data-slot":"tabs-trigger",className:Jt(jl({triggerVariant:r,fullWidth:n}),t),...o})},Content:function({className:t,...r}){return e.jsx(vl,{"data-slot":"tabs-content",className:Jt("flex-1 outline-none",t),...r})}}),Nl=ws("inline-flex items-center h-fit min-w-fit bg-white w-fit rounded-md text-rtext-secondary-700 font-medium border border-rborder-primary",{variants:{size:{sm:"px-2 py-[3px] text-xs gap-1",md:"px-[9px] py-0.5 text-sm gap-[5px]",lg:"px-2.5 py-1 text-sm gap-1.5"},dir:{ltr:"flex-row-reverse",rtl:"flex-row"},icon:{"x-close":"x-close"}},defaultVariants:{size:"sm",dir:"rtl"}}),Cl=ws("",{variants:{size:{sm:"px-1 leading-[var(--line-height-text-xs)]",md:"px-[5px] leading-[var(--line-height-text-xs)]",lg:"px-1.5 leading-[var(--line-height-text-sm)]"}},defaultVariants:{size:"sm"}}),zl=ws("",{variants:{size:{sm:"10",md:"12",lg:"14"}},defaultVariants:{size:"sm"}});function Pl({number:t,size:r}){return e.jsx("div",{className:Jt(Cl({size:r}),"bg-gray-light-100 rounded-[3px]"),children:t})}const Sl=ws("rounded-md p-2 shadow-xs w-fit bg-white border border-rborder-primary focus:outline-2 focus:outline-rborder-brand disabled:bg-rbg-disabled-subtle disabled:border-rborder-disabled w-full"),El={success:e.jsx(De,{className:"text-green-100",size:20}),error:e.jsx(Ie,{className:"text-red-100",size:20}),info:e.jsx(Fe,{className:"text-blue-100",size:20}),warning:e.jsx(Be,{className:"text-yellow-100",size:20})},Rl={success:"bg-green-500",error:"bg-red-500",info:"bg-blue-500",warning:"bg-yellow-500 text-black"},Tl={fade:"transition-all duration-300",slide:"transition-all duration-300 transform translate-x-0",scale:"transition-all duration-300 transform scale-100"},Ll={fade:"opacity-0",slide:"translate-x-10 opacity-0",scale:"scale-0 opacity-0"};function Ml(e){switch(e){case"top-left":return"top-4 left-4";case"top-center":return"top-4 left-1/2 -translate-x-1/2";case"top-right":default:return"top-4 right-4";case"middle-center":return"top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2";case"bottom-left":return"bottom-4 left-4";case"bottom-center":return"bottom-4 left-1/2 -translate-x-1/2";case"bottom-right":return"bottom-4 right-4"}}const Dl=["top-left","top-center","top-right","middle-center","bottom-left","bottom-center","bottom-right"];let Il={};function Al(e){Il=e}function _l(e){const t="string"==typeof e?{...Il,message:e,type:Il?.type??"info"}:{...Il,...e},r=new CustomEvent("custom-toast",{detail:t});window.dispatchEvent(r)}_l.success=(e,t)=>_l({...Il,...t,message:e,type:"success"}),_l.error=(e,t)=>_l({...Il,...t,message:e,type:"error"}),_l.info=(e,t)=>_l({...Il,...t,message:e,type:"info"}),_l.warning=(e,t)=>_l({...Il,...t,message:e,type:"warning"}),exports.AccordionDemo=function({type:t="single",collapsible:r=!1,items:n,accordionClassName:o="w-full bg-white p-4",itemClassName:s="border-b last:border-b-0",questionClassName:a="text-lg font-medium",answerClassName:i="text-sm text-gray-600",iconClosed:l,iconOpen:d}){return e.jsx(Qt,{type:t,collapsible:r,className:`${o}`,children:n.map((t,r)=>e.jsxs(er,{value:`item-${r}`,className:s,children:[e.jsx(tr,{className:a,iconClosed:l,iconOpen:d,children:t.question}),e.jsx(rr,{className:i,children:t.answer})]},r))})},exports.Avatar=({type:t,size:r="md",imgList:n=[],img:o={},showAmount:s=1,showAddBtn:a=!1,notifyColor:i="",notifyIcon:l="",title:d="",description:c="",iconBorder:u=!0,tooltip:m,addBtnAction:f=()=>{}})=>e.jsxs(e.Fragment,{children:["single"==t&&e.jsx(gs,{img:o,size:r,notifyColor:i,notifyIcon:l,iconBorder:u}),"group"==t&&e.jsx(xs,{imgList:n,size:r,showAmount:s,showAddBtn:a,tooltip:m,addBtnAction:f}),"labled"==t&&e.jsxs("div",{className:Jt("inline-flex items-center",ar[r]),children:[e.jsx(gs,{img:o,size:r,notifyColor:i,notifyIcon:l,iconBorder:u}),e.jsx(lr,{size:r,title:d,description:c})]})]}),exports.Badge=ks,exports.Breadcrumb=({breadCrumbLink:r,type:n="chevron",dir:o,navClassName:s,listClassName:a,listItemClassName:i="",linkClassName:l,separatorClassName:d})=>{const[c,u]=t.useState("");t.useEffect(()=>{"undefined"!=typeof window&&u(window.location.pathname)},[]);const m=o??("rtl"===document?.body?.getAttribute("dir")?"rtl":"ltr"),f=()=>{switch(n){case"chevron":return"rtl"===m?e.jsx(Ns,{}):e.jsx(Cs,{});case"slash":return e.jsx(Ps,{});default:return e.jsx(Cs,{})}},p=[{title:e.jsx(zs,{}),link:"/"},...r],h=p.findIndex(e=>e.link===c),x=h>=0?p.slice(0,h+1):p;return e.jsx("nav",{className:`w-full overflow-x-auto scrollbar-thin scrollbar-thumb-gray-400 ${s??""}`,dir:m,children:e.jsxs("ol",{className:`flex flex-nowrap items-center gap-x-1 lg:gap-x-2 w-max py-2 rounded-md ${a??""}`,children:[" ",x.map((t,r)=>{const n=t.link??"",o=r!==x.length-1,s=c===n;return e.jsxs("li",{className:Jt("flex items-center text-sm font-normal leading-normal transition-colors duration-300 ",i),children:[t.link?e.jsx("a",{href:n,className:`${l??"cursor-pointer transition-colors duration-300"} ${s?"text-rtext-brand-tertiary-600":"text-rtext-placeholder"}`,children:t.title}):e.jsx("span",{className:"text-gray-500",children:t.title}),o&&e.jsx("span",{className:`${d??"ms-2"}`,children:f()})]},`${n}-${r}`)})]})})},exports.Button=Rs,exports.Checkbox=Is,exports.Dropdown=({children:r,toggleBtn:n,direction:o="down",alignment:s="right",dropDownClassName:a="",autoAdjust:i=!0,open:l,onOpenChange:d})=>{const[c,u]=t.useState(!1),[m,f]=t.useState(o),[p,h]=t.useState(s),x=void 0!==l&&"function"==typeof d,g=l??c,b=t.useRef(null),y=t.useRef(null),v=t.useRef(0);t.useEffect(()=>{const e=e=>{b.current&&!b.current.contains(e.target)&&w(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),t.useLayoutEffect(()=>{if(!i)return f(o),void h(s);if(g&&b.current&&y.current){const e=b.current.getBoundingClientRect(),t=y.current.getBoundingClientRect(),r=t.width||200,n=t.height||200,a=window.innerHeight-e.bottom,i=e.top,l=window.innerWidth-e.right,d=e.left;if("down"===o||"up"===o)f(a<n&&i>a?"up":"down"),h(s);else if("left"===o||"right"===o)"left"===o?f(d<r&&l>d?"right":"left"):"right"===o&&f(l<r&&d>l?"left":"right"),h(s);else{Math.max(a,i)>Math.max(l,d)?(f(a>i?"down":"up"),h(s)):(f(l>d?"right":"left"),h(s))}}},[g,o,s,i]);const w=e=>{x&&d?d(e):u(e)};return e.jsxs("div",{className:"relative inline-block",ref:b,children:[e.jsx(Rs,{...n,onClick:()=>w(!g)}),g&&e.jsx("div",{ref:y,style:{zIndex:Js(v.current)},className:Jt("absolute border border-rborder-secondary w-fit rounded-md shadow-lg bg-rbg-primary",Qs({direction:m,alignment:p}),a),children:r})]})},exports.FileUploader=({icon:t,mainText:r,subText:n,formatText:o,acceptableFormats:s="",disable:a=!1,items:i,loadType:l="progressBar",multiItem:d=!1,onChange:c,onDelete:u})=>e.jsxs("div",{className:"w-full flex flex-col gap-4",children:[e.jsx(ea,{icon:t,mainText:r,subText:n,formatText:o,acceptableFormats:s,disable:a,multiItem:d,onChange:c}),i&&i.length>0&&e.jsx("div",{className:"flex flex-col gap-3",children:i.map(t=>e.jsx(va,{item:t,loadType:l,onDelete:u},t?.title))})]}),exports.ImageMagnify=function({src:r,alt:n="",zoom:o=2,lensSize:s=140,className:a="",lensVisibleClassName:i="hidden md:block",zoomPaneVisibleClassName:l="hidden md:block",touchToggle:d=!0,zoomPaneSize:c,zoomPanePosition:u="right",zoomMode:m="pane"}){const f=t.useRef(null),p=t.useRef(null),[h,x]=t.useState(!1),[g,b]=t.useState(ja),[y,v]=t.useState({w:0,h:0}),[w,j]=t.useState(!1);t.useEffect(()=>{const e=()=>{const e=p.current;e&&v({w:e.width,h:e.height})},t=p.current;if(t)return t.complete&&e(),t.addEventListener("load",e),window.addEventListener("resize",e),()=>{t.removeEventListener("load",e),window.removeEventListener("resize",e)}},[r]);const k=(e,t)=>{const r=p.current;if(!r)return ja;const n=r.getBoundingClientRect();if(0===n.width||0===n.height)return ja;return{x:wa(e-n.left,0,n.width),y:wa(t-n.top,0,n.height)}},N=e=>{const t="nativeEvent"in e?e.nativeEvent:e;if("touches"in t&&t.touches?.length>0){const e=t.touches[0];return void b(k(e.clientX,e.clientY))}"number"==typeof t.clientX&&b(k(t.clientX,t.clientY))},C=()=>{x(!1),w&&j(!1)},z=p.current?.getBoundingClientRect(),P=(z?.width??y.w)||1,S=(z?.height??y.h)||1,E=`${P*o}px ${S*o}px`,R=`${g.x/P*100}% ${g.y/S*100}%`,T=c??P,L=c??S,M={width:s,height:s,left:wa(g.x-s/2,0,Math.max(P-s,0)),top:wa(g.y-s/2,0,Math.max(S-s,0)),backgroundImage:"inline"===m?`url(${r})`:"none",backgroundRepeat:"no-repeat",backgroundSize:"inline"===m?E:void 0,backgroundPosition:"inline"===m?R:void 0},D={width:T,height:L,backgroundImage:`url(${r})`,backgroundRepeat:"no-repeat",backgroundSize:E,backgroundPosition:R},I="left"===u,A=h?i:"hidden",_="pane"===m&&h?l:"hidden";return e.jsxs("div",{className:`relative w-fit inline-block align-top ${a}`,children:[e.jsxs("div",{ref:f,className:"relative select-none touch-none",onMouseMove:e=>{N(e)},onMouseEnter:()=>{x(!0)},onMouseLeave:C,onTouchStart:e=>{d&&(e.preventDefault(),w?(j(!1),x(!1)):(j(!0),x(!0),N(e)))},onTouchMove:e=>{w&&(e.preventDefault(),N(e))},onTouchEnd:C,children:[e.jsx("img",{ref:p,src:r,alt:n,className:"block max-w-full h-auto select-none",draggable:!1,onDragStart:e=>e.preventDefault()}),e.jsx("div",{className:`pointer-events-none absolute rounded-full border-2 border-white shadow-lg ${A} ${"inline"===m?"bg-white/10 backdrop-blur":"bg-transparent"}`,style:M})]}),e.jsx("div",{className:`${_} absolute top-1/2 -translate-y-1/2 overflow-hidden rounded-lg border border-slate-200 shadow-sm \n ${I?"right-full mr-3":"left-full ml-3"}\n `,style:D})]})},exports.Input=({size:r="sm",type:n="text",inputType:o="default",disabled:s=!1,id:a,label:i,required:l=!1,destructive:d=!1,destructiveText:c,hintText:u,placeholder:m,helpIcon:f=!1,icon:p,leadingTextValue:h,className:x,trailingDropdownOptions:g,trailingDropdownDefault:b,onChange:y,value:v,tooltipProps:w,trailingButtonText:j,name:k,labelClass:N,labelStarClass:C,shabaLabelSize:z="lg",autoFocus:P=!1,...S})=>{const E=p,[R,T]=t.useState(),[L,M]=t.useState(!1);return e.jsxs("div",{className:"flex flex-col gap-1 items-start",children:[e.jsx(Ca,{id:a,label:i,required:l,labelClass:N,labelStarClass:C}),e.jsxs("div",{className:"relative w-full",children:[E&&"iconLeading"==o&&e.jsx("div",{"aria-label":"iconLeading",className:"absolute ltr:left-3 rtl:right-3 top-1/2 -translate-y-1/2",children:e.jsx(E,{})}),h&&"leadingText"==o&&e.jsx("div",{"aria-label":"leadingText",className:`h-full absolute text-sm text-rfg-tertiary-600 ltr:left-3 rtl:right-3 top-1/2 -translate-y-1/2 border-e pe-2 w-15 truncate text-center ${"sm"===r?"pt-2":"pt-2.5"} \n ${!0===d?"border-rborder-error":"border-rborder-primary"}`,children:h}),"trailingDropdown"==o&&e.jsx("p",{className:"absolute ltr:left-2 rtl:right-2 top-1/2 -translate-y-1/2",children:R?R?.icon:b?.icon}),e.jsx("input",{value:v,name:k,onChange:y,placeholder:m,autoFocus:P,className:Jt(Na({size:r,inputType:o}),x,d&&"bg-rbg-disabled-subtle",d&&"!border-2 !border-rborder-error focus:!outline-0",s&&"bg-rbg-disabled-subtle border-rborder-disabled"),type:"password"===n&&L?"text":n,id:a,disabled:s,...S}),"password"===n&&e.jsx("div",{className:"absolute top-1/2 -translate-y-1/2 ltr:right-2 rtl:left-2 w-fit h-5 flex items-center justify-center",children:e.jsx(Rs,{type:"button",variant:"linkGray",onClick:()=>M(!L),children:L?e.jsx(Oe,{size:18,className:"text-rbutton-tertiary-fg"}):e.jsx($e,{size:18,className:"text-rbutton-tertiary-fg"})})}),f&&w&&!1===d&&e.jsx(ps,{content:w?.text,description:w?.description,position:w?.position,dir:w?.dir,descriptionClassName:w?.descriptionClassName,children:e.jsx("div",{"data-testid":"tooltip-button",className:"w-fit absolute top-1/2 -translate-y-1/2 \n "+("trailingButton"==o||"trailingDropdown"==o?"ltr:right-20 rtl:left-20":"shaba"==o?"ltr:right-12 rtl:left-12":"ltr:right-2 rtl:left-2"),children:e.jsx(za,{})})}),"trailingButton"==o&&e.jsxs("button",{"aria-label":"copyButton",onClick:()=>{return e=String(v),void navigator.clipboard.writeText(e);var e},className:"flex items-center gap-1 h-full absolute text-sm text-rbutton-secondary-fg cursor-pointer ltr:right-3 rtl:left-3 top-1/2 -translate-y-1/2 border-s ps-2 "+(!0===d?"border-rborder-error":"border-rborder-primary"),children:[e.jsx(_e,{size:20})," ",j]}),"trailingDropdown"==o&&e.jsx(Sa,{onChange:e=>{const t=g?.find(t=>t?.value===e?.value);T(t??e)},options:g??[],selectedValueLabel:b?.title??"-",config:{canSelectZero:!0,name:"trailingDropdown"},className:"w-fit absolute rtl:left-0 ltr:right-0 top-0"}),"shaba"==o&&e.jsx("div",{"aria-label":"shabaLabel",className:Jt("flex items-center h-full absolute text-rfg-tertiary-600 ltr:right-0 rtl:left-0 top-1/2 -translate-y-1/2 border-s",ka[z],!0===d?"border-rborder-error":"border-rborder-primary"),children:"IR"})]}),!1===d&&u&&e.jsx("p",{className:"text-sm text-rtext-tertiary-600",children:u}),d&&c&&e.jsx("p",{className:"text-sm text-rtext-error-primary-600",children:c})]})},exports.Message=({variant:t,sender:r,senderName:n,message:o,children:s,avatar:a,date:i,className:l,dir:d})=>{const c=d??("rtl"===document?.body?.getAttribute("dir")?"rtl":"ltr");return e.jsx("div",{className:Jt("w-full flex ",Ra({sender:r,direction:c})),"data-testid":"messageWrapper",children:e.jsxs("div",{className:Jt("w-fit max-w-4/5 flex gap-3",Ra({sender:r,direction:c}),l),"data-testid":"messageComp",children:[a??null,e.jsxs("div",{className:"w-full flex flex-col gap-1.5",children:[e.jsxs("div",{className:Jt("w-full flex justify-between items-center",Ra({sender:r,direction:c})),children:[e.jsx("span",{className:"text-rtext-secondary-700 text-sm font-medium",children:n}),e.jsx("span",{className:"text-rtext-tertiary-600 text-xs font-normal",children:i})]}),e.jsxs("div",{className:Jt(Ea({variant:t,sender:r,direction:c})),children:[o&&e.jsx("span",{className:"",children:o}),s??null]})]})]})})},exports.Metrics=({title:r,value:n,description:o,icon:s,iconType:a="secondary",statistic:i,chartImg:l,chartPosition:d,actionBtns:c,toggleBtn:u,iconPosition:m="hidden",statisticPosition:f,titleType:p="normal"})=>e.jsxs(Ta,{className:"flex flex-col gap-0 rounded-xl border border-rborder-secondary bg-rbg-primary shadow-xs w-full sm:max-w-[380px] max-w-[311px] h-fit justify-start p-0",children:[e.jsxs("div",{className:"flex gap-5 w-full py-5 px-4 sm:p-6",children:["iconSide"==m&&e.jsx("div",{className:Jt("self-center",Da[a]),children:s}),e.jsxs("div",{className:Jt("flex flex-col h-full items-end gap-2 w-full",`${("topWithTitle"==m||"topAlone"==m)&&"gap-5 md:gap-6"}`),children:[e.jsxs(La,{className:"flex justify-between w-full px-0",children:[e.jsxs("div",{className:"flex items-center gap-3 ",children:[("topWithTitle"==m||"topAlone"==m)&&e.jsx("div",{className:Da[a],children:s}),"topAlone"!=m&&e.jsx("span",{className:Ia[p],children:r})]}),u]}),e.jsxs("div",{className:"flex flex-col w-full gap-2",children:["topAlone"==m&&e.jsx("span",{className:Ia[p],children:r}),e.jsxs("div",{className:"w-full flex justify-between gap-4",children:[e.jsxs("div",{className:Jt("flex justify-between items-center w-full h-fit px-0",`${"row-below"==f&&"flex-col just-start items-start gap-4"}`,`${"row-next"==f&&"flex justify-start items-start gap-2"}`),children:[e.jsx("span",{className:"text-display-md font-normal text-rtext-primary-900",children:n}),e.jsxs("div",{className:"flex gap-2 items-center",children:[i,o&&e.jsx("span",{className:"font-medium text-sm text-rtext-tertiary-600",children:o})]})]}),"side"==d&&e.jsx("div",{className:"w-full",children:l})]})]}),"bottom"==d&&e.jsx("div",{className:"w-full",children:l})]})]}),c&&e.jsx(Ma,{className:"flex flex-row-reverse items-center justify-between py-4 px-6 border-t border-rborder-secondary gap-1.5 w-full",children:c?.map((r,n)=>e.jsx(t.Fragment,{children:r},n))})]}),exports.Modal=({children:n,closeHandler:o,size:s="md",modalTitle:a,overflow:i,closeIconStroke:l="#000",position:d="center",icon:c,headerIconDir:u="flex-col",showModal:m=!1,modalContentStyle:f,showCloseIcon:p=!0})=>{const h=t.useRef(++_a);return t.useEffect(()=>(m&&(document.body.style.overflow="hidden"),()=>{_a--,document.body.style.overflow=""}),[m]),m?r.createPortal(e.jsxs(e.Fragment,{children:[e.jsx("button",{className:"fixed left-0 top-0 h-full min-h-screen w-full cursor-default overflow-hidden bg-black/60 duration-0",style:{zIndex:Js(h.current)},onClick:o}),e.jsxs("dialog",{open:!0,"aria-label":"modal-container",className:Zt(Aa({size:s,overflow:i,position:d}),f),style:{zIndex:Zs(h.current)},children:[e.jsxs("div",{className:("flex-col"==u?"items-start":"items-center")+"\n sticky top-0 z-10 flex justify-between gap-6 bg-white py-4",children:[e.jsxs("div",{className:`flex gap-4 justify-start items-start ${u}`,children:[c&&c,a&&e.jsx("h2",{id:"modal-title",className:"text-lg font-semibold",children:a})]}),p&&e.jsx(Rs,{variant:"tertiaryGray",size:"sm",className:"!p-0",onClick:o,children:e.jsx(bs,{width:"16",height:"16",stroke:l})})]}),e.jsx("div",{className:"overflow-y-auto",children:n})]})]}),document.body):null},exports.Pagination=({currentPage:t,totalPages:r,onPageChange:n,type:o="default",dir:s="rtl",className:a,activeClassName:i,previousClassName:l,nextClassName:d,prevIcon:c,nextIcon:u,firstIcon:m,lastIcon:f,showFirstLast:p=!0,labels:h,hasText:x=!0,...g})=>{const b="rtl"===s,y={...{next:b?"بعدی":"Next",prev:b?"قبلی":"Previous",first:b?"اولین":"First",last:b?"آخرین":"Last",page:b?"صفحه":"page",of:b?"از":"of"},...h};if(r<=1)return null;const v=()=>{const o=[];if("undefined"!=typeof window&&window.innerWidth<768){const e=new Set;e.add(1),e.add(2),e.add(r-1),e.add(r),1!==t&&2!==t&&t!==r-1&&t!==r&&e.add(t);const n=Array.from(e).sort((e,t)=>e-t);for(let e=0;e<n.length;e++)o.push(n[e]),e<n.length-1&&n[e+1]!==n[e]+1&&o.push("...")}else if(r<=6)for(let e=1;e<=r;e++)o.push(e);else{if(t>3)if(t<r-2)o.push(1,"...",t-1,t,t+1,"...",r);else{o.push(1,2,3,"...");for(let e=r-2;e<=r;e++)o.push(e)}else{for(let e=1;e<=3;e++)o.push(e);o.push("...",r-2,r-1,r)}}const s=b?[...o].reverse():o;return e.jsx("div",{className:Jt("flex h-full",b&&"flex-row-reverse"),children:s.map((r,o)=>"..."===r?e.jsx("span",{className:"md:px-3 md:py-1 p-2 text-gray-400 text-sm",children:"..."},`dots-${o}`):e.jsx("button",{onClick:()=>n?.(r),className:Jt("px-3 py-1 text-sm border border-gray-200",t===r?i:a),children:r},r))})};return"card-minimal-right-aligned"===o?e.jsx(Ha,{currentPage:t,totalPages:r,onPageChange:n,dir:s,labels:y,previousClassName:l,nextClassName:d,className:a,...g}):"card-minimal-left-aligned"===o?e.jsx(Ka,{currentPage:t,totalPages:r,onPageChange:n,dir:s,labels:y,previousClassName:l,nextClassName:d,className:a,...g}):"card-minimal-center-aligned"===o?e.jsx(Wa,{currentPage:t,totalPages:r,onPageChange:n,dir:s,labels:y,previousClassName:l,nextClassName:d,className:a,prevIcon:c,nextIcon:u,...g}):"card-button-group-right-aligned"===o?e.jsx(qa,{currentPage:t,totalPages:r,onPageChange:n,dir:s,labels:y,renderPageNumbers:v,previousClassName:l,nextClassName:d,justifyClassName:Zt(a,"justify-end"),prevIcon:c,nextIcon:u,hasText:x,...g}):"card-button-group-left-aligned"===o?e.jsx(qa,{currentPage:t,totalPages:r,onPageChange:n,dir:s,labels:y,renderPageNumbers:v,previousClassName:l,nextClassName:d,justifyClassName:Zt(a,"justify-start"),prevIcon:c,nextIcon:u,hasText:x,...g}):"card-button-group-center-aligned"===o?e.jsx(qa,{currentPage:t,totalPages:r,onPageChange:n,dir:s,labels:y,renderPageNumbers:v,previousClassName:l,nextClassName:d,justifyClassName:Zt(a,"justify-center"),prevIcon:c,nextIcon:u,hasText:x,...g}):e.jsx(Ga,{activeClassName:i,currentPage:t,totalPages:r,onPageChange:n,dir:s,labels:y,previousClassName:l,nextClassName:d,className:a,prevIcon:c,nextIcon:u,firstIcon:m,lastIcon:f,showFirstLast:p,hasText:x})},exports.PaymentCard=({size:t="sm",title:r="",description:n,checked:o,disabled:s,id:a,value:i="",footer:l,icon:d,type:c="checkbox",onChange:u,name:m="",cardOnclick:f,inputProps:p,checkboxIndex:h})=>{const x=(({checked:e,disabled:t,size:r,hasHeader:n})=>({label:` \n rounded-2xl md:w-3xl text-md h-fit min-w-[343px] text-rtext-tertiary-600 flex gap-2 cursor-pointer\n border-2 border-rborder-secondary rounded-2xl ${n?"flex-col":"p-4"} ${r&&Vs[r]} ${t?"bg-rbg-disabled-subtle":"group"} ${e?"!border-rbg-brand-solid":""}`}))({checked:o,disabled:s,size:t});return e.jsxs("label",{onClick:f,htmlFor:a,tabIndex:h,className:x.label,children:[d,e.jsxs("div",{className:"flex flex-col gap-3 grow justify-between",children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsx("h3",{className:"font-medium text-foreground text-rtext-secondary-700",children:r}),e.jsx("span",{className:"text-rtext-tertiary-600",children:n})]}),l]}),e.jsx("div",{className:"flex items-start gap-2",children:"radio"===c?e.jsx(Fs,{onChange:u,checked:o,disabled:s,value:i,name:m,size:t,id:a,...p}):e.jsx(Is,{...p,disabled:s,id:a,name:m,onChange:u,size:t})})]})},exports.PlanCard=({hasHeader:t=!1,per:r,size:n="sm",title:o="",description:s,price:a,badgeContent:i,checked:l,disabled:d,type:c,name:u,value:m,onChange:f,onCardClick:p,id:h,checkboxIndex:x})=>{const g=t?Us:qs,b=(({checked:e,disabled:t,size:r,hasHeader:n})=>({label:`\n md:w-3xl h-fit min-w-[343px] text-rtext-tertiary-600 rounded-2xl flex group gap-2 cursor-pointer\n border-2 border-rborder-secondary rounded-2xl ${n?"flex-col":"p-4"} ${r&&Ws[r]} ${t?"bg-rbg-disabled-subtle":"group"} ${e?"!border-rbg-brand-solid":""}`}))({checked:l,disabled:d,hasHeader:t,size:n});return e.jsx("label",{..."test"===process.env.NODE_ENV&&{"data-testid":"plan-card-wrapper"},onClick:p,htmlFor:h,tabIndex:x,className:b.label,children:e.jsx(g,{type:c,checkboxIndex:x,checked:l,name:u,per:r,size:n,title:o,description:s,price:a,badgeContent:i,id:h,value:m,disabled:d,onChange:f})})},exports.PriceSlider=function({defaultValue:t=[0,1e3],min:r=0,max:n=1e3,step:s=1,className:a="",trackClassName:i="",rangeClassName:l="",thumbClassName:d="",showValue:c=!1,valueClassName:u="",isPercentage:m=!1,valuePosition:f="bottom",dir:p="ltr",onValueChange:h,...x}){const[g,b]=o.useState(t);return e.jsxs(ji,{value:g,onValueChange:e=>{const[t,o]=e,s=[Math.max(r,Math.min(t,n)),Math.min(n,Math.max(o,r))];b(s),h?.(s)},min:r,max:n,step:s,dir:p,className:Jt("relative flex w-full touch-none select-none items-center",a),...x,children:[e.jsx(ki,{className:Jt("relative h-2 w-full grow overflow-hidden rounded-full bg-gray-light-200",i),children:e.jsx(Ni,{className:Jt("absolute h-full bg-rfg-brand-primary-600",l)})}),g.map((t,r)=>e.jsx(Ci,{className:Jt("relative block h-5 w-5 rounded-full border-2 border-rfg-brand-primary-600 bg-white focus:outline-none focus:ring-2 focus:ring-rfg-brand-primary-300",d),children:c&&e.jsx("span",{className:Jt("absolute left-1/2 -translate-x-1/2 whitespace-nowrap text-xs text-gray-700","top"===f?"bottom-7":"top-7",u),children:m?`٪${t}`:t.toLocaleString()})},r))]})},exports.Progress=ba,exports.Radio=Fs,exports.Select=Sa,exports.Switch=Oi,exports.Tabs=kl,exports.Tag=({className:t,size:r="sm",number:n,pin:o=!1,avatar:s,children:a,checkbox:i,dir:l="rtl",icon:d,checkboxIndex:c,...u})=>{const m="x-close"===d&&e.jsx(bs,{width:Jt(zl({size:r})),height:Jt(zl({size:r})),stroke:"#98A2B3"});return e.jsxs("div",{className:Jt(Nl({size:r,dir:l,icon:d}),t),...u,children:[m,n&&e.jsx(Pl,{number:n,size:r}),e.jsx("span",{children:a}),s&&e.jsx("img",{src:s,alt:"avatar",className:"w-4 h-4 rounded-full"}),o&&e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-current"}),i&&e.jsx(Is,{checkboxIndex:c,size:r,id:i,name:i||""})]})},exports.TextArea=({row:t=5,label:r,required:n=!1,destructive:o=!1,disabled:s=!1,destructiveText:a,hintText:i,placeholder:l,helpIcon:d=!1,onChange:c,id:u,tooltipProps:m,className:f,value:p,name:h,labelClass:x,labelStarClass:g,autoFocus:b=!1,...y})=>e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx(Ca,{id:u,label:r,required:n,labelClass:x,labelStarClass:g}),d&&m&&e.jsx(ps,{content:m?.text,description:m?.description,position:m?.position,dir:m?.dir,descriptionClassName:m?.descriptionClassName,children:e.jsx("div",{children:e.jsx(za,{})})})]}),e.jsx("textarea",{value:p,name:h,disabled:s,rows:t,placeholder:l,id:u,onChange:c,className:Jt(Sl(),f,o&&"!border-2 !border-rborder-error focus:!outline-0",o&&"bg-rbg-disabled-subtle border-rborder-disabled"),autoFocus:b,...y}),!1===o&&i&&e.jsx("p",{className:"text-sm text-rtext-tertiary-600",children:i}),o&&a&&e.jsx("p",{className:"text-sm text-rtext-error-primary-600",children:a})]}),exports.ToastContainer=({type:r="info",position:n="top-right",duration:o=3e3,animation:s="fade",showProgress:a=!0})=>{const[i,l]=t.useState([]),d=t.useRef({});t.useEffect(()=>{Al({type:r,duration:o,animation:s,position:n,showProgress:a})},[]),t.useEffect(()=>{const e=e=>{const t=Date.now(),r=e.detail.duration??3e3,n={...e.detail,id:t,visible:!0,progressVisible:!1,duration:r,position:e.detail.position??"top-right",animation:e.detail.animation??"fade",showProgress:e.detail.showProgress??!1};l(e=>{if(e.length>=3)return e;const o=Date.now();return d.current[t]={timeoutId:setTimeout(()=>c(t),r),start:o,remaining:r},[...e,n]}),requestAnimationFrame(()=>{l(e=>e.map(e=>e.id===t?{...e,progressVisible:!0}:e))})};return window.addEventListener("custom-toast",e),()=>window.removeEventListener("custom-toast",e)},[]);const c=e=>{l(t=>t.map(t=>t.id===e?{...t,visible:!1}:t)),setTimeout(()=>{l(t=>t.filter(t=>t.id!==e)),delete d.current[e]},300)};return e.jsx(e.Fragment,{children:Dl.map(t=>{const r=i.filter(e=>e.position===t).slice(-3);return 0===r.length?null:e.jsx("div",{className:`fixed z-50 space-y-2 w-full sm:w-[320px] px-4 ${Ml(t)}`,children:r.map(t=>(console.log("toast : ",t),e.jsxs("div",{onMouseEnter:()=>(e=>{const t=d.current[e];if(!t)return;const r=Date.now()-t.start;t.remaining=Math.max(0,t.remaining-r),clearTimeout(t.timeoutId)})(t.id),onMouseLeave:()=>(e=>{const t=d.current[e];!t||t.remaining<=0||(t.start=Date.now(),t.timeoutId=setTimeout(()=>c(e),t.remaining))})(t.id),className:Zt("relative px-4 py-3 pr-10 rounded shadow text-white flex items-start gap-3",Rl[t.type??"info"],Tl[t.animation??"fade"],t.visible?"":Ll[t.animation??"fade"]),children:[e.jsx("span",{children:El[t.type??"info"]}),e.jsx("div",{className:"flex-1 break-words text-sm",dangerouslySetInnerHTML:{__html:t.message}}),e.jsx("button",{className:"absolute top-2 right-2 text-white hover:opacity-80",onClick:()=>c(t.id),children:e.jsx(We,{size:16})}),t.showProgress&&e.jsx("div",{className:"absolute bottom-0 left-0 h-1 bg-white/50",style:{width:t.progressVisible?"100%":"0%",transition:`width ${t.duration}ms linear`}})]},t.id)))},t)})})},exports.TooltipWrapper=ps,exports.UserCard=({size:t="sm",description:r,checked:n,disabled:o,id:s,value:a="",type:i="checkbox",onChange:l,name:d="",inputProps:c,username:u,checkboxIndex:m,userFullName:f,cardOnclick:p})=>{const h=(({checked:e,disabled:t,size:r,hasHeader:n})=>({label:` \n min-w-[343px] md:w-3xl rounded-xl flex group gap-2 cursor-pointer\n border-2 border-rborder-secondary rounded-2xl text-rtext-tertiary-600 p-4 ${r&&Xs[r]} ${t?"bg-rbg-disabled-subtle":"group"} ${e?"!border-rbg-brand-solid":""}`}))({checked:n,disabled:o,hasHeader:!1,size:t});return e.jsxs("label",{onClick:p,htmlFor:s,tabIndex:m,className:h.label,children:[e.jsx("img",{src:"/Avatar.png",alt:"avatar",role:"avatar",className:`rounded-full ${Ys[t]}`}),e.jsx("div",{className:"flex flex-col gap-3 grow justify-between",children:e.jsxs("div",{className:"flex flex-col",children:[e.jsxs("div",{className:"flex gap-1",children:[e.jsx("h3",{className:"font-medium text-foreground text-rtext-secondary-700",children:f}),e.jsx("span",{className:"text-rtext-tertiary-600",children:u})]}),e.jsx("span",{className:"text-rtext-tertiary-600",children:r})]})}),e.jsx("div",{className:"flex items-start gap-2",children:"radio"===i?e.jsx(Fs,{onChange:l,checked:n,disabled:o,value:a,name:d,size:t,id:s,...c}):e.jsx(Is,{...c,disabled:o,id:s,name:d,checked:n,onChange:l,size:t,value:a})})]})},exports.setToastDefaults=Al,exports.toast=_l;
|
|
27
|
+
*/function He(e){var t,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=He(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Ue(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=He(e))&&(n&&(n+=" "),n+=t);return n}const Ge=e=>{const t=Xe(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:e=>{const r=e.split("-");return""===r[0]&&1!==r.length&&r.shift(),qe(r,t)||Ye(e)},getConflictingClassGroupIds:(e,t)=>{const o=r[e]||[];return t&&n[e]?[...o,...n[e]]:o}}},qe=(e,t)=>{if(0===e.length)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),o=n?qe(e.slice(1),n):void 0;if(o)return o;if(0===t.validators.length)return;const a=e.join("-");return t.validators.find(({validator:e})=>e(a))?.classGroupId},Ke=/^\[(.+)\]$/,Ye=e=>{if(Ke.test(e)){const t=Ke.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Xe=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const e in r)Ze(r[e],n,e,t);return n},Ze=(e,t,r,n)=>{e.forEach(e=>{if("string"==typeof e){return void((""===e?t:Je(t,e)).classGroupId=r)}if("function"==typeof e)return Qe(e)?void Ze(e(n),t,r,n):void t.validators.push({validator:e,classGroupId:r});Object.entries(e).forEach(([e,o])=>{Ze(o,Je(t,e),r,n)})})},Je=(e,t)=>{let r=e;return t.split("-").forEach(e=>{r.nextPart.has(e)||r.nextPart.set(e,{nextPart:new Map,validators:[]}),r=r.nextPart.get(e)}),r},Qe=e=>e.isThemeGetter,et=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const o=(o,a)=>{r.set(o,a),t++,t>e&&(t=0,n=r,r=new Map)};return{get(e){let t=r.get(e);return void 0!==t?t:void 0!==(t=n.get(e))?(o(e,t),t):void 0},set(e,t){r.has(e)?r.set(e,t):o(e,t)}}},tt=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=e=>{const t=[];let r,n=0,o=0,a=0;for(let s=0;s<e.length;s++){let i=e[s];if(0===n&&0===o){if(":"===i){t.push(e.slice(a,s)),a=s+1;continue}if("/"===i){r=s;continue}}"["===i?n++:"]"===i?n--:"("===i?o++:")"===i&&o--}const s=0===t.length?e:e.substring(a),i=rt(s);return{modifiers:t,hasImportantModifier:i!==s,baseClassName:i,maybePostfixModifierPosition:r&&r>a?r-a:void 0}};if(t){const e=t+":",r=n;n=t=>t.startsWith(e)?r(t.substring(e.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:t,maybePostfixModifierPosition:void 0}}if(r){const e=n;n=t=>r({className:t,parseClassName:e})}return n},rt=e=>e.endsWith("!")?e.substring(0,e.length-1):e.startsWith("!")?e.substring(1):e,nt=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(e=>[e,!0]));return e=>{if(e.length<=1)return e;const r=[];let n=[];return e.forEach(e=>{"["===e[0]||t[e]?(r.push(...n.sort(),e),n=[]):n.push(e)}),r.push(...n.sort()),r}},ot=/\s+/;function at(){let e,t,r=0,n="";for(;r<arguments.length;)(e=arguments[r++])&&(t=st(e))&&(n&&(n+=" "),n+=t);return n}const st=e=>{if("string"==typeof e)return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=st(e[n]))&&(r&&(r+=" "),r+=t);return r};function it(e,...t){let r,n,o,a=function(i){const l=t.reduce((e,t)=>t(e),e());return r=(e=>({cache:et(e.cacheSize),parseClassName:tt(e),sortModifiers:nt(e),...Ge(e)}))(l),n=r.cache.get,o=r.cache.set,a=s,s(i)};function s(e){const t=n(e);if(t)return t;const a=((e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:a}=t,s=[],i=e.trim().split(ot);let l="";for(let e=i.length-1;e>=0;e-=1){const t=i[e],{isExternal:c,modifiers:d,hasImportantModifier:u,baseClassName:m,maybePostfixModifierPosition:f}=r(t);if(c){l=t+(l.length>0?" "+l:l);continue}let p=!!f,h=n(p?m.substring(0,f):m);if(!h){if(!p){l=t+(l.length>0?" "+l:l);continue}if(h=n(m),!h){l=t+(l.length>0?" "+l:l);continue}p=!1}const g=a(d).join(":"),x=u?g+"!":g,b=x+h;if(s.includes(b))continue;s.push(b);const v=o(h,p);for(let e=0;e<v.length;++e){const t=v[e];s.push(x+t)}l=t+(l.length>0?" "+l:l)}return l})(e,r);return o(e,a),a}return function(){return a(at.apply(null,arguments))}}const lt=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},ct=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,dt=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ut=/^\d+\/\d+$/,mt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ft=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,pt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ht=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,gt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xt=e=>ut.test(e),bt=e=>!!e&&!Number.isNaN(Number(e)),vt=e=>!!e&&Number.isInteger(Number(e)),yt=e=>e.endsWith("%")&&bt(e.slice(0,-1)),wt=e=>mt.test(e),jt=()=>!0,kt=e=>ft.test(e)&&!pt.test(e),Ct=()=>!1,Nt=e=>ht.test(e),Rt=e=>gt.test(e),Et=e=>!Pt(e)&&!At(e),St=e=>Wt(e,Gt,Ct),Pt=e=>ct.test(e),Tt=e=>Wt(e,qt,kt),zt=e=>Wt(e,Kt,bt),Lt=e=>Wt(e,Ht,Ct),Dt=e=>Wt(e,Ut,Rt),Mt=e=>Wt(e,Xt,Nt),At=e=>dt.test(e),It=e=>Vt(e,qt),$t=e=>Vt(e,Yt),Ot=e=>Vt(e,Ht),_t=e=>Vt(e,Gt),Ft=e=>Vt(e,Ut),Bt=e=>Vt(e,Xt,!0),Wt=(e,t,r)=>{const n=ct.exec(e);return!!n&&(n[1]?t(n[1]):r(n[2]))},Vt=(e,t,r=!1)=>{const n=dt.exec(e);return!!n&&(n[1]?t(n[1]):r)},Ht=e=>"position"===e||"percentage"===e,Ut=e=>"image"===e||"url"===e,Gt=e=>"length"===e||"size"===e||"bg-size"===e,qt=e=>"length"===e,Kt=e=>"number"===e,Yt=e=>"family-name"===e,Xt=e=>"shadow"===e,Zt=it(()=>{const e=lt("color"),t=lt("font"),r=lt("text"),n=lt("font-weight"),o=lt("tracking"),a=lt("leading"),s=lt("breakpoint"),i=lt("container"),l=lt("spacing"),c=lt("radius"),d=lt("shadow"),u=lt("inset-shadow"),m=lt("text-shadow"),f=lt("drop-shadow"),p=lt("blur"),h=lt("perspective"),g=lt("aspect"),x=lt("ease"),b=lt("animate"),v=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",At,Pt],y=()=>[At,Pt,l],w=()=>[xt,"full","auto",...y()],j=()=>[vt,"none","subgrid",At,Pt],k=()=>["auto",{span:["full",vt,At,Pt]},vt,At,Pt],C=()=>[vt,"auto",At,Pt],N=()=>["auto","min","max","fr",At,Pt],R=()=>["auto",...y()],E=()=>[xt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...y()],S=()=>[e,At,Pt],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",Ot,Lt,{position:[At,Pt]}],T=()=>["auto","cover","contain",_t,St,{size:[At,Pt]}],z=()=>[yt,It,Tt],L=()=>["","none","full",c,At,Pt],D=()=>["",bt,It,Tt],M=()=>[bt,yt,Ot,Lt],A=()=>["","none",p,At,Pt],I=()=>["none",bt,At,Pt],$=()=>["none",bt,At,Pt],O=()=>[bt,At,Pt],_=()=>[xt,"full",...y()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[wt],breakpoint:[wt],color:[jt],container:[wt],"drop-shadow":[wt],ease:["in","out","in-out"],font:[Et],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[wt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[wt],shadow:[wt],spacing:["px",bt],text:[wt],"text-shadow":[wt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",xt,Pt,At,g]}],container:["container"],columns:[{columns:[bt,Pt,At,i]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:v()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:w()}],"inset-x":[{"inset-x":w()}],"inset-y":[{"inset-y":w()}],start:[{start:w()}],end:[{end:w()}],top:[{top:w()}],right:[{right:w()}],bottom:[{bottom:w()}],left:[{left:w()}],visibility:["visible","invisible","collapse"],z:[{z:[vt,"auto",At,Pt]}],basis:[{basis:[xt,"full","auto",i,...y()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[bt,xt,"auto","initial","none",Pt]}],grow:[{grow:["",bt,At,Pt]}],shrink:[{shrink:["",bt,At,Pt]}],order:[{order:[vt,"first","last","none",At,Pt]}],"grid-cols":[{"grid-cols":j()}],"col-start-end":[{col:k()}],"col-start":[{"col-start":C()}],"col-end":[{"col-end":C()}],"grid-rows":[{"grid-rows":j()}],"row-start-end":[{row:k()}],"row-start":[{"row-start":C()}],"row-end":[{"row-end":C()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":N()}],"auto-rows":[{"auto-rows":N()}],gap:[{gap:y()}],"gap-x":[{"gap-x":y()}],"gap-y":[{"gap-y":y()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:y()}],px:[{px:y()}],py:[{py:y()}],ps:[{ps:y()}],pe:[{pe:y()}],pt:[{pt:y()}],pr:[{pr:y()}],pb:[{pb:y()}],pl:[{pl:y()}],m:[{m:R()}],mx:[{mx:R()}],my:[{my:R()}],ms:[{ms:R()}],me:[{me:R()}],mt:[{mt:R()}],mr:[{mr:R()}],mb:[{mb:R()}],ml:[{ml:R()}],"space-x":[{"space-x":y()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":y()}],"space-y-reverse":["space-y-reverse"],size:[{size:E()}],w:[{w:[i,"screen",...E()]}],"min-w":[{"min-w":[i,"screen","none",...E()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[s]},...E()]}],h:[{h:["screen","lh",...E()]}],"min-h":[{"min-h":["screen","lh","none",...E()]}],"max-h":[{"max-h":["screen","lh",...E()]}],"font-size":[{text:["base",r,It,Tt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,At,zt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",yt,Pt]}],"font-family":[{font:[$t,Pt,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,At,Pt]}],"line-clamp":[{"line-clamp":[bt,"none",At,zt]}],leading:[{leading:[a,...y()]}],"list-image":[{"list-image":["none",At,Pt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",At,Pt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:S()}],"text-color":[{text:S()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[bt,"from-font","auto",At,Tt]}],"text-decoration-color":[{decoration:S()}],"underline-offset":[{"underline-offset":[bt,"auto",At,Pt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",At,Pt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",At,Pt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:P()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:T()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},vt,At,Pt],radial:["",At,Pt],conic:[vt,At,Pt]},Ft,Dt]}],"bg-color":[{bg:S()}],"gradient-from-pos":[{from:z()}],"gradient-via-pos":[{via:z()}],"gradient-to-pos":[{to:z()}],"gradient-from":[{from:S()}],"gradient-via":[{via:S()}],"gradient-to":[{to:S()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:D()}],"border-w-x":[{"border-x":D()}],"border-w-y":[{"border-y":D()}],"border-w-s":[{"border-s":D()}],"border-w-e":[{"border-e":D()}],"border-w-t":[{"border-t":D()}],"border-w-r":[{"border-r":D()}],"border-w-b":[{"border-b":D()}],"border-w-l":[{"border-l":D()}],"divide-x":[{"divide-x":D()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":D()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:S()}],"border-color-x":[{"border-x":S()}],"border-color-y":[{"border-y":S()}],"border-color-s":[{"border-s":S()}],"border-color-e":[{"border-e":S()}],"border-color-t":[{"border-t":S()}],"border-color-r":[{"border-r":S()}],"border-color-b":[{"border-b":S()}],"border-color-l":[{"border-l":S()}],"divide-color":[{divide:S()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[bt,At,Pt]}],"outline-w":[{outline:["",bt,It,Tt]}],"outline-color":[{outline:S()}],shadow:[{shadow:["","none",d,Bt,Mt]}],"shadow-color":[{shadow:S()}],"inset-shadow":[{"inset-shadow":["none",u,Bt,Mt]}],"inset-shadow-color":[{"inset-shadow":S()}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:S()}],"ring-offset-w":[{"ring-offset":[bt,Tt]}],"ring-offset-color":[{"ring-offset":S()}],"inset-ring-w":[{"inset-ring":D()}],"inset-ring-color":[{"inset-ring":S()}],"text-shadow":[{"text-shadow":["none",m,Bt,Mt]}],"text-shadow-color":[{"text-shadow":S()}],opacity:[{opacity:[bt,At,Pt]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[bt]}],"mask-image-linear-from-pos":[{"mask-linear-from":M()}],"mask-image-linear-to-pos":[{"mask-linear-to":M()}],"mask-image-linear-from-color":[{"mask-linear-from":S()}],"mask-image-linear-to-color":[{"mask-linear-to":S()}],"mask-image-t-from-pos":[{"mask-t-from":M()}],"mask-image-t-to-pos":[{"mask-t-to":M()}],"mask-image-t-from-color":[{"mask-t-from":S()}],"mask-image-t-to-color":[{"mask-t-to":S()}],"mask-image-r-from-pos":[{"mask-r-from":M()}],"mask-image-r-to-pos":[{"mask-r-to":M()}],"mask-image-r-from-color":[{"mask-r-from":S()}],"mask-image-r-to-color":[{"mask-r-to":S()}],"mask-image-b-from-pos":[{"mask-b-from":M()}],"mask-image-b-to-pos":[{"mask-b-to":M()}],"mask-image-b-from-color":[{"mask-b-from":S()}],"mask-image-b-to-color":[{"mask-b-to":S()}],"mask-image-l-from-pos":[{"mask-l-from":M()}],"mask-image-l-to-pos":[{"mask-l-to":M()}],"mask-image-l-from-color":[{"mask-l-from":S()}],"mask-image-l-to-color":[{"mask-l-to":S()}],"mask-image-x-from-pos":[{"mask-x-from":M()}],"mask-image-x-to-pos":[{"mask-x-to":M()}],"mask-image-x-from-color":[{"mask-x-from":S()}],"mask-image-x-to-color":[{"mask-x-to":S()}],"mask-image-y-from-pos":[{"mask-y-from":M()}],"mask-image-y-to-pos":[{"mask-y-to":M()}],"mask-image-y-from-color":[{"mask-y-from":S()}],"mask-image-y-to-color":[{"mask-y-to":S()}],"mask-image-radial":[{"mask-radial":[At,Pt]}],"mask-image-radial-from-pos":[{"mask-radial-from":M()}],"mask-image-radial-to-pos":[{"mask-radial-to":M()}],"mask-image-radial-from-color":[{"mask-radial-from":S()}],"mask-image-radial-to-color":[{"mask-radial-to":S()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[bt]}],"mask-image-conic-from-pos":[{"mask-conic-from":M()}],"mask-image-conic-to-pos":[{"mask-conic-to":M()}],"mask-image-conic-from-color":[{"mask-conic-from":S()}],"mask-image-conic-to-color":[{"mask-conic-to":S()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:T()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",At,Pt]}],filter:[{filter:["","none",At,Pt]}],blur:[{blur:A()}],brightness:[{brightness:[bt,At,Pt]}],contrast:[{contrast:[bt,At,Pt]}],"drop-shadow":[{"drop-shadow":["","none",f,Bt,Mt]}],"drop-shadow-color":[{"drop-shadow":S()}],grayscale:[{grayscale:["",bt,At,Pt]}],"hue-rotate":[{"hue-rotate":[bt,At,Pt]}],invert:[{invert:["",bt,At,Pt]}],saturate:[{saturate:[bt,At,Pt]}],sepia:[{sepia:["",bt,At,Pt]}],"backdrop-filter":[{"backdrop-filter":["","none",At,Pt]}],"backdrop-blur":[{"backdrop-blur":A()}],"backdrop-brightness":[{"backdrop-brightness":[bt,At,Pt]}],"backdrop-contrast":[{"backdrop-contrast":[bt,At,Pt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",bt,At,Pt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[bt,At,Pt]}],"backdrop-invert":[{"backdrop-invert":["",bt,At,Pt]}],"backdrop-opacity":[{"backdrop-opacity":[bt,At,Pt]}],"backdrop-saturate":[{"backdrop-saturate":[bt,At,Pt]}],"backdrop-sepia":[{"backdrop-sepia":["",bt,At,Pt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":y()}],"border-spacing-x":[{"border-spacing-x":y()}],"border-spacing-y":[{"border-spacing-y":y()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",At,Pt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[bt,"initial",At,Pt]}],ease:[{ease:["linear","initial",x,At,Pt]}],delay:[{delay:[bt,At,Pt]}],animate:[{animate:["none",b,At,Pt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,At,Pt]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:I()}],"rotate-x":[{"rotate-x":I()}],"rotate-y":[{"rotate-y":I()}],"rotate-z":[{"rotate-z":I()}],scale:[{scale:$()}],"scale-x":[{"scale-x":$()}],"scale-y":[{"scale-y":$()}],"scale-z":[{"scale-z":$()}],"scale-3d":["scale-3d"],skew:[{skew:O()}],"skew-x":[{"skew-x":O()}],"skew-y":[{"skew-y":O()}],transform:[{transform:[At,Pt,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:_()}],"translate-x":[{"translate-x":_()}],"translate-y":[{"translate-y":_()}],"translate-z":[{"translate-z":_()}],"translate-none":["translate-none"],accent:[{accent:S()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:S()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",At,Pt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":y()}],"scroll-mx":[{"scroll-mx":y()}],"scroll-my":[{"scroll-my":y()}],"scroll-ms":[{"scroll-ms":y()}],"scroll-me":[{"scroll-me":y()}],"scroll-mt":[{"scroll-mt":y()}],"scroll-mr":[{"scroll-mr":y()}],"scroll-mb":[{"scroll-mb":y()}],"scroll-ml":[{"scroll-ml":y()}],"scroll-p":[{"scroll-p":y()}],"scroll-px":[{"scroll-px":y()}],"scroll-py":[{"scroll-py":y()}],"scroll-ps":[{"scroll-ps":y()}],"scroll-pe":[{"scroll-pe":y()}],"scroll-pt":[{"scroll-pt":y()}],"scroll-pr":[{"scroll-pr":y()}],"scroll-pb":[{"scroll-pb":y()}],"scroll-pl":[{"scroll-pl":y()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",At,Pt]}],fill:[{fill:["none",...S()]}],"stroke-w":[{stroke:[bt,It,Tt,zt]}],stroke:[{stroke:["none",...S()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function Jt(...e){return Zt(Ue(e))}function Qt({type:r="single",collapsible:n=!1,className:o,children:a,...s}){const[i,l]=t.useState("multiple"===r?[]:"");return"multiple"===r?e.jsx(be,{type:"multiple",className:o,value:i,onValueChange:e=>l(e),"data-slot":"accordion",...s,children:t.Children.map(a,e=>t.isValidElement(e)?t.cloneElement(e,{openValue:i}):e)}):e.jsx(be,{type:"single",collapsible:n,className:o,value:i,onValueChange:e=>l(e),"data-slot":"accordion",...s,children:t.Children.map(a,e=>t.isValidElement(e)?t.cloneElement(e,{...e.props??{},openValue:i}):e)})}function er({className:r,openValue:n,value:o,children:a,...s}){return e.jsx(ve,{"data-slot":"accordion-item",className:Jt("border-b last:border-b-0",r),value:o,...s,children:t.Children.map(a,e=>t.isValidElement(e)?t.cloneElement(e,{itemValue:o,openValue:n}):e)})}function tr({className:t,children:r,iconOpen:n=ze,iconClosed:o=Se,itemValue:a,openValue:s,...i}){const l=Array.isArray(s)&&a?s.includes(a):s===a;return e.jsx(ye,{className:"flex w-full",children:e.jsxs(we,{"data-slot":"accordion-trigger",className:Jt("focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50",t,l?"rounded-t-md":"rounded-md"),...i,children:[r,l?e.jsx(n,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200"}):e.jsx(o,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200"})]})})}function rr({className:t,children:r,...n}){return e.jsx(je,{"data-slot":"accordion-content",className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",...n,children:e.jsx("div",{className:Jt("pt-0 pb-4",t),children:r})})}const nr={xs:"w-6 h-6",sm:"w-8 h-8 ",md:"w-10 h-10 ",lg:"w-12 h-12 ",xl:"w-14 h-14 ","2xl":"w-16 h-16 "},or={xs:"w-1.5 h-1.5",sm:"w-2 h-2 ",md:"w-2.5 h-2.5 ",lg:"w-3 h-3 ",xl:"w-3.5 h-3.5 ","2xl":"w-4 h-4 "},ar={xs:"w-2.5 h-2.5",sm:"w-3 h-3",md:"w-3.5 h-3.5",lg:"w-4 h-4",xl:"w-4.5 h-4.5 ","2xl":"w-5 h-5 "},sr={xs:"gap-2",sm:"gap-2.5",md:"gap-3",lg:"gap-3.5",xl:"gap-4","2xl":"gap-4.5"},ir={xs:"text-sm",sm:"text-sm",md:"text-sm",lg:"text-md",xl:"text-lg","2xl":"text-lg"},lr=({title:t,description:r,size:n})=>e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:Jt("text-rtext-secondary-700 font-semibold",ir[n]),children:t}),e.jsx("span",{className:Jt("font-normal text-rtext-tertiary-600",ir[n]),children:r})]});function cr(e){const t=o.useRef(e);return o.useEffect(()=>{t.current=e}),o.useMemo(()=>(...e)=>t.current?.(...e),[])}var dr,ur="dismissableLayer.update",mr="dismissableLayer.pointerDownOutside",fr="dismissableLayer.focusOutside",pr=o.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),hr=o.forwardRef((t,r)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:l,onDismiss:c,...u}=t,m=o.useContext(pr),[f,p]=o.useState(null),h=f?.ownerDocument??globalThis?.document,[,g]=o.useState({}),b=d(r,e=>p(e)),v=Array.from(m.layers),[y]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),j=v.indexOf(y),k=f?v.indexOf(f):-1,C=m.layersWithOutsidePointerEventsDisabled.size>0,N=k>=j,R=function(e,t=globalThis?.document){const r=cr(e),n=o.useRef(!1),a=o.useRef(()=>{});return o.useEffect(()=>{const e=e=>{if(e.target&&!n.current){let n=function(){xr(mr,r,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",a.current),a.current=n,t.addEventListener("click",a.current,{once:!0})):n()}else t.removeEventListener("click",a.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",a.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}(e=>{const t=e.target,r=[...m.branches].some(e=>e.contains(t));N&&!r&&(s?.(e),l?.(e),e.defaultPrevented||c?.())},h),E=function(e,t=globalThis?.document){const r=cr(e),n=o.useRef(!1);return o.useEffect(()=>{const e=e=>{if(e.target&&!n.current){xr(fr,r,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}(e=>{const t=e.target;[...m.branches].some(e=>e.contains(t))||(i?.(e),l?.(e),e.defaultPrevented||c?.())},h);return function(e,t=globalThis?.document){const r=cr(e);o.useEffect(()=>{const e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[r,t])}(e=>{k===m.layers.size-1&&(a?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))},h),o.useEffect(()=>{if(f)return n&&(0===m.layersWithOutsidePointerEventsDisabled.size&&(dr=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(f)),m.layers.add(f),gr(),()=>{n&&1===m.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=dr)}},[f,h,n,m]),o.useEffect(()=>()=>{f&&(m.layers.delete(f),m.layersWithOutsidePointerEventsDisabled.delete(f),gr())},[f,m]),o.useEffect(()=>{const e=()=>g({});return document.addEventListener(ur,e),()=>document.removeEventListener(ur,e)},[]),e.jsx(w.div,{...u,ref:b,style:{pointerEvents:C?N?"auto":"none":void 0,...t.style},onFocusCapture:x(t.onFocusCapture,E.onFocusCapture),onBlurCapture:x(t.onBlurCapture,E.onBlurCapture),onPointerDownCapture:x(t.onPointerDownCapture,R.onPointerDownCapture)})});hr.displayName="DismissableLayer";function gr(){const e=new CustomEvent(ur);document.dispatchEvent(e)}function xr(e,t,r,{discrete:n}){const o=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?function(e,t){e&&a.flushSync(()=>e.dispatchEvent(t))}(o,s):o.dispatchEvent(s)}o.forwardRef((t,r)=>{const n=o.useContext(pr),a=o.useRef(null),s=d(r,a);return o.useEffect(()=>{const e=a.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),e.jsx(w.div,{...t,ref:s})}).displayName="DismissableLayerBranch";const br=["top","right","bottom","left"],vr=Math.min,yr=Math.max,wr=Math.round,jr=Math.floor,kr=e=>({x:e,y:e}),Cr={left:"right",right:"left",bottom:"top",top:"bottom"},Nr={start:"end",end:"start"};function Rr(e,t,r){return yr(e,vr(t,r))}function Er(e,t){return"function"==typeof e?e(t):e}function Sr(e){return e.split("-")[0]}function Pr(e){return e.split("-")[1]}function Tr(e){return"x"===e?"y":"x"}function zr(e){return"y"===e?"height":"width"}const Lr=new Set(["top","bottom"]);function Dr(e){return Lr.has(Sr(e))?"y":"x"}function Mr(e){return Tr(Dr(e))}function Ar(e){return e.replace(/start|end/g,e=>Nr[e])}const Ir=["left","right"],$r=["right","left"],Or=["top","bottom"],_r=["bottom","top"];function Fr(e,t,r,n){const o=Pr(e);let a=function(e,t,r){switch(e){case"top":case"bottom":return r?t?$r:Ir:t?Ir:$r;case"left":case"right":return t?Or:_r;default:return[]}}(Sr(e),"start"===r,n);return o&&(a=a.map(e=>e+"-"+o),t&&(a=a.concat(a.map(Ar)))),a}function Br(e){return e.replace(/left|right|bottom|top/g,e=>Cr[e])}function Wr(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Vr(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function Hr(e,t,r){let{reference:n,floating:o}=e;const a=Dr(t),s=Mr(t),i=zr(s),l=Sr(t),c="y"===a,d=n.x+n.width/2-o.width/2,u=n.y+n.height/2-o.height/2,m=n[i]/2-o[i]/2;let f;switch(l){case"top":f={x:d,y:n.y-o.height};break;case"bottom":f={x:d,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:u};break;case"left":f={x:n.x-o.width,y:u};break;default:f={x:n.x,y:n.y}}switch(Pr(t)){case"start":f[s]-=m*(r&&c?-1:1);break;case"end":f[s]+=m*(r&&c?-1:1)}return f}async function Ur(e,t){var r;void 0===t&&(t={});const{x:n,y:o,platform:a,rects:s,elements:i,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:f=0}=Er(t,e),p=Wr(f),h=i[m?"floating"===u?"reference":"floating":u],g=Vr(await a.getClippingRect({element:null==(r=await(null==a.isElement?void 0:a.isElement(h)))||r?h:h.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(i.floating)),boundary:c,rootBoundary:d,strategy:l})),x="floating"===u?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,b=await(null==a.getOffsetParent?void 0:a.getOffsetParent(i.floating)),v=await(null==a.isElement?void 0:a.isElement(b))&&await(null==a.getScale?void 0:a.getScale(b))||{x:1,y:1},y=Vr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:x,offsetParent:b,strategy:l}):x);return{top:(g.top-y.top+p.top)/v.y,bottom:(y.bottom-g.bottom+p.bottom)/v.y,left:(g.left-y.left+p.left)/v.x,right:(y.right-g.right+p.right)/v.x}}function Gr(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function qr(e){return br.some(t=>e[t]>=0)}const Kr=new Set(["left","top"]);function Yr(){return"undefined"!=typeof window}function Xr(e){return Qr(e)?(e.nodeName||"").toLowerCase():"#document"}function Zr(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Jr(e){var t;return null==(t=(Qr(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Qr(e){return!!Yr()&&(e instanceof Node||e instanceof Zr(e).Node)}function en(e){return!!Yr()&&(e instanceof Element||e instanceof Zr(e).Element)}function tn(e){return!!Yr()&&(e instanceof HTMLElement||e instanceof Zr(e).HTMLElement)}function rn(e){return!(!Yr()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Zr(e).ShadowRoot)}const nn=new Set(["inline","contents"]);function on(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=xn(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!nn.has(o)}const an=new Set(["table","td","th"]);function sn(e){return an.has(Xr(e))}const ln=[":popover-open",":modal"];function cn(e){return ln.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const dn=["transform","translate","scale","rotate","perspective"],un=["transform","translate","scale","rotate","perspective","filter"],mn=["paint","layout","strict","content"];function fn(e){const t=pn(),r=en(e)?xn(e):e;return dn.some(e=>!!r[e]&&"none"!==r[e])||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||un.some(e=>(r.willChange||"").includes(e))||mn.some(e=>(r.contain||"").includes(e))}function pn(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const hn=new Set(["html","body","#document"]);function gn(e){return hn.has(Xr(e))}function xn(e){return Zr(e).getComputedStyle(e)}function bn(e){return en(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function vn(e){if("html"===Xr(e))return e;const t=e.assignedSlot||e.parentNode||rn(e)&&e.host||Jr(e);return rn(t)?t.host:t}function yn(e){const t=vn(e);return gn(t)?e.ownerDocument?e.ownerDocument.body:e.body:tn(t)&&on(t)?t:yn(t)}function wn(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);const o=yn(e),a=o===(null==(n=e.ownerDocument)?void 0:n.body),s=Zr(o);if(a){const e=jn(s);return t.concat(s,s.visualViewport||[],on(o)?o:[],e&&r?wn(e):[])}return t.concat(o,wn(o,[],r))}function jn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function kn(e){const t=xn(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=tn(e),a=o?e.offsetWidth:r,s=o?e.offsetHeight:n,i=wr(r)!==a||wr(n)!==s;return i&&(r=a,n=s),{width:r,height:n,$:i}}function Cn(e){return en(e)?e:e.contextElement}function Nn(e){const t=Cn(e);if(!tn(t))return kr(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:a}=kn(t);let s=(a?wr(r.width):r.width)/n,i=(a?wr(r.height):r.height)/o;return s&&Number.isFinite(s)||(s=1),i&&Number.isFinite(i)||(i=1),{x:s,y:i}}const Rn=kr(0);function En(e){const t=Zr(e);return pn()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Rn}function Sn(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);const o=e.getBoundingClientRect(),a=Cn(e);let s=kr(1);t&&(n?en(n)&&(s=Nn(n)):s=Nn(e));const i=function(e,t,r){return void 0===t&&(t=!1),!(!r||t&&r!==Zr(e))&&t}(a,r,n)?En(a):kr(0);let l=(o.left+i.x)/s.x,c=(o.top+i.y)/s.y,d=o.width/s.x,u=o.height/s.y;if(a){const e=Zr(a),t=n&&en(n)?Zr(n):n;let r=e,o=jn(r);for(;o&&n&&t!==r;){const e=Nn(o),t=o.getBoundingClientRect(),n=xn(o),a=t.left+(o.clientLeft+parseFloat(n.paddingLeft))*e.x,s=t.top+(o.clientTop+parseFloat(n.paddingTop))*e.y;l*=e.x,c*=e.y,d*=e.x,u*=e.y,l+=a,c+=s,r=Zr(o),o=jn(r)}}return Vr({width:d,height:u,x:l,y:c})}function Pn(e,t){const r=bn(e).scrollLeft;return t?t.left+r:Sn(Jr(e)).left+r}function Tn(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-Pn(e,r),y:r.top+t.scrollTop}}const zn=new Set(["absolute","fixed"]);function Ln(e,t,r){let n;if("viewport"===t)n=function(e,t){const r=Zr(e),n=Jr(e),o=r.visualViewport;let a=n.clientWidth,s=n.clientHeight,i=0,l=0;if(o){a=o.width,s=o.height;const e=pn();(!e||e&&"fixed"===t)&&(i=o.offsetLeft,l=o.offsetTop)}const c=Pn(n);if(c<=0){const e=n.ownerDocument,t=e.body,r=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(r.marginLeft)+parseFloat(r.marginRight)||0,s=Math.abs(n.clientWidth-t.clientWidth-o);s<=25&&(a-=s)}else c<=25&&(a+=c);return{width:a,height:s,x:i,y:l}}(e,r);else if("document"===t)n=function(e){const t=Jr(e),r=bn(e),n=e.ownerDocument.body,o=yr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=yr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+Pn(e);const i=-r.scrollTop;return"rtl"===xn(n).direction&&(s+=yr(t.clientWidth,n.clientWidth)-o),{width:o,height:a,x:s,y:i}}(Jr(e));else if(en(t))n=function(e,t){const r=Sn(e,!0,"fixed"===t),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=tn(e)?Nn(e):kr(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:o*a.x,y:n*a.y}}(t,r);else{const r=En(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Vr(n)}function Dn(e,t){const r=vn(e);return!(r===t||!en(r)||gn(r))&&("fixed"===xn(r).position||Dn(r,t))}function Mn(e,t,r){const n=tn(t),o=Jr(t),a="fixed"===r,s=Sn(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const l=kr(0);function c(){l.x=Pn(o)}if(n||!n&&!a)if(("body"!==Xr(t)||on(o))&&(i=bn(t)),n){const e=Sn(t,!0,a,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();a&&!n&&o&&c();const d=!o||n||a?kr(0):Tn(o,i);return{x:s.left+i.scrollLeft-l.x-d.x,y:s.top+i.scrollTop-l.y-d.y,width:s.width,height:s.height}}function An(e){return"static"===xn(e).position}function In(e,t){if(!tn(e)||"fixed"===xn(e).position)return null;if(t)return t(e);let r=e.offsetParent;return Jr(e)===r&&(r=r.ownerDocument.body),r}function $n(e,t){const r=Zr(e);if(cn(e))return r;if(!tn(e)){let t=vn(e);for(;t&&!gn(t);){if(en(t)&&!An(t))return t;t=vn(t)}return r}let n=In(e,t);for(;n&&sn(n)&&An(n);)n=In(n,t);return n&&gn(n)&&An(n)&&!fn(n)?r:n||function(e){let t=vn(e);for(;tn(t)&&!gn(t);){if(fn(t))return t;if(cn(t))return null;t=vn(t)}return null}(e)||r}const On={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const a="fixed"===o,s=Jr(n),i=!!t&&cn(t.floating);if(n===s||i&&a)return r;let l={scrollLeft:0,scrollTop:0},c=kr(1);const d=kr(0),u=tn(n);if((u||!u&&!a)&&(("body"!==Xr(n)||on(s))&&(l=bn(n)),tn(n))){const e=Sn(n);c=Nn(n),d.x=e.x+n.clientLeft,d.y=e.y+n.clientTop}const m=!s||u||a?kr(0):Tn(s,l);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+d.x+m.x,y:r.y*c.y-l.scrollTop*c.y+d.y+m.y}},getDocumentElement:Jr,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const a=[..."clippingAncestors"===r?cn(t)?[]:function(e,t){const r=t.get(e);if(r)return r;let n=wn(e,[],!1).filter(e=>en(e)&&"body"!==Xr(e)),o=null;const a="fixed"===xn(e).position;let s=a?vn(e):e;for(;en(s)&&!gn(s);){const t=xn(s),r=fn(s);r||"fixed"!==t.position||(o=null),(a?!r&&!o:!r&&"static"===t.position&&o&&zn.has(o.position)||on(s)&&!r&&Dn(e,s))?n=n.filter(e=>e!==s):o=t,s=vn(s)}return t.set(e,n),n}(t,this._c):[].concat(r),n],s=a[0],i=a.reduce((e,r)=>{const n=Ln(t,r,o);return e.top=yr(n.top,e.top),e.right=vr(n.right,e.right),e.bottom=vr(n.bottom,e.bottom),e.left=yr(n.left,e.left),e},Ln(t,s,o));return{width:i.right-i.left,height:i.bottom-i.top,x:i.left,y:i.top}},getOffsetParent:$n,getElementRects:async function(e){const t=this.getOffsetParent||$n,r=this.getDimensions,n=await r(e.floating);return{reference:Mn(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:r}=kn(e);return{width:t,height:r}},getScale:Nn,isElement:en,isRTL:function(e){return"rtl"===xn(e).direction}};function _n(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Fn(e,t,r,n){void 0===n&&(n={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:i="function"==typeof IntersectionObserver,animationFrame:l=!1}=n,c=Cn(e),d=o||a?[...c?wn(c):[],...wn(t)]:[];d.forEach(e=>{o&&e.addEventListener("scroll",r,{passive:!0}),a&&e.addEventListener("resize",r)});const u=c&&i?function(e,t){let r,n=null;const o=Jr(e);function a(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return function s(i,l){void 0===i&&(i=!1),void 0===l&&(l=1),a();const c=e.getBoundingClientRect(),{left:d,top:u,width:m,height:f}=c;if(i||t(),!m||!f)return;const p={rootMargin:-jr(u)+"px "+-jr(o.clientWidth-(d+m))+"px "+-jr(o.clientHeight-(u+f))+"px "+-jr(d)+"px",threshold:yr(0,vr(1,l))||1};let h=!0;function g(t){const n=t[0].intersectionRatio;if(n!==l){if(!h)return s();n?s(!1,n):r=setTimeout(()=>{s(!1,1e-7)},1e3)}1!==n||_n(c,e.getBoundingClientRect())||s(),h=!1}try{n=new IntersectionObserver(g,{...p,root:o.ownerDocument})}catch(e){n=new IntersectionObserver(g,p)}n.observe(e)}(!0),a}(c,r):null;let m,f=-1,p=null;s&&(p=new ResizeObserver(e=>{let[n]=e;n&&n.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;null==(e=p)||e.observe(t)})),r()}),c&&!l&&p.observe(c),p.observe(t));let h=l?Sn(e):null;return l&&function t(){const n=Sn(e);h&&!_n(h,n)&&r();h=n,m=requestAnimationFrame(t)}(),r(),()=>{var e;d.forEach(e=>{o&&e.removeEventListener("scroll",r),a&&e.removeEventListener("resize",r)}),null==u||u(),null==(e=p)||e.disconnect(),p=null,l&&cancelAnimationFrame(m)}}const Bn=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:a,placement:s,middlewareData:i}=t,l=await async function(e,t){const{placement:r,platform:n,elements:o}=e,a=await(null==n.isRTL?void 0:n.isRTL(o.floating)),s=Sr(r),i=Pr(r),l="y"===Dr(r),c=Kr.has(s)?-1:1,d=a&&l?-1:1,u=Er(t,e);let{mainAxis:m,crossAxis:f,alignmentAxis:p}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return i&&"number"==typeof p&&(f="end"===i?-1*p:p),l?{x:f*d,y:m*c}:{x:m*c,y:f*d}}(t,e);return s===(null==(r=i.offset)?void 0:r.placement)&&null!=(n=i.arrow)&&n.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:s}}}}},Wn=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:i={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...l}=Er(e,t),c={x:r,y:n},d=await Ur(t,l),u=Dr(Sr(o)),m=Tr(u);let f=c[m],p=c[u];if(a){const e="y"===m?"bottom":"right";f=Rr(f+d["y"===m?"top":"left"],f,f-d[e])}if(s){const e="y"===u?"bottom":"right";p=Rr(p+d["y"===u?"top":"left"],p,p-d[e])}const h=i.fn({...t,[m]:f,[u]:p});return{...h,data:{x:h.x-r,y:h.y-n,enabled:{[m]:a,[u]:s}}}}}},Vn=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:a,rects:s,initialPlacement:i,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:h=!0,...g}=Er(e,t);if(null!=(r=a.arrow)&&r.alignmentOffset)return{};const x=Sr(o),b=Dr(i),v=Sr(i)===i,y=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=m||(v||!h?[Br(i)]:function(e){const t=Br(e);return[Ar(e),t,Ar(t)]}(i)),j="none"!==p;!m&&j&&w.push(...Fr(i,h,p,y));const k=[i,...w],C=await Ur(t,g),N=[];let R=(null==(n=a.flip)?void 0:n.overflows)||[];if(d&&N.push(C[x]),u){const e=function(e,t,r){void 0===r&&(r=!1);const n=Pr(e),o=Mr(e),a=zr(o);let s="x"===o?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Br(s)),[s,Br(s)]}(o,s,y);N.push(C[e[0]],C[e[1]])}if(R=[...R,{placement:o,overflows:N}],!N.every(e=>e<=0)){var E,S;const e=((null==(E=a.flip)?void 0:E.index)||0)+1,t=k[e];if(t){if(!("alignment"===u&&b!==Dr(t))||R.every(e=>Dr(e.placement)!==b||e.overflows[0]>0))return{data:{index:e,overflows:R},reset:{placement:t}}}let r=null==(S=R.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:S.placement;if(!r)switch(f){case"bestFit":{var P;const e=null==(P=R.filter(e=>{if(j){const t=Dr(e.placement);return t===b||"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:P[0];e&&(r=e);break}case"initialPlacement":r=i}if(o!==r)return{reset:{placement:r}}}return{}}}},Hn=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:a,platform:s,elements:i}=t,{apply:l=()=>{},...c}=Er(e,t),d=await Ur(t,c),u=Sr(o),m=Pr(o),f="y"===Dr(o),{width:p,height:h}=a.floating;let g,x;"top"===u||"bottom"===u?(g=u,x=m===(await(null==s.isRTL?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(x=u,g="end"===m?"top":"bottom");const b=h-d.top-d.bottom,v=p-d.left-d.right,y=vr(h-d[g],b),w=vr(p-d[x],v),j=!t.middlewareData.shift;let k=y,C=w;if(null!=(r=t.middlewareData.shift)&&r.enabled.x&&(C=v),null!=(n=t.middlewareData.shift)&&n.enabled.y&&(k=b),j&&!m){const e=yr(d.left,0),t=yr(d.right,0),r=yr(d.top,0),n=yr(d.bottom,0);f?C=p-2*(0!==e||0!==t?e+t:yr(d.left,d.right)):k=h-2*(0!==r||0!==n?r+n:yr(d.top,d.bottom))}await l({...t,availableWidth:C,availableHeight:k});const N=await s.getDimensions(i.floating);return p!==N.width||h!==N.height?{reset:{rects:!0}}:{}}}},Un=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=Er(e,t);switch(n){case"referenceHidden":{const e=Gr(await Ur(t,{...o,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:qr(e)}}}case"escaped":{const e=Gr(await Ur(t,{...o,altBoundary:!0}),r.floating);return{data:{escapedOffsets:e,escaped:qr(e)}}}default:return{}}}}},Gn=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:a,platform:s,elements:i,middlewareData:l}=t,{element:c,padding:d=0}=Er(e,t)||{};if(null==c)return{};const u=Wr(d),m={x:r,y:n},f=Mr(o),p=zr(f),h=await s.getDimensions(c),g="y"===f,x=g?"top":"left",b=g?"bottom":"right",v=g?"clientHeight":"clientWidth",y=a.reference[p]+a.reference[f]-m[f]-a.floating[p],w=m[f]-a.reference[f],j=await(null==s.getOffsetParent?void 0:s.getOffsetParent(c));let k=j?j[v]:0;k&&await(null==s.isElement?void 0:s.isElement(j))||(k=i.floating[v]||a.floating[p]);const C=y/2-w/2,N=k/2-h[p]/2-1,R=vr(u[x],N),E=vr(u[b],N),S=R,P=k-h[p]-E,T=k/2-h[p]/2+C,z=Rr(S,T,P),L=!l.arrow&&null!=Pr(o)&&T!==z&&a.reference[p]/2-(T<S?R:E)-h[p]/2<0,D=L?T<S?T-S:T-P:0;return{[f]:m[f]+D,data:{[f]:z,centerOffset:T-z-D,...L&&{alignmentOffset:D}},reset:L}}}),qn=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:l=!0,crossAxis:c=!0}=Er(e,t),d={x:r,y:n},u=Dr(o),m=Tr(u);let f=d[m],p=d[u];const h=Er(i,t),g="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const e="y"===m?"height":"width",t=a.reference[m]-a.floating[e]+g.mainAxis,r=a.reference[m]+a.reference[e]-g.mainAxis;f<t?f=t:f>r&&(f=r)}if(c){var x,b;const e="y"===m?"width":"height",t=Kr.has(Sr(o)),r=a.reference[u]-a.floating[e]+(t&&(null==(x=s.offset)?void 0:x[u])||0)+(t?0:g.crossAxis),n=a.reference[u]+a.reference[e]+(t?0:(null==(b=s.offset)?void 0:b[u])||0)-(t?g.crossAxis:0);p<r?p=r:p>n&&(p=n)}return{[m]:f,[u]:p}}}},Kn=(e,t,r)=>{const n=new Map,o={platform:On,...r},a={...o.platform,_c:n};return(async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:s}=r,i=a.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=Hr(c,n,l),m=n,f={},p=0;for(let r=0;r<i.length;r++){const{name:a,fn:h}=i[r],{x:g,y:x,data:b,reset:v}=await h({x:d,y:u,initialPlacement:n,placement:m,strategy:o,middlewareData:f,rects:c,platform:s,elements:{reference:e,floating:t}});d=null!=g?g:d,u=null!=x?x:u,f={...f,[a]:{...f[a],...b}},v&&p<=50&&(p++,"object"==typeof v&&(v.placement&&(m=v.placement),v.rects&&(c=!0===v.rects?await s.getElementRects({reference:e,floating:t,strategy:o}):v.rects),({x:d,y:u}=Hr(c,m,l))),r=-1)}return{x:d,y:u,placement:m,strategy:o,middlewareData:f}})(e,t,{...o,platform:a})};var Yn="undefined"!=typeof document?t.useLayoutEffect:function(){};function Xn(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 r,n,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;0!==n--;)if(!Xn(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;0!==n--;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;0!==n--;){const r=o[n];if(("_owner"!==r||!e.$$typeof)&&!Xn(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function Zn(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Jn(e,t){const r=Zn(e);return Math.round(t*r)/r}function Qn(e){const t=o.useRef(e);return Yn(()=>{t.current=e}),t}const eo=e=>({name:"arrow",options:e,fn(t){const{element:r,padding:n}="function"==typeof e?e(t):e;return r&&(o=r,{}.hasOwnProperty.call(o,"current"))?null!=r.current?Gn({element:r.current,padding:n}).fn(t):{}:r?Gn({element:r,padding:n}).fn(t):{};var o}}),to=(e,t)=>({...Wn(e),options:[e,t]}),ro=(e,t)=>({...qn(e),options:[e,t]}),no=(e,t)=>({...Vn(e),options:[e,t]}),oo=(e,t)=>({...Hn(e),options:[e,t]}),ao=(e,t)=>({...Un(e),options:[e,t]}),so=(e,t)=>({...eo(e),options:[e,t]});var io=o.forwardRef((t,r)=>{const{children:n,width:o=10,height:a=5,...s}=t;return e.jsx(w.svg,{...s,ref:r,width:o,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:e.jsx("polygon",{points:"0,0 30,0 15,10"})})});io.displayName="Arrow";var lo=io;function co(e){const[t,r]=o.useState(void 0);return b(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t))return;if(!t.length)return;const n=t[0];let o,a;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,a=t.blockSize}else o=e.offsetWidth,a=e.offsetHeight;r({width:o,height:a})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)},[e]),t}var uo="Popper",[mo,fo]=s(uo),[po,ho]=mo(uo),go=t=>{const{__scopePopper:r,children:n}=t,[a,s]=o.useState(null);return e.jsx(po,{scope:r,anchor:a,onAnchorChange:s,children:n})};go.displayName=uo;var xo="PopperAnchor",bo=o.forwardRef((t,r)=>{const{__scopePopper:n,virtualRef:a,...s}=t,i=ho(xo,n),l=o.useRef(null),c=d(r,l),u=o.useRef(null);return o.useEffect(()=>{const e=u.current;u.current=a?.current||l.current,e!==u.current&&i.onAnchorChange(u.current)}),a?null:e.jsx(w.div,{...s,ref:c})});bo.displayName=xo;var vo="PopperContent",[yo,wo]=mo(vo),jo=o.forwardRef((t,r)=>{const{__scopePopper:n,side:s="bottom",sideOffset:i=0,align:l="center",alignOffset:c=0,arrowPadding:u=0,avoidCollisions:m=!0,collisionBoundary:f=[],collisionPadding:p=0,sticky:h="partial",hideWhenDetached:g=!1,updatePositionStrategy:x="optimized",onPlaced:v,...y}=t,j=ho(vo,n),[k,C]=o.useState(null),N=d(r,e=>C(e)),[R,E]=o.useState(null),S=co(R),P=S?.width??0,T=S?.height??0,z=s+("center"!==l?"-"+l:""),L="number"==typeof p?p:{top:0,right:0,bottom:0,left:0,...p},D=Array.isArray(f)?f:[f],M=D.length>0,A={padding:L,boundary:D.filter(Ro),altBoundary:M},{refs:I,floatingStyles:$,placement:O,isPositioned:_,middlewareData:F}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:l}={},transform:c=!0,whileElementsMounted:d,open:u}=e,[m,f]=o.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=o.useState(n);Xn(p,n)||h(n);const[g,x]=o.useState(null),[b,v]=o.useState(null),y=o.useCallback(e=>{e!==C.current&&(C.current=e,x(e))},[]),w=o.useCallback(e=>{e!==N.current&&(N.current=e,v(e))},[]),j=i||g,k=l||b,C=o.useRef(null),N=o.useRef(null),R=o.useRef(m),E=null!=d,S=Qn(d),P=Qn(s),T=Qn(u),z=o.useCallback(()=>{if(!C.current||!N.current)return;const e={placement:t,strategy:r,middleware:p};P.current&&(e.platform=P.current),Kn(C.current,N.current,e).then(e=>{const t={...e,isPositioned:!1!==T.current};L.current&&!Xn(R.current,t)&&(R.current=t,a.flushSync(()=>{f(t)}))})},[p,t,r,P,T]);Yn(()=>{!1===u&&R.current.isPositioned&&(R.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[u]);const L=o.useRef(!1);Yn(()=>(L.current=!0,()=>{L.current=!1}),[]),Yn(()=>{if(j&&(C.current=j),k&&(N.current=k),j&&k){if(S.current)return S.current(j,k,z);z()}},[j,k,z,S,E]);const D=o.useMemo(()=>({reference:C,floating:N,setReference:y,setFloating:w}),[y,w]),M=o.useMemo(()=>({reference:j,floating:k}),[j,k]),A=o.useMemo(()=>{const e={position:r,left:0,top:0};if(!M.floating)return e;const t=Jn(M.floating,m.x),n=Jn(M.floating,m.y);return c?{...e,transform:"translate("+t+"px, "+n+"px)",...Zn(M.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,c,M.floating,m.x,m.y]);return o.useMemo(()=>({...m,update:z,refs:D,elements:M,floatingStyles:A}),[m,z,D,M,A])}({strategy:"fixed",placement:z,whileElementsMounted:(...e)=>Fn(...e,{animationFrame:"always"===x}),elements:{reference:j.anchor},middleware:[(B={mainAxis:i+T,alignmentAxis:c},{...Bn(B),options:[B,W]}),m&&to({mainAxis:!0,crossAxis:!1,limiter:"partial"===h?ro():void 0,...A}),m&&no({...A}),oo({...A,apply:({elements:e,rects:t,availableWidth:r,availableHeight:n})=>{const{width:o,height:a}=t.reference,s=e.floating.style;s.setProperty("--radix-popper-available-width",`${r}px`),s.setProperty("--radix-popper-available-height",`${n}px`),s.setProperty("--radix-popper-anchor-width",`${o}px`),s.setProperty("--radix-popper-anchor-height",`${a}px`)}}),R&&so({element:R,padding:u}),Eo({arrowWidth:P,arrowHeight:T}),g&&ao({strategy:"referenceHidden",...A})]});var B,W;const[V,H]=So(O),U=cr(v);b(()=>{_&&U?.()},[_,U]);const G=F.arrow?.x,q=F.arrow?.y,K=0!==F.arrow?.centerOffset,[Y,X]=o.useState();return b(()=>{k&&X(window.getComputedStyle(k).zIndex)},[k]),e.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:_?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Y,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(" "),...F.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:e.jsx(yo,{scope:n,placedSide:V,onArrowChange:E,arrowX:G,arrowY:q,shouldHideArrow:K,children:e.jsx(w.div,{"data-side":V,"data-align":H,...y,ref:N,style:{...y.style,animation:_?void 0:"none"}})})})});jo.displayName=vo;var ko="PopperArrow",Co={top:"bottom",right:"left",bottom:"top",left:"right"},No=o.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,a=wo(ko,n),s=Co[a.placedSide];return e.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:e.jsx(lo,{...o,ref:r,style:{...o.style,display:"block"}})})});function Ro(e){return null!==e}No.displayName=ko;var Eo=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:o}=t,a=0!==o.arrow?.centerOffset,s=a?0:e.arrowWidth,i=a?0:e.arrowHeight,[l,c]=So(r),d={start:"0%",center:"50%",end:"100%"}[c],u=(o.arrow?.x??0)+s/2,m=(o.arrow?.y??0)+i/2;let f="",p="";return"bottom"===l?(f=a?d:`${u}px`,p=-i+"px"):"top"===l?(f=a?d:`${u}px`,p=`${n.floating.height+i}px`):"right"===l?(f=-i+"px",p=a?d:`${m}px`):"left"===l&&(f=`${n.floating.width+i}px`,p=a?d:`${m}px`),{data:{x:f,y:p}}}});function So(e){const[t,r="center"]=e.split("-");return[t,r]}var Po=go,To=bo,zo=jo,Lo=No,Do=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Mo=o.forwardRef((t,r)=>e.jsx(w.span,{...t,ref:r,style:{...Do,...t.style}}));Mo.displayName="VisuallyHidden";var Ao=Mo,[Io]=s("Tooltip",[fo]),$o=fo(),Oo="TooltipProvider",_o=700,Fo="tooltip.open",[Bo,Wo]=Io(Oo),Vo=t=>{const{__scopeTooltip:r,delayDuration:n=_o,skipDelayDuration:a=300,disableHoverableContent:s=!1,children:i}=t,l=o.useRef(!0),c=o.useRef(!1),d=o.useRef(0);return o.useEffect(()=>{const e=d.current;return()=>window.clearTimeout(e)},[]),e.jsx(Bo,{scope:r,isOpenDelayedRef:l,delayDuration:n,onOpen:o.useCallback(()=>{window.clearTimeout(d.current),l.current=!1},[]),onClose:o.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>l.current=!0,a)},[a]),isPointerInTransitRef:c,onPointerInTransitChange:o.useCallback(e=>{c.current=e},[]),disableHoverableContent:s,children:i})};Vo.displayName=Oo;var Ho="Tooltip",[Uo,Go]=Io(Ho),qo=t=>{const{__scopeTooltip:r,children:n,open:a,defaultOpen:s,onOpenChange:i,disableHoverableContent:l,delayDuration:c}=t,d=Wo(Ho,t.__scopeTooltip),u=$o(r),[m,f]=o.useState(null),p=R(),h=o.useRef(0),g=l??d.disableHoverableContent,x=c??d.delayDuration,b=o.useRef(!1),[v,w]=y({prop:a,defaultProp:s??!1,onChange:e=>{e?(d.onOpen(),document.dispatchEvent(new CustomEvent(Fo))):d.onClose(),i?.(e)},caller:Ho}),j=o.useMemo(()=>v?b.current?"delayed-open":"instant-open":"closed",[v]),k=o.useCallback(()=>{window.clearTimeout(h.current),h.current=0,b.current=!1,w(!0)},[w]),C=o.useCallback(()=>{window.clearTimeout(h.current),h.current=0,w(!1)},[w]),N=o.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{b.current=!0,w(!0),h.current=0},x)},[x,w]);return o.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),e.jsx(Po,{...u,children:e.jsx(Uo,{scope:r,contentId:p,open:v,stateAttribute:j,trigger:m,onTriggerChange:f,onTriggerEnter:o.useCallback(()=>{d.isOpenDelayedRef.current?N():k()},[d.isOpenDelayedRef,N,k]),onTriggerLeave:o.useCallback(()=>{g?C():(window.clearTimeout(h.current),h.current=0)},[C,g]),onOpen:k,onClose:C,disableHoverableContent:g,children:n})})};qo.displayName=Ho;var Ko="TooltipTrigger",Yo=o.forwardRef((t,r)=>{const{__scopeTooltip:n,...a}=t,s=Go(Ko,n),i=Wo(Ko,n),l=$o(n),c=d(r,o.useRef(null),s.onTriggerChange),u=o.useRef(!1),m=o.useRef(!1),f=o.useCallback(()=>u.current=!1,[]);return o.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),e.jsx(To,{asChild:!0,...l,children:e.jsx(w.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...a,ref:c,onPointerMove:x(t.onPointerMove,e=>{"touch"!==e.pointerType&&(m.current||i.isPointerInTransitRef.current||(s.onTriggerEnter(),m.current=!0))}),onPointerLeave:x(t.onPointerLeave,()=>{s.onTriggerLeave(),m.current=!1}),onPointerDown:x(t.onPointerDown,()=>{s.open&&s.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:x(t.onFocus,()=>{u.current||s.onOpen()}),onBlur:x(t.onBlur,s.onClose),onClick:x(t.onClick,s.onClose)})})});Yo.displayName=Ko;var[Xo,Zo]=Io("TooltipPortal",{forceMount:void 0}),Jo="TooltipContent",Qo=o.forwardRef((t,r)=>{const n=Zo(Jo,t.__scopeTooltip),{forceMount:o=n.forceMount,side:a="top",...s}=t,i=Go(Jo,t.__scopeTooltip);return e.jsx(j,{present:o||i.open,children:i.disableHoverableContent?e.jsx(oa,{side:a,...s,ref:r}):e.jsx(ea,{side:a,...s,ref:r})})}),ea=o.forwardRef((t,r)=>{const n=Go(Jo,t.__scopeTooltip),a=Wo(Jo,t.__scopeTooltip),s=o.useRef(null),i=d(r,s),[l,c]=o.useState(null),{trigger:u,onClose:m}=n,f=s.current,{onPointerInTransitChange:p}=a,h=o.useCallback(()=>{c(null),p(!1)},[p]),g=o.useCallback((e,t)=>{const r=e.currentTarget,n={x:e.clientX,y:e.clientY},o=function(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r})}return n}(n,function(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,o,a)){case a:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}(n,r.getBoundingClientRect())),a=function(e){const t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),function(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const n=e[r];for(;t.length>=2;){const e=t[t.length-1],r=t[t.length-2];if(!((e.x-r.x)*(n.y-r.y)>=(e.y-r.y)*(n.x-r.x)))break;t.pop()}t.push(n)}t.pop();const r=[];for(let t=e.length-1;t>=0;t--){const n=e[t];for(;r.length>=2;){const e=r[r.length-1],t=r[r.length-2];if(!((e.x-t.x)*(n.y-t.y)>=(e.y-t.y)*(n.x-t.x)))break;r.pop()}r.push(n)}return r.pop(),1===t.length&&1===r.length&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}(t)}([...o,...function(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}(t.getBoundingClientRect())]);c(a),p(!0)},[p]);return o.useEffect(()=>()=>h(),[h]),o.useEffect(()=>{if(u&&f){const e=e=>g(e,f),t=e=>g(e,u);return u.addEventListener("pointerleave",e),f.addEventListener("pointerleave",t),()=>{u.removeEventListener("pointerleave",e),f.removeEventListener("pointerleave",t)}}},[u,f,g,h]),o.useEffect(()=>{if(l){const e=e=>{const t=e.target,r={x:e.clientX,y:e.clientY},n=u?.contains(t)||f?.contains(t),o=!function(e,t){const{x:r,y:n}=e;let o=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){const s=t[e],i=t[a],l=s.x,c=s.y,d=i.x,u=i.y;c>n!=u>n&&r<(d-l)*(n-c)/(u-c)+l&&(o=!o)}return o}(r,l);n?h():o&&(h(),m())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[u,f,l,m,h]),e.jsx(oa,{...t,ref:i})}),[ta,ra]=Io(Ho,{isInside:!1}),na=function(t){const r=({children:t})=>e.jsx(e.Fragment,{children:t});return r.displayName=`${t}.Slottable`,r.__radixId=p,r}("TooltipContent"),oa=o.forwardRef((t,r)=>{const{__scopeTooltip:n,children:a,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:l,...c}=t,d=Go(Jo,n),u=$o(n),{onClose:m}=d;return o.useEffect(()=>(document.addEventListener(Fo,m),()=>document.removeEventListener(Fo,m)),[m]),o.useEffect(()=>{if(d.trigger){const e=e=>{const t=e.target;t?.contains(d.trigger)&&m()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[d.trigger,m]),e.jsx(hr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:e=>e.preventDefault(),onDismiss:m,children:e.jsxs(zo,{"data-state":d.stateAttribute,...u,...c,ref:r,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[e.jsx(na,{children:a}),e.jsx(ta,{scope:n,isInside:!0,children:e.jsx(Ao,{id:d.contentId,role:"tooltip",children:s||a})})]})})});Qo.displayName=Jo;var aa="TooltipArrow",sa=o.forwardRef((t,r)=>{const{__scopeTooltip:n,...o}=t,a=$o(n);return ra(aa,n).isInside?null:e.jsx(Lo,{...a,...o,ref:r})});sa.displayName=aa;var ia=Vo,la=qo,ca=Yo,da=Qo,ua=sa;const ma={none:{side:"top",align:"center"},top:{side:"top",align:"center"},topstart:{side:"top",align:"start"},topcenter:{side:"top",align:"center"},topend:{side:"top",align:"end"},bottom:{side:"bottom",align:"center"},bottomstart:{side:"bottom",align:"start"},bottomcenter:{side:"bottom",align:"center"},bottomend:{side:"bottom",align:"end"},left:{side:"left",align:"center"},leftstart:{side:"left",align:"start"},leftcenter:{side:"left",align:"center"},leftend:{side:"left",align:"end"},right:{side:"right",align:"center"},rightstart:{side:"right",align:"start"},rightcenter:{side:"right",align:"center"},rightend:{side:"right",align:"end"}},fa=o.forwardRef(({className:t,sideOffset:r=4,...n},o)=>e.jsx(da,{ref:o,sideOffset:r,className:Jt("z-50 overflow-hidden rounded-md border bg-black px-3 py-1.5 text-sm text-white shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",t),...n,children:n.children}));fa.displayName=da.displayName;const pa=({children:t,content:r,description:n,className:o,contentClassName:a,descriptionClassName:s,sideOffset:i=4,position:l="none",dir:c="rtl"})=>{const d="ltr"===c,u=ma[l]||{side:"top",align:d?"start":"end"},m="none"!==l;return e.jsx(ia,{children:e.jsxs(la,{delayDuration:50,children:[e.jsx(ca,{asChild:!0,children:t}),e.jsxs(fa,{className:Jt(o),sideOffset:i,side:u.side,align:u.align,dir:c,children:[e.jsxs("div",{className:"flex flex-col",dir:c,children:[e.jsx("span",{className:Jt("text-base font-medium",a),children:r}),n&&e.jsx("span",{className:Jt("text-xs opacity-70 mt-1",d?"text-start":"text-end",s),children:n})]}),m&&e.jsx(ua,{className:"fill-black",width:16,height:6})]})]})})},ha=t.memo(({stroke:t="",fill:r="none",width:n="12",height:o="12"})=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:n,height:o,viewBox:"0 0 12 12",fill:r,children:e.jsx("path",{d:"M6 2.5V9.5M2.5 6H9.5",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})),ga=({imgList:t,size:r,showAmount:n=5,showAddBtn:o=!1,tooltip:a,addBtnAction:s})=>{const i=t.slice(0,n),l=t.length-n;return e.jsxs("div",{className:"flex -space-x-1 w-full",children:[i.map((t,n)=>e.jsx("img",{alt:"",className:Jt("inline-block rounded-full ring-2 ring-white",nr[r]),style:{zIndex:n},...t},n)),l>0&&e.jsx("div",{className:Jt("inline-flex items-center justify-center rounded-full bg-gray-100 border-2 border-white font-medium text-gray-700 shadow-2xs align-middle hover:bg-gray-200 focus:outline-hidden focus:bg-gray-300 text-sm dark:bg-neutral-700 dark:text-white dark:hover:bg-neutral-600 dark:focus:bg-neutral-600 dark:border-neutral-800",nr[r]),style:{zIndex:n},children:e.jsxs("span",{className:"font-medium text-xs",children:["+",l]})}),o&&a?e.jsx(pa,{...a,children:e.jsx("button",{className:Jt("mx-2 p-1 flex justify-center items-center cursor-pointer stroke-rfg-quinary-400 rounded-full bg-rbg-primary border border-dashed border-rborder-primary hover:bg-rbg-primary-hover disabled:bg-rbg-disabled-subtle disabled:cur",nr[r]),onClick:s,children:e.jsx(ha,{})})}):e.jsx("button",{className:Jt("mx-2 p-1 flex justify-center items-center cursor-pointer stroke-rfg-quinary-400 rounded-full bg-rbg-primary border border-dashed border-rborder-primary hover:bg-rbg-primary-hover disabled:bg-rbg-disabled-subtle disabled:cur",nr[r]),onClick:s,children:e.jsx(ha,{})})]})},xa=({img:t,size:r,notifyColor:n="",notifyIcon:o="",iconBorder:a})=>e.jsxs("div",{className:Jt("relative inline-block",nr[r]),children:[e.jsx("img",{alt:"",...t,className:Jt("rounded-full object-cover ring-2 ring-white",nr[r])}),n&&e.jsx("span",{className:Jt(`absolute bottom-0 right-1 block rounded-full ${n} ring-2 ring-white`,or[r])}),o&&e.jsx("span",{className:Jt("absolute bottom-0 right-1 block rounded-full",ar[r],`has-[>svg]:${ar[r]} ${a&&"ring-2 ring-white"}`),children:o})]}),ba=t.memo(({stroke:t="",fill:r="none",width:n="12",className:o="",height:a="12"})=>e.jsx("svg",{"data-testid":"icon-x-close",xmlns:"http://www.w3.org/2000/svg",width:n,role:"x-icon",height:a,className:o,viewBox:"0 0 12 12",fill:r,children:e.jsx("path",{d:"M9 3L3 9M3 3L9 9",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})),va=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,ya=Ue,wa=(e,t)=>r=>{var n;if(null==(null==t?void 0:t.variants))return ya(e,null==r?void 0:r.class,null==r?void 0:r.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(e=>{const t=null==r?void 0:r[e],n=null==a?void 0:a[e];if(null===t)return null;const s=va(t)||va(n);return o[e][s]}),i=r&&Object.entries(r).reduce((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e},{}),l=null==t||null===(n=t.compoundVariants)||void 0===n?void 0:n.reduce((e,t)=>{let{class:r,className:n,...o}=t;return Object.entries(o).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...a,...i}[t]):{...a,...i}[t]===r})?[...e,r,n]:e},[]);return ya(e,s,l,null==r?void 0:r.class,null==r?void 0:r.className)},ja=wa("flex items-center font-medium",{variants:{size:{sm:"px-2 py-0.5 gap-1 has-[>svg]:text-sm text-xs",md:"px-2.5 py-0.5 gap-1.5 has-[>svg]:text-md text-sm",lg:"px-3 py-1 gap-2 has-[>svg]:text-lg text-sm"},type:{pillColor:"rounded-full border",pillOutline:"rounded-full border-[1.5px]",badgeColor:"rounded-sm border",badgeModern:"rounded-md shadow-sm border has-[>svg]:stroke-current"},dir:{ltr:"flex-row",rtl:"flex-row-reverse"},color:{gray:"bg-utility-gray-50 text-utility-gray-700 border-utility-gray-200 has-[>svg]:stroke-utility-gray-light-400",brand:"bg-utility-brand-50 text-utility-brand-700 border-utility-brand-200 has-[>svg]:stroke-utility-brand-400",error:"bg-utility-error-50 text-utility-error-700 border-utility-error-200 has-[>svg]:stroke-utility-error-400",success:"bg-utility-success-50 text-utility-success-700 border-utility-success-200 has-[>svg]:stroke-utility-success-400",grayBlue:"bg-utility-gray-blue-50 text-utility-gray-blue-700 border-utility-gray-blue-200 has-[>svg]:stroke-utility-gray-blue-400",blueLight:"bg-utility-blue-light-50 text-utility-blue-light-700 border-utility-blue-light-200 has-[>svg]:stroke-utility-blue-light-400",blue:"bg-utility-blue-50 text-utility-blue-700 border-utility-blue-200 has-[>svg]:stroke-utility-blue-400",indigo:"bg-utility-indigo-50 text-utility-indigo-700 border-utility-indigo-200 has-[>svg]:stroke-utility-indigo-400",purple:"bg-utility-purple-50 text-utility-purple-700 border-utility-purple-200 has-[>svg]:stroke-utility-purple-400",pink:"bg-utility-pink-50 text-utility-pink-700 border-utility-pink-200 has-[>svg]:stroke-utility-pink-400",orange:"bg-utility-orange-50 text-utility-orange-700 border-utility-orange-200 has-[>svg]:stroke-utility-orange-400 fill-red-500"}},defaultVariants:{size:"sm",type:"pillColor",dir:"ltr",color:"blue"}});function ka({className:t,size:r="sm",type:n="pillColor",color:o="blue",dir:a="rtl",icon:s,closable:i=!1,onClose:l,children:c,...d}){return e.jsxs("div",{className:Jt("w-fit",ja({size:r,type:n,dir:a,color:o}),"badgeModern"===n&&"bg-transparent border-primary text-secondary",t),...d,children:[s,c,i&&e.jsx("button",{onClick:l,className:"ml-1",children:e.jsx(ba,{className:"w-3 h-3 stroke-current"})})]})}const Ca=t.memo(()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:e.jsx("path",{d:"M10 12L6 8L10 4",stroke:"#D0D5DD",strokeWidth:"1.33333",strokeLinecap:"round",strokeLinejoin:"round"})})),Na=t.memo(()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"6",height:"10",viewBox:"0 0 6 10",fill:"none",children:e.jsx("path",{d:"M1 9L5 5L1 1",stroke:"#D0D5DD",strokeWidth:"1.33333",strokeLinecap:"round",strokeLinejoin:"round"})})),Ra=t.memo(()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:e.jsx("path",{d:"M6.66667 14.1667H13.3333M9.18141 2.30333L3.52949 6.69927C3.15168 6.99312 2.96278 7.14005 2.82669 7.32405C2.70614 7.48704 2.61633 7.67065 2.56169 7.86588C2.5 8.08627 2.5 8.32558 2.5 8.80421V14.8333C2.5 15.7667 2.5 16.2335 2.68166 16.59C2.84144 16.9036 3.09641 17.1585 3.41002 17.3183C3.76654 17.5 4.23325 17.5 5.16667 17.5H14.8333C15.7668 17.5 16.2335 17.5 16.59 17.3183C16.9036 17.1585 17.1586 16.9036 17.3183 16.59C17.5 16.2335 17.5 15.7667 17.5 14.8333V8.80421C17.5 8.32558 17.5 8.08627 17.4383 7.86588C17.3837 7.67065 17.2939 7.48704 17.1733 7.32405C17.0372 7.14005 16.8483 6.99312 16.4705 6.69927L10.8186 2.30333C10.5258 2.07562 10.3794 1.96177 10.2178 1.918C10.0752 1.87938 9.92484 1.87938 9.78221 1.918C9.62057 1.96177 9.47418 2.07562 9.18141 2.30333Z",stroke:"#667085",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})})),Ea=t.memo(()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:e.jsx("path",{d:"M6.66667 14.1667H13.3333M9.18141 2.30333L3.52949 6.69927C3.15168 6.99312 2.96278 7.14005 2.82669 7.32405C2.70614 7.48704 2.61633 7.67065 2.56169 7.86588C2.5 8.08627 2.5 8.32558 2.5 8.80421V14.8333C2.5 15.7667 2.5 16.2335 2.68166 16.59C2.84144 16.9036 3.09641 17.1585 3.41002 17.3183C3.76654 17.5 4.23325 17.5 5.16667 17.5H14.8333C15.7668 17.5 16.2335 17.5 16.59 17.3183C16.9036 17.1585 17.1586 16.9036 17.3183 16.59C17.5 16.2335 17.5 15.7667 17.5 14.8333V8.80421C17.5 8.32558 17.5 8.08627 17.4383 7.86588C17.3837 7.67065 17.2939 7.48704 17.1733 7.32405C17.0372 7.14005 16.8483 6.99312 16.4705 6.69927L10.8186 2.30333C10.5258 2.07562 10.3794 1.96177 10.2178 1.918C10.0752 1.87938 9.92484 1.87938 9.78221 1.918C9.62057 1.96177 9.47418 2.07562 9.18141 2.30333Z",stroke:"#0050FF",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}));
|
|
28
|
+
/**
|
|
29
|
+
* react-router v7.15.1
|
|
30
|
+
*
|
|
31
|
+
* Copyright (c) Remix Software Inc.
|
|
32
|
+
*
|
|
33
|
+
* This source code is licensed under the MIT license found in the
|
|
34
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
35
|
+
*
|
|
36
|
+
* @license MIT
|
|
37
|
+
*/
|
|
38
|
+
function Sa(e,t){if(!1===e||null==e)throw new Error(t)}function Pa(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function Ta({pathname:e="/",search:t="",hash:r=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),r&&"#"!==r&&(e+="#"===r.charAt(0)?r:"#"+r),e}function za(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function La(e,t,r="/"){return function(e,t,r,n){let o="string"==typeof t?za(t):t,a=Ua(o.pathname||"/",r);if(null==a)return null;let s=function(e){let t=Da(e);return function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let r=e.length===t.length&&e.slice(0,-1).every((e,r)=>e===t[r]);return r?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(t),t}(e),i=null,l=function(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return Pa(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}(a);for(let e=0;null==i&&e<s.length;++e)i=Va(s[e],l,n);return i}(e,t,r,!1)}function Da(e,t=[],r=[],n="",o=!1){let a=(e,a,s=o,i)=>{let l={relativePath:void 0===i?e.path||"":i,caseSensitive:!0===e.caseSensitive,childrenIndex:a,route:e};if(l.relativePath.startsWith("/")){if(!l.relativePath.startsWith(n)&&s)return;Sa(l.relativePath.startsWith(n),`Absolute route path "${l.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(n.length)}let c=Ja([n,l.relativePath]),d=r.concat(l);e.children&&e.children.length>0&&(Sa(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),Da(e.children,t,d,c,s)),(null!=e.path||e.index)&&t.push({path:c,score:Wa(c,e.index),routesMeta:d})};return e.forEach((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let r of Ma(e.path))a(e,t,!0,r);else a(e,t)}),t}function Ma(e){let t=e.split("/");if(0===t.length)return[];let[r,...n]=t,o=r.endsWith("?"),a=r.replace(/\?$/,"");if(0===n.length)return o?[a,""]:[a];let s=Ma(n.join("/")),i=[];return i.push(...s.map(e=>""===e?a:[a,e].join("/"))),o&&i.push(...s),i.map(t=>e.startsWith("/")&&""===t?"/":t)}var Aa=/^:[\w-]+$/,Ia=3,$a=2,Oa=1,_a=10,Fa=-2,Ba=e=>"*"===e;function Wa(e,t){let r=e.split("/"),n=r.length;return r.some(Ba)&&(n+=Fa),t&&(n+=$a),r.filter(e=>!Ba(e)).reduce((e,t)=>e+(Aa.test(t)?Ia:""===t?Oa:_a),n)}function Va(e,t,r=!1){let{routesMeta:n}=e,o={},a="/",s=[];for(let e=0;e<n.length;++e){let i=n[e],l=e===n.length-1,c="/"===a?t:t.slice(a.length)||"/",d=Ha({path:i.relativePath,caseSensitive:i.caseSensitive,end:l},c),u=i.route;if(!d&&l&&r&&!n[n.length-1].route.index&&(d=Ha({path:i.relativePath,caseSensitive:i.caseSensitive,end:!1},c)),!d)return null;Object.assign(o,d.params),s.push({params:o,pathname:Ja([a,d.pathname]),pathnameBase:es(Ja([a,d.pathnameBase])),route:u}),"/"!==d.pathnameBase&&(a=Ja([a,d.pathnameBase]))}return s}function Ha(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=function(e,t=!1,r=!0){Pa("*"===e||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,r,o,a)=>{if(n.push({paramName:t,isOptional:null!=r}),r){let t=a.charAt(o+e.length);return t&&"/"!==t?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");e.endsWith("*")?(n.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))");let a=new RegExp(o,t?void 0:"i");return[a,n]}(e.path,e.caseSensitive,e.end),o=t.match(r);if(!o)return null;let a=o[0],s=a.replace(/(.)\/+$/,"$1"),i=o.slice(1),l=n.reduce((e,{paramName:t,isOptional:r},n)=>{if("*"===t){let e=i[n]||"";s=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}const o=i[n];return e[t]=r&&!o?void 0:(o||"").replace(/%2F/g,"/"),e},{});return{params:l,pathname:a,pathnameBase:s,pattern:e}}function Ua(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}var Ga=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function qa(e,t){let r=Qa(t).split("/");return e.split("/").forEach(e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)}),r.length>1?r.join("/"):"/"}function Ka(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Ya(e){let t=function(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}(e);return t.map((e,r)=>r===t.length-1?e.pathname:e.pathnameBase)}function Xa(e,t,r,n=!1){let o;"string"==typeof e?o=za(e):(o={...e},Sa(!o.pathname||!o.pathname.includes("?"),Ka("?","pathname","search",o)),Sa(!o.pathname||!o.pathname.includes("#"),Ka("#","pathname","hash",o)),Sa(!o.search||!o.search.includes("#"),Ka("#","search","hash",o)));let a,s=""===e||""===o.pathname,i=s?"/":o.pathname;if(null==i)a=r;else{let e=t.length-1;if(!n&&i.startsWith("..")){let t=i.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}a=e>=0?t[e]:"/"}let l=function(e,t="/"){let r,{pathname:n,search:o="",hash:a=""}="string"==typeof e?za(e):e;return n?(n=Za(n),r=n.startsWith("/")?qa(n.substring(1),"/"):qa(n,t)):r=t,{pathname:r,search:ts(o),hash:rs(a)}}(o,a),c=i&&"/"!==i&&i.endsWith("/"),d=(s||"."===i)&&r.endsWith("/");return l.pathname.endsWith("/")||!c&&!d||(l.pathname+="/"),l}var Za=e=>e.replace(/\/\/+/g,"/"),Ja=e=>Za(e.join("/")),Qa=e=>e.replace(/\/+$/,""),es=e=>Qa(e).replace(/^\/*/,"/"),ts=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",rs=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",ns=class{constructor(e,t,r,n=!1){this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function os(e){let t=e.map(e=>e.route.path).filter(Boolean);return Ja(t)||"/"}var as="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function ss(e,t){let r=e;if("string"!=typeof r||!Ga.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,o=!1;if(as)try{let e=new URL(window.location.href),n=r.startsWith("//")?new URL(e.protocol+r):new URL(r),a=Ua(n.pathname,t);n.origin===e.origin&&null!=a?r=a+n.search+n.hash:o=!0}catch(e){Pa(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:o,to:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var is=["POST","PUT","PATCH","DELETE"];new Set(is);var ls=["GET",...is];new Set(ls);var cs=o.createContext(null);cs.displayName="DataRouter";var ds=o.createContext(null);ds.displayName="DataRouterState";var us=o.createContext(!1);var ms=o.createContext({isTransitioning:!1});ms.displayName="ViewTransition",o.createContext(new Map).displayName="Fetchers",o.createContext(null).displayName="Await";var fs=o.createContext(null);fs.displayName="Navigation";var ps=o.createContext(null);ps.displayName="Location";var hs=o.createContext({outlet:null,matches:[],isDataRoute:!1});hs.displayName="Route";var gs=o.createContext(null);gs.displayName="RouteError";var xs="REACT_ROUTER_ERROR";function bs(){return null!=o.useContext(ps)}function vs(){return Sa(bs(),"useLocation() may be used only in the context of a <Router> component."),o.useContext(ps).location}var ys="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ws(e){o.useContext(fs).static||o.useLayoutEffect(e)}function js(){let{isDataRoute:e}=o.useContext(hs);return e?function(){let{router:e}=function(e){let t=o.useContext(cs);return Sa(t,zs(e)),t}("useNavigate"),t=Ls("useNavigate"),r=o.useRef(!1);return ws(()=>{r.current=!0}),o.useCallback(async(n,o={})=>{Pa(r.current,ys),r.current&&("number"==typeof n?await e.navigate(n):await e.navigate(n,{fromRouteId:t,...o}))},[e,t])}():function(){Sa(bs(),"useNavigate() may be used only in the context of a <Router> component.");let e=o.useContext(cs),{basename:t,navigator:r}=o.useContext(fs),{matches:n}=o.useContext(hs),{pathname:a}=vs(),s=JSON.stringify(Ya(n)),i=o.useRef(!1);return ws(()=>{i.current=!0}),o.useCallback((n,o={})=>{if(Pa(i.current,ys),!i.current)return;if("number"==typeof n)return void r.go(n);let l=Xa(n,JSON.parse(s),a,"path"===o.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:Ja([t,l.pathname])),(o.replace?r.replace:r.push)(l,o.state,o)},[t,r,s,a,e])}()}function ks(e,{relative:t}={}){let{matches:r}=o.useContext(hs),{pathname:n}=vs(),a=JSON.stringify(Ya(r));return o.useMemo(()=>Xa(e,JSON.parse(a),n,"path"===t),[e,a,n,t])}function Cs(e,t,r){Sa(bs(),"useRoutes() may be used only in the context of a <Router> component.");let n,{navigator:a}=o.useContext(fs),{matches:s}=o.useContext(hs),i=s[s.length-1],l=i?i.params:{},c=i?i.pathname:"/",d=i?i.pathnameBase:"/",u=i&&i.route;{let e=u&&u.path||"";Ms(c,!u||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}n=vs();let m=n.pathname||"/",f=m;if("/"!==d){let e=d.replace(/^\//,"").split("/");f="/"+m.replace(/^\//,"").split("/").slice(e.length).join("/")}let p=r&&r.state.matches.length?r.state.matches.map(e=>Object.assign(e,{route:r.manifest[e.route.id]||e.route})):La(e,{pathname:f});Pa(u||null!=p,`No routes matched location "${n.pathname}${n.search}${n.hash}" `),Pa(null==p||void 0!==p[p.length-1].route.element||void 0!==p[p.length-1].route.Component||void 0!==p[p.length-1].route.lazy,`Matched leaf route at location "${n.pathname}${n.search}${n.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let h=function(e,t=[],r){let n=r?.state;if(null==e){if(!n)return null;if(n.errors)e=n.matches;else{if(0!==t.length||n.initialized||!(n.matches.length>0))return null;e=n.matches}}let a=e,s=n?.errors;if(null!=s){let e=a.findIndex(e=>e.route.id&&void 0!==s?.[e.route.id]);Sa(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),a=a.slice(0,Math.min(a.length,e+1))}let i=!1,l=-1;if(r&&n){i=n.renderFallback;for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(l=e),t.route.id){let{loaderData:e,errors:o}=n,s=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!o||void 0===o[t.route.id]);if(t.route.lazy||s){r.isStatic&&(i=!0),a=l>=0?a.slice(0,l+1):[a[0]];break}}}}let c=r?.onError,d=n&&c?(e,t)=>{c(e,{location:n.location,params:n.matches?.[0]?.params??{},pattern:os(n.matches),errorInfo:t})}:void 0;return a.reduceRight((e,r,c)=>{let u,m=!1,f=null,p=null;n&&(u=s&&r.route.id?s[r.route.id]:void 0,f=r.route.errorElement||Rs,i&&(l<0&&0===c?(Ms("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),m=!0,p=null):l===c&&(m=!0,p=r.route.hydrateFallbackElement||null)));let h=t.concat(a.slice(0,c+1)),g=()=>{let t;return t=u?f:m?p:r.route.Component?o.createElement(r.route.Component,null):r.route.element?r.route.element:e,o.createElement(Ts,{match:r,routeContext:{outlet:e,matches:h,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===c)?o.createElement(Es,{location:n.location,revalidation:n.revalidation,component:f,error:u,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:d}):g()},null)}(p&&p.map(e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:Ja([d,a.encodeLocation?a.encodeLocation(e.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?d:Ja([d,a.encodeLocation?a.encodeLocation(e.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),s,r);return h}function Ns(){let e=function(){let e=o.useContext(gs),t=function(e){let t=o.useContext(ds);return Sa(t,zs(e)),t}("useRouteError"),r=Ls("useRouteError");if(void 0!==e)return e;return t.errors?.[r]}(),t=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},s={padding:"2px 4px",backgroundColor:n},i=null;return console.error("Error handled by React Router default ErrorBoundary:",e),i=o.createElement(o.Fragment,null,o.createElement("p",null,"💿 Hey developer 👋"),o.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",o.createElement("code",{style:s},"ErrorBoundary")," or"," ",o.createElement("code",{style:s},"errorElement")," prop on your route.")),o.createElement(o.Fragment,null,o.createElement("h2",null,"Unexpected Application Error!"),o.createElement("h3",{style:{fontStyle:"italic"}},t),r?o.createElement("pre",{style:a},r):null,i)}o.createContext(null);var Rs=o.createElement(Ns,null),Es=class extends o.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&"object"==typeof e&&e&&"digest"in e&&"string"==typeof e.digest){const t=function(e){if(e.startsWith(`${xs}:ROUTE_ERROR_RESPONSE:{`))try{let t=JSON.parse(e.slice(40));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText)return new ns(t.status,t.statusText,t.data)}catch{}}(e.digest);t&&(e=t)}let t=void 0!==e?o.createElement(hs.Provider,{value:this.props.routeContext},o.createElement(gs.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?o.createElement(Ps,{error:e},t):t}};Es.contextType=us;var Ss=new WeakMap;function Ps({children:e,error:t}){let{basename:r}=o.useContext(fs);if("object"==typeof t&&t&&"digest"in t&&"string"==typeof t.digest){let e=function(e){if(e.startsWith(`${xs}:REDIRECT:{`))try{let t=JSON.parse(e.slice(28));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"string"==typeof t.location&&"boolean"==typeof t.reloadDocument&&"boolean"==typeof t.replace)return t}catch{}}(t.digest);if(e){let n=Ss.get(t);if(n)throw n;let a=ss(e.location,r);if(as&&!Ss.get(t)){if(!a.isExternal&&!e.reloadDocument){const r=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw Ss.set(t,r),r}window.location.href=a.absoluteURL||a.to}return o.createElement("meta",{httpEquiv:"refresh",content:`0;url=${a.absoluteURL||a.to}`})}}return e}function Ts({routeContext:e,match:t,children:r}){let n=o.useContext(cs);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),o.createElement(hs.Provider,{value:e},r)}function zs(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ls(e){let t=function(e){let t=o.useContext(hs);return Sa(t,zs(e)),t}(e),r=t.matches[t.matches.length-1];return Sa(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}var Ds={};function Ms(e,t,r){t||Ds[e]||(Ds[e]=!0,Pa(!1,r))}o.memo(function({routes:e,manifest:t,future:r,state:n,isStatic:o,onError:a}){return Cs(e,0,{manifest:t,state:n,isStatic:o,onError:a})});var As="get",Is="application/x-www-form-urlencoded";function $s(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement}var Os=null;var _s=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Fs(e){return null==e||_s.has(e)?e:(Pa(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Is}"`),null)}function Bs(e,t){let r,n,o,a,s;if($s(i=e)&&"form"===i.tagName.toLowerCase()){let s=e.getAttribute("action");n=s?Ua(s,t):null,r=e.getAttribute("method")||As,o=Fs(e.getAttribute("enctype"))||Is,a=new FormData(e)}else if(function(e){return $s(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return $s(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let s=e.form;if(null==s)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let i=e.getAttribute("formaction")||s.getAttribute("action");if(n=i?Ua(i,t):null,r=e.getAttribute("formmethod")||s.getAttribute("method")||As,o=Fs(e.getAttribute("formenctype"))||Fs(s.getAttribute("enctype"))||Is,a=new FormData(s,e),!function(){if(null===Os)try{new FormData(document.createElement("form"),0),Os=!1}catch(e){Os=!0}return Os}()){let{name:t,type:r,value:n}=e;if("image"===r){let e=t?`${t}.`:"";a.append(`${e}x`,"0"),a.append(`${e}y`,"0")}else t&&a.append(t,n)}}else{if($s(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=As,n=null,o=Is,s=e}var i;return a&&"text/plain"===o&&(s=a,a=void 0),{action:n,method:r.toLowerCase(),encType:o,formData:a,body:s}}function Ws(e,t){if(!1===e||null==e)throw new Error(t)}function Vs(e,t,r,n){let o="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return r?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${n}`:o.pathname=`${o.pathname}.${n}`:"/"===o.pathname?o.pathname=`_root.${n}`:t&&"/"===Ua(o.pathname,t)?o.pathname=`${Qa(t)}/_root.${n}`:o.pathname=`${Qa(o.pathname)}.${n}`,o}function Hs(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}async function Us(e,t,r){return function(e,t){let r=new Set;return new Set(t),e.reduce((e,t)=>{let n=JSON.stringify(function(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}(t));return r.has(n)||(r.add(n),e.push({key:n,link:t})),e},[])}((await Promise.all(e.map(async e=>{let n=t.routes[e.route.id];if(n){let e=await async function(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}(n,r);return e.links?e.links():[]}return[]}))).flat(1).filter(Hs).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"}))}function Gs(e,t,r,n,o,a){let s=(e,t)=>!r[t]||e.route.id!==r[t].route.id,i=(e,t)=>r[t].pathname!==e.pathname||r[t].route.path?.endsWith("*")&&r[t].params["*"]!==e.params["*"];return"assets"===a?t.filter((e,t)=>s(e,t)||i(e,t)):"data"===a?t.filter((t,a)=>{let l=n.routes[t.route.id];if(!l||!l.hasLoader)return!1;if(s(t,a)||i(t,a))return!0;if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof n)return n}return!0}):[]}function qs(e,t,{includeHydrateFallback:r}={}){return n=e.map(e=>{let n=t.routes[e.route.id];if(!n)return[];let o=[n.module];return n.clientActionModule&&(o=o.concat(n.clientActionModule)),n.clientLoaderModule&&(o=o.concat(n.clientLoaderModule)),r&&n.hydrateFallbackModule&&(o=o.concat(n.hydrateFallbackModule)),n.imports&&(o=o.concat(n.imports)),o}).flat(1),[...new Set(n)];var n}function Ks(){let e=o.useContext(cs);return Ws(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Ys=o.createContext(void 0);function Xs(){let e=o.useContext(Ys);return Ws(e,"You must render this element inside a <HydratedRouter> element"),e}function Zs(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Js({page:e,...t}){let r=o.useContext(us),{router:n}=Ks(),a=o.useMemo(()=>La(n.routes,e,n.basename),[n.routes,e,n.basename]);return a?r?o.createElement(Qs,{page:e,matches:a,...t}):o.createElement(ei,{page:e,matches:a,...t}):null}function Qs({page:e,matches:t,...r}){let n=vs(),{future:a}=Xs(),{basename:s}=Ks(),i=o.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let r=Vs(e,s,a.unstable_trailingSlashAwareDataRequests,"rsc"),o=!1,i=[];for(let e of t)"function"==typeof e.route.shouldRevalidate?o=!0:i.push(e.route.id);return o&&i.length>0&&r.searchParams.set("_routes",i.join(",")),[r.pathname+r.search]},[s,a.unstable_trailingSlashAwareDataRequests,e,n,t]);return o.createElement(o.Fragment,null,i.map(e=>o.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...r})))}function ei({page:e,matches:t,...r}){let n=vs(),{future:a,manifest:s,routeModules:i}=Xs(),{basename:l}=Ks(),{loaderData:c,matches:d}=function(){let e=o.useContext(ds);return Ws(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}(),u=o.useMemo(()=>Gs(e,t,d,s,n,"data"),[e,t,d,s,n]),m=o.useMemo(()=>Gs(e,t,d,s,n,"assets"),[e,t,d,s,n]),f=o.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let r=new Set,o=!1;if(t.forEach(e=>{let t=s.routes[e.route.id];t&&t.hasLoader&&(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&i[e.route.id]?.shouldRevalidate||t.hasClientLoader?o=!0:r.add(e.route.id))}),0===r.size)return[];let d=Vs(e,l,a.unstable_trailingSlashAwareDataRequests,"data");return o&&r.size>0&&d.searchParams.set("_routes",t.filter(e=>r.has(e.route.id)).map(e=>e.route.id).join(",")),[d.pathname+d.search]},[l,a.unstable_trailingSlashAwareDataRequests,c,n,s,u,t,e,i]),p=o.useMemo(()=>qs(m,s),[m,s]),h=function(e){let{manifest:t,routeModules:r}=Xs(),[n,a]=o.useState([]);return o.useEffect(()=>{let n=!1;return Us(e,t,r).then(e=>{n||a(e)}),()=>{n=!0}},[e,t,r]),n}(m);return o.createElement(o.Fragment,null,f.map(e=>o.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...r})),p.map(e=>o.createElement("link",{key:e,rel:"modulepreload",href:e,...r})),h.map(({key:e,link:t})=>o.createElement("link",{key:e,nonce:r.nonce,...t,crossOrigin:t.crossOrigin??r.crossOrigin})))}function ti(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}Ys.displayName="FrameworkContext";var ri="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{ri&&(window.__reactRouterVersion="7.15.1")}catch(e){}var ni=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,oi=o.forwardRef(function({onClick:e,discover:t="render",prefetch:r="none",relative:n,reloadDocument:a,replace:s,mask:i,state:l,target:c,to:d,preventScrollReset:u,viewTransition:m,defaultShouldRevalidate:f,...p},h){let{basename:g,navigator:x,useTransitions:b}=o.useContext(fs),v="string"==typeof d&&ni.test(d),y=ss(d,g),w=function(e,{relative:t}={}){Sa(bs(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=o.useContext(fs),{hash:a,pathname:s,search:i}=ks(e,{relative:t}),l=s;return"/"!==r&&(l="/"===s?r:Ja([r,s])),n.createHref({pathname:l,search:i,hash:a})}(d=y.to,{relative:n}),j=vs(),k=null;if(i){let e=Xa(i,[],j.mask?j.mask.pathname:"/",!0);"/"!==g&&(e.pathname="/"===e.pathname?g:Ja([g,e.pathname])),k=x.createHref(e)}let[C,N,R]=function(e,t){let r=o.useContext(Ys),[n,a]=o.useState(!1),[s,i]=o.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:d,onMouseLeave:u,onTouchStart:m}=t,f=o.useRef(null);o.useEffect(()=>{if("render"===e&&i(!0),"viewport"===e){let e=new IntersectionObserver(e=>{e.forEach(e=>{i(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),o.useEffect(()=>{if(n){let e=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(e)}}},[n]);let p=()=>{a(!0)},h=()=>{a(!1),i(!1)};return r?"intent"!==e?[s,f,{}]:[s,f,{onFocus:Zs(l,p),onBlur:Zs(c,h),onMouseEnter:Zs(d,p),onMouseLeave:Zs(u,h),onTouchStart:Zs(m,p)}]:[!1,f,{}]}(r,p),E=function(e,{target:t,replace:r,mask:n,state:a,preventScrollReset:s,relative:i,viewTransition:l,defaultShouldRevalidate:c,useTransitions:d}={}){let u=js(),m=vs(),f=ks(e,{relative:i});return o.useCallback(p=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(p,t)){p.preventDefault();let t=void 0!==r?r:Ta(m)===Ta(f),h=()=>u(e,{replace:t,mask:n,state:a,preventScrollReset:s,relative:i,viewTransition:l,defaultShouldRevalidate:c});d?o.startTransition(()=>h()):h()}},[m,u,f,r,n,a,t,e,s,i,l,c,d])}(d,{replace:s,mask:i,state:l,target:c,preventScrollReset:u,relative:n,viewTransition:m,defaultShouldRevalidate:f,useTransitions:b});let S=!(y.isExternal||a),P=o.createElement("a",{...p,...R,href:(S?k:void 0)||y.absoluteURL||w,onClick:S?function(t){e&&e(t),t.defaultPrevented||E(t)}:e,ref:ti(h,N),target:c,"data-discover":v||"render"!==t?void 0:"true"});return C&&!v?o.createElement(o.Fragment,null,P,o.createElement(Js,{page:w})):P});function ai(e){let t=o.useContext(cs);return Sa(t,function(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}(e)),t}oi.displayName="Link",o.forwardRef(function({"aria-current":e="page",caseSensitive:t=!1,className:r="",end:n=!1,style:a,to:s,viewTransition:i,children:l,...c},d){let u=ks(s,{relative:c.relative}),m=vs(),f=o.useContext(ds),{navigator:p,basename:h}=o.useContext(fs),g=null!=f&&function(e,{relative:t}={}){let r=o.useContext(ms);Sa(null!=r,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=ai("useViewTransitionState"),a=ks(e,{relative:t});if(!r.isTransitioning)return!1;let s=Ua(r.currentLocation.pathname,n)||r.currentLocation.pathname,i=Ua(r.nextLocation.pathname,n)||r.nextLocation.pathname;return null!=Ha(a.pathname,i)||null!=Ha(a.pathname,s)}(u)&&!0===i,x=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,b=m.pathname,v=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(b=b.toLowerCase(),v=v?v.toLowerCase():null,x=x.toLowerCase()),v&&h&&(v=Ua(v,h)||v);const y="/"!==x&&x.endsWith("/")?x.length-1:x.length;let w,j=b===x||!n&&b.startsWith(x)&&"/"===b.charAt(y),k=null!=v&&(v===x||!n&&v.startsWith(x)&&"/"===v.charAt(x.length)),C={isActive:j,isPending:k,isTransitioning:g},N=j?e:void 0;w="function"==typeof r?r(C):[r,j?"active":null,k?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let R="function"==typeof a?a(C):a;return o.createElement(oi,{...c,"aria-current":N,className:w,ref:d,style:R,to:s,viewTransition:i},"function"==typeof l?l(C):l)}).displayName="NavLink",o.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:a,state:s,method:i=As,action:l,onSubmit:c,relative:d,preventScrollReset:u,viewTransition:m,defaultShouldRevalidate:f,...p},h)=>{let{useTransitions:g}=o.useContext(fs),x=function(){let{router:e}=ai("useSubmit"),{basename:t}=o.useContext(fs),r=Ls("useRouteId"),n=e.fetch,a=e.navigate;return o.useCallback(async(e,o={})=>{let{action:s,method:i,encType:l,formData:c,body:d}=Bs(e,t);if(!1===o.navigate){let e=o.fetcherKey||ii();await n(e,r,o.action||s,{defaultShouldRevalidate:o.defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:c,body:d,formMethod:o.method||i,formEncType:o.encType||l,flushSync:o.flushSync})}else await a(o.action||s,{defaultShouldRevalidate:o.defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:c,body:d,formMethod:o.method||i,formEncType:o.encType||l,replace:o.replace,state:o.state,fromRouteId:r,flushSync:o.flushSync,viewTransition:o.viewTransition})},[n,a,t,r])}(),b=function(e,{relative:t}={}){let{basename:r}=o.useContext(fs),n=o.useContext(hs);Sa(n,"useFormAction must be used inside a RouteContext");let[a]=n.matches.slice(-1),s={...ks(e||".",{relative:t})},i=vs();if(null==e){s.search=i.search;let e=new URLSearchParams(s.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let r=e.toString();s.search=r?`?${r}`:""}}e&&"."!==e||!a.route.index||(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index");"/"!==r&&(s.pathname="/"===s.pathname?r:Ja([r,s.pathname]));return Ta(s)}(l,{relative:d}),v="get"===i.toLowerCase()?"get":"post",y="string"==typeof l&&ni.test(l);return o.createElement("form",{ref:h,method:v,action:b,onSubmit:n?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let n=e.nativeEvent.submitter,l=n?.getAttribute("formmethod")||i,p=()=>x(n||e.currentTarget,{fetcherKey:t,method:l,navigate:r,replace:a,state:s,relative:d,preventScrollReset:u,viewTransition:m,defaultShouldRevalidate:f});g&&!1!==r?o.startTransition(()=>p()):p()},...p,"data-discover":y||"render"!==e?void 0:"true"})}).displayName="Form";var si=0,ii=()=>`__${String(++si)}__`;const li=wa("inline-flex items-center justify-center font-medium focus:outline-none transition-all w-fit rounded-md border transition-all duration-300 cursor-pointer relative",{variants:{loading:{true:"pointer-events-none"},size:{sm:"text-sm px-3 py-2 gap-1",md:"text-base px-3.5 py-2.5 gap-1",lg:"text-lg px-4 py-2.5 gap-1.5",xl:"text-lg px-4.5 py-3 gap-1.5","2xl":"rounded-lg text-lg px-5.5 py-4 gap-2"},fullWidth:{true:"w-full"},disabled:{true:"pointer-events-none"},dir:{rtl:"flex-row",ltr:"flex-row-reverse"},variant:{primary:"border-gradient-border bg-rbutton-primary-bg hover:bg-rbutton-primary-bg-hover focus:bg-rbutton-primary-bg shadow-xs-skeuomorphic focus:shadow-focus-ring-shadow-xs-skeuomorphic text-rbutton-primary-fg has-[>svg]:text-rbutton-primary-fg disabled:bg-rbg-disabled disabled:border-rborder-disabled-subtle disabled:text-rfg-disabled has-[>svg]:disabled:text-rfg-disabled disabled:shadow-xs",secondaryGray:"text-rbutton-secondary-fg has-[>svg]:stroke-rbutton-secondary-fg border-gradient-border bg-rbutton-secondary-bg hover:bg-rbutton-secondary-bg-hover shadow-xs-skeuomorphic disabled:bg-rbg-primary disabled:border-rborder-disabled-subtle disabled:text-rfg-disabled has-[>svg]:disabled:text-rfg-disabled disabled:shadow-xs",secondaryColor:"text-rbutton-secondary-color-fg bg-rbutton-secondary-color-bg border-rbutton-secondary-color-border hover:text-rbutton-secondary-color-fg-hover hover:bg-rbutton-secondary-color-bg-hover border-rbutton-secondary-color-border-hover disabled:bg-rbg-primary disabled:border-rborder-disabled-subtle disabled:text-rfg-disabled disabled:shadow-xs",tertiaryGray:"border-0 text-rbutton-tertiary-fg hover:text-rbutton-tertiary-fg-hover hover:bg-rbutton-tertiary-bg-hover disabled:text-rfg-disabled",tertiaryColor:"border-0 text-rbutton-tertiary-color-fg hover:text-rbutton-tertiary-color-fg-hover hover:bg-rbutton-tertiary-color-bg-hover disabled:text-rfg-disabled",linkGray:"border-0 text-rbutton-tertiary-fg hover:text-rbutton-tertiary-fg-hover disabled:text-rfg-disabled !p-0",linkColor:"border-0 text-rbutton-tertiary-color-fg hover:text-rbutton-tertiary-color-fg-hover disabled:text-rfg-disabled !p-0"}},defaultVariants:{variant:"primary",size:"md"}}),ci=({size:t="sm"})=>e.jsx("div",{"aria-label":"loading",className:Ue("border-2 border-t-transparent rounded-full animate-spin",{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6",xl:"h-7 w-7","2xl":"h-7 w-7"}[t])}),di=({variant:t="primary",size:r="md",fullWidth:n,disabled:o=!1,loading:a=!1,leftIcon:s,rightIcon:i,children:l,className:c,onClick:d,asChild:u=!1,...f})=>{const p=u?m:"button";return e.jsxs(p,{className:li({variant:t,size:r,fullWidth:n,disabled:o,className:c,loading:a}),disabled:o,onClick:a?()=>{}:d,...f,children:[a&&e.jsx("div",{className:"absolute inset-0 flex justify-center items-center",children:e.jsx(ci,{size:r??"md"})}),e.jsxs("span",{className:Ue({invisible:a},"flex items-center gap-2"),children:[s,l,i]})]})},ui=t.memo(({stroke:t="white",fill:r="none",width:n="10",className:o="",height:a="10"})=>e.jsx(e.Fragment,{children:e.jsx("svg",{width:n,"data-testid":"minus-icon",height:a,className:o,fill:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 12",children:e.jsx("path",{d:"M2.5 6H9.5",stroke:t,strokeWidth:"1.666",strokeLinecap:"round",strokeLinejoin:"round"})})})),mi=t.memo(({stroke:t="#fff",fill:r="none",width:n="10",height:o="10"})=>e.jsx("svg",{width:n,height:o,"data-testid":"tickbox-icon",viewBox:"0 0 10 10",className:"border-white",fill:r,xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M8.33341 2.5L3.75008 7.08333L1.66675 5",stroke:t,strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})})),fi=wa("border-rborder-primary rounded-xs border-[1px] peer-checked:border-rbg-brand-solid peer-checked:bg-rbg-brand-solid flex items-center justify-center",{variants:{size:{sm:"w-3.5 h-3.5",md:"w-4 h-4",lg:"w-4.5 h-4.5"},disabled:{true:" bg-rbg-disabled-subtle cursor-auto",false:" group cursor-pointer",undefined:"group cursor-pointer"}},defaultVariants:{size:"sm"}}),pi={sm:"p-1",md:"p-[5px]",lg:"p-1.5"},hi=({size:r="sm",children:n,id:o,disabled:a=!1,checkboxIndex:s=1,isIndeterminate:i=!1,checked:l,onChange:c,onClick:d,defaultChecked:u,name:m,label:f,...p})=>{const h=t.useRef(null);t.useEffect(()=>{h.current&&(h.current.indeterminate=i)},[i]);const g=a?"#D0D5DD":"white";let x=null;return a?l&&(x=i?e.jsx(ui,{stroke:g}):e.jsx(mi,{stroke:g})):x=i?e.jsx(ui,{stroke:g}):e.jsx(mi,{stroke:g}),e.jsxs("div",{className:"flex items-center cursor-pointer gap-2 justify-start",children:[e.jsx("input",{type:"checkbox","data-testid":"checkbox",id:o,ref:h,onChange:e=>!a&&c&&c(e),onClick:d,disabled:a,checked:l,defaultChecked:u,className:"peer hidden",...p}),e.jsx("label",{htmlFor:o??m,tabIndex:s,className:Jt(fi({size:r,disabled:a}),`${a&&"!bg-rbg-disabled !border-rborder-primary"} `),children:e.jsx("div",{className:`${pi[r]} ${!a&&"group-focus-within:border-2 border-rbg-brand-solid "} flex items-center justify-center rounded-md`,children:x})}),(n??f)&&e.jsx("div",{className:"leading-none",onClick:()=>{h.current&&!a&&(h.current.click(),h.current.focus())},children:n??f})]})},gi="rounded-full border-[1px] flex items-center justify-center peer-checked:border-[5px]",xi={sm:"text-xs",md:"text-sm"},bi={sm:"p-2.5",md:"p-3"},vi=wa(gi,{variants:{size:{sm:"w-4 h-4",md:"w-5 h-5 !peer-checked:border-[6px]"},disabled:{true:" cursor-auto bg-rbg-disabled-subtle !border-rfg-disabled-subtle !border-[1px] ",false:"group cursor-pointer border-rbg-brand-solid",undefined:"group cursor-pointer border-rbg-brand-solid"}},defaultVariants:{size:"sm"}}),yi=({name:t,value:r,checked:n,onChange:o,size:a="sm",disabled:s,className:i,children:l,id:c,...d})=>e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsxs("label",{htmlFor:c,className:"inline-flex w-fit items-center cursor-pointer relative",children:[e.jsx("input",{type:"radio",name:t,value:r,checked:n,onChange:o,className:"sr-only peer",disabled:s,id:c,...d}),e.jsx("div",{className:Jt(vi({size:a,disabled:s}),gi)}),e.jsx("div",{className:`peer-focus:border-2 peer-focus-within:border-1 border-brand-500 rounded-full absolute top-1/2 left-1/2 -translate-1/2 ${bi[a]} ${n&&s&&("sm"===a?"!border-4":"!border-5")+" !border-rfg-disabled-subtle !p-0 "} `})]}),l&&e.jsx("label",{htmlFor:c,className:`cursor-pointer ${xi[a]} ${i}`,children:l})]}),wi={sm:"text-sm",md:"text-md"},ji={sm:"16",md:"20"},ki={sm:"text-sm",md:"text-md"},Ci=t.memo(({stroke:t="#344054",fill:r="none",width:n="16",className:o="",height:a="16"})=>e.jsx(e.Fragment,{children:e.jsx("svg",{"data-testid":"layer-icon",xmlns:"http://www.w3.org/2000/svg",width:n,height:a,className:o,viewBox:"0 0 16 16",fill:r,children:e.jsx("path",{d:"M1.33325 9.66669L7.7614 12.8808C7.84886 12.9245 7.89259 12.9464 7.93845 12.955C7.97908 12.9626 8.02076 12.9626 8.06139 12.955C8.10725 12.9464 8.15098 12.9245 8.23843 12.8808L14.6666 9.66669M1.33325 6.33336L7.7614 3.11928C7.84886 3.07555 7.89259 3.05369 7.93845 3.04508C7.97908 3.03746 8.02076 3.03746 8.06139 3.04508C8.10725 3.05369 8.15098 3.07555 8.23843 3.11928L14.6666 6.33336L8.23843 9.54743C8.15098 9.59116 8.10725 9.61302 8.06139 9.62163C8.02076 9.62925 7.97908 9.62925 7.93845 9.62163C7.89259 9.61302 7.84886 9.59116 7.7614 9.54743L1.33325 6.33336Z",stroke:t,strokeWidth:"1.333",strokeLinecap:"round",strokeLinejoin:"round"})})}));function Ni({children:t,className:r,...n}){return e.jsx("div",{className:`${r} flex items-center justify-center border border-disabled-subtle-br rounded-md shadow-rshadow-sm-01 p-2.5 w-fit h-fit`,...n,children:t})}function Ri({per:t,size:r="sm",title:n="",description:o,price:a,id:s,checkboxIndex:i,checked:l,name:c="",value:d="",inputProps:u,onChange:m,type:f,onCardClick:p,disabled:h}){return e.jsxs(e.Fragment,{children:[e.jsx(Ni,{"data-testid":"icon-wrapper",children:e.jsx(Ci,{width:ji[r],height:ji[r]})}),e.jsxs("div",{onClick:p,className:"flex flex-col grow justify-between",children:[e.jsxs("div",{className:"flex",children:[e.jsx("h3",{className:"font-medium text-foreground text-rtext-secondary-700",children:n})," ",e.jsxs("span",{children:[a,"/",t]})]}),e.jsx("div",{className:"text-muted-foreground",children:o})]}),e.jsx("div",{className:"flex items-start gap-2",children:"radio"===f?e.jsx(yi,{onChange:m,checked:l,disabled:h,value:d,name:c,size:r,id:s,...u}):e.jsx(hi,{...u,disabled:h,id:s,name:c,onChange:m,size:r,value:d,checkboxIndex:i,checked:l})})]})}const Ei=({title:t,size:r,disabled:n,checkboxIndex:o,id:a,name:s="",value:i="",onChange:l,inputProps:c,checked:d,type:u,...m})=>{const f=n||"group-focus-within:border-rbg-brand-solid group-focus-within:border-b-2 border-b";return e.jsxs("div",{"data-testid":"header",className:`flex items-center border-b-2 border-rborder-secondary p-4 w-full gap-2 ${f}`,...m,children:[e.jsx(Ni,{children:e.jsx(Ci,{width:"20",height:"20"})}),e.jsx("div",{className:"flex flex-col grow justify-between",children:e.jsx("div",{className:"flex text-sm",children:e.jsx("h3",{className:"font-medium text-foreground text-rtext-secondary-700",children:t})})}),e.jsx("div",{className:"flex items-start gap-2",children:"radio"===u?e.jsx(yi,{onChange:l,checked:d,disabled:n,value:i,name:s,size:r,id:a,...c}):e.jsx(hi,{checkboxIndex:o,disabled:n,id:a,name:s,onChange:l,size:r,value:i,...c})})]})};function Si({per:t,size:r="sm",title:n="",price:o,description:a,checked:s,badgeContent:i,checkboxIndex:l=1,id:c="",value:d="value",name:u="",onChange:m,disabled:f,type:p}){return e.jsxs(e.Fragment,{children:[e.jsx(Ei,{type:p,onChange:m,name:u,disabled:f,checked:s,value:d,"data-testid":"header",checkboxIndex:l,title:n,size:r,id:c}),e.jsxs("div",{className:"p-4 flex w-full",children:[e.jsxs("div",{className:"grow space-y-1",children:[e.jsxs("div",{className:"flex items-end text-sm gap-1",children:[e.jsx("span",{className:"text-3xl font-semibold text-foreground text-rtext-secondary-700",children:o}),e.jsx("span",{className:"h-fit",children:t})]}),e.jsx("div",{children:a})]}),e.jsx("span",{children:i&&e.jsx(ka,{size:"md",type:"badgeColor",dir:"rtl",color:"success",className:"!bg-white !border-rborder-primary !text-rtext-secondary-700",icon:e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-rfg-success-primary"}),children:i})})]})]})}const Pi={sm:"text-sm",md:"text-md"},Ti={sm:"w-8 h-8",md:"w-10 h-10"},zi=(e,t=50)=>t+10*e,Li=(e,t=40)=>t+10*e,Di=wa("",{variants:{direction:{down:"",up:"",left:"",right:""},alignment:{left:"",right:"",top:"",bottom:""}},compoundVariants:[{direction:"down",alignment:"left",class:"origin-top-right right-0 mt-2"},{direction:"down",alignment:"right",class:"origin-top-left left-0 mt-2"},{direction:"down",alignment:"top",class:"origin-top-center left-1/2 -translate-x-1/2 mt-2"},{direction:"down",alignment:"bottom",class:"origin-top-center left-1/2 -translate-x-1/2 mt-2"},{direction:"up",alignment:"left",class:"origin-bottom-right right-0 bottom-full mb-2"},{direction:"up",alignment:"right",class:"origin-bottom-left left-0 bottom-full mb-2"},{direction:"up",alignment:"top",class:"origin-bottom-center left-1/2 -translate-x-1/2 bottom-full mb-2"},{direction:"up",alignment:"bottom",class:"origin-bottom-center left-1/2 -translate-x-1/2 bottom-full mb-2"},{direction:"left",alignment:"top",class:"origin-top-right top-0 right-full mr-2"},{direction:"left",alignment:"bottom",class:"origin-bottom-right bottom-0 right-full mr-2"},{direction:"left",alignment:"left",class:"origin-center right-full mr-2 top-1/2 -translate-y-1/2"},{direction:"left",alignment:"right",class:"origin-center right-full mr-2 top-1/2 -translate-y-1/2"},{direction:"right",alignment:"top",class:"origin-top-left top-0 left-full ml-2"},{direction:"right",alignment:"bottom",class:"origin-bottom-left bottom-0 left-full ml-2"},{direction:"right",alignment:"left",class:"origin-center left-full ml-2 top-1/2 -translate-y-1/2"},{direction:"right",alignment:"right",class:"origin-center left-full ml-2 top-1/2 -translate-y-1/2"}],defaultVariants:{direction:"down",alignment:"right"}}),Mi=({icon:t,mainText:r,subText:n,formatText:o,acceptableFormats:a,disable:s,multiItem:i,onChange:l})=>e.jsx("div",{className:Jt("relative w-full py-4 px-6 flex justify-center items-center gap-1 rounded-xl border border-rborder-secondary bg-rbg-primary ",s&&"bg-rbg-disabled-subtle",!s&&"hover:border-rborder-brand focus:border-rborder-brand focus-within:border-rborder-brand"),children:e.jsxs("div",{className:"text-center flex flex-col justify-center items-center gap-2",children:[t??e.jsx(di,{variant:"secondaryGray","aria-hidden":"true",disabled:s,children:e.jsx(Ie,{"data-testid":"default-uploadcloud"})}),e.jsxs("div",{className:"flex flex-col justify-center items-center gap-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsxs("label",{htmlFor:"file-upload",className:Jt(" cursor-pointer rounded-md text-rbutton-tertiary-color-fg font-normal text-sm",s&&"text-rbg-disabled-subtle"),children:[e.jsx("span",{className:Jt(s&&"text-rfg-disabled"),children:r}),e.jsx("input",{id:"file-upload",name:"file-upload","data-testid":"file-input",type:"file",className:"absolute overflow-hidden top-0 left-0 w-full h-full opacity-0 cursor-pointer",disabled:s,multiple:i,accept:a?Array.isArray(a)?a.map(e=>e.startsWith(".")?e:`.${e}`).join(", "):a:void 0,onChange:l})]}),e.jsx("p",{className:"text-rtext-tertiary-600 text-sm",children:n})]}),e.jsx("p",{className:"text-xs text-rtext-tertiary-600 font-normal",children:o})]})]})});var Ai="Progress",Ii=100,[$i]=s(Ai),[Oi,_i]=$i(Ai),Fi=o.forwardRef((t,r)=>{const{__scopeProgress:n,value:o=null,max:a,getValueLabel:s=Vi,...i}=t;!a&&0!==a||Gi(a)||console.error(`Invalid prop \`max\` of value \`${`${a}`}\` supplied to \`${"Progress"}\`. Only numbers greater than 0 are valid max values. Defaulting to \`100\`.`);const l=Gi(a)?a:Ii;null===o||qi(o,l)||console.error(function(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:\n - a positive number\n - less than the value passed to \`max\` (or 100 if no \`max\` prop is set)\n - \`null\` or \`undefined\` if the progress is indeterminate.\n\nDefaulting to \`null\`.`}(`${o}`,"Progress"));const c=qi(o,l)?o:null,d=Ui(c)?s(c,l):void 0;return e.jsx(Oi,{scope:n,value:c,max:l,children:e.jsx(w.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":Ui(c)?c:void 0,"aria-valuetext":d,role:"progressbar","data-state":Hi(c,l),"data-value":c??void 0,"data-max":l,...i,ref:r})})});Fi.displayName=Ai;var Bi="ProgressIndicator",Wi=o.forwardRef((t,r)=>{const{__scopeProgress:n,...o}=t,a=_i(Bi,n);return e.jsx(w.div,{"data-state":Hi(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...o,ref:r})});function Vi(e,t){return`${Math.round(e/t*100)}%`}function Hi(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function Ui(e){return"number"==typeof e}function Gi(e){return Ui(e)&&!isNaN(e)&&e>0}function qi(e,t){return Ui(e)&&!isNaN(e)&&e<=t&&e>=0}Wi.displayName=Bi;var Ki=Fi,Yi=Wi;const Xi={xxs:"w-[64px] h-[64px]",xs:"w-[160px] h-[160px]",sm:"w-[200px] h-[200px]",md:"w-[240px] h-[240px]",lg:"w-[280px] h-[280px]"},Zi={xxs:64,xs:160,sm:200,md:240,lg:280},Ji=o.forwardRef(({type:t="line",value:r=0,label:n,labelClassName:o,backgroundVariant:a,indicatorVariant:s,className:i,size:l="md",strokeWidth:c=16,svgClassName:d,...u},m)=>{const f=Math.min(Math.max(r??0,0),100),p=Zi[l]||240,h=(p-c)/2;if("half-circle"===t){const t=Math.PI*h,r=t-f/100*t;return e.jsxs("div",{className:Jt("relative flex items-center justify-center",Xi[l],i),ref:m,...u,children:[e.jsxs("svg",{width:p,height:p/2,className:Jt("rotate-[-90deg]",d),children:[e.jsx("circle",{stroke:"#e5e7eb",fill:"transparent",strokeWidth:c,r:h,cx:p/2,cy:p/2}),e.jsx("circle",{fill:"transparent",strokeWidth:c,strokeLinecap:"round",strokeDasharray:t,strokeDashoffset:t-r,r:h,cx:p/2,cy:p/2,style:{transition:"stroke-dashoffset 0.5s ease"},className:s})]}),void 0!==n&&e.jsxs("span",{className:Jt("absolute text-sm font-semibold text-muted-foreground",o),children:[n,"%"]})]})}if("circle"===t){const t=2*Math.PI*h,r=t-f/100*t;return e.jsxs("div",{className:Jt("relative flex items-center justify-center",Xi[l],i),ref:m,...u,children:[e.jsxs("svg",{width:p,height:p,className:Jt("rotate-[-90deg]",d),children:[e.jsx("circle",{stroke:"#e5e7eb",fill:"transparent",strokeWidth:c,r:h,cx:p/2,cy:p/2}),e.jsx("circle",{fill:"transparent",strokeWidth:c,strokeLinecap:"round",strokeDasharray:t,strokeDashoffset:r,r:h,cx:p/2,cy:p/2,style:{transition:"stroke-dashoffset 0.5s ease"},className:s})]}),void 0!==n&&e.jsxs("span",{className:Jt("absolute text-sm font-semibold text-muted-foreground",o),children:[n,"%"]})]})}return e.jsxs("div",{className:"flex items-center gap-4 w-full",children:[e.jsx(Ki,{ref:m,className:Jt("relative h-4 w-full overflow-hidden rounded-full bg-muted",a,i),...u,children:e.jsx(Yi,{className:Jt("h-full transition-transform duration-300",s),style:{transform:`translateX(-${100-r}%)`}})}),"number"==typeof n&&e.jsxs("span",{className:Jt("text-sm text-muted-foreground min-w-[40px] text-right",o),children:[n,"%"]})]})});Ji.displayName="Progress";const Qi=({width:t=40,height:r=40})=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:r,viewBox:"0 0 20 20",fill:"none",children:e.jsx("path",{d:"M11.6667 1.89118V5.33329C11.6667 5.8 11.6667 6.03336 11.7575 6.21162C11.8374 6.36842 11.9649 6.4959 12.1217 6.5758C12.3 6.66663 12.5333 6.66663 13 6.66663H16.4422M16.6667 8.32348V14.3333C16.6667 15.7334 16.6667 16.4335 16.3942 16.9683C16.1545 17.4387 15.7721 17.8211 15.3017 18.0608C14.7669 18.3333 14.0668 18.3333 12.6667 18.3333H7.33337C5.93324 18.3333 5.23318 18.3333 4.6984 18.0608C4.22799 17.8211 3.84554 17.4387 3.60586 16.9683C3.33337 16.4335 3.33337 15.7334 3.33337 14.3333V5.66663C3.33337 4.26649 3.33337 3.56643 3.60586 3.03165C3.84554 2.56124 4.22799 2.17879 4.6984 1.93911C5.23318 1.66663 5.93324 1.66663 7.33337 1.66663H10.0099C10.6213 1.66663 10.9271 1.66663 11.2148 1.7357C11.4699 1.79694 11.7137 1.89795 11.9374 2.03503C12.1897 2.18963 12.4059 2.40582 12.8383 2.8382L15.4951 5.49505C15.9275 5.92743 16.1437 6.14362 16.2983 6.39591C16.4354 6.61959 16.5364 6.86346 16.5976 7.11855C16.6667 7.40627 16.6667 7.712 16.6667 8.32348Z",stroke:"#98A2B3",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),el=({item:t,loadType:r,onDelete:n})=>e.jsxs("div",{className:Jt("p-4 flex gap-3 w-full rounded-xl border border-rborder-secondary bg-rbg-primary","failed"==t?.status&&"border-rborder-error"),children:[e.jsx("div",{className:" flex justify-start items-start w-10 h-10",children:t?.icon??e.jsx(Qi,{width:20,height:20,"data-testid":"fallback-icon"})}),e.jsxs("div",{className:"flex flex-col gap-1 w-full",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsxs("div",{className:"flex flex-col w-1/2",children:[e.jsx("span",{className:"font-medium text-rtext-secondary-700 overflow-hidden text-ellipsis text-sm",children:t?.title}),e.jsx("span",{className:"text-rtext-tertiary-600 font-normal text-sm overflow-hidden text-ellipsis",children:t?.size})]}),e.jsx(di,{className:Jt("self-centertext-rbutton-tertiary-fg","failed"==t?.status&&"text-rbutton-secondary-error-fg"),onClick:()=>{n(t?.id)},variant:"linkGray",children:e.jsx(Be,{width:20,height:20})})]}),"progressBar"==r&&e.jsx(Ji,{type:"line",value:t?.progressValue,label:t?.percentage,size:"lg",indicatorVariant:"bg-rfg-brand-primary-600",backgroundVariant:"bg-rbg-quaternary",dir:"rtl",className:"h-2",labelClassName:"text-end"})]})]}),tl=(e,t,r)=>Math.min(Math.max(e,t),r),rl={x:0,y:0};const nl={sm:"text-xs ps-2 pe-2",md:"text-sm ps-5 pe-5",lg:"text-base ps-8 pe-8",xl:"text-base ps-11 pe-11"},ol=wa("rounded-md px-2 shadow-xs w-fit bg-white border border-rborder-primary focus:outline-2 focus:outline-rborder-brand disabled:bg-rbg-disabled-subtle disabled:border-rborder-disabled",{variants:{size:{sm:"h-9.5 py-2.5",md:"h-10.5 pt-3 pb-3"},inputType:{default:"pe-8",iconLeading:"ps-10",leadingDropdown:"pe-8",trailingDropdown:"pe-8 ps-6",leadingText:"pe-8 ps-20",trailingButton:"pe-8",shaba:"pe-12"}},defaultVariants:{size:"sm",inputType:"default"}}),al=({id:t,label:r,required:n,labelClass:o,labelStarClass:a})=>e.jsxs("label",{htmlFor:t,className:Zt("text-sm font-medium text-rtext-secondary-700",o),children:[r,n&&e.jsx("span",{className:Zt("dv-required-label text-rtext-brand-tertiary-600 mx-1",a),children:"*"})]}),sl=t.memo(({stroke:t="#98A2B3",fill:r="none",width:n="16",height:o="16"})=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:n,height:o,viewBox:"0 0 16 16",fill:r,children:e.jsx("path",{d:"M6.05998 5.99998C6.21672 5.55442 6.52608 5.17872 6.93328 4.9394C7.34048 4.70009 7.81924 4.61261 8.28476 4.69245C8.75028 4.7723 9.17252 5.01433 9.4767 5.37567C9.78087 5.737 9.94735 6.19433 9.94665 6.66665C9.94665 7.99998 7.94665 8.66665 7.94665 8.66665M7.99998 11.3333H8.00665M14.6666 7.99998C14.6666 11.6819 11.6819 14.6666 7.99998 14.6666C4.31808 14.6666 1.33331 11.6819 1.33331 7.99998C1.33331 4.31808 4.31808 1.33331 7.99998 1.33331C11.6819 1.33331 14.6666 4.31808 14.6666 7.99998Z",stroke:t,strokeWidth:"1.33333",strokeLinecap:"round",strokeLinejoin:"round"})})),il=(e,r)=>{t.useEffect(()=>{const t=t=>{e.current&&!e.current.contains(t.target)&&r()};return document.addEventListener("mousedown",t),document.addEventListener("touchstart",t),()=>{document.removeEventListener("mousedown",t),document.removeEventListener("touchstart",t)}},[e,r])},ll=({config:r,isLoading:n=!1,disabled:o=!1,className:a,tooltipClass:s,tooltipTitle:i,selectedValueLabel:l,onChange:c,options:d,buttonClass:u,contentClass:m,labelClass:f,labelStarClass:p})=>{const{label:h,name:g,error:x,hintText:b,isRequiredInput:v=!1,canSelectZero:y=!1}=r||{},[w,j]=t.useState(!1),[k,C]=t.useState(-50),[N,R]=t.useState(!1),[E,S]=t.useState(5),P=t.useRef(null);il(P,()=>R(!1));const T=t.useRef(null);return t.useEffect(()=>{w&&(()=>{if(T.current){const e=T.current.offsetHeight;C(-e+window.scrollY+40)}})()},[w]),il(T,()=>j(!1)),e.jsxs("div",{className:Zt("relative flex w-full flex-col gap-1",a),children:[h&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(al,{labelClass:f,labelStarClass:p,id:g,label:h,required:v}),i&&e.jsx("button",{type:"button",onClick:i?()=>j(e=>!e):()=>{},className:"flex-center h-4 w-4 rounded-full bg-blue-400 text-xs text-white",children:"i"})]}),e.jsxs("div",{className:"relative",children:[e.jsxs("button",{type:"button",className:Zt("flex items-center justify-between w-full bg-white border border-rborder-primary rounded-md px-2 shadow-xs text-sm text-dark/80 focus:outline-2 focus:outline-rborder-brand disabled:bg-rbg-disabled-subtle disabled:border-rborder-disabled disabled:cursor-not-allowed disabled:bg-gray-100 disabled:text-gray-500 px-4 py-2 text-left",u),onClick:()=>R(e=>!e),disabled:n||o,children:[l,N?e.jsx(ze,{className:"h-4 w-4 opacity-50"}):e.jsx(Se,{className:"h-4 w-4 opacity-50"})]}),N&&e.jsx("div",{ref:P,className:Zt("absolute left-0 mt-1 w-full rounded-md bg-gray-50 shadow-lg border border-rborder-primary z-50",m),children:e.jsxs("ul",{className:"max-h-48 overflow-auto p-2 text-sm text-start",onScroll:e=>{const{scrollTop:t,scrollHeight:r,clientHeight:n}=e.currentTarget;t+n>=r-10&&S(e=>Math.min(e+5,d?.length))},style:{maxHeight:"150px"},children:[!y&&e.jsx("li",{children:e.jsx("button",{type:"button",className:"w-full p-2 text-start text-gray-500 cursor-not-allowed",onClick:()=>R(!1),children:"-"})}),d?.slice(0,E)?.map(t=>e.jsx("li",{children:e.jsx("button",{type:"button",className:"w-full p-2 text-start cursor-pointer hover:bg-gray-100",onClick:()=>{return e=t.value,c({name:g,value:e}),void R(!1);var e},children:t.title})},t.value))]})})]}),i&&w&&e.jsx("div",{ref:T,className:Zt("absolute left-1/2 z-10 max-h-[200px] w-72 -translate-x-1/2 -translate-y-11 transform overflow-auto rounded bg-gray-500 p-3 text-start text-xs text-white shadow-md transition-all duration-200",s),style:{top:`${k}px`},dangerouslySetInnerHTML:{__html:i}}),!x&&b&&e.jsx("p",{className:"text-sm text-rtext-tertiary-600",children:b}),x&&e.jsx("p",{className:"text-sm text-rtext-error-primary-600",children:x})]})},cl=wa("w-full flex flex-col py-2.5 px-3.5 gap-2",{variants:{sender:{admin:"",user:""},variant:{primary:"bg-rbg-brand-solid text-rtext-white text-md font-normal",gray:"bg-rbg-secondary border border-rborder-secondary text-rtext-primary-900 text-md font-normal",white:"bg-rbg-primary border border-rborder-secondary"},direction:{ltr:"",rtl:""}},compoundVariants:[{sender:"admin",direction:"ltr",class:"rounded-tl-md rounded-tr-none rounded-br-md rounded-bl-md "},{sender:"user",direction:"ltr",class:"rounded-tl-none rounded-tr-md rounded-br-md rounded-bl-md"},{sender:"admin",direction:"rtl",class:" rounded-tl-md rounded-tr-none rounded-br-md rounded-bl-md"},{sender:"user",direction:"rtl",class:"rounded-tl-none rounded-tr-md rounded-br-md rounded-bl-md"}],defaultVariants:{variant:"primary",direction:"rtl"}}),dl=wa("",{variants:{direction:{ltr:"",rtl:""},sender:{admin:"",user:""}},compoundVariants:[{sender:"admin",direction:"ltr",class:"flex-row-reverse"},{sender:"admin",direction:"rtl",class:"flex-row"},{sender:"user",direction:"ltr",class:"flex-row"},{sender:"user",direction:"rtl",class:"flex-row-reverse"}],defaultVariants:{direction:"ltr",sender:"user"}});function ul({className:t,...r}){return e.jsx("div",{"data-slot":"card",className:Jt("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",t),...r})}function ml({className:t,...r}){return e.jsx("div",{"data-slot":"card-header",className:Jt("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",t),...r})}function fl({className:t,...r}){return e.jsx("div",{"data-slot":"card-action",className:Jt("col-start-2 row-span-2 row-start-1 self-start justify-self-end",t),...r})}const pl={success:"w-12 h-12 flex items-center justify-center rounded-full bg-rbg-success-secondary",notification:"w-12 h-12 flex items-center justify-center rounded-full bg-rbg-brand-secondary",secondary:"w-12 h-12 flex items-center justify-center rounded-lg bg-rbg-primary border border-gray-light-200 shadow-xs-skeuomorphic"},hl={normal:"font-medium text-sm text-rtext-tertiary-600",bold:"text-rtext-primary-900 font-normal text-md"},gl=wa("modal-container fixed left-1/2 right-auto flex max-h-[80dvh] w-4/5 cursor-default flex-col rounded bg-white text-center",{variants:{size:{sm:"max-w-rsm",md:"max-w-rmd",lg:"max-w-rlg"},overflow:{hidden:"overflow-hidden",auto:"overflow-auto"},position:{center:"top-1/2 -translate-y-1/2 animate-slide-in-center",bottom:"bottom-0 animate-slide-in-bottom"}},defaultVariants:{size:"md"}});let xl=0;const bl=t.memo(()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:e.jsx("path",{d:"M15.8334 9.99996H4.16675M4.16675 9.99996L10.0001 15.8333M4.16675 9.99996L10.0001 4.16663",stroke:"#344054",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})})),vl=t.memo(()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:e.jsx("path",{d:"M4.16675 10H15.8334M15.8334 10L10.0001 4.16669M15.8334 10L10.0001 15.8334",stroke:"#344054",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})})),yl=t.forwardRef(({className:t,...r},n)=>e.jsx("ul",{ref:n,className:Jt("flex flex-row items-center cursor-pointer",t),...r}));yl.displayName="PaginationContent";const wl=t.forwardRef(({className:t,...r},n)=>e.jsx("li",{ref:n,className:Jt("flex items-center ",t),...r}));wl.displayName="PaginationItem";const jl=({className:t,isActive:r,activeClassName:n,disabled:o,...a})=>{const s=r?n||"rounded-md border bg-[#F9FAFB] text-[#182230] border-[#F9FAFB]":"",i=o?"pointer-events-none opacity-50":"";return e.jsx("a",{"aria-current":r?"page":void 0,className:Jt("cursor-pointer inline-flex items-center gap-1.5 px-4 py-1.5 justify-center transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",r?"border border-primary text-primary":"hover:bg-accent hover:text-accent-foreground",s,i,t),...a,"aria-disabled":o,onClick:e=>{o?e.preventDefault():a.onClick?.(e)}})},kl=({currentPage:t,totalPages:r,onPageChange:n,dir:o="rtl",labels:a,previousClassName:s,nextClassName:i,className:l,prevIcon:c,nextIcon:d,...u})=>{const m="rtl"===o;return e.jsx("nav",{role:"navigation","aria-label":"pagination",className:Jt("",l),...u,children:e.jsxs(yl,{className:"flex justify-between items-center",children:[e.jsxs("div",{className:"flex",children:[e.jsx(wl,{className:"md:block hidden",children:e.jsx(jl,{size:"default","aria-label":"Go to first page",disabled:1===t,onClick:()=>n?.(1),children:a?.first})}),e.jsx(wl,{children:e.jsxs(jl,{"aria-label":"Go to previous page",size:"default",className:Jt("gap-1",s),onClick:()=>n?.(t-1),disabled:1===t,children:[e.jsx("div",{className:"md:block hidden",children:a?.prev||"قبلی"}),e.jsx("div",{className:"md:hidden block",children:m?c||e.jsx(vl,{}):d||e.jsx(bl,{})})]})})]}),e.jsxs("span",{className:"text-sm font-medium",children:[a?.page," ",t," ",a?.of," ",r]}),e.jsxs("div",{className:"flex",children:[e.jsx(wl,{children:e.jsxs(jl,{"aria-label":"Go to next page",size:"default",className:Jt("gap-1",i),onClick:()=>n?.(t+1),disabled:t===r,children:[e.jsx("span",{className:"md:block hidden",children:a?.next||"بعدی"}),e.jsx("div",{className:"md:hidden block",children:m?c||e.jsx(bl,{}):d||e.jsx(vl,{})})]})}),e.jsx(wl,{className:"md:block hidden",children:e.jsx(jl,{size:"default","aria-label":"Go to last page",disabled:t===r,onClick:()=>n?.(r),children:a?.last})})]})]})})},Cl=({currentPage:t,totalPages:r,onPageChange:n,dir:o="rtl",labels:a,previousClassName:s,nextClassName:i,className:l,...c})=>{const d="rtl"===o;return e.jsxs("nav",{role:"navigation","aria-label":"pagination",className:Jt("flex w-full items-center justify-between text-sm text-muted-foreground",l),...c,children:[e.jsxs("span",{children:[a?.page," ",t," ",a?.of," ",r]}),e.jsxs(yl,{className:"flex items-center gap-2",children:[e.jsx(wl,{children:e.jsx(jl,{"aria-label":"Go to first page",size:"default",className:"gap-1 px-2.5",onClick:()=>n?.(1),disabled:1===t||r<2,children:e.jsx("span",{children:a?.first})})}),e.jsx(wl,{children:e.jsx(jl,{"aria-label":"Go to previous page",size:"default",className:Jt("gap-1",s),onClick:()=>n?.(d?t+1:t-1),disabled:d?t===r:1===t,children:e.jsx("span",{children:d?a?.next:a?.prev})})}),e.jsx(wl,{children:e.jsx(jl,{"aria-label":"Go to next page",size:"default",className:Jt("gap-1",i),onClick:()=>n?.(d?t-1:t+1),disabled:d?1===t:t===r,children:e.jsx("span",{children:d?a?.prev:a?.next})})}),e.jsx(wl,{children:e.jsx(jl,{"aria-label":"Go to last page",size:"default",className:"gap-1 px-2.5",onClick:()=>n?.(r),disabled:t===r,children:e.jsx("span",{children:a?.last})})})]})]})},Nl=({currentPage:t,totalPages:r,onPageChange:n,labels:o,previousClassName:a,className:s,activeClassName:i,nextClassName:l,dir:c="rtl",prevIcon:d,nextIcon:u,firstIcon:m,lastIcon:f,showFirstLast:p=!0,hasText:h=!0})=>{const g=((e,t,r)=>{const n=[],o="rtl"===r;if(t<=6)for(let e=1;e<=t;e++)n.push(e);else if(e>3)if(e<t-2)n.push(1,"...",e-1,e,e+1,"...",t);else{n.push(1,2,3,"...");for(let e=t-2;e<=t;e++)n.push(e)}else{for(let e=1;e<=3;e++)n.push(e);n.push("...",t-2,t-1,t)}return o?[...n].reverse():n})(t,r,c),x="rtl"===c,b=x?[...g].reverse():g;return e.jsxs("nav",{role:"navigation","aria-label":"pagination",className:Jt("mx-auto flex w-full justify-center","rtl"===c?"rtl":"ltr",s),children:[e.jsxs("div",{className:Jt("flex gap-2",x?"ml-auto":"mr-auto"),children:[p&&e.jsxs(jl,{"aria-label":"Go to first page",size:"default",className:"gap-1 px-2.5",onClick:()=>n?.(1),disabled:1===t,children:[x?m||e.jsx(De,{}):f||e.jsx(Le,{}),h&&e.jsx("span",{children:o?.first})]}),e.jsxs(jl,{"aria-label":"Go to previous page",size:"default",className:Jt("flex items-center",a),onClick:()=>n?.(t-1),disabled:1===t,children:[x?u||e.jsx(Te,{}):d||e.jsx(Pe,{}),h&&e.jsx("span",{children:o?.prev})]})]}),e.jsx(yl,{children:b.map((r,o)=>e.jsx(wl,{children:"..."===r?e.jsx("span",{className:"px-2",children:"..."}):e.jsx(jl,{isActive:r===t,onClick:()=>n?.(Number(r)),activeClassName:Zt(i,"rounded-md"),children:r})},o))}),e.jsxs("div",{className:Jt("flex gap-2",x?"mr-auto":"ml-auto"),children:[e.jsxs(jl,{"aria-label":"Go to next page",size:"default",className:Jt("flex items-center",l),onClick:()=>n?.(t+1),disabled:t===r,children:[h&&e.jsx("span",{children:o?.next}),x?d||e.jsx(Pe,{}):u||e.jsx(Te,{})]}),p&&e.jsxs(jl,{"aria-label":"Go to last page",size:"default",className:"gap-1 px-2.5",onClick:()=>n?.(r),disabled:t===r,children:[h&&e.jsx("span",{children:o?.last}),x?f||e.jsx(Le,{}):m||e.jsx(De,{})]})]})]})},Rl=({currentPage:t,totalPages:r,onPageChange:n,dir:o="rtl",labels:a,renderPageNumbers:s,justifyClassName:i,prevIcon:l,nextIcon:c,hasText:d})=>{const u="rtl"===o;return e.jsx("nav",{role:"navigation","aria-label":"pagination",className:Jt("w-full flex",i),children:e.jsxs(yl,{className:"border border-gray-200 rounded-md",children:[e.jsx(wl,{children:e.jsx(jl,{size:"default",className:"px-3 py-1 text-sm disabled:opacity-50 flex items-center",onClick:()=>n?.(t-1),disabled:1===t,children:e.jsx("div",{className:"flex items-center gap-1",children:u?e.jsxs(e.Fragment,{children:[l||e.jsx(Te,{size:16}),d&&e.jsx("span",{className:"hidden md:block",children:a?.prev})]}):e.jsxs(e.Fragment,{children:[c||e.jsx(Pe,{size:16}),d&&e.jsx("span",{className:"hidden md:block",children:a?.prev})]})})})}),s(),e.jsx(wl,{children:e.jsx(jl,{size:"default",className:"px-3 py-1 text-sm disabled:opacity-50 flex items-center",onClick:()=>n?.(t+1),disabled:t===r,children:e.jsx("div",{className:"flex items-center gap-1",children:u?e.jsxs(e.Fragment,{children:[d&&e.jsx("span",{className:"hidden md:block",children:a?.next}),c||e.jsx(Pe,{size:16})]}):e.jsxs(e.Fragment,{children:[d&&e.jsx("span",{className:"hidden md:block",children:a?.next}),l||e.jsx(Te,{size:16})]})})})})]})})},El=({currentPage:t,totalPages:r,onPageChange:n,dir:o="rtl",labels:a,previousClassName:s,nextClassName:i,className:l,...c})=>{const d="rtl"===o;return e.jsxs("nav",{role:"navigation","aria-label":"pagination",className:Jt("flex w-full items-center justify-between text-sm text-muted-foreground",l),...c,children:[e.jsxs(yl,{className:"flex gap-2 items-center",children:[e.jsx(wl,{children:e.jsx(jl,{"aria-label":"Go to first page",size:"default",className:"gap-1 px-2.5",onClick:()=>n?.(1),disabled:1===t,children:e.jsx("span",{children:a?.first})})}),e.jsx(wl,{children:e.jsx(jl,{"aria-label":"Go to previous page",size:"default",className:Jt("gap-1",s),onClick:()=>n?.(d?t+1:t-1),disabled:d?t===r:1===t,children:e.jsx("span",{children:d?a?.next:a?.prev})})}),e.jsx(wl,{children:e.jsx(jl,{"aria-label":"Go to next page",size:"default",className:Jt("gap-1",i),onClick:()=>n?.(d?t-1:t+1),disabled:d?1===t:t===r,children:e.jsx("span",{children:d?a?.prev:a?.next})})}),e.jsx(wl,{children:e.jsx(jl,{"aria-label":"Go to last page",size:"default",className:"gap-1 px-2.5",onClick:()=>n?.(r),disabled:t===r,children:e.jsx("span",{children:a?.last})})})]}),e.jsxs("span",{children:[a?.page," ",t," ",a?.of," ",r]})]})};function Sl(e,[t,r]){return Math.min(r,Math.max(t,e))}function Pl(e){const t=o.useRef({value:e,previous:e});return o.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Tl=["PageUp","PageDown"],zl=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Ll={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Dl="Slider",[Ml,Al,Il]=g(Dl),[$l]=s(Dl,[Il]),[Ol,_l]=$l(Dl),Fl=o.forwardRef((t,r)=>{const{name:n,min:a=0,max:s=100,step:i=1,orientation:l="horizontal",disabled:c=!1,minStepsBetweenThumbs:d=0,defaultValue:u=[a],value:m,onValueChange:f=()=>{},onValueCommit:p=()=>{},inverted:h=!1,form:g,...b}=t,v=o.useRef(new Set),w=o.useRef(0),j="horizontal"===l?Vl:Hl,[k=[],C]=y({prop:m,defaultProp:u,onChange:e=>{const t=[...v.current];t[w.current]?.focus(),f(e)}}),N=o.useRef(k);function R(e,t,{commit:r}={commit:!1}){const n=function(e){return(String(e).split(".")[1]||"").length}(i),o=function(e,t){const r=Math.pow(10,t);return Math.round(e*r)/r}(Math.round((e-a)/i)*i+a,n),l=Sl(o,[a,s]);C((e=[])=>{const n=function(e=[],t,r){const n=[...e];return n[r]=t,n.sort((e,t)=>e-t)}(e,l,t);if(function(e,t){if(t>0){const r=function(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}(e);return Math.min(...r)>=t}return!0}(n,d*i)){w.current=n.indexOf(l);const t=String(n)!==String(e);return t&&r&&p(n),t?n:e}return e})}return e.jsx(Ol,{scope:t.__scopeSlider,name:n,disabled:c,min:a,max:s,valueIndexToChangeRef:w,thumbs:v.current,values:k,orientation:l,form:g,children:e.jsx(Ml.Provider,{scope:t.__scopeSlider,children:e.jsx(Ml.Slot,{scope:t.__scopeSlider,children:e.jsx(j,{"aria-disabled":c,"data-disabled":c?"":void 0,...b,ref:r,onPointerDown:x(b.onPointerDown,()=>{c||(N.current=k)}),min:a,max:s,inverted:h,onSlideStart:c?void 0:function(e){const t=function(e,t){if(1===e.length)return 0;const r=e.map(e=>Math.abs(e-t)),n=Math.min(...r);return r.indexOf(n)}(k,e);R(e,t)},onSlideMove:c?void 0:function(e){R(e,w.current)},onSlideEnd:c?void 0:function(){const e=N.current[w.current];k[w.current]!==e&&p(k)},onHomeKeyDown:()=>!c&&R(a,0,{commit:!0}),onEndKeyDown:()=>!c&&R(s,k.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!c){const r=Tl.includes(e.key)||e.shiftKey&&zl.includes(e.key)?10:1,n=w.current;R(k[n]+i*r*t,n,{commit:!0})}}})})})})});Fl.displayName=Dl;var[Bl,Wl]=$l(Dl,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Vl=o.forwardRef((t,r)=>{const{min:n,max:a,dir:s,inverted:i,onSlideStart:l,onSlideMove:c,onSlideEnd:u,onStepKeyDown:m,...f}=t,[p,h]=o.useState(null),g=d(r,e=>h(e)),x=o.useRef(void 0),b=V(s),v="ltr"===b,y=v&&!i||!v&&i;function w(e){const t=x.current||p.getBoundingClientRect(),r=tc([0,t.width],y?[n,a]:[a,n]);return x.current=t,r(e-t.left)}return e.jsx(Bl,{scope:t.__scopeSlider,startEdge:y?"left":"right",endEdge:y?"right":"left",direction:y?1:-1,size:"width",children:e.jsx(Ul,{dir:b,"data-orientation":"horizontal",...f,ref:g,style:{...f.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{const t=w(e.clientX);l?.(t)},onSlideMove:e=>{const t=w(e.clientX);c?.(t)},onSlideEnd:()=>{x.current=void 0,u?.()},onStepKeyDown:e=>{const t=Ll[y?"from-left":"from-right"].includes(e.key);m?.({event:e,direction:t?-1:1})}})})}),Hl=o.forwardRef((t,r)=>{const{min:n,max:a,inverted:s,onSlideStart:i,onSlideMove:l,onSlideEnd:c,onStepKeyDown:u,...m}=t,f=o.useRef(null),p=d(r,f),h=o.useRef(void 0),g=!s;function x(e){const t=h.current||f.current.getBoundingClientRect(),r=tc([0,t.height],g?[a,n]:[n,a]);return h.current=t,r(e-t.top)}return e.jsx(Bl,{scope:t.__scopeSlider,startEdge:g?"bottom":"top",endEdge:g?"top":"bottom",size:"height",direction:g?1:-1,children:e.jsx(Ul,{"data-orientation":"vertical",...m,ref:p,style:{...m.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{const t=x(e.clientY);i?.(t)},onSlideMove:e=>{const t=x(e.clientY);l?.(t)},onSlideEnd:()=>{h.current=void 0,c?.()},onStepKeyDown:e=>{const t=Ll[g?"from-bottom":"from-top"].includes(e.key);u?.({event:e,direction:t?-1:1})}})})}),Ul=o.forwardRef((t,r)=>{const{__scopeSlider:n,onSlideStart:o,onSlideMove:a,onSlideEnd:s,onHomeKeyDown:i,onEndKeyDown:l,onStepKeyDown:c,...d}=t,u=_l(Dl,n);return e.jsx(w.span,{...d,ref:r,onKeyDown:x(t.onKeyDown,e=>{"Home"===e.key?(i(e),e.preventDefault()):"End"===e.key?(l(e),e.preventDefault()):Tl.concat(zl).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:x(t.onPointerDown,e=>{const t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():o(e)}),onPointerMove:x(t.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&a(e)}),onPointerUp:x(t.onPointerUp,e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),s(e))})})}),Gl="SliderTrack",ql=o.forwardRef((t,r)=>{const{__scopeSlider:n,...o}=t,a=_l(Gl,n);return e.jsx(w.span,{"data-disabled":a.disabled?"":void 0,"data-orientation":a.orientation,...o,ref:r})});ql.displayName=Gl;var Kl="SliderRange",Yl=o.forwardRef((t,r)=>{const{__scopeSlider:n,...a}=t,s=_l(Kl,n),i=Wl(Kl,n),l=d(r,o.useRef(null)),c=s.values.length,u=s.values.map(e=>ec(e,s.min,s.max)),m=c>1?Math.min(...u):0,f=100-Math.max(...u);return e.jsx(w.span,{"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,...a,ref:l,style:{...t.style,[i.startEdge]:m+"%",[i.endEdge]:f+"%"}})});Yl.displayName=Kl;var Xl="SliderThumb",Zl=o.forwardRef((t,r)=>{const n=Al(t.__scopeSlider),[a,s]=o.useState(null),i=d(r,e=>s(e)),l=o.useMemo(()=>a?n().findIndex(e=>e.ref.current===a):-1,[n,a]);return e.jsx(Jl,{...t,ref:i,index:l})}),Jl=o.forwardRef((t,r)=>{const{__scopeSlider:n,index:a,name:s,...i}=t,l=_l(Xl,n),c=Wl(Xl,n),[u,m]=o.useState(null),f=d(r,e=>m(e)),p=!u||(l.form||!!u.closest("form")),h=co(u),g=l.values[a],b=void 0===g?0:ec(g,l.min,l.max),v=function(e,t){return t>2?`Value ${e+1} of ${t}`:2===t?["Minimum","Maximum"][e]:void 0}(a,l.values.length),y=h?.[c.size],j=y?function(e,t,r){const n=e/2,o=tc([0,50],[0,n]);return(n-o(t)*r)*r}(y,b,c.direction):0;return o.useEffect(()=>{if(u)return l.thumbs.add(u),()=>{l.thumbs.delete(u)}},[u,l.thumbs]),e.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[c.startEdge]:`calc(${b}% + ${j}px)`},children:[e.jsx(Ml.ItemSlot,{scope:t.__scopeSlider,children:e.jsx(w.span,{role:"slider","aria-label":t["aria-label"]||v,"aria-valuemin":l.min,"aria-valuenow":g,"aria-valuemax":l.max,"aria-orientation":l.orientation,"data-orientation":l.orientation,"data-disabled":l.disabled?"":void 0,tabIndex:l.disabled?void 0:0,...i,ref:f,style:void 0===g?{display:"none"}:t.style,onFocus:x(t.onFocus,()=>{l.valueIndexToChangeRef.current=a})})}),p&&e.jsx(Ql,{name:s??(l.name?l.name+(l.values.length>1?"[]":""):void 0),form:l.form,value:g},a)]})});Zl.displayName=Xl;var Ql=o.forwardRef(({__scopeSlider:t,value:r,...n},a)=>{const s=o.useRef(null),i=d(s,a),l=Pl(r);return o.useEffect(()=>{const e=s.current;if(!e)return;const t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"value").set;if(l!==r&&n){const t=new Event("input",{bubbles:!0});n.call(e,r),e.dispatchEvent(t)}},[l,r]),e.jsx(w.input,{style:{display:"none"},...n,ref:i,defaultValue:r})});function ec(e,t,r){return Sl(100/(r-t)*(e-t),[0,100])}function tc(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}Ql.displayName="RadioBubbleInput";var rc=Fl,nc=ql,oc=Yl,ac=Zl;var sc="Switch",[ic]=s(sc),[lc,cc]=ic(sc),dc=o.forwardRef((t,r)=>{const{__scopeSwitch:n,name:a,checked:s,defaultChecked:i,required:l,disabled:c,value:u="on",onCheckedChange:m,form:f,...p}=t,[h,g]=o.useState(null),b=d(r,e=>g(e)),v=o.useRef(!1),j=!h||(f||!!h.closest("form")),[k,C]=y({prop:s,defaultProp:i??!1,onChange:m,caller:sc});return e.jsxs(lc,{scope:n,checked:k,disabled:c,children:[e.jsx(w.button,{type:"button",role:"switch","aria-checked":k,"aria-required":l,"data-state":pc(k),"data-disabled":c?"":void 0,disabled:c,value:u,...p,ref:b,onClick:x(t.onClick,e=>{C(e=>!e),j&&(v.current=e.isPropagationStopped(),v.current||e.stopPropagation())})}),j&&e.jsx(fc,{control:h,bubbles:!v.current,name:a,value:u,checked:k,required:l,disabled:c,form:f,style:{transform:"translateX(-100%)"}})]})});dc.displayName=sc;var uc="SwitchThumb",mc=o.forwardRef((t,r)=>{const{__scopeSwitch:n,...o}=t,a=cc(uc,n);return e.jsx(w.span,{"data-state":pc(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:r})});mc.displayName=uc;var fc=o.forwardRef(({__scopeSwitch:t,control:r,checked:n,bubbles:a=!0,...s},i)=>{const l=o.useRef(null),c=d(l,i),u=Pl(n),m=co(r);return o.useEffect(()=>{const e=l.current;if(!e)return;const t=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(t,"checked").set;if(u!==n&&r){const t=new Event("click",{bubbles:a});r.call(e,n),e.dispatchEvent(t)}},[u,n,a]),e.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:c,style:{...s.style,...m,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function pc(e){return e?"checked":"unchecked"}fc.displayName="SwitchBubbleInput";var hc=dc,gc=mc;function xc({label:t,labelClassName:r,handleClick:n,description:o,descriptionClassName:a}){return e.jsxs("div",{className:"flex flex-col gap-1",children:[t&&e.jsx(di,{type:"button",variant:"linkGray",className:Jt("text-sm",r),onClick:n,children:t}),o&&e.jsx("span",{className:Jt("text-xs text-gray-500",a),children:o})]})}const bc=o.forwardRef(({className:t,thumbClassName:r,label:n,labelClassName:a,descriptionClassName:s,description:i,onToggle:l,...c},d)=>{const[u,m]=o.useState(!1),f=()=>{m(e=>!e),l()};return e.jsxs("div",{className:Jt("flex gap-1",i?"items-start":"items-center"),children:[e.jsx(hc,{ref:d,className:Jt("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-start rounded-full border-2 border-transparent transition-colors focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-brand-600 data-[state=unchecked]:bg-gray-light-100",t,i?"mt-0.5":"mt-0"),onCheckedChange:f,checked:u,...c,children:e.jsx(gc,{className:Jt("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:-translate-x-5 data-[state=checked]:ltr:translate-x-5 data-[state=unchecked]:-translate-x-0",r)})}),e.jsx(xc,{label:n,labelClassName:a,handleClick:f,description:i,descriptionClassName:s})]})});bc.displayName="Switch";var vc="rovingFocusGroup.onEntryFocus",yc={bubbles:!1,cancelable:!0},wc="RovingFocusGroup",[jc,kc,Cc]=g(wc),[Nc,Rc]=s(wc,[Cc]),[Ec,Sc]=Nc(wc),Pc=o.forwardRef((t,r)=>e.jsx(jc.Provider,{scope:t.__scopeRovingFocusGroup,children:e.jsx(jc.Slot,{scope:t.__scopeRovingFocusGroup,children:e.jsx(Tc,{...t,ref:r})})}));Pc.displayName=wc;var Tc=o.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:n,orientation:a,loop:s=!1,dir:i,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:m,preventScrollOnEntryFocus:f=!1,...p}=t,h=o.useRef(null),g=d(r,h),b=V(i),[v,j]=y({prop:l,defaultProp:c??null,onChange:u,caller:wc}),[k,C]=o.useState(!1),N=cr(m),R=kc(n),E=o.useRef(!1),[S,P]=o.useState(0);return o.useEffect(()=>{const e=h.current;if(e)return e.addEventListener(vc,N),()=>e.removeEventListener(vc,N)},[N]),e.jsx(Ec,{scope:n,orientation:a,dir:b,loop:s,currentTabStopId:v,onItemFocus:o.useCallback(e=>j(e),[j]),onItemShiftTab:o.useCallback(()=>C(!0),[]),onFocusableItemAdd:o.useCallback(()=>P(e=>e+1),[]),onFocusableItemRemove:o.useCallback(()=>P(e=>e-1),[]),children:e.jsx(w.div,{tabIndex:k||0===S?-1:0,"data-orientation":a,...p,ref:g,style:{outline:"none",...t.style},onMouseDown:x(t.onMouseDown,()=>{E.current=!0}),onFocus:x(t.onFocus,e=>{const t=!E.current;if(e.target===e.currentTarget&&t&&!k){const t=new CustomEvent(vc,yc);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=R().filter(e=>e.focusable);Mc([e.find(e=>e.active),e.find(e=>e.id===v),...e].filter(Boolean).map(e=>e.ref.current),f)}}E.current=!1}),onBlur:x(t.onBlur,()=>C(!1))})})}),zc="RovingFocusGroupItem",Lc=o.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:n,focusable:a=!0,active:s=!1,tabStopId:i,children:l,...c}=t,d=R(),u=i||d,m=Sc(zc,n),f=m.currentTabStopId===u,p=kc(n),{onFocusableItemAdd:h,onFocusableItemRemove:g,currentTabStopId:b}=m;return o.useEffect(()=>{if(a)return h(),()=>g()},[a,h,g]),e.jsx(jc.ItemSlot,{scope:n,id:u,focusable:a,active:s,children:e.jsx(w.span,{tabIndex:f?0:-1,"data-orientation":m.orientation,...c,ref:r,onMouseDown:x(t.onMouseDown,e=>{a?m.onItemFocus(u):e.preventDefault()}),onFocus:x(t.onFocus,()=>m.onItemFocus(u)),onKeyDown:x(t.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void m.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,r){const n=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,r);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(n)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(n)?void 0:Dc[n]}(e,m.orientation,m.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let o=p().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const a=o.indexOf(e.currentTarget);o=m.loop?(n=a+1,(r=o).map((e,t)=>r[(n+t)%r.length])):o.slice(a+1)}setTimeout(()=>Mc(o))}var r,n}),children:"function"==typeof l?l({isCurrentTabStop:f,hasTabStop:null!=b}):l})})});Lc.displayName=zc;var Dc={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Mc(e,t=!1){const r=document.activeElement;for(const n of e){if(n===r)return;if(n.focus({preventScroll:t}),document.activeElement!==r)return}}var Ac=Pc,Ic=Lc,$c="Tabs",[Oc]=s($c,[Rc]),_c=Rc(),[Fc,Bc]=Oc($c),Wc=o.forwardRef((t,r)=>{const{__scopeTabs:n,value:o,onValueChange:a,defaultValue:s,orientation:i="horizontal",dir:l,activationMode:c="automatic",...d}=t,u=V(l),[m,f]=y({prop:o,onChange:a,defaultProp:s??"",caller:$c});return e.jsx(Fc,{scope:n,baseId:R(),value:m,onValueChange:f,orientation:i,dir:u,activationMode:c,children:e.jsx(w.div,{dir:u,"data-orientation":i,...d,ref:r})})});Wc.displayName=$c;var Vc="TabsList",Hc=o.forwardRef((t,r)=>{const{__scopeTabs:n,loop:o=!0,...a}=t,s=Bc(Vc,n),i=_c(n);return e.jsx(Ac,{asChild:!0,...i,orientation:s.orientation,dir:s.dir,loop:o,children:e.jsx(w.div,{role:"tablist","aria-orientation":s.orientation,...a,ref:r})})});Hc.displayName=Vc;var Uc="TabsTrigger",Gc=o.forwardRef((t,r)=>{const{__scopeTabs:n,value:o,disabled:a=!1,...s}=t,i=Bc(Uc,n),l=_c(n),c=Yc(i.baseId,o),d=Xc(i.baseId,o),u=o===i.value;return e.jsx(Ic,{asChild:!0,...l,focusable:!a,active:u,children:e.jsx(w.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":d,"data-state":u?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:c,...s,ref:r,onMouseDown:x(t.onMouseDown,e=>{a||0!==e.button||!1!==e.ctrlKey?e.preventDefault():i.onValueChange(o)}),onKeyDown:x(t.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&i.onValueChange(o)}),onFocus:x(t.onFocus,()=>{const e="manual"!==i.activationMode;u||a||!e||i.onValueChange(o)})})})});Gc.displayName=Uc;var qc="TabsContent",Kc=o.forwardRef((t,r)=>{const{__scopeTabs:n,value:a,forceMount:s,children:i,...l}=t,c=Bc(qc,n),d=Yc(c.baseId,a),u=Xc(c.baseId,a),m=a===c.value,f=o.useRef(m);return o.useEffect(()=>{const e=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(e)},[]),e.jsx(j,{present:s||m,children:({present:n})=>e.jsx(w.div,{"data-state":m?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":d,hidden:!n,id:u,tabIndex:0,...l,ref:r,style:{...t.style,animationDuration:f.current?"0s":void 0},children:n&&i})})});function Yc(e,t){return`${e}-trigger-${t}`}function Xc(e,t){return`${e}-content-${t}`}Kc.displayName=qc;var Zc=Wc,Jc=Hc,Qc=Gc,ed=Kc;const td=wa(" text-muted-foreground inline-flex flex-row h-9 items-center",{variants:{listVariant:{brand:"",gray:"",outlined:"border-b border-rborder-secondary gap-2",bordered:"rounded-lg border border-rborder-secondary bg-rbg-secondary-alt p-1",minimal:" rounded-md border border-rborder-secondary bg-rbg-secondary-alt !gap-0.5"},fullWidth:{true:"justify-between",false:"justify-start gap-1"},direction:{vertical:"flex-col min-h-fit max-w-fit ",horizontal:"flex-row w-full"}},defaultVariants:{listVariant:"brand",fullWidth:!0,direction:"horizontal"}}),rd=wa(" h-full py-2 px-3 cursor-pointer inline-flex items-center justify-center gap-2 text-sm font-normal whitespace-nowrap transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{triggerVariant:{brand:"text-rtext-quaternary-500 data-[state=active]:rounded-sm data-[state=active]:bg-rbg-brand-primary-alt data-[state=active]:text-rtext-brand-secondary-700 ",gray:"text-rtext-quaternary-500 data-[state=active]:rounded-sm data-[state=active]:bg-rbg-active data-[state=active]:text-rtext-secondary-700 ",outlined:"text-rtext-quaternary-500 data-[state=active]:text-rtext-brand-secondary-700 pb-2.5 data-[state=active]:pb-2 data-[state=active]:border-b-2 data-[state=active]:border-rgf-brand-primary-alt",bordered:"text-rtext-quaternary-500 data-[state=active]:rounded-sm data-[state=active]:text-rtext-secondary-700 data-[state=active]:bg-rbg-primary-alt data-[state=active]:shadow-sm",minimal:"text-rtext-quaternary-500 data-[state=active]:rounded-md data-[state=active]:text-rtext-secondary-700 data-[state=active]:bg-rbg-primary-alt data-[state=active]:border data-[state=active]:border-rborder-primary data-[state=active]:shadow-xs"},fullWidth:{true:"w-full",false:"w-fit justify-start gap-1 items-center"}},defaultVariants:{triggerVariant:"gray",fullWidth:!0}});const nd=Object.assign(({className:t,direction:r="horizontal",dir:n="rtl",...o})=>e.jsx(Zc,{"data-slot":"tabs",dir:n,className:Jt("flex gap-2","horizontal"==r?"flex-col":"flex-row",t),...o}),{List:function({className:t,listVariant:r,direction:n="horizontal",fullWidth:o=!1,...a}){return e.jsx(Jc,{"data-slot":"tabs-list",className:Jt(td({fullWidth:o,listVariant:r,direction:n}),t),...a})},Trigger:function({className:t,triggerVariant:r,fullWidth:n,...o}){return e.jsx(Qc,{"data-slot":"tabs-trigger",className:Jt(rd({triggerVariant:r,fullWidth:n}),t),...o})},Content:function({className:t,...r}){return e.jsx(ed,{"data-slot":"tabs-content",className:Jt("flex-1 outline-none",t),...r})}}),od=wa("inline-flex items-center h-fit min-w-fit bg-white w-fit rounded-md text-rtext-secondary-700 font-medium border border-rborder-primary",{variants:{size:{sm:"px-2 py-[3px] text-xs gap-1",md:"px-[9px] py-0.5 text-sm gap-[5px]",lg:"px-2.5 py-1 text-sm gap-1.5"},dir:{ltr:"flex-row-reverse",rtl:"flex-row"},icon:{"x-close":"x-close"}},defaultVariants:{size:"sm",dir:"rtl"}}),ad=wa("",{variants:{size:{sm:"px-1 leading-[var(--line-height-text-xs)]",md:"px-[5px] leading-[var(--line-height-text-xs)]",lg:"px-1.5 leading-[var(--line-height-text-sm)]"}},defaultVariants:{size:"sm"}}),sd=wa("",{variants:{size:{sm:"10",md:"12",lg:"14"}},defaultVariants:{size:"sm"}});function id({number:t,size:r}){return e.jsx("div",{className:Jt(ad({size:r}),"bg-gray-light-100 rounded-[3px]"),children:t})}const ld=wa("rounded-md p-2 shadow-xs w-fit bg-white border border-rborder-primary focus:outline-2 focus:outline-rborder-brand disabled:bg-rbg-disabled-subtle disabled:border-rborder-disabled w-full"),cd={success:e.jsx(Me,{className:"text-green-100",size:20}),error:e.jsx(Ae,{className:"text-red-100",size:20}),info:e.jsx(Fe,{className:"text-blue-100",size:20}),warning:e.jsx(We,{className:"text-yellow-100",size:20})},dd={success:"bg-green-500",error:"bg-red-500",info:"bg-blue-500",warning:"bg-yellow-500 text-black"},ud={fade:"transition-all duration-300",slide:"transition-all duration-300 transform translate-x-0",scale:"transition-all duration-300 transform scale-100"},md={fade:"opacity-0",slide:"translate-x-10 opacity-0",scale:"scale-0 opacity-0"};function fd(e){switch(e){case"top-left":return"top-4 left-4";case"top-center":return"top-4 left-1/2 -translate-x-1/2";case"top-right":default:return"top-4 right-4";case"middle-center":return"top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2";case"bottom-left":return"bottom-4 left-4";case"bottom-center":return"bottom-4 left-1/2 -translate-x-1/2";case"bottom-right":return"bottom-4 right-4"}}const pd=["top-left","top-center","top-right","middle-center","bottom-left","bottom-center","bottom-right"];let hd={};function gd(e){hd=e}function xd(e){const t="string"==typeof e?{...hd,message:e,type:hd?.type??"info"}:{...hd,...e},r=new CustomEvent("custom-toast",{detail:t});window.dispatchEvent(r)}xd.success=(e,t)=>xd({...hd,...t,message:e,type:"success"}),xd.error=(e,t)=>xd({...hd,...t,message:e,type:"error"}),xd.info=(e,t)=>xd({...hd,...t,message:e,type:"info"}),xd.warning=(e,t)=>xd({...hd,...t,message:e,type:"warning"}),exports.AccordionDemo=function({type:t="single",collapsible:r=!1,items:n,accordionClassName:o="w-full bg-white p-4",itemClassName:a="border-b last:border-b-0",questionClassName:s="text-lg font-medium",answerClassName:i="text-sm text-gray-600",iconClosed:l,iconOpen:c}){return e.jsx(Qt,{type:t,collapsible:r,className:`${o}`,children:n.map((t,r)=>e.jsxs(er,{value:`item-${r}`,className:a,children:[e.jsx(tr,{className:s,iconClosed:l,iconOpen:c,children:t.question}),e.jsx(rr,{className:i,children:t.answer})]},r))})},exports.Avatar=({type:t,size:r="md",imgList:n=[],img:o={},showAmount:a=1,showAddBtn:s=!1,notifyColor:i="",notifyIcon:l="",title:c="",description:d="",iconBorder:u=!0,tooltip:m,addBtnAction:f=()=>{}})=>e.jsxs(e.Fragment,{children:["single"==t&&e.jsx(xa,{img:o,size:r,notifyColor:i,notifyIcon:l,iconBorder:u}),"group"==t&&e.jsx(ga,{imgList:n,size:r,showAmount:a,showAddBtn:s,tooltip:m,addBtnAction:f}),"labled"==t&&e.jsxs("div",{className:Jt("inline-flex items-center",sr[r]),children:[e.jsx(xa,{img:o,size:r,notifyColor:i,notifyIcon:l,iconBorder:u}),e.jsx(lr,{size:r,title:c,description:d})]})]}),exports.Badge=ka,exports.Breadcrumb=({breadCrumbLink:r,type:n="chevron",dir:o,navClassName:a,listClassName:s,listItemClassName:i="",linkClassName:l,separatorClassName:c,showHomeIcon:d=!0})=>{const[u,m]=t.useState("");t.useEffect(()=>{"undefined"!=typeof window&&m(window.location.pathname)},[]);const f=o??("rtl"===document?.body?.getAttribute("dir")?"rtl":"ltr"),p=()=>{switch(n){case"chevron":return"rtl"===f?e.jsx(Ca,{}):e.jsx(Na,{});case"slash":return e.jsx(Ea,{});default:return e.jsx(Na,{})}},h=[...d?[{title:e.jsx(Ra,{}),link:"/"}]:[],...r],g=h.findIndex(e=>e.link===u),x=g>=0?h.slice(0,g+1):h;return e.jsx("nav",{className:`w-full overflow-x-auto scrollbar-thin scrollbar-thumb-gray-400 ${a??""}`,dir:f,role:"link",children:e.jsxs("ol",{className:`flex flex-nowrap items-center gap-x-1 lg:gap-x-2 w-max py-2 rounded-md ${s??""}`,children:[" ",x.map((t,r)=>{const n=t.link??"",o=r!==x.length-1,a=u===n;return e.jsxs("li",{className:Jt("flex items-center text-sm font-normal leading-normal transition-colors duration-300 ",i),children:[t.link?e.jsx(oi,{to:n,className:`${l??"cursor-pointer transition-colors duration-300"} ${a?"text-rtext-brand-tertiary-600":"text-rtext-placeholder"}`,children:t.title}):e.jsx("span",{className:"text-gray-500",children:t.title}),o&&e.jsx("span",{className:`${c??"ms-2"}`,children:p()})]},`${n}-${r}`)})]})})},exports.Button=di,exports.Checkbox=hi,exports.Dropdown=({children:r,toggleBtn:n,direction:o="down",alignment:a="right",dropDownClassName:s="",autoAdjust:i=!0,open:l,onOpenChange:c})=>{const[d,u]=t.useState(!1),[m,f]=t.useState(o),[p,h]=t.useState(a),g=void 0!==l&&"function"==typeof c,x=l??d,b=t.useRef(null),v=t.useRef(null),y=t.useRef(0);t.useEffect(()=>{const e=e=>{b.current&&!b.current.contains(e.target)&&w(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),t.useLayoutEffect(()=>{if(!i)return f(o),void h(a);if(x&&b.current&&v.current){const e=b.current.getBoundingClientRect(),t=v.current.getBoundingClientRect(),r=t.width||200,n=t.height||200,s=window.innerHeight-e.bottom,i=e.top,l=window.innerWidth-e.right,c=e.left;if("down"===o||"up"===o)f(s<n&&i>s?"up":"down"),h(a);else if("left"===o||"right"===o)"left"===o?f(c<r&&l>c?"right":"left"):"right"===o&&f(l<r&&c>l?"left":"right"),h(a);else{Math.max(s,i)>Math.max(l,c)?(f(s>i?"down":"up"),h(a)):(f(l>c?"right":"left"),h(a))}}},[x,o,a,i]);const w=e=>{g&&c?c(e):u(e)};return e.jsxs("div",{className:"relative inline-block",ref:b,children:[e.jsx(di,{...n,onClick:()=>w(!x)}),x&&e.jsx("div",{ref:v,style:{zIndex:Li(y.current)},className:Jt("absolute border border-rborder-secondary w-fit rounded-md shadow-lg bg-rbg-primary",Di({direction:m,alignment:p}),s),children:r})]})},exports.FileUploader=({icon:t,mainText:r,subText:n,formatText:o,acceptableFormats:a="",disable:s=!1,items:i,loadType:l="progressBar",multiItem:c=!1,onChange:d,onDelete:u})=>e.jsxs("div",{className:"w-full flex flex-col gap-4",children:[e.jsx(Mi,{icon:t,mainText:r,subText:n,formatText:o,acceptableFormats:a,disable:s,multiItem:c,onChange:d}),i&&i.length>0&&e.jsx("div",{className:"flex flex-col gap-3",children:i.map(t=>e.jsx(el,{item:t,loadType:l,onDelete:u},t?.title))})]}),exports.ImageMagnify=function({src:r,alt:n="",zoom:o=2,lensSize:a=140,className:s="",lensVisibleClassName:i="hidden md:block",zoomPaneVisibleClassName:l="hidden md:block",touchToggle:c=!0,zoomPaneSize:d,zoomPanePosition:u="right",zoomMode:m="pane"}){const f=t.useRef(null),p=t.useRef(null),[h,g]=t.useState(!1),[x,b]=t.useState(rl),[v,y]=t.useState({w:0,h:0}),[w,j]=t.useState(!1);t.useEffect(()=>{const e=()=>{const e=p.current;e&&y({w:e.width,h:e.height})},t=p.current;if(t)return t.complete&&e(),t.addEventListener("load",e),window.addEventListener("resize",e),()=>{t.removeEventListener("load",e),window.removeEventListener("resize",e)}},[r]);const k=(e,t)=>{const r=p.current;if(!r)return rl;const n=r.getBoundingClientRect();if(0===n.width||0===n.height)return rl;return{x:tl(e-n.left,0,n.width),y:tl(t-n.top,0,n.height)}},C=e=>{const t="nativeEvent"in e?e.nativeEvent:e;if("touches"in t&&t.touches?.length>0){const e=t.touches[0];return void b(k(e.clientX,e.clientY))}"number"==typeof t.clientX&&b(k(t.clientX,t.clientY))},N=()=>{g(!1),w&&j(!1)},R=p.current?.getBoundingClientRect(),E=(R?.width??v.w)||1,S=(R?.height??v.h)||1,P=`${E*o}px ${S*o}px`,T=`${x.x/E*100}% ${x.y/S*100}%`,z=d??E,L=d??S,D={width:a,height:a,left:tl(x.x-a/2,0,Math.max(E-a,0)),top:tl(x.y-a/2,0,Math.max(S-a,0)),backgroundImage:"inline"===m?`url(${r})`:"none",backgroundRepeat:"no-repeat",backgroundSize:"inline"===m?P:void 0,backgroundPosition:"inline"===m?T:void 0},M={width:z,height:L,backgroundImage:`url(${r})`,backgroundRepeat:"no-repeat",backgroundSize:P,backgroundPosition:T},A="left"===u,I=h?i:"hidden",$="pane"===m&&h?l:"hidden";return e.jsxs("div",{className:`relative w-fit inline-block align-top ${s}`,children:[e.jsxs("div",{ref:f,className:"relative select-none touch-none",onMouseMove:e=>{C(e)},onMouseEnter:()=>{g(!0)},onMouseLeave:N,onTouchStart:e=>{c&&(e.preventDefault(),w?(j(!1),g(!1)):(j(!0),g(!0),C(e)))},onTouchMove:e=>{w&&(e.preventDefault(),C(e))},onTouchEnd:N,children:[e.jsx("img",{ref:p,src:r,alt:n,className:"block max-w-full h-auto select-none",draggable:!1,onDragStart:e=>e.preventDefault()}),e.jsx("div",{className:`pointer-events-none absolute rounded-full border-2 border-white shadow-lg ${I} ${"inline"===m?"bg-white/10 backdrop-blur":"bg-transparent"}`,style:D})]}),e.jsx("div",{className:`${$} absolute top-1/2 -translate-y-1/2 overflow-hidden rounded-lg border border-slate-200 shadow-sm \n ${A?"right-full mr-3":"left-full ml-3"}\n `,style:M})]})},exports.Input=({size:r="sm",type:n="text",inputType:o="default",disabled:a=!1,id:s,label:i,required:l=!1,error:c,hintText:d,placeholder:u,helpIcon:m=!1,icon:f,leadingTextValue:p,className:h,trailingDropdownOptions:g,trailingDropdownDefault:x,onChange:b,value:v,tooltipProps:y,trailingButtonText:w,name:j,labelClass:k,labelStarClass:C,shabaLabelSize:N="lg",autoFocus:R=!1,...E})=>{const S=f,[P,T]=t.useState(),[z,L]=t.useState(!1);return e.jsxs("div",{className:"flex flex-col gap-1 items-start",children:[e.jsx(al,{id:s,label:i,required:l,labelClass:k,labelStarClass:C}),e.jsxs("div",{className:"relative w-full",children:[S&&"iconLeading"==o&&e.jsx("div",{"aria-label":"iconLeading",className:"absolute ltr:left-3 rtl:right-3 top-1/2 -translate-y-1/2",children:e.jsx(S,{})}),p&&"leadingText"==o&&e.jsx("div",{"aria-label":"leadingText",className:`h-full absolute text-sm text-rfg-tertiary-600 ltr:left-3 rtl:right-3 top-1/2 -translate-y-1/2 border-e pe-2 w-15 truncate text-center ${"sm"===r?"pt-2":"pt-2.5"} \n ${!0===Boolean(c)?"border-rborder-error":"border-rborder-primary"}`,children:p}),"trailingDropdown"==o&&e.jsx("p",{className:"absolute ltr:left-2 rtl:right-2 top-1/2 -translate-y-1/2",children:P?P?.icon:x?.icon}),e.jsx("input",{value:v,name:j,onChange:b,placeholder:u,autoFocus:R,className:Jt(ol({size:r,inputType:o}),h,Boolean(c)&&"bg-rbg-disabled-subtle",Boolean(c)&&"!border-2 !border-rborder-error focus:!outline-0",a&&"bg-rbg-disabled-subtle border-rborder-disabled"),type:"password"===n&&z?"text":n,id:s,disabled:a,...E}),"password"===n&&e.jsx("div",{className:"absolute top-1/2 -translate-y-1/2 ltr:right-2 rtl:left-2 w-fit h-5 flex items-center justify-center",children:e.jsx(di,{type:"button",variant:"linkGray",onClick:()=>L(!z),children:z?e.jsx(Oe,{size:18,className:"text-rbutton-tertiary-fg"}):e.jsx(_e,{size:18,className:"text-rbutton-tertiary-fg"})})}),m&&y&&!1===Boolean(c)&&e.jsx(pa,{content:y?.text,description:y?.description,position:y?.position,dir:y?.dir,descriptionClassName:y?.descriptionClassName,children:e.jsx("div",{"data-testid":"tooltip-button",className:"w-fit absolute top-1/2 -translate-y-1/2 \n "+("trailingButton"==o||"trailingDropdown"==o?"ltr:right-20 rtl:left-20":"shaba"==o?"ltr:right-12 rtl:left-12":"ltr:right-2 rtl:left-2"),children:e.jsx(sl,{})})}),"trailingButton"==o&&e.jsxs("button",{"aria-label":"copyButton",onClick:()=>{return e=String(v),void navigator.clipboard.writeText(e);var e},className:"flex items-center gap-1 h-full absolute text-sm text-rbutton-secondary-fg cursor-pointer ltr:right-3 rtl:left-3 top-1/2 -translate-y-1/2 border-s ps-2 "+(!0===Boolean(c)?"border-rborder-error":"border-rborder-primary"),children:[e.jsx($e,{size:20})," ",w]}),"trailingDropdown"==o&&e.jsx(ll,{onChange:e=>{const t=g?.find(t=>t?.value===e?.value);T(t??e)},options:g??[],selectedValueLabel:x?.title??"-",config:{canSelectZero:!0,name:"trailingDropdown"},className:Zt("w-fit absolute rtl:left-0 ltr:right-0 top-0",Boolean(c)&&"border-2 border-error-500 rounded-xl")}),"shaba"==o&&e.jsx("div",{"aria-label":"shabaLabel",className:Jt("flex items-center h-full absolute text-rfg-tertiary-600 ltr:right-0 rtl:left-0 top-1/2 -translate-y-1/2 border-s",nl[N],!0===Boolean(c)?"border-rborder-error":"border-rborder-primary"),children:"IR"})]}),!1===Boolean(c)&&d&&e.jsx("p",{className:"text-sm text-rtext-tertiary-600",children:d}),Boolean(c)&&e.jsx("p",{className:"text-sm text-rtext-error-primary-600",children:c})]})},exports.Message=({variant:t,sender:r,senderName:n,message:o,children:a,avatar:s,date:i,className:l,dir:c})=>{const d=c??("rtl"===document?.body?.getAttribute("dir")?"rtl":"ltr");return e.jsx("div",{className:Jt("w-full flex ",dl({sender:r,direction:d})),"data-testid":"messageWrapper",children:e.jsxs("div",{className:Jt("w-fit max-w-4/5 flex gap-3",dl({sender:r,direction:d}),l),"data-testid":"messageComp",children:[s??null,e.jsxs("div",{className:"w-full flex flex-col gap-1.5",children:[e.jsxs("div",{className:Jt("w-full flex justify-between items-center",dl({sender:r,direction:d})),children:[e.jsx("span",{className:"text-rtext-secondary-700 text-sm font-medium",children:n}),e.jsx("span",{className:"text-rtext-tertiary-600 text-xs font-normal",children:i})]}),e.jsxs("div",{className:Jt(cl({variant:t,sender:r,direction:d})),children:[o&&e.jsx("span",{className:"",children:o}),a??null]})]})]})})},exports.Metrics=({title:r,value:n,description:o,icon:a,iconType:s="secondary",statistic:i,chartImg:l,chartPosition:c,actionBtns:d,toggleBtn:u,iconPosition:m="hidden",statisticPosition:f,titleType:p="normal"})=>e.jsxs(ul,{className:"flex flex-col gap-0 rounded-xl border border-rborder-secondary bg-rbg-primary shadow-xs w-full sm:max-w-[380px] max-w-[311px] h-fit justify-start p-0",children:[e.jsxs("div",{className:"flex gap-5 w-full py-5 px-4 sm:p-6",children:["iconSide"==m&&e.jsx("div",{className:Jt("self-center",pl[s]),children:a}),e.jsxs("div",{className:Jt("flex flex-col h-full items-end gap-2 w-full",`${("topWithTitle"==m||"topAlone"==m)&&"gap-5 md:gap-6"}`),children:[e.jsxs(ml,{className:"flex justify-between w-full px-0",children:[e.jsxs("div",{className:"flex items-center gap-3 ",children:[("topWithTitle"==m||"topAlone"==m)&&e.jsx("div",{className:pl[s],children:a}),"topAlone"!=m&&e.jsx("span",{className:hl[p],children:r})]}),u]}),e.jsxs("div",{className:"flex flex-col w-full gap-2",children:["topAlone"==m&&e.jsx("span",{className:hl[p],children:r}),e.jsxs("div",{className:"w-full flex justify-between gap-4",children:[e.jsxs("div",{className:Jt("flex justify-between items-center w-full h-fit px-0",`${"row-below"==f&&"flex-col just-start items-start gap-4"}`,`${"row-next"==f&&"flex justify-start items-start gap-2"}`),children:[e.jsx("span",{className:"text-display-md font-normal text-rtext-primary-900",children:n}),e.jsxs("div",{className:"flex gap-2 items-center",children:[i,o&&e.jsx("span",{className:"font-medium text-sm text-rtext-tertiary-600",children:o})]})]}),"side"==c&&e.jsx("div",{className:"w-full",children:l})]})]}),"bottom"==c&&e.jsx("div",{className:"w-full",children:l})]})]}),d&&e.jsx(fl,{className:"flex flex-row-reverse items-center justify-between py-4 px-6 border-t border-rborder-secondary gap-1.5 w-full",children:d?.map((r,n)=>e.jsx(t.Fragment,{children:r},n))})]}),exports.Modal=({children:n,closeHandler:o,size:a="md",modalTitle:s,overflow:i,closeIconStroke:l="#000",position:c="center",icon:d,headerIconDir:u="flex-col",showModal:m=!1,modalContentStyle:f,showCloseIcon:p=!0})=>{const h=t.useRef(++xl);return t.useEffect(()=>(m&&(document.body.style.overflow="hidden"),()=>{xl--,document.body.style.overflow=""}),[m]),m?r.createPortal(e.jsxs(e.Fragment,{children:[e.jsx("button",{className:"fixed left-0 top-0 h-full min-h-screen w-full cursor-default overflow-hidden bg-black/60 duration-0",style:{zIndex:Li(h.current)},onClick:o}),e.jsxs("dialog",{open:!0,"aria-label":"modal-container",className:Zt(gl({size:a,overflow:i,position:c}),f),style:{zIndex:zi(h.current)},children:[e.jsxs("div",{className:("flex-col"==u?"items-start":"items-center")+"\n sticky top-0 z-10 flex justify-between gap-6 bg-white py-4",children:[e.jsxs("div",{className:`flex gap-4 justify-start items-start ${u}`,children:[d&&d,s&&e.jsx("h2",{id:"modal-title",className:"text-lg font-semibold",children:s})]}),p&&e.jsx(di,{variant:"tertiaryGray",size:"sm",className:"!p-0",onClick:o,children:e.jsx(ba,{width:"16",height:"16",stroke:l})})]}),e.jsx("div",{className:"overflow-y-auto",children:n})]})]}),document.body):null},exports.Pagination=({currentPage:t,totalPages:r,onPageChange:n,type:o="default",dir:a="rtl",className:s,activeClassName:i,previousClassName:l,nextClassName:c,prevIcon:d,nextIcon:u,firstIcon:m,lastIcon:f,showFirstLast:p=!0,labels:h,hasText:g=!0,...x})=>{const b="rtl"===a,v={...{next:b?"بعدی":"Next",prev:b?"قبلی":"Previous",first:b?"اولین":"First",last:b?"آخرین":"Last",page:b?"صفحه":"page",of:b?"از":"of"},...h};if(r<=1)return null;const y=()=>{const o=[];if("undefined"!=typeof window&&window.innerWidth<768){const e=new Set;e.add(1),e.add(2),e.add(r-1),e.add(r),1!==t&&2!==t&&t!==r-1&&t!==r&&e.add(t);const n=Array.from(e).sort((e,t)=>e-t);for(let e=0;e<n.length;e++)o.push(n[e]),e<n.length-1&&n[e+1]!==n[e]+1&&o.push("...")}else if(r<=6)for(let e=1;e<=r;e++)o.push(e);else{if(t>3)if(t<r-2)o.push(1,"...",t-1,t,t+1,"...",r);else{o.push(1,2,3,"...");for(let e=r-2;e<=r;e++)o.push(e)}else{for(let e=1;e<=3;e++)o.push(e);o.push("...",r-2,r-1,r)}}const a=b?[...o].reverse():o;return e.jsx("div",{className:Jt("flex h-full",b&&"flex-row-reverse"),children:a.map((r,o)=>"..."===r?e.jsx("span",{className:"md:px-3 md:py-1 p-2 text-gray-400 text-sm",children:"..."},`dots-${o}`):e.jsx("button",{onClick:()=>n?.(r),className:Jt("px-3 py-1 text-sm border border-gray-200",t===r?i:s),children:r},r))})};return"card-minimal-right-aligned"===o?e.jsx(Cl,{currentPage:t,totalPages:r,onPageChange:n,dir:a,labels:v,previousClassName:l,nextClassName:c,className:s,...x}):"card-minimal-left-aligned"===o?e.jsx(El,{currentPage:t,totalPages:r,onPageChange:n,dir:a,labels:v,previousClassName:l,nextClassName:c,className:s,...x}):"card-minimal-center-aligned"===o?e.jsx(kl,{currentPage:t,totalPages:r,onPageChange:n,dir:a,labels:v,previousClassName:l,nextClassName:c,className:s,prevIcon:d,nextIcon:u,...x}):"card-button-group-right-aligned"===o?e.jsx(Rl,{currentPage:t,totalPages:r,onPageChange:n,dir:a,labels:v,renderPageNumbers:y,previousClassName:l,nextClassName:c,justifyClassName:Zt(s,"justify-end"),prevIcon:d,nextIcon:u,hasText:g,...x}):"card-button-group-left-aligned"===o?e.jsx(Rl,{currentPage:t,totalPages:r,onPageChange:n,dir:a,labels:v,renderPageNumbers:y,previousClassName:l,nextClassName:c,justifyClassName:Zt(s,"justify-start"),prevIcon:d,nextIcon:u,hasText:g,...x}):"card-button-group-center-aligned"===o?e.jsx(Rl,{currentPage:t,totalPages:r,onPageChange:n,dir:a,labels:v,renderPageNumbers:y,previousClassName:l,nextClassName:c,justifyClassName:Zt(s,"justify-center"),prevIcon:d,nextIcon:u,hasText:g,...x}):e.jsx(Nl,{activeClassName:i,currentPage:t,totalPages:r,onPageChange:n,dir:a,labels:v,previousClassName:l,nextClassName:c,className:s,prevIcon:d,nextIcon:u,firstIcon:m,lastIcon:f,showFirstLast:p,hasText:g})},exports.PaymentCard=({size:t="sm",title:r="",description:n,checked:o,disabled:a,id:s,value:i="",footer:l,icon:c,type:d="checkbox",onChange:u,name:m="",cardOnclick:f,inputProps:p,checkboxIndex:h})=>{const g=(({checked:e,disabled:t,size:r,hasHeader:n})=>({label:` \n rounded-2xl md:w-3xl text-md h-fit min-w-[343px] text-rtext-tertiary-600 flex gap-2 cursor-pointer\n border-2 border-rborder-secondary rounded-2xl ${n?"flex-col":"p-4"} ${r&&wi[r]} ${t?"bg-rbg-disabled-subtle":"group"} ${e?"!border-rbg-brand-solid":""}`}))({checked:o,disabled:a,size:t});return e.jsxs("label",{onClick:f,htmlFor:s,tabIndex:h,className:g.label,children:[c,e.jsxs("div",{className:"flex flex-col gap-3 grow justify-between",children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsx("h3",{className:"font-medium text-foreground text-rtext-secondary-700",children:r}),e.jsx("span",{className:"text-rtext-tertiary-600",children:n})]}),l]}),e.jsx("div",{className:"flex items-start gap-2",children:"radio"===d?e.jsx(yi,{onChange:u,checked:o,disabled:a,value:i,name:m,size:t,id:s,...p}):e.jsx(hi,{...p,disabled:a,id:s,name:m,onChange:u,size:t})})]})},exports.PlanCard=({hasHeader:t=!1,per:r,size:n="sm",title:o="",description:a,price:s,badgeContent:i,checked:l,disabled:c,type:d,name:u,value:m,onChange:f,onCardClick:p,id:h,checkboxIndex:g})=>{const x=t?Si:Ri,b=(({checked:e,disabled:t,size:r,hasHeader:n})=>({label:`\n md:w-3xl h-fit min-w-[343px] text-rtext-tertiary-600 rounded-2xl flex group gap-2 cursor-pointer\n border-2 border-rborder-secondary rounded-2xl ${n?"flex-col":"p-4"} ${r&&ki[r]} ${t?"bg-rbg-disabled-subtle":"group"} ${e?"!border-rbg-brand-solid":""}`}))({checked:l,disabled:c,hasHeader:t,size:n});return e.jsx("label",{..."test"===process.env.NODE_ENV&&{"data-testid":"plan-card-wrapper"},onClick:p,htmlFor:h,tabIndex:g,className:b.label,children:e.jsx(x,{type:d,checkboxIndex:g,checked:l,name:u,per:r,size:n,title:o,description:a,price:s,badgeContent:i,id:h,value:m,disabled:c,onChange:f})})},exports.PriceSlider=function({defaultValue:t=[0,1e3],min:r=0,max:n=1e3,step:a=1,className:s="",trackClassName:i="",rangeClassName:l="",thumbClassName:c="",showValue:d=!1,valueClassName:u="",isPercentage:m=!1,valuePosition:f="bottom",dir:p="ltr",onValueChange:h,...g}){const[x,b]=o.useState(t);return e.jsxs(rc,{value:x,onValueChange:e=>{const[t,o]=e,a=[Math.max(r,Math.min(t,n)),Math.min(n,Math.max(o,r))];b(a),h?.(a)},min:r,max:n,step:a,dir:p,className:Jt("relative flex w-full touch-none select-none items-center",s),...g,children:[e.jsx(nc,{className:Jt("relative h-2 w-full grow overflow-hidden rounded-full bg-gray-light-200",i),children:e.jsx(oc,{className:Jt("absolute h-full bg-rfg-brand-primary-600",l)})}),x.map((t,r)=>e.jsx(ac,{className:Jt("relative block h-5 w-5 rounded-full border-2 border-rfg-brand-primary-600 bg-white focus:outline-none focus:ring-2 focus:ring-rfg-brand-primary-300",c),children:d&&e.jsx("span",{className:Jt("absolute left-1/2 -translate-x-1/2 whitespace-nowrap text-xs text-gray-700","top"===f?"bottom-7":"top-7",u),children:m?`٪${t}`:t.toLocaleString()})},r))]})},exports.Progress=Ji,exports.Radio=yi,exports.Select=ll,exports.Switch=bc,exports.Tabs=nd,exports.Tag=({className:t,size:r="sm",number:n,pin:o=!1,avatar:a,children:s,checkbox:i,dir:l="rtl",icon:c,checkboxIndex:d,...u})=>{const m="x-close"===c&&e.jsx(ba,{width:Jt(sd({size:r})),height:Jt(sd({size:r})),stroke:"#98A2B3"});return e.jsxs("div",{className:Jt(od({size:r,dir:l,icon:c}),t),...u,children:[m,n&&e.jsx(id,{number:n,size:r}),e.jsx("span",{children:s}),a&&e.jsx("img",{src:a,alt:"avatar",className:"w-4 h-4 rounded-full"}),o&&e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-current"}),i&&e.jsx(hi,{checkboxIndex:d,size:r,id:i,name:i||""})]})},exports.TextArea=({row:t=5,label:r,required:n=!1,disabled:o=!1,error:a,hintText:s,placeholder:i,helpIcon:l=!1,onChange:c,id:d,tooltipProps:u,className:m,value:f,name:p,labelClass:h,labelStarClass:g,autoFocus:x=!1,...b})=>e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx(al,{id:d,label:r,required:n,labelClass:h,labelStarClass:g}),l&&u&&e.jsx(pa,{content:u?.text,description:u?.description,position:u?.position,dir:u?.dir,descriptionClassName:u?.descriptionClassName,children:e.jsx("div",{children:e.jsx(sl,{})})})]}),e.jsx("textarea",{value:f,name:p,disabled:o,rows:t,placeholder:i,id:d,onChange:c,className:Jt(ld(),m,Boolean(a)&&"!border-2 !border-rborder-error focus:!outline-0",Boolean(a)&&"bg-rbg-disabled-subtle border-rborder-disabled"),autoFocus:x,...b}),!1===Boolean(a)&&s&&e.jsx("p",{className:"text-sm text-rtext-tertiary-600",children:s}),Boolean(a)&&e.jsx("p",{className:"text-sm text-rtext-error-primary-600",children:a})]}),exports.ToastContainer=({type:r="info",position:n="top-right",duration:o=3e3,animation:a="fade",showProgress:s=!0})=>{const[i,l]=t.useState([]),c=t.useRef({});t.useEffect(()=>{gd({type:r,duration:o,animation:a,position:n,showProgress:s})},[]),t.useEffect(()=>{const e=e=>{const t=Date.now(),r=e.detail.duration??3e3,n={...e.detail,id:t,visible:!0,progressVisible:!1,duration:r,position:e.detail.position??"top-right",animation:e.detail.animation??"fade",showProgress:e.detail.showProgress??!1};l(e=>{if(e.length>=3)return e;const o=Date.now();return c.current[t]={timeoutId:setTimeout(()=>d(t),r),start:o,remaining:r},[...e,n]}),requestAnimationFrame(()=>{l(e=>e.map(e=>e.id===t?{...e,progressVisible:!0}:e))})};return window.addEventListener("custom-toast",e),()=>window.removeEventListener("custom-toast",e)},[]);const d=e=>{l(t=>t.map(t=>t.id===e?{...t,visible:!1}:t)),setTimeout(()=>{l(t=>t.filter(t=>t.id!==e)),delete c.current[e]},300)};return e.jsx(e.Fragment,{children:pd.map(t=>{const r=i.filter(e=>e.position===t).slice(-3);return 0===r.length?null:e.jsx("div",{className:`fixed z-50 space-y-2 w-full sm:w-[320px] px-4 ${fd(t)}`,children:r.map(t=>(console.log("toast : ",t),e.jsxs("div",{onMouseEnter:()=>(e=>{const t=c.current[e];if(!t)return;const r=Date.now()-t.start;t.remaining=Math.max(0,t.remaining-r),clearTimeout(t.timeoutId)})(t.id),onMouseLeave:()=>(e=>{const t=c.current[e];!t||t.remaining<=0||(t.start=Date.now(),t.timeoutId=setTimeout(()=>d(e),t.remaining))})(t.id),className:Zt("relative px-4 py-3 pr-10 rounded shadow text-white flex items-start gap-3",dd[t.type??"info"],ud[t.animation??"fade"],t.visible?"":md[t.animation??"fade"]),children:[e.jsx("span",{children:cd[t.type??"info"]}),e.jsx("div",{className:"flex-1 break-words text-sm",dangerouslySetInnerHTML:{__html:t.message}}),e.jsx("button",{className:"absolute top-2 right-2 text-white hover:opacity-80",onClick:()=>d(t.id),children:e.jsx(Ve,{size:16})}),t.showProgress&&e.jsx("div",{className:"absolute bottom-0 left-0 h-1 bg-white/50",style:{width:t.progressVisible?"100%":"0%",transition:`width ${t.duration}ms linear`}})]},t.id)))},t)})})},exports.TooltipWrapper=pa,exports.UserCard=({size:t="sm",description:r,checked:n,disabled:o,id:a,value:s="",type:i="checkbox",onChange:l,name:c="",inputProps:d,username:u,checkboxIndex:m,userFullName:f,cardOnclick:p})=>{const h=(({checked:e,disabled:t,size:r,hasHeader:n})=>({label:` \n min-w-[343px] md:w-3xl rounded-xl flex group gap-2 cursor-pointer\n border-2 border-rborder-secondary rounded-2xl text-rtext-tertiary-600 p-4 ${r&&Pi[r]} ${t?"bg-rbg-disabled-subtle":"group"} ${e?"!border-rbg-brand-solid":""}`}))({checked:n,disabled:o,hasHeader:!1,size:t});return e.jsxs("label",{onClick:p,htmlFor:a,tabIndex:m,className:h.label,children:[e.jsx("img",{src:"/Avatar.png",alt:"avatar",role:"avatar",className:`rounded-full ${Ti[t]}`}),e.jsx("div",{className:"flex flex-col gap-3 grow justify-between",children:e.jsxs("div",{className:"flex flex-col",children:[e.jsxs("div",{className:"flex gap-1",children:[e.jsx("h3",{className:"font-medium text-foreground text-rtext-secondary-700",children:f}),e.jsx("span",{className:"text-rtext-tertiary-600",children:u})]}),e.jsx("span",{className:"text-rtext-tertiary-600",children:r})]})}),e.jsx("div",{className:"flex items-start gap-2",children:"radio"===i?e.jsx(yi,{onChange:l,checked:n,disabled:o,value:s,name:c,size:t,id:a,...d}):e.jsx(hi,{...d,disabled:o,id:a,name:c,checked:n,onChange:l,size:t,value:s})})]})},exports.setToastDefaults=gd,exports.toast=xd;
|