dst-rg 1.0.0 → 1.0.2
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-CCq7hmG3.js → index-3jvN1gZ8.js} +14 -14
- package/dist/index.d.ts +505 -0
- package/dist/index.html +1 -1
- package/dist/index.js +27 -0
- package/dist/index.mjs +27 -0
- package/dist/style.css +1 -0
- package/package.json +1 -1
- package/src/components/PriceSlider/_.stories.tsx +11 -0
- package/src/components/PriceSlider/_.type.tsx +1 -0
- package/src/components/PriceSlider/index.tsx +21 -11
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import*as n from"react";import o,{forwardRef as a,createElement as i,useState as s,useLayoutEffect as l,memo as d,useEffect as c,useRef as u}from"react";import*as m from"react-dom";import f from"react-dom";function p(t,r=[]){let o=[];const a=()=>{const e=o.map(e=>n.createContext(e));return function(r){const o=r?.[t]||e;return n.useMemo(()=>({[`__scope${t}`]:{...r,[t]:o}}),[r,o])}};return a.scopeName=t,[function(r,a){const i=n.createContext(a),s=o.length;o=[...o,a];const l=r=>{const{scope:o,children:a,...l}=r,d=o?.[t]?.[s]||i,c=n.useMemo(()=>l,Object.values(l));return e(d.Provider,{value:c,children:a})};return l.displayName=r+"Provider",[l,function(e,o){const l=o?.[t]?.[s]||i,d=n.useContext(l);if(d)return d;if(void 0!==a)return a;throw new Error(`\`${e}\` must be used within \`${r}\``)}]},h(a,...r)]}function h(...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 o=r.reduce((t,{useScope:r,scopeName:n})=>({...t,...r(e)[`__scope${n}`]}),{});return n.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}function g(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function b(...e){return t=>{let r=!1;const n=e.map(e=>{const n=g(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():g(e[t],null)}}}}function x(...e){return n.useCallback(b(...e),e)}function v(t){const r=w(t),o=n.forwardRef((t,o)=>{const{children:a,...i}=t,s=n.Children.toArray(a),l=s.find(N);if(l){const t=l.props.children,a=s.map(e=>e===l?n.Children.count(t)>1?n.Children.only(null):n.isValidElement(t)?t.props.children:null:e);return e(r,{...i,ref:o,children:n.isValidElement(t)?n.cloneElement(t,void 0,a):null})}return e(r,{...i,ref:o,children:a})});return o.displayName=`${t}.Slot`,o}var y=v("Slot");function w(e){const t=n.forwardRef((e,t)=>{const{children:r,...o}=e;if(n.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}}(o,r.props);return r.type!==n.Fragment&&(a.ref=t?b(t,e):e),n.cloneElement(r,a)}return n.Children.count(r)>1?n.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var k=Symbol("radix.slottable");function N(e){return n.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===k}function C(t){const r=t+"CollectionProvider",[n,a]=p(r),[i,s]=n(r,{collectionRef:{current:null},itemMap:new Map}),l=t=>{const{scope:r,children:n}=t,a=o.useRef(null),s=o.useRef(new Map).current;return e(i,{scope:r,itemMap:s,collectionRef:a,children:n})};l.displayName=r;const d=t+"CollectionSlot",c=v(d),u=o.forwardRef((t,r)=>{const{scope:n,children:o}=t,a=x(r,s(d,n).collectionRef);return e(c,{ref:a,children:o})});u.displayName=d;const m=t+"CollectionItemSlot",f="data-radix-collection-item",h=v(m),g=o.forwardRef((t,r)=>{const{scope:n,children:a,...i}=t,l=o.useRef(null),d=x(r,l),c=s(m,n);return o.useEffect(()=>(c.itemMap.set(l,{ref:l,...i}),()=>{c.itemMap.delete(l)})),e(h,{[f]:"",ref:d,children:a})});return g.displayName=m,[{Provider:l,Slot:u,ItemSlot:g},function(e){const r=s(t+"CollectionConsumer",e);return o.useCallback(()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(r.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[r.collectionRef,r.itemMap])},a]}function z(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}var P=globalThis?.document?n.useLayoutEffect:()=>{},R=n[" useInsertionEffect ".trim().toString()]||P;function E({prop:e,defaultProp:t,onChange:r=()=>{},caller:o}){const[a,i,s]=function({defaultProp:e,onChange:t}){const[r,o]=n.useState(e),a=n.useRef(r),i=n.useRef(t);return R(()=>{i.current=t},[t]),n.useEffect(()=>{a.current!==r&&(i.current?.(r),a.current=r)},[r,a]),[r,o,i]}({defaultProp:t,onChange:r}),l=void 0!==e,d=l?e:a;{const t=n.useRef(void 0!==e);n.useEffect(()=>{const e=t.current;if(e!==l){const t=e?"controlled":"uncontrolled",r=l?"controlled":"uncontrolled";console.warn(`${o} 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,o])}const c=n.useCallback(t=>{if(l){const r=function(e){return"function"==typeof e}(t)?t(e):t;r!==e&&s.current?.(r)}else i(t)},[l,e,i,s]);return[d,c]}var S=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,r)=>{const o=v(`Primitive.${r}`),a=n.forwardRef((t,n)=>{const{asChild:a,...i}=t,s=a?o:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),e(s,{...i,ref:n})});return a.displayName=`Primitive.${r}`,{...t,[r]:a}},{});var T=e=>{const{present:t,children:r}=e,o=function(e){const[t,r]=n.useState(),o=n.useRef(null),a=n.useRef(e),i=n.useRef("none"),s=e?"mounted":"unmounted",[l,d]=function(e,t){return n.useReducer((e,r)=>t[e][r]??e,e)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return n.useEffect(()=>{const e=L(o.current);i.current="mounted"===l?e:"none"},[l]),P(()=>{const t=o.current,r=a.current;if(r!==e){const n=i.current,o=L(t);if(e)d("MOUNT");else if("none"===o||"none"===t?.display)d("UNMOUNT");else{d(r&&n!==o?"ANIMATION_OUT":"UNMOUNT")}a.current=e}},[e,d]),P(()=>{if(t){let e;const r=t.ownerDocument.defaultView??window,n=n=>{const i=L(o.current).includes(CSS.escape(n.animationName));if(n.target===t&&i&&(d("ANIMATION_END"),!a.current)){const n=t.style.animationFillMode;t.style.animationFillMode="forwards",e=r.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=n)})}},s=e=>{e.target===t&&(i.current=L(o.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",n),t.addEventListener("animationend",n),()=>{r.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",n),t.removeEventListener("animationend",n)}}d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:n.useCallback(e=>{o.current=e?getComputedStyle(e):null,r(e)},[])}}(t),a="function"==typeof r?r({present:o.isPresent}):n.Children.only(r),i=x(o.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||o.isPresent?n.cloneElement(a,{ref:i}):null};function L(e){return e?.animationName||"none"}T.displayName="Presence";var I=n[" useId ".trim().toString()]||(()=>{}),M=0;function D(e){const[t,r]=n.useState(I());return P(()=>{r(e=>e??String(M++))},[e]),e||(t?`radix-${t}`:"")}var A="Collapsible",[_,O]=p(A),[j,$]=_(A),V=n.forwardRef((t,r)=>{const{__scopeCollapsible:o,open:a,defaultOpen:i,disabled:s,onOpenChange:l,...d}=t,[c,u]=E({prop:a,defaultProp:i??!1,onChange:l,caller:A});return e(j,{scope:o,disabled:s,contentId:D(),open:c,onOpenToggle:n.useCallback(()=>u(e=>!e),[u]),children:e(S.div,{"data-state":q(c),"data-disabled":s?"":void 0,...d,ref:r})})});V.displayName=A;var F="CollapsibleTrigger",B=n.forwardRef((t,r)=>{const{__scopeCollapsible:n,...o}=t,a=$(F,n);return e(S.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":q(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...o,ref:r,onClick:z(t.onClick,a.onOpenToggle)})});B.displayName=F;var W="CollapsibleContent",H=n.forwardRef((t,r)=>{const{forceMount:n,...o}=t,a=$(W,t.__scopeCollapsible);return e(T,{present:n||a.open,children:({present:t})=>e(G,{...o,ref:r,present:t})})});H.displayName=W;var G=n.forwardRef((t,r)=>{const{__scopeCollapsible:o,present:a,children:i,...s}=t,l=$(W,o),[d,c]=n.useState(a),u=n.useRef(null),m=x(r,u),f=n.useRef(0),p=f.current,h=n.useRef(0),g=h.current,b=l.open||d,v=n.useRef(b),y=n.useRef(void 0);return n.useEffect(()=>{const e=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(e)},[]),P(()=>{const e=u.current;if(e){y.current=y.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";const t=e.getBoundingClientRect();f.current=t.height,h.current=t.width,v.current||(e.style.transitionDuration=y.current.transitionDuration,e.style.animationName=y.current.animationName),c(a)}},[l.open,a]),e(S.div,{"data-state":q(l.open),"data-disabled":l.disabled?"":void 0,id:l.contentId,hidden:!b,...s,ref:m,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...t.style},children:b&&i})});function q(e){return e?"open":"closed"}var K=V,U=B,X=H,Y=n.createContext(void 0);function Z(e){const t=n.useContext(Y);return e||t||"ltr"}var J="Accordion",Q=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[ee,te,re]=C(J),[ne]=p(J,[re,O]),oe=O(),ae=o.forwardRef((t,r)=>{const{type:n,...o}=t,a=o,i=o;return e(ee.Provider,{scope:t.__scopeAccordion,children:"multiple"===n?e(ue,{...i,ref:r}):e(ce,{...a,ref:r})})});ae.displayName=J;var[ie,se]=ne(J),[le,de]=ne(J,{collapsible:!1}),ce=o.forwardRef((t,r)=>{const{value:n,defaultValue:a,onValueChange:i=()=>{},collapsible:s=!1,...l}=t,[d,c]=E({prop:n,defaultProp:a??"",onChange:i,caller:J});return e(ie,{scope:t.__scopeAccordion,value:o.useMemo(()=>d?[d]:[],[d]),onItemOpen:c,onItemClose:o.useCallback(()=>s&&c(""),[s,c]),children:e(le,{scope:t.__scopeAccordion,collapsible:s,children:e(pe,{...l,ref:r})})})}),ue=o.forwardRef((t,r)=>{const{value:n,defaultValue:a,onValueChange:i=()=>{},...s}=t,[l,d]=E({prop:n,defaultProp:a??[],onChange:i,caller:J}),c=o.useCallback(e=>d((t=[])=>[...t,e]),[d]),u=o.useCallback(e=>d((t=[])=>t.filter(t=>t!==e)),[d]);return e(ie,{scope:t.__scopeAccordion,value:l,onItemOpen:c,onItemClose:u,children:e(le,{scope:t.__scopeAccordion,collapsible:!0,children:e(pe,{...s,ref:r})})})}),[me,fe]=ne(J),pe=o.forwardRef((t,r)=>{const{__scopeAccordion:n,disabled:a,dir:i,orientation:s="vertical",...l}=t,d=x(o.useRef(null),r),c=te(n),u="ltr"===Z(i),m=z(t.onKeyDown,e=>{if(!Q.includes(e.key))return;const t=e.target,r=c().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 i=o-1,l=()=>{a=n+1,a>i&&(a=0)},d=()=>{a=n-1,a<0&&(a=i)};switch(e.key){case"Home":a=0;break;case"End":a=i;break;case"ArrowRight":"horizontal"===s&&(u?l():d());break;case"ArrowDown":"vertical"===s&&l();break;case"ArrowLeft":"horizontal"===s&&(u?d():l());break;case"ArrowUp":"vertical"===s&&d()}const m=a%o;r[m].ref.current?.focus()});return e(me,{scope:n,disabled:a,direction:i,orientation:s,children:e(ee.Slot,{scope:n,children:e(S.div,{...l,"data-orientation":s,ref:d,onKeyDown:a?void 0:m})})})}),he="AccordionItem",[ge,be]=ne(he),xe=o.forwardRef((t,r)=>{const{__scopeAccordion:n,value:o,...a}=t,i=fe(he,n),s=se(he,n),l=oe(n),d=D(),c=o&&s.value.includes(o)||!1,u=i.disabled||t.disabled;return e(ge,{scope:n,open:c,disabled:u,triggerId:d,children:e(K,{"data-orientation":i.orientation,"data-state":ze(c),...l,...a,ref:r,disabled:u,open:c,onOpenChange:e=>{e?s.onItemOpen(o):s.onItemClose(o)}})})});xe.displayName=he;var ve="AccordionHeader",ye=o.forwardRef((t,r)=>{const{__scopeAccordion:n,...o}=t,a=fe(J,n),i=be(ve,n);return e(S.h3,{"data-orientation":a.orientation,"data-state":ze(i.open),"data-disabled":i.disabled?"":void 0,...o,ref:r})});ye.displayName=ve;var we="AccordionTrigger",ke=o.forwardRef((t,r)=>{const{__scopeAccordion:n,...o}=t,a=fe(J,n),i=be(we,n),s=de(we,n),l=oe(n);return e(ee.ItemSlot,{scope:n,children:e(U,{"aria-disabled":i.open&&!s.collapsible||void 0,"data-orientation":a.orientation,id:i.triggerId,...l,...o,ref:r})})});ke.displayName=we;var Ne="AccordionContent",Ce=o.forwardRef((t,r)=>{const{__scopeAccordion:n,...o}=t,a=fe(J,n),i=be(Ne,n),s=oe(n);return e(X,{role:"region","aria-labelledby":i.triggerId,"data-orientation":a.orientation,...s,...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 ze(e){return e?"open":"closed"}Ce.displayName=Ne;var Pe=ae,Re=xe,Ee=ye,Se=ke,Te=Ce;
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v0.487.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
const Le=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)},Ie=(...e)=>e.filter((e,t,r)=>Boolean(e)&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim();
|
|
9
|
+
/**
|
|
10
|
+
* @license lucide-react v0.487.0 - ISC
|
|
11
|
+
*
|
|
12
|
+
* This source code is licensed under the ISC license.
|
|
13
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
14
|
+
*/
|
|
15
|
+
var Me={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
|
+
/**
|
|
17
|
+
* @license lucide-react v0.487.0 - ISC
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the ISC license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/const De=a(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:a,iconNode:s,...l},d)=>i("svg",{ref:d,...Me,width:t,height:t,stroke:e,strokeWidth:n?24*Number(r)/Number(t):r,className:Ie("lucide",o),...l},[...s.map(([e,t])=>i(e,t)),...Array.isArray(a)?a:[a]])),Ae=(e,t)=>{const r=a(({className:r,...n},o)=>{return i(De,{ref:o,iconNode:t,className:Ie(`lucide-${a=Le(e),a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,r),...n});var a});return r.displayName=Le(e),r},_e=Ae("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Oe=Ae("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),je=Ae("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),$e=Ae("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),Ve=Ae("chevrons-left",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]),Fe=Ae("chevrons-right",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]),Be=Ae("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"}]]),We=Ae("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"}]]),He=Ae("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"}]]),Ge=Ae("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"}]]),qe=Ae("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"}]]),Ke=Ae("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"}]]),Ue=Ae("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),Xe=Ae("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"}]]),Ye=Ae("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"}]]),Ze=Ae("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);
|
|
22
|
+
/**
|
|
23
|
+
* @license lucide-react v0.487.0 - ISC
|
|
24
|
+
*
|
|
25
|
+
* This source code is licensed under the ISC license.
|
|
26
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
27
|
+
*/function Je(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=Je(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Qe(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Je(e))&&(n&&(n+=" "),n+=t);return n}const et=e=>{const t=ot(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:e=>{const r=e.split("-");return""===r[0]&&1!==r.length&&r.shift(),tt(r,t)||nt(e)},getConflictingClassGroupIds:(e,t)=>{const o=r[e]||[];return t&&n[e]?[...o,...n[e]]:o}}},tt=(e,t)=>{if(0===e.length)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),o=n?tt(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},rt=/^\[(.+)\]$/,nt=e=>{if(rt.test(e)){const t=rt.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},ot=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const e in r)at(r[e],n,e,t);return n},at=(e,t,r,n)=>{e.forEach(e=>{if("string"==typeof e){return void((""===e?t:it(t,e)).classGroupId=r)}if("function"==typeof e)return st(e)?void at(e(n),t,r,n):void t.validators.push({validator:e,classGroupId:r});Object.entries(e).forEach(([e,o])=>{at(o,it(t,e),r,n)})})},it=(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},st=e=>e.isThemeGetter,lt=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)}}},dt=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=e=>{const t=[];let r,n=0,o=0,a=0;for(let i=0;i<e.length;i++){let s=e[i];if(0===n&&0===o){if(":"===s){t.push(e.slice(a,i)),a=i+1;continue}if("/"===s){r=i;continue}}"["===s?n++:"]"===s?n--:"("===s?o++:")"===s&&o--}const i=0===t.length?e:e.substring(a),s=ct(i);return{modifiers:t,hasImportantModifier:s!==i,baseClassName:s,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},ct=e=>e.endsWith("!")?e.substring(0,e.length-1):e.startsWith("!")?e.substring(1):e,ut=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}},mt=/\s+/;function ft(){let e,t,r=0,n="";for(;r<arguments.length;)(e=arguments[r++])&&(t=pt(e))&&(n&&(n+=" "),n+=t);return n}const pt=e=>{if("string"==typeof e)return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=pt(e[n]))&&(r&&(r+=" "),r+=t);return r};function ht(e,...t){let r,n,o,a=function(s){const l=t.reduce((e,t)=>t(e),e());return r=(e=>({cache:lt(e.cacheSize),parseClassName:dt(e),sortModifiers:ut(e),...et(e)}))(l),n=r.cache.get,o=r.cache.set,a=i,i(s)};function i(e){const t=n(e);if(t)return t;const a=((e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:a}=t,i=[],s=e.trim().split(mt);let l="";for(let e=s.length-1;e>=0;e-=1){const t=s[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 g=a(c).join(":"),b=u?g+"!":g,x=b+h;if(i.includes(x))continue;i.push(x);const v=o(h,p);for(let e=0;e<v.length;++e){const t=v[e];i.push(b+t)}l=t+(l.length>0?" "+l:l)}return l})(e,r);return o(e,a),a}return function(){return a(ft.apply(null,arguments))}}const gt=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},bt=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,xt=/^\((?:(\w[\w-]*):)?(.+)\)$/i,vt=/^\d+\/\d+$/,yt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,wt=/\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$/,kt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Nt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ct=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,zt=e=>vt.test(e),Pt=e=>!!e&&!Number.isNaN(Number(e)),Rt=e=>!!e&&Number.isInteger(Number(e)),Et=e=>e.endsWith("%")&&Pt(e.slice(0,-1)),St=e=>yt.test(e),Tt=()=>!0,Lt=e=>wt.test(e)&&!kt.test(e),It=()=>!1,Mt=e=>Nt.test(e),Dt=e=>Ct.test(e),At=e=>!Ot(e)&&!Wt(e),_t=e=>Yt(e,er,It),Ot=e=>bt.test(e),jt=e=>Yt(e,tr,Lt),$t=e=>Yt(e,rr,Pt),Vt=e=>Yt(e,Jt,It),Ft=e=>Yt(e,Qt,Dt),Bt=e=>Yt(e,or,Mt),Wt=e=>xt.test(e),Ht=e=>Zt(e,tr),Gt=e=>Zt(e,nr),qt=e=>Zt(e,Jt),Kt=e=>Zt(e,er),Ut=e=>Zt(e,Qt),Xt=e=>Zt(e,or,!0),Yt=(e,t,r)=>{const n=bt.exec(e);return!!n&&(n[1]?t(n[1]):r(n[2]))},Zt=(e,t,r=!1)=>{const n=xt.exec(e);return!!n&&(n[1]?t(n[1]):r)},Jt=e=>"position"===e||"percentage"===e,Qt=e=>"image"===e||"url"===e,er=e=>"length"===e||"size"===e||"bg-size"===e,tr=e=>"length"===e,rr=e=>"number"===e,nr=e=>"family-name"===e,or=e=>"shadow"===e,ar=ht(()=>{const e=gt("color"),t=gt("font"),r=gt("text"),n=gt("font-weight"),o=gt("tracking"),a=gt("leading"),i=gt("breakpoint"),s=gt("container"),l=gt("spacing"),d=gt("radius"),c=gt("shadow"),u=gt("inset-shadow"),m=gt("text-shadow"),f=gt("drop-shadow"),p=gt("blur"),h=gt("perspective"),g=gt("aspect"),b=gt("ease"),x=gt("animate"),v=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",Wt,Ot],y=()=>[Wt,Ot,l],w=()=>[zt,"full","auto",...y()],k=()=>[Rt,"none","subgrid",Wt,Ot],N=()=>["auto",{span:["full",Rt,Wt,Ot]},Rt,Wt,Ot],C=()=>[Rt,"auto",Wt,Ot],z=()=>["auto","min","max","fr",Wt,Ot],P=()=>["auto",...y()],R=()=>[zt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...y()],E=()=>[e,Wt,Ot],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",qt,Vt,{position:[Wt,Ot]}],T=()=>["auto","cover","contain",Kt,_t,{size:[Wt,Ot]}],L=()=>[Et,Ht,jt],I=()=>["","none","full",d,Wt,Ot],M=()=>["",Pt,Ht,jt],D=()=>[Pt,Et,qt,Vt],A=()=>["","none",p,Wt,Ot],_=()=>["none",Pt,Wt,Ot],O=()=>["none",Pt,Wt,Ot],j=()=>[Pt,Wt,Ot],$=()=>[zt,"full",...y()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[St],breakpoint:[St],color:[Tt],container:[St],"drop-shadow":[St],ease:["in","out","in-out"],font:[At],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[St],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[St],shadow:[St],spacing:["px",Pt],text:[St],"text-shadow":[St],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",zt,Ot,Wt,g]}],container:["container"],columns:[{columns:[Pt,Ot,Wt,s]}],"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:[Rt,"auto",Wt,Ot]}],basis:[{basis:[zt,"full","auto",s,...y()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Pt,zt,"auto","initial","none",Ot]}],grow:[{grow:["",Pt,Wt,Ot]}],shrink:[{shrink:["",Pt,Wt,Ot]}],order:[{order:[Rt,"first","last","none",Wt,Ot]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:N()}],"col-start":[{"col-start":C()}],"col-end":[{"col-end":C()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:N()}],"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":z()}],"auto-rows":[{"auto-rows":z()}],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:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":y()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":y()}],"space-y-reverse":["space-y-reverse"],size:[{size:R()}],w:[{w:[s,"screen",...R()]}],"min-w":[{"min-w":[s,"screen","none",...R()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[i]},...R()]}],h:[{h:["screen","lh",...R()]}],"min-h":[{"min-h":["screen","lh","none",...R()]}],"max-h":[{"max-h":["screen","lh",...R()]}],"font-size":[{text:["base",r,Ht,jt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Wt,$t]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Et,Ot]}],"font-family":[{font:[Gt,Ot,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,Wt,Ot]}],"line-clamp":[{"line-clamp":[Pt,"none",Wt,$t]}],leading:[{leading:[a,...y()]}],"list-image":[{"list-image":["none",Wt,Ot]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Wt,Ot]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:E()}],"text-color":[{text:E()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[Pt,"from-font","auto",Wt,jt]}],"text-decoration-color":[{decoration:E()}],"underline-offset":[{"underline-offset":[Pt,"auto",Wt,Ot]}],"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",Wt,Ot]}],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",Wt,Ot]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:S()}],"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"]},Rt,Wt,Ot],radial:["",Wt,Ot],conic:[Rt,Wt,Ot]},Ut,Ft]}],"bg-color":[{bg:E()}],"gradient-from-pos":[{from:L()}],"gradient-via-pos":[{via:L()}],"gradient-to-pos":[{to:L()}],"gradient-from":[{from:E()}],"gradient-via":[{via:E()}],"gradient-to":[{to:E()}],rounded:[{rounded:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"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:E()}],"border-color-x":[{"border-x":E()}],"border-color-y":[{"border-y":E()}],"border-color-s":[{"border-s":E()}],"border-color-e":[{"border-e":E()}],"border-color-t":[{"border-t":E()}],"border-color-r":[{"border-r":E()}],"border-color-b":[{"border-b":E()}],"border-color-l":[{"border-l":E()}],"divide-color":[{divide:E()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[Pt,Wt,Ot]}],"outline-w":[{outline:["",Pt,Ht,jt]}],"outline-color":[{outline:E()}],shadow:[{shadow:["","none",c,Xt,Bt]}],"shadow-color":[{shadow:E()}],"inset-shadow":[{"inset-shadow":["none",u,Xt,Bt]}],"inset-shadow-color":[{"inset-shadow":E()}],"ring-w":[{ring:M()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:E()}],"ring-offset-w":[{"ring-offset":[Pt,jt]}],"ring-offset-color":[{"ring-offset":E()}],"inset-ring-w":[{"inset-ring":M()}],"inset-ring-color":[{"inset-ring":E()}],"text-shadow":[{"text-shadow":["none",m,Xt,Bt]}],"text-shadow-color":[{"text-shadow":E()}],opacity:[{opacity:[Pt,Wt,Ot]}],"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":[Pt]}],"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":E()}],"mask-image-linear-to-color":[{"mask-linear-to":E()}],"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":E()}],"mask-image-t-to-color":[{"mask-t-to":E()}],"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":E()}],"mask-image-r-to-color":[{"mask-r-to":E()}],"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":E()}],"mask-image-b-to-color":[{"mask-b-to":E()}],"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":E()}],"mask-image-l-to-color":[{"mask-l-to":E()}],"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":E()}],"mask-image-x-to-color":[{"mask-x-to":E()}],"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":E()}],"mask-image-y-to-color":[{"mask-y-to":E()}],"mask-image-radial":[{"mask-radial":[Wt,Ot]}],"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":E()}],"mask-image-radial-to-color":[{"mask-radial-to":E()}],"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":[Pt]}],"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":E()}],"mask-image-conic-to-color":[{"mask-conic-to":E()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:S()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:T()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Wt,Ot]}],filter:[{filter:["","none",Wt,Ot]}],blur:[{blur:A()}],brightness:[{brightness:[Pt,Wt,Ot]}],contrast:[{contrast:[Pt,Wt,Ot]}],"drop-shadow":[{"drop-shadow":["","none",f,Xt,Bt]}],"drop-shadow-color":[{"drop-shadow":E()}],grayscale:[{grayscale:["",Pt,Wt,Ot]}],"hue-rotate":[{"hue-rotate":[Pt,Wt,Ot]}],invert:[{invert:["",Pt,Wt,Ot]}],saturate:[{saturate:[Pt,Wt,Ot]}],sepia:[{sepia:["",Pt,Wt,Ot]}],"backdrop-filter":[{"backdrop-filter":["","none",Wt,Ot]}],"backdrop-blur":[{"backdrop-blur":A()}],"backdrop-brightness":[{"backdrop-brightness":[Pt,Wt,Ot]}],"backdrop-contrast":[{"backdrop-contrast":[Pt,Wt,Ot]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Pt,Wt,Ot]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Pt,Wt,Ot]}],"backdrop-invert":[{"backdrop-invert":["",Pt,Wt,Ot]}],"backdrop-opacity":[{"backdrop-opacity":[Pt,Wt,Ot]}],"backdrop-saturate":[{"backdrop-saturate":[Pt,Wt,Ot]}],"backdrop-sepia":[{"backdrop-sepia":["",Pt,Wt,Ot]}],"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",Wt,Ot]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Pt,"initial",Wt,Ot]}],ease:[{ease:["linear","initial",b,Wt,Ot]}],delay:[{delay:[Pt,Wt,Ot]}],animate:[{animate:["none",x,Wt,Ot]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,Wt,Ot]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:_()}],"rotate-x":[{"rotate-x":_()}],"rotate-y":[{"rotate-y":_()}],"rotate-z":[{"rotate-z":_()}],scale:[{scale:O()}],"scale-x":[{"scale-x":O()}],"scale-y":[{"scale-y":O()}],"scale-z":[{"scale-z":O()}],"scale-3d":["scale-3d"],skew:[{skew:j()}],"skew-x":[{"skew-x":j()}],"skew-y":[{"skew-y":j()}],transform:[{transform:[Wt,Ot,"","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:E()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:E()}],"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",Wt,Ot]}],"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",Wt,Ot]}],fill:[{fill:["none",...E()]}],"stroke-w":[{stroke:[Pt,Ht,jt,$t]}],stroke:[{stroke:["none",...E()]}],"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 ir(...e){return ar(Qe(e))}function sr({type:t="single",collapsible:r=!1,className:n,children:a,...i}){const[l,d]=s("multiple"===t?[]:"");return e(Pe,"multiple"===t?{type:"multiple",className:n,value:l,onValueChange:e=>d(e),"data-slot":"accordion",...i,children:o.Children.map(a,e=>o.isValidElement(e)?o.cloneElement(e,{openValue:l}):e)}:{type:"single",collapsible:r,className:n,value:l,onValueChange:e=>d(e),"data-slot":"accordion",...i,children:o.Children.map(a,e=>o.isValidElement(e)?o.cloneElement(e,{...e.props??{},openValue:l}):e)})}function lr({className:t,openValue:r,value:n,children:a,...i}){return e(Re,{"data-slot":"accordion-item",className:ir("border-b last:border-b-0",t),value:n,...i,children:o.Children.map(a,e=>o.isValidElement(e)?o.cloneElement(e,{itemValue:n,openValue:r}):e)})}function dr({className:t,children:n,iconOpen:o=$e,iconClosed:a=_e,itemValue:i,openValue:s,...l}){const d=Array.isArray(s)&&i?s.includes(i):s===i;return e(Ee,{className:"flex w-full",children:r(Se,{"data-slot":"accordion-trigger",className:ir("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,d?"rounded-t-md":"rounded-md"),...l,children:[n,e(d?o:a,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200"})]})})}function cr({className:t,children:r,...n}){return e(Te,{"data-slot":"accordion-content",className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",...n,children:e("div",{className:ir("pt-0 pb-4",t),children:r})})}function ur({type:t="single",collapsible:n=!1,items:o,accordionClassName:a="w-full bg-white p-4",itemClassName:i="border-b last:border-b-0",questionClassName:s="text-lg font-medium",answerClassName:l="text-sm text-gray-600",iconClosed:d,iconOpen:c}){return e(sr,{type:t,collapsible:n,className:`${a}`,children:o.map((t,n)=>r(lr,{value:`item-${n}`,className:i,children:[e(dr,{className:s,iconClosed:d,iconOpen:c,children:t.question}),e(cr,{className:l,children:t.answer})]},n))})}const mr={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 "},fr={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 "},pr={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 "},hr={xs:"gap-2",sm:"gap-2.5",md:"gap-3",lg:"gap-3.5",xl:"gap-4","2xl":"gap-4.5"},gr={xs:"text-sm",sm:"text-sm",md:"text-sm",lg:"text-md",xl:"text-lg","2xl":"text-lg"},br=({title:t,description:n,size:o})=>r("div",{className:"flex flex-col",children:[e("span",{className:ir("text-rtext-secondary-700 font-semibold",gr[o]),children:t}),e("span",{className:ir("font-normal text-rtext-tertiary-600",gr[o]),children:n})]});function xr(e){const t=n.useRef(e);return n.useEffect(()=>{t.current=e}),n.useMemo(()=>(...e)=>t.current?.(...e),[])}var vr,yr="dismissableLayer.update",wr="dismissableLayer.pointerDownOutside",kr="dismissableLayer.focusOutside",Nr=n.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Cr=n.forwardRef((t,r)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:l,onDismiss:d,...c}=t,u=n.useContext(Nr),[m,f]=n.useState(null),p=m?.ownerDocument??globalThis?.document,[,h]=n.useState({}),g=x(r,e=>f(e)),b=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=b.indexOf(v),w=m?b.indexOf(m):-1,k=u.layersWithOutsidePointerEventsDisabled.size>0,N=w>=y,C=function(e,t=globalThis?.document){const r=xr(e),o=n.useRef(!1),a=n.useRef(()=>{});return n.useEffect(()=>{const e=e=>{if(e.target&&!o.current){let n=function(){Pr(wr,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);o.current=!1},n=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(n),t.removeEventListener("pointerdown",e),t.removeEventListener("click",a.current)}},[t,r]),{onPointerDownCapture:()=>o.current=!0}}(e=>{const t=e.target,r=[...u.branches].some(e=>e.contains(t));N&&!r&&(i?.(e),l?.(e),e.defaultPrevented||d?.())},p),P=function(e,t=globalThis?.document){const r=xr(e),o=n.useRef(!1);return n.useEffect(()=>{const e=e=>{if(e.target&&!o.current){Pr(kr,r,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}(e=>{const t=e.target;[...u.branches].some(e=>e.contains(t))||(s?.(e),l?.(e),e.defaultPrevented||d?.())},p);return function(e,t=globalThis?.document){const r=xr(e);n.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=>{w===u.layers.size-1&&(a?.(e),!e.defaultPrevented&&d&&(e.preventDefault(),d()))},p),n.useEffect(()=>{if(m)return o&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(vr=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(m)),u.layers.add(m),zr(),()=>{o&&1===u.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=vr)}},[m,p,o,u]),n.useEffect(()=>()=>{m&&(u.layers.delete(m),u.layersWithOutsidePointerEventsDisabled.delete(m),zr())},[m,u]),n.useEffect(()=>{const e=()=>h({});return document.addEventListener(yr,e),()=>document.removeEventListener(yr,e)},[]),e(S.div,{...c,ref:g,style:{pointerEvents:k?N?"auto":"none":void 0,...t.style},onFocusCapture:z(t.onFocusCapture,P.onFocusCapture),onBlurCapture:z(t.onBlurCapture,P.onBlurCapture),onPointerDownCapture:z(t.onPointerDownCapture,C.onPointerDownCapture)})});Cr.displayName="DismissableLayer";function zr(){const e=new CustomEvent(yr);document.dispatchEvent(e)}function Pr(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&&m.flushSync(()=>e.dispatchEvent(t))}(o,a):o.dispatchEvent(a)}n.forwardRef((t,r)=>{const o=n.useContext(Nr),a=n.useRef(null),i=x(r,a);return n.useEffect(()=>{const e=a.current;if(e)return o.branches.add(e),()=>{o.branches.delete(e)}},[o.branches]),e(S.div,{...t,ref:i})}).displayName="DismissableLayerBranch";const Rr=["top","right","bottom","left"],Er=Math.min,Sr=Math.max,Tr=Math.round,Lr=Math.floor,Ir=e=>({x:e,y:e}),Mr={left:"right",right:"left",bottom:"top",top:"bottom"},Dr={start:"end",end:"start"};function Ar(e,t,r){return Sr(e,Er(t,r))}function _r(e,t){return"function"==typeof e?e(t):e}function Or(e){return e.split("-")[0]}function jr(e){return e.split("-")[1]}function $r(e){return"x"===e?"y":"x"}function Vr(e){return"y"===e?"height":"width"}const Fr=new Set(["top","bottom"]);function Br(e){return Fr.has(Or(e))?"y":"x"}function Wr(e){return $r(Br(e))}function Hr(e){return e.replace(/start|end/g,e=>Dr[e])}const Gr=["left","right"],qr=["right","left"],Kr=["top","bottom"],Ur=["bottom","top"];function Xr(e,t,r,n){const o=jr(e);let a=function(e,t,r){switch(e){case"top":case"bottom":return r?t?qr:Gr:t?Gr:qr;case"left":case"right":return t?Kr:Ur;default:return[]}}(Or(e),"start"===r,n);return o&&(a=a.map(e=>e+"-"+o),t&&(a=a.concat(a.map(Hr)))),a}function Yr(e){return e.replace(/left|right|bottom|top/g,e=>Mr[e])}function Zr(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 Jr(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 Qr(e,t,r){let{reference:n,floating:o}=e;const a=Br(t),i=Wr(t),s=Vr(i),l=Or(t),d="y"===a,c=n.x+n.width/2-o.width/2,u=n.y+n.height/2-o.height/2,m=n[s]/2-o[s]/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(jr(t)){case"start":f[i]-=m*(r&&d?-1:1);break;case"end":f[i]+=m*(r&&d?-1:1)}return f}async function en(e,t){var r;void 0===t&&(t={});const{x:n,y:o,platform:a,rects:i,elements:s,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:c="viewport",elementContext:u="floating",altBoundary:m=!1,padding:f=0}=_r(t,e),p=Zr(f),h=s[m?"floating"===u?"reference":"floating":u],g=Jr(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(s.floating)),boundary:d,rootBoundary:c,strategy:l})),b="floating"===u?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,x=await(null==a.getOffsetParent?void 0:a.getOffsetParent(s.floating)),v=await(null==a.isElement?void 0:a.isElement(x))&&await(null==a.getScale?void 0:a.getScale(x))||{x:1,y:1},y=Jr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:x,strategy:l}):b);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 tn(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function rn(e){return Rr.some(t=>e[t]>=0)}const nn=new Set(["left","top"]);function on(){return"undefined"!=typeof window}function an(e){return dn(e)?(e.nodeName||"").toLowerCase():"#document"}function sn(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ln(e){var t;return null==(t=(dn(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function dn(e){return!!on()&&(e instanceof Node||e instanceof sn(e).Node)}function cn(e){return!!on()&&(e instanceof Element||e instanceof sn(e).Element)}function un(e){return!!on()&&(e instanceof HTMLElement||e instanceof sn(e).HTMLElement)}function mn(e){return!(!on()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof sn(e).ShadowRoot)}const fn=new Set(["inline","contents"]);function pn(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Pn(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!fn.has(o)}const hn=new Set(["table","td","th"]);function gn(e){return hn.has(an(e))}const bn=[":popover-open",":modal"];function xn(e){return bn.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const vn=["transform","translate","scale","rotate","perspective"],yn=["transform","translate","scale","rotate","perspective","filter"],wn=["paint","layout","strict","content"];function kn(e){const t=Nn(),r=cn(e)?Pn(e):e;return vn.some(e=>!!r[e]&&"none"!==r[e])||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||yn.some(e=>(r.willChange||"").includes(e))||wn.some(e=>(r.contain||"").includes(e))}function Nn(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Cn=new Set(["html","body","#document"]);function zn(e){return Cn.has(an(e))}function Pn(e){return sn(e).getComputedStyle(e)}function Rn(e){return cn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function En(e){if("html"===an(e))return e;const t=e.assignedSlot||e.parentNode||mn(e)&&e.host||ln(e);return mn(t)?t.host:t}function Sn(e){const t=En(e);return zn(t)?e.ownerDocument?e.ownerDocument.body:e.body:un(t)&&pn(t)?t:Sn(t)}function Tn(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);const o=Sn(e),a=o===(null==(n=e.ownerDocument)?void 0:n.body),i=sn(o);if(a){const e=Ln(i);return t.concat(i,i.visualViewport||[],pn(o)?o:[],e&&r?Tn(e):[])}return t.concat(o,Tn(o,[],r))}function Ln(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function In(e){const t=Pn(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=un(e),a=o?e.offsetWidth:r,i=o?e.offsetHeight:n,s=Tr(r)!==a||Tr(n)!==i;return s&&(r=a,n=i),{width:r,height:n,$:s}}function Mn(e){return cn(e)?e:e.contextElement}function Dn(e){const t=Mn(e);if(!un(t))return Ir(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:a}=In(t);let i=(a?Tr(r.width):r.width)/n,s=(a?Tr(r.height):r.height)/o;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}const An=Ir(0);function _n(e){const t=sn(e);return Nn()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:An}function On(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);const o=e.getBoundingClientRect(),a=Mn(e);let i=Ir(1);t&&(n?cn(n)&&(i=Dn(n)):i=Dn(e));const s=function(e,t,r){return void 0===t&&(t=!1),!(!r||t&&r!==sn(e))&&t}(a,r,n)?_n(a):Ir(0);let l=(o.left+s.x)/i.x,d=(o.top+s.y)/i.y,c=o.width/i.x,u=o.height/i.y;if(a){const e=sn(a),t=n&&cn(n)?sn(n):n;let r=e,o=Ln(r);for(;o&&n&&t!==r;){const e=Dn(o),t=o.getBoundingClientRect(),n=Pn(o),a=t.left+(o.clientLeft+parseFloat(n.paddingLeft))*e.x,i=t.top+(o.clientTop+parseFloat(n.paddingTop))*e.y;l*=e.x,d*=e.y,c*=e.x,u*=e.y,l+=a,d+=i,r=sn(o),o=Ln(r)}}return Jr({width:c,height:u,x:l,y:d})}function jn(e,t){const r=Rn(e).scrollLeft;return t?t.left+r:On(ln(e)).left+r}function $n(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-jn(e,r),y:r.top+t.scrollTop}}const Vn=new Set(["absolute","fixed"]);function Fn(e,t,r){let n;if("viewport"===t)n=function(e,t){const r=sn(e),n=ln(e),o=r.visualViewport;let a=n.clientWidth,i=n.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;const e=Nn();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}const d=jn(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,i=Math.abs(n.clientWidth-t.clientWidth-o);i<=25&&(a-=i)}else d<=25&&(a+=d);return{width:a,height:i,x:s,y:l}}(e,r);else if("document"===t)n=function(e){const t=ln(e),r=Rn(e),n=e.ownerDocument.body,o=Sr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=Sr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+jn(e);const s=-r.scrollTop;return"rtl"===Pn(n).direction&&(i+=Sr(t.clientWidth,n.clientWidth)-o),{width:o,height:a,x:i,y:s}}(ln(e));else if(cn(t))n=function(e,t){const r=On(e,!0,"fixed"===t),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=un(e)?Dn(e):Ir(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=_n(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Jr(n)}function Bn(e,t){const r=En(e);return!(r===t||!cn(r)||zn(r))&&("fixed"===Pn(r).position||Bn(r,t))}function Wn(e,t,r){const n=un(t),o=ln(t),a="fixed"===r,i=On(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=Ir(0);function d(){l.x=jn(o)}if(n||!n&&!a)if(("body"!==an(t)||pn(o))&&(s=Rn(t)),n){const e=On(t,!0,a,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&d();a&&!n&&o&&d();const c=!o||n||a?Ir(0):$n(o,s);return{x:i.left+s.scrollLeft-l.x-c.x,y:i.top+s.scrollTop-l.y-c.y,width:i.width,height:i.height}}function Hn(e){return"static"===Pn(e).position}function Gn(e,t){if(!un(e)||"fixed"===Pn(e).position)return null;if(t)return t(e);let r=e.offsetParent;return ln(e)===r&&(r=r.ownerDocument.body),r}function qn(e,t){const r=sn(e);if(xn(e))return r;if(!un(e)){let t=En(e);for(;t&&!zn(t);){if(cn(t)&&!Hn(t))return t;t=En(t)}return r}let n=Gn(e,t);for(;n&&gn(n)&&Hn(n);)n=Gn(n,t);return n&&zn(n)&&Hn(n)&&!kn(n)?r:n||function(e){let t=En(e);for(;un(t)&&!zn(t);){if(kn(t))return t;if(xn(t))return null;t=En(t)}return null}(e)||r}const Kn={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const a="fixed"===o,i=ln(n),s=!!t&&xn(t.floating);if(n===i||s&&a)return r;let l={scrollLeft:0,scrollTop:0},d=Ir(1);const c=Ir(0),u=un(n);if((u||!u&&!a)&&(("body"!==an(n)||pn(i))&&(l=Rn(n)),un(n))){const e=On(n);d=Dn(n),c.x=e.x+n.clientLeft,c.y=e.y+n.clientTop}const m=!i||u||a?Ir(0):$n(i,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:ln,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const a=[..."clippingAncestors"===r?xn(t)?[]:function(e,t){const r=t.get(e);if(r)return r;let n=Tn(e,[],!1).filter(e=>cn(e)&&"body"!==an(e)),o=null;const a="fixed"===Pn(e).position;let i=a?En(e):e;for(;cn(i)&&!zn(i);){const t=Pn(i),r=kn(i);r||"fixed"!==t.position||(o=null),(a?!r&&!o:!r&&"static"===t.position&&o&&Vn.has(o.position)||pn(i)&&!r&&Bn(e,i))?n=n.filter(e=>e!==i):o=t,i=En(i)}return t.set(e,n),n}(t,this._c):[].concat(r),n],i=a[0],s=a.reduce((e,r)=>{const n=Fn(t,r,o);return e.top=Sr(n.top,e.top),e.right=Er(n.right,e.right),e.bottom=Er(n.bottom,e.bottom),e.left=Sr(n.left,e.left),e},Fn(t,i,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:qn,getElementRects:async function(e){const t=this.getOffsetParent||qn,r=this.getDimensions,n=await r(e.floating);return{reference:Wn(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}=In(e);return{width:t,height:r}},getScale:Dn,isElement:cn,isRTL:function(e){return"rtl"===Pn(e).direction}};function Un(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Xn(e,t,r,n){void 0===n&&(n={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=n,d=Mn(e),c=o||a?[...d?Tn(d):[],...Tn(t)]:[];c.forEach(e=>{o&&e.addEventListener("scroll",r,{passive:!0}),a&&e.addEventListener("resize",r)});const u=d&&s?function(e,t){let r,n=null;const o=ln(e);function a(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return function i(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),a();const d=e.getBoundingClientRect(),{left:c,top:u,width:m,height:f}=d;if(s||t(),!m||!f)return;const p={rootMargin:-Lr(u)+"px "+-Lr(o.clientWidth-(c+m))+"px "+-Lr(o.clientHeight-(u+f))+"px "+-Lr(c)+"px",threshold:Sr(0,Er(1,l))||1};let h=!0;function g(t){const n=t[0].intersectionRatio;if(n!==l){if(!h)return i();n?i(!1,n):r=setTimeout(()=>{i(!1,1e-7)},1e3)}1!==n||Un(d,e.getBoundingClientRect())||i(),h=!1}try{n=new IntersectionObserver(g,{...p,root:o.ownerDocument})}catch(e){n=new IntersectionObserver(g,p)}n.observe(e)}(!0),a}(d,r):null;let m,f=-1,p=null;i&&(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?On(e):null;return l&&function t(){const n=On(e);h&&!Un(h,n)&&r();h=n,m=requestAnimationFrame(t)}(),r(),()=>{var e;c.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 Yn=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:a,placement:i,middlewareData:s}=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)),i=Or(r),s=jr(r),l="y"===Br(r),d=nn.has(i)?-1:1,c=a&&l?-1:1,u=_r(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 s&&"number"==typeof p&&(f="end"===s?-1*p:p),l?{x:f*c,y:m*d}:{x:m*d,y:f*c}}(t,e);return i===(null==(r=s.offset)?void 0:r.placement)&&null!=(n=s.arrow)&&n.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:i}}}}},Zn=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:i=!1,limiter:s={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...l}=_r(e,t),d={x:r,y:n},c=await en(t,l),u=Br(Or(o)),m=$r(u);let f=d[m],p=d[u];if(a){const e="y"===m?"bottom":"right";f=Ar(f+c["y"===m?"top":"left"],f,f-c[e])}if(i){const e="y"===u?"bottom":"right";p=Ar(p+c["y"===u?"top":"left"],p,p-c[e])}const h=s.fn({...t,[m]:f,[u]:p});return{...h,data:{x:h.x-r,y:h.y-n,enabled:{[m]:a,[u]:i}}}}}},Jn=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:a,rects:i,initialPlacement:s,platform:l,elements:d}=t,{mainAxis:c=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:h=!0,...g}=_r(e,t);if(null!=(r=a.arrow)&&r.alignmentOffset)return{};const b=Or(o),x=Br(s),v=Or(s)===s,y=await(null==l.isRTL?void 0:l.isRTL(d.floating)),w=m||(v||!h?[Yr(s)]:function(e){const t=Yr(e);return[Hr(e),t,Hr(t)]}(s)),k="none"!==p;!m&&k&&w.push(...Xr(s,h,p,y));const N=[s,...w],C=await en(t,g),z=[];let P=(null==(n=a.flip)?void 0:n.overflows)||[];if(c&&z.push(C[b]),u){const e=function(e,t,r){void 0===r&&(r=!1);const n=jr(e),o=Wr(e),a=Vr(o);let i="x"===o?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Yr(i)),[i,Yr(i)]}(o,i,y);z.push(C[e[0]],C[e[1]])}if(P=[...P,{placement:o,overflows:z}],!z.every(e=>e<=0)){var R,E;const e=((null==(R=a.flip)?void 0:R.index)||0)+1,t=N[e];if(t){if(!("alignment"===u&&x!==Br(t))||P.every(e=>Br(e.placement)!==x||e.overflows[0]>0))return{data:{index:e,overflows:P},reset:{placement:t}}}let r=null==(E=P.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:E.placement;if(!r)switch(f){case"bestFit":{var S;const e=null==(S=P.filter(e=>{if(k){const t=Br(e.placement);return t===x||"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:S[0];e&&(r=e);break}case"initialPlacement":r=s}if(o!==r)return{reset:{placement:r}}}return{}}}},Qn=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:a,platform:i,elements:s}=t,{apply:l=()=>{},...d}=_r(e,t),c=await en(t,d),u=Or(o),m=jr(o),f="y"===Br(o),{width:p,height:h}=a.floating;let g,b;"top"===u||"bottom"===u?(g=u,b=m===(await(null==i.isRTL?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(b=u,g="end"===m?"top":"bottom");const x=h-c.top-c.bottom,v=p-c.left-c.right,y=Er(h-c[g],x),w=Er(p-c[b],v),k=!t.middlewareData.shift;let N=y,C=w;if(null!=(r=t.middlewareData.shift)&&r.enabled.x&&(C=v),null!=(n=t.middlewareData.shift)&&n.enabled.y&&(N=x),k&&!m){const e=Sr(c.left,0),t=Sr(c.right,0),r=Sr(c.top,0),n=Sr(c.bottom,0);f?C=p-2*(0!==e||0!==t?e+t:Sr(c.left,c.right)):N=h-2*(0!==r||0!==n?r+n:Sr(c.top,c.bottom))}await l({...t,availableWidth:C,availableHeight:N});const z=await i.getDimensions(s.floating);return p!==z.width||h!==z.height?{reset:{rects:!0}}:{}}}},eo=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=_r(e,t);switch(n){case"referenceHidden":{const e=tn(await en(t,{...o,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:rn(e)}}}case"escaped":{const e=tn(await en(t,{...o,altBoundary:!0}),r.floating);return{data:{escapedOffsets:e,escaped:rn(e)}}}default:return{}}}}},to=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:a,platform:i,elements:s,middlewareData:l}=t,{element:d,padding:c=0}=_r(e,t)||{};if(null==d)return{};const u=Zr(c),m={x:r,y:n},f=Wr(o),p=Vr(f),h=await i.getDimensions(d),g="y"===f,b=g?"top":"left",x=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],k=await(null==i.getOffsetParent?void 0:i.getOffsetParent(d));let N=k?k[v]:0;N&&await(null==i.isElement?void 0:i.isElement(k))||(N=s.floating[v]||a.floating[p]);const C=y/2-w/2,z=N/2-h[p]/2-1,P=Er(u[b],z),R=Er(u[x],z),E=P,S=N-h[p]-R,T=N/2-h[p]/2+C,L=Ar(E,T,S),I=!l.arrow&&null!=jr(o)&&T!==L&&a.reference[p]/2-(T<E?P:R)-h[p]/2<0,M=I?T<E?T-E:T-S:0;return{[f]:m[f]+M,data:{[f]:L,centerOffset:T-L-M,...I&&{alignmentOffset:M}},reset:I}}}),ro=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:l=!0,crossAxis:d=!0}=_r(e,t),c={x:r,y:n},u=Br(o),m=$r(u);let f=c[m],p=c[u];const h=_r(s,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(d){var b,x;const e="y"===m?"width":"height",t=nn.has(Or(o)),r=a.reference[u]-a.floating[e]+(t&&(null==(b=i.offset)?void 0:b[u])||0)+(t?0:g.crossAxis),n=a.reference[u]+a.reference[e]+(t?0:(null==(x=i.offset)?void 0:x[u])||0)-(t?g.crossAxis:0);p<r?p=r:p>n&&(p=n)}return{[m]:f,[u]:p}}}},no=(e,t,r)=>{const n=new Map,o={platform:Kn,...r},a={...o.platform,_c:n};return(async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:i}=r,s=a.filter(Boolean),l=await(null==i.isRTL?void 0:i.isRTL(t));let d=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:u}=Qr(d,n,l),m=n,f={},p=0;for(let r=0;r<s.length;r++){const{name:a,fn:h}=s[r],{x:g,y:b,data:x,reset:v}=await h({x:c,y:u,initialPlacement:n,placement:m,strategy:o,middlewareData:f,rects:d,platform:i,elements:{reference:e,floating:t}});c=null!=g?g:c,u=null!=b?b:u,f={...f,[a]:{...f[a],...x}},v&&p<=50&&(p++,"object"==typeof v&&(v.placement&&(m=v.placement),v.rects&&(d=!0===v.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):v.rects),({x:c,y:u}=Qr(d,m,l))),r=-1)}return{x:c,y:u,placement:m,strategy:o,middlewareData:f}})(e,t,{...o,platform:a})};var oo="undefined"!=typeof document?l:function(){};function ao(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(!ao(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)&&!ao(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function io(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function so(e,t){const r=io(e);return Math.round(t*r)/r}function lo(e){const t=n.useRef(e);return oo(()=>{t.current=e}),t}const co=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?to({element:r.current,padding:n}).fn(t):{}:r?to({element:r,padding:n}).fn(t):{};var o}}),uo=(e,t)=>({...Zn(e),options:[e,t]}),mo=(e,t)=>({...ro(e),options:[e,t]}),fo=(e,t)=>({...Jn(e),options:[e,t]}),po=(e,t)=>({...Qn(e),options:[e,t]}),ho=(e,t)=>({...eo(e),options:[e,t]}),go=(e,t)=>({...co(e),options:[e,t]});var bo=n.forwardRef((t,r)=>{const{children:n,width:o=10,height:a=5,...i}=t;return e(S.svg,{...i,ref:r,width:o,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:e("polygon",{points:"0,0 30,0 15,10"})})});bo.displayName="Arrow";var xo=bo;function vo(e){const[t,r]=n.useState(void 0);return P(()=>{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 yo="Popper",[wo,ko]=p(yo),[No,Co]=wo(yo),zo=t=>{const{__scopePopper:r,children:o}=t,[a,i]=n.useState(null);return e(No,{scope:r,anchor:a,onAnchorChange:i,children:o})};zo.displayName=yo;var Po="PopperAnchor",Ro=n.forwardRef((t,r)=>{const{__scopePopper:o,virtualRef:a,...i}=t,s=Co(Po,o),l=n.useRef(null),d=x(r,l),c=n.useRef(null);return n.useEffect(()=>{const e=c.current;c.current=a?.current||l.current,e!==c.current&&s.onAnchorChange(c.current)}),a?null:e(S.div,{...i,ref:d})});Ro.displayName=Po;var Eo="PopperContent",[So,To]=wo(Eo),Lo=n.forwardRef((t,r)=>{const{__scopePopper:o,side:a="bottom",sideOffset:i=0,align:s="center",alignOffset:l=0,arrowPadding:d=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:h=!1,updatePositionStrategy:g="optimized",onPlaced:b,...v}=t,y=Co(Eo,o),[w,k]=n.useState(null),N=x(r,e=>k(e)),[C,z]=n.useState(null),R=vo(C),E=R?.width??0,T=R?.height??0,L=a+("center"!==s?"-"+s:""),I="number"==typeof f?f:{top:0,right:0,bottom:0,left:0,...f},M=Array.isArray(u)?u:[u],D=M.length>0,A={padding:I,boundary:M.filter(Ao),altBoundary:D},{refs:_,floatingStyles:O,placement:j,isPositioned:$,middlewareData:V}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:o=[],platform:a,elements:{reference:i,floating:s}={},transform:l=!0,whileElementsMounted:d,open:c}=e,[u,f]=n.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=n.useState(o);ao(p,o)||h(o);const[g,b]=n.useState(null),[x,v]=n.useState(null),y=n.useCallback(e=>{e!==C.current&&(C.current=e,b(e))},[]),w=n.useCallback(e=>{e!==z.current&&(z.current=e,v(e))},[]),k=i||g,N=s||x,C=n.useRef(null),z=n.useRef(null),P=n.useRef(u),R=null!=d,E=lo(d),S=lo(a),T=lo(c),L=n.useCallback(()=>{if(!C.current||!z.current)return;const e={placement:t,strategy:r,middleware:p};S.current&&(e.platform=S.current),no(C.current,z.current,e).then(e=>{const t={...e,isPositioned:!1!==T.current};I.current&&!ao(P.current,t)&&(P.current=t,m.flushSync(()=>{f(t)}))})},[p,t,r,S,T]);oo(()=>{!1===c&&P.current.isPositioned&&(P.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[c]);const I=n.useRef(!1);oo(()=>(I.current=!0,()=>{I.current=!1}),[]),oo(()=>{if(k&&(C.current=k),N&&(z.current=N),k&&N){if(E.current)return E.current(k,N,L);L()}},[k,N,L,E,R]);const M=n.useMemo(()=>({reference:C,floating:z,setReference:y,setFloating:w}),[y,w]),D=n.useMemo(()=>({reference:k,floating:N}),[k,N]),A=n.useMemo(()=>{const e={position:r,left:0,top:0};if(!D.floating)return e;const t=so(D.floating,u.x),n=so(D.floating,u.y);return l?{...e,transform:"translate("+t+"px, "+n+"px)",...io(D.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,l,D.floating,u.x,u.y]);return n.useMemo(()=>({...u,update:L,refs:M,elements:D,floatingStyles:A}),[u,L,M,D,A])}({strategy:"fixed",placement:L,whileElementsMounted:(...e)=>Xn(...e,{animationFrame:"always"===g}),elements:{reference:y.anchor},middleware:[(F={mainAxis:i+T,alignmentAxis:l},{...Yn(F),options:[F,B]}),c&&uo({mainAxis:!0,crossAxis:!1,limiter:"partial"===p?mo():void 0,...A}),c&&fo({...A}),po({...A,apply:({elements:e,rects:t,availableWidth:r,availableHeight:n})=>{const{width:o,height:a}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${r}px`),i.setProperty("--radix-popper-available-height",`${n}px`),i.setProperty("--radix-popper-anchor-width",`${o}px`),i.setProperty("--radix-popper-anchor-height",`${a}px`)}}),C&&go({element:C,padding:d}),_o({arrowWidth:E,arrowHeight:T}),h&&ho({strategy:"referenceHidden",...A})]});var F,B;const[W,H]=Oo(j),G=xr(b);P(()=>{$&&G?.()},[$,G]);const q=V.arrow?.x,K=V.arrow?.y,U=0!==V.arrow?.centerOffset,[X,Y]=n.useState();return P(()=>{w&&Y(window.getComputedStyle(w).zIndex)},[w]),e("div",{ref:_.setFloating,"data-radix-popper-content-wrapper":"",style:{...O,transform:$?O.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,"--radix-popper-transform-origin":[V.transformOrigin?.x,V.transformOrigin?.y].join(" "),...V.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:e(So,{scope:o,placedSide:W,onArrowChange:z,arrowX:q,arrowY:K,shouldHideArrow:U,children:e(S.div,{"data-side":W,"data-align":H,...v,ref:N,style:{...v.style,animation:$?void 0:"none"}})})})});Lo.displayName=Eo;var Io="PopperArrow",Mo={top:"bottom",right:"left",bottom:"top",left:"right"},Do=n.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,a=To(Io,n),i=Mo[a.placedSide];return e("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:e(xo,{...o,ref:r,style:{...o.style,display:"block"}})})});function Ao(e){return null!==e}Do.displayName=Io;var _o=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:o}=t,a=0!==o.arrow?.centerOffset,i=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[l,d]=Oo(r),c={start:"0%",center:"50%",end:"100%"}[d],u=(o.arrow?.x??0)+i/2,m=(o.arrow?.y??0)+s/2;let f="",p="";return"bottom"===l?(f=a?c:`${u}px`,p=-s+"px"):"top"===l?(f=a?c:`${u}px`,p=`${n.floating.height+s}px`):"right"===l?(f=-s+"px",p=a?c:`${m}px`):"left"===l&&(f=`${n.floating.width+s}px`,p=a?c:`${m}px`),{data:{x:f,y:p}}}});function Oo(e){const[t,r="center"]=e.split("-");return[t,r]}var jo=zo,$o=Ro,Vo=Lo,Fo=Do,Bo=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"}),Wo=n.forwardRef((t,r)=>e(S.span,{...t,ref:r,style:{...Bo,...t.style}}));Wo.displayName="VisuallyHidden";var Ho=Wo,[Go]=p("Tooltip",[ko]),qo=ko(),Ko="TooltipProvider",Uo=700,Xo="tooltip.open",[Yo,Zo]=Go(Ko),Jo=t=>{const{__scopeTooltip:r,delayDuration:o=Uo,skipDelayDuration:a=300,disableHoverableContent:i=!1,children:s}=t,l=n.useRef(!0),d=n.useRef(!1),c=n.useRef(0);return n.useEffect(()=>{const e=c.current;return()=>window.clearTimeout(e)},[]),e(Yo,{scope:r,isOpenDelayedRef:l,delayDuration:o,onOpen:n.useCallback(()=>{window.clearTimeout(c.current),l.current=!1},[]),onClose:n.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>l.current=!0,a)},[a]),isPointerInTransitRef:d,onPointerInTransitChange:n.useCallback(e=>{d.current=e},[]),disableHoverableContent:i,children:s})};Jo.displayName=Ko;var Qo="Tooltip",[ea,ta]=Go(Qo),ra=t=>{const{__scopeTooltip:r,children:o,open:a,defaultOpen:i,onOpenChange:s,disableHoverableContent:l,delayDuration:d}=t,c=Zo(Qo,t.__scopeTooltip),u=qo(r),[m,f]=n.useState(null),p=D(),h=n.useRef(0),g=l??c.disableHoverableContent,b=d??c.delayDuration,x=n.useRef(!1),[v,y]=E({prop:a,defaultProp:i??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(Xo))):c.onClose(),s?.(e)},caller:Qo}),w=n.useMemo(()=>v?x.current?"delayed-open":"instant-open":"closed",[v]),k=n.useCallback(()=>{window.clearTimeout(h.current),h.current=0,x.current=!1,y(!0)},[y]),N=n.useCallback(()=>{window.clearTimeout(h.current),h.current=0,y(!1)},[y]),C=n.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{x.current=!0,y(!0),h.current=0},b)},[b,y]);return n.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),e(jo,{...u,children:e(ea,{scope:r,contentId:p,open:v,stateAttribute:w,trigger:m,onTriggerChange:f,onTriggerEnter:n.useCallback(()=>{c.isOpenDelayedRef.current?C():k()},[c.isOpenDelayedRef,C,k]),onTriggerLeave:n.useCallback(()=>{g?N():(window.clearTimeout(h.current),h.current=0)},[N,g]),onOpen:k,onClose:N,disableHoverableContent:g,children:o})})};ra.displayName=Qo;var na="TooltipTrigger",oa=n.forwardRef((t,r)=>{const{__scopeTooltip:o,...a}=t,i=ta(na,o),s=Zo(na,o),l=qo(o),d=x(r,n.useRef(null),i.onTriggerChange),c=n.useRef(!1),u=n.useRef(!1),m=n.useCallback(()=>c.current=!1,[]);return n.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),e($o,{asChild:!0,...l,children:e(S.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...a,ref:d,onPointerMove:z(t.onPointerMove,e=>{"touch"!==e.pointerType&&(u.current||s.isPointerInTransitRef.current||(i.onTriggerEnter(),u.current=!0))}),onPointerLeave:z(t.onPointerLeave,()=>{i.onTriggerLeave(),u.current=!1}),onPointerDown:z(t.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:z(t.onFocus,()=>{c.current||i.onOpen()}),onBlur:z(t.onBlur,i.onClose),onClick:z(t.onClick,i.onClose)})})});oa.displayName=na;var[aa,ia]=Go("TooltipPortal",{forceMount:void 0}),sa="TooltipContent",la=n.forwardRef((t,r)=>{const n=ia(sa,t.__scopeTooltip),{forceMount:o=n.forceMount,side:a="top",...i}=t,s=ta(sa,t.__scopeTooltip);return e(T,{present:o||s.open,children:s.disableHoverableContent?e(fa,{side:a,...i,ref:r}):e(da,{side:a,...i,ref:r})})}),da=n.forwardRef((t,r)=>{const o=ta(sa,t.__scopeTooltip),a=Zo(sa,t.__scopeTooltip),i=n.useRef(null),s=x(r,i),[l,d]=n.useState(null),{trigger:c,onClose:u}=o,m=i.current,{onPointerInTransitChange:f}=a,p=n.useCallback(()=>{d(null),f(!1)},[f]),h=n.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())]);d(a),f(!0)},[f]);return n.useEffect(()=>()=>p(),[p]),n.useEffect(()=>{if(c&&m){const e=e=>h(e,m),t=e=>h(e,c);return c.addEventListener("pointerleave",e),m.addEventListener("pointerleave",t),()=>{c.removeEventListener("pointerleave",e),m.removeEventListener("pointerleave",t)}}},[c,m,h,p]),n.useEffect(()=>{if(l){const e=e=>{const t=e.target,r={x:e.clientX,y:e.clientY},n=c?.contains(t)||m?.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 i=t[e],s=t[a],l=i.x,d=i.y,c=s.x,u=s.y;d>n!=u>n&&r<(c-l)*(n-d)/(u-d)+l&&(o=!o)}return o}(r,l);n?p():o&&(p(),u())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[c,m,l,u,p]),e(fa,{...t,ref:s})}),[ca,ua]=Go(Qo,{isInside:!1}),ma=function(r){const n=({children:r})=>e(t,{children:r});return n.displayName=`${r}.Slottable`,n.__radixId=k,n}("TooltipContent"),fa=n.forwardRef((t,o)=>{const{__scopeTooltip:a,children:i,"aria-label":s,onEscapeKeyDown:l,onPointerDownOutside:d,...c}=t,u=ta(sa,a),m=qo(a),{onClose:f}=u;return n.useEffect(()=>(document.addEventListener(Xo,f),()=>document.removeEventListener(Xo,f)),[f]),n.useEffect(()=>{if(u.trigger){const e=e=>{const t=e.target;t?.contains(u.trigger)&&f()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[u.trigger,f]),e(Cr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:d,onFocusOutside:e=>e.preventDefault(),onDismiss:f,children:r(Vo,{"data-state":u.stateAttribute,...m,...c,ref:o,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(ma,{children:i}),e(ca,{scope:a,isInside:!0,children:e(Ho,{id:u.contentId,role:"tooltip",children:s||i})})]})})});la.displayName=sa;var pa="TooltipArrow",ha=n.forwardRef((t,r)=>{const{__scopeTooltip:n,...o}=t,a=qo(n);return ua(pa,n).isInside?null:e(Fo,{...a,...o,ref:r})});ha.displayName=pa;var ga=Jo,ba=ra,xa=oa,va=la,ya=ha;const wa={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"}},ka=n.forwardRef(({className:t,sideOffset:r=4,...n},o)=>e(va,{ref:o,sideOffset:r,className:ir("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}));ka.displayName=va.displayName;const Na=({children:t,content:n,description:o,className:a,contentClassName:i,descriptionClassName:s,sideOffset:l=4,position:d="none",dir:c="rtl"})=>{const u="ltr"===c,m=wa[d]||{side:"top",align:u?"start":"end"},f="none"!==d;return e(ga,{children:r(ba,{delayDuration:50,children:[e(xa,{asChild:!0,children:t}),r(ka,{className:ir(a),sideOffset:l,side:m.side,align:m.align,dir:c,children:[r("div",{className:"flex flex-col",dir:c,children:[e("span",{className:ir("text-base font-medium",i),children:n}),o&&e("span",{className:ir("text-xs opacity-70 mt-1",u?"text-start":"text-end",s),children:o})]}),f&&e(ya,{className:"fill-black",width:16,height:6})]})]})})},Ca=d(({stroke:t="",fill:r="none",width:n="12",height:o="12"})=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:n,height:o,viewBox:"0 0 12 12",fill:r,children:e("path",{d:"M6 2.5V9.5M2.5 6H9.5",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})),za=({imgList:t,size:n,showAmount:o=5,showAddBtn:a=!1,tooltip:i,addBtnAction:s})=>{const l=t.slice(0,o),d=t.length-o;return r("div",{className:"flex -space-x-1 w-full",children:[l.map((t,r)=>e("img",{alt:"",className:ir("inline-block rounded-full ring-2 ring-white",mr[n]),style:{zIndex:r},...t},r)),d>0&&e("div",{className:ir("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",mr[n]),style:{zIndex:o},children:r("span",{className:"font-medium text-xs",children:["+",d]})}),a&&i?e(Na,{...i,children:e("button",{className:ir("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",mr[n]),onClick:s,children:e(Ca,{})})}):e("button",{className:ir("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",mr[n]),onClick:s,children:e(Ca,{})})]})},Pa=({img:t,size:n,notifyColor:o="",notifyIcon:a="",iconBorder:i})=>r("div",{className:ir("relative inline-block",mr[n]),children:[e("img",{alt:"",...t,className:ir("rounded-full object-cover ring-2 ring-white",mr[n])}),o&&e("span",{className:ir(`absolute bottom-0 right-1 block rounded-full ${o} ring-2 ring-white`,fr[n])}),a&&e("span",{className:ir("absolute bottom-0 right-1 block rounded-full",pr[n],`has-[>svg]:${pr[n]} ${i&&"ring-2 ring-white"}`),children:a})]}),Ra=({type:n,size:o="md",imgList:a=[],img:i={},showAmount:s=1,showAddBtn:l=!1,notifyColor:d="",notifyIcon:c="",title:u="",description:m="",iconBorder:f=!0,tooltip:p,addBtnAction:h=()=>{}})=>r(t,{children:["single"==n&&e(Pa,{img:i,size:o,notifyColor:d,notifyIcon:c,iconBorder:f}),"group"==n&&e(za,{imgList:a,size:o,showAmount:s,showAddBtn:l,tooltip:p,addBtnAction:h}),"labled"==n&&r("div",{className:ir("inline-flex items-center",hr[o]),children:[e(Pa,{img:i,size:o,notifyColor:d,notifyIcon:c,iconBorder:f}),e(br,{size:o,title:u,description:m})]})]}),Ea=d(({stroke:t="",fill:r="none",width:n="12",className:o="",height:a="12"})=>e("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("path",{d:"M9 3L3 9M3 3L9 9",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})),Sa=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,Ta=Qe,La=(e,t)=>r=>{var n;if(null==(null==t?void 0:t.variants))return Ta(e,null==r?void 0:r.class,null==r?void 0:r.className);const{variants:o,defaultVariants:a}=t,i=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 i=Sa(t)||Sa(n);return o[e][i]}),s=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,...s}[t]):{...a,...s}[t]===r})?[...e,r,n]:e},[]);return Ta(e,i,l,null==r?void 0:r.class,null==r?void 0:r.className)},Ia=La("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 Ma({className:t,size:n="sm",type:o="pillColor",color:a="blue",dir:i="rtl",icon:s,closable:l=!1,onClose:d,children:c,...u}){return r("div",{className:ir("w-fit",Ia({size:n,type:o,dir:i,color:a}),"badgeModern"===o&&"bg-transparent border-primary text-secondary",t),...u,children:[s,c,l&&e("button",{onClick:d,className:"ml-1",children:e(Ea,{className:"w-3 h-3 stroke-current"})})]})}const Da=d(()=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:e("path",{d:"M10 12L6 8L10 4",stroke:"#D0D5DD",strokeWidth:"1.33333",strokeLinecap:"round",strokeLinejoin:"round"})})),Aa=d(()=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"6",height:"10",viewBox:"0 0 6 10",fill:"none",children:e("path",{d:"M1 9L5 5L1 1",stroke:"#D0D5DD",strokeWidth:"1.33333",strokeLinecap:"round",strokeLinejoin:"round"})})),_a=d(()=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:e("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"})})),Oa=d(()=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:e("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"})})),ja=({breadCrumbLink:t,type:n="chevron",dir:o,navClassName:a,listClassName:i,listItemClassName:l="",linkClassName:d,separatorClassName:u})=>{const[m,f]=s("");c(()=>{"undefined"!=typeof window&&f(window.location.pathname)},[]);const p=o??("rtl"===document?.body?.getAttribute("dir")?"rtl":"ltr"),h=()=>{switch(n){case"chevron":return e("rtl"===p?Da:Aa,{});case"slash":return e(Oa,{});default:return e(Aa,{})}},g=[{title:e(_a,{}),link:"/"},...t],b=g.findIndex(e=>e.link===m),x=b>=0?g.slice(0,b+1):g;return e("nav",{className:`w-full overflow-x-auto scrollbar-thin scrollbar-thumb-gray-400 ${a??""}`,dir:p,children:r("ol",{className:`flex flex-nowrap items-center gap-x-1 lg:gap-x-2 w-max py-2 rounded-md ${i??""}`,children:[" ",x.map((t,n)=>{const o=t.link??"",a=n!==x.length-1,i=m===o;return r("li",{className:ir("flex items-center text-sm font-normal leading-normal transition-colors duration-300 ",l),children:[t.link?e("a",{href:o,className:`${d??"cursor-pointer transition-colors duration-300"} ${i?"text-rtext-brand-tertiary-600":"text-rtext-placeholder"}`,children:t.title}):e("span",{className:"text-gray-500",children:t.title}),a&&e("span",{className:`${u??"ms-2"}`,children:h()})]},`${o}-${n}`)})]})})},$a=La("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"}}),Va=({size:t="sm"})=>e("div",{"aria-label":"loading",className:Qe("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])}),Fa=({variant:t="primary",size:n="md",fullWidth:o,disabled:a=!1,loading:i=!1,leftIcon:s,rightIcon:l,children:d,className:c,onClick:u,asChild:m=!1,...f})=>r(m?y:"button",{className:$a({variant:t,size:n,fullWidth:o,disabled:a,className:c,loading:i}),disabled:a,onClick:i?()=>{}:u,...f,children:[i&&e("div",{className:"absolute inset-0 flex justify-center items-center",children:e(Va,{size:n??"md"})}),r("span",{className:Qe({invisible:i},"flex items-center gap-2"),children:[s,d,l]})]}),Ba=d(({stroke:r="white",fill:n="none",width:o="10",className:a="",height:i="10"})=>e(t,{children:e("svg",{width:o,"data-testid":"minus-icon",height:i,className:a,fill:n,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 12",children:e("path",{d:"M2.5 6H9.5",stroke:r,strokeWidth:"1.666",strokeLinecap:"round",strokeLinejoin:"round"})})})),Wa=d(({stroke:t="#fff",fill:r="none",width:n="10",height:o="10"})=>e("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("path",{d:"M8.33341 2.5L3.75008 7.08333L1.66675 5",stroke:t,strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})})),Ha=La("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"}}),Ga={sm:"p-1",md:"p-[5px]",lg:"p-1.5"},qa=({size:t="sm",children:n,id:o,disabled:a=!1,checkboxIndex:i=1,isIndeterminate:s=!1,checked:l,onChange:d,onClick:m,defaultChecked:f,name:p,label:h,...g})=>{const b=u(null);c(()=>{b.current&&(b.current.indeterminate=s)},[s]);const x=a?"#D0D5DD":"white";let v=null;return a?l&&(v=e(s?Ba:Wa,{stroke:x})):v=e(s?Ba:Wa,{stroke:x}),r("div",{className:"flex items-center cursor-pointer gap-2 justify-start",children:[e("input",{type:"checkbox","data-testid":"checkbox",id:o,ref:b,onChange:e=>!a&&d&&d(e),onClick:m,disabled:a,checked:l,defaultChecked:f,className:"peer hidden",...g}),e("label",{htmlFor:o??p,tabIndex:i,className:ir(Ha({size:t,disabled:a}),`${a&&"!bg-rbg-disabled !border-rborder-primary"} `),children:e("div",{className:`${Ga[t]} ${!a&&"group-focus-within:border-2 border-rbg-brand-solid "} flex items-center justify-center rounded-md`,children:v})}),(n??h)&&e("div",{className:"leading-none",onClick:()=>{b.current&&!a&&(b.current.click(),b.current.focus())},children:n??h})]})},Ka="rounded-full border-[1px] flex items-center justify-center peer-checked:border-[5px]",Ua={sm:"text-xs",md:"text-sm"},Xa={sm:"p-2.5",md:"p-3"},Ya=La(Ka,{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"}}),Za=({name:t,value:n,checked:o,onChange:a,size:i="sm",disabled:s,className:l,children:d,id:c,...u})=>r("div",{className:"flex items-start gap-2",children:[r("label",{htmlFor:c,className:"inline-flex w-fit items-center cursor-pointer relative",children:[e("input",{type:"radio",name:t,value:n,checked:o,onChange:a,className:"sr-only peer",disabled:s,id:c,...u}),e("div",{className:ir(Ya({size:i,disabled:s}),Ka)}),e("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 ${Xa[i]} ${o&&s&&("sm"===i?"!border-4":"!border-5")+" !border-rfg-disabled-subtle !p-0 "} `})]}),d&&e("label",{htmlFor:c,className:`cursor-pointer ${Ua[i]} ${l}`,children:d})]}),Ja={sm:"text-sm",md:"text-md"},Qa=({size:t="sm",title:n="",description:o,checked:a,disabled:i,id:s,value:l="",footer:d,icon:c,type:u="checkbox",onChange:m,name:f="",cardOnclick:p,inputProps:h,checkboxIndex:g})=>{const b=(({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&&Ja[r]} ${t?"bg-rbg-disabled-subtle":"group"} ${e?"!border-rbg-brand-solid":""}`}))({checked:a,disabled:i,size:t});return r("label",{onClick:p,htmlFor:s,tabIndex:g,className:b.label,children:[c,r("div",{className:"flex flex-col gap-3 grow justify-between",children:[r("div",{className:"flex flex-col",children:[e("h3",{className:"font-medium text-foreground text-rtext-secondary-700",children:n}),e("span",{className:"text-rtext-tertiary-600",children:o})]}),d]}),e("div",{className:"flex items-start gap-2",children:"radio"===u?e(Za,{onChange:m,checked:a,disabled:i,value:l,name:f,size:t,id:s,...h}):e(qa,{...h,disabled:i,id:s,name:f,onChange:m,size:t})})]})},ei={sm:"16",md:"20"},ti={sm:"text-sm",md:"text-md"},ri=d(({stroke:r="#344054",fill:n="none",width:o="16",className:a="",height:i="16"})=>e(t,{children:e("svg",{"data-testid":"layer-icon",xmlns:"http://www.w3.org/2000/svg",width:o,height:i,className:a,viewBox:"0 0 16 16",fill:n,children:e("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:r,strokeWidth:"1.333",strokeLinecap:"round",strokeLinejoin:"round"})})}));function ni({children:t,className:r,...n}){return e("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 oi({per:n,size:o="sm",title:a="",description:i,price:s,id:l,checkboxIndex:d,checked:c,name:u="",value:m="",inputProps:f,onChange:p,type:h,onCardClick:g,disabled:b}){return r(t,{children:[e(ni,{"data-testid":"icon-wrapper",children:e(ri,{width:ei[o],height:ei[o]})}),r("div",{onClick:g,className:"flex flex-col grow justify-between",children:[r("div",{className:"flex",children:[e("h3",{className:"font-medium text-foreground text-rtext-secondary-700",children:a})," ",r("span",{children:[s,"/",n]})]}),e("div",{className:"text-muted-foreground",children:i})]}),e("div",{className:"flex items-start gap-2",children:"radio"===h?e(Za,{onChange:p,checked:c,disabled:b,value:m,name:u,size:o,id:l,...f}):e(qa,{...f,disabled:b,id:l,name:u,onChange:p,size:o,value:m,checkboxIndex:d,checked:c})})]})}const ai=({title:t,size:n,disabled:o,checkboxIndex:a,id:i,name:s="",value:l="",onChange:d,inputProps:c,checked:u,type:m,...f})=>r("div",{"data-testid":"header",className:`flex items-center border-b-2 border-rborder-secondary p-4 w-full gap-2 ${o||"group-focus-within:border-rbg-brand-solid group-focus-within:border-b-2 border-b"}`,...f,children:[e(ni,{children:e(ri,{width:"20",height:"20"})}),e("div",{className:"flex flex-col grow justify-between",children:e("div",{className:"flex text-sm",children:e("h3",{className:"font-medium text-foreground text-rtext-secondary-700",children:t})})}),e("div",{className:"flex items-start gap-2",children:"radio"===m?e(Za,{onChange:d,checked:u,disabled:o,value:l,name:s,size:n,id:i,...c}):e(qa,{checkboxIndex:a,disabled:o,id:i,name:s,onChange:d,size:n,value:l,...c})})]});function ii({per:n,size:o="sm",title:a="",price:i,description:s,checked:l,badgeContent:d,checkboxIndex:c=1,id:u="",value:m="value",name:f="",onChange:p,disabled:h,type:g}){return r(t,{children:[e(ai,{type:g,onChange:p,name:f,disabled:h,checked:l,value:m,"data-testid":"header",checkboxIndex:c,title:a,size:o,id:u}),r("div",{className:"p-4 flex w-full",children:[r("div",{className:"grow space-y-1",children:[r("div",{className:"flex items-end text-sm gap-1",children:[e("span",{className:"text-3xl font-semibold text-foreground text-rtext-secondary-700",children:i}),e("span",{className:"h-fit",children:n})]}),e("div",{children:s})]}),e("span",{children:d&&e(Ma,{size:"md",type:"badgeColor",dir:"rtl",color:"success",className:"!bg-white !border-rborder-primary !text-rtext-secondary-700",icon:e("span",{className:"w-1.5 h-1.5 rounded-full bg-rfg-success-primary"}),children:d})})]})]})}const si=({hasHeader:t=!1,per:r,size:n="sm",title:o="",description:a,price:i,badgeContent:s,checked:l,disabled:d,type:c,name:u,value:m,onChange:f,onCardClick:p,id:h,checkboxIndex:g})=>{const b=t?ii:oi,x=(({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&&ti[r]} ${t?"bg-rbg-disabled-subtle":"group"} ${e?"!border-rbg-brand-solid":""}`}))({checked:l,disabled:d,hasHeader:t,size:n});return e("label",{..."test"===process.env.NODE_ENV&&{"data-testid":"plan-card-wrapper"},onClick:p,htmlFor:h,tabIndex:g,className:x.label,children:e(b,{type:c,checkboxIndex:g,checked:l,name:u,per:r,size:n,title:o,description:a,price:i,badgeContent:s,id:h,value:m,disabled:d,onChange:f})})},li={sm:"text-sm",md:"text-md"},di={sm:"w-8 h-8",md:"w-10 h-10"},ci=({size:t="sm",description:n,checked:o,disabled:a,id:i,value:s="",type:l="checkbox",onChange:d,name:c="",inputProps:u,username:m,checkboxIndex:f,userFullName:p,cardOnclick:h})=>{const g=(({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&&li[r]} ${t?"bg-rbg-disabled-subtle":"group"} ${e?"!border-rbg-brand-solid":""}`}))({checked:o,disabled:a,hasHeader:!1,size:t});return r("label",{onClick:h,htmlFor:i,tabIndex:f,className:g.label,children:[e("img",{src:"/Avatar.png",alt:"avatar",role:"avatar",className:`rounded-full ${di[t]}`}),e("div",{className:"flex flex-col gap-3 grow justify-between",children:r("div",{className:"flex flex-col",children:[r("div",{className:"flex gap-1",children:[e("h3",{className:"font-medium text-foreground text-rtext-secondary-700",children:p}),e("span",{className:"text-rtext-tertiary-600",children:m})]}),e("span",{className:"text-rtext-tertiary-600",children:n})]})}),e("div",{className:"flex items-start gap-2",children:"radio"===l?e(Za,{onChange:d,checked:o,disabled:a,value:s,name:c,size:t,id:i,...u}):e(qa,{...u,disabled:a,id:i,name:c,checked:o,onChange:d,size:t,value:s})})]})},ui=(e,t=50)=>t+10*e,mi=(e,t=40)=>t+10*e,fi=La("",{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"}}),pi=({children:t,toggleBtn:n,direction:o="down",alignment:a="right",dropDownClassName:i="",autoAdjust:d=!0,open:m,onOpenChange:f})=>{const[p,h]=s(!1),[g,b]=s(o),[x,v]=s(a),y=void 0!==m&&"function"==typeof f,w=m??p,k=u(null),N=u(null),C=u(0);c(()=>{const e=e=>{k.current&&!k.current.contains(e.target)&&z(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),l(()=>{if(!d)return b(o),void v(a);if(w&&k.current&&N.current){const e=k.current.getBoundingClientRect(),t=N.current.getBoundingClientRect(),r=t.width||200,n=t.height||200,i=window.innerHeight-e.bottom,s=e.top,l=window.innerWidth-e.right,d=e.left;if("down"===o||"up"===o)b(i<n&&s>i?"up":"down"),v(a);else if("left"===o||"right"===o)"left"===o?b(d<r&&l>d?"right":"left"):"right"===o&&b(l<r&&d>l?"left":"right"),v(a);else{Math.max(i,s)>Math.max(l,d)?(b(i>s?"down":"up"),v(a)):(b(l>d?"right":"left"),v(a))}}},[w,o,a,d]);const z=e=>{y&&f?f(e):h(e)};return r("div",{className:"relative inline-block",ref:k,children:[e(Fa,{...n,onClick:()=>z(!w)}),w&&e("div",{ref:N,style:{zIndex:mi(C.current)},className:ir("absolute border border-rborder-secondary w-fit rounded-md shadow-lg bg-rbg-primary",fi({direction:g,alignment:x}),i),children:t})]})},hi=({icon:t,mainText:n,subText:o,formatText:a,acceptableFormats:i,disable:s,multiItem:l,onChange:d})=>e("div",{className:ir("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:r("div",{className:"text-center flex flex-col justify-center items-center gap-2",children:[t??e(Fa,{variant:"secondaryGray","aria-hidden":"true",disabled:s,children:e(He,{"data-testid":"default-uploadcloud"})}),r("div",{className:"flex flex-col justify-center items-center gap-1",children:[r("div",{className:"flex items-center gap-1",children:[r("label",{htmlFor:"file-upload",className:ir(" cursor-pointer rounded-md text-rbutton-tertiary-color-fg font-normal text-sm",s&&"text-rbg-disabled-subtle"),children:[e("span",{className:ir(s&&"text-rfg-disabled"),children:n}),e("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:l,accept:i?Array.isArray(i)?i.map(e=>e.startsWith(".")?e:`.${e}`).join(", "):i:void 0,onChange:d})]}),e("p",{className:"text-rtext-tertiary-600 text-sm",children:o})]}),e("p",{className:"text-xs text-rtext-tertiary-600 font-normal",children:a})]})]})});var gi="Progress",bi=100,[xi]=p(gi),[vi,yi]=xi(gi),wi=n.forwardRef((t,r)=>{const{__scopeProgress:n,value:o=null,max:a,getValueLabel:i=Ci,...s}=t;!a&&0!==a||Ri(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=Ri(a)?a:bi;null===o||Ei(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=Ei(o,l)?o:null,c=Pi(d)?i(d,l):void 0;return e(vi,{scope:n,value:d,max:l,children:e(S.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":Pi(d)?d:void 0,"aria-valuetext":c,role:"progressbar","data-state":zi(d,l),"data-value":d??void 0,"data-max":l,...s,ref:r})})});wi.displayName=gi;var ki="ProgressIndicator",Ni=n.forwardRef((t,r)=>{const{__scopeProgress:n,...o}=t,a=yi(ki,n);return e(S.div,{"data-state":zi(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...o,ref:r})});function Ci(e,t){return`${Math.round(e/t*100)}%`}function zi(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function Pi(e){return"number"==typeof e}function Ri(e){return Pi(e)&&!isNaN(e)&&e>0}function Ei(e,t){return Pi(e)&&!isNaN(e)&&e<=t&&e>=0}Ni.displayName=ki;var Si=wi,Ti=Ni;const Li={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]"},Ii={xxs:64,xs:160,sm:200,md:240,lg:280},Mi=n.forwardRef(({type:t="line",value:n=0,label:o,labelClassName:a,backgroundVariant:i,indicatorVariant:s,className:l,size:d="md",strokeWidth:c=16,svgClassName:u,...m},f)=>{const p=Math.min(Math.max(n??0,0),100),h=Ii[d]||240,g=(h-c)/2;if("half-circle"===t){const t=Math.PI*g,n=t-p/100*t;return r("div",{className:ir("relative flex items-center justify-center",Li[d],l),ref:f,...m,children:[r("svg",{width:h,height:h/2,className:ir("rotate-[-90deg]",u),children:[e("circle",{stroke:"#e5e7eb",fill:"transparent",strokeWidth:c,r:g,cx:h/2,cy:h/2}),e("circle",{fill:"transparent",strokeWidth:c,strokeLinecap:"round",strokeDasharray:t,strokeDashoffset:t-n,r:g,cx:h/2,cy:h/2,style:{transition:"stroke-dashoffset 0.5s ease"},className:s})]}),void 0!==o&&r("span",{className:ir("absolute text-sm font-semibold text-muted-foreground",a),children:[o,"%"]})]})}if("circle"===t){const t=2*Math.PI*g,n=t-p/100*t;return r("div",{className:ir("relative flex items-center justify-center",Li[d],l),ref:f,...m,children:[r("svg",{width:h,height:h,className:ir("rotate-[-90deg]",u),children:[e("circle",{stroke:"#e5e7eb",fill:"transparent",strokeWidth:c,r:g,cx:h/2,cy:h/2}),e("circle",{fill:"transparent",strokeWidth:c,strokeLinecap:"round",strokeDasharray:t,strokeDashoffset:n,r:g,cx:h/2,cy:h/2,style:{transition:"stroke-dashoffset 0.5s ease"},className:s})]}),void 0!==o&&r("span",{className:ir("absolute text-sm font-semibold text-muted-foreground",a),children:[o,"%"]})]})}return r("div",{className:"flex items-center gap-4 w-full",children:[e(Si,{ref:f,className:ir("relative h-4 w-full overflow-hidden rounded-full bg-muted",i,l),...m,children:e(Ti,{className:ir("h-full transition-transform duration-300",s),style:{transform:`translateX(-${100-n}%)`}})}),"number"==typeof o&&r("span",{className:ir("text-sm text-muted-foreground min-w-[40px] text-right",a),children:[o,"%"]})]})});Mi.displayName="Progress";const Di=({width:t=40,height:r=40})=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:r,viewBox:"0 0 20 20",fill:"none",children:e("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"})}),Ai=({item:t,loadType:n,onDelete:o})=>r("div",{className:ir("p-4 flex gap-3 w-full rounded-xl border border-rborder-secondary bg-rbg-primary","failed"==t?.status&&"border-rborder-error"),children:[e("div",{className:" flex justify-start items-start w-10 h-10",children:t?.icon??e(Di,{width:20,height:20,"data-testid":"fallback-icon"})}),r("div",{className:"flex flex-col gap-1 w-full",children:[r("div",{className:"flex justify-between",children:[r("div",{className:"flex flex-col w-1/2",children:[e("span",{className:"font-medium text-rtext-secondary-700 overflow-hidden text-ellipsis text-sm",children:t?.title}),e("span",{className:"text-rtext-tertiary-600 font-normal text-sm overflow-hidden text-ellipsis",children:t?.size})]}),e(Fa,{className:ir("self-centertext-rbutton-tertiary-fg","failed"==t?.status&&"text-rbutton-secondary-error-fg"),onClick:()=>{o(t?.id)},variant:"linkGray",children:e(Xe,{width:20,height:20})})]}),"progressBar"==n&&e(Mi,{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"})]})]}),_i=({icon:t,mainText:n,subText:o,formatText:a,acceptableFormats:i="",disable:s=!1,items:l,loadType:d="progressBar",multiItem:c=!1,onChange:u,onDelete:m})=>r("div",{className:"w-full flex flex-col gap-4",children:[e(hi,{icon:t,mainText:n,subText:o,formatText:a,acceptableFormats:i,disable:s,multiItem:c,onChange:u}),l&&l.length>0&&e("div",{className:"flex flex-col gap-3",children:l.map(t=>e(Ai,{item:t,loadType:d,onDelete:m},t?.title))})]}),Oi=(e,t,r)=>Math.min(Math.max(e,t),r),ji={x:0,y:0};function $i({src:t,alt:n="",zoom:o=2,lensSize:a=140,className:i="",lensVisibleClassName:l="hidden md:block",zoomPaneVisibleClassName:d="hidden md:block",touchToggle:m=!0,zoomPaneSize:f,zoomPanePosition:p="right",zoomMode:h="pane"}){const g=u(null),b=u(null),[x,v]=s(!1),[y,w]=s(ji),[k,N]=s({w:0,h:0}),[C,z]=s(!1);c(()=>{const e=()=>{const e=b.current;e&&N({w:e.width,h:e.height})},t=b.current;if(t)return t.complete&&e(),t.addEventListener("load",e),window.addEventListener("resize",e),()=>{t.removeEventListener("load",e),window.removeEventListener("resize",e)}},[t]);const P=(e,t)=>{const r=b.current;if(!r)return ji;const n=r.getBoundingClientRect();if(0===n.width||0===n.height)return ji;return{x:Oi(e-n.left,0,n.width),y:Oi(t-n.top,0,n.height)}},R=e=>{const t="nativeEvent"in e?e.nativeEvent:e;if("touches"in t&&t.touches?.length>0){const e=t.touches[0];return void w(P(e.clientX,e.clientY))}"number"==typeof t.clientX&&w(P(t.clientX,t.clientY))},E=()=>{v(!1),C&&z(!1)},S=b.current?.getBoundingClientRect(),T=(S?.width??k.w)||1,L=(S?.height??k.h)||1,I=`${T*o}px ${L*o}px`,M=`${y.x/T*100}% ${y.y/L*100}%`,D=f??T,A=f??L,_={width:a,height:a,left:Oi(y.x-a/2,0,Math.max(T-a,0)),top:Oi(y.y-a/2,0,Math.max(L-a,0)),backgroundImage:"inline"===h?`url(${t})`:"none",backgroundRepeat:"no-repeat",backgroundSize:"inline"===h?I:void 0,backgroundPosition:"inline"===h?M:void 0},O={width:D,height:A,backgroundImage:`url(${t})`,backgroundRepeat:"no-repeat",backgroundSize:I,backgroundPosition:M},j="left"===p,$=x?l:"hidden",V="pane"===h&&x?d:"hidden";return r("div",{className:`relative w-fit inline-block align-top ${i}`,children:[r("div",{ref:g,className:"relative select-none touch-none",onMouseMove:e=>{R(e)},onMouseEnter:()=>{v(!0)},onMouseLeave:E,onTouchStart:e=>{m&&(e.preventDefault(),C?(z(!1),v(!1)):(z(!0),v(!0),R(e)))},onTouchMove:e=>{C&&(e.preventDefault(),R(e))},onTouchEnd:E,children:[e("img",{ref:b,src:t,alt:n,className:"block max-w-full h-auto select-none",draggable:!1,onDragStart:e=>e.preventDefault()}),e("div",{className:`pointer-events-none absolute rounded-full border-2 border-white shadow-lg ${$} ${"inline"===h?"bg-white/10 backdrop-blur":"bg-transparent"}`,style:_})]}),e("div",{className:`${V} absolute top-1/2 -translate-y-1/2 overflow-hidden rounded-lg border border-slate-200 shadow-sm \n ${j?"right-full mr-3":"left-full ml-3"}\n `,style:O})]})}const Vi={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"},Fi=La("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"}}),Bi=({id:t,label:n,required:o,labelClass:a,labelStarClass:i})=>r("label",{htmlFor:t,className:ar("text-sm font-medium text-rtext-secondary-700",a),children:[n,o&&e("span",{className:ar("dv-required-label text-rtext-brand-tertiary-600 mx-1",i),children:"*"})]}),Wi=d(({stroke:t="#98A2B3",fill:r="none",width:n="16",height:o="16"})=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:n,height:o,viewBox:"0 0 16 16",fill:r,children:e("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"})})),Hi=(e,t)=>{c(()=>{const r=r=>{e.current&&!e.current.contains(r.target)&&t()};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r)}},[e,t])},Gi=({config:t,isLoading:n=!1,disabled:o=!1,className:a,tooltipClass:i,tooltipTitle:l,selectedValueLabel:d,onChange:m,options:f,buttonClass:p,contentClass:h,labelClass:g,labelStarClass:b})=>{const{label:x,name:v,errorText:y,hintText:w,isRequiredInput:k=!1,canSelectZero:N=!1}=t||{},[C,z]=s(!1),[P,R]=s(-50),[E,S]=s(!1),[T,L]=s(5),I=u(null);Hi(I,()=>S(!1));const M=u(null);return c(()=>{C&&(()=>{if(M.current){const e=M.current.offsetHeight;R(-e+window.scrollY+40)}})()},[C]),Hi(M,()=>z(!1)),r("div",{className:ar("relative flex w-full flex-col gap-1",a),children:[x&&r("div",{className:"flex items-center gap-1",children:[e(Bi,{labelClass:g,labelStarClass:b,id:v,label:x,required:k}),l&&e("button",{type:"button",onClick:l?()=>z(e=>!e):()=>{},className:"flex-center h-4 w-4 rounded-full bg-blue-400 text-xs text-white",children:"i"})]}),r("div",{className:"relative",children:[r("button",{type:"button",className:ar("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",p),onClick:()=>S(e=>!e),disabled:n||o,children:[d,e(E?$e:_e,{className:"h-4 w-4 opacity-50"})]}),E&&e("div",{ref:I,className:ar("absolute left-0 mt-1 w-full rounded-md bg-gray-50 shadow-lg border border-rborder-primary z-50",h),children:r("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&&L(e=>Math.min(e+5,f?.length))},style:{maxHeight:"150px"},children:[!N&&e("li",{children:e("button",{type:"button",className:"w-full p-2 text-start text-gray-500 cursor-not-allowed",onClick:()=>S(!1),children:"-"})}),f?.slice(0,T)?.map(t=>e("li",{children:e("button",{type:"button",className:"w-full p-2 text-start cursor-pointer hover:bg-gray-100",onClick:()=>{return e=t.value,m({name:v,value:e}),void S(!1);var e},children:t.title})},t.value))]})})]}),l&&C&&e("div",{ref:M,className:ar("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",i),style:{top:`${P}px`},dangerouslySetInnerHTML:{__html:l}}),!y&&w&&e("p",{className:"text-sm text-rtext-tertiary-600",children:w}),y&&e("p",{className:"text-sm text-rtext-error-primary-600",children:y})]})},qi=({size:t="sm",type:n="text",inputType:o="default",disabled:a=!1,id:i,label:l,required:d=!1,destructive:c=!1,destructiveText:u,hintText:m,placeholder:f,helpIcon:p=!1,icon:h,leadingTextValue:g,className:b,trailingDropdownOptions:x,trailingDropdownDefault:v,onChange:y,value:w,tooltipProps:k,trailingButtonText:N,name:C,labelClass:z,labelStarClass:P,shabaLabelSize:R="lg",autoFocus:E=!1,...S})=>{const T=h,[L,I]=s(),[M,D]=s(!1);return r("div",{className:"flex flex-col gap-1 items-start",children:[e(Bi,{id:i,label:l,required:d,labelClass:z,labelStarClass:P}),r("div",{className:"relative w-full",children:[T&&"iconLeading"==o&&e("div",{"aria-label":"iconLeading",className:"absolute ltr:left-3 rtl:right-3 top-1/2 -translate-y-1/2",children:e(T,{})}),g&&"leadingText"==o&&e("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"===t?"pt-2":"pt-2.5"} \n ${!0===c?"border-rborder-error":"border-rborder-primary"}`,children:g}),"trailingDropdown"==o&&e("p",{className:"absolute ltr:left-2 rtl:right-2 top-1/2 -translate-y-1/2",children:L?L?.icon:v?.icon}),e("input",{value:w,name:C,onChange:y,placeholder:f,autoFocus:E,className:ir(Fi({size:t,inputType:o}),b,c&&"bg-rbg-disabled-subtle",c&&"!border-2 !border-rborder-error focus:!outline-0",a&&"bg-rbg-disabled-subtle border-rborder-disabled"),type:"password"===n&&M?"text":n,id:i,disabled:a,...S}),"password"===n&&e("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(Fa,{type:"button",variant:"linkGray",onClick:()=>D(!M),children:e(M?qe:Ke,{size:18,className:"text-rbutton-tertiary-fg"})})}),p&&k&&!1===c&&e(Na,{content:k?.text,description:k?.description,position:k?.position,dir:k?.dir,descriptionClassName:k?.descriptionClassName,children:e("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(Wi,{})})}),"trailingButton"==o&&r("button",{"aria-label":"copyButton",onClick:()=>{return e=String(w),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===c?"border-rborder-error":"border-rborder-primary"),children:[e(Ge,{size:20})," ",N]}),"trailingDropdown"==o&&e(Gi,{onChange:e=>{const t=x?.find(t=>t?.value===e?.value);I(t??e)},options:x??[],selectedValueLabel:v?.title??"-",config:{canSelectZero:!0,name:"trailingDropdown"},className:"w-fit absolute rtl:left-0 ltr:right-0 top-0"}),"shaba"==o&&e("div",{"aria-label":"shabaLabel",className:ir("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",Vi[R],!0===c?"border-rborder-error":"border-rborder-primary"),children:"IR"})]}),!1===c&&m&&e("p",{className:"text-sm text-rtext-tertiary-600",children:m}),c&&u&&e("p",{className:"text-sm text-rtext-error-primary-600",children:u})]})},Ki=La("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"}}),Ui=La("",{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"}}),Xi=({variant:t,sender:n,senderName:o,message:a,children:i,avatar:s,date:l,className:d,dir:c})=>{const u=c??("rtl"===document?.body?.getAttribute("dir")?"rtl":"ltr");return e("div",{className:ir("w-full flex ",Ui({sender:n,direction:u})),"data-testid":"messageWrapper",children:r("div",{className:ir("w-fit max-w-4/5 flex gap-3",Ui({sender:n,direction:u}),d),"data-testid":"messageComp",children:[s??null,r("div",{className:"w-full flex flex-col gap-1.5",children:[r("div",{className:ir("w-full flex justify-between items-center",Ui({sender:n,direction:u})),children:[e("span",{className:"text-rtext-secondary-700 text-sm font-medium",children:o}),e("span",{className:"text-rtext-tertiary-600 text-xs font-normal",children:l})]}),r("div",{className:ir(Ki({variant:t,sender:n,direction:u})),children:[a&&e("span",{className:"",children:a}),i??null]})]})]})})};function Yi({className:t,...r}){return e("div",{"data-slot":"card",className:ir("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",t),...r})}function Zi({className:t,...r}){return e("div",{"data-slot":"card-header",className:ir("@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 Ji({className:t,...r}){return e("div",{"data-slot":"card-action",className:ir("col-start-2 row-span-2 row-start-1 self-start justify-self-end",t),...r})}const Qi={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"},es={normal:"font-medium text-sm text-rtext-tertiary-600",bold:"text-rtext-primary-900 font-normal text-md"},ts=({title:t,value:n,description:a,icon:i,iconType:s="secondary",statistic:l,chartImg:d,chartPosition:c,actionBtns:u,toggleBtn:m,iconPosition:f="hidden",statisticPosition:p,titleType:h="normal"})=>r(Yi,{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:[r("div",{className:"flex gap-5 w-full py-5 px-4 sm:p-6",children:["iconSide"==f&&e("div",{className:ir("self-center",Qi[s]),children:i}),r("div",{className:ir("flex flex-col h-full items-end gap-2 w-full",`${("topWithTitle"==f||"topAlone"==f)&&"gap-5 md:gap-6"}`),children:[r(Zi,{className:"flex justify-between w-full px-0",children:[r("div",{className:"flex items-center gap-3 ",children:[("topWithTitle"==f||"topAlone"==f)&&e("div",{className:Qi[s],children:i}),"topAlone"!=f&&e("span",{className:es[h],children:t})]}),m]}),r("div",{className:"flex flex-col w-full gap-2",children:["topAlone"==f&&e("span",{className:es[h],children:t}),r("div",{className:"w-full flex justify-between gap-4",children:[r("div",{className:ir("flex justify-between items-center w-full h-fit px-0",`${"row-below"==p&&"flex-col just-start items-start gap-4"}`,`${"row-next"==p&&"flex justify-start items-start gap-2"}`),children:[e("span",{className:"text-display-md font-normal text-rtext-primary-900",children:n}),r("div",{className:"flex gap-2 items-center",children:[l,a&&e("span",{className:"font-medium text-sm text-rtext-tertiary-600",children:a})]})]}),"side"==c&&e("div",{className:"w-full",children:d})]})]}),"bottom"==c&&e("div",{className:"w-full",children:d})]})]}),u&&e(Ji,{className:"flex flex-row-reverse items-center justify-between py-4 px-6 border-t border-rborder-secondary gap-1.5 w-full",children:u?.map((t,r)=>e(o.Fragment,{children:t},r))})]}),rs=La("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 ns=0;const os=({children:n,closeHandler:o,size:a="md",modalTitle:i,overflow:s,closeIconStroke:l="#000",position:d="center",icon:m,headerIconDir:p="flex-col",showModal:h=!1,modalContentStyle:g,showCloseIcon:b=!0})=>{const x=u(++ns);return c(()=>(h&&(document.body.style.overflow="hidden"),()=>{ns--,document.body.style.overflow=""}),[h]),h?f.createPortal(r(t,{children:[e("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:mi(x.current)},onClick:o}),r("dialog",{open:!0,"aria-label":"modal-container",className:ar(rs({size:a,overflow:s,position:d}),g),style:{zIndex:ui(x.current)},children:[r("div",{className:("flex-col"==p?"items-start":"items-center")+"\n sticky top-0 z-10 flex justify-between gap-6 bg-white py-4",children:[r("div",{className:`flex gap-4 justify-start items-start ${p}`,children:[m&&m,i&&e("h2",{id:"modal-title",className:"text-lg font-semibold",children:i})]}),b&&e(Fa,{variant:"tertiaryGray",size:"sm",className:"!p-0",onClick:o,children:e(Ea,{width:"16",height:"16",stroke:l})})]}),e("div",{className:"overflow-y-auto",children:n})]})]}),document.body):null},as=d(()=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:e("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"})})),is=d(()=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:e("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"})})),ss=o.forwardRef(({className:t,...r},n)=>e("ul",{ref:n,className:ir("flex flex-row items-center cursor-pointer",t),...r}));ss.displayName="PaginationContent";const ls=o.forwardRef(({className:t,...r},n)=>e("li",{ref:n,className:ir("flex items-center ",t),...r}));ls.displayName="PaginationItem";const ds=({className:t,isActive:r,activeClassName:n,disabled:o,...a})=>e("a",{"aria-current":r?"page":void 0,className:ir("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",r?n||"rounded-md border bg-[#F9FAFB] text-[#182230] border-[#F9FAFB]":"",o?"pointer-events-none opacity-50":"",t),...a,"aria-disabled":o,onClick:e=>{o?e.preventDefault():a.onClick?.(e)}}),cs=({currentPage:t,totalPages:n,onPageChange:o,dir:a="rtl",labels:i,previousClassName:s,nextClassName:l,className:d,prevIcon:c,nextIcon:u,...m})=>{const f="rtl"===a;return e("nav",{role:"navigation","aria-label":"pagination",className:ir("",d),...m,children:r(ss,{className:"flex justify-between items-center",children:[r("div",{className:"flex",children:[e(ls,{className:"md:block hidden",children:e(ds,{size:"default","aria-label":"Go to first page",disabled:1===t,onClick:()=>o?.(1),children:i?.first})}),e(ls,{children:r(ds,{"aria-label":"Go to previous page",size:"default",className:ir("gap-1",s),onClick:()=>o?.(t-1),disabled:1===t,children:[e("div",{className:"md:block hidden",children:i?.prev||"قبلی"}),e("div",{className:"md:hidden block",children:f?c||e(is,{}):u||e(as,{})})]})})]}),r("span",{className:"text-sm font-medium",children:[i?.page," ",t," ",i?.of," ",n]}),r("div",{className:"flex",children:[e(ls,{children:r(ds,{"aria-label":"Go to next page",size:"default",className:ir("gap-1",l),onClick:()=>o?.(t+1),disabled:t===n,children:[e("span",{className:"md:block hidden",children:i?.next||"بعدی"}),e("div",{className:"md:hidden block",children:f?c||e(as,{}):u||e(is,{})})]})}),e(ls,{className:"md:block hidden",children:e(ds,{size:"default","aria-label":"Go to last page",disabled:t===n,onClick:()=>o?.(n),children:i?.last})})]})]})})},us=({currentPage:t,totalPages:n,onPageChange:o,dir:a="rtl",labels:i,previousClassName:s,nextClassName:l,className:d,...c})=>{const u="rtl"===a;return r("nav",{role:"navigation","aria-label":"pagination",className:ir("flex w-full items-center justify-between text-sm text-muted-foreground",d),...c,children:[r("span",{children:[i?.page," ",t," ",i?.of," ",n]}),r(ss,{className:"flex items-center gap-2",children:[e(ls,{children:e(ds,{"aria-label":"Go to first page",size:"default",className:"gap-1 px-2.5",onClick:()=>o?.(1),disabled:1===t||n<2,children:e("span",{children:i?.first})})}),e(ls,{children:e(ds,{"aria-label":"Go to previous page",size:"default",className:ir("gap-1",s),onClick:()=>o?.(u?t+1:t-1),disabled:u?t===n:1===t,children:e("span",{children:u?i?.next:i?.prev})})}),e(ls,{children:e(ds,{"aria-label":"Go to next page",size:"default",className:ir("gap-1",l),onClick:()=>o?.(u?t-1:t+1),disabled:u?1===t:t===n,children:e("span",{children:u?i?.prev:i?.next})})}),e(ls,{children:e(ds,{"aria-label":"Go to last page",size:"default",className:"gap-1 px-2.5",onClick:()=>o?.(n),disabled:t===n,children:e("span",{children:i?.last})})})]})]})},ms=({currentPage:t,totalPages:n,onPageChange:o,labels:a,previousClassName:i,className:s,activeClassName:l,nextClassName:d,dir:c="rtl",prevIcon:u,nextIcon:m,firstIcon:f,lastIcon:p,showFirstLast:h=!0,hasText:g=!0})=>{const b=((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,n,c),x="rtl"===c,v=x?[...b].reverse():b;return r("nav",{role:"navigation","aria-label":"pagination",className:ir("mx-auto flex w-full justify-center","rtl"===c?"rtl":"ltr",s),children:[r("div",{className:ir("flex gap-2",x?"ml-auto":"mr-auto"),children:[h&&r(ds,{"aria-label":"Go to first page",size:"default",className:"gap-1 px-2.5",onClick:()=>o?.(1),disabled:1===t,children:[x?f||e(Fe,{}):p||e(Ve,{}),g&&e("span",{children:a?.first})]}),r(ds,{"aria-label":"Go to previous page",size:"default",className:ir("flex items-center",i),onClick:()=>o?.(t-1),disabled:1===t,children:[x?m||e(je,{}):u||e(Oe,{}),g&&e("span",{children:a?.prev})]})]}),e(ss,{children:v.map((r,n)=>e(ls,{children:"..."===r?e("span",{className:"px-2",children:"..."}):e(ds,{isActive:r===t,onClick:()=>o?.(Number(r)),activeClassName:ar(l,"rounded-md"),children:r})},n))}),r("div",{className:ir("flex gap-2",x?"mr-auto":"ml-auto"),children:[r(ds,{"aria-label":"Go to next page",size:"default",className:ir("flex items-center",d),onClick:()=>o?.(t+1),disabled:t===n,children:[g&&e("span",{children:a?.next}),x?u||e(Oe,{}):m||e(je,{})]}),h&&r(ds,{"aria-label":"Go to last page",size:"default",className:"gap-1 px-2.5",onClick:()=>o?.(n),disabled:t===n,children:[g&&e("span",{children:a?.last}),x?p||e(Ve,{}):f||e(Fe,{})]})]})]})},fs=({currentPage:n,totalPages:o,onPageChange:a,dir:i="rtl",labels:s,renderPageNumbers:l,justifyClassName:d,prevIcon:c,nextIcon:u,hasText:m})=>{const f="rtl"===i;return e("nav",{role:"navigation","aria-label":"pagination",className:ir("w-full flex",d),children:r(ss,{className:"border border-gray-200 rounded-md",children:[e(ls,{children:e(ds,{size:"default",className:"px-3 py-1 text-sm disabled:opacity-50 flex items-center",onClick:()=>a?.(n-1),disabled:1===n,children:e("div",{className:"flex items-center gap-1",children:r(t,f?{children:[c||e(je,{size:16}),m&&e("span",{className:"hidden md:block",children:s?.prev})]}:{children:[u||e(Oe,{size:16}),m&&e("span",{className:"hidden md:block",children:s?.prev})]})})})}),l(),e(ls,{children:e(ds,{size:"default",className:"px-3 py-1 text-sm disabled:opacity-50 flex items-center",onClick:()=>a?.(n+1),disabled:n===o,children:e("div",{className:"flex items-center gap-1",children:r(t,f?{children:[m&&e("span",{className:"hidden md:block",children:s?.next}),u||e(Oe,{size:16})]}:{children:[m&&e("span",{className:"hidden md:block",children:s?.next}),c||e(je,{size:16})]})})})})]})})},ps=({currentPage:t,totalPages:n,onPageChange:o,dir:a="rtl",labels:i,previousClassName:s,nextClassName:l,className:d,...c})=>{const u="rtl"===a;return r("nav",{role:"navigation","aria-label":"pagination",className:ir("flex w-full items-center justify-between text-sm text-muted-foreground",d),...c,children:[r(ss,{className:"flex gap-2 items-center",children:[e(ls,{children:e(ds,{"aria-label":"Go to first page",size:"default",className:"gap-1 px-2.5",onClick:()=>o?.(1),disabled:1===t,children:e("span",{children:i?.first})})}),e(ls,{children:e(ds,{"aria-label":"Go to previous page",size:"default",className:ir("gap-1",s),onClick:()=>o?.(u?t+1:t-1),disabled:u?t===n:1===t,children:e("span",{children:u?i?.next:i?.prev})})}),e(ls,{children:e(ds,{"aria-label":"Go to next page",size:"default",className:ir("gap-1",l),onClick:()=>o?.(u?t-1:t+1),disabled:u?1===t:t===n,children:e("span",{children:u?i?.prev:i?.next})})}),e(ls,{children:e(ds,{"aria-label":"Go to last page",size:"default",className:"gap-1 px-2.5",onClick:()=>o?.(n),disabled:t===n,children:e("span",{children:i?.last})})})]}),r("span",{children:[i?.page," ",t," ",i?.of," ",n]})]})},hs=({currentPage:t,totalPages:r,onPageChange:n,type:o="default",dir:a="rtl",className:i,activeClassName:s,previousClassName:l,nextClassName:d,prevIcon:c,nextIcon:u,firstIcon:m,lastIcon:f,showFirstLast:p=!0,labels:h,hasText:g=!0,...b})=>{const x="rtl"===a,v={...{next:x?"بعدی":"Next",prev:x?"قبلی":"Previous",first:x?"اولین":"First",last:x?"آخرین":"Last",page:x?"صفحه":"page",of:x?"از":"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=x?[...o].reverse():o;return e("div",{className:ir("flex h-full",x&&"flex-row-reverse"),children:a.map((r,o)=>"..."===r?e("span",{className:"md:px-3 md:py-1 p-2 text-gray-400 text-sm",children:"..."},`dots-${o}`):e("button",{onClick:()=>n?.(r),className:ir("px-3 py-1 text-sm border border-gray-200",t===r?s:i),children:r},r))})};return"card-minimal-right-aligned"===o?e(us,{currentPage:t,totalPages:r,onPageChange:n,dir:a,labels:v,previousClassName:l,nextClassName:d,className:i,...b}):"card-minimal-left-aligned"===o?e(ps,{currentPage:t,totalPages:r,onPageChange:n,dir:a,labels:v,previousClassName:l,nextClassName:d,className:i,...b}):"card-minimal-center-aligned"===o?e(cs,{currentPage:t,totalPages:r,onPageChange:n,dir:a,labels:v,previousClassName:l,nextClassName:d,className:i,prevIcon:c,nextIcon:u,...b}):"card-button-group-right-aligned"===o?e(fs,{currentPage:t,totalPages:r,onPageChange:n,dir:a,labels:v,renderPageNumbers:y,previousClassName:l,nextClassName:d,justifyClassName:ar(i,"justify-end"),prevIcon:c,nextIcon:u,hasText:g,...b}):"card-button-group-left-aligned"===o?e(fs,{currentPage:t,totalPages:r,onPageChange:n,dir:a,labels:v,renderPageNumbers:y,previousClassName:l,nextClassName:d,justifyClassName:ar(i,"justify-start"),prevIcon:c,nextIcon:u,hasText:g,...b}):"card-button-group-center-aligned"===o?e(fs,{currentPage:t,totalPages:r,onPageChange:n,dir:a,labels:v,renderPageNumbers:y,previousClassName:l,nextClassName:d,justifyClassName:ar(i,"justify-center"),prevIcon:c,nextIcon:u,hasText:g,...b}):e(ms,{activeClassName:s,currentPage:t,totalPages:r,onPageChange:n,dir:a,labels:v,previousClassName:l,nextClassName:d,className:i,prevIcon:c,nextIcon:u,firstIcon:m,lastIcon:f,showFirstLast:p,hasText:g})};function gs(e,[t,r]){return Math.min(r,Math.max(t,e))}function bs(e){const t=n.useRef({value:e,previous:e});return n.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var xs=["PageUp","PageDown"],vs=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ys={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},ws="Slider",[ks,Ns,Cs]=C(ws),[zs]=p(ws,[Cs]),[Ps,Rs]=zs(ws),Es=n.forwardRef((t,r)=>{const{name:o,min:a=0,max:i=100,step:s=1,orientation:l="horizontal",disabled:d=!1,minStepsBetweenThumbs:c=0,defaultValue:u=[a],value:m,onValueChange:f=()=>{},onValueCommit:p=()=>{},inverted:h=!1,form:g,...b}=t,x=n.useRef(new Set),v=n.useRef(0),y="horizontal"===l?Ls:Is,[w=[],k]=E({prop:m,defaultProp:u,onChange:e=>{const t=[...x.current];t[v.current]?.focus(),f(e)}}),N=n.useRef(w);function C(e,t,{commit:r}={commit:!1}){const n=function(e){return(String(e).split(".")[1]||"").length}(s),o=function(e,t){const r=Math.pow(10,t);return Math.round(e*r)/r}(Math.round((e-a)/s)*s+a,n),l=gs(o,[a,i]);k((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*s)){v.current=n.indexOf(l);const t=String(n)!==String(e);return t&&r&&p(n),t?n:e}return e})}return e(Ps,{scope:t.__scopeSlider,name:o,disabled:d,min:a,max:i,valueIndexToChangeRef:v,thumbs:x.current,values:w,orientation:l,form:g,children:e(ks.Provider,{scope:t.__scopeSlider,children:e(ks.Slot,{scope:t.__scopeSlider,children:e(y,{"aria-disabled":d,"data-disabled":d?"":void 0,...b,ref:r,onPointerDown:z(b.onPointerDown,()=>{d||(N.current=w)}),min:a,max:i,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)}(w,e);C(e,t)},onSlideMove:d?void 0:function(e){C(e,v.current)},onSlideEnd:d?void 0:function(){const e=N.current[v.current];w[v.current]!==e&&p(w)},onHomeKeyDown:()=>!d&&C(a,0,{commit:!0}),onEndKeyDown:()=>!d&&C(i,w.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!d){const r=xs.includes(e.key)||e.shiftKey&&vs.includes(e.key)?10:1,n=v.current;C(w[n]+s*r*t,n,{commit:!0})}}})})})})});Es.displayName=ws;var[Ss,Ts]=zs(ws,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Ls=n.forwardRef((t,r)=>{const{min:o,max:a,dir:i,inverted:s,onSlideStart:l,onSlideMove:d,onSlideEnd:c,onStepKeyDown:u,...m}=t,[f,p]=n.useState(null),h=x(r,e=>p(e)),g=n.useRef(void 0),b=Z(i),v="ltr"===b,y=v&&!s||!v&&s;function w(e){const t=g.current||f.getBoundingClientRect(),r=Ws([0,t.width],y?[o,a]:[a,o]);return g.current=t,r(e-t.left)}return e(Ss,{scope:t.__scopeSlider,startEdge:y?"left":"right",endEdge:y?"right":"left",direction:y?1:-1,size:"width",children:e(Ms,{dir:b,"data-orientation":"horizontal",...m,ref:h,style:{...m.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,c?.()},onStepKeyDown:e=>{const t=ys[y?"from-left":"from-right"].includes(e.key);u?.({event:e,direction:t?-1:1})}})})}),Is=n.forwardRef((t,r)=>{const{min:o,max:a,inverted:i,onSlideStart:s,onSlideMove:l,onSlideEnd:d,onStepKeyDown:c,...u}=t,m=n.useRef(null),f=x(r,m),p=n.useRef(void 0),h=!i;function g(e){const t=p.current||m.current.getBoundingClientRect(),r=Ws([0,t.height],h?[a,o]:[o,a]);return p.current=t,r(e-t.top)}return e(Ss,{scope:t.__scopeSlider,startEdge:h?"bottom":"top",endEdge:h?"top":"bottom",size:"height",direction:h?1:-1,children:e(Ms,{"data-orientation":"vertical",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{const t=g(e.clientY);s?.(t)},onSlideMove:e=>{const t=g(e.clientY);l?.(t)},onSlideEnd:()=>{p.current=void 0,d?.()},onStepKeyDown:e=>{const t=ys[h?"from-bottom":"from-top"].includes(e.key);c?.({event:e,direction:t?-1:1})}})})}),Ms=n.forwardRef((t,r)=>{const{__scopeSlider:n,onSlideStart:o,onSlideMove:a,onSlideEnd:i,onHomeKeyDown:s,onEndKeyDown:l,onStepKeyDown:d,...c}=t,u=Rs(ws,n);return e(S.span,{...c,ref:r,onKeyDown:z(t.onKeyDown,e=>{"Home"===e.key?(s(e),e.preventDefault()):"End"===e.key?(l(e),e.preventDefault()):xs.concat(vs).includes(e.key)&&(d(e),e.preventDefault())}),onPointerDown:z(t.onPointerDown,e=>{const t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():o(e)}),onPointerMove:z(t.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&a(e)}),onPointerUp:z(t.onPointerUp,e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),i(e))})})}),Ds="SliderTrack",As=n.forwardRef((t,r)=>{const{__scopeSlider:n,...o}=t,a=Rs(Ds,n);return e(S.span,{"data-disabled":a.disabled?"":void 0,"data-orientation":a.orientation,...o,ref:r})});As.displayName=Ds;var _s="SliderRange",Os=n.forwardRef((t,r)=>{const{__scopeSlider:o,...a}=t,i=Rs(_s,o),s=Ts(_s,o),l=x(r,n.useRef(null)),d=i.values.length,c=i.values.map(e=>Bs(e,i.min,i.max)),u=d>1?Math.min(...c):0,m=100-Math.max(...c);return e(S.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...a,ref:l,style:{...t.style,[s.startEdge]:u+"%",[s.endEdge]:m+"%"}})});Os.displayName=_s;var js="SliderThumb",$s=n.forwardRef((t,r)=>{const o=Ns(t.__scopeSlider),[a,i]=n.useState(null),s=x(r,e=>i(e)),l=n.useMemo(()=>a?o().findIndex(e=>e.ref.current===a):-1,[o,a]);return e(Vs,{...t,ref:s,index:l})}),Vs=n.forwardRef((t,o)=>{const{__scopeSlider:a,index:i,name:s,...l}=t,d=Rs(js,a),c=Ts(js,a),[u,m]=n.useState(null),f=x(o,e=>m(e)),p=!u||(d.form||!!u.closest("form")),h=vo(u),g=d.values[i],b=void 0===g?0:Bs(g,d.min,d.max),v=function(e,t){return t>2?`Value ${e+1} of ${t}`:2===t?["Minimum","Maximum"][e]:void 0}(i,d.values.length),y=h?.[c.size],w=y?function(e,t,r){const n=e/2,o=Ws([0,50],[0,n]);return(n-o(t)*r)*r}(y,b,c.direction):0;return n.useEffect(()=>{if(u)return d.thumbs.add(u),()=>{d.thumbs.delete(u)}},[u,d.thumbs]),r("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[c.startEdge]:`calc(${b}% + ${w}px)`},children:[e(ks.ItemSlot,{scope:t.__scopeSlider,children:e(S.span,{role:"slider","aria-label":t["aria-label"]||v,"aria-valuemin":d.min,"aria-valuenow":g,"aria-valuemax":d.max,"aria-orientation":d.orientation,"data-orientation":d.orientation,"data-disabled":d.disabled?"":void 0,tabIndex:d.disabled?void 0:0,...l,ref:f,style:void 0===g?{display:"none"}:t.style,onFocus:z(t.onFocus,()=>{d.valueIndexToChangeRef.current=i})})}),p&&e(Fs,{name:s??(d.name?d.name+(d.values.length>1?"[]":""):void 0),form:d.form,value:g},i)]})});$s.displayName=js;var Fs=n.forwardRef(({__scopeSlider:t,value:r,...o},a)=>{const i=n.useRef(null),s=x(i,a),l=bs(r);return n.useEffect(()=>{const e=i.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(S.input,{style:{display:"none"},...o,ref:s,defaultValue:r})});function Bs(e,t,r){return gs(100/(r-t)*(e-t),[0,100])}function Ws(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])}}Fs.displayName="RadioBubbleInput";var Hs=Es,Gs=As,qs=Os,Ks=$s;function Us({defaultValue:t=[0,1e3],min:o=0,max:a=1e3,step:i=1,className:s="",trackClassName:l="",rangeClassName:d="",thumbClassName:c="",showValue:u=!1,valueClassName:m="",isPercentage:f=!1,valuePosition:p="bottom",dir:h="ltr",onValueChange:g,...b}){const[x,v]=n.useState(t);return r(Hs,{value:x,onValueChange:e=>{const[t,r]=e,n=[Math.max(o,Math.min(t,a)),Math.min(a,Math.max(r,o))];v(n),g?.(n)},min:o,max:a,step:i,dir:h,className:ir("relative flex w-full touch-none select-none items-center",s),...b,children:[e(Gs,{className:ir("relative h-2 w-full grow overflow-hidden rounded-full bg-gray-light-200",l),children:e(qs,{className:ir("absolute h-full bg-rfg-brand-primary-600",d)})}),x.map((t,r)=>e(Ks,{className:ir("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:u&&e("span",{className:ir("absolute left-1/2 -translate-x-1/2 whitespace-nowrap text-xs text-gray-700","top"===p?"bottom-7":"top-7",m),children:f?`٪${t}`:t.toLocaleString()})},r))]})}var Xs="Switch",[Ys]=p(Xs),[Zs,Js]=Ys(Xs),Qs=n.forwardRef((t,o)=>{const{__scopeSwitch:a,name:i,checked:s,defaultChecked:l,required:d,disabled:c,value:u="on",onCheckedChange:m,form:f,...p}=t,[h,g]=n.useState(null),b=x(o,e=>g(e)),v=n.useRef(!1),y=!h||(f||!!h.closest("form")),[w,k]=E({prop:s,defaultProp:l??!1,onChange:m,caller:Xs});return r(Zs,{scope:a,checked:w,disabled:c,children:[e(S.button,{type:"button",role:"switch","aria-checked":w,"aria-required":d,"data-state":nl(w),"data-disabled":c?"":void 0,disabled:c,value:u,...p,ref:b,onClick:z(t.onClick,e=>{k(e=>!e),y&&(v.current=e.isPropagationStopped(),v.current||e.stopPropagation())})}),y&&e(rl,{control:h,bubbles:!v.current,name:i,value:u,checked:w,required:d,disabled:c,form:f,style:{transform:"translateX(-100%)"}})]})});Qs.displayName=Xs;var el="SwitchThumb",tl=n.forwardRef((t,r)=>{const{__scopeSwitch:n,...o}=t,a=Js(el,n);return e(S.span,{"data-state":nl(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:r})});tl.displayName=el;var rl=n.forwardRef(({__scopeSwitch:t,control:r,checked:o,bubbles:a=!0,...i},s)=>{const l=n.useRef(null),d=x(l,s),c=bs(o),u=vo(r);return n.useEffect(()=>{const e=l.current;if(!e)return;const t=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(t,"checked").set;if(c!==o&&r){const t=new Event("click",{bubbles:a});r.call(e,o),e.dispatchEvent(t)}},[c,o,a]),e("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o,...i,tabIndex:-1,ref:d,style:{...i.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function nl(e){return e?"checked":"unchecked"}rl.displayName="SwitchBubbleInput";var ol=Qs,al=tl;function il({label:t,labelClassName:n,handleClick:o,description:a,descriptionClassName:i}){return r("div",{className:"flex flex-col gap-1",children:[t&&e(Fa,{type:"button",variant:"linkGray",className:ir("text-sm",n),onClick:o,children:t}),a&&e("span",{className:ir("text-xs text-gray-500",i),children:a})]})}const sl=n.forwardRef(({className:t,thumbClassName:o,label:a,labelClassName:i,descriptionClassName:s,description:l,onToggle:d,...c},u)=>{const[m,f]=n.useState(!1),p=()=>{f(e=>!e),d()};return r("div",{className:ir("flex gap-1",l?"items-start":"items-center"),children:[e(ol,{ref:u,className:ir("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,l?"mt-0.5":"mt-0"),onCheckedChange:p,checked:m,...c,children:e(al,{className:ir("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",o)})}),e(il,{label:a,labelClassName:i,handleClick:p,description:l,descriptionClassName:s})]})});sl.displayName="Switch";var ll="rovingFocusGroup.onEntryFocus",dl={bubbles:!1,cancelable:!0},cl="RovingFocusGroup",[ul,ml,fl]=C(cl),[pl,hl]=p(cl,[fl]),[gl,bl]=pl(cl),xl=n.forwardRef((t,r)=>e(ul.Provider,{scope:t.__scopeRovingFocusGroup,children:e(ul.Slot,{scope:t.__scopeRovingFocusGroup,children:e(vl,{...t,ref:r})})}));xl.displayName=cl;var vl=n.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:o,orientation:a,loop:i=!1,dir:s,currentTabStopId:l,defaultCurrentTabStopId:d,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:m=!1,...f}=t,p=n.useRef(null),h=x(r,p),g=Z(s),[b,v]=E({prop:l,defaultProp:d??null,onChange:c,caller:cl}),[y,w]=n.useState(!1),k=xr(u),N=ml(o),C=n.useRef(!1),[P,R]=n.useState(0);return n.useEffect(()=>{const e=p.current;if(e)return e.addEventListener(ll,k),()=>e.removeEventListener(ll,k)},[k]),e(gl,{scope:o,orientation:a,dir:g,loop:i,currentTabStopId:b,onItemFocus:n.useCallback(e=>v(e),[v]),onItemShiftTab:n.useCallback(()=>w(!0),[]),onFocusableItemAdd:n.useCallback(()=>R(e=>e+1),[]),onFocusableItemRemove:n.useCallback(()=>R(e=>e-1),[]),children:e(S.div,{tabIndex:y||0===P?-1:0,"data-orientation":a,...f,ref:h,style:{outline:"none",...t.style},onMouseDown:z(t.onMouseDown,()=>{C.current=!0}),onFocus:z(t.onFocus,e=>{const t=!C.current;if(e.target===e.currentTarget&&t&&!y){const t=new CustomEvent(ll,dl);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=N().filter(e=>e.focusable);Nl([e.find(e=>e.active),e.find(e=>e.id===b),...e].filter(Boolean).map(e=>e.ref.current),m)}}C.current=!1}),onBlur:z(t.onBlur,()=>w(!1))})})}),yl="RovingFocusGroupItem",wl=n.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:o,focusable:a=!0,active:i=!1,tabStopId:s,children:l,...d}=t,c=D(),u=s||c,m=bl(yl,o),f=m.currentTabStopId===u,p=ml(o),{onFocusableItemAdd:h,onFocusableItemRemove:g,currentTabStopId:b}=m;return n.useEffect(()=>{if(a)return h(),()=>g()},[a,h,g]),e(ul.ItemSlot,{scope:o,id:u,focusable:a,active:i,children:e(S.span,{tabIndex:f?0:-1,"data-orientation":m.orientation,...d,ref:r,onMouseDown:z(t.onMouseDown,e=>{a?m.onItemFocus(u):e.preventDefault()}),onFocus:z(t.onFocus,()=>m.onItemFocus(u)),onKeyDown:z(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:kl[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(()=>Nl(o))}var r,n}),children:"function"==typeof l?l({isCurrentTabStop:f,hasTabStop:null!=b}):l})})});wl.displayName=yl;var kl={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Nl(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 Cl=xl,zl=wl,Pl="Tabs",[Rl]=p(Pl,[hl]),El=hl(),[Sl,Tl]=Rl(Pl),Ll=n.forwardRef((t,r)=>{const{__scopeTabs:n,value:o,onValueChange:a,defaultValue:i,orientation:s="horizontal",dir:l,activationMode:d="automatic",...c}=t,u=Z(l),[m,f]=E({prop:o,onChange:a,defaultProp:i??"",caller:Pl});return e(Sl,{scope:n,baseId:D(),value:m,onValueChange:f,orientation:s,dir:u,activationMode:d,children:e(S.div,{dir:u,"data-orientation":s,...c,ref:r})})});Ll.displayName=Pl;var Il="TabsList",Ml=n.forwardRef((t,r)=>{const{__scopeTabs:n,loop:o=!0,...a}=t,i=Tl(Il,n),s=El(n);return e(Cl,{asChild:!0,...s,orientation:i.orientation,dir:i.dir,loop:o,children:e(S.div,{role:"tablist","aria-orientation":i.orientation,...a,ref:r})})});Ml.displayName=Il;var Dl="TabsTrigger",Al=n.forwardRef((t,r)=>{const{__scopeTabs:n,value:o,disabled:a=!1,...i}=t,s=Tl(Dl,n),l=El(n),d=jl(s.baseId,o),c=$l(s.baseId,o),u=o===s.value;return e(zl,{asChild:!0,...l,focusable:!a,active:u,children:e(S.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:d,...i,ref:r,onMouseDown:z(t.onMouseDown,e=>{a||0!==e.button||!1!==e.ctrlKey?e.preventDefault():s.onValueChange(o)}),onKeyDown:z(t.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&s.onValueChange(o)}),onFocus:z(t.onFocus,()=>{const e="manual"!==s.activationMode;u||a||!e||s.onValueChange(o)})})})});Al.displayName=Dl;var _l="TabsContent",Ol=n.forwardRef((t,r)=>{const{__scopeTabs:o,value:a,forceMount:i,children:s,...l}=t,d=Tl(_l,o),c=jl(d.baseId,a),u=$l(d.baseId,a),m=a===d.value,f=n.useRef(m);return n.useEffect(()=>{const e=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(e)},[]),e(T,{present:i||m,children:({present:n})=>e(S.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&&s})})});function jl(e,t){return`${e}-trigger-${t}`}function $l(e,t){return`${e}-content-${t}`}Ol.displayName=_l;var Vl=Ll,Fl=Ml,Bl=Al,Wl=Ol;const Hl=La(" 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"}}),Gl=La(" 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 ql=Object.assign(({className:t,direction:r="horizontal",dir:n="rtl",...o})=>e(Vl,{"data-slot":"tabs",dir:n,className:ir("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(Fl,{"data-slot":"tabs-list",className:ir(Hl({fullWidth:o,listVariant:r,direction:n}),t),...a})},Trigger:function({className:t,triggerVariant:r,fullWidth:n,...o}){return e(Bl,{"data-slot":"tabs-trigger",className:ir(Gl({triggerVariant:r,fullWidth:n}),t),...o})},Content:function({className:t,...r}){return e(Wl,{"data-slot":"tabs-content",className:ir("flex-1 outline-none",t),...r})}}),Kl=La("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"}}),Ul=La("",{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"}}),Xl=La("",{variants:{size:{sm:"10",md:"12",lg:"14"}},defaultVariants:{size:"sm"}});function Yl({number:t,size:r}){return e("div",{className:ir(Ul({size:r}),"bg-gray-light-100 rounded-[3px]"),children:t})}const Zl=({className:t,size:n="sm",number:o,pin:a=!1,avatar:i,children:s,checkbox:l,dir:d="rtl",icon:c,checkboxIndex:u,...m})=>{const f="x-close"===c&&e(Ea,{width:ir(Xl({size:n})),height:ir(Xl({size:n})),stroke:"#98A2B3"});return r("div",{className:ir(Kl({size:n,dir:d,icon:c}),t),...m,children:[f,o&&e(Yl,{number:o,size:n}),e("span",{children:s}),i&&e("img",{src:i,alt:"avatar",className:"w-4 h-4 rounded-full"}),a&&e("span",{className:"w-1.5 h-1.5 rounded-full bg-current"}),l&&e(qa,{checkboxIndex:u,size:n,id:l,name:l||""})]})},Jl=La("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"),Ql=({row:t=5,label:n,required:o=!1,destructive:a=!1,disabled:i=!1,destructiveText:s,hintText:l,placeholder:d,helpIcon:c=!1,onChange:u,id:m,tooltipProps:f,className:p,value:h,name:g,labelClass:b,labelStarClass:x,autoFocus:v=!1,...y})=>r("div",{className:"flex flex-col gap-1",children:[r("div",{className:"flex items-center",children:[e(Bi,{id:m,label:n,required:o,labelClass:b,labelStarClass:x}),c&&f&&e(Na,{content:f?.text,description:f?.description,position:f?.position,dir:f?.dir,descriptionClassName:f?.descriptionClassName,children:e("div",{children:e(Wi,{})})})]}),e("textarea",{value:h,name:g,disabled:i,rows:t,placeholder:d,id:m,onChange:u,className:ir(Jl(),p,a&&"!border-2 !border-rborder-error focus:!outline-0",a&&"bg-rbg-disabled-subtle border-rborder-disabled"),autoFocus:v,...y}),!1===a&&l&&e("p",{className:"text-sm text-rtext-tertiary-600",children:l}),a&&s&&e("p",{className:"text-sm text-rtext-error-primary-600",children:s})]}),ed={success:e(Be,{className:"text-green-100",size:20}),error:e(We,{className:"text-red-100",size:20}),info:e(Ue,{className:"text-blue-100",size:20}),warning:e(Ye,{className:"text-yellow-100",size:20})},td={success:"bg-green-500",error:"bg-red-500",info:"bg-blue-500",warning:"bg-yellow-500 text-black"},rd={fade:"transition-all duration-300",slide:"transition-all duration-300 transform translate-x-0",scale:"transition-all duration-300 transform scale-100"},nd={fade:"opacity-0",slide:"translate-x-10 opacity-0",scale:"scale-0 opacity-0"};function od(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 ad=["top-left","top-center","top-right","middle-center","bottom-left","bottom-center","bottom-right"],id=({type:n="info",position:o="top-right",duration:a=3e3,animation:i="fade",showProgress:l=!0})=>{const[d,m]=s([]),f=u({});c(()=>{ld({type:n,duration:a,animation:i,position:o,showProgress:l})},[]),c(()=>{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};m(e=>{if(e.length>=3)return e;const o=Date.now();return f.current[t]={timeoutId:setTimeout(()=>p(t),r),start:o,remaining:r},[...e,n]}),requestAnimationFrame(()=>{m(e=>e.map(e=>e.id===t?{...e,progressVisible:!0}:e))})};return window.addEventListener("custom-toast",e),()=>window.removeEventListener("custom-toast",e)},[]);const p=e=>{m(t=>t.map(t=>t.id===e?{...t,visible:!1}:t)),setTimeout(()=>{m(t=>t.filter(t=>t.id!==e)),delete f.current[e]},300)};return e(t,{children:ad.map(t=>{const n=d.filter(e=>e.position===t).slice(-3);return 0===n.length?null:e("div",{className:`fixed z-50 space-y-2 w-full sm:w-[320px] px-4 ${od(t)}`,children:n.map(t=>(console.log("toast : ",t),r("div",{onMouseEnter:()=>(e=>{const t=f.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=f.current[e];!t||t.remaining<=0||(t.start=Date.now(),t.timeoutId=setTimeout(()=>p(e),t.remaining))})(t.id),className:ar("relative px-4 py-3 pr-10 rounded shadow text-white flex items-start gap-3",td[t.type??"info"],rd[t.animation??"fade"],t.visible?"":nd[t.animation??"fade"]),children:[e("span",{children:ed[t.type??"info"]}),e("div",{className:"flex-1 break-words text-sm",dangerouslySetInnerHTML:{__html:t.message}}),e("button",{className:"absolute top-2 right-2 text-white hover:opacity-80",onClick:()=>p(t.id),children:e(Ze,{size:16})}),t.showProgress&&e("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)})})};let sd={};function ld(e){sd=e}function dd(e){const t="string"==typeof e?{...sd,message:e,type:sd?.type??"info"}:{...sd,...e},r=new CustomEvent("custom-toast",{detail:t});window.dispatchEvent(r)}dd.success=(e,t)=>dd({...sd,...t,message:e,type:"success"}),dd.error=(e,t)=>dd({...sd,...t,message:e,type:"error"}),dd.info=(e,t)=>dd({...sd,...t,message:e,type:"info"}),dd.warning=(e,t)=>dd({...sd,...t,message:e,type:"warning"});export{ur as AccordionDemo,Ra as Avatar,Ma as Badge,ja as Breadcrumb,Fa as Button,qa as Checkbox,pi as Dropdown,_i as FileUploader,$i as ImageMagnify,qi as Input,Xi as Message,ts as Metrics,os as Modal,hs as Pagination,Qa as PaymentCard,si as PlanCard,Us as PriceSlider,Mi as Progress,Za as Radio,Gi as Select,sl as Switch,ql as Tabs,Zl as Tag,Ql as TextArea,id as ToastContainer,Na as TooltipWrapper,ci as UserCard,ld as setToastDefaults,dd as toast};
|