@tap-payments/os-micro-frontend-shared 0.3.276 → 0.3.277

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/build/_chunks/{chunk-VNUT3HGU.js → chunk-4UMT2J46.js} +1 -1
  2. package/build/_chunks/{chunk-F4TXGFRW.js → chunk-JGCMUAHD.js} +1 -1
  3. package/build/_chunks/chunk-QWWCMSYY.js +2 -0
  4. package/build/_chunks/chunk-WAQJPDMU.js +2 -0
  5. package/build/components/ColumnViews/index.js +1 -1
  6. package/build/components/DateFilter/index.js +1 -1
  7. package/build/components/FilterDropdown/index.js +1 -1
  8. package/build/components/ListColumnFilter/index.js +1 -1
  9. package/build/components/ListHeader/index.js +1 -1
  10. package/build/components/PhoneFilter/index.js +1 -1
  11. package/build/components/StatusBar/index.js +1 -1
  12. package/build/components/StatusButton/index.js +1 -1
  13. package/build/components/StatusButton/style.d.ts +8 -1
  14. package/build/components/StatusButton/type.d.ts +7 -4
  15. package/build/components/StatusFilter/index.js +1 -1
  16. package/build/components/StatusIcons/index.js +1 -1
  17. package/build/components/TableCells/CustomCells/ActionCell/components/ActionMenu.d.ts +17 -0
  18. package/build/components/TableCells/index.js +1 -1
  19. package/build/components/VerificationIcon/index.js +1 -1
  20. package/build/components/index.d.ts +0 -1
  21. package/build/components/index.js +1 -1
  22. package/build/components/modules/WindowShell/index.js +1 -1
  23. package/build/components/modules/index.js +1 -1
  24. package/build/datetime/components/index.js +1 -1
  25. package/build/index.js +1 -1
  26. package/package.json +1 -1
  27. package/build/_chunks/chunk-LIYQWK6K.js +0 -2
  28. package/build/_chunks/chunk-PCGC6E7J.js +0 -2
  29. package/build/_chunks/chunk-S27723NU.js +0 -1
  30. package/build/components/DropdownMenu/DropdownMenu.d.ts +0 -4
  31. package/build/components/DropdownMenu/index.d.ts +0 -4
  32. package/build/components/DropdownMenu/index.js +0 -1
  33. package/build/components/DropdownMenu/styles.d.ts +0 -21
  34. package/build/components/DropdownMenu/type.d.ts +0 -26
@@ -1 +1 @@
1
- import {f,g,h as h$2,i as i$1,b}from'./chunk-37SWWF3G.js';import {d,c as c$1}from'./chunk-RXDZGI4N.js';import {h as h$1,i,b as b$1,c as c$2,f as f$2,e,d as d$1,j as j$1}from'./chunk-7L6NBFKR.js';import {h,c,f as f$1}from'./chunk-ISC5KT5E.js';import {mc,nc}from'./chunk-Z2DUFVI5.js';import'./chunk-3M2GZVQW.js';import {memo,forwardRef,useState,useEffect,useRef}from'react';import {createPortal}from'react-dom';import oo from'@mui/material/Backdrop';import {styled,alpha}from'@mui/material/styles';import v from'@mui/material/Box';import {motion,animate}from'framer-motion';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var H="os-shared-WindowShell",x={root:`${H}-root`,sidebar:`${H}-sidebar`,body:`${H}-body`,panel:`${H}-panel`};var we=styled(v)(()=>({display:"flex",flexDirection:"row",flex:1,minHeight:0,height:"100%",backgroundColor:"transparent"})),xe=styled(v)(()=>({flexShrink:0,overflow:"hidden auto",backgroundColor:"transparent",transition:"none"})),be=styled(v)(({theme:e})=>({flexShrink:0,overflow:"hidden auto",borderLeft:`1px solid ${e.palette.divider}`,backgroundColor:"transparent",transition:"none"})),ye=styled(v)(()=>({display:"flex",flexDirection:"column",flex:1,minWidth:0,minHeight:0})),ze=styled(v,{shouldForwardProp:e=>e!=="$width"})(({$width:e})=>({flexShrink:0,overflow:"hidden",display:"flex",alignItems:"stretch",position:"relative",width:e})),Ne=styled(motion.div)(()=>({flexShrink:0,overflow:"hidden",display:"flex",alignItems:"stretch",position:"relative"})),Ce=styled(motion.div,{shouldForwardProp:e=>e!=="$slotWidth"})(({$slotWidth:e})=>({width:e,minWidth:e,minHeight:"100%",height:"100%",overflow:"hidden"})),Ie=styled(v,{shouldForwardProp:e=>e!=="$visible"&&e!=="$duration"})(({$visible:e=true,$duration:o=h})=>({display:"flex",alignItems:"center",overflow:"hidden",whiteSpace:"nowrap",flexShrink:0,maxWidth:e?160:0,opacity:e?1:0,pointerEvents:e?"auto":"none",transition:o>0?`max-width ${.3*o}s ease-in-out, opacity ${.24*o}s ease-in-out`:"none"})),Te=styled(h$1,{shouldForwardProp:e=>e!=="$width"})(({$width:e})=>({...e!=null?{flex:`0 0 ${e}px`,maxWidth:e}:null})),Pe=styled(i,{shouldForwardProp:e=>e!=="$width"&&e!=="$justifyContent"})(({$width:e,$justifyContent:o="flex-start"})=>({...e!=null?{flex:`0 0 ${e}px`,maxWidth:e,justifyContent:o}:null}));var Ue=220;function ge(e,o,a){return Math.min(Math.max(e,o??0),a??1/0)}function Ae(e,o,a,n){if(Math.abs(e-o)<=1)return;let r=animate(0,1,{duration:a,onUpdate:t=>{n(s=>({...s,width:e+(o-e)*t}));}});return ()=>r.stop()}function G(e,o){if(e===false)return {duration:0,resize:o};let a=typeof e=="object"?e:void 0,n=a?.duration;return {duration:typeof n=="number"&&Number.isFinite(n)?Math.max(0,n):h,resize:a?.resize??o}}function j(e){return e?.children==null||e.expand?.isExpanded===false?false:e.expand?.isExpanded===true}function F(e,o=Ue){let a=Array.isArray(e)?e.flat():[e];for(let n=a.length-1;n>=0;n--){let r=a[n];if(r!=null&&typeof r=="object"&&!Array.isArray(r)&&typeof r.width=="number")return r.width}return o}function Ee(e){let o=e["data-id"]??e.id;return o!=null?{"data-id":o}:{}}function Me({kind:e,slot:o,isOpen:a,fullWidth:n,wrapperWidth:r,animateWrapperWidth:t,animation:s}){let p=e==="sidebar"?xe:be,d=e==="sidebar"?x.sidebar:x.panel,m=o["data-testid"]?`${o["data-testid"]}Wrapper`:e==="sidebar"?"WindowShellSidebarWrapper":"WindowShellPanelWrapper",i=o["data-testid"]??o.id??(e==="sidebar"?"WindowShellSidebar":"WindowShellPanel"),l=Ee(o),u=jsx(p,{id:o.id,className:nc(d,o.className),"data-testid":i,...l,sx:mc({width:n,minWidth:0},o.sx),children:jsx(Ce,{$slotWidth:n,animate:{x:a?0:-n},transition:{duration:s.duration},children:o.children})});return t?jsx(Ne,{"data-testid":m,...l,animate:{width:r},transition:{duration:s.duration},children:u}):jsx(ze,{"data-testid":m,...l,$width:r,children:u})}Me.displayName="WindowShellSlotColumn";var J=memo(Me);function De({baseWindowWidth:e,sidebar:o,panel:a,content:n,bodyContent:r,sidebarOpen:t,showPanel:s,sidebarFullWidth:p,panelFullWidth:d,sidebarAnimation:m,panelAnimation:i}){let{size:l}=b(),u=i.resize==="window",W=typeof e=="number"?Math.max(0,e-(u?d:0)-(m.resize==="window"&&!t?p:0)):l.width,b$1=u?s?Math.min(d,Math.max(0,l.width-W)):0:s?d:0,y=t?p:0;return jsxs(we,{className:nc(x.root),children:[o?.children?jsx(J,{kind:"sidebar",slot:o,isOpen:t,fullWidth:p,wrapperWidth:y,animateWrapperWidth:true,animation:m}):null,jsx(ye,{id:n?.id?`${n.id}Body`:void 0,className:nc(x.body,n?.className),"data-testid":n?.["data-testid"]?`${n["data-testid"]}Body`:n?.id?`${n.id}Body`:"WindowShellBody",...(n?.["data-id"]??n?.id)!=null?{"data-id":n?.["data-id"]?`${n["data-id"]}Body`:`${n?.id}Body`}:null,sx:n?.sx,children:r}),a?.children?jsx(J,{kind:"panel",slot:a,isOpen:s,fullWidth:d,wrapperWidth:b$1,animateWrapperWidth:!u,animation:i}):null]})}De.displayName="WindowShellSlotsLayout";var Re=memo(De);function $e({sidebarOpen:e,showPanel:o,sidebarResize:a,panelResize:n,sidebarDuration:r,panelDuration:t}){let{size:s,setSize:p,defaultSize:d,minSize:m,maxSize:i}=b(),l=useRef(s);l.current=s;let u=useRef(d.width),W=useRef(e),b$1=useRef(o),y=useRef(d.width);return useEffect(()=>{let C=b$1.current!==o,w=W.current!==e,E=y.current!==d.width;b$1.current=o,W.current=e,y.current=d.width;let S;if(w&&a==="window"?S=r:(C&&n==="window"||E&&!C&&!w)&&(S=t),S==null)return;let h=ge(d.width,m?.width,i?.width);return u.current=h,Ae(l.current.width,h,S,p)},[d.width,o,e,a,n,r,t,m?.width,i?.width,p]),null}$e.displayName="WindowShellAnimator";var Oe=memo($e);function ve({toolbar:e$1,sidebar:o,panel:a,animationDuration:n=h}){let{title:r,titleIcon:t,onClose:s,onMinimize:p,onMaximize:d,startAdornment:m,endAdornment:i,id:l,className:u,"data-testid":W,"data-id":b$2,sx:y}=e$1??{},{isMaximized:C}=b(),w=typeof s=="function"?s:void 0,E=typeof p=="function"?p:void 0,S=typeof d=="function"?d:void 0,h=o?.expand,c=a?.expand,z=j(a),L=h?.isExpanded??true,M=h!=null&&o?.children!=null,D=c!=null&&a?.children!=null&&z,k=M&&D,V=F(a?.sx),_=o!=null?F(o.sx):0,I=Math.max(_,V),T=k&&L?I:void 0,Z=D?I:void 0,X=D;return jsxs(b$1,{id:l??f$1,className:u,"data-testid":W??l??"WindowToolbar","data-id":b$2??l,sx:y,children:[jsxs(Te,{$width:T,children:[w?jsx(c$2,{onClick:w}):null,E?jsx(f$2,{onClick:E}):null,S?jsx(e,{isMaximized:C,onClick:S}):null,M&&h?jsx(d$1,{direction:h.isExpanded??true?"left":"right",active:h.isExpanded??true,onClick:h.onExpand,children:h.label}):null,m]}),jsx(j$1,{title:r,icon:t}),jsxs(Pe,{$width:Z,$justifyContent:i?"space-between":"flex-start",children:[D?jsx(Ie,{$visible:X,$duration:n,children:jsx(d$1,{sx:{flexShrink:0},direction:c?.isExpanded??true?"left":"right",active:z,onClick:c?.onExpand,children:c?.label})}):null,i]})]})}ve.displayName="WindowShellToolbar";var Fe=memo(ve);var Be=forwardRef(function({isOpen:o,className:a,sx:n,toolbar:r,services:t,sidebar:s,panel:p,footer:d$1,content:m,window:i,backdrop:l},u){let W=t?.list??[],b=(t?.isLoading??false)||W.length>0,y=d$1!=null&&(d$1.isVisible??true),C=s?.children,w=F(s?.sx),E=p?.children,S=p!=null?F(p.sx):0,h=m?.children,c$2=s?.expand?.isExpanded??C!=null,z=j(p),L=!!(C||E),[M,D]=useState(w),[k,V]=useState(S);useEffect(()=>{c$2&&D(w),z&&V(S);},[c$2,w,z,S]);let _=r?.onClose??r?.onMinimize??(()=>{}),I=G(s?.animation,"in-place"),T=G(p?.animation,"in-place"),Z=(()=>{let P=i?.defaultSize;if(typeof P?.width!="number")return P;let oe=(I.resize==="window"&&!c$2?M:0)+(T.resize==="window"&&!z?k:0);return oe>0?{...P,width:Math.max(0,P.width-oe)}:P})(),X={height:i?.minSize?.height??i?.defaultSize?.height??c,...i?.minSize?.width!=null?{width:i.minSize.width}:null},Le=l!=null&&(l.isVisible??true)&&o&&!i?.isMinimized,_e=(i?.order??0)+10-1,ee=jsx(oo,{open:true,onClick:_,id:l?.id,className:l?.className,"data-testid":l?.["data-testid"]??l?.id??"WindowShellBackdrop",...(l?.["data-id"]??l?.id)!=null?{"data-id":l?.["data-id"]??l?.id}:null,sx:mc({zIndex:_e,backgroundColor:P=>alpha(P.palette.common.black,.3)},l?.sx)});return jsxs(Fragment,{children:[Le&&(i?.disablePortal?ee:createPortal(ee,document.body)),jsxs(f,{ref:u,isOpen:o,onClose:_,defaultSize:Z,minSize:X,maxSize:i?.maxSize,defaultPosition:i?.defaultPosition,containerRef:i?.containerRef,order:i?.order,isMinimized:i?.isMinimized,isMaximized:i?.isMaximized,id:i?.id,className:nc(x.root,i?.className,a),sx:n,onResize:i?.onResize,onDragStart:i?.onDragStart,onMouseDown:i?.onMouseDown,onClick:i?.onClick,disablePortal:i?.disablePortal,"data-testid":i?.["data-testid"]??i?.id,"data-id":i?.["data-id"]??i?.id,children:[jsx(Oe,{sidebarOpen:c$2,showPanel:z,sidebarWidth:M,panelWidth:k,sidebarResize:I.resize,panelResize:T.resize,sidebarDuration:I.duration,panelDuration:T.duration}),jsx(Fe,{toolbar:r,sidebar:s,panel:p,animationDuration:T.duration}),b?t?.isLoading?jsx(d,{appCode:t?.appCode,id:t?.id,className:t?.className,"data-testid":t?.["data-testid"]??t?.id,"data-id":t?.["data-id"]??t?.id,sx:mc({height:"auto",flexShrink:0},t?.sx)}):jsx(c$1,{services:W,serviceCode:t?.activeCode??"",onOpenService:t?.onOpen,onOpenServiceInNewWindow:t?.onOpenInNewWindow,language:t?.language??"en",openInNewWindowLabel:t?.openInNewWindowLabel??"Open in new window",id:t?.id,className:t?.className,"data-testid":t?.["data-testid"]??t?.id,"data-id":t?.["data-id"]??t?.id,sx:t?.sx}):null,jsx(g,{id:m?.id,className:m?.className,"data-testid":m?.["data-testid"]??m?.id,"data-id":m?.["data-id"]??m?.id,sx:L?void 0:m?.sx,children:L?jsx(Re,{baseWindowWidth:typeof i?.defaultSize?.width=="number"?i.defaultSize.width:void 0,sidebar:s,panel:p,content:m,bodyContent:h,sidebarOpen:c$2,showPanel:z,sidebarFullWidth:M,panelFullWidth:k,sidebarAnimation:I,panelAnimation:T}):h}),y?jsxs(h$2,{id:d$1?.id,className:d$1?.className,"data-testid":d$1?.["data-testid"]??d$1?.id,"data-id":d$1?.["data-id"]??d$1?.id,sx:d$1?.isVisible===true?mc(d$1?.sx??{},{"&:empty, &:has(> :only-child:empty)":{display:"flex"}}):d$1?.sx,children:[d$1?.children,d$1?.actions?jsx(i$1,{children:d$1.actions}):null]}):null]})]})});Be.displayName="WindowShell";var to=memo(Be);export{x as a,to as b};
1
+ import {d,c as c$1}from'./chunk-RXDZGI4N.js';import {f,g,h as h$2,i as i$1,b}from'./chunk-37SWWF3G.js';import {h as h$1,i,b as b$1,c as c$2,f as f$2,e,d as d$1,j as j$1}from'./chunk-7L6NBFKR.js';import {h,c,f as f$1}from'./chunk-ISC5KT5E.js';import {mc,nc}from'./chunk-Z2DUFVI5.js';import'./chunk-3M2GZVQW.js';import {memo,forwardRef,useState,useEffect,useRef}from'react';import {createPortal}from'react-dom';import oo from'@mui/material/Backdrop';import {styled,alpha}from'@mui/material/styles';import v from'@mui/material/Box';import {motion,animate}from'framer-motion';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var H="os-shared-WindowShell",x={root:`${H}-root`,sidebar:`${H}-sidebar`,body:`${H}-body`,panel:`${H}-panel`};var we=styled(v)(()=>({display:"flex",flexDirection:"row",flex:1,minHeight:0,height:"100%",backgroundColor:"transparent"})),xe=styled(v)(()=>({flexShrink:0,overflow:"hidden auto",backgroundColor:"transparent",transition:"none"})),be=styled(v)(({theme:e})=>({flexShrink:0,overflow:"hidden auto",borderLeft:`1px solid ${e.palette.divider}`,backgroundColor:"transparent",transition:"none"})),ye=styled(v)(()=>({display:"flex",flexDirection:"column",flex:1,minWidth:0,minHeight:0})),ze=styled(v,{shouldForwardProp:e=>e!=="$width"})(({$width:e})=>({flexShrink:0,overflow:"hidden",display:"flex",alignItems:"stretch",position:"relative",width:e})),Ne=styled(motion.div)(()=>({flexShrink:0,overflow:"hidden",display:"flex",alignItems:"stretch",position:"relative"})),Ce=styled(motion.div,{shouldForwardProp:e=>e!=="$slotWidth"})(({$slotWidth:e})=>({width:e,minWidth:e,minHeight:"100%",height:"100%",overflow:"hidden"})),Ie=styled(v,{shouldForwardProp:e=>e!=="$visible"&&e!=="$duration"})(({$visible:e=true,$duration:o=h})=>({display:"flex",alignItems:"center",overflow:"hidden",whiteSpace:"nowrap",flexShrink:0,maxWidth:e?160:0,opacity:e?1:0,pointerEvents:e?"auto":"none",transition:o>0?`max-width ${.3*o}s ease-in-out, opacity ${.24*o}s ease-in-out`:"none"})),Te=styled(h$1,{shouldForwardProp:e=>e!=="$width"})(({$width:e})=>({...e!=null?{flex:`0 0 ${e}px`,maxWidth:e}:null})),Pe=styled(i,{shouldForwardProp:e=>e!=="$width"&&e!=="$justifyContent"})(({$width:e,$justifyContent:o="flex-start"})=>({...e!=null?{flex:`0 0 ${e}px`,maxWidth:e,justifyContent:o}:null}));var Ue=220;function ge(e,o,a){return Math.min(Math.max(e,o??0),a??1/0)}function Ae(e,o,a,n){if(Math.abs(e-o)<=1)return;let r=animate(0,1,{duration:a,onUpdate:t=>{n(s=>({...s,width:e+(o-e)*t}));}});return ()=>r.stop()}function G(e,o){if(e===false)return {duration:0,resize:o};let a=typeof e=="object"?e:void 0,n=a?.duration;return {duration:typeof n=="number"&&Number.isFinite(n)?Math.max(0,n):h,resize:a?.resize??o}}function j(e){return e?.children==null||e.expand?.isExpanded===false?false:e.expand?.isExpanded===true}function F(e,o=Ue){let a=Array.isArray(e)?e.flat():[e];for(let n=a.length-1;n>=0;n--){let r=a[n];if(r!=null&&typeof r=="object"&&!Array.isArray(r)&&typeof r.width=="number")return r.width}return o}function Ee(e){let o=e["data-id"]??e.id;return o!=null?{"data-id":o}:{}}function Me({kind:e,slot:o,isOpen:a,fullWidth:n,wrapperWidth:r,animateWrapperWidth:t,animation:s}){let p=e==="sidebar"?xe:be,d=e==="sidebar"?x.sidebar:x.panel,m=o["data-testid"]?`${o["data-testid"]}Wrapper`:e==="sidebar"?"WindowShellSidebarWrapper":"WindowShellPanelWrapper",i=o["data-testid"]??o.id??(e==="sidebar"?"WindowShellSidebar":"WindowShellPanel"),l=Ee(o),u=jsx(p,{id:o.id,className:nc(d,o.className),"data-testid":i,...l,sx:mc({width:n,minWidth:0},o.sx),children:jsx(Ce,{$slotWidth:n,animate:{x:a?0:-n},transition:{duration:s.duration},children:o.children})});return t?jsx(Ne,{"data-testid":m,...l,animate:{width:r},transition:{duration:s.duration},children:u}):jsx(ze,{"data-testid":m,...l,$width:r,children:u})}Me.displayName="WindowShellSlotColumn";var J=memo(Me);function De({baseWindowWidth:e,sidebar:o,panel:a,content:n,bodyContent:r,sidebarOpen:t,showPanel:s,sidebarFullWidth:p,panelFullWidth:d,sidebarAnimation:m,panelAnimation:i}){let{size:l}=b(),u=i.resize==="window",W=typeof e=="number"?Math.max(0,e-(u?d:0)-(m.resize==="window"&&!t?p:0)):l.width,b$1=u?s?Math.min(d,Math.max(0,l.width-W)):0:s?d:0,y=t?p:0;return jsxs(we,{className:nc(x.root),children:[o?.children?jsx(J,{kind:"sidebar",slot:o,isOpen:t,fullWidth:p,wrapperWidth:y,animateWrapperWidth:true,animation:m}):null,jsx(ye,{id:n?.id?`${n.id}Body`:void 0,className:nc(x.body,n?.className),"data-testid":n?.["data-testid"]?`${n["data-testid"]}Body`:n?.id?`${n.id}Body`:"WindowShellBody",...(n?.["data-id"]??n?.id)!=null?{"data-id":n?.["data-id"]?`${n["data-id"]}Body`:`${n?.id}Body`}:null,sx:n?.sx,children:r}),a?.children?jsx(J,{kind:"panel",slot:a,isOpen:s,fullWidth:d,wrapperWidth:b$1,animateWrapperWidth:!u,animation:i}):null]})}De.displayName="WindowShellSlotsLayout";var Re=memo(De);function $e({sidebarOpen:e,showPanel:o,sidebarResize:a,panelResize:n,sidebarDuration:r,panelDuration:t}){let{size:s,setSize:p,defaultSize:d,minSize:m,maxSize:i}=b(),l=useRef(s);l.current=s;let u=useRef(d.width),W=useRef(e),b$1=useRef(o),y=useRef(d.width);return useEffect(()=>{let C=b$1.current!==o,w=W.current!==e,E=y.current!==d.width;b$1.current=o,W.current=e,y.current=d.width;let S;if(w&&a==="window"?S=r:(C&&n==="window"||E&&!C&&!w)&&(S=t),S==null)return;let h=ge(d.width,m?.width,i?.width);return u.current=h,Ae(l.current.width,h,S,p)},[d.width,o,e,a,n,r,t,m?.width,i?.width,p]),null}$e.displayName="WindowShellAnimator";var Oe=memo($e);function ve({toolbar:e$1,sidebar:o,panel:a,animationDuration:n=h}){let{title:r,titleIcon:t,onClose:s,onMinimize:p,onMaximize:d,startAdornment:m,endAdornment:i,id:l,className:u,"data-testid":W,"data-id":b$2,sx:y}=e$1??{},{isMaximized:C}=b(),w=typeof s=="function"?s:void 0,E=typeof p=="function"?p:void 0,S=typeof d=="function"?d:void 0,h=o?.expand,c=a?.expand,z=j(a),L=h?.isExpanded??true,M=h!=null&&o?.children!=null,D=c!=null&&a?.children!=null&&z,k=M&&D,V=F(a?.sx),_=o!=null?F(o.sx):0,I=Math.max(_,V),T=k&&L?I:void 0,Z=D?I:void 0,X=D;return jsxs(b$1,{id:l??f$1,className:u,"data-testid":W??l??"WindowToolbar","data-id":b$2??l,sx:y,children:[jsxs(Te,{$width:T,children:[w?jsx(c$2,{onClick:w}):null,E?jsx(f$2,{onClick:E}):null,S?jsx(e,{isMaximized:C,onClick:S}):null,M&&h?jsx(d$1,{direction:h.isExpanded??true?"left":"right",active:h.isExpanded??true,onClick:h.onExpand,children:h.label}):null,m]}),jsx(j$1,{title:r,icon:t}),jsxs(Pe,{$width:Z,$justifyContent:i?"space-between":"flex-start",children:[D?jsx(Ie,{$visible:X,$duration:n,children:jsx(d$1,{sx:{flexShrink:0},direction:c?.isExpanded??true?"left":"right",active:z,onClick:c?.onExpand,children:c?.label})}):null,i]})]})}ve.displayName="WindowShellToolbar";var Fe=memo(ve);var Be=forwardRef(function({isOpen:o,className:a,sx:n,toolbar:r,services:t,sidebar:s,panel:p,footer:d$1,content:m,window:i,backdrop:l},u){let W=t?.list??[],b=(t?.isLoading??false)||W.length>0,y=d$1!=null&&(d$1.isVisible??true),C=s?.children,w=F(s?.sx),E=p?.children,S=p!=null?F(p.sx):0,h=m?.children,c$2=s?.expand?.isExpanded??C!=null,z=j(p),L=!!(C||E),[M,D]=useState(w),[k,V]=useState(S);useEffect(()=>{c$2&&D(w),z&&V(S);},[c$2,w,z,S]);let _=r?.onClose??r?.onMinimize??(()=>{}),I=G(s?.animation,"in-place"),T=G(p?.animation,"in-place"),Z=(()=>{let P=i?.defaultSize;if(typeof P?.width!="number")return P;let oe=(I.resize==="window"&&!c$2?M:0)+(T.resize==="window"&&!z?k:0);return oe>0?{...P,width:Math.max(0,P.width-oe)}:P})(),X={height:i?.minSize?.height??i?.defaultSize?.height??c,...i?.minSize?.width!=null?{width:i.minSize.width}:null},Le=l!=null&&(l.isVisible??true)&&o&&!i?.isMinimized,_e=(i?.order??0)+10-1,ee=jsx(oo,{open:true,onClick:_,id:l?.id,className:l?.className,"data-testid":l?.["data-testid"]??l?.id??"WindowShellBackdrop",...(l?.["data-id"]??l?.id)!=null?{"data-id":l?.["data-id"]??l?.id}:null,sx:mc({zIndex:_e,backgroundColor:P=>alpha(P.palette.common.black,.3)},l?.sx)});return jsxs(Fragment,{children:[Le&&(i?.disablePortal?ee:createPortal(ee,document.body)),jsxs(f,{ref:u,isOpen:o,onClose:_,defaultSize:Z,minSize:X,maxSize:i?.maxSize,defaultPosition:i?.defaultPosition,containerRef:i?.containerRef,order:i?.order,isMinimized:i?.isMinimized,isMaximized:i?.isMaximized,id:i?.id,className:nc(x.root,i?.className,a),sx:n,onResize:i?.onResize,onDragStart:i?.onDragStart,onMouseDown:i?.onMouseDown,onClick:i?.onClick,disablePortal:i?.disablePortal,"data-testid":i?.["data-testid"]??i?.id,"data-id":i?.["data-id"]??i?.id,children:[jsx(Oe,{sidebarOpen:c$2,showPanel:z,sidebarWidth:M,panelWidth:k,sidebarResize:I.resize,panelResize:T.resize,sidebarDuration:I.duration,panelDuration:T.duration}),jsx(Fe,{toolbar:r,sidebar:s,panel:p,animationDuration:T.duration}),b?t?.isLoading?jsx(d,{appCode:t?.appCode,id:t?.id,className:t?.className,"data-testid":t?.["data-testid"]??t?.id,"data-id":t?.["data-id"]??t?.id,sx:mc({height:"auto",flexShrink:0},t?.sx)}):jsx(c$1,{services:W,serviceCode:t?.activeCode??"",onOpenService:t?.onOpen,onOpenServiceInNewWindow:t?.onOpenInNewWindow,language:t?.language??"en",openInNewWindowLabel:t?.openInNewWindowLabel??"Open in new window",id:t?.id,className:t?.className,"data-testid":t?.["data-testid"]??t?.id,"data-id":t?.["data-id"]??t?.id,sx:t?.sx}):null,jsx(g,{id:m?.id,className:m?.className,"data-testid":m?.["data-testid"]??m?.id,"data-id":m?.["data-id"]??m?.id,sx:L?void 0:m?.sx,children:L?jsx(Re,{baseWindowWidth:typeof i?.defaultSize?.width=="number"?i.defaultSize.width:void 0,sidebar:s,panel:p,content:m,bodyContent:h,sidebarOpen:c$2,showPanel:z,sidebarFullWidth:M,panelFullWidth:k,sidebarAnimation:I,panelAnimation:T}):h}),y?jsxs(h$2,{id:d$1?.id,className:d$1?.className,"data-testid":d$1?.["data-testid"]??d$1?.id,"data-id":d$1?.["data-id"]??d$1?.id,sx:d$1?.isVisible===true?mc(d$1?.sx??{},{"&:empty, &:has(> :only-child:empty)":{display:"flex"}}):d$1?.sx,children:[d$1?.children,d$1?.actions?jsx(i$1,{children:d$1.actions}):null]}):null]})]})});Be.displayName="WindowShell";var to=memo(Be);export{x as a,to as b};
@@ -1 +1 @@
1
- import {b}from'./chunk-PCGC6E7J.js';import {memo,useCallback,Fragment as Fragment$1,createElement}from'react';import {useTranslation}from'react-i18next';import {jsx,Fragment}from'react/jsx-runtime';function B({isActiveFilterVisible:f,availableStatuses:v,status:e,onStatusChange:l,buttonSx:S}){let{t:I}=useTranslation(),d=f??false,b$1=useCallback(s=>s===e&&!d?"active":"inActive",[e,d]),u=useCallback(s=>{l?.(s);},[l]);return jsx(Fragment,{children:v?.map(({render:s,...a},o)=>{if(s)return jsx(Fragment$1,{children:s({status:e,onChange:u},{...a,index:o})},`custom-status-slot-${o}`);if(!Array.isArray(a.status))return createElement(b,{...a,key:`status-button-array-${a.status}`,variant:b$1(a.status),onClick:()=>{Array.isArray(a.status)||u(a.status);},buttonSx:S});if(!a.status)return null;let n=a.status.filter(Boolean).map(t=>typeof t=="string"?{value:t}:t)||[],c=!!e&&n.some(t=>t?.value===e);return jsx("div",{children:jsx(b,{...a,selectedStatus:c?e:void 0,variant:c?"active":"inActive",onButtonBodyClick:t=>u(t),dropdownOptions:n.map(t=>({label:t?.label||I(t?.value||""),status:t?.value,icon:t.icon,onClick:()=>u(t.value)})),buttonSx:S})},n[0]?.value??`status-group-${o}`)})})}var p=memo(B);var M=p;export{M as a};
1
+ import {b}from'./chunk-WAQJPDMU.js';import {memo,useCallback,Fragment as Fragment$1,createElement}from'react';import {useTranslation}from'react-i18next';import {jsx,Fragment}from'react/jsx-runtime';function B({isActiveFilterVisible:f,availableStatuses:v,status:e,onStatusChange:l,buttonSx:S}){let{t:I}=useTranslation(),d=f??false,b$1=useCallback(s=>s===e&&!d?"active":"inActive",[e,d]),u=useCallback(s=>{l?.(s);},[l]);return jsx(Fragment,{children:v?.map(({render:s,...a},o)=>{if(s)return jsx(Fragment$1,{children:s({status:e,onChange:u},{...a,index:o})},`custom-status-slot-${o}`);if(!Array.isArray(a.status))return createElement(b,{...a,key:`status-button-array-${a.status}`,variant:b$1(a.status),onClick:()=>{Array.isArray(a.status)||u(a.status);},buttonSx:S});if(!a.status)return null;let n=a.status.filter(Boolean).map(t=>typeof t=="string"?{value:t}:t)||[],c=!!e&&n.some(t=>t?.value===e);return jsx("div",{children:jsx(b,{...a,selectedStatus:c?e:void 0,variant:c?"active":"inActive",onButtonBodyClick:t=>u(t),dropdownOptions:n.map(t=>({label:t?.label||I(t?.value||""),status:t?.value,icon:t.icon,onClick:()=>u(t.value)})),buttonSx:S})},n[0]?.value??`status-group-${o}`)})})}var p=memo(B);var M=p;export{M as a};
@@ -0,0 +1,2 @@
1
+ import {a}from'./chunk-WEDCKMUU.js';import {b as b$4,h,c,j as j$1,i}from'./chunk-7L6NBFKR.js';import {b as b$9,c as c$2}from'./chunk-KPY3W62P.js';import {b as b$1}from'./chunk-RSIJKVO6.js';import {a as a$3}from'./chunk-JGCMUAHD.js';import {a as a$4,f as f$1,e,b as b$c,g as g$1,d as d$3,c as c$4}from'./chunk-PQRI2WMI.js';import {b as b$a}from'./chunk-KVZJDQV2.js';import {b as b$5}from'./chunk-46V3JVHX.js';import {g,a as a$6}from'./chunk-FJNHU3S4.js';import {a as a$2}from'./chunk-UZVOPL5U.js';import {a as a$7}from'./chunk-265MSIZH.js';import {a as a$1}from'./chunk-W2HSCMPT.js';import {b as b$6}from'./chunk-ZFVCIKJ5.js';import {b as b$3}from'./chunk-BVAZARPH.js';import {d as d$1}from'./chunk-JDEIU7E5.js';import {a as a$5,b as b$b,d as d$2,c as c$3}from'./chunk-XMGXCCSD.js';import {b as b$7}from'./chunk-SN2KTD4P.js';import {c as c$1}from'./chunk-QZJCQWTE.js';import {b as b$2}from'./chunk-ADEEIE7D.js';import {b as b$8}from'./chunk-SKASDIJH.js';import {t,p,z,j,V,b,R,D,d,B,v,f}from'./chunk-CAVYK7HF.js';import {l,p as p$1}from'./chunk-HZCNE5Q2.js';import {Bc,gc,Ya,nc,Na,z as z$1,Eb as Eb$1,Db,Cb as Cb$2,Xa as Xa$1,db,xb as xb$1,yb as yb$2,Ab,Bb as Bb$2,zb as zb$1,ac,Ca,Ka,Fa,Ja,fc,cc as cc$1,q,ec,f as f$2,v as v$1}from'./chunk-Z2DUFVI5.js';import {Cb as Cb$1,zb,Bb as Bb$1,Wd as Wd$1,Ej,rc,Di,Bi as Bi$1,Ci,Dh,Og,Uh,Ue,hk,ja,zk,qk,F,E,Mj,Lj,Kj,Ij,Gj,Hj,Jj,jc,kc,hc,ma,Kl,Eb,Fb as Fb$1,Gb as Gb$1,C,Yj,Ch as Ch$1,yb as yb$1,hm,Mh,Lh,xb,po,Hb as Hb$1,fh as fh$1,kh as kh$1,lh,ih as ih$1,hh,ch,dh as dh$1,eh as eh$1,ah as ah$1,bh as bh$1,mh as mh$1,T,yi as yi$1,Ai,zi as zi$1,xi,Ei,Vg as Vg$1,Qj,Rj,H as H$1,jo,G,wb,z as z$2,_o,da,ca,na,sk,Bk,tk,jk,lk,wk,yk,rk,ok,pk,Ln as Ln$1,cc,dc,Qh as Qh$1,uk,nh as nh$1,yh,xh as xh$1,wh,vh,uh as uh$1,th as th$1,sh,rh as rh$1,qh,ph,oh as oh$1,Xh,Vh,Wh as Wh$1,_h as _h$1,Zh,ce,Zd,be,Dn as Dn$1,Bn,ui,qb as qb$1,_d as _d$1,vn,$d as $d$1,rb,Fh as Fh$1,Eh,Hh as Hh$1,Jh,Ih,Kh,le,uf as uf$1,tf as tf$1,sf as sf$1,rf,qf as qf$1,vf as vf$1,pf as pf$1,Ba,Aa,mf,lf,kf as kf$1,gi as gi$1,fi,ii as ii$1,hi,ji,$j,Zj,_j,Tb,Om,Lm,Gm,Hm,Nm,zm,Pm,Am,Qm,Bm,Im,Dm,Fm,Mm,Em,xm,Jm as Jm$1,Km,ym,Cm,wm,vm,um,tm,sm,_g as _g$1,Ak,Wk,ak,ek,vb,fk,ik,gk,va,ua,h as h$1,Ug as Ug$1,ko}from'./chunk-3M2GZVQW.js';import Ms,{forwardRef,useId,memo,createContext,useState,useEffect,useMemo,useCallback,useRef,Fragment as Fragment$1,useContext}from'react';import {useTranslation}from'react-i18next';import {styled,Box,Menu,MenuItem,ListItemIcon,ListItemText,Paper,Button,TextField,Typography,Popper,CircularProgress,Link,useTheme as useTheme$1,TableCell,ClickAwayListener}from'@mui/material';import {motion,AnimatePresence,Reorder,useDragControls}from'framer-motion';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {styled as styled$1,alpha,useTheme}from'@mui/material/styles';import _h from'@mui/material/TableCell';import Un from'@mui/material/Box';import Qy from'@mui/material/SvgIcon';import wt from'lodash/camelCase';import Ru from'dayjs';import bT from'dayjs/plugin/timezone';import TT from'dayjs/plugin/utc';import Xu from'lodash/startCase';import jS from'@mui/material/Popover';import t0 from'@mui/material/ClickAwayListener';import Xw from'@mui/material/Popper';import m0 from'@mui/material/Typography';import Ag from'@mui/material/Button';import W0 from'@mui/material/Menu';var Rr={ORDER:{label:"order",icon:xi,color:"#5E30EB"},SAVED_CARD:{label:"cardAgreement",icon:zi$1,color:"#76BB40"},SUBSCRIPTION:{label:"subscription",icon:Ai,color:"#00C7BE"},INSTALLMENT:{label:"installment",icon:yi$1,color:"#32ADE6"}},kr={SAVED_TOKEN:{label:"savedToken",icon:T,color:"#76BB40"},COUNT:{label:"countBadge",icon:"countBadge",color:"#76BB40"}};styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5)}));styled("img")(()=>({width:"35px",height:"16px",display:"block"}));styled("span")(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"14.67px",height:"10px"}));styled("img")(()=>({maxWidth:"100%",width:"100%"}));var Vr=styled("span")(({theme:e})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:e.palette.text.primary})),Br=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px"})),Nr=styled(motion.span)(({order:e})=>({zIndex:(e||0)+1}));function kh({type:e,hasSavedCard:t,totalPaymentsCount:o,isTextShown:n}){let r=Bc(useId(),"agreement-icon"),i=useTheme$1(),{t:l}=useTranslation(),a=useMemo(()=>[...t?[kr.SAVED_TOKEN]:[],...(o||0)>0?[kr.COUNT]:[],...e&&Rr[e]?[Rr[e]]:[]],[t,o,e]),s=m=>n?jsx(Nr,{"data-testid":"AgreementCell_countBadge",children:jsx(p,{title:l("totalPaymentCount",{amount:f$2(o)}),children:jsx(Br,{children:jsxs(Vr,{"data-testid":"AgreementCell_totalPaymentsCount",sx:{color:kr.COUNT.color},children:["x",o]})})})},m):jsx(a$7,{value:o,index:m},m),p$1=a.map((m,f)=>m.label==="countBadge"?s(f):jsx(p,{title:l(m.label),children:jsx(Nr,{children:n?jsx(Br,{children:jsx(Vr,{"data-testid":"AgreementCell_agreementType",sx:{color:m.color},children:l(m.label)})}):jsx(d,{sx:{maxWidth:"16px",maxHeight:"16px",height:"auto",width:"auto"},src:m.icon,alt:"agreement"})},m.color)},m.color)),c=jsx(p,{title:"No agreement",children:jsx(Nr,{children:n?jsx(Br,{children:jsx(Vr,{"data-testid":"AgreementCell_agreementType",sx:{color:i.palette.text.secondary},children:"No agreement"})}):jsx(d,{sx:{maxWidth:"24px",maxHeight:"24px",height:"auto",width:"auto"},src:Ei,alt:"agreement"})},"no-agreement")},"no-agreement");return jsx(Box,{id:r,"data-testid":"AgreementIcon",sx:{display:"flex",alignItems:"center",gap:"4px"},children:p$1?.length>0?p$1:c})}var jm=kh;var Bh=jm;styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)}));styled("img")(()=>({maxWidth:"36px",maxHeight:"24px"}));styled(motion.span,{shouldForwardProp:e=>e!=="sourcesCount"})(({theme:e,sourcesCount:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${t*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:e.palette.background.paper,borderRadius:"16px"}));var qm=styled("span")(({theme:e})=>({fontSize:"11px",padding:"2px 0",color:e.palette.text.primary})),Xm=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"4px",textAlign:"center",width:"100%"}));styled("span")(({theme:e})=>({position:"absolute",left:0,zIndex:6,border:`1px solid ${e.palette.divider}`,borderRadius:"12px",backgroundColor:e.palette.background.paper,width:"36px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"}));styled(motion.div)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)}));var Zm=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px"}));var Xa={"3DS":{tooltip:"3DS",icon:Rj,borderColor:"rgba(31, 136, 208, 0.10)"},"Device Biometric":{tooltip:"Biometric",icon:Qj,borderColor:"rgba(31, 136, 208, 0.10)"},"Non-3DS":{tooltip:"Non 3DS",icon:bh$1,borderColor:"rgba(31, 136, 208, 0.10)"}},Jm={FAILED:{tooltip:"Failed",icon:Vg$1,borderColor:"rgba(255, 61, 0, 0.10)"},REJECTED:{tooltip:"Rejected",icon:ch,borderColor:"rgba(255, 61, 0, 0.10)"}};function Wh({transactionStatus:e,eci:t,authType:o,isTextShown:n}){let r=Bc(useId(),"auth-icons"),i=useMemo(()=>{let a=e?Jm[e]:null,s=a?.tooltip,p=e==="AUTHENTICATED"?null:a?.icon;return [{tooltip:s,content:n?s:p,type:n?"text":"icon"},...o?[{tooltip:o,content:n?Xa[o]?.tooltip:Xa[o]?.icon,type:n?"text":"icon"}]:[],{tooltip:"",content:t?`ECI ${t}`:"",type:"text"}]},[e,n,o,t]),l=useMemo(()=>i.filter(a=>!!a.content).map((a,s)=>{let p$1=a.type==="text"?jsx(Xm,{"data-testid":"AuthenticationCell_BadgeTextWrapper",children:jsx(qm,{sx:{border:"none"},"data-testid":"AuthenticationCell_TextLabel","data-source":a.content,children:a.content})}):jsx(d,{sx:{width:"16px",height:"16px"},src:a.content,alt:a.tooltip});return jsx(p,{title:a.tooltip,children:p$1},`${a.tooltip}-${s}`)}),[i]);return jsx(Zm,{id:r,"data-testid":"AuthIcons",children:l})}var ed=Wh;var Fh=(e,t,o)=>({start:{x:e*6,transition:{duration:.3,type:"tween",ease:"easeIn"},...e>0&&{opacity:0}},animate:{x:o?e*o:e*39,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:t,...e>0&&{opacity:1}}});var Hh=ed;var td=styled$1(_h,{shouldForwardProp:e=>e!=="rowId"})(({theme:e})=>({fontSize:e.typography.body2.fontSize,fontWeight:e.typography.fontWeightRegular,color:e.palette.text.primary,padding:e.spacing(0),verticalAlign:"center",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",display:"block",width:"100%",border:"none",textAlign:e?.direction==="ltr"?"left":"right"}));var Gh=forwardRef(({children:e,...t},o)=>{let n=Bc(useId(),"table-cell");return jsx(td,{id:n,component:"div","data-testid":"TableCell",...t,ref:o,children:e})}),w=memo(Gh);var nd=styled("span",{shouldForwardProp:e=>e!=="variant"})(({theme:e,variant:t})=>({display:"flex",width:"17px",height:"12px",backgroundColor:t?gc(e.palette)[t]:"transparent",borderRadius:"2px",flexShrink:0,overflow:"hidden",visibility:"hidden","& > img":{width:"100%",height:"100%",objectFit:"cover"}})),Xo=styled("button")({background:"transparent",border:"none",padding:0,cursor:"pointer",outline:"none",display:"flex",alignItems:"center",justifyContent:"center",overflow:"visible"}),pt=styled(motion.div)(({theme:e})=>({borderRadius:"12px",backgroundColor:e.palette.background.paper,height:"24px",display:"flex",alignItems:"center",justifyContent:"center",gap:e.spacing(.5)})),tP=styled("img")(()=>({width:"12px",height:"12px"})),rd=styled("span",{shouldForwardProp:e=>e!=="isShown"})(({theme:e,isShown:t})=>({...t&&{border:`1px solid ${e.palette.divider}`},borderRadius:"12px",backgroundColor:t?e.palette.background.paper:"transparent",width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,overflow:"hidden",visibility:"hidden"})),oP=styled("span")(({theme:e})=>({color:e.palette.common.white,borderRadius:e.spacing(.5),padding:"1.285px 2.569px",height:"12px",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"9.782px",fontWeight:600})),id=styled("div")(()=>({display:"flex",width:"24px",height:"24px",alignItems:"center",justifyContent:"center",borderRadius:"64px;",border:"1px solid #F2F2F2;"})),ad=styled(t)(({theme:e})=>({width:24,height:24,fontSize:"8.5px",fontWeight:500,color:e.palette.background.default,border:`1px solid ${e.palette.divider}`})),H=styled("div")(({theme:e})=>({fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"4px 8px",borderRadius:"24px",border:`1px solid ${e.palette.divider}`})),ld=styled(H)(({theme:e})=>({color:e.palette.info.dark,backgroundColor:e.palette.info.light,borderColor:e.palette.divider,minWidth:"88px",height:"24px"})),sd=styled(H)(({theme:e})=>({color:e.palette.grey.A700,backgroundColor:`${e.palette.grey.A700}1A`,minWidth:"88px",height:"24px"})),Wr=styled(w)(()=>({fontSize:"11px",textAlign:"left",display:"flex",justifyContent:"flex-start",alignItems:"center",overflow:"hidden",gap:"4px",textOverflow:"ellipsis",whiteSpace:"nowrap"})),Se=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),ye=styled("span")(()=>({width:"24px",height:"24px",borderRadius:"50%",backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0})),$=styled("img")(()=>({width:"36px",height:"24px"})),Fr=styled("div")(({percentage:e,isCapture:t,theme:o})=>({background:`conic-gradient(${t?o.palette.info.dark:"#656565"} ${e}%, transparent 0.00%)`,borderRadius:"50%",width:"8.333px",height:"8.333px",border:`0.6px solid ${t?o.palette.info.dark:"#656565"}`})),ct=styled(motion.span)(({theme:e,order:t})=>({position:"absolute",left:0,zIndex:t+6,border:`1px solid ${e.palette.divider}`,borderRadius:"12px",backgroundColor:e.palette.background.paper,width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"}));var Zo={VOID:{icon:gk},CAPTURED:{icon:fk}};var Hr=styled$1(motion.div)(({theme:e,isCapture:t})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:e.spacing(.5),paddingInline:e.spacing(.3),paddingBlock:e.spacing(.3),height:"100%",minWidth:"100%",backgroundColor:t?"#eaf3fb":"#eeeeee",borderRadius:"56px",width:"fit-content",fontSize:"10px",color:e.palette.text.primary,position:"relative",zIndex:10})),Or=styled$1("div")(({theme:e,percentage:t,isCapture:o})=>({border:`0.6px ${[0,100].includes(t)?"solid":"dashed"} ${o?e.palette.info.dark:"#656565"}`,borderRadius:"80px",padding:e.spacing(.316),paddingLeft:e.spacing(.516),fontSize:"7px",fontWeight:e.typography.fontWeightBold,color:o?e.palette.info.dark:"#656565",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5)})),_r=styled$1("div")(({percentage:e,isCapture:t,theme:o})=>({background:`conic-gradient(${t?o.palette.info.dark:"#656565"} ${e}%, transparent 0.00%)`,borderRadius:"50%",width:"8.333px",height:"8.333px",border:`0.6px solid ${t?o.palette.info.dark:"#656565"}`})),zr=styled$1("img")({width:"14px",height:"14px"}),Qt=styled$1(ye)({width:"16px",height:"16px"}),Mt=styled$1("img")({width:"16px",height:"16px"}),pd=styled$1(Box)({display:"flex",alignItems:"center",justifyContent:"center"});function $r(e){return e<5?5:e===100?95:e}var cd=styled$1(Un)({display:"flex",alignItems:"center",gap:"12px"});function Qh({value:e,format:t,flagIcon:o,hasFlag:n,tableMode:r,...i}){let l=o&&jsx(p,{title:Na(o||""),children:jsx(b$2,{countryCode:o})}),a=useMemo(()=>z$1(e,t),[e]);return jsx(w,{...i,children:jsxs(cd,{children:[n&&jsx(nd,{sx:{visibility:"visible"},className:"geography-box",children:l}),jsx(Box,{sx:{...Ya(r)&&{fontSize:"11px"}},children:a})]})})}var Qo=Qh;function md({value:e,currentTimezone:t=jo.UTC,timezoneOffset:o=0,defaultTimezoneOffset:n=0,hideTimezoneIcon:r=false,...i}){let l=m=>v$1(e,{currentTimezone:t,targetTimezone:m}),a=l(o),s=l(n),p$1=z$1(s),c=!r&&n!==o;return jsxs(Un,{sx:{display:"flex",gap:"8px"},children:[jsx(Qo,{value:a,...i}),c&&jsx(p,{title:p$1,children:jsx("img",{src:H$1,width:14,alt:"timezone"})})]})}function ry({value:e,label:t,items:o,...n}){let r=Number.isInteger(e)&&Number(e)>1&&t.charAt(t.length-1)!=="s"?`${t}s`:t,i=`${e} ${r}`,l=jsx(Fragment,{children:o?.map(a=>{let s=a.name||a.description,p=(s?.length||0)>20?`${s?.slice(0,20)}...`:s;return jsx("div",{children:p},a.id)})});return jsx(p,{title:(o||[]).length>1?l:void 0,children:jsx(w,{...n,children:jsx("span",{children:i})})})}var iy=ry;function ly({value:e,label:t,items:o,...n}){let r=Number.isInteger(e)&&Number(e)>1&&t.charAt(t.length-1)!=="s"?`${t}s`:t,i=`${e} ${r}`;return jsx(w,{sx:{fontSize:"11px"},...n,children:i})}var sy=ly;var dd=styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),Gr=styled$1("span",{shouldForwardProp:e=>e!=="tableMode"})(({theme:e,tableMode:t})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"25ch",flex:1,...Ya(t)&&{fontSize:"11px",color:e.palette.text.primary}})),ud=styled$1("span")({width:"11.6px",height:"11.6px",flexShrink:0,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"flex-start"}),fd=styled$1("img")({width:"11.6px",height:"11.6px",borderRadius:"50%"});function my({customerInitiated:e,children:t,isTimezoneIconShown:o,hasCustomerIcon:n,customerIcon:r,customerName:i,hideCustomerInitiatedIcon:l,hideTimezoneIcon:a,phone:s,email:p$1,id:c,...m}){let{t:f}=useTranslation(),C=e===false?f("merchantInitiated"):"",x=ac(i),I=i?.split(" ")?.map(y=>y?.[0]?.toUpperCase()).join(""),T=useMemo(()=>Ca(),[]),b=n&&jsx(p,{title:t,children:jsx(ad,{"data-testid":"CustomerCell_customerShownIcon",sx:{background:T},src:r,alt:r,children:I})}),d=useMemo(()=>[{name:"ID",value:c},{name:"Name",value:i},{name:"Email",value:p$1},{name:"Phone",value:s}],[p$1,s,c,i]),g=useMemo(()=>d.some(({value:y})=>y)?jsx("div",{"data-testid":"CustomerCell_customerTooltip",children:d.map(({name:y,value:S},A)=>S&&jsx("div",{"data-testid":`CustomerCell_customerTooltip_${y}`,children:y==="Name"?S:`${y}: ${S}`},`${A}-${S}`))}):null,[d]);return jsx(w,{...m,"data-testid":"CustomerCell_TableCell",children:jsxs(dd,{"data-testid":"CustomerCell_StyledCustomerCell",children:[b,jsx(p,{title:g,children:jsx(Gr,{"data-testid":"CustomerCell_StyledCustomerName","data-is-arabic":x,children:t})}),!a&&jsx(ud,{"data-testid":"CustomerCell_StyledCustomerIconContainer",children:o&&jsx(fd,{src:G,"data-testid":"CustomerCell_StyledCustomerIcon"})}),!l&&jsx(p,{title:C,children:jsx(rd,{"data-testid":"CustomerCell_StarBadgeWrapper",className:"geography-box",isShown:!!C,children:C&&jsx("img",{"data-testid":"CustomerCell_merchantInitiatedIcon",src:wb,alt:"merchant",style:{width:"16px",height:"16px"}})})})]})})}var dy=my;function fy({children:e,customerName:t}){let o=ac(t);return jsx(Gr,{tableMode:"sheet","data-testid":"CustomerCell_StyledCustomerName","data-is-arabic":o,children:e})}var Cy=fy;var Yr=styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-end",gap:e.spacing(1)})),Cd=styled$1("span")(({theme:e,tableMode:t})=>({backgroundColor:e.palette.grey[100],display:"block",borderRadius:"4px",padding:"1.5px 3px",fontSize:Ya(t)?"11px":"10px",lineHeight:"13px",textTransform:"uppercase",fontWeight:e.typography.fontWeightBold})),gd=styled$1("span")(({theme:e,tableMode:t})=>({fontSize:Ya(t)?"11px":e.typography.body2.fontSize,lineHeight:"17px",fontWeight:"700"})),Qa=styled$1("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"})),jr=styled$1("div")(({theme:e,count:t})=>({justifyContent:"space-between",display:"flex",width:"100%",gap:(t||1)<=1?e.spacing(1.5):e.spacing(1)}));var yE=({type:e,selectAmount:t,selectCurrency:o,requestAmount:n,requestCurrency:r,merchantAmount:i,merchantCurrency:l})=>{let a=Ka(t,o),s=Ka(n,r),p=Ka(i,l);return jsxs(Qa,{sx:{textAlign:"right",justifyContent:"flex-end"},children:[jsx("span",{style:{fontWeight:"bold"},children:e?Fa[e]:""}),jsxs(Qa,{children:[e!=="fx"&&jsxs(jr,{children:[jsx("span",{children:"Customer Selected"})," ",jsxs("span",{children:[jsx(b$7,{currency:o})," ",a.integerAmount,".",a.decimalAmount]})]}),jsxs(jr,{children:[jsx("span",{children:"Charge"})," ",jsxs("span",{children:[jsx(b$7,{currency:r})," ",s.integerAmount,".",s.decimalAmount]})]}),jsxs(jr,{children:[jsx("span",{children:"Settlement"})," ",jsxs("span",{children:[jsx(b$7,{currency:l})," ",p.integerAmount,".",p.decimalAmount]})]})]})]})};var eo=({tableMode:e,conversionType:t})=>t?jsx(Cd,{tableMode:e,className:"conversion-type",children:t}):jsx(Fragment,{});var to=({tableMode:e,amount:t,currency:o})=>jsx(gd,{tableMode:e,children:t!==void 0?jsxs(Fragment,{children:[jsx("span",{children:jsx(b$7,{currency:o,fontSize:10})})," ",jsx(b$8,{amount:t,currency:o,sx:{fontSize:"inherit",fontWeight:"inherit"}})]}):jsx("span",{children:"-"})});var hd="default";function by({conversionType:e,amount:t,currency:o,tooltipLabel:n,amountTooltipLabel:r,...i}){return jsx(w,{...i,children:jsxs(Yr,{children:[jsx(p,{title:n||"",children:jsx(Box,{children:jsx(eo,{tableMode:hd,conversionType:e})})}),o&&jsx(p,{title:jsx(b$7,{currency:o}),children:jsx(b$2,{currencyCode:o})}),jsx(p,{title:r,children:jsx(to,{tableMode:hd,amount:t,currency:o})})]})})}var Ty=by;var yd="text";function wy({conversionType:e,amount:t,currency:o,tooltipLabel:n,amountTooltipLabel:r,...i}){return jsx(w,{...i,children:jsxs(Yr,{children:[jsx(p,{title:n||"",children:jsx(eo,{tableMode:yd,conversionType:e})}),jsx(p,{title:jsx(b$7,{currency:o}),children:jsx("span",{})}),jsx(p,{title:r,children:jsx(to,{tableMode:yd,amount:t,currency:o})})]})})}var Ay=wy;var Id="sheet";function Py({conversionType:e,amount:t,currency:o}){let{integerAmount:n,decimalAmount:r}=Ka(t,o);return jsxs(b$1,{copyTrigger:"press",copyText:t?`${n}.${r}`:"-",children:[jsx(eo,{tableMode:Id,conversionType:e}),jsx(to,{tableMode:Id,amount:t,currency:o})]})}var Ey=Py;var Td=styled$1(motion.img)(()=>({width:"14px",height:"14px"})),Sd=styled$1(motion.span)(({theme:e})=>({color:e.palette.common.white,borderRadius:e.spacing(.5),height:"12px",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"9.782px",fontWeight:600,backgroundColor:e.palette.secondary.main})),el=styled$1(motion.div)(({theme:e})=>({height:"16px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:`${e.palette.secondary.main}1A`,paddingInline:e.spacing(.5),borderRadius:"56px"})),no=(e,t,o)=>({start:{x:e*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:o?e*o:e*49,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:t}}),ro=styled$1(motion.span)(({isTextShown:e,theme:t})=>({border:`1px solid ${t.palette.divider}`,borderRadius:"12px",backgroundColor:t.palette.background.paper,height:"24px",display:"flex",alignItems:"center",justifyContent:"center",minWidth:e?"auto":"36px",...e&&{border:"none"}})),io=styled$1(motion.div,{shouldForwardProp:e=>e!=="order"})(({order:e=0})=>({display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:0,left:0,zIndex:e+6,width:"fit-content",height:"24px",cursor:"pointer",borderRadius:"16px","&:hover":{zIndex:200}})),ao=styled$1(motion.div,{shouldForwardProp:e=>e!=="statusesCount"})(({statusesCount:e=1})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"relative",minWidth:`${e*6+36}px`,height:"24px",cursor:"pointer",borderRadius:"16px",overflow:"visible"})),wd=styled$1("div")(()=>({display:"flex",gap:"4px",justifyContent:"flex-start",alignItems:"center",position:"relative",width:"100%",overflow:"visible"}));var Ad=e=>e?Object.keys(e).filter(t=>e[t]).reduce((t,o)=>(t[o]=e[o],t),{}):{};var lo=({statuses:e,centerIconKey:t})=>{let o=useMemo(()=>Ad(e),[e]),n=useMemo(()=>Object.values(o).filter(Boolean),[o]),r=useMemo(()=>{if(!t)return 0;let i=Object.entries(o).findIndex(([l])=>l===t);return i===-1?Math.floor((n.length-1)/2):i},[o,t,n.length]);return {statusesList:n,centerIconIndex:r}};function Ly({statuses:e,centerIconKey:t,...o}){let{statusesList:n}=lo({statuses:e,centerIconKey:t}),r=useTheme(),i=n.length||0;return jsx(w,{...o,"data-testid":"StatusCell",sx:{position:"relative",overflow:"visible"},children:jsx(ao,{whileHover:"animate",animate:"start",statusesCount:i,children:n.map((l,a)=>l?jsx(io,{order:a,variants:no(a,r.shadows[4],40),children:jsx(ro,{children:l})},a):null)})})}var Ry=Ly;function Vy({statuses:e,...t}){let{statusesList:o}=lo({statuses:e});return jsx(w,{...t,children:jsx(wd,{sx:{paddingRight:"30px"},children:o.map((n,r)=>jsx(Fragment$1,{children:n},r))})})}var By=Vy;function Wy({statuses:e,centerIconKey:t,xGap:o,...n}){let{statusesList:r}=lo({statuses:e,centerIconKey:t}),i=useTheme(),l=r.length||0,a=o||120;return jsx(w,{...n,"data-testid":"StatusCell",sx:{position:"relative",overflow:"visible"},children:jsx(ao,{whileHover:"animate",animate:"start",statusesCount:l,children:r.map((s,p)=>s?jsx(io,{order:p,variants:no(p,i.shadows[4],a),children:jsx(ro,{isTextShown:true,children:s})},p):null)})})}var Fy=Wy;var $y=styled(Menu)(()=>({zIndex:2e3,".MuiMenu-paper":{borderRadius:4},".MuiMenu-list":{padding:0}})),Uy=styled(MenuItem)(({theme:e})=>({display:"flex",gap:"4px",minHeight:"36px",alignItems:"center",paddingInline:8,"&:hover":{backgroundColor:"transparent",boxShadow:e.shadows[10]}})),Gy=styled(ListItemIcon)(()=>({minWidth:"16px !important"})),Yy=styled(ListItemText)(()=>({".MuiTypography-root":{fontSize:"0.6875rem"}})),Zr=({id:e="ActionMenu",open:t,anchorEl:o,onClose:n,items:r})=>jsx($y,{id:e,"data-testid":"ActionMenu",open:t,anchorEl:o,onClose:n,onContextMenu:i=>{i.preventDefault(),n();},children:r.map((i,l)=>jsxs(Uy,{onClick:a=>{i.onClick?.(a);},onContextMenu:i.onContextMenu,children:[i.icon&&jsx(Gy,{children:i.icon}),jsx(Yy,{children:i.label})]},`${i.label}-${l}`))});var Qr=styled$1("section",{shouldForwardProp:e=>e!=="tableMode"})(({theme:e,tableMode:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-end",textAlign:"center",borderRadius:"50%",gap:Ya(t)?"4px":e.spacing(1),overflow:"visible"})),ei=styled$1("span")(({selected:e})=>({overflow:"visible",borderRadius:"50%",display:"flex",justifyContent:"center",alignItems:"center",position:"relative","&:hover":{boxShadow:"0px 0px 20px rgba(0, 0, 0, 0.18);"},...e&&{boxShadow:"0px 0px 20px rgba(0, 0, 0, 0.18);"},span:{flexGrow:1}})),vd=styled$1("img",{shouldForwardProp:e=>e!=="isActive"})(({isActive:e})=>({width:"18px",height:"18px",...!e&&{pointerEvents:"none",filter:"opacity(0.3)"}})),Me=styled$1(motion.img)(({icon:e})=>({width:"13.3px",height:"13.3px",...e==="cancel"&&{padding:"1.15px"}}));function Pd({isAnyActionLoading:e,isAnyActionHasError:t,isAnyActionSuccessful:o,areThereAnyShownActions:n}){let{t:r}=useTranslation();return t?jsx(Me,{src:jc,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},"fail-icon"):o?jsx(Me,{src:kc,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},"success-icon"):e?jsx(Me,{src:hc,className:"spinner-loader"},"spinner-icon"):jsx(p,{title:r("moreActions"),children:jsx(vd,{alt:"more",src:ma,isActive:n},"ellipsis-icon")})}Pd.displayName="ActionIconsVariants";var rn=memo(Pd);var so={GRAY:{icon:Bb$1,color:"#CFCFCF"},ORANGE:{icon:zb,color:"#FFD503"},RED:{icon:Cb$1,color:"#FF0000"}},ti={"#CFCFCF":"gray","#FFD503":"orange","#FF0000":"red",gray:"gray",red:"red",orange:"orange"},oi={flag:E,dispute:F,refund:qk,void:zk,capture:ja,cancel:hk,clock:Ue,reverse:Uh,destination:Og,invoice:Dh,users:Ci,brand:Bi$1,clipboard:Di,viewApi:Wd$1,viewReceipt:rc,delete:Ej};function ni({actions:e,isDropdownShown:t,onCloseDropdown:o,renderDropdown:n}){let[r,i]=useState(null),l=!!r,a=(e||[]).filter(x=>x.isShown!==false),s=a.some(x=>x.isLoading),p=a.some(x=>x.isError),c=a.some(x=>x.isSuccess),m=a.length>0||!!n,f=x=>{s||!m||i(x.currentTarget);},C=()=>{i(null),o?.();};return useEffect(()=>{t||i(null);},[t]),{anchorEl:r,open:l,filteredActions:a,isAnyActionLoading:s,isAnyActionHasError:p,isAnyActionSuccessful:c,areThereAnyShownActions:m,handleClick:f,handleClose:C,setAnchorEl:i}}var Ed=e=>jsx(Qy,{sx:{height:12.6,width:13},...e,children:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"11",height:"13",viewBox:"2.67 1.07 10.66 12.66",fill:"none",children:jsxs("g",{transform:"translate(-4 -4)",children:[jsx("path",{d:"M7.5918 15.166C7.5918 16.4041 8.5959 17.4072 9.83398 17.4072H15.5273L15.334 17.6973C15.101 18.0473 14.7079 18.2577 14.2871 18.2578H9.83398C8.12641 18.2578 6.74219 16.8736 6.74219 15.166V8.71289C6.74219 8.2923 6.9526 7.89944 7.30273 7.66602L7.5918 7.47266V15.166ZM10.167 5.74121H15.5C16.4651 5.74121 17.2586 6.534 17.2588 7.49902V14.833C17.2586 15.798 16.4651 16.5908 15.5 16.5908H10.167C9.20193 16.5908 8.40838 15.798 8.4082 14.833V7.49902C8.40838 6.534 9.20193 5.74121 10.167 5.74121ZM10.167 6.59082C9.6596 6.59082 9.25896 6.99168 9.25879 7.49902V14.833C9.25896 15.3404 9.6596 15.7412 10.167 15.7412H15.5C16.0074 15.7412 16.408 15.3404 16.4082 14.833V7.49902C16.408 6.99168 16.0074 6.59082 15.5 6.59082H10.167Z",fill:"#20232B",stroke:"white",strokeWidth:"0.15"}),jsx("path",{d:"M10.7598 12.84V9H11.4851V12.84H10.7598Z",fill:"black"}),jsx("path",{d:"M12.2846 12.84V9H13.5272C13.5574 9 13.6197 9.00089 13.7139 9.00267C13.8081 9.00444 13.8988 9.01067 13.9859 9.02133C14.2952 9.05867 14.5574 9.16622 14.7726 9.344C14.9877 9.52178 15.1512 9.74756 15.2632 10.0213C15.3752 10.2951 15.4312 10.5947 15.4312 10.92C15.4312 11.2453 15.3752 11.5449 15.2632 11.8187C15.1512 12.0924 14.9877 12.3182 14.7726 12.496C14.5574 12.6738 14.2952 12.7813 13.9859 12.8187C13.8988 12.8293 13.8081 12.8356 13.7139 12.8373C13.6197 12.8391 13.5574 12.84 13.5272 12.84H12.2846ZM13.0206 12.1573H13.5272C13.5752 12.1573 13.6401 12.1564 13.7219 12.1547C13.8037 12.1511 13.8774 12.1431 13.9432 12.1307C14.1103 12.0969 14.2463 12.0187 14.3512 11.896C14.4579 11.7733 14.5361 11.6258 14.5859 11.4533C14.6374 11.2809 14.6632 11.1031 14.6632 10.92C14.6632 10.728 14.6366 10.5458 14.5832 10.3733C14.5317 10.2009 14.4526 10.0551 14.3459 9.936C14.2392 9.81689 14.105 9.74133 13.9432 9.70933C13.8774 9.69511 13.8037 9.68711 13.7219 9.68533C13.6401 9.68356 13.5752 9.68267 13.5272 9.68267H13.0206V12.1573Z",fill:"black"})]})})});var Dd=".IDButton-root:not(.IDButton-hoverDisabled):hover &",Ld=styled$1("div")(({theme:e})=>({paddingInlineStart:"8px",border:"1px solid transparent",display:"flex",gap:"4px",alignItems:"center",justifyContent:"flex-end",backgroundColor:e.palette.common.white,float:"right",borderRadius:"56px",height:"100%",paddingLeft:"4px",paddingRight:"4px",width:"24px",overflow:"hidden",[Dd]:{width:"max-content",overflow:"visible",borderColor:"rgba(92, 92, 92, 0.05)",boxShadow:"-7px 0px 8px 0px #F2F2F2",position:"absolute",right:0,top:0,zIndex:101}})),Rd=styled$1("div")(({theme:e})=>({color:e.palette.text.primary,fontSize:"11px",lineHeight:"120%",display:"grid",gridTemplateColumns:"0fr",opacity:0,transition:"grid-template-columns 0.1s ease, opacity 0.1s ease","& > span":{overflow:"hidden",minWidth:0,whiteSpace:"nowrap"},[Dd]:{gridTemplateColumns:"1fr",opacity:1,transition:"grid-template-columns 0.3s ease, opacity 0.3s ease 0.3s"}}));function rI({icon:e=jsx(Ed,{}),id:t,sx:o,disableOnHoverEffect:n=false,onCopyId:r,className:i,...l}){let{t:a}=useTranslation();return jsx(p,{title:a("copy"),children:jsx(Un,{className:nc("IDButton-root",n&&"IDButton-hoverDisabled",i),sx:{position:"relative",width:"24px",height:"24px",cursor:"pointer",...o},...l,children:jsxs(Ld,{className:"IDButton-button",children:[t?jsx(Rd,{className:"IDButton-rowId",children:jsx("span",{children:t})}):null,t?jsx(D,{className:"IDButton-icon",icon:e,text:t,onClick:()=>r?.()}):null]})})})}var rl=memo(rI);var ED=memo(({flag:e,actions:t,flagTooltip:o,flagsCount:n,dropdownAction:r,onCloseDropdown:i,isDropdownShown:l=true,row:a,showJsonViewer:s=true,isTextShown:p$1,showIdButton:c=true,onCopyId:m,rowId:f,onJsonViewClick:C,renderDropdown:x,startSlot:I,...T})=>{let{t:b}=useTranslation(),{open:d,anchorEl:g,filteredActions:y,isAnyActionLoading:S,isAnyActionHasError:A,isAnyActionSuccessful:h,areThereAnyShownActions:v,handleClick:P,handleClose:M,setAnchorEl:E}=ni({actions:t,isDropdownShown:l,onCloseDropdown:i,renderDropdown:x});return jsx(w,{...T,sx:{overflow:"visible",...T.sx},children:jsxs(Qr,{"data-testid":"ActionCell_ActionCellContainer",children:[I,e&&jsx(Fragment,{children:p$1?jsx(p,{title:o,children:jsx(H,{"data-testid":"ActionCell_FlagLabel",sx:{textAlign:"left",justifyContent:"flex-start"},children:o})}):jsx(p,{title:o,children:jsxs(pt,{"data-testid":"ActionCell_FlagBadge",sx:{paddingInline:"12px",width:"auto",alignItems:"center",position:"relative",zIndex:21,gap:"0px"},whileHover:["animate","fadeIn"],variants:{animate:{gap:"4px"}},children:[jsx(Me,{"data-testid":"ActionCell_FlagIcon",sx:{width:"12px",height:"11px"},src:so[e]?.icon,alt:"flag-icon"}),(n??0)>1&&jsx(motion.div,{"data-testid":"ActionCell_StyledBadge_Container",style:{alignItems:"center",justifyContent:"center",gap:"4px",display:"flex",zIndex:10},initial:{width:0,opacity:0},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto"},fadeIn:{transition:{delay:.5},opacity:1}},children:jsxs(z,{compact:true,color:ti[so[e]?.color]||"orange","data-testid":"ActionCell_StyledBadge",children:[n,"x"]})})]})})}),c&&jsx(rl,{id:f||a.id,onCopyId:m}),jsxs("div",{"data-testid":"ActionCell_IconsContainer",style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"5px"},children:[s&&jsx(Fragment,{children:jsx(Xo,{onClick:C,type:"button","data-testid":"ActionCell_TransparentButton",children:jsx(p,{title:b("jsonViewer"),children:jsx(id,{"data-testid":"ActionCell_IdButtonContainer",children:jsx(motion.img,{src:Wd$1,alt:"icon"},"id-icon")})})})}),jsxs(ei,{id:"styled-popover",selected:!!r||d,"data-testid":"ActionCell_ActionsIconContainer","data-is-active":v,sx:{...!v&&{pointerEvents:"none"}},children:[jsx(Xo,{onClick:P,"data-testid":"ActionCell_ActionsIconContainer_TransparentButton","data-is-active":v,sx:{...!v&&{pointerEvents:"none"}},children:jsx(AnimatePresence,{mode:"wait",children:jsx(rn,{isAnyActionLoading:S,isAnyActionHasError:A,isAnyActionSuccessful:h,areThereAnyShownActions:v})})}),r,x?x(g,E):jsx(Fragment,{children:v&&jsx(Zr,{open:d,onClose:M,anchorEl:g,items:y.map(k=>({label:k.label,onClick:N=>{k?.onClick?.(N),k.hasActionMenu||M();},onContextMenu:N=>{k?.onRightClick?.(N),M();},icon:k.customIcon||jsx(Me,{icon:k.icon,src:k.iconSrc??(k.icon&&oi[k.icon]),initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},`action.label-${k.label.trim()}`)}))})})]})]})]})})});function mI({flag:e,flagTooltip:t,flagsCount:o,row:n,showJsonViewer:r=true,isTextShown:i,showIdButton:l=true,rowId:a,onJsonViewClick:s,tableMode:p$1,...c}){return jsx(w,{...c,sx:{overflow:"visible"},children:jsxs(Qr,{"data-testid":"ActionsColumn_ActionCellContainer",tableMode:p$1,children:[e&&jsx(Fragment,{children:i?jsx(p,{title:t,children:jsx(H,{"data-testid":"ActionsColumn_FlagLabel",sx:{textAlign:"left",justifyContent:"flex-start"},children:t})}):jsx(p,{title:t,children:jsxs(pt,{"data-testid":"ActionsColumn_FlagBadge",sx:{paddingInline:"12px",width:"auto",alignItems:"center",position:"relative",zIndex:21,gap:"0px"},whileHover:["animate","fadeIn"],variants:{animate:{gap:"4px"}},children:[jsx(Me,{"data-testid":"ActionsColumn_FlagIcon",sx:{width:"12px",height:"11px"},src:so[e]?.icon,alt:"flag-icon"}),(o??0)>1&&jsx(motion.div,{"data-testid":"ActionsColumn_StyledBadge_Container",style:{alignItems:"center",justifyContent:"center",gap:"4px",display:"flex",zIndex:10},initial:{width:0,opacity:0},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto"},fadeIn:{transition:{delay:.5},opacity:1}},children:jsxs(z,{compact:true,color:ti[so[e]?.color]||"orange","data-testid":"ActionsColumn_StyledBadge",children:[o,"x"]})})]})})}),l&&jsx(b$1,{sx:{minWidth:"213px"},children:a||n.id}),jsx("div",{"data-testid":"ActionsColumn_IconsContainer",style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"5px"},children:r&&jsx(b$1,{onClick:s,children:"View API"})})]})})}var dI=memo(mI);function gI({actions:e,dropdownAction:t,onCloseDropdown:o,isDropdownShown:n=true,renderDropdown:r,...i}){let{open:l,anchorEl:a,filteredActions:s,isAnyActionLoading:p,isAnyActionHasError:c,isAnyActionSuccessful:m,areThereAnyShownActions:f,handleClick:C,handleClose:x,setAnchorEl:I}=ni({actions:e,isDropdownShown:n,onCloseDropdown:o,renderDropdown:r});return jsx(w,{...i,sx:{overflow:"visible"},children:jsx("div",{"data-testid":"ActionIconColumn_Container",style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"5px"},children:jsxs(ei,{id:"styled-popover",selected:!!t||l,"data-testid":"ActionIconColumn_ActionsIconContainer","data-is-active":f,sx:{...!f&&{pointerEvents:"none"}},children:[jsx(Xo,{onClick:C,"data-testid":"ActionIconColumn_ActionsIconContainer_TransparentButton","data-is-active":f,sx:{...!f&&{pointerEvents:"none"}},children:jsx(AnimatePresence,{mode:"wait",children:jsx(rn,{isAnyActionLoading:p,isAnyActionHasError:c,isAnyActionSuccessful:m,areThereAnyShownActions:f})})}),r?r(a,I):jsxs(Fragment,{children:[t,f&&jsx(Zr,{open:l,onClose:x,anchorEl:a,items:s.map(T=>({label:T.label,onClick:b=>{T?.onClick?.(b),T.hasActionMenu||x();},onContextMenu:b=>{T?.onRightClick?.(b),x();},icon:T.customIcon||jsx(Me,{icon:T.icon,src:T.iconSrc??(T.icon&&oi[T.icon]),initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},`action.label-${T.label.trim()}`)}))})]})]})})})}var xI=memo(gI);function II({deviceType:e,geographyVariant:t,isTextShown:o,deviceCountry:n,...r}){return jsx(w,{...r,children:jsxs(Un,{sx:{display:"flex",gap:"8px",alignItems:"center"},children:[jsx(kt,{geographyVariant:t,isTextShown:o,countryCode:n}),jsx(c$1,{type:e,isTextShown:o})]})})}var bI=II;var Bd=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1),position:"relative",minWidth:"23px",height:"24px"})),Nd=styled("span")(({theme:e})=>({fontSize:e.typography.pxToRem(12),color:e.palette.info.dark,fontWeight:700,paddingInline:e.spacing(1),borderRadius:e.spacing(1),display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:`${e.palette.info.dark}1A`})),Wd=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1),backgroundColor:e.palette.common.white,border:`1px solid ${e.palette.divider}`,paddingInline:e.spacing(1),borderRadius:"56px",height:"24px"}));styled("img")(({theme:e,order:t})=>({borderRadius:"50%",backgroundColor:e.palette.common.white,width:"16px",height:"16px",padding:"2px",zIndex:t+1,position:"absolute",left:`${t*9}px`}));var Fd=styled("img")(({pointLeft:e})=>({width:"12.5px",height:"13px",transform:`scale(${e?"-1":"1"}, 1)`}));styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",backgroundColor:e.palette.common.white,borderRadius:"50%",width:"16px",height:"16px",fontSize:"8px",fontWeight:e.typography.fontWeightBold,lineHeight:"11px",position:"absolute",left:"18px",zIndex:4,textAlign:"center",span:{flexGrow:1}}));function AI({destinationsCount:e,destinationsTooltip:t,destination:o,destinationsAmount:n,hidden:r,iconDirection:i,...l}){let a=useMemo(()=>{if(typeof e=="number")return e;let c=Number(e);return Number.isNaN(c)?void 0:c},[e]),s=a!==void 0?a>0:!!e,p$1=a!==void 0&&a>1;return !s||r?null:jsx(Un,{sx:{width:"fit-content",overflow:"visible"},...l,children:jsx(p,{title:t,children:jsxs(Wd,{children:[jsx(Fd,{src:z$2,pointLeft:i==="left"}),p$1&&jsx(Bd,{children:jsx(Nd,{children:e})})]})})})}var vI=AI;function MI(e){let{destination:t,...o}=e,n={...o};delete n.destinationsCount,delete n.destinationsTooltip,delete n.destinationsAmount,delete n.hidden,delete n.iconDirection,delete n.selectionProps,delete n.flagIcon;let r=t?.destination||[];return jsx(Un,{sx:{display:"flex",gap:"4px",alignItems:"center"},...n,children:r.map((i,l)=>{let a=Ja(i?.amount||0),s=`${a.integerAmount}.${a.decimalAmount}`;return jsxs(b$1,{copyTrigger:"press",copyText:s,children:[i?.id," | ",jsx(b$7,{currency:i?.currency})," ",s]},i?.id||l)})})}var DI=MI;function kI({destinationsCount:e,destinationsTooltip:t,destination:o,destinationsAmount:n,hidden:r,iconDirection:i,...l}){let a=o?.destination||[],s=Ja(n||0),p$1=Ja(a?.[0]?.amount||0);return !e||r?null:jsx(Un,{sx:{width:"fit-content",overflow:"visible"},...l,children:jsx(p,{title:t,children:jsx(H,{sx:{textAlign:"left",justifyContent:"flex-start",height:"auto"},children:e&&typeof e=="number"&&e>1?jsxs("div",{children:["Destination ",a?.[0]?.id," - ",jsx(b$7,{currency:a?.[0]?.currency})," ",p$1.integerAmount,".",p$1.decimalAmount," +",e-1]}):jsxs("div",{children:["Destination ",a?.[0]?.id," - ",jsx(b$7,{currency:a?.[0]?.currency})," ",s.integerAmount,".",s.decimalAmount]})})})})}var VI=kI;var NL=({destination:e,amount:t})=>{let o=e?.destination||[];return o?.length>1?jsxs("div",{children:[jsx("div",{children:"Destination"}),e?.destination?.map(r=>{let i=Ja(r.amount||0);return jsxs("div",{children:[r?.id," - ",jsx(b$7,{currency:r?.currency})," ",i.integerAmount,".",i.decimalAmount]},r?.id)})]}):jsxs("div",{children:["Destination ",o?.[0]?.id," - ",jsx(b$7,{currency:o?.[0]?.currency})," ",t.integerAmount,".",t.decimalAmount]})};var _d=styled(motion.div)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5),paddingInline:e.spacing(.5),paddingBlock:e.spacing(.5),backgroundColor:"#eeeeee",borderRadius:"56px",height:"24px",minWidth:"24px",width:"fit-content",fontSize:"10px",color:e.palette.text.primary,zIndex:10,position:"absolute"})),zd=styled("div")(({theme:e,percentage:t})=>({border:`0.6px ${[0,100].includes(t)?"solid":"dashed"} #656565`,borderRadius:"80px",padding:e.spacing(.316),paddingLeft:e.spacing(1),fontSize:"7px",fontWeight:e.typography.fontWeightBold,color:"#656565",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5)}));styled("div")(({percentage:e,isCapture:t,theme:o})=>({background:`conic-gradient(${t?o.palette.info.dark:"#656565"} ${e}%, transparent 0.00%)`,borderRadius:"50%",width:"8.333px",height:"8.333px",border:`0.6px solid ${t?o.palette.info.dark:"#656565"}`}));function $d(e){return e<5?5:e===100?95:e}function HI({percentage:e=0,days:t,remainingAmount:o=0,currency:n,...r}){let i=useTheme(),l=jsx(b$7,{currency:n}),{integerAmount:a,decimalAmount:s}=Ka(o,n),p$1=`${a}.${s}`,c=useMemo(()=>jsxs(Fragment,{children:["Remaining Authorized Balance - ",l," ",p$1]}),[o,n]);return e===0||o<0?null:jsx(w,{...r,children:jsx(p,{title:c,placement:"top",children:jsx("div",{style:{height:24},children:jsxs(_d,{whileHover:["animate","fadeIn"],animate:"start",sx:{zIndex:22},variants:{animate:{...!!t&&{boxShadow:i.shadows[4]}}},children:[jsxs(zd,{percentage:e,children:[e,"% ",jsx(Fr,{percentage:$d(e)})]}),!!t&&jsx(motion.div,{style:{display:"none",alignItems:"center",justifyContent:"center",gap:"4px",width:0},initial:{width:0,opacity:0},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto",display:"flex"},fadeIn:{transition:{delay:.5},opacity:1}},children:jsxs("span",{children:[t," days left"]})})]})})})})}var OI=HI;function zI({remainingAmount:e,currency:t}){let o=jsx(b$7,{currency:t}),{integerAmount:n,decimalAmount:r}=Ka(e,t),i=`${n}.${r}`;return jsxs(b$1,{copyTrigger:"press",copyText:`${n}.${r}`,children:[o," ",i]})}var $I=zI;var ml=["authenticationMode","paymentAuth","paymentAgreement"],dl=["paymentIssuer","paymentInitiated","paymentDevice"],Ud=["paymentMethod","paymentType","paymentScheme","paymentCardNumber",...dl,...ml];var jd=styled$1(Un)(()=>({marginRight:"8px",display:"flex",alignItems:"center",gap:"4px"})),Kd=styled$1(Un)(()=>({marginLeft:"8px",width:20}));function KI(e){let{centerIcon:t,centerIconId:o}=useMemo(()=>{for(let l of Ud)if(e?.[l])return {centerIcon:e?.[l],centerIconId:l};return {centerIcon:null,centerIconId:null}},[e]);if(!o)return null;let n=o!=="paymentScheme"&&e.paymentScheme,r=o!=="paymentCardNumber"&&e.paymentCardNumber,i=o!=="paymentType"&&e.paymentType;return jsx(a$1,{expandedZIndex:0,centerIcon:t,leftIcons:dl.filter(l=>l!==o&&e?.[l]).map(l=>e?.[l]),rightIcons:ml.filter(l=>l!==o&&e?.[l]).map(l=>e?.[l]),expandableCenterRight:(n||r)&&jsxs(jd,{children:[n&&e.paymentScheme,r&&e.paymentCardNumber]}),expandableCenterLeft:i&&jsx(Kd,{children:e.paymentType})})}var qI=memo(KI);var Xd=styled$1("span")(({theme:e})=>({fontSize:"10px",fontWeight:500,color:e.palette.text.primary}));function RR({card:e,paymentMethod:t,paymentType:o,paymentScheme:n}){let{t:r}=useTranslation();if(!e.last_four)return null;let i=e?.name||`${r(wt(fc(t,n)?o:n))} - ${e?.last_four}`;return jsx(p,{title:i,children:jsxs(Xd,{children:["\xB7\xB7\xB7 ",e?.last_four]})})}function FR({method:e}){let{t}=useTranslation();return e?jsx(Oe,{source:de(e)??e,title:`Payment Method - ${t(wt(e))}`}):null}function UR({type:e}){let{t}=useTranslation();return e?jsx(Oe,{source:de(e)??e??"",title:`Payment Type - ${t(wt(e))}`}):null}function XR({scheme:e}){let{t}=useTranslation();return e?jsx(Oe,{source:de(e)??e,title:`Payment Scheme - ${t(wt(e))}`}):null}var nk=({mode:e})=>e?jsx(p,{title:_o[e],children:jsx(Un,{component:"img",src:e==="C"?da:ca})}):null;var ii={ORDER:{label:"order",icon:xi,color:"#5E30EB"},SAVED_CARD:{label:"cardAgreement",icon:zi$1,color:"#76BB40"},SUBSCRIPTION:{label:"subscription",icon:Ai,color:"#00C7BE"},INSTALLMENT:{label:"installment",icon:yi$1,color:"#32ADE6"}},ai={SAVED_TOKEN:{label:"savedToken",icon:T,color:"#76BB40"},COUNT:{label:"countBadge",icon:"countBadge",color:"#76BB40"}};styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5)}));styled("img")(()=>({width:"35px",height:"16px",display:"block"}));styled("span")(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"14.67px",height:"10px"}));styled("img")(()=>({maxWidth:"100%",width:"100%"}));var li=styled("span")(({theme:e})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:e.palette.text.primary})),si=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px"})),Qd=styled(motion.span,{shouldForwardProp:e=>e!=="sourcesCount"})(({theme:e,sourcesCount:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${t*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:e.palette.background.paper,borderRadius:"16px"})),eu=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),ul=styled("img")(()=>({maxWidth:"36px",maxHeight:"24px"})),pi=(e,t)=>({start:{x:e*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:t?e*t:e*39,transition:{duration:.3,type:"tween",ease:"easeOut"}}}),ci=styled(motion.span)(({order:e})=>({zIndex:(e||0)+1}));function Cb({type:e,hasSavedCard:t,totalPaymentsCount:o,isTextShown:n,...r}){let i=useTheme(),{t:l}=useTranslation(),a=useMemo(()=>[...t?[ai.SAVED_TOKEN]:[],...(o||0)>0?[ai.COUNT]:[],...e&&ii[e]?[ii[e]]:[]],[t,o,e]),s=f=>n?jsx(ci,{"data-testid":"AgreementCell_countBadge",order:f,variants:pi(f,n?85:0),children:jsx(p,{title:l("totalPaymentCount",{amount:f$2(o)}),children:jsx(si,{children:jsxs(li,{"data-testid":"AgreementCell_totalPaymentsCount",sx:{color:ai.COUNT.color},children:["x",o]})})})},f):jsx(a$7,{value:o,index:f},f),p$1=a.map((f,C)=>f.label==="countBadge"?s(C):jsx(p,{title:l(f.label),children:jsx(ci,{order:C,variants:pi(C,C>1&&n?62:0),sx:{width:n?"auto":"36px"},children:n?jsx(si,{children:jsx(li,{"data-testid":"AgreementCell_agreementType",sx:{color:f.color},children:l(f.label)})}):jsx(ul,{src:f.icon,alt:"agreement"})},f.color)},f.color)),c=p$1.length,m=jsx(p,{title:"No agreement",children:jsx(ci,{order:0,variants:pi(0,0),sx:{width:n?"auto":"36px"},children:n?jsx(si,{children:jsx(li,{"data-testid":"AgreementCell_agreementType",sx:{color:i.palette.text.secondary},children:"No agreement"})}):jsx(ul,{src:Ei,alt:"no-agreement"})},"no-agreement")},"no-agreement");return jsx(w,{...r,children:jsx(eu,{"data-testid":"AgreementCell",children:jsx(Qd,{layout:true,className:"payment-sources-container","data-testid":"AgreementCell_PaymentSourcesContainer",whileHover:"animate",animate:"start",sourcesCount:c||0,variants:{animate:{width:(c||0)*38}},children:p$1?.length>0?p$1:m})})})}var gb=Cb;var ou=styled$1("img")(()=>({width:"12.67px",height:"15px"}));styled$1("span")(({theme:e})=>({border:`1px solid ${e.palette.divider}`,borderRadius:"12px",backgroundColor:e.palette.background.paper,width:"36px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"}));function hb({hasAuth:e,tooltip:t,isTextShown:o,align:n,...r}){return jsx(w,{style:{textAlign:n||"center",overflow:"visible",display:"flex",width:"100%",justifyContent:n==="left"?"flex-start":"center"},...r,children:e?jsx(p,{title:t,children:jsx(pt,{"data-testid":"AuthCell_BadgeWrapper",children:o?jsx(H,{"data-testid":"AuthCell_TextLabel",sx:{minWidth:"max-content"},children:t}):jsx(ou,{src:na,alt:"icon","data-testid":"AuthCell_AuthIcon"})})}):null})}var yb=hb;var nu={REFUNDED:pk,PAID_OUT:ok,SETTLED:rk,PENDING:qk,UNKNOWN:yk,TIMEDOUT:wk,CANCELLED:hk,FAILED:lk,DECLINED:jk,RESTRICTED:tk,IN_PROGRESS:Bk,ACCEPTED:sk},ru={REFUNDED:"refunded"};function iu({status:e,refundTooltip:t}){let{t:o}=useTranslation();return jsx(p,{title:jsxs("div",{children:[jsx("div",{children:o(wt(e))}),t]}),children:jsx(ye,{children:jsx("img",{src:nu[e],alt:"refund-requested"})})})}function lu({status:e,gatewayTooltip:t,unCapturedTooltip:o,acquirerTooltip:n,errorCode:r,acquirerCode:i,gatewayCode:l,refundTooltip:a}){let{t:s}=useTranslation();return Ln$1?.includes(e??"")?jsx(qe,{chargeStatus:e,gatewayTooltip:t,chargeTooltip:o,acquirerTooltip:n,errorCode:r,acquirerCode:i,gatewayCode:l,iconWrapperStyles:{height:17}}):jsx(iu,{status:e,refundTooltip:a})}var su=styled$1(motion.div)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5),paddingInline:e.spacing(.625),paddingBlock:e.spacing(.625),height:"24px",minWidth:"24px",backgroundColor:"#ede8fb",borderRadius:"56px",width:"fit-content",fontSize:"10px",color:e.palette.text.primary,position:"relative",zIndex:10})),pu=styled$1("div")(({theme:e})=>({borderRadius:"80px",padding:e.spacing(.316),paddingLeft:e.spacing(.516),fontSize:"12px",fontWeight:e.typography.fontWeightRegular,color:e.palette.secondary.main,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5),lineHeight:0})),cu=styled$1(Qo)(({theme:e})=>({fontSize:"12px",fontWeight:e.typography.fontWeightRegular,color:e.palette.secondary.main}));styled$1("div")(({percentage:e,isCapture:t,theme:o})=>({background:`conic-gradient(${t?o.palette.info.dark:"#656565"} ${e}%, transparent 0.00%)`,borderRadius:"50%",width:"8.333px",height:"8.333px",border:`0.6px solid ${t?o.palette.info.dark:"#656565"}`}));styled$1("span")(({theme:e,isCapture:t})=>({backgroundColor:t?e.palette.info.dark:"#656565",color:e.palette.common.white,borderRadius:e.spacing(.5),padding:"1.285px 2.569px",height:"12px",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"9.782px",fontWeight:600}));var mu=styled$1("img")({width:"14px",height:"14px"}),du=styled$1(Un)(({theme:e})=>({position:"relative",zIndex:25,border:`1px solid ${e.palette.divider}`,height:24,borderRadius:"12px",padding:"3px 4px","> div":{paddingTop:0,paddingBottom:0,height:16}}));function fl({status:e,refundIcon:t,refundTooltip:o,refundTooltipLabel:n,date:r,gatewayTooltip:i,unCapturedTooltip:l,acquirerTooltip:a,errorCode:s,acquirerCode:p$1,gatewayCode:c,timezone:m}){let f=useTheme(),{t:C}=useTranslation(),x=v$1(new Date(Number(r)),{currentTimezone:ko,targetTimezone:m?.offset}),I=useMemo(()=>t||(e==="REFUNDED"?pk:rk),[e,t]);return ["REFUNDED","PAID_OUT"].includes(e??"")?jsx(p,{title:jsxs("div",{children:[jsx("div",{children:n??C(ru.REFUNDED)}),o]}),children:jsxs(su,{whileHover:["animate","fadeIn"],animate:"start",variants:{...r&&{animate:{boxShadow:f.shadows[4]}}},sx:{...!r&&{backgroundColor:"transparent"}},children:[jsx(mu,{sx:{...!r&&{width:"16px",height:"16px"}},src:I,alt:"refunded"}),jsx(motion.div,{style:{display:"none",alignItems:"center",justifyContent:"center",gap:"4px"},initial:{width:0,opacity:0},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto",display:"flex"},fadeIn:{transition:{delay:.5},opacity:1}},children:r&&jsx(pu,{children:jsx(cu,{value:x})})})]})}):jsx(lu,{status:e,refundTooltip:o,gatewayTooltip:i,unCapturedTooltip:l,acquirerTooltip:a,errorCode:s,acquirerCode:p$1,gatewayCode:c})}var fu=()=>{let e=useTheme();return {REFUNDED:{color:e.palette.common.lightPurple,backgroundColor:`${e.palette.common.lightPurple}1A`},PENDING:{color:e.palette.custom[500],backgroundColor:`${e.palette.custom[500]}0d`},PAID_OUT:{color:e.palette.common.green,backgroundColor:`${e.palette.common.green}0d`},SETTLED:{color:e.palette.common.green,backgroundColor:`${e.palette.common.green}0d`},UNKNOWN:{color:e.palette.custom[500],background:`${e.palette.custom[500]}1A`},TIMEDOUT:{color:e.palette.custom[500],background:`${e.palette.custom[500]}1A`},FAILED:{color:e.palette.custom[500],background:`${e.palette.custom[500]}1A`},DECLINED:{color:e.palette.error.main,background:`${e.palette.error.main}1A`},RESTRICTED:{color:e.palette.error.main,background:`${e.palette.error.main}1A`},IN_PROGRESS:{color:e.palette.grey[700],background:`${e.palette.grey[700]}1A`},CANCELLED:{color:e.palette.error.main,background:`${e.palette.error.main}1A`},ACCEPTED:{color:e.palette.grey[700],background:`${e.palette.grey[700]}1A`}}};function Vb({status:e,date:t,refundTooltip:o,isTextShown:n,gatewayTooltip:r,acquirerTooltip:i,errorCode:l,acquirerCode:a,gatewayCode:s,unCapturedTooltip:p$1,timezone:c,refundTooltipLabel:m,refundIcon:f,...C}){let{t:x}=useTranslation(),I=fu(),T=useCallback(d=>Ru(d).format("MMM D, YYYY"),[]),b=Ln$1.includes(e);return jsx(w,{...C,style:{overflow:"visible"},children:jsx(Se,{children:jsx(du,{width:n?"auto":"36px",sx:{...b&&{border:"none"}},children:n?jsx(p,{title:t?T(t):x(wt(e)),children:jsx(H,{sx:{...I[e]?I[e]:I.PENDING},children:x(wt(e))})}):jsx(fl,{status:e,refundTooltip:o,date:t,gatewayTooltip:r,unCapturedTooltip:p$1,acquirerTooltip:i,errorCode:l,acquirerCode:a,gatewayCode:s,timezone:c,refundTooltipLabel:m,refundIcon:f})})})})}var Bb=Vb;var gu=styled("img")(()=>({width:"16px",height:"16px"})),xu=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5)})),hu=styled("span")(({theme:e})=>({display:"flex",paddingInline:e.spacing(1),paddingBlock:e.spacing(.5),alignItems:"center",justifyContent:"center",gap:e.spacing(.5),borderRadius:"56px",background:`${e.palette.info.dark}1a`})),yu=styled("span")(({theme:e})=>({color:e.palette.info.dark,fontSize:"14px",lineHeight:"16.8px"}));function Nb({walletId:e,country:t,showCountry:o=true,...n}){return jsx(w,{style:{textAlign:"center",overflow:"visible"},...n,children:jsxs(xu,{children:[o&&t&&jsx(p,{title:Na(t),children:jsx(b$2,{countryCode:t})}),jsxs(hu,{children:[jsx(gu,{src:cc,alt:"wallet-icon"}),e&&jsxs(yu,{children:["\xB7\xB7\xB7\xB7 ",e?.substring((e?.length||0)-4)]})]})]})})}var Wb=Nb;var Iu=styled("img")(()=>({width:"16px",height:"16px"})),bu=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5)})),Tu=styled("span")(({theme:e})=>({display:"flex",paddingInline:e.spacing(1),paddingBlock:e.spacing(.5),alignItems:"center",justifyContent:"center",gap:e.spacing(.5),borderRadius:"56px",background:`${e.palette.common.white}`,border:`1px solid ${e.palette.divider}`})),Su=styled("span")(({theme:e})=>({color:`${e.palette.text.primary}`,fontSize:"14px",lineHeight:"16.8px"}));styled("span")(()=>({width:"24px",height:"24px",borderRadius:"50%",backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}));function Fb({walletId:e,country:t,name:o,...n}){return jsx(w,{style:{textAlign:"center",overflow:"visible"},...n,children:jsxs(bu,{children:[t&&jsx(p,{title:Na(t),children:jsx(b$2,{countryCode:t})}),jsxs(Tu,{children:[jsx(Iu,{src:dc,alt:"bank-icon"}),e&&jsxs(Su,{children:[o," \xB7\xB7\xB7\xB7 ",e?.substring((e?.length||0)-4)]})]})]})})}var Hb=Fb;var xl={PAID_OUT:ok,SETTLED:uk,PENDING:Qh$1,INITIATED:Qh$1,FAILED:lk};function $b({payoutStatus:e="PAID_OUT",...t}){let{t:o}=useTranslation(),n=useTheme();return jsx(w,{...t,children:jsx(Se,{children:jsx(ye,{className:"payout-status",style:{visibility:"visible",width:"36px",borderRadius:"23.1px",backgroundColor:n.palette.common.white,border:`1.029px solid ${n.palette.divider}`},children:e&&xl[e]&&jsx(p,{title:o(wt(e)),children:jsx($,{src:xl[e],alt:"settled-icon",style:{width:"16px",height:"16px",objectFit:"contain"}})})})})})}var Ub=$b;styled$1(motion.span)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minHeight:"24px",cursor:"pointer",borderRadius:"16px"}));styled$1(motion.span)(()=>({display:"block",width:"0",overflow:"hidden"}));styled$1(motion.span)(({theme:e})=>({color:e.palette.common.white,display:"block",fontWeight:e.typography.fontWeightBold,fontSize:"9.78px",borderRadius:"4px",paddingInline:e.spacing(.45)}));styled$1("img")(()=>({width:"13px",height:"13px"}));styled$1(motion.span)(({theme:e})=>({width:"24px",height:"24px",borderRadius:"50%",backgroundColor:e.palette.background.paper,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,position:"relative"}));styled$1(motion.div)(()=>({display:"flex",justifyContent:"center",alignItems:"center",gap:"4px",width:"0",overflow:"hidden",opacity:0}));styled$1("div")(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start"}));var Gb=styled$1("span")(({theme:e})=>({textDecorationLine:"underline",color:e.palette.info.dark}));var hl=a$4;function Kb({status:e,chargeStatus:t,isTextShown:o,...n}){let{t:r}=useTranslation();return jsx(w,{...n,children:jsxs(Se,{children:[jsx(gi,{status:e,isTextShown:o}),t&&hl[t]&&jsx(p,{title:r(wt(t)),children:jsx($,{src:hl[t],alt:"charge-icon"})})]})})}var qb=Kb;var Zb={FAILED:fh$1,PENDING:mh$1,INITIATED:bh$1,ATTEMPTED:ah$1,EXEMPTED:eh$1,EXEMPTED_WITH_TRANSACTION:eh$1,EXEMPTED_WITHOUT_TRANSACTION:dh$1,REJECTED:ch,UNAVAILABLE:hh,UNDETERMINED:ih$1,SUCCESS:lh,AUTHENTICATED:kh$1,AUTHENTICATED_WITH_TRANSACTION:kh$1,AUTHENTICATED_WITHOUT_TRANSACTION:kh$1,AUTHENTICATED_AUTHORIZE_FAILED:fh$1},yl={FAILED:nh$1,PENDING:oh$1,INITIATED:ph,ATTEMPTED:qh,EXEMPTED:rh$1,EXEMPTED_WITH_TRANSACTION:rh$1,EXEMPTED_WITHOUT_TRANSACTION:sh,REJECTED:th$1,UNAVAILABLE:uh$1,UNDETERMINED:vh,SUCCESS:wh,AUTHENTICATED:xh$1,AUTHENTICATED_WITH_TRANSACTION:xh$1,AUTHENTICATED_WITHOUT_TRANSACTION:yh,AUTHENTICATED_AUTHORIZE_FAILED:nh$1},Nt=a$4;function eT({status:e,authorizedStatus:t,chargeStatus:o,chargeTooltip:n,gatewayTooltip:r,acquirerTooltip:i,errorCode:l,...a}){let{t:s}=useTranslation(),p$1=useTheme(),c=[e&&yl[e]?jsx(p,{title:s(wt(e)),children:jsx("img",{src:yl[e],alt:"authentication-icon",style:{width:"36px",height:"24px",objectFit:"scale-down"}})}):null,o&&Nt[o]?jsx(p,{title:s(wt(o)),children:jsx(qe,{showAuthorizedStatus:true,chargeStatus:o,gatewayTooltip:r,chargeTooltip:n,acquirerTooltip:i,errorCode:l})}):null,t&&f$1[t]?jsx(p,{title:s(wt(t)),children:jsx("img",{src:f$1[t],alt:"authorized-icon",style:{width:"36px",height:"20px",objectFit:"scale-down"}})}):null].filter(Boolean),m=c.length||0;return jsx(w,{...a,sx:{position:"relative",overflow:"visible"},children:jsx(ao,{whileHover:"animate",animate:"start",statusesCount:m,children:c.map((f,C)=>f?jsx(io,{order:C,variants:no(C,p$1.shadows[4],40),children:jsx(ro,{children:f})},C):null)})})}var tT=eT;var bl={issuer:Zh,scheme:_h$1,device:Xh,app:Wh$1,wallet:Vh,biometric:Xh};function rT({type:e,...t}){let{t:o}=useTranslation();return jsx(w,{...t,children:jsx(Se,{children:jsx(ye,{className:"authentication-status",children:e&&bl[e]&&jsx(p,{title:o(wt(e)),children:jsx($,{src:bl[e],alt:"authentication-type"})})})})})}var iT=rT;var wu={SMS:be,EMAIL:Zd,WHATSAPP:ce};var Au=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),vu=styled("img")(()=>({maxWidth:"36px",maxHeight:"24px"})),Pu=styled(motion.span,{shouldForwardProp:e=>e!=="sourcesCount"})(({theme:e,sourcesCount:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${t*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:e.palette.background.paper,borderRadius:"16px"})),Eu=styled("span")(()=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0"})),Mu=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"4px"})),Du=(e,t)=>({start:{x:e*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:t?e*t:e*39,transition:{duration:.3,type:"tween",ease:"easeOut"}}});function pT({channels:e,isTextShown:t,...o}){let{t:n}=useTranslation(),r=useTheme(),i={WHATSAPP:r.palette.custom[700],EMAIL:r.palette.custom[800],SMS:r.palette.custom[900]},a=e?.sort(p=>p==="EMAIL"?-1:p==="SMS"?1:p==="WHATSAPP"?2:0)?.filter(p=>!!p)?.map((p$1,c)=>{if(!p$1)return null;let m=n(p$1?.toLowerCase());return jsx(ct,{order:c,variants:Du(c,t?74:0),sx:{width:t?"70px":"36px"},children:jsx(p,{title:m,placement:"top",wrapperProps:{sx:{width:"100%",height:"100%",justifyContent:"center"}},children:t?jsx(Mu,{children:jsx(Eu,{sx:{color:i[p$1]},children:m})}):jsx(vu,{src:wu[p$1],alt:p$1})})},`${p$1}-${c}`)}),s=a?.length||0;return jsx(w,{...o,children:jsx(Au,{children:a?.length>0?jsx(Pu,{layout:true,className:"payment-sources-container",whileHover:"animate",animate:"start",sourcesCount:s||0,variants:{animate:{width:(s||0)*38}},style:{zIndex:29},children:a}):null})})}var cT=pT;function gn(e){return z$1(e,{sameDay:"[Today at] h:mm A",nextDay:"[Tomorrow]",lastDay:"[Yesterday]",sameElse:"MMM DD, YYYY",lastWeek:"MMM DD, YYYY",nextWeek:"MMM DD, YYYY"})}styled(motion.div)(({theme:e,background:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5),paddingInline:e.spacing(.5),paddingBlock:e.spacing(.5),backgroundColor:t,height:"24px",width:"fit-content",borderRadius:"80px",fontSize:"10px",color:e.palette.text.primary}));styled("img")(()=>({width:"16px",height:"16px"}));styled("div")(({theme:e})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:e.palette.error.main}));styled("div")(({theme:e})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:e.palette.error.main}));var Lu=styled(j)(({theme:e})=>({fontSize:"11px",fontWeight:500,color:"#000",cursor:"default"}));function dT({dueDate:e,expiryDate:t,...o}){let n=useMemo(()=>({label:gn(Ru(e).valueOf()),tooltip:"Due Date"}),[e]),r=useMemo(()=>({label:gn(Ru(t).valueOf()),tooltip:"Expiry Date"}),[t]),i=s=>jsx(p,{title:s.tooltip,children:jsx(Lu,{children:s.label})}),l=useMemo(()=>e?i(n):t?i(r):null,[n,r,e,t]),a=useMemo(()=>t&&e?[i(r)]:[],[n,r,e,t]);return !e&&!t?null:jsx(w,{...o,sx:{position:"relative",overflow:"visible"},children:jsx(a$1,{sx:{justifyContent:"flex-start"},centerIcon:l,rightIcons:a})})}var uT=dT;var ku=styled(motion.div)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5),paddingInline:e.spacing(.75),height:"34px",minWidth:"24px",borderRadius:"8px",width:"fit-content",fontSize:"10px",color:e.palette.text.primary,position:"relative",zIndex:10,border:"1px solid transparent","&:hover":{backgroundColor:e.palette.common.white,border:`1px solid ${e.palette.divider}`}}));styled("div")(({theme:e})=>({borderRadius:"80px",padding:e.spacing(.316),paddingLeft:e.spacing(.516),fontSize:"12px",fontWeight:e.typography.fontWeightRegular,color:e.palette.secondary.main,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5),lineHeight:0}));styled("div")(({percentage:e,isCapture:t,theme:o})=>({background:`conic-gradient(${t?o.palette.info.dark:"#656565"} ${e}%, transparent 0.00%)`,borderRadius:"50%",width:"8.333px",height:"8.333px",border:`0.6px solid ${t?o.palette.info.dark:"#656565"}`}));styled("span")(({theme:e,isCapture:t})=>({backgroundColor:t?e.palette.info.dark:"#656565",color:e.palette.common.white,borderRadius:e.spacing(.5),padding:"1.285px 2.569px",height:"12px",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"9.782px",fontWeight:600}));var Tl=styled("img")({width:"24px",height:"24px"});function gT({products:e,...t}){let o=e?.map((r,i)=>jsx(Tl,{sx:{...r?.toLowerCase()===Bn.tokens.code?.toLowerCase()&&{borderRadius:"8px",border:"1px solid rgba(0, 0, 0, 0.10)"}},className:"app-logo",src:Dn$1.find(l=>l.code?.toLowerCase()===r?.toLowerCase())?.iconUrl,alt:"product-icon"},`${i}-${r}`)),n=jsxs(ku,{whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:"10px 0px 8px 0px #F2F2F2"}},children:[jsx(Tl,{src:ui,alt:"products-icon"}),jsx(motion.div,{style:{display:"none",alignItems:"center",justifyContent:"center",gap:"4px"},initial:{width:0,opacity:0},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto",display:"flex"},fadeIn:{transition:{delay:.5},opacity:1}},children:o})]});return jsx(w,{...t,style:{overflow:"visible"},children:jsx(Se,{children:jsx("div",{style:{width:"30px",position:"relative",zIndex:24},children:n})})})}var xT=gT;function yi(e){return jsx(Wr,{...e,children:jsx(p,{title:e.tooltip||e.children,children:e.children})})}var Wu=styled$1(Un)(()=>({display:"flex",alignItems:"center",gap:"8px"})),Fu=styled$1(Un)(({theme:e})=>({fontSize:"14px",color:e.palette.text.primary,lineHeight:"16.8px"}));function zW({currency:e}){return jsxs(Wu,{children:[jsx(b$2,{currencyCode:e}),jsx(Fu,{children:e})]})}Ru.extend(TT);Ru.extend(bT);function _u({value:e,...t}){let o=useMemo(()=>z$1(e,{sameDay:"[Today]",nextDay:"[Tomorrow]",lastDay:"[Yesterday]",sameElse:"MMM D, YYYY",lastWeek:"MMM D, YYYY",nextWeek:"MMM D, YYYY"}),[e]);return jsx(w,{...t,children:o})}var zu=styled$1(Un)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",width:36,height:24,border:`1px solid ${e.palette.divider}`,borderRadius:"24px","&:hover":{boxShadow:e.shadows[4]}}));function s2({reference:e}){return e?jsx(p,{title:`Bank - ${e}`,children:jsx(zu,{children:jsx(Un,{component:"img",src:qb$1,alt:"bank",width:14})})}):jsx(Fragment,{})}var Sl={acquirer:qb$1,generic:rb,payment:$d$1,gateway:vn,order:_d$1};var $u=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),Uu=styled("img")(()=>({maxWidth:"36px",maxHeight:"24px"})),Gu=styled(motion.span,{shouldForwardProp:e=>e!=="sourcesCount"})(({sourcesCount:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${e*6+36}px `,minHeight:"24px",cursor:"pointer",borderRadius:"16px"})),Yu=styled("span")(()=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0"})),ju=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"4px"}));styled("div")(()=>({height:"18px"}));var Ku=(e,t,o)=>({start:{x:e*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:o?e*o:e*39,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:t}});var RT=120,kT=50;function VT({isTextShown:e,getTooltipTitle:t,...o}){let[n,r]=useState(false),[i,l]=useState(null),a=useRef(null),s=useRef(false),p$1=useRef(false),c=useRef(null),m=useTheme(),f=useMemo(()=>Object.keys(Sl).filter(S=>!!o[S]),[o]),C=()=>{c.current&&(clearTimeout(c.current),c.current=null);},x=()=>{l(a.current);},I=()=>{s.current=true,p$1.current=false,r(true),l(null),C(),c.current=setTimeout(()=>{p$1.current=true,x();},RT);};useEffect(()=>()=>C(),[]);let T=()=>{s.current||I();},b=()=>{C(),a.current=null,s.current=false,p$1.current=false,l(null),r(false);},d=S=>{if(a.current=S,p$1.current){C(),l(S);return}s.current||I();},g=()=>{a.current=null,p$1.current&&(C(),c.current=setTimeout(x,kT));},y=f.length;return jsx(w,{...o,children:jsx($u,{children:y>0?jsx(Gu,{layout:true,className:"reference-sources-container",whileHover:"animate",onHoverStart:T,onHoverEnd:b,animate:n?"animate":"start",sourcesCount:y,variants:{animate:{width:y*38}},style:{zIndex:29},children:f.map((S,A)=>{let h=t?.(S)||`${Xu(S)} - ${o[S]}`,v=i===S;return jsx(ct,{order:A,variants:Ku(A,m.shadows[4],e?83:0),sx:{width:e?"79px":"36px"},onMouseEnter:()=>d(S),onMouseLeave:g,children:jsx(p,{open:v,disableHoverListener:true,disableInteractive:true,title:v?h:"",children:e?jsx(ju,{children:jsx(Yu,{children:Xu(S)})}):jsx(Uu,{src:Sl[S],alt:S,sx:{...S==="order"&&{width:"11.82px"}}})})},`${S}-${A}`)})}):null})})}var BT=VT;var wl={Y:{tooltip:"Authenticated",icon:kh$1,borderColor:"rgba(31, 136, 208, 0.10)"},N:{tooltip:"Failed Authentication",icon:Vg$1,borderColor:"rgba(240, 130, 0, 0.10)"},R:{tooltip:"Failed Authentication",icon:Vg$1,borderColor:"rgba(240, 130, 0, 0.10)"},A:{tooltip:"Attempted",icon:ah$1,borderColor:"rgba(31, 136, 208, 0.10)"},U:{tooltip:"Failed Authentication",icon:Vg$1,borderColor:"rgba(240, 130, 0, 0.10)"},noAuth:{tooltip:"Not Authenticated",icon:bh$1,borderColor:"#F2F2F2"}},Al={"3DS":{tooltip:"3DS",icon:Rj,borderColor:"rgba(31, 136, 208, 0.10)"},"Device Biometric":{tooltip:"Biometric",icon:Qj,borderColor:"rgba(31, 136, 208, 0.10)"},"Non-3DS":{tooltip:"Non 3DS",icon:Rj,borderColor:"rgba(31, 136, 208, 0.10)"}};styled("img")(()=>({width:"12.67px",height:"15px"}));var Ju=styled(motion.div)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),Qu=styled("img")({width:"16px",height:"16px"});styled("div")(({theme:e})=>({borderRadius:"80px",padding:e.spacing(.316),paddingLeft:e.spacing(.516),fontSize:"10px",fontWeight:e.typography.fontWeightRegular,color:e.palette.text.primary,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5),lineHeight:0}));var ef=styled(motion.span,{shouldForwardProp:e=>e!=="sourcesCount"})(({theme:e,sourcesCount:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${t*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:e.palette.background.paper,borderRadius:"16px"})),tf=(e,t,o)=>({start:{x:e*6,transition:{duration:.3,type:"tween",ease:"easeIn"},...e>0&&{opacity:0}},animate:{x:o?e*o:e*39,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:t,...e>0&&{opacity:1}}}),of=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px",textAlign:"center",width:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}));function WT({transactionStatus:e,isTextShown:t,eci:o,authType:n,...r}){let i=useTheme$1(),l=useMemo(()=>{let p=wl[e??"noAuth"]??wl.noAuth,c=p?.tooltip,m=p?.icon;return [{tooltip:c,content:t?c:m,type:t?"text":"icon"},...n?[{tooltip:n,content:t?Al[n]?.tooltip:Al[n]?.icon,type:t?"text":"icon"}]:[],{tooltip:"",content:o?`ECI ${o}`:"",type:"text"}]},[e,o,t]),a=useMemo(()=>l.filter(p=>!!p.content).map((p$1,c)=>{let m=p$1.type==="text"?jsx(of,{"data-testid":"AuthenticationCell_BadgeTextWrapper",children:jsx(H,{sx:{border:"none"},"data-testid":"AuthenticationCell_TextLabel","data-source":p$1.content,children:p$1.content})}):jsx(Qu,{src:p$1.content,alt:p$1.tooltip});return jsx(p,{title:p$1.tooltip,children:jsx(ct,{order:-1*c,variants:tf(c,i.shadows[4],t?124:39),sx:{...p$1.type==="text"&&{width:t?"120px":"58px"}},children:m})},`${p$1.tooltip}-${c}`)}),[r,l,t,i]),s=a.length;return jsx(w,{...r,children:jsx(Ju,{children:s>0?jsx(ef,{layout:true,className:"authentication-sources-container",whileHover:"animate",animate:"start",sourcesCount:s,variants:{animate:{width:38}},style:{zIndex:29},children:a}):null})})}var FT=WT;var vl={checkout:Eh,checkoutSuccess:Fh$1};function _T({status:e,...t}){let{t:o}=useTranslation();return jsx(w,{...t,sx:{overflow:"visible"},children:jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"8px",overflow:"visible"},children:e&&vl[e]&&jsx(p,{title:o(wt(e)),children:jsx($,{src:vl[e],alt:"checkout-icon"})})})})}var zT=_T;var Pl={TRANSACTED:Kh,INITIATED:Ih,CANCELLED:Jh,EXPIRED:Hh$1};function af({status:e,chargeStatus:t,...o}){let{t:n}=useTranslation();return jsx(w,{...o,sx:{overflow:"visible"},children:jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"8px",overflow:"visible"},children:[e&&Pl[e]&&jsx(p,{title:n(wt(e)),children:jsx($,{src:Pl[e],alt:"intents-icon"})}),t&&Nt[t]&&jsx(p,{title:n(wt(t)),children:jsx(qe,{chargeStatus:t})})]})})}var sf=styled(motion.div)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",paddingInline:e.spacing(.5),paddingBlock:e.spacing(.5),backgroundColor:"#eeeeee",borderRadius:"56px",height:"24px",fontSize:"10px",color:e.palette.text.primary,zIndex:24,overflow:"visible",position:"absolute",gap:"0px"})),pf=styled(motion.div)(({theme:e,percentage:t})=>({border:`0.6px ${[0,100].includes(t)?"solid":"dashed"} #656565`,borderRadius:"80px",padding:e.spacing(.316),paddingLeft:e.spacing(1),fontSize:"7px",fontWeight:e.typography.fontWeightBold,color:"#656565",display:"flex",alignItems:"center",justifyContent:"space-between",gap:e.spacing(.5),minWidth:"44px"}));styled("div")(({percentage:e,isCapture:t,theme:o})=>({background:`conic-gradient(${t?o.palette.info.dark:"#656565"} ${e}%, transparent 0.00%)`,borderRadius:"50%",width:"8.333px",height:"8.333px",border:`0.6px solid ${t?o.palette.info.dark:"#656565"}`}));function cf(e){return e<5?5:e===100?95:e}var Si={PAID_OUT:{color:"#2ACE00",backgroundColor:"#2ACE000D"},PENDING:{color:"#FF7A00",backgroundColor:"#FF7A000D"},SETTLED:{color:"#2ACE00",backgroundColor:""}};function jT({percentage:e$1,date:t,payoutStatus:o,payoutTooltip:n,chargeTooltip:r,refundCount:i,isTextShown:l,...a}){let{t:s}=useTranslation(),p$1=useTheme();return e$1===0?null:jsx(w,{...a,style:{overflow:"visible",position:"relative"},children:jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"8px"},children:[jsx(p,{title:r,children:jsxs(sf,{whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{gap:"4px"}},sx:{...l&&{height:"auto",padding:"0",backgroundColor:"transparent"}},children:[jsx(pf,{percentage:e$1,sx:{backgroundColor:"#eeeeee",...l&&{backgroundColor:"transparent",border:"none"}},variants:{...!l&&{animate:{boxShadow:p$1.shadows[4]}}},children:l?jsxs(H,{children:[e$1,"%"]}):jsxs(Fragment,{children:[e$1," % ",jsx(Fr,{percentage:cf(e$1)})]})}),i>1&&jsx(motion.div,{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"8px"},children:jsx(motion.div,{style:{alignItems:"center",justifyContent:"center",gap:"4px",position:"relative",zIndex:22,overflow:"visible"},initial:{width:0,opacity:0,paddingRight:"0px"},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto",paddingRight:"4px",boxShadow:p$1.shadows[4]},fadeIn:{transition:{delay:.5},opacity:1}},children:jsxs(z,{compact:true,color:"neutral",children:[i,"x"]})})})]})}),jsx(ye,{className:"payout-status",style:{visibility:o==="PENDING"?"hidden":"visible",position:"relative",left:"57px",width:l?"auto":"24px"},children:o&&e[o]&&jsx(p,{title:n||s(wt(o)),children:l?jsx(H,{sx:{color:Si[o].color,border:`1px solid ${Si[o].color}1a`,backgroundColor:Si[o].backgroundColor},children:s(wt(o))}):jsx($,{src:e[o],alt:"settled-icon"})})})]})})}var KT=jT;var uf={DELETED:kf$1,DRAFT:lf,CREATED:mf,CANCELLED:Aa,CANCELED:Aa,EXPIRED:Ba,PAID:pf$1,REFUNDED:vf$1,DELIVERED:qf$1,VIEWED:rf,SAVED:sf$1,SCHEDULED:tf$1,PENDING:uf$1,REMINDED:""};styled(motion.div)(({theme:e,background:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5),paddingInline:e.spacing(.75),paddingBlock:e.spacing(.5),backgroundColor:t,height:"24px",width:"fit-content",borderRadius:"24px",fontSize:"10px",color:e.palette.text.primary}));var Ml=styled("img")(()=>({height:"13.125px",width:"12px"})),wi=styled("div")(()=>({fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"center",width:"65px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"4.5px 8px",borderRadius:"24px"})),ff=styled("div")(({theme:e})=>({color:e.palette.common.white,background:e.palette.error.main,fontSize:"0.6rem",fontWeight:600,borderRadius:"16px",padding:"2px 8px",display:"flex",alignItems:"center",justifyContent:"center"})),Cf=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px"}));function gf(e){switch(e){case "CANCELLED":case "DELETED":return {color:"#FF3D00",background:"#FFF5F2"};case "VIEWED":return {color:"#1F88D0",background:"#e1edf8"};case "REFUNDED":return {color:"#4E1FD0",background:"#ede8fb"};case "PAID":return {color:"#2ACE00",background:"#EAFAE5"};case "EXPIRED":return {color:"#FF7A00",background:"#FFF2E5"};case void 0:return {color:"#FF7A00",background:"transparent"};default:return {color:"#818181",background:"#F2F2F2"}}}function xf({chargeStatus:e,chargeTooltip:t,errorCode:o,iconStyles:n,iconWrapperStyles:r}){let{t:i}=useTranslation(),l=e?b$c[e]:null,a=e&&a$4[e]&&jsx(Cf,{style:r,children:jsx($,{src:a$4[e],alt:"charge-icon",style:{width:"16px",height:"16px",...n}})}),s=t&&jsx(Fragment,{children:jsx("div",{children:t})});return e?jsx(p,{title:s??i(wt(e)),children:jsxs(Un,{sx:{display:"flex",gap:"6px",alignItems:"center"},children:[a,!!Ln$1?.includes(e||"")&&jsx(ff,{style:{background:l?.color},children:o})]})}):null}function hf({status:e,date:t,viewsCount:o,chargeStatus:n,errorCode:r,chargeTooltip:i,remindedCount:l=0,...a}){let{t:s}=useTranslation(),p$1=useTheme(),c=e?uf[e]:null,m=gf(e),f=`${s(e?.toLowerCase()||"")} ${gn(Ru(t).valueOf())}`,C=useMemo(()=>jsx(xf,{chargeStatus:n,errorCode:r,chargeTooltip:i}),[n,r,i]),x=useMemo(()=>jsx(p,{title:s("reminded"),children:jsxs(Un,{sx:{display:"flex",alignItems:"center",justifyContent:"center",gap:"6px"},children:[jsx(Ml,{sx:{width:"14px",height:"14px"},src:le,alt:"icon"}),jsx(z,{style:{background:p$1.palette.error.main,fontWeight:600,color:p$1.palette.common.white},children:l})]})}),[l]),I=useMemo(()=>{if(c)return jsx(p,{title:s(f||""),children:jsx(Ml,{src:c,alt:"status icon"})});if(n&&Nt[n])return C;if(l)return x},[c,n,l]);return !e&&!n&&!l?null:jsx(w,{...a,sx:{position:"relative",overflow:"visible"},children:jsx(a$1,{sx:{justifyContent:"flex-start"},expandableCenterRight:o&&e==="VIEWED"&&c?[jsx(z,{style:{marginRight:"8px",color:"#fff",backgroundColor:m.color},children:o})]:void 0,centerIcon:I,leftIcons:l&&c?[x]:void 0,rightIcons:n&&Nt[n]&&c?[C]:void 0})})}function lS({tooltip:e,children:t,badge:o,...n}){return jsx(w,{style:{textAlign:"center",overflow:"visible"},...n,children:t?jsx(p,{title:e,children:jsx(pt,{"data-testid":"BadgeCell_BadgeWrapper",children:jsxs(H,{"data-testid":"BadgeCell_TextLabel",sx:{minWidth:"max-content",gap:"0.5rem"},children:[t,(o||0)>1&&jsxs(z,{color:"dark",style:{fontWeight:"bold"},children:["+",o]})]})})}):null})}var sS=lS;var Rl={ACTIVE:ii$1,EXPIRED:hi,PENDING:ii$1,SAVED:fi,TRANSACTED:gi$1,CONSUMED:gi$1};var pS=(f=>(f.ABANDONED="ABANDONED",f.IN_PROGRESS="IN_PROGRESS",f.VOID="VOID",f.CANCELLED="CANCELLED",f.CAPTURED="CAPTURED",f.INITIATED="INITIATED",f.FAILED="FAILED",f.DECLINED="DECLINED",f.RESTRICTED="RESTRICTED",f.TIMEDOUT="TIMEDOUT",f.UNKNOWN="UNKNOWN",f.AUTHORIZED="AUTHORIZED",f))(pS||{});function mS({status:e,chargeTooltip:t,gatewayTooltip:o,acquirerTooltip:n,errorCode:r,cardId:i,hasChargeIcon:l,hasAuthorizedIcon:a,...s}){let{t:p$1}=useTranslation();return jsx(w,{...s,sx:{position:"relative",overflow:"visible"},children:jsxs(Se,{sx:{gap:"0.5rem"},children:[e&&Rl[e]&&jsx(p,{title:p$1(wt(e)),children:jsx($,{src:Rl[e],alt:"token-icon"})}),i&&jsx(p,{title:p$1(wt(e)),children:jsx($,{src:ji,alt:"card-icon"})}),l&&jsx(p,{title:p$1(wt("CAPTURED")),children:jsx(qe,{showAuthorizedStatus:true,chargeStatus:"CAPTURED",gatewayTooltip:o,chargeTooltip:t,acquirerTooltip:n,errorCode:r})}),a&&jsx(p,{title:p$1(wt("AUTHORIZED")),children:jsx($,{src:f$1.AUTHORIZED,alt:"authorized-icon"})})]})})}var dS=mS;var Vl=styled("img")(()=>({maxWidth:"13px",maxHeight:"13px"})),If=styled("div")(({theme:e})=>({width:"24px",height:"24px",border:`1px solid ${e.palette.divider}`,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50%"})),bf=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)}));function fS({brandName:e,brandIcon:t,...o}){return jsx(w,{style:{textAlign:"center",overflow:"visible"},...o,children:jsxs(bf,{children:[jsx(If,{children:t?jsx(p,{title:e,children:jsx(Vl,{src:t,alt:"brand icon",onError:r=>{r.currentTarget.src=Bi$1;}})}):jsx(Vl,{src:Bi$1,alt:"brand icon"})}),jsx("span",{children:e})]})})}var CS=fS;function Sf({metadata:e}){let t=Object.keys(e)[0]??"",o=Object.keys(e)[1]??"",n=Object.keys(e)[2]??"",r=Object.keys(e)[3]??"",i=Object.keys(e)[4]??"",l=t||o||n||r||i?`${e[t]?`${e[t]}${e[o]||e[n]||e[r]||e[i]?",":""}`:""}${e[o]?`${e[o]}${e[n]||e[r]||e[i]?",":""}`:""}${e[n]?`${e[n]}${e[r]||e[i]?",":""}`:""}${e[r]?`${e[r]}${e[i]?",":""}`:""}${e[i]??""}`:"";return l?jsx(p,{title:l,children:jsx(Box,{component:"img",src:$j,alt:"meta",sx:{cursor:"pointer"}})}):null}var wf=styled$1(motion.img,{shouldForwardProp:e=>e!=="width"&&e!=="height"})(({width:e,height:t})=>({width:e||"16px",height:t||"16px"}));var bS=({width:e,height:t,sx:o}={})=>{let n=Bc(useId(),"animated-spinner-icon");return jsx(wf,{id:n,"data-testid":"AnimatedSpinnerIcon",src:hc,alt:"Loading",className:"spinner-loader",width:e,height:t,sx:o,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2}})},Af=bS;var vf=Af;var Ef=styled$1("span")(({theme:e})=>({border:`1px solid ${e.palette.divider}`,borderRadius:"12px",backgroundColor:e.palette.background.paper,paddingInline:"8px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",minWidth:"36px",cursor:"pointer"})),Mf=styled$1(motion.img)(()=>({width:"16px",height:"16px"}));var AS=({onClick:e,isSettlementsAvailable:t,isDownloadError:o,isDownloadLoading:n,isDownloadSuccess:r})=>{let i=useMemo(()=>n||r||o,[n,r,o]),l=useMemo(()=>r?kc:o?jc:Zj,[r,o]);return jsx(p,{title:t?"":"Pending",children:jsx(Ef,{onClick:()=>t&&!i&&e(),children:jsx(AnimatePresence,{mode:"wait",initial:false,children:n?jsx(vf,{},"spinner"):jsx(Mf,{src:t?l:_j,alt:"Download Report"})})})})};var PS=({receiptId:e})=>jsx(TableCell,{component:"div",children:jsx(p,{title:`Receipt - ${e}`,children:jsx(H,{sx:{padding:"3px 8px",maxWidth:"50px"},children:jsx("img",{src:rc,alt:"receipt"})})})});var ES=({receiptId:e})=>jsx(Wr,{children:jsx("span",{children:e})});var MS=({receiptId:e})=>jsx(yi,{children:jsx("span",{children:e})});var kf=styled("div",{shouldForwardProp:e=>!["licenseNumber","hasClick"].includes(e)})(({theme:e,licenseNumber:t,hasClick:o})=>({display:"flex",alignItems:"center",gap:e.spacing(1),border:"1px solid #F2F2F2",borderRadius:"44px",padding:"3.5px 5px",height:"24px",cursor:o?"pointer":"default",...t&&{padding:"3.5px 8px"}})),Vf=styled(Un)(()=>({display:"flex",alignItems:"center",gap:"4px",overflow:"hidden",width:"100%"}));styled("img")(()=>({width:"16px",height:"11.73px"}));var Bf=styled("div",{shouldForwardProp:e=>!["licenseNumber"].includes(e)})(({theme:e,licenseNumber:t})=>({fontSize:"14px",fontWeight:400,color:e.palette.text.primary,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",margin:"0",width:"74px",...!t&&{color:"#B1B1B1",width:"84px"}})),Nf=styled("img")(()=>({width:"10.5px",height:"10.5px"})),Wf=styled("div")({marginLeft:"auto",width:"auto"});var Ff={incomplete:Ij,complete:Hj,reviewed:Hj,verified:Jj};function Hf({entity:e,country:t,verificationStatus:o,licenseNumber:n,hideStatus:r,...i}){let l=Ff[o??"incomplete"];return jsx(w,{...i,sx:{cursor:i?.onClick?"pointer":"default"},children:jsx(p,{title:e,children:jsx(kf,{hasClick:!!i?.onClick,licenseNumber:n,children:jsxs(Vf,{children:[jsx(p,{title:t?Na(t):"",children:jsx(b$2,{countryCode:t})}),jsx(Bf,{licenseNumber:n,children:n||"Not Available"}),!r&&jsx(Wf,{children:jsx(Nf,{src:l})})]})})})})}function _f({marketPlaceIcon:e,marketPlaceName:t,...o}){return jsx(w,{...o,children:jsx(Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:t&&jsxs(Fragment,{children:[jsx(Box,{sx:{width:"24px",height:"24px",border:"1px solid #F2F2F2",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:e??jsx("img",{src:Tb,alt:"marketplace",style:{maxWidth:"18px",maxHeight:"18px",objectFit:"cover"}})}),jsx(Typography,{noWrap:true,sx:{fontSize:"14px",fontWeight:400},children:t})]})})})}var zf={incomplete:Ij,complete:Hj,reviewed:Hj,verified:Jj};var $f=styled("div")(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1),border:"1.029px solid #F2F2F2",borderRadius:"44px",padding:"4px 8px",lineHeight:"120%"})),Uf=styled("div")(({theme:e})=>({fontSize:"14px",fontWeight:400,color:e.palette.text.primary,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"84px"})),Gf=styled("img")(()=>({width:"10.5px",height:"10.5px"})),Yf=styled("span")(({theme:e})=>({fontSize:"9.5px",fontWeight:400,color:e.palette.common.white,backgroundColor:e.palette.grey[700],borderRadius:"4px",padding:"1px 2px"})),jf=styled("div")({width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"}),Kf=styled("div")({display:"flex",alignItems:"center",gap:"8px"}),qf=styled("div")({fontWeight:400,fontSize:14,lineHeight:"120%",letterSpacing:0,color:"#B1B1B1",textAlign:"center",width:"100%"});function Xf({id:e,status:t,count:o,name:n,...r}){let i=zf[t??"incomplete"];return jsx(w,{...r,sx:{cursor:"pointer"},children:jsx(p,{title:n,children:jsx($f,{children:e?jsxs(jf,{children:[jsx(Uf,{children:e}),jsxs(Kf,{children:[jsx(Gf,{src:i}),o>1&&jsx("div",{children:jsxs(Yf,{children:["+",o-1]})})]})]}):jsx(qf,{children:"Not Available"})})})})}var Zf=styled("div",{shouldForwardProp:e=>!["hasClick"].includes(e)})(({theme:e,hasClick:t})=>({display:"flex",alignItems:"center",gap:e.spacing(1),border:"1px solid #F2F2F2",borderRadius:"44px",padding:"3.5px 5px",height:"24px",cursor:t?"pointer":"default"})),Jf=styled(Un)(()=>({display:"flex",alignItems:"center",gap:"4px",overflow:"hidden",width:"100%"})),Qf=styled("p",{shouldForwardProp:e=>!["brandName"].includes(e)})(({theme:e,brandName:t})=>({fontSize:"14px",fontWeight:400,color:e.palette.text.primary,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"74px",margin:"0",...!t&&{color:"#B1B1B1",width:"84px"}})),eC=styled("img")(()=>({width:"10.5px",height:"10.5px"})),tC=styled("div")({marginLeft:"auto",width:"auto"});var oC={incomplete:Ij,complete:Hj,reviewed:Hj,verified:Jj};function nC({brand:e,verificationStatus:t,hideStatus:o,brandLogo:n,...r}){let i=oC[t??"incomplete"];return jsx(w,{...r,children:jsx(p,{title:e.name,children:jsx(Zf,{hasClick:!!r.onClick,children:jsxs(Jf,{children:[n,jsx(Qf,{brandName:e.name,children:e.name||"Not Available"}),!o&&jsx(tC,{children:jsx(eC,{src:i})})]})})})})}var rC=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),iC=styled("img")(()=>({maxWidth:"36px",maxHeight:"16px"})),aC=styled(motion.span,{shouldForwardProp:e=>e!=="sourcesCount"})(({theme:e,sourcesCount:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${t*6+36}px `,minHeight:"24px",cursor:"default",backgroundColor:e.palette.background.paper,borderRadius:"16px"}));styled("span")(()=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0"}));styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"4px"}));var lC=(e,t,o)=>({start:{x:e*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:t?e*t:e*39,transition:{duration:.3,type:"tween",ease:"easeOut"},...o&&{boxShadow:"7px 0px 8px 0px #F2F2F2"}}}),sC=styled(Box)(()=>({display:"flex",gap:"4px",maxWidth:"440px",justifyContent:"space-between",height:"18px"}));var HS=e=>!e.startsWith("http://")&&!e.startsWith("https://"),Pi=e=>/^https?:\/\//i.test(e),pC=(e,t)=>{switch(t){case "website":return e;case "physical_store":case "call_center":return null;case "linkedin":case "instagram":case "twitter":case "social_media":return OS(e,t);case "ios":case "android":case "mobile_app":return _S(e,t);default:return e}},OS=(e,t)=>{let o=e.toLowerCase();return t==="linkedin"?o.includes("linkedin.com")||o.includes("linked.com")?e:Pi(e)?null:`https://linkedin.com/company/${e}`:t==="instagram"?o.includes("instagram.com")?e:Pi(e)?null:`https://instagram.com/${e}`:t==="twitter"?o.includes("twitter.com")||o.includes("x.com")?e:Pi(e)?null:`https://x.com/${e}`:null},_S=(e,t)=>e.toLowerCase().includes("apps.apple.com")&&t==="ios"?e:t==="android"?Pi(e)?e:`https://play.google.com/store/apps/details?id=${e}`:null,cC=e=>{!e||typeof e!="string"||window.open(HS(e)?`https://${e}`:e,"_blank","noopener,noreferrer");};function zS({channels:e,...t}){let o=e?.filter(r=>!!r.address)?.map((r,i)=>{let l=r.address,a=r.code?.replace(/_/g,""),s=i===e?.length-1,p$1=pC(r.address??"",r.code??"");return jsx(p,{title:l,children:jsx(ct,{order:i,variants:lC(i,0,s),sx:{width:"36px",cursor:p$1?"pointer":"default"},onClick:()=>{r?.address&&cC(p$1);},children:jsx(iC,{src:r.logo,alt:a})})},`${r}-${i}`)}),n=o?.length||0;return jsx(w,{...t,children:jsx(rC,{children:o?.length>0?jsx(aC,{layout:true,className:"sales-channels-container",whileHover:"animate",animate:"start",sourcesCount:n||0,variants:{animate:{width:(n||0)*38}},style:{zIndex:29},children:o}):null})})}var $S=zS;function KS({channels:e}){let t=useRef(null),[o,n]=useState(false),[r,i]=useState(null),l=!!r;useEffect(()=>{t.current&&n(t.current.scrollHeight>20);},[e]);let a=useMemo(()=>(e||[]).filter(s=>!!s.address),[e]);return jsxs(sC,{children:[jsx(Un,{sx:{display:"flex",flexWrap:"wrap",gap:o?"8px":"4px"},ref:t,children:a.map(s=>jsxs(b$1,{copyTrigger:"press",copyText:s.address,sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"367px","& div":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"367px"}},children:[s.name?.en,": ",s.address]},s.id))}),o&&jsx(Un,{onClick:s=>{i(s.currentTarget.parentElement);},sx:{height:"18px"},children:jsx(b$1,{sx:{minWidth:25,borderRadius:"24px",overflow:"hidden"},children:"..."})}),jsx(jS,{open:l,anchorEl:r,sx:{minWidth:r?.clientWidth},onClose:()=>{i(null);},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{style:{maxWidth:"unset",minWidth:r?.clientWidth,marginTop:"22px"}}},children:jsx(Un,{sx:{display:"flex",flexDirection:"column",gap:"4px",padding:"4px"},children:a.map(s=>jsxs(b$1,{copyTrigger:"press",copyText:s.address,children:[s.name?.en,": ",s.address]},s.id))})})]})}var qS=KS;var dC={SAVED_CARD:"Card Agreement",ORDER:"Order",SUBSCRIPTION:"Subscription",INSTALLMENT:"Installment"};function JS({type:e,count:t,sx:o,...n}){let{t:r}=useTranslation(),i=t?.toString();return jsxs(Un,{sx:{display:"flex",flexDirection:"row",gap:"4px"},children:[jsx(b$1,{copyTrigger:"press",copyText:e,unknownText:r("noPaymentAgreement"),sx:o,...n,children:e&&dC[e]}),i&&jsx(b$1,{copyTrigger:"press",copyText:i,sx:{minWidth:"38px"},...n,children:i})]})}var QS=JS;var fC={CYBERSOURCE:sm,MPGS:tm,NETCETERA:um,APPLEPAY:vm,TAP3DS:wm,FSS:Cm,BENEFIT:ym,QPAY:Km,POSTPAY:Jm$1,BENEFITPAY:xm,MEEZA:Em,STC_PAY:Mm,NGENIUS:Fm,KNET:Dm,PAYPAL:Im,FAWRY:Bm,TPG:Qm,DEEMA:Am,TPAY:Pm,"CAREEM PAY":zm,TABBY:Nm,OMANNET:Hm,NPG:Gm,SPG:Lm,TAMARA:Om};var gC=styled(Un)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"24px",gap:"8px",padding:"4px 8px",borderRadius:"24px",border:`1px solid ${e.palette.divider}`,backgroundColor:e.palette.background.paper})),xC=styled("img")(()=>({width:"100%",height:"100%",objectFit:"contain"}));function hC({provider:e,...t}){let o=fC[e];return o?jsx(gC,{children:jsx(xC,{src:o,alt:e})}):jsx(w,{...t,children:jsx(H,{children:e})})}var yC={CHARGE:Wk,AUTHORIZE:Ak,SAVE_TOKEN:_g$1},IC={CHARGE:"Charge",AUTHORIZE:"Authorization",SAVE_TOKEN:"Save Token"},bC={CHARGE:{backgroundColor:"#1F88D01A",color:"#1F88D0",border:"none"},AUTHORIZE:{backgroundColor:"#FFFFFF",color:"#1F88D0",border:"#1F88D01A"},SAVE_TOKEN:{backgroundColor:"#1F88D00D",color:"#1F88D0",border:"#1F88D01A"}};var TC=styled(Un,{shouldForwardProp:e=>!["purposeType"].includes(e)})(({purposeType:e})=>{let t=bC[e];return {display:"flex",alignItems:"center",justifyContent:"start",gap:"4px",minWidth:"86px",width:"100%",height:"24px",padding:"4px 8px",borderRadius:"24px",border:`1px solid ${t.border}`,backgroundColor:t.backgroundColor,color:t.color,fontSize:"12px",fontWeight:400}}),SC=styled("img")(()=>({width:"16px",height:"16px",objectFit:"contain",flexShrink:0})),wC=styled("span")(()=>({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}));function vC({purpose:e,...t}){let o=yC[e],n=IC[e];return jsxs(TC,{purposeType:e,...t,children:[jsx(SC,{src:o,alt:e}),jsx(wC,{children:n})]})}var EC=8,rw=16,ht=EC*2+rw,MC=100,DC=6,iw=ht+DC+MC,LC=styled$1(w)(()=>({position:"relative",overflow:"visible",width:ht,minWidth:ht,maxWidth:ht,display:"inline-flex",padding:0})),RC=styled$1(Un)(()=>({position:"relative",width:ht,height:24,flexShrink:0,overflow:"visible"})),kC=styled$1(Un,{shouldForwardProp:e=>e!=="hasLabel"})(({theme:e,hasLabel:t})=>({position:"absolute",top:0,left:0,width:ht,minWidth:ht,maxWidth:ht,height:24,display:"inline-flex",alignItems:"center",gap:DC,paddingInline:EC,borderRadius:"24px",border:`1px solid ${e.palette.divider}`,backgroundColor:e.palette.background.paper,boxSizing:"border-box",cursor:"pointer",overflow:"hidden",transition:e.transitions.create(["max-width","box-shadow"]),"& img":{flexShrink:0},...t&&{"&:hover":{width:"max-content",maxWidth:iw,zIndex:100,boxShadow:"0px 0px 16px 0px #00000021","& .link-cell-label":{maxWidth:MC,opacity:1}}}})),VC=styled$1("span")(({theme:e})=>({display:"inline-block",maxWidth:0,opacity:0,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",fontSize:12,lineHeight:"16px",color:e.palette.text.primary,transition:e.transitions.create(["max-width","opacity"],{duration:e.transitions.duration.shorter})}));function lw({url:e,label:t}){let o=l(),n=()=>{try{db(e),o.success("Copied!");}catch{o.error("Failed to copy");}};return e?jsx(LC,{children:jsx(RC,{children:jsxs(kC,{hasLabel:!!t,onClick:n,children:[jsx(d,{src:Kl,alt:"link"}),t&&jsx(VC,{className:"link-cell-label",children:t})]})})}):null}var sw=memo(lw);function EO({items:e}){let[t,o]=useState(null),n=!!t,r=useCallback(({quantity:a,currency:s,amount:p,name:c})=>`${a?`Qty ${a}`:""} ${c?`- ${c}`:""} ${s||p?"-":""} ${s||""} ${p||""}`,[]);if(!e||!e.length)return null;let[i,...l]=e;return jsxs(Un,{sx:{display:"flex",gap:"4px",alignItems:"center"},children:[jsx(b$1,{children:jsx(j,{noWrap:true,sx:{maxWidth:e.length>1?190:220,fontSize:11},children:r(i)})}),e.length>1&&jsx(Un,{onClick:a=>{o(a.currentTarget.parentElement);},sx:{height:"18px"},children:jsx(b$1,{sx:{minWidth:25,borderRadius:"24px",overflow:"hidden"},children:"..."})}),jsx(jS,{open:n,anchorEl:t,sx:{minWidth:t?.clientWidth},onClose:()=>{o(null);},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{style:{maxWidth:"unset",minWidth:t?.clientWidth,marginTop:"22px"}}},children:jsx(Un,{sx:{display:"flex",flexDirection:"column",gap:"4px",padding:"4px"},children:l?.map(a=>jsx(b$1,{copyTrigger:"press",copyText:r(a),children:r(a)},a.id))})})]})}var BC="ListHeader";var NC=styled(Box)(({theme:e})=>({backgroundColor:e.palette.background.default,paddingInline:e.spacing(4),paddingBottom:e.spacing(2),paddingTop:e.spacing(2),overflowX:"clip"})),WC=styled(Box)(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",gap:e.spacing(3),width:"100%",marginBottom:e.spacing(2.25),marginTop:e.spacing(2)})),FC=styled(j)(({theme:e})=>({fontSize:"1.75rem",fontWeight:e.v2.typography.fontWeightMedium,lineHeight:"120%"})),HC=styled(Box)(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",gap:e.spacing(3),width:"100%"})),OC=styled(Box)(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",gap:e.spacing(1)})),_C=styled(Box)(()=>({display:"flex",justifyContent:"flex-start",alignItems:"center",gap:"8px",flexShrink:0}));function Li({children:e,component:t="header",...o}){return jsx(NC,{component:t,...o,children:e})}function Ri({title:e,toolbar:t}){return jsxs(WC,{children:[jsx("span",{children:!!e&&jsx(FC,{children:e})}),t]})}function ki({status:e,activeFilter:t,beforeStatus:o}){let n=t?.visible??false;return jsxs(OC,{as:"aside",children:[o,jsx(a$3,{status:e?.value,availableStatuses:e?.options,onStatusChange:e?.onChange,isActiveFilterVisible:n,buttonSx:e?.buttonSx}),jsx(d$1,{value:t?.ids,visible:n,label:t?.label,dismissible:t?.dismissible,onDismiss:t?.onDismiss})]})}var wo=styled(Box)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",borderRadius:"4px",background:e.palette.common.white,padding:"8px",border:"1px solid",borderColor:e.palette.divider,gap:8,height:32,cursor:"pointer","&:hover":{border:"1px solid",borderColor:e.palette.info.dark,boxShadow:e.shadows[7]}})),Vi=styled(Box)(({theme:e})=>({background:e.palette.common.white,display:"flex",gap:e.spacing(1),alignItems:"center",color:e.palette.text.primary,fontSize:"11px",fontWeight:e.typography.fontWeightRegular,textTransform:"capitalize",position:"relative",transition:"0.5s",paddingRight:0,marginRight:0,"&:after":{content:'""',position:"absolute",left:-8,right:0,width:"100%",height:"100%",boxShadow:e.shadows[11],borderRadius:e.spacing(.5),paddingInlineStart:e.spacing(1),paddingTop:"9px",paddingBottom:"9px",paddingInlineEnd:"9px",zIndex:-1},"& > *:last-child":{marginRight:0,paddingRight:"6px"}})),Ao=styled(Box)(({theme:e})=>({background:e.palette.common.white,borderRadius:e.spacing(1),boxShadow:e.shadows[5],border:"1px solid",borderColor:e.palette.divider,zIndex:5,fontSize:"11px",width:192})),vo=styled(Box)(()=>({minWidth:160,position:"relative",marginRight:0,paddingRight:0})),Po=styled(Box,{shouldForwardProp:e=>e!=="addColumnViewEl"})(({theme:e})=>({padding:e.spacing(1),paddingInlineEnd:2,borderBottom:"1px solid",borderColor:e.palette.divider,display:"flex",alignItems:"center",height:32,cursor:"pointer",img:{height:12},".check-icon":{height:"auto",marginInlineEnd:e.spacing(1)},"&:hover":{color:e.palette.info.dark,fontWeight:e.typography.fontWeightBold},"&.add-column":{justifyContent:"space-between",paddingInlineEnd:e.spacing(1),position:"relative",border:"none",zIndex:5,borderBottom:"1px solid",borderColor:e.palette.divider,borderTopRightRadius:e.spacing(1),borderTopLeftRadius:e.spacing(1),"&:hover":{boxShadow:e.shadows[6]}}})),Eo=styled(Box)(()=>({width:15})),Pn=styled(Box)(()=>({width:16})),GC=styled(Box)(({theme:e})=>({display:"flex",flexDirection:"column",height:"calc(100% - 32px)",backgroundColor:e.palette.background.paper,position:"relative"})),YC=styled(Box)(()=>({flex:1,overflowY:"auto",paddingLeft:16,paddingRight:16,paddingBottom:64})),jC=styled(Box)(()=>({padding:"24px 0",display:"flex",justifyContent:"space-between",alignItems:"center"})),KC=styled(Box)(({theme:e})=>({border:"1px solid",borderColor:e.palette.divider,borderRadius:"8px",overflow:"hidden",display:"flex",flexDirection:"column",flex:1,minHeight:0})),qC=styled(Box)(({theme:e})=>({display:"flex",alignItems:"center",padding:"12px",borderBottom:"1px solid",borderColor:e.palette.divider,backgroundColor:e.palette.grey[50],cursor:"pointer","&:hover":{backgroundColor:e.palette.grey[100]}})),XC=styled(Box,{shouldForwardProp:e=>e!=="isHovered"&&e!=="isDate"})(({theme:e,isHovered:t,isDate:o})=>({display:"flex",alignItems:"center",padding:"12px",borderBottom:"1px solid",borderColor:e.palette.divider,backgroundColor:t?e.palette.action.hover:e.palette.background.paper,cursor:o?"default":"grab","&:hover":{backgroundColor:o?e.palette.background.paper:e.palette.action.hover},"&:last-child":{borderBottom:"none"}})),Ol=styled(Box)(()=>({width:20,height:20,marginRight:8,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0})),_l=styled(Box)(()=>({display:"flex",alignItems:"center",justifyContent:"center",padding:0,width:14,height:14,minWidth:14,minHeight:14,flexShrink:0})),ZC=styled(Box)(({theme:e})=>({position:"absolute",bottom:0,left:0,right:0,height:35,borderTop:"1px solid",borderColor:e.palette.divider,background:"#F6F8FACC",backdropFilter:"blur(24px)"})),JC=styled(Box)(({theme:e})=>({position:"absolute",bottom:12,right:16,padding:6,backgroundColor:e.palette.background.paper,border:"1px solid #9F9F9F29",borderRadius:"4px"})),Bi=styled(Paper)(()=>({paddingTop:4,paddingBottom:4,minWidth:180,boxShadow:"0 4px 12px rgba(0,0,0,0.15)",borderRadius:"8px"}));styled(Box)(()=>({display:"flex",alignItems:"center",padding:"8px 12px",cursor:"pointer"}));var QC=styled(Button)(({theme:e})=>({color:e.palette.error.main,textTransform:"none",fontSize:10,fontWeight:500,borderRadius:"4px",border:`1px solid ${e.palette.divider}`,paddingLeft:8,paddingRight:8,paddingTop:4,paddingBottom:4,"&:hover":{backgroundColor:"transparent"}})),eg=styled(Button)(({theme:e})=>({fontSize:9,fontWeight:600,borderRadius:4,paddingLeft:20,paddingRight:20,paddingTop:8,paddingBottom:8,height:28,textTransform:"none",backgroundColor:e.palette.info.dark,"&:hover":{backgroundColor:e.palette.info.dark},"&.Mui-disabled":{backgroundColor:e.palette.grey[300],color:e.palette.grey[500]}}));styled(TextField)(({theme:e})=>({"& .MuiFilledInput-root":{borderRadius:"8px",backgroundColor:e.palette.background.paper,border:"1px solid",borderColor:e.palette.divider,"&:hover":{backgroundColor:e.palette.background.paper},"&.Mui-focused":{backgroundColor:e.palette.background.paper},"&::before, &::after":{display:"none"}}}));var zl={display:"flex",alignItems:"center",justifyContent:"center",padding:0,width:14,height:14,minWidth:14,minHeight:14,flexShrink:0,"& .MuiSvgIcon-root":{width:16,height:16},"& img":{width:14,height:14}},tg=styled(motion.div)(({theme:e})=>({position:"fixed",display:"flex",flexDirection:"column",maxHeight:"calc(100vh - 46px)",backgroundColor:e.palette.background.paper,boxShadow:"0px 8px 32px rgba(0, 0, 0, 0.15)",borderRadius:12,overflow:"hidden",boxSizing:"border-box"})),og=styled(Box)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",paddingLeft:e.spacing(1.5),paddingRight:e.spacing(1.5),paddingTop:e.spacing(1),paddingBottom:e.spacing(1),cursor:"pointer","&:hover":{backgroundColor:e.palette.action.hover}})),ng={p:0,width:14,height:14,minWidth:14,minHeight:14,"& .MuiSvgIcon-root":{width:16,height:16}},rg=styled(Box)(()=>({minWidth:200,display:"flex",flexDirection:"column",maxHeight:"80vh",overflow:"hidden"})),ig=styled(Box)(()=>({flex:1,overflowY:"auto",paddingLeft:6,paddingRight:6,minHeight:0})),ag=styled(Box)(({theme:e})=>({display:"flex",justifyContent:"flex-end",gap:12,paddingTop:8,paddingBottom:8,paddingLeft:12,paddingRight:12,flexShrink:0,borderTop:"1px solid",borderColor:e.palette.divider})),lg={fontSize:11,fontWeight:400,textTransform:"none",color:"text.primary",minWidth:80,height:38,borderRadius:"8px",border:"1px solid",borderColor:"divider"},sg=e=>({fontSize:11,fontWeight:500,textTransform:"none",backgroundColor:"info.dark",minWidth:80,height:38,borderRadius:"8px",boxShadow:"none","&:hover":{backgroundColor:e.palette.info.dark}}),pg=styled("div",{shouldForwardProp:e=>e!=="sandboxMode"&&e!=="maximized"&&e!=="isDragging"})(({maximized:e,isDragging:t})=>({...!e&&{borderTopRightRadius:12,borderTopLeftRadius:12},...t&&{cursor:"move"},margin:0,position:"sticky",top:0,left:0,right:0,zIndex:1e3,background:"#eaeaea",backdropFilter:"blur(32px)"}));function Ul(e,t){let[o,n]=useState(null),[r,i]=useState(null),l=useCallback(()=>{n(null),i(null);},[]),a=useCallback((p,c)=>{n(p.currentTarget),i(c);},[]),s=useCallback(()=>{r&&l();},[r,l]);return useEffect(()=>{e||(l(),t?.());},[e,t,l]),{subMenuAnchorEl:o,openSubMenuName:r,handleSubMenuClose:l,handleSubMenuOpen:a,handleMenuScroll:s}}function Sw(e){let t=e;for(;t&&t!==document.body;){let n=window.getComputedStyle(t).overflowY;if((n==="auto"||n==="scroll")&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement;}return document.documentElement}function Gl(e){let t=useRef(false),o=useRef(null),n=useRef({x:0,y:0}),r=useRef(1),i=useRef(null),l=useRef(0),a=useRef(false),s=useCallback(()=>{o.current!==null&&(cancelAnimationFrame(o.current),o.current=null);},[]),p=useCallback((x,I)=>{a.current=true,window.dispatchEvent(new PointerEvent("pointermove",{bubbles:true,cancelable:true,pointerId:r.current,clientX:x,clientY:I+l.current,pointerType:"mouse",isPrimary:true})),a.current=false;},[]),c=useCallback(()=>{if(o.current!==null)return;let x=()=>{let I=i.current;if(!t.current||!I)return;let T=I.getBoundingClientRect(),{x:b,y:d}=n.current,g=d-T.top,y=T.bottom-d;if(g>0&&g<60){let S=(60-g)/60*15;I.scrollTop-=S,l.current-=S,p(b,d);}else if(y>0&&y<60){let S=(60-y)/60*15;I.scrollTop+=S,l.current+=S,p(b,d);}o.current=requestAnimationFrame(x);};o.current=requestAnimationFrame(x);},[p]),m=useCallback(x=>{a.current||(n.current={x:x.clientX,y:x.clientY},r.current=x.pointerId,t.current&&l.current!==0&&(x.stopImmediatePropagation(),p(x.clientX,x.clientY)));},[p]),f=useCallback(()=>{i.current=Sw(e.current),l.current=0,t.current=true,window.addEventListener("pointermove",m,{capture:true}),c();},[e,m,c]),C=useCallback(()=>{t.current=false,l.current=0,s(),window.removeEventListener("pointermove",m,{capture:true});},[m,s]);return useEffect(()=>()=>{t.current=false,s(),window.removeEventListener("pointermove",m,{capture:true});},[m,s]),{onDragStart:f,onDragEnd:C}}function jl({columns:e,setTableViews:t}){let o=useCallback(i=>{let l=i.map(a=>e.find(s=>s.name===a)).filter(a=>!!a);t?.(l);},[e,t]),n=useCallback(i=>{let l=e.map(a=>{if(a.name!==i)return a;let s=a.menuItems&&a.menuItems.length>0,p=!a.selected;if(!s)return {...a,selected:p};let c=a.menuItems?.map(m=>({...m,selected:p}));return {...a,selected:p,menuItems:c}});t?.(l);},[e,t]),r=useCallback((i,l)=>{let a=e.map(s=>{if(s.name!==i)return s;let p=s.menuItems?.map(m=>m.name===l?{...m,selected:!m.selected}:m),c=p?.some(m=>m.selected)??false;return {...s,menuItems:p,selected:c}});t?.(a);},[e,t]);return {reorderColumns:o,toggleColumnSelection:n,toggleSubmenuItem:r}}function ql({column:e,index:t,openSubMenuName:o,toggleColumnSelection:n,handleSubMenuOpen:r,handleSubMenuClose:i}){let l=e.menuItems&&e.menuItems.length>0,a=o===e.name,s=t===0,p=useMemo(()=>!!(e.selected&&e.menuItems?.some(C=>C.selected)&&!e.menuItems?.every(C=>C.selected)),[e.selected,e.menuItems]),c=useCallback(()=>{n(e.name);},[n,e.name]),m=useCallback(C=>{l&&r(C,e.name);},[l,r,e.name]),f=useCallback(()=>{l||i();},[l,i]);return {isIndeterminate:p,hasSubmenuItems:l,isSubmenuOpen:a,isFirstItem:s,handleColumnClick:c,handleMouseEnter:m,handleMouseLeave:f}}var W=(e="")=>e.toLowerCase()==="date",De=(e="")=>e.toLowerCase()==="index",Ni=(e,t="en")=>{let o=[];return e.forEach(n=>{n.columns.forEach(r=>{let i=r.name.find(a=>a.lang===t)?.text||r.name[0]?.text||r.code,l=r.fields?.length?r.fields.map(a=>({name:a.code,label:a.name?.find(s=>s.lang===t||s.lang==="")?.text||a.code,selected:a.default??false})):void 0;o.push({name:r.code,label:i,selected:W(r.code)?true:r.default??false,menuItems:l?.length?l:void 0});});}),o},Aw=(e,t)=>{if(!t?.length)return [];let o=e==="sheet"?"sheet":"advanced",n=t.find(r=>r.code.toLowerCase()===o);return n?Ni([n]):[]},Xl=(e,t,o="en")=>{let n=e.map((i,l)=>{let a=i.menuItems?.map(p=>({code:p.name,name:[{text:typeof p.label=="string"?p.label:p.name,lang:o||""}],default:p.selected??false})),s=typeof i.label=="string"?i.label:i.name;return {code:i.name,name:[{text:s,lang:o}],order:l+1,default:i.selected??false,...a?.length?{fields:a}:{}}});return {code:t==="sheet"?"Sheet":"Advanced",columns:n}},vw=e=>{let t=new Map;return e.forEach(o=>{o.layout.forEach(n=>{let r=t.get(n.code);if(r){let i=new Set(r.columns.map(l=>l.code));n.columns.forEach(l=>{i.has(l.code)||r.columns.push(l);});}else t.set(n.code,{...n,columns:[...n.columns]});});}),Array.from(t.values())};var Pw=(e,t,o=false)=>({label:e,id:`custom_${Date.now()}`,columns:t.map(n=>n.name),submenu:t,isCustom:true,default:o}),Ew=(e,t)=>e.map(o=>({...o,default:o.id===t})),Wi=e=>e.role??(e.default?"default":void 0),_t=e=>!!e.role||!!e.default,Le=e=>!_t(e),mg=e=>Le(e),Mn=e=>e.filter(mg).length,Zl=e=>e.filter(Le).length,Fi=(e,t="sheet",o="en")=>{let n=[],r=[],i;e.forEach(a=>{let s=t==="sheet"?"sheet":"advanced",p=a.layout.find(A=>A.code.toLowerCase()===s),c=p?Ni([p],o):[],m=a.id,f=xb$1,C=yb$2,x=c.some(A=>W(A.name))?c:[C,...c],I=x.findIndex(A=>W(A.name)),b=(I>0?[x[I],...x.filter(A=>!W(A.name))]:x).filter(A=>!De(A.name)),d=[f,...b],g=Wi(a),y=_t(a),S={id:m,label:a.name,role:g,isCustom:!y,selected:a.selected,default:!!a.default,columns:d.map(A=>A.name),submenu:d};y?(a.default&&!i&&(i=d),r.push(S)):n.push(S);});let l=r.find(a=>a.default)??r[0];return {customViews:n,defaultTemplates:r,defaultTemplateColumns:i,defaultTemplate:l}},Jl=(e,t="sheet",o="en")=>{let{customViews:n,defaultTemplates:r,defaultTemplate:i}=Fi(e,t,o),l=[...r,...n];return {customViews:n,defaultTemplates:r,defaultTemplate:i,allTemplates:l}},Hi=(e,t)=>{let o=[];Le(e)?o=e.submenu??[]:o=e.submenu?.length?e.submenu:t;let n=xb$1;if(!o.some(m=>W(m.name)))return [n,yb$2,...o];let i=o.findIndex(m=>W(m.name)),l=i>=0?o[i]:yb$2,a=o.filter(m=>!W(m.name)&&!De(m.name)),s=[l,...a],p=s.some(m=>De(m.name)),c=s.findIndex(m=>De(m.name));if(p&&c>0){let m=s[c],f=s.filter(C=>!De(C.name));return [m,...f]}return p&&c===0?s:[n,...s]},Mw=(e,t)=>Hi(e,t).length>0,Do=e=>e.filter(t=>!De(t.name));var Ie=e=>e.toLowerCase(),dg=e=>new Map(e.filter(t=>!W(t.name)).map(t=>[Ie(t.name),t])),ug=(e,t)=>e.some(o=>Ie(o)===Ie(t)),Ql=(e,t)=>({...e,selected:t.selected??false,menuItems:e.menuItems?.map(o=>{let n=t.menuItems?.find(r=>Ie(r.name)===Ie(o.name));return {...o,selected:n?.selected??false}})}),Dn=e=>{if(!e.menuItems?.length)return {checked:e.selected??false,indeterminate:false};let t=e.menuItems.filter(o=>o.selected).length;return {checked:t>0,indeterminate:t>0&&t<e.menuItems.length}},ts=(e,t)=>e.map(o=>{if(o.name!==t)return o;let n=!o.selected,r=o.menuItems?.map(i=>({...i,selected:n}));return {...o,selected:n,menuItems:r}}),Ln=(e,t,o)=>e.map(n=>{if(n.name!==t)return n;let r=n.menuItems?.map(l=>l.name===o?{...l,selected:!l.selected}:l),i=r?.some(l=>l.selected)??false;return {...n,menuItems:r,selected:i}}),os=(e,t)=>e.map(o=>{if(W(o.name))return o;let n=o.menuItems?.map(r=>({...r,selected:t}));return {...o,selected:t,menuItems:n}}),ns=e=>{let t=e.filter(o=>!W(o.name));return t.length===0?false:t.every(o=>o.menuItems?.length?o.menuItems.every(n=>n.selected):o.selected)},rs=(e,t)=>e.filter(r=>!W(r.name)).some(r=>r.menuItems?.length?r.menuItems.some(i=>i.selected):r.selected)&&!t,is=(e,t)=>e.trim().length>0&&e.length<=t,se=e=>e.map(t=>({...t,selected:t.selected??false,menuItems:t.menuItems?.map(o=>({...o,selected:o.selected??false}))})),as=(e,t)=>e.map(o=>{if(o.name!==t)return o;if(W(o.name))return {...o,selected:true};let n=!o.selected,r=o.menuItems?.map(i=>({...i,selected:n}));return {...o,selected:n,menuItems:r}}),ls=(e,t)=>e.map(o=>{if(W(o.name))return {...o,selected:true};let n=o.menuItems?.map(r=>({...r,selected:t}));return {...o,selected:t,menuItems:n}}),ss=e=>e.length===0?false:e.every(t=>t.menuItems?.length?t.menuItems.every(o=>o.selected):t.selected),ps=(e,t)=>e.length===0?false:e.some(n=>n.menuItems?.length?n.menuItems.some(r=>r.selected):n.selected)&&!t,es=e=>e.map(t=>({...t,selected:t.selected??false,menuItems:t.menuItems?.map(o=>({...o,selected:o.selected??false}))})),Rn=(e,t)=>{if(e.length!==t.length)return false;let o=es(e),n=es(t);for(let r=0;r<o.length;r++){let i=o[r],l=n[r];if(i.name!==l.name||i.selected!==l.selected)return false;if(i.menuItems&&l.menuItems){if(i.menuItems.length!==l.menuItems.length)return false;for(let a=0;a<i.menuItems.length;a++)if(i.menuItems[a].name!==l.menuItems[a].name||i.menuItems[a].selected!==l.menuItems[a].selected)return false}else if(i.menuItems||l.menuItems)return false}return true},Dw=e=>e.filter(t=>!W(t.name)).map(t=>({...t,selected:t.selected??false,menuItems:t.menuItems?.map(o=>({...o,selected:o.selected??false}))})),cs=(e,t)=>{let o=e.filter(i=>!W(i.name)).map(i=>i.name),n=dg(t),r=[];for(let i of o){let l=e.find(s=>Ie(s.name)===Ie(i)),a=n.get(Ie(i));a?r.push(l?Ql(a,l):{...a,selected:false,menuItems:a.menuItems?.map(s=>({...s,selected:false}))}):l&&r.push(l);}for(let[,i]of n)if(!ug(o,i.name)){let l=e.find(a=>Ie(a.name)===Ie(i.name));r.push(l?Ql(i,l):{...i,selected:false,menuItems:i.menuItems?.map(a=>({...a,selected:false}))});}return r},ms=e=>e.filter(t=>!W(t.name)).map(t=>({...t,selected:false,menuItems:t.menuItems?.map(o=>({...o,selected:false}))})),ds=(e,t)=>{let o=dg(e),n=t.filter(i=>!W(i.name)).map(i=>i.name),r=[];for(let i of n){let l=t.find(s=>Ie(s.name)===Ie(i)),a=o.get(Ie(i));a&&l?r.push(Ql(a,l)):a&&r.push({...a,selected:false,menuItems:a.menuItems?.map(s=>({...s,selected:false}))});}for(let[,i]of o)ug(n,i.name)||r.push({...i,selected:false,menuItems:i.menuItems?.map(l=>({...l,selected:false}))});return r};function fg(e,t,o="en"){if(!e?.layout?.length)return [];let n=Ya(t)?"sheet":"advanced",r=e.layout.find(a=>a.code?.toLowerCase()===n);if(!r?.columns?.length)return [];let i=r.columns.map(a=>{let s=a.name?.find(c=>c.lang===o)?.text||a.name?.[0]?.text||a.code,p=a.fields?.length?a.fields.map(c=>({name:c.code,label:c.name?.find(m=>m.lang===o||m.lang==="")?.text||c.code,selected:c.default??false})):void 0;return {name:a.code,label:s,selected:W(a.code)?true:a.default??false,...p&&p.length>0&&{menuItems:p}}});return i.some(a=>W(a.name))?i:[{name:yb$2.name,label:yb$2.label,selected:true},...i]}var Oi=e=>{let t=e?.order;if(t==null)return 999;let o=Number(t);return Number.isFinite(o)?o:999};function _i(e){return {...e,layout:e.layout?.map(t=>({...t,columns:[...t.columns??[]]}))??[]}}function Lw(e,t){let o=e.layout?.map(r=>({...r,columns:[...r.columns??[]].sort((i,l)=>Oi(i)-Oi(l))})),n=fg(e,t);return {id:e.id,label:e.name,layout:o,submenu:n,columns:n.map(r=>r.name),role:Wi(e),isCustom:Le(e),default:e.default}}var zi=(e,t)=>{if(!e)return [];let o=e;if(e.layout&&Array.isArray(e.layout)&&e.layout.length>0){let n=Xa$1(t)?"Advanced":"Sheet",r=e.layout.find(i=>{let l=i.code?.trim();return l===n||l?.toLowerCase()===n.toLowerCase()})||e.layout.find(i=>{let l=i.code?.trim()?.toLowerCase();return Xa$1(t)?l==="default"||l==="advanced":l==="sheet"||l==="sheets"});if(r&&r.columns&&r.columns.length>0)return r.columns.map(l=>{let s=!!l.fields?.length&&l.fields.some(c=>c.default??false),p=(l.default??false)||s;return {code:l.code,name:l.name&&l.name.length>0?l.name:[{text:l.code,lang:"en"}],selected:p,sort_order:Oi(l),fields:l.fields?.map(c=>({code:c.code.toLowerCase(),type:"single",parameters:[{parameter:c.code.toLowerCase(),code:c.code.toLowerCase(),selected:c.default??false}]}))||[{code:l.code.toLowerCase(),type:"single",parameters:[{parameter:l.code.toLowerCase(),code:l.code.toLowerCase(),selected:l.default??false}]}]}}).sort((l,a)=>(l.sort_order??999)-(a.sort_order??999))}return o.submenu&&Array.isArray(o.submenu)&&o.submenu.length>0?o.submenu.map((r,i)=>{let l=r.name.toLowerCase(),a;r.menuItems&&r.menuItems.length>0?a=r.menuItems.filter(m=>m.selected):a=[{name:l,label:r.label||r.name,selected:true}];let s=a.length>0?a.map(m=>({parameter:m.name.toLowerCase(),code:m.name.toLowerCase()})):[{parameter:l,code:l}],p=a.length>1?"combined":"single";return {code:r.name,name:[{text:r.label||r.name,lang:"en"}],selected:r.selected,sort_order:i+1,fields:[{code:l,type:p,parameters:s}]}}):[]},Rw=(e,t)=>{if(!e||!Array.isArray(e)||e.length===0)return [];let o=e?.find(n=>n.default)||e[0];return o?zi(o,t):[]};function us(e,t,o){let n=e.findIndex(t);if(n===-1)return e;let r=[...e];return r[n]=o,r}function fs(e,t){let o=t?.name??e?.name??"",n=t?.layout,r=Array.isArray(n)?n[0]:n??null,l=[...e?.layout??[]];if(r){let a=r.code?.toLowerCase(),s=l.findIndex(p=>p.code?.toLowerCase()===a);s>=0?l[s]=r:l.push(r);}return {name:o,layout:l}}var Cs=e=>{let t=e;return t?!!(t.closest('[role="checkbox"]')||t.closest('input[type="checkbox"]')||t.closest('[class*="CheckboxWrapper"]')):false};var Cg=e=>[...Ab[e]??Ab.default],kw=e=>Bb$2[e]??Bb$2.default,Vw=(e,t)=>({code:e,name:[{text:zb$1[e],lang:"en"}],selected:true,sort_order:t}),Bw=(e,t)=>e?.layout?.some(o=>Cg(t).includes(o.code?.toLowerCase()??""))??false,gs=(e,t,o)=>{let n=Bb$2[t],r=o?.layout?.find(l=>l.code?.toLowerCase()===n.toLowerCase()),i=r?{...r,columns:r.columns?.map(l=>({...l,name:l.name?.map(a=>({...a})),fields:l.fields?.map(a=>({...a,name:a.name?.map(s=>({...s}))}))}))??[]}:{code:n,columns:[]};return [e,i]};var $i=({tableMode:e,templates:t,lang:o="en",mainDefaultTemplate:n})=>useMemo(()=>{let{customViews:r,defaultTemplates:i,defaultTemplate:l,allTemplates:a}=Jl(t,e,o),p=(n?Fi([n],e,o).defaultTemplate:void 0)??l,c=p?.submenu?structuredClone(p.submenu):[],m=Mn(t);return {customViews:r,defaultTemplates:i,defaultTemplate:l,allTemplates:a,defaultColumns:c,customTemplateCount:m}},[t,e,o,n]);var Ui=({mode:e,onViewChange:t,onCreateCustomView:o,onEditCustomView:n,onDeleteCustomView:r,defaultColumns:i,defaultTemplate:l,allTemplates:a,customTemplateCount:s})=>{let[p,c]=useState(null),[m,f]=useState(false),[C,x]=useState(null),[I,T]=useState(false),[b,d]=useState(null),[g,y]=useState(null),[S,A]=useState(),[h,v]=useState(a.find(D=>D.selected)?.id??l?.id),P=useRef(a.find(D=>D.selected)?.id??l?.id),M=useCallback(D=>{let B=D.submenu?.filter(J=>J.selected)||[];return {...D,submenu:B,columns:B.map(J=>J.name)}},[]),E=useCallback(D=>{P.current=D?.id,t?.(D?M(D):void 0);},[t,M]),k=useMemo(()=>h?a.find(D=>D.id===h):l,[a,h,l]),N=useMemo(()=>se(k?.submenu||i),[k,i]),F=useMemo(()=>({id:h||l?.id||"default",label:k?.label||l?.label||"Default"}),[k,h,l?.id,l?.label]);useEffect(()=>{let D=a.find(he=>he.selected)?.id,B=l?.id,J=h?a.some(he=>he.id===h):false;if(!(h&&!J&&D!==h)){if(D&&D!==h){v(D);return}if(!h){v(D??B);return}J||v(D??B);}},[a,l?.id,h]),useEffect(()=>{!h||!k||k.id===h&&P.current!==h&&(P.current=h,t?.(M(k)));},[h,k,t,M]);let Z=useCallback(D=>{c(B=>B?null:D.currentTarget);},[]),fe=useCallback(()=>{c(null);},[]),ve=useCallback((D,B)=>{v(B?.id),E(B),fe();},[fe,E]),xe=useCallback((D=false,B,J,he)=>{s!=null&&s>=3||(x(null),T(D),d(B??null),y(J?.length?J:null),A(he),f(true),c(null));},[s]),_=useCallback(D=>{let B=a.find(J=>J.id===D.id)??D;x(B),T(true),d(null),y(B.submenu?.length?se(B.submenu):null),f(true);},[a]),Ye=useCallback(()=>{f(false),x(null),T(false),d(null),y(null),A(void 0);},[]);useEffect(()=>{if(!m||!C?.id)return;let D=a.find(B=>B.id===C.id);D&&(x(D),y(D.submenu?.length?se(D.submenu):null));},[m,C?.id,a]);let Ca=useCallback(async D=>{if(C){let B=C.id;await n?.(B,D),v(B);let J=a.find(he=>he.id===B)??C;E(J),fe();}else {let B=await o?.({...D,sourceTemplateId:S});if(B?.id){v(B.id);let J=a.find(he=>he.id===B.id);E(J??{id:B.id,label:B.name,isCustom:true,columns:D.selectedColumns.map(he=>he.name),submenu:D.selectedColumns});}}},[C,n,o,fe,a,E,S]),ga=useCallback(async D=>{let B=a.find(J=>J.id===D);await r?.(B?.id??D),h===(B?.id??D)&&v(l?.id);},[a,r,h,l]);return {anchorEl:p,isCreateDialogOpen:m,editingView:C,selectedViewInfo:F,shouldUseCurrentState:I,selectedView:k,currentViewColumns:N,initialColumnsForCreate:b,availableColumnsForCreate:g,handleViewButtonClick:Z,handleCloseViewDropdown:fe,handleSelectedViewInfo:ve,handleOpenCreateDialog:xe,handleOpenEditDialog:_,handleCloseCreateDialog:Ye,handleSaveView:Ca,handleDeleteView:ga}};var Lo=()=>{let[e,t]=useState(null),[o,n]=useState(null),r=useRef(null),i=useCallback((p,c)=>{r.current&&(clearTimeout(r.current),r.current=null),t(p),n(c);},[]),l=useCallback(()=>{r.current=setTimeout(()=>{t(null),n(null);},0);},[]),a=useCallback(()=>{r.current&&(clearTimeout(r.current),r.current=null);},[]),s=useCallback(()=>{r.current&&(clearTimeout(r.current),r.current=null),t(null),n(null);},[]);return {hoveredColumn:e,anchorEl:o,openSubmenu:i,closeSubmenu:l,cancelClose:a,forceClose:s}};var hg=()=>{let[e,t]=useState(null),[o,n]=useState(null),r=useRef(null),i=useCallback((s,p)=>{t(s),n(p);},[]),l=useCallback(()=>{t(null),n(null);},[]),a=useCallback(()=>{r.current&&(clearTimeout(r.current),r.current=null);},[]);return {hoveredNestedColumn:e,nestedSubmenuAnchorEl:o,openNestedSubmenu:i,closeNestedSubmenu:l,cancelNestedClose:a}};var bs=({open:e,availableColumns:t,defaultColumns:o,editingView:n,tableViews:r=[]})=>{let[i,l]=useState(()=>n?.label||""),[a,s]=useState([]),p=useRef(false),c=useRef([]),m=useRef(n?.label?.trim()||""),{hoveredColumn:f,anchorEl:C,openSubmenu:x,closeSubmenu:I,cancelClose:T}=Lo(),b=xb$1,d=yb$2;useEffect(()=>{if(!e){p.current=false;return}if(!p.current&&e)if(n){let F=n.submenu&&n.submenu.length>0?n.submenu:o,Z=t.length>0?t:F,ve=cs(F,Z).filter(Ye=>!De(Ye.name)&&!W(Ye.name)),xe=[b,d,...ve];s(xe),c.current=se(xe);let _=n.label?.trim()||"";m.current=_,l(_);}else {let F=t.length>0?t:r,fe=(r&&r.length>0?ds(F,r):ms(F)).filter(xe=>!De(xe.name)&&!W(xe.name)),ve=[b,d,...fe];s(ve),c.current=se(ve),m.current="",l("");}else if(e&&n){let F=n.label?.trim()||"";l(F);}p.current=e;},[e,n?.id,n?.label,n?.submenu,t,o,r,b,d]);let g=useMemo(()=>a.map(N=>N.name),[a]),y=useMemo(()=>ns(a),[a]),S=useMemo(()=>rs(a,y),[a,y]),A=useMemo(()=>is(i,20),[i]),h=useMemo(()=>{let N=i.trim()!==m.current,F=c.current.length>0&&!Rn(a,c.current);return N||F},[i,a]);return {templateName:i,setTemplateName:l,selectedColumns:a,columnNames:g,allSelected:y,someSelected:S,isNameValid:A,hasChanges:h,hoveredColumn:f,anchorEl:C,openSubmenu:x,closeSubmenu:I,cancelClose:T,handleReorder:N=>{let F=N.filter(Z=>!W(Z)).flatMap(Z=>a.find(fe=>fe.name===Z)??[]);s([b,d,...F]);},handleColumnToggle:N=>{s(F=>ts(F,N));},handleSubItemToggle:(N,F)=>{s(Z=>Ln(Z,N,F));},handleSelectAll:()=>{s(N=>os(N,!y));},handleResetToDefault:()=>{c.current.length>0&&s(se(c.current));}}};function Ss({templates:e,setTemplates:t,createTemplate:o,updateTemplate:n,deleteTemplate:r,tableMode:i,isTemplatesLoading:l,lang:a="en",mainDefaultTemplate:s}){let p=useMemo(()=>s??e.find(d=>d.default),[e,s]),c=e.find(d=>d.selected)?.id??p?.id,m=useCallback(d=>{t(g=>g.find(S=>S.selected)?.id===d?g:g.map(S=>({...S,selected:d?S.id===d:false})));},[t]),f=useCallback(async({name:d,layout:g,sourceTemplateId:y})=>{if(Mn(e)>=3)return;let S=e.find(P=>P.id===y)??e.find(P=>P.id===c)??p,A=gs(g,i,S),h=await o({name:d,layout:A}),v=_i(h);return t(P=>[...P.filter(E=>E.id!==v.id).map(E=>({...E,selected:false})),{...v,selected:true}]),{id:h.id,name:h.name??""}},[o,t,i,p,e,c]),C=useCallback(async d=>{await r(d),t(g=>g.filter(y=>y.id!==d)),m(c===d?p?.id:c);},[r,t,p,m]),x=useCallback(async(d,g)=>{let y=e.find(P=>P.id===d),{name:S,layout:A}=fs(y,g),h=await n(d,{name:S,layout:A}),v=_i(h);t(P=>us(P,M=>M.id===d,v)),m(v.id);},[e,n,t,m]),I=useMemo(()=>({templates:e,onCreateCustomView:f,onEditCustomView:x,onDeleteCustomView:C,isLoading:l,mainDefaultTemplate:s}),[e,f,x,C,l,s]),T=useCallback(d=>{if(!p){m(void 0);return}if(!d?.id){m(p.id);return}if(_t(d)){m(d.id);return}let g=e.find(y=>y.id===d.id);if(g){m(g.id);return}Le(d)&&m(d.id);},[e,p,m]),b=useMemo(()=>{let d=e.find(y=>c?y.id===c:false)??p;if(!d)return [];let g=zi(d,i);return g.length>0?g:[]},[i,e,c,p]);return {customViews:I,onViewChange:T,columnsView:b,selectedViewId:c}}function Uw({column:e,index:t,openSubMenuName:o,subMenuAnchorEl:n,toggleColumnSelection:r,toggleSubmenuItem:i,handleSubMenuOpen:l,handleSubMenuClose:a}){let{t:s}=useTranslation(),p=useTheme(),{isIndeterminate:c,hasSubmenuItems:m,isSubmenuOpen:f,isFirstItem:C,handleColumnClick:x,handleMouseEnter:I,handleMouseLeave:T}=ql({column:e,index:t,openSubMenuName:o,toggleColumnSelection:r,handleSubMenuOpen:l,handleSubMenuClose:a}),b=d=>d?s(d)??Xu(d):"";return jsxs(Un,{sx:{borderTop:`1px solid ${p.palette.divider}`,...C&&{borderTop:"none",height:33}},children:[jsxs(V,{isIndeterminate:c,isSelected:e.selected,onMouseEnter:I,onMouseLeave:T,onClick:x,children:[jsx(Un,{sx:{flex:1},children:b(e.label)}),m&&jsx("img",{src:xb,className:"arrow-icon",alt:"arrow"})]}),m&&jsx(R,{open:f,anchorEl:n,placement:"right-start",onMouseEnter:()=>{},onMouseLeave:a,children:e.menuItems?.map(d=>jsx(V,{isSelected:e.selected&&d.selected,onClick:()=>i(e.name,d.name),children:b(d.label)},d.name))})]},e.name)}var Tg=Uw;function Kw({open:e,onSelect:t,setTableViews:o,tableViews:n,anchorEl:r,onClose:i}){let{t:l}=useTranslation(),a=useMemo(()=>n||[],[n]),s=useMemo(()=>a.map(b=>b.name),[a]),{reorderColumns:p,toggleColumnSelection:c,toggleSubmenuItem:m}=jl({columns:a,setTableViews:o}),{subMenuAnchorEl:f,openSubMenuName:C,handleSubMenuClose:x,handleSubMenuOpen:I,handleMenuScroll:T}=Ul(e,i);return jsxs(vo,{"data-testid":"TableView_CustomViews",children:[jsxs(wo,{"data-testid":"TableView_CustomViews_Button",onClick:t,children:[jsx("div",{children:l("columns")}),jsx("img",{src:Eb,alt:"arrow",style:{...!!e&&{transform:"rotate(180deg)"}}})]}),jsxs(R,{open:e,anchorEl:r,"data-testid":"TableView_CustomViews_Popper",sx:{padding:0,marginTop:"8px",borderRadius:1},children:[e&&jsx(B,{onClick:i}),jsx(Ao,{component:"article","data-testid":"TableView_CustomViews_List",children:jsx(Reorder.Group,{as:"div",axis:"y",onReorder:p,values:s,onScroll:T,children:a.map((b,d)=>jsx(Tg,{column:b,index:d,openSubMenuName:C,subMenuAnchorEl:f,toggleColumnSelection:c,toggleSubmenuItem:m,handleSubMenuOpen:I,handleSubMenuClose:x},b.name))})})]})]})}var As=memo(Kw);function Jw({open:e,selectedViewInfo:t,setSelectedViewInfo:o,onSelect:n,onTableViewOptionClick:r,anchorEl:i}){let{t:l}=useTranslation();return jsxs(vo,{"data-testid":"TableView_DefaultViews",children:[jsxs(wo,{onClick:a=>{n(a);},children:[jsx("div",{children:t.label}),jsx("img",{src:Eb,alt:"arrow",style:{...!!e&&{transform:"rotate(180deg)"}}})]}),jsx(Xw,{open:e,anchorEl:i,placement:"bottom-start",children:jsxs(Ao,{children:[Eb$1.map(a=>jsxs(Po,{onClick:()=>{o(a),r?.(a);},children:[a.id===t.id?jsx("img",{className:"check-icon",src:Fb$1,alt:"arrow"}):jsx(Eo,{}),jsx("span",{children:a.label}),jsx(Pn,{})]},a.id)),jsxs(Po,{sx:{border:"none"},onClick:a=>{a.stopPropagation(),o(Db),r?.(Db);},children:[t.id===Db.id?jsx("img",{className:"check-icon",src:Fb$1,alt:"arrow"}):jsx(Eo,{}),jsx("span",{children:l("createCustomView")}),jsx(Pn,{})]})]})})]})}var vs=Ms.memo(Jw);function o0({onViewChange:e,setIsViewVisible:t,setTableViews:o,tableViews:n,resetTableViews:r,onTableViewOptionClick:i}){let[l,a]=useState(null),[s,p$1]=useState(null),[c,m]=useState(null),[f,C$1]=useState(Cb$2),{t:x}=useTranslation(),I=g=>{e?.(),a(g.currentTarget),t(true);},T=()=>{p$1(null),m(null);},b$1=()=>{a(null),t(false),C$1(Cb$2);},d$1=g=>{C$1(g),g.id!==Db.id&&r?.(g),T();};return l?jsx(t0,{onClickAway:T,children:jsxs(Vi,{"data-testid":"TableView",children:[f.id===Db.id&&jsx(As,{tableViews:n,setTableViews:o,anchorEl:c,open:!!c,onSelect:g=>{m(c?null:g.currentTarget),p$1(null);},onClose:()=>{m(null);}}),jsx(vs,{open:!!s,anchorEl:s,setSelectedViewInfo:g=>{d$1(g);},selectedViewInfo:f,onSelect:g=>{p$1(s?null:g.currentTarget),m(null);},onTableViewOptionClick:i}),jsx(wo,{sx:{width:32,justifyContent:"center"},onClick:b$1,children:jsx("img",{src:Gb$1,alt:"close"})})]})}):jsx(p,{title:x("tableView"),children:jsx(b,{variant:"secondary",size:"md",icon:jsx(d,{src:C,alt:"view",sx:{width:14,height:14}}),"data-testid":"TableView_no_anchorViewEl",onClick:I,"aria-label":x("tableView")})})}var Ps=memo(o0);var wg=({columns:e,allCurrentSelected:t,someCurrentSelected:o,onSelectAll:n,onReset:r,onColumnToggle:i,onNestedItemToggle:l,isModified:a=false})=>{let{hoveredNestedColumn:s,nestedSubmenuAnchorEl:p,openNestedSubmenu:c,closeNestedSubmenu:m,cancelNestedClose:f$1}=hg();return jsxs(Fragment,{children:[jsxs(og,{children:[jsx(Box,{sx:{display:"flex",alignItems:"center",gap:1},children:jsx(f,{checked:t,indeterminate:o,onChange:C=>{C.stopPropagation(),n();},onClick:C=>{C.stopPropagation();},sx:ng})}),jsx(Typography,{component:"button",disabled:!a,onClick:C=>{C.stopPropagation(),a&&r();},sx:{fontSize:11,fontWeight:500,color:"#1F88D0",background:"none",border:"none",cursor:a?"pointer":"default",padding:0,opacity:a?1:.5,pointerEvents:a?"auto":"none","&:hover":a?{textDecoration:"underline"}:void 0},children:"Reset"})]}),jsx(v,{}),jsx(ig,{onScroll:m,children:jsx(Box,{component:"ul",sx:{listStyle:"none",padding:0,margin:0},children:e.map((C,x)=>{let I=C.menuItems&&C.menuItems.length>0,{checked:T,indeterminate:b}=Dn(C),d=W(C.name);return jsxs(Box,{component:"li",sx:{listStyle:"none",margin:0,padding:0,position:"relative",zIndex:1,backgroundColor:"#fff",width:"100%"},children:[jsxs(Box,{sx:{position:"relative"},onMouseEnter:g=>I&&c(C.name,g.currentTarget),onMouseLeave:()=>I&&m(),children:[jsxs(Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},children:[jsx(V,{isSelected:I?T:C.selected,isIndeterminate:I?b:false,isDisabled:d,onClick:()=>{d||i(C.name);},sx:{flex:1,display:"flex",alignItems:"center"},children:jsx("span",{children:C.label||C.name})}),I&&jsx(Box,{sx:{display:"flex",alignItems:"center",pr:1,pointerEvents:"none"},children:jsx("img",{src:yb$1,alt:"arrow",style:{height:12}})})]}),I&&jsx(Popper,{open:s===C.name,anchorEl:p,placement:"right-start",sx:{zIndex:1e4},children:jsxs(Box,{onMouseEnter:f$1,onMouseLeave:m,sx:{display:"flex",pl:.5},children:[jsx(Box,{sx:{width:8,height:"100%",position:"absolute",left:-8,top:0,bottom:0}}),jsx(Bi,{children:C.menuItems?.map((g,y)=>jsxs(Ms.Fragment,{children:[jsx(V,{isSelected:g.selected,isDisabled:d,onClick:()=>{d||l(C.name,g.name);},children:g.label||g.name}),y<(C.menuItems?.length??0)-1&&jsx(v,{})]},g.name))})]})})]}),x<e.length-1&&jsx(v,{})]},C.name)})})})]})};function d0({open:e,selectedViewInfo:t,setSelectedViewInfo:o,anchorEl:n,onClose:r,onCreateCustomView:i,customViews:l=[],onEditCustomView:a,defaultColumns:s=[],defaultTemplate:p$1,defaultTemplates:c=[],customTemplateCount:m,isLoading:f}){let{t:C}=useTranslation(),{hoveredColumn:x,anchorEl:I,openSubmenu:T,closeSubmenu:b,cancelClose:d,forceClose:g}=Lo(),[y,S]=Ms.useState(null),[A,h]=Ms.useState(null),v$1=useMemo(()=>[...c.length?c:p$1?[p$1]:[],...l],[c,p$1,l]),P=useCallback(R=>R.submenu?.length?R.submenu:s,[s]),M=useCallback(R=>R?Hi(R,P(R)):s,[s,P]),E=useCallback(R=>M(R).length>0,[M]),k=useMemo(()=>x?v$1.find(R=>R.id===x):void 0,[x,v$1]),N=useMemo(()=>M(k),[k,M]),F=useMemo(()=>x?A?.length?A:N:[],[x,N,A]),Z=useMemo(()=>ss(F),[F]),fe=useMemo(()=>ps(F,Z),[F,Z]),ve=A!=null&&!Rn(A,N),xe=(m??Zl(l))>=3,_=f||xe,Ye=_||!ve;function Ca(R){g(),h(null);let te;if(_t(R)){let be=R.submenu?.length?R.submenu:s.length?s:p$1?.submenu??[];te={...R,submenu:se(be),columns:be.map(Be=>Be.name)};}else Le(R)&&(te=R);o(R,te);}function ga(R,te){let be=v$1.find(Be=>Be.id===R);h(se(M(be))),T(R,te);}function D(){h(null),b(),g();}function B(R){if(R.stopPropagation(),Ye)return;let te=se(N),be=A?.length?se(A):te;i?.(true,be,te,k?.id),h(null),g();}function J(R){A&&h(as(A,R));}function he(R,te){A&&h(Ln(A,R,te));}function wh(){A&&h(ls(A,!Z));}function Ah(){h(se(N));}return jsxs(vo,{"data-testid":"ViewsDropdown",children:[jsx(Xw,{open:e,anchorEl:n,placement:"bottom-start",children:jsxs(Ao,{onScroll:g,children:[jsx(m0,{sx:{paddingX:1.25,py:1.1,fontWeight:500,fontSize:11,color:"#8D8D94"},children:"View"}),jsx(v,{}),v$1.map(R=>{let te=Le(R),be=!te&&E(R);return jsxs(Po,{onMouseEnter:Be=>{te?S(R.id):be&&ga(R.id,Be.currentTarget);},onMouseLeave:()=>{te?S(null):be&&b();},onClick:()=>Ca(R),sx:{position:"relative",cursor:"pointer",pr:1.5},children:[R.id===t.id?jsx("img",{style:{width:15,height:15},src:Yj,alt:"check"}):jsx(Eo,{}),jsx("span",{style:{flex:1,fontSize:11},children:R.label}),te&&y===R.id&&jsx("img",{src:Ch$1,alt:"edit",style:{width:12,height:12,cursor:"pointer"},onClick:Be=>{Be.stopPropagation(),r?.(),a?.(R);}}),be&&jsx("img",{src:yb$1,alt:"arrow",style:{height:12}})]},R.id)}),jsx(p,{title:"Limit reached. Delete a view to create a new one.",placement:"left",disableHoverListener:!xe,children:jsxs(Po,{sx:{border:"none",opacity:_?.5:1,cursor:_?"not-allowed":"pointer"},onClick:R=>{if(R.stopPropagation(),_)return;let te=se(M(p$1)),be=te.map(Be=>({...Be,selected:false,menuItems:Be.menuItems?.map(vh=>({...vh,selected:false}))}));i?.(true,be,te,p$1?.id),g();},children:[jsx(Eo,{}),jsxs(Un,{sx:{display:"flex",alignItems:"center",gap:.5},children:[jsx("img",{src:hm,alt:"",style:{opacity:_?.5:1,width:10,height:10}}),jsx("span",{style:{color:_?"#999":"#1F88D0",fontSize:11,fontWeight:500},children:C("New Custom View")})]}),jsx(Pn,{})]})})]})}),x&&I&&F.length>0&&jsx(R,{open:!!I,anchorEl:I,placement:"auto-end",onMouseEnter:d,onMouseLeave:D,children:jsxs(rg,{children:[jsx(wg,{columns:Do(F),allCurrentSelected:Z,someCurrentSelected:fe,onSelectAll:wh,onReset:Ah,onColumnToggle:J,onNestedItemToggle:he,anchorEl:I,isModified:ve}),jsxs(ag,{children:[jsx(Ag,{variant:"text",onClick:D,sx:lg,children:"Cancel"}),jsx(p,{title:"Limit reached. Delete a view to create a new one.",placement:"top",disableHoverListener:!xe,children:jsx(Ag,{variant:"contained",onClick:B,disabled:Ye,sx:sg,children:"Create view"})})]})]})})]})}var Ds=Ms.memo(d0);var Eg=({selectedColumns:e,columnNames:t,allSelected:o,someSelected:n,hoveredColumn:r,anchorEl:i,onReorder:l,onColumnToggle:a,onSubItemToggle:s,onSelectAll:p,onResetToDefault:c,onSubmenuEnter:m,onSubmenuLeave:f$1,onCancelClose:C$1})=>{let x=useRef(null),{onDragStart:I,onDragEnd:T}=Gl(x),b=useCallback(d=>{if(Cs(d.target)){d.preventDefault();return}I();},[I]);return jsxs(KC,{children:[jsxs(qC,{children:[jsx(Ol,{children:jsx("img",{src:C,alt:"drag",style:{width:16,height:16,opacity:.5}})}),jsx(_l,{onClick:d=>{d.stopPropagation(),p();},children:jsx(f,{checked:o,indeterminate:n,size:"small",sx:zl,onChange:d=>{d.stopPropagation(),p();},onClick:d=>{d.stopPropagation();}})}),jsx(Typography,{onClick:d=>{d.stopPropagation(),p();},sx:{flex:1,fontSize:13,fontWeight:500,color:"text.primary",ml:.75,cursor:"pointer"},children:"Select All"}),jsx(Link,{component:"button",type:"button",onClick:d=>{d.stopPropagation(),c();},underline:"none",sx:{fontSize:13,fontWeight:500,cursor:"pointer",color:"common.blue"},children:"Reset to default"})]}),jsx(Box,{sx:{flex:1,minHeight:0,overflowX:"hidden",overflowY:"auto",position:"relative"},children:jsx(Reorder.Group,{ref:x,axis:"y",onReorder:l,values:t,style:{listStyle:"none",padding:0,margin:0},children:e.map(d=>{let g=W(d.name),y=d.menuItems&&d.menuItems.length>0,{checked:S,indeterminate:A}=Dn(d);return jsxs(Reorder.Item,{value:d.name,drag:g?false:"y",dragListener:!g,dragConstraints:x,dragElastic:{top:0,bottom:0,left:0,right:0},transition:{duration:0},whileDrag:{zIndex:9999,boxShadow:"0 4px 12px rgba(0,0,0,0.15)",scale:1},style:{listStyle:"none",margin:0,padding:0,position:"relative",zIndex:1,backgroundColor:"#fff",width:"100%",willChange:"transform"},onDragStart:b,onDragEnd:T,children:[jsxs(XC,{isHovered:r===d.name,isDate:g,onMouseEnter:h=>y&&m(d.name,h.currentTarget),onMouseLeave:()=>y&&f$1(),onClick:h=>{(h.target.closest('[role="checkbox"]')||h.target.closest('input[type="checkbox"]'))&&h.stopPropagation();},sx:{width:"100%",position:"relative"},children:[jsx(Ol,{children:jsx("img",{src:Hb$1,alt:"drag",draggable:false,style:{width:16,height:16,cursor:g?"default":"grab",pointerEvents:"none"}})}),jsx(_l,{onMouseDown:h=>{h.stopPropagation();},onPointerDown:h=>{h.stopPropagation();},children:jsx(f,{checked:S,indeterminate:A,onChange:h=>{h.stopPropagation(),a(d.name);},onClick:h=>{h.stopPropagation();},disabled:g,size:"small",sx:zl})}),jsx(Typography,{sx:{flex:1,fontSize:13,fontWeight:400,color:"text.primary",ml:1},children:d.label||d.name}),y&&jsx(Box,{sx:{display:"flex",alignItems:"center",ml:1,flexShrink:0},children:jsx("img",{src:xb,alt:"arrow",style:{width:12,height:12}})})]}),y&&jsx(Popper,{open:r===d.name,anchorEl:i,placement:"right-start",sx:{zIndex:1e4},modifiers:[{name:"offset",options:{offset:[0,0]}}],children:jsxs(Box,{onMouseEnter:C$1,onMouseLeave:f$1,sx:{display:"flex",pl:.5},children:[jsx(Box,{sx:{width:8,height:"100%",position:"absolute",left:-8,top:0,bottom:0}}),jsx(Bi,{children:d.menuItems?.map((h,v$1)=>jsxs(Ms.Fragment,{children:[jsx(V,{isSelected:h.selected,isDisabled:g,onClick:()=>{g||s(d.name,h.name);},sx:{fontSize:13},children:h.label||h.name}),v$1<(d.menuItems?.length??0)-1&&jsx(v,{})]},h.name))})]})})]},d.name)})})})]})};function I0({open:e,onClose:t,onCreate:o,availableColumns:n=[],defaultColumns:r=[],editingView:i$1,onDelete:l,tableViews:a=[],mode:s="sheet",stackOrder:p=1}){let{t:c$1}=useTranslation(),m=useDragControls(),[f,C]=useState(false),[x,I]=useState(false);useEffect(()=>{e||(C(false),I(false));},[e]),useEffect(()=>{if(!e)return;let _=Ye=>{Ye.key==="Escape"&&t();};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[e,t]);let{templateName:T,setTemplateName:b,selectedColumns:d,allSelected:g,someSelected:y,isNameValid:S,hasChanges:A,hoveredColumn:h$1,anchorEl:v,openSubmenu:P,closeSubmenu:M,cancelClose:E,handleReorder:k,handleColumnToggle:N,handleSubItemToggle:F,handleSelectAll:Z,handleResetToDefault:fe}=bs({open:e,availableColumns:n,defaultColumns:r,editingView:i$1,tableViews:a}),ve=async()=>{if(!(!S||!A||x||f)){I(true);try{let _=Xl(d,s);await o?.({name:T,selectedColumns:d,layout:_}),t();}catch{console.warn("Failed to create view");}finally{I(false);}}},xe=async()=>{if(!i$1||f||x)return;let _=i$1.id;C(true);try{await l?.(_),t();}catch{console.warn("Failed to delete view");}finally{C(false);}};return e?jsxs(tg,{role:"dialog","aria-modal":"true","data-testid":"CreateViewDialog",drag:true,dragListener:false,dragControls:m,dragMomentum:false,initial:false,style:{width:450,minWidth:0,maxWidth:"min(100vw - 16px, 450px)",height:600,left:`max(8px, calc(50% - ${450/2}px))`,top:`max(8px, calc(50% - ${600/2}px))`},animate:{zIndex:2+p},transition:{duration:.1},children:[jsx(pg,{id:"draggable-dialog-title",onPointerDown:_=>m.start(_),style:{cursor:"move",flexShrink:0},children:jsxs(b$4,{children:[jsx(h,{children:jsx(c,{onClick:t,onPointerDown:_=>_.stopPropagation()})}),jsx(j$1,{title:i$1?"Edit Custom View":c$1("createCustomView")||"Create Custom View"}),jsx(i,{})]})}),jsxs(GC,{children:[jsxs(YC,{onScroll:()=>{M();},children:[jsxs(jC,{children:[jsxs(Box,{children:[jsx(Typography,{sx:{fontSize:24,fontWeight:700,color:"#9F9F9F",lineHeight:"0.7"},children:"Custom"}),jsx(Typography,{sx:{fontSize:24,fontWeight:700,color:"#20232B",lineHeight:1.2},children:"View"})]}),i$1&&jsx(QC,{onClick:xe,disabled:f||x,children:f?jsxs(Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[jsx(CircularProgress,{size:14,color:"inherit"}),jsx("span",{children:"Deleting..."})]}):"Delete View"})]}),jsx(Box,{sx:{mb:3},children:jsx(b$5,{name:"custom-template-name",label:"Template Name",value:T,onChange:_=>b(_),inputProps:{maxLength:20,autoComplete:"off",readOnly:true,"data-form-type":"other",onFocus:_=>_.currentTarget.removeAttribute("readonly")},required:true})}),jsx(Eg,{selectedColumns:Do(d),columnNames:Do(d).map(_=>_.name),allSelected:g,someSelected:y,hoveredColumn:h$1,anchorEl:v,onReorder:k,onColumnToggle:N,onSubItemToggle:F,onSelectAll:Z,onResetToDefault:fe,onSubmenuEnter:P,onSubmenuLeave:M,onCancelClose:E})]}),jsx(ZC,{}),jsx(JC,{children:jsx(eg,{variant:"contained",onClick:ve,disabled:!S||!A||x||f,title:S?void 0:`Name is required. Current: "${T}"`,children:x?jsxs(Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[jsx(CircularProgress,{size:14,color:"inherit"}),jsx("span",{children:i$1?"Saving...":"Creating..."})]}):i$1?"Update View":"Create View"})})]})]}):null}var Ls=I0;function w0({onViewChange:e,templates:t,onCreateCustomView:o,onEditCustomView:n,onDeleteCustomView:r,tableMode:i="default",lang:l="en",isLoading:a,mainDefaultTemplate:s}){let{t:p$1}=useTranslation(),{defaultColumns:c,defaultTemplate:m,defaultTemplates:f,customViews:C$1,allTemplates:x,customTemplateCount:I}=$i({tableMode:i,templates:t,lang:l,mainDefaultTemplate:s}),{anchorEl:T,isCreateDialogOpen:b$1,editingView:d$1,selectedViewInfo:g,shouldUseCurrentState:y,currentViewColumns:S,initialColumnsForCreate:A,availableColumnsForCreate:h,handleViewButtonClick:v,handleCloseViewDropdown:P,handleSelectedViewInfo:M,handleOpenCreateDialog:E,handleOpenEditDialog:k,handleCloseCreateDialog:N,handleSaveView:F,handleDeleteView:Z}=Ui({mode:i,onViewChange:e,onCreateCustomView:o,onEditCustomView:n,onDeleteCustomView:r,defaultColumns:c,defaultTemplate:m,allTemplates:x,customTemplateCount:I});return jsxs(Fragment,{children:[jsx(t0,{onClickAway:P,children:jsxs(Vi,{sx:{width:"32px"},"data-testid":"ViewsMenu",children:[jsx(p,{title:p$1("tableView"),children:jsx(b,{variant:"secondary",size:"md",icon:jsx(d,{src:C,alt:"view",sx:{width:14,height:14}}),"data-testid":"ViewsMenu_button",onClick:v,"aria-label":p$1("tableView")})}),jsx(Ds,{open:!!T,anchorEl:T,onClose:P,setSelectedViewInfo:M,selectedViewInfo:g,onCreateCustomView:E,customViews:C$1,onEditCustomView:k,defaultColumns:c,defaultTemplate:m,defaultTemplates:f,customTemplateCount:I,isLoading:a})]})}),jsx(Ls,{open:b$1,onClose:N,availableColumns:h?.length?h:c,defaultColumns:c,onCreate:F,editingView:d$1,onDelete:Z,tableViews:y?A??S:void 0,mode:i})]})}var Vg=memo(w0);function Rs(e=[]){let[t,o]=useState(false),n=useMemo(()=>e.map(({code:r})=>r),[e]);return {isColumnPickerVisible:t,setIsColumnPickerVisible:o,timezoneCountryCodes:n}}function M0({tableMode:e,onToggle:t}){let o=Xa$1(e),n=Ya(e);return jsx(b,{variant:"secondary",size:"md",icon:jsx(d,{src:n?Mh:Lh,alt:`${e}-mode`,sx:{width:14,height:14}}),onClick:t,"aria-label":`${e}-mode`,sx:r=>o?{}:{borderColor:r.v2.palette.brand[500],boxShadow:"0px 0px 4px 0px rgba(31, 136, 208, 0.50)"}})}var Ng=memo(M0);function Nn({children:e,component:t="aside",...o}){return jsx(_C,{component:t,"data-testid":"ListHeaderToolbar",...o,children:e})}function Xi({display:e,timezone:t,calendar:o,views:n,search:r,slots:i,reportsVisible:l,lang:a}){let{isColumnPickerVisible:s,setIsColumnPickerVisible:p,timezoneCountryCodes:c}=Rs(t?.segmentCountries),m=e?.variant==="acceptance",f=n?.tableMode??"default",C=useMemo(()=>n?.onSheetToggle?jsx(Ng,{tableMode:f,onToggle:n.onSheetToggle}):null,[f,n?.onSheetToggle]);return jsxs(Nn,{children:[i?.leading&&!s&&i.leading,!s&&jsxs(Fragment,{children:[r?.onChange&&jsx(b$6,{onSearchChange:r.onChange,placeholder:r.placeholder,defaultValue:r.defaultValue}),i?.filter,C&&!m&&C,i?.calendar??(o&&t&&jsx(a$2,{defaultDate:o.date,onDateChange:x=>{let[I,T]=x;I&&T&&o.onDateChange([I,T]);},mode:o.mode,onCalendarModeSwitch:o.onModeChange,maxDateRange:o.maxRange??31,groupBy:o.groupBy,onCalendarGroupChange:o.onGroupByChange,browserTimezone:t.browserTimezone,defaultCountryTimezone:t.defaultCountryTimezone,timezone:t.timezone,onChangeTimezone:t.onChangeTimezone,timezoneCountriesCodes:c})),l&&i?.reports,C&&m&&C]}),n?.onViewChange&&(n.templates?jsx(Vg,{onViewChange:n.onViewChange,tableMode:f,lang:a,...n.templates}):jsx(Ps,{onViewChange:n.onViewChange,setIsViewVisible:p,tableViews:n.columns,setTableViews:n.setColumns,resetTableViews:n.onPresetReset,onTableViewOptionClick:n.onPresetOptionClick})),i?.trailing&&!s&&i.trailing]})}function N0({title:e,display:t,lang:o,reportsVisible:n,timezone:r,calendar:i,status:l,activeFilter:a,views:s,search:p,slots:c,children:m}){let f=Bc(useId(),"list-header"),C=useMemo(()=>jsx(Xi,{display:t,timezone:r,calendar:i,views:s,search:p,slots:c,reportsVisible:n,lang:o}),[t,r,i,s,p,c,n,o]);return jsxs(Li,{id:f,"data-testid":BC,children:[t?.maximized&&jsx(Ri,{title:e,toolbar:C}),jsxs(HC,{as:"section",children:[jsx(ki,{status:l,activeFilter:a,beforeStatus:c?.beforeStatus}),!t?.maximized&&C]}),m]})}var Hg=memo(N0);var _g=styled$1(Un,{shouldForwardProp:e=>e!=="isActive"})(({theme:e,isActive:t})=>({borderRadius:"4px",border:`1px solid ${e.palette.divider}`,minHeight:32,minWidth:30,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",backgroundColor:e.palette.common.white,":hover":{opacity:.7},...t&&{boxShadow:`0px 0px 4px 0px ${e.palette.info.dark}80`,border:`1px solid ${e.palette.info.dark}`,backgroundColor:`${e.palette.info.dark}0D`,gap:"6px",padding:"0 8px"}})),zg=styled$1(Un)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",minWidth:14,height:14,borderRadius:"50%",background:e.palette.background.gradient.shadedBlue,color:e.palette.common.white,fontSize:"8px",fontWeight:700,lineHeight:"14px",flexShrink:0})),$g=styled$1(Un)(()=>({display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",padding:"2px","& img":{width:14,height:14}})),Ug=styled$1(W0)(({theme:e})=>({marginTop:e.spacing(1),marginBottom:e.spacing(1),minWidth:193,"& .MuiPaper-root":{borderRadius:e.spacing(.5),"&>.MuiList-root":{padding:0}}})),Gg=styled$1(j)(({theme:e})=>{let{grey:t}=e.v2.palette;return {fontWeight:e.v2.typography.fontWeightMedium,fontSize:"0.6875rem",color:t[500],paddingInlineStart:e.v2.spacing(16),paddingTop:e.v2.spacing(8),paddingBottom:e.v2.spacing(8),paddingInlineEnd:e.v2.spacing(8),borderBottom:`1px solid ${t[100]}`,display:"block"}}),Vs=styled$1(Un)(({theme:e})=>({padding:"8px 16px",display:"flex",gap:"8px",justifyContent:"flex-end",backgroundColor:e.palette.common.white,borderTop:`1px solid ${e.palette.divider}`})),Bs=styled$1(Ag)(({theme:e})=>({textTransform:"capitalize",minWidth:"auto",width:70,borderRadius:"4px",border:`1px solid ${e.palette.info.dark}`,backgroundColor:e.palette.info.dark,fontWeight:700,fontSize:"11px",color:e.palette.common.white,"&:hover":{backgroundColor:e.palette.info.dark},"&.Mui-disabled":{color:"#fff !important",opacity:.5}})),Ns=styled$1(Ag)(({theme:e})=>({textTransform:"capitalize",minWidth:"auto",width:70,borderRadius:"4px",border:`1px solid ${e.palette.divider}`,backgroundColor:e.palette.common.white,fontWeight:500,fontSize:"11px",color:e.palette.text.primary,"&:hover":{background:"transparent"}}));var Ws=createContext(null);function O0(){let e=useContext(Ws);if(!e)throw new Error("useFilterDropdown must be used inside a FilterDropdown");return e}function jg({onConfirm:e,onCancel:t,isOkayButDisabled:o,children:n,isDisabled:r,icon:i,title:l,menuStyle:a,hideTitle:s=false,hideFooter:p=false,activeFiltersCount:c,onClearFilters:m,renderButton:f,onOpenChange:C,menuProps:x,...I}){let T=Bc(useId(),"filter-dropdown"),[b,d]=useState(null),g=!!b,{t:y}=useTranslation(),S=()=>{d(null),C?.(false);},A=E=>{if(!r){if(!g){d(E.currentTarget),C?.(true);return}S();}},h=()=>{g&&(t?.(),S());},v=()=>{e?.(),S();},P=typeof c=="number"&&c>0,M=E=>{E.stopPropagation(),m?.();};return jsx(Ws.Provider,{value:{onConfirm:v,onCancel:h,onClose:S},children:jsx(t0,{onClickAway:h,children:jsxs(Un,{id:T,"data-testid":"FilterDropdown",...I,children:[jsx(_g,{className:"filter-button",isActive:g||P,onClick:A,sx:{...r&&{pointerEvents:"none",opacity:.5,...I.sx}},children:f??jsxs(Fragment,{children:[jsx(Un,{component:"img",src:i??ak,alt:"filter"}),P&&jsxs(Fragment,{children:[jsx(zg,{children:c}),jsx($g,{onClick:M,"aria-label":"clear filters",children:jsx(Un,{component:"img",src:Gb$1,alt:"clear"})})]})]})}),jsxs(Ug,{anchorEl:b,open:g,onClose:h,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{marginTop:"8px",marginBottom:"8px",width:193,...a},...x,children:[!s&&jsx(Gg,{component:"span",children:l??y("filterBy")}),n,!p&&jsxs(Vs,{children:[jsx(Ns,{onClick:h,children:y("cancel")}),jsx(Bs,{disabled:o,onClick:v,children:y("okay")})]})]}),g&&jsx(B,{onClick:S})]})})})}var Kg=styled$1(V)(()=>({padding:"12px 16px",border:"none !important","&:hover":{boxShadow:"0px 0px 16px 0px #00000021"}})),qg=styled$1(Un)(()=>({display:"flex",flexDirection:"column",gap:"2px"})),Xg=styled$1(Un)(({theme:e})=>({color:alpha(e.palette.text.primary,.5),fontSize:"9px"})),Zg=styled$1(Un)(()=>({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"178px"}));function _s({brand:e,merchantsIds:t,onChangeMerchant:o,atLeastOneMerchantSelected:n=false,showSearchInput:r=false,anchorEl:i}){let[l,a]=useState(""),s=!!i,p=useCallback(b=>t.includes(b),[t]),c=(b,d)=>{if(b.stopPropagation(),p(d)){o?.(t.filter(y=>y!==d));return}let g=[...new Set([...t,d])];o?.(g);},m=b=>t.length===1&&t[0]===b&&n,f=b=>{a(b);},C=()=>{a("");},x=useMemo(()=>e.merchants??[],[e.merchants]),I=useMemo(()=>{if(!l?.trim())return x;let b=l.trim().toLowerCase();return x?.filter(d=>(d?.display_name??"").toLowerCase().includes(b)||(d?.legacy_id??"").toLowerCase().includes(b))},[l,x]),T=useMemo(()=>r?I:x,[I,x,r]);return jsxs(R,{open:s,anchorEl:i,placement:"right-start",children:[r&&x.length>1&&jsx(Un,{sx:{p:"8px"},children:jsx(b$3,{fullWidth:true,placeholder:"Merchants",name:"merchants",value:l,onChange:b=>f(b.target.value),onClear:C})}),T?.map(b=>jsx(Kg,{isDisabled:m(b.legacy_id),isSelected:p(b.legacy_id),onClick:d=>{m(b.legacy_id)||c(d,b.legacy_id);},sx:{maxHeight:36,minHeight:36},children:jsxs(qg,{children:[jsx(Zg,{component:"span",children:b.display_name}),jsx(Xg,{component:"span",children:b.legacy_id})]})},b?.legacy_id))]})}var Qi=_s;var Qg=styled$1(Un)(()=>({display:"flex",gap:"4px",alignItems:"center",flex:1,marginInlineEnd:"8px"}));function Us({brand:e,merchantsIds:t,isDisabled:o,atLeastOneMerchantSelected:n=false,showSearchInput:r=false,renderBrandLogo:i,onChangeMerchant:l}){let[a,s]=useState(null),p=!!a,c=T=>{s(T.currentTarget);},m=()=>{s(null);},f=useMemo(()=>e.merchants?.filter(T=>t.includes(T.legacy_id)),[t,e.merchants]),C=useMemo(()=>f?.length===e.merchants?.length,[f?.length,e.merchants?.length]),x=useMemo(()=>!C&&f.length>0,[C,f]),I=T=>{if(T.stopPropagation(),C){l?.(t.filter(b=>!e.merchants.some(({legacy_id:d})=>b===d)));return}if(x){let b=[...new Set([...t,...f.map(({legacy_id:d})=>d)])];l?.(b);return}l?.([...t,...e.merchants.map(({legacy_id:b})=>b)]);};return jsxs(V,{isSelected:C,isIndeterminate:x,onMouseEnter:c,onMouseLeave:m,onClick:T=>{o||I(T);},isDisabled:o,sx:{maxHeight:35,minHeight:35,...p&&{boxShadow:"0px 0px 16px 0px #00000021"}},children:[jsxs(Qg,{children:[i?.(e.logo),jsx(j,{sx:{fontSize:"11px"},children:cc$1(e.name)})]}),e.merchants?.length>0&&jsx("img",{src:xb,alt:"arrow",style:{height:12}}),jsx(Qi,{anchorEl:a,brand:e,merchantsIds:t,onChangeMerchant:l,atLeastOneMerchantSelected:n,showSearchInput:r})]})}var tx=Us;function Gs({brands:e,isLoading:t,onFilterChange:o,merchantsIds:n=[],atLeastOneMerchantSelected:r=false,showSearchInput:i=false,hideCheckbox:l=false,renderBrandLogo:a}){let[s,p]=useState(null),[c,m]=useState(""),f=!!s,{t:C}=useTranslation(),x=P=>{p(P.currentTarget);},I=()=>{p(null);},T=useMemo(()=>e.length?e.every(P=>P.merchants?.every(({legacy_id:M})=>n.includes(M))):false,[n,e,l]),b=useMemo(()=>!T&&n.length>0,[n,T]),d=useMemo(()=>e.filter(P=>P.merchants?.some(M=>n?.includes(M.legacy_id))).length,[e,n]),g=()=>{if(T&&!r){o?.([]);return}let P=e.flatMap(M=>M.merchants?.map(({legacy_id:E})=>E));o?.(P);},y=t||!e?.length,S=P=>{m(P);},A=()=>{m("");},h=useMemo(()=>{if(!c.trim())return e;let P=c.trim().toLowerCase();return e.filter(M=>cc$1(M.name)?.toLowerCase()?.includes(P)||M.merchants?.some(E=>E.legacy_id?.toLowerCase().includes(P)))},[c,e]),v=useMemo(()=>i?h:e,[e,h,i]);return jsxs(V,{isDisabled:y,isSelected:T,startAdornment:l?null:void 0,isIndeterminate:b,sx:{maxHeight:36,minHeight:36,padding:"12px 8px 12px 16px",...f&&{boxShadow:"0px 0px 16px 0px #00000021"},...y&&{pointerEvents:"none",opacity:.5,cursor:"default"}},onMouseEnter:x,onMouseLeave:I,onClick:g,children:[jsx(j,{sx:{fontSize:"11px",flex:1},children:C("merchant")}),e.length>0&&jsx("img",{src:xb,alt:"arrow",style:{height:12}}),e?.length===1?jsx(Qi,{anchorEl:s,brand:e[0],merchantsIds:n,onChangeMerchant:o,atLeastOneMerchantSelected:r,showSearchInput:i}):jsxs(R,{open:f,anchorEl:s,placement:"right-start",children:[i&&e.length>1&&jsx(Un,{sx:{p:"8px"},children:jsx(b$3,{id:"merchants-search-input",fullWidth:true,placeholder:"Brands",name:"brands",value:c,onChange:P=>S(P.target.value),onClear:A})}),v?.map(P=>jsx(tx,{isDisabled:d===1&&r,brand:P,merchantsIds:n,onChangeMerchant:o,atLeastOneMerchantSelected:r,showSearchInput:i,renderBrandLogo:a},P.id))]})]})}var rx=styled$1(Un)(()=>({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"164px"}));function a1({retailersIds:e=[],isLoading:t,retailers:o=[],onFilterChange:n,atLeastOneRetailerSelected:r=false,showSearchInput:i=false,hideCheckbox:l=false}){let[a,s]=useState(null),p=!!a,{t:c,i18n:m}=useTranslation(),[f,C]=useState(""),x=E=>{s(E.currentTarget);},I=()=>{s(null);},T=useCallback(E=>e?.includes(E),[e]),b=useMemo(()=>o.length?o.every(E=>T(E.id)):false,[o,T,l]),d=useMemo(()=>!b&&e.length>0,[e,b]),g=()=>{if(b&&!r){n?.([]);return}n?.(o.map(E=>E.id));},y=E=>e.length===1&&e[0]===E&&r,S=(E,k)=>{if(E.stopPropagation(),y(k))return;if(T(k)){n?.(e.filter(F=>F!==k));return}let N=[...new Set([...e,k])];n?.(N);},A=t||!o?.length,h=E=>{C(E);},v=()=>{C("");},P=useMemo(()=>f?.trim()?o?.filter(E=>(E?.brand?.name?.[m.language]??E?.brand?.name?.en??"").toLowerCase().includes(f.trim().toLowerCase())):o,[f,o,m.language]),M=useMemo(()=>i?P:o,[P,o,i]);return jsxs(V,{isDisabled:A,isSelected:b,startAdornment:l?null:void 0,isIndeterminate:d,sx:{maxHeight:35,minHeight:35,padding:"12px 8px 12px 16px",...p&&{boxShadow:"0px 0px 16px 0px #00000021"},...A&&{opacity:.5,pointerEvents:"none",cursor:"default"}},onMouseEnter:x,onMouseLeave:I,onClick:g,children:[jsx(j,{sx:{fontSize:"11px",flex:1},children:c("retailers")}),o?.length>0&&jsx("img",{src:xb,alt:"arrow",style:{height:12}}),jsxs(R,{open:p,anchorEl:a,placement:"right-start",sx:{height:300,width:200,overflow:"auto"},children:[i&&jsx(Un,{sx:{p:"8px"},children:jsx(b$3,{id:"retailers-search-field",fullWidth:true,placeholder:"Retailers",name:"retailers",value:f,onChange:E=>h(E.target.value),onClear:v})}),M?.map((E,k)=>jsx(V,{isSelected:T(E.id),isDisabled:t||y(E.id),onClick:N=>{S(N,E.id);},sx:{maxHeight:35,minHeight:35},children:jsx(rx,{children:E?.brand?.name?.[m.language]??E?.brand?.name?.en})},`key-${E?.id}-${k}`))]})]})}var lx=memo(a1);function m1({countriesIds:e=[],isLoading:t,countries:o=[],onFilterChange:n,atLeastOneCountrySelected:r=false,hideCheckbox:i=false}){let[l,a]=useState(null),s=!!l,{t:p}=useTranslation(),c=g=>{s||a(g.currentTarget);},m=()=>{s&&a(null);},f=useCallback(g=>e?.includes(g),[e]),C=useMemo(()=>o.length?o.every(g=>f(g)):false,[o,f]),x=useMemo(()=>!C&&e.length>0,[e,C]),I=()=>{if(!r){if(C){n?.([]);return}n?.(o);}},T=g=>e.length===1&&e[0]===g&&r,b=(g,y)=>{if(g.stopPropagation(),T(y))return;if(f(y)){n?.(e.filter(A=>A!==y));return}let S=[...new Set([...e,y])];n?.(S);},d=t||o?.length<=0||r;return jsxs(V,{isDisabled:d,isSelected:C,startAdornment:i?null:void 0,isIndeterminate:x,sx:{maxHeight:35,minHeight:35,padding:"12px 8px 12px 16px",...s&&{boxShadow:"0px 0px 16px 0px #00000021"},...!o?.length&&{opacity:.5,pointerEvents:"none"}},onMouseEnter:c,onMouseLeave:m,onClick:I,children:[jsx(j,{sx:{fontSize:"11px",flex:1},children:p("walletCountry")}),o?.length>0&&jsx("img",{src:xb,alt:"arrow",style:{height:12}}),jsx(R,{open:s,anchorEl:l,placement:"right-start",sx:{width:200,overflow:"auto"},children:o?.map((g,y)=>jsxs(V,{isSelected:f(g),isDisabled:t||T(g),onClick:S=>{b(S,g);},sx:{maxHeight:35,minHeight:35},children:[jsx(b$2,{countryCode:g}),jsx(j,{sx:{fontSize:"11px !important",fontWeight:"500 !important"},children:Na(g)})]},`key-${g}-${y}`))})]})}var cx=memo(m1);function g1({currenciesIds:e=[],isLoading:t,currencies:o=[],onFilterChange:n,atLeastOneCurrencySelected:r=false,hideCheckbox:i=false}){let[l,a]=useState(null),s=!!l,{t:p}=useTranslation(),c=g=>{s||a(g.currentTarget);},m=()=>{s&&a(null);},f=useCallback(g=>e?.includes(g),[e]),C=useMemo(()=>o.length?o.every(g=>f(g)):false,[o,f]),x=useMemo(()=>!C&&e.length>0,[e,C]),I=()=>{if(!r){if(C){n?.([]);return}n?.(o);}},T=g=>e.length===1&&e[0]===g&&r,b=(g,y)=>{if(g.stopPropagation(),T(y))return;if(f(y)){n?.(e.filter(A=>A!==y));return}let S=[...new Set([...e,y])];n?.(S);},d=t||o?.length<=0||r;return jsxs(V,{isDisabled:d,isSelected:C,startAdornment:i?null:void 0,isIndeterminate:x,sx:{maxHeight:35,minHeight:35,padding:"12px 8px 12px 16px",...s&&{boxShadow:"0px 0px 16px 0px #00000021"},...!o?.length&&{opacity:.5,pointerEvents:"none"}},onMouseEnter:c,onMouseLeave:m,onClick:I,children:[jsx(j,{sx:{fontSize:"11px",flex:1},children:p("currency")}),o?.length>0&&jsx("img",{src:xb,alt:"arrow",style:{height:12}}),jsx(R,{open:s,anchorEl:l,placement:"right-start",sx:{width:200,overflow:"auto"},children:o?.map((g,y)=>po[g]?.country?jsxs(V,{isSelected:f(g),isDisabled:t||T(g),onClick:A=>{b(A,g);},sx:{maxHeight:35,minHeight:35},children:[jsx(b$2,{countryCode:po[g].country})," ",jsx(j,{sx:{fontSize:"11px !important",fontWeight:"500 !important"},children:g})]},`key-${g}-${y}`):null)})]})}var ux=memo(g1);var x1=(r=>(r.BRAND="BRAND",r.COUNTRY="COUNTRY",r.ENTITY="ENTITY",r.MERCHANT="MERCHANT",r))(x1||{});var h1="/",$n=5,fx=(...e)=>e.join(h1),Ys=e=>[e.label,e.id],Cx=(e,t)=>{if(e.levelKey==="MERCHANT")return e.id.toLowerCase().includes(t)?e:null;let o=(e.children??[]).map(i=>Cx(i,t)).filter(i=>i!==null);if(!o.length)return null;let{searchProps:n,...r}=e;return {...r,children:o,...o.length>=$n&&{searchProps:n}}},gx=(e,t,o)=>{let n=e.map(r=>{let i=r.entities??[],a=Array.from(new Set(i.map(s=>s.country).filter(Boolean))).map(s=>{let c=i.filter(m=>m.country===s).map(m=>{let C=(m.merchants??[]).map(x=>({id:x.legacy_id,label:x.display_name,levelKey:"MERCHANT",status:t.includes(x.legacy_id)?"CHECKED":"UNCHECKED",hintText:x.legacy_id}));return {id:fx(r.id,s,m.id),label:cc$1(m.legal_name,o)??m.id,levelKey:"ENTITY",children:C,header:"Merchants",...C.length>=$n&&{searchProps:{getValues:Ys}}}});return {id:fx(r.id,s),label:Na(s)??s,levelKey:"COUNTRY",children:c,header:"Entities",iconComponent:jsx(b$2,{countryCode:s,width:14}),...c.length>=$n&&{searchProps:{getValues:Ys}}}});return {id:r.id,label:cc$1(r.name,o)??r.id,levelKey:"BRAND",children:a,header:"Countries",icon:{fileId:r.logo??""},...a.length>=$n&&{searchProps:{getValues:Ys}}}});return {levelKey:"BRAND",children:n,header:"Brands",...n.length>=$n&&{searchProps:{filterItem:(r,i)=>(typeof r.label=="string"?r.label.toLowerCase():"").includes(i)?r:Cx(r,i)}}}};var w1=e=>{let{brands:t,isLoading:o,initialValue:n,onFilterChange:r,BrandLogoComponent:i,hideCheckbox:l}=e,[a,s]=useState(null),[p,c]=useState("UNCHECKED"),m=useRef(null),f=!!a,{t:C,i18n:x}=useTranslation(),I=useMemo(()=>gx(t,n,x.language),[t,n,x.language]),T=I.children??[],b=o||!T.length,d=useCallback(A=>{let h=A.filter(P=>P.status==="CHECKED"),v=A.filter(P=>P.status==="INDETERMINATE");return h.length===T.length?"CHECKED":v.length>0||h.length>0?"INDETERMINATE":"UNCHECKED"},[T]),g=useCallback(({selectedTree:A})=>{c(d(A));},[d]),y=useCallback(A=>{c(d(A));let h=b$9.filterNodesByLevelKey(A,"MERCHANT").map(({id:v})=>v);r?.(h);},[r,d]),S=useCallback(()=>{m.current?.toggleAll(p!=="CHECKED");},[p]);return jsxs(V,{startAdornment:l?null:void 0,isSelected:p==="CHECKED",isIndeterminate:p==="INDETERMINATE",isDisabled:b,onMouseEnter:A=>s(A.currentTarget),onMouseLeave:()=>s(null),onClick:S,sx:{maxHeight:36,minHeight:36,padding:"12px 8px 12px 16px",...f&&{boxShadow:"0px 0px 16px 0px #00000021"},...b&&{pointerEvents:"none",opacity:.5,cursor:"default"}},children:[jsx(j,{sx:{fontSize:"11px",flex:1},children:C("merchant")}),t.length>0&&jsx("img",{src:xb,alt:"arrow",style:{height:12}}),!o&&jsx(c$2,{ref:m,placement:"right-start",anchorEl:a,exposeOnlySelectedTree:true,treeDefinition:I,onChange:y,onMounted:g,IconComponent:i})]})},hx=w1;var v1=hx;function yx({onPhoneChange:e,onCountryChange:t,selectedPhone:o,selectedCountry:n,countriesOptions:r,isCountriesLoading:i}){let l=Bc(useId(),"phone-filter");return jsx(b$a,{id:l,"data-testid":"ColumnFilterInputs_PhoneInput",phoneValue:o,onPhoneChange:a=>{e(a);},countryValue:n,onCountryChange:a=>{t(a?.countryId);},countries:r||[],isCountriesLoading:i||false,error:false,disabled:i,placeholder:"User Mobile",sx:{"&.MuiInputBase-root":{paddingLeft:"0px !important"}}})}var Ix=(e,t)=>{let o=e||{},n={};return t?.forEach(({value:r})=>{let i=o?.[r];n[r]=i===void 0?"all":i;}),n};function Tx({anchorEl:e,options:t,apiKey:o="statuses",initialStatuses:n,onCloseDropdown:r,onClear:i,onConfirm:l}){let a=!!e,s=Bc(useId(),"status-filter"),{t:p}=useTranslation(),[c,m]=useState(()=>Ix(n,t)),f=useRef(null),[C,x]=useState(null),[I,T]=useState(null),b=(v,P)=>{x(v.currentTarget),T(P);},d=useCallback(()=>{x(null),T(null);},[]),g$1=useCallback(v=>{r(v),d();},[d,r]),y=()=>{let v=Object.keys(c).reduce((M,E)=>{let k=c[E];return k!=="all"&&(M[E]=k),M},{});Object.values(c).every(M=>M==="all")?i([o]):l({[o]:v});},S=p$1(y,r),A=v=>{y(),r(v);},h=v=>{I&&m(P=>({...P,[I]:v}));};return jsx(ClickAwayListener,{onClickAway:v=>{v.stopPropagation(),r(v);},children:jsxs(Un,{id:s,"data-testid":"StatusFilter",ref:f,tabIndex:-1,onKeyDown:S,children:[jsxs(R,{open:a,anchorEl:e,children:[jsx(a$5,{component:"span",children:p("filterBy")}),t.map(({value:v,label:P})=>jsxs(V,{onClick:M=>{x(M.currentTarget);},onMouseOver:M=>{b(M,v);},sx:{minHeight:"35px",padding:"8px 16px",display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer","&:hover":{backgroundColor:"#fff",boxShadow:"0px 0px 16px 0px #00000021"}},startAdornment:null,children:[jsx(Un,{sx:{display:"flex",alignItems:"center",gap:"4px"},children:P}),jsx(Un,{component:"img",src:xb,width:16,height:12,sx:{marginLeft:"auto"}})]},v)),jsxs(b$b,{children:[jsx(d$2,{onClick:g$1,children:p("cancel")}),jsx(c$3,{onClick:A,children:p("okay")})]})]}),jsx(Popper,{open:!!C,anchorEl:C,placement:"right-start",onMouseLeave:d,children:jsx(Un,{sx:{backgroundColor:"#fff",borderEndEndRadius:"8px",border:"1px solid #F2F2F2"},children:jsx(g,{options:[{value:"all",label:"All"},{value:"enabled",label:"Enabled"},{value:"disabled",label:"Disabled"}],value:c[I||""],onOptionChange:h,sx:v=>({[`& .${a$6.item}:hover`]:{boxShadow:v.v2.elevation[200]}})})})})]})})}var V1=styled$1(j)(()=>({fontSize:"11px"})),Sx=styled$1(Un)(()=>({display:"flex",alignItems:"center",gap:"4px",width:"100%",paddingInline:"16px"})),wx=styled$1(Un)(({theme:e})=>({padding:"8px 16px",display:"flex",gap:"8px",justifyContent:"flex-end",position:"sticky",bottom:0,backgroundColor:"white",zIndex:99999,borderTop:`1px solid ${e.palette.divider}`})),Ax=styled$1(b)(()=>({minWidth:"auto",width:70})),vx=styled$1(b)(()=>({minWidth:"auto",width:70})),Px=styled$1(Un)(()=>({display:"flex",flexDirection:"column",gap:"8px",marginBottom:"8px"})),qs=styled$1(V1)(()=>({fontSize:"11px",fontWeight:500,color:"#8D8D94",padding:"8px 16px"})),Ex=styled$1(Un)(({theme:e})=>({borderBlock:`1px solid ${e.palette.divider}`,display:"flex",justifyContent:"space-between",alignItems:"center",gap:"2px",width:"100%"})),Mx=styled$1(Un)(({theme:e})=>({...a(e),width:"auto",marginTop:"8px","&:focus":{outline:"none"}})),Dx=styled$1(qs)(()=>({color:"#1F88D0",padding:"4px 24px",cursor:"pointer"})),Lx=styled$1(b,{shouldForwardProp:e=>e!=="open"})(({open:e,theme:t})=>{let{brand:o}=t.v2.palette;return {fontSize:"11px",fontWeight:t.v2.typography.fontWeightMedium,padding:t.v2.spacing(8),width:"100%",height:32,justifyContent:"space-between",gap:t.v2.spacing(4),...e&&{borderColor:o[500],boxShadow:"0px 0px 4px 0px rgba(31, 136, 208, 0.50)"}}});function kx({dateRange:e,onDateRangeChange:t,calendarMode:o,onCalendarModeChange:n,timezone:r,browserTimezone:i,defaultCountryTimezone:l,onTimezoneChange:a,timezoneCountriesCodes:s=[],onConfirm:p,onCloseDropdown:c}){let m=Bc(useId(),"date-filter"),{t:f}=useTranslation(),C=useRef(null),x=()=>p(e),I=p$1(x,c),T=y=>{t(y),requestAnimationFrame(()=>C.current?.focus());},b=y=>{x(),c(y);},d$1=useCallback(y=>n(y),[n]),g=y=>{if(!y)return "";let[S,A]=y,h=Ru(S).format("MMM D"),v=Ru(A).format("MMM D");return h===v?h:`${h} - ${v}`};return jsxs(Mx,{ref:C,tabIndex:-1,onKeyDown:I,id:m,"data-testid":"DateFilter",children:[jsxs(Px,{children:[jsx(Ex,{children:jsx(qs,{component:"span",children:f("filterBy")})}),jsx(Sx,{children:jsx(a$2,{defaultDate:e||q(0),onDateChange:T,maxDateRange:365,mode:o,onCalendarModeSwitch:d$1,browserTimezone:i,defaultCountryTimezone:l,timezone:r,onChangeTimezone:a,timezoneCountriesCodes:s,mainSx:{width:"100%"},popperProps:{placement:"right-start"},renderCalendarButton:(y,S)=>jsxs(Lx,{variant:"secondary",size:"md",fullWidth:true,open:y,onClick:S,children:[jsx("span",{children:g(e)||"Date"}),jsx(d,{src:ek,alt:"selected",sx:{width:16,height:16}})]})},g(e))}),e&&jsx(Dx,{component:"span",onClick:()=>t(void 0),children:"Clear"})]}),jsxs(wx,{children:[jsx(vx,{variant:"secondary",size:"md",onClick:c,children:f("cancel")}),jsx(Ax,{variant:"primary",size:"md",onClick:b,children:f("okay")})]})]})}var Vx=styled$1(Un)(()=>({maxHeight:"210px",maxWidth:"177px",overflowY:"auto",padding:0})),Bx=styled$1(V)(()=>({padding:"12px 16px",border:"none !important","&:hover":{boxShadow:"0px 0px 16px 0px #00000021"},maxHeight:35,minHeight:35})),Nx=styled$1(Un)(()=>({display:"flex",flexDirection:"column",gap:"2px"})),Wx=styled$1(Un)(({theme:e})=>({color:alpha(e.palette.text.primary,.5),fontSize:"9px"})),Fx=styled$1(Un)(()=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"120px"})),Hx=styled$1(R)(()=>({marginBottom:"8px"}));function zx({anchorEl:e,onCloseDropdown:t,list:o,apiKey:n,placeholder:r,onConfirm:i,onClear:l,onClickItem:a,inputValue:s,onInputValueChange:p,selectedListItems:c}){let m=Bc(useId(),"list-column-filter"),{t:f}=useTranslation(),C=()=>i(),x=p$1(C,t),I=h=>{C(),t(h);},T=h=>{l?.(),t(h);},b=!!s.trim().length,d=()=>{b&&p("");},g=h=>{p(h);},y=useMemo(()=>b?o?.filter(h=>h.name.toLowerCase().includes(s.trim().toLowerCase())):o,[s,b,o]),S=b&&!y.length||!o.length,A=useMemo(()=>new Set(c),[c]);return jsxs(Hx,{id:m,"data-testid":"ListColumnFilter",open:!!e,anchorEl:e,onKeyDown:x,children:[jsx(a$5,{component:"span",children:f("filterBy")}),!!o?.length&&jsx(Box,{sx:{padding:"8px 16px"},children:jsx(b$3,{fullWidth:true,value:s,name:n,placeholder:r,onChange:h=>g(h.target.value),onClear:d})}),jsx(Vx,{children:S?jsx(Box,{sx:{p:1,textAlign:"center",fontSize:"11px"},children:"No data available"}):y?.map((h,v)=>jsx(Bx,{isSelected:A.has(h?.id),onClick:()=>{a(h?.id);},children:jsxs(Nx,{children:[jsx(Fx,{children:h.name}),jsx(Wx,{component:"span",children:h.id})]})},`${h.id}-${v}`))}),jsxs(b$b,{children:[jsx(d$2,{onClick:T,children:f("cancel")}),jsx(c$3,{onClick:I,children:f("okay")})]})]})}var $x="os-shared-VerificationIcon",aa={root:`${$x}-root`,img:`${$x}-img`},Ux=(a=>(a.Verified="verified",a.Reviewed="reviewed",a.Completed="completed",a.Incomplete="incomplete",a.Rejected="rejected",a.Closed="closed",a.Archived="archived",a))(Ux||{});var la={verified:Jj,reviewed:Hj,completed:Gj,incomplete:Ij,rejected:Kj,closed:Lj,archived:Mj},sa={verified:"#2ACE0029",reviewed:"#11D0FA29",completed:"#11D0FA29",incomplete:"#D9D9D929",rejected:"#FF3D0029",closed:"#D9D9D929",archived:"#D9D9D929"};var $1=2.3,Gx=styled$1("span",{shouldForwardProp:e=>!["$variant","$bgColor","$size"].includes(e)})(({$variant:e="default",$bgColor:t,$size:o=10.5})=>{let n=Math.round(o*$1);return {display:"inline-flex",alignItems:"center",justifyContent:"center",...e==="circle"&&{width:`${n}px`,height:`${n}px`,borderRadius:"50%",backgroundColor:t||"#D9D9D929"}}});var Yx=forwardRef(({className:e,sx:t,icon:o,label:n,variant:r="default",size:i=10.5,width:l,height:a,...s},p$1)=>{let c=la[o]||la.incomplete,m=sa[o]||sa.incomplete,f=n===null?"":n||Xu(o),C=l??i,x=a??i,I=jsx(Gx,{ref:p$1,className:nc(aa.root,e),sx:t,"data-testid":"VerificationIcon",$variant:r,$bgColor:m,$size:i,...s,children:jsx("img",{className:aa.img,loading:"lazy",src:c,alt:f||o,width:C,height:x})});return n===null?I:jsx(p,{title:f,wrapperProps:{display:"inline-flex"},children:I})});Yx.displayName="VerificationIcon";var j1=memo(Yx);function Q1({voidPercentage:e,capturePercentage:t,captureCount:o,autoType:n,captureAmount:r,voidAmount:i,currency:l,isTextShown:a,remainingAmount:s,isSheetViewShown:p$1,selectionProps:c={}}){let m=Number(t)+Number(e)===100||s<=0,f=Bc(useId(),"capture-auto-icon"),C=useTheme(),{t:x}=useTranslation(),I=Ja(s||0),T=useCallback(S=>`Auto ${S} - ${l} ${I.integerAmount}.${I.decimalAmount}`,[l,I.decimalAmount,I.integerAmount]),b=useCallback(S=>{let A=S==="Capture"?r:i,{integerAmount:h,decimalAmount:v}=Ka(A,l);return `Partial ${S} - ${l} ${h}.${v}`},[r,i,l]),d=t>0?jsx(p,{title:b("Capture"),children:jsxs(Hr,{isCapture:true,isFullyUsed:m,whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:C.shadows[4]}},children:[jsx(zr,{src:vb,alt:"captured"}),jsxs(motion.div,{style:{display:"none",alignItems:"center",justifyContent:"center",gap:"4px"},initial:{width:0,opacity:0},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto",display:"flex"},fadeIn:{transition:{delay:.5},opacity:1}},children:[jsxs(Or,{isCapture:true,percentage:t,children:[t,"% ",jsx(_r,{isCapture:true,percentage:$r(t)})]}),o>1&&jsxs(z,{compact:true,color:"dark",children:[o,"x"]})]})]})}):n==="CAPTURED"&&!m?jsx(p,{title:T("Capture"),children:jsx(Qt,{children:jsx(Mt,{src:Zo.CAPTURED?.icon,alt:"auto"})})}):jsx(p,{title:T("Capture"),children:jsx(Qt,{children:jsx(Mt,{src:Zo.CAPTURED?.icon,alt:"auto"})})}),g=t===100?jsx(p,{title:x("captured"),children:jsx(pd,{children:jsx(Mt,{src:ik,alt:"captured"})})}):d,y=useMemo(()=>p$1&&g?jsx(b$1,{copyTrigger:"press",copyText:x("captured"),children:x("captured")}):a&&g?jsx(ld,{children:x("captured")}):g,[a,g,p$1,x]);return y&&jsx("div",{id:f,"data-testid":"CaptureAutoIcon",style:{zIndex:12},children:y})}var Kx=Q1;function iA({voidPercentage:e,capturePercentage:t,voidCount:o,autoType:n,captureAmount:r,voidAmount:i,currency:l,isTextShown:a,isSheetViewShown:s,selectionProps:p$1={},remainingAmount:c}){let m=Number(t)+Number(e)===100||c<=0,f=Bc(useId(),"void-auto-icon"),C=useTheme(),{t:x}=useTranslation(),I=Ja(c||0),T=useCallback(S=>`Auto ${S} - ${l} ${I.integerAmount}.${I.decimalAmount}`,[l,I.decimalAmount,I.integerAmount]),b=useCallback(S=>{let A=S==="Capture"?r:i,{integerAmount:h,decimalAmount:v}=Ka(A,l);return `Partial ${S} - ${l} ${h}.${v}`},[r,i,l]),d=e>0||i?jsx(p,{title:b("Void"),children:jsxs(Hr,{isFullyUsed:m,whileHover:["animate","fadeIn"],animate:"start",sx:{zIndex:14,background:C.palette.common.white,border:`0.75px solid ${C.palette.grey[600]}1A`},variants:{animate:{boxShadow:C.shadows[4]}},children:[jsx(zr,{src:zk,alt:"void"}),jsxs(motion.div,{style:{display:"none",alignItems:"center",justifyContent:"center",gap:"4px"},initial:{width:0,opacity:0},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto",display:"flex"},fadeIn:{transition:{delay:.5},opacity:1}},children:[jsxs(Or,{percentage:e,children:[e,"% ",jsx(_r,{percentage:$r(e)})]}),o>0&&jsxs(z,{compact:true,color:"neutral",children:[o,"x"]})]})]})}):n==="VOID"&&!m?jsx(p,{title:T("Void"),children:jsx(Qt,{children:jsx(Mt,{src:Zo.VOID?.icon,alt:"auto"})})}):null,g=e===100?jsx(p,{title:x("void"),children:jsx(Qt,{children:jsx(Mt,{src:zk,alt:"void"})})}):d,y=useMemo(()=>s&&g?jsx(b$1,{copyTrigger:"press",copyText:x("void"),children:x("void")}):a&&g?jsx(sd,{children:x("void")}):g,[a,g,s,x]);return y?jsx("div",{id:f,"data-testid":"VoidAutoIcon",style:{...!s&&{zIndex:11}},children:y}):null}var Xx=iA;var aA=Kx;var cA=({authorizedStatus:e,isTextShown:t,iconStyles:o,tableMode:n,chipIndex:r=0,selectionProps:i={}})=>{let{t:l}=useTranslation(),a=useTheme(),s=l(wt(e));return Ya(n)?jsx(b$1,{copyTrigger:"press",copyText:s,children:s}):jsx(p,{title:s,children:t?jsx(H,{"data-testid":"StatusCell_AuthorizedStatusLabel",sx:{color:a.palette.info.dark},children:s}):jsx(d,{src:f$1[e],alt:"authorized-icon","data-testid":"StatusCell_AuthorizedStatusIcon",sx:o})})};var Zx=styled$1(motion.span)(({theme:e})=>({color:e.palette.common.white,display:"block",fontWeight:e.typography.fontWeightBold,fontSize:"9.78px",borderRadius:"4px",paddingInline:e.spacing(.45)})),Jx=styled$1(motion.span)(()=>({display:"block",width:"0",overflow:"hidden"})),Js=styled$1("img")(()=>({width:"10px",height:"10px"})),Qs=styled$1(motion.span)(({theme:e})=>({width:"18px",height:"18px",borderRadius:"50%",backgroundColor:e.palette.background.paper,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,position:"relative"})),ep=styled$1(motion.div,{shouldForwardProp:e=>e!=="isVisible"})(({isVisible:e})=>({display:"flex",justifyContent:"center",alignItems:"center",gap:"4px",width:"0",overflow:"hidden",opacity:0,...!e&&{padding:"0 !important"}})),Qx=styled$1(motion.div)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start"})),eh=styled$1(motion.span)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minHeight:"24px",cursor:"pointer",borderRadius:"16px"})),th={delay:.2,ease:"easeIn",fadeIn:{duration:.2}},oh={animate:{width:"auto",paddingRight:"4px",paddingLeft:"4px"},fadeIn:{opacity:1,transition:{delay:.7}}},nh={animate:{width:"auto"},fadeIn:{opacity:1,transition:{delay:1}}},rh={animate:{width:"auto",paddingRight:"8px",paddingLeft:"4px"}},tp={fadeIn:{duration:.3},animate:{duration:.1}},ih={fadeIn:{opacity:1}},ah=styled$1(H)(()=>({width:"88px",height:"100%"})),op=styled$1(Box)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.25),height:"100%"}));function qe({chargeStatus:e,gatewayTooltip:t,acquirerTooltip:o,chargeTooltip:n,errorCode:r,isTextShown:i,gatewayCode:l,acquirerCode:a,unCapturedStyles:s,iconStyles:p$1,iconWrapperStyles:c,gatewayIconWrapperStyles:m,gatewayContainerStyles:f,gateWayIconStyles:C,showBadge:x=true,isSheetViewShown:I=false,selectionProps:T={},chipIndex:b=0}){let d=e?b$c[e]:null,g=e?g$1[e]:null,y=useTheme(),{t:S}=useTranslation(),A=Bc(useId(),"charge-status-icon"),h=n&&jsx(Fragment,{children:jsx("div",{children:n})}),v=o&&jsxs(Fragment,{children:[jsx("div",{children:"Acquirer"}),jsx("div",{children:o})]}),P=t&&jsxs(Fragment,{children:[jsx("div",{children:"Gateway"}),jsx("div",{children:t})]}),M=e&&a$4[e]&&jsx("div",{"data-testid":"ChargeStatusIcon_ChargeIcon",style:{display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",borderRadius:d?"50%":"",...c},children:jsx($,{src:a$4[e],alt:"charge-icon","data-testid":"ChargeStatusIcon_StatusIcon",style:{borderRadius:d?"50%":"",width:"16px",height:"16px",...p$1}})});return I?jsxs(op,{children:[jsxs(b$1,{copyTrigger:"press",copyText:S(wt(e)),children:[S(wt(e))," ",r]}),d&&jsxs(Fragment,{children:[l&&jsxs(b$1,{copyTrigger:"press",copyText:"Gateway",children:["Gateway ",l]}),a&&jsxs(b$1,{copyTrigger:"press",copyText:"Acquirer",children:["Acquirer ",a]})]})]}):i?jsxs(op,{children:[jsx(p,{title:h,children:jsxs(ah,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":wt(e),sx:{background:d?.background||g?.background||"transparent",color:d?.color||g?.color||y.palette.info.dark,borderColor:`${d?.color||g?.color||y.palette.info.dark}1A`},children:[S(wt(e))," ",r]})}),d&&jsxs(Fragment,{children:[l&&jsx(p,{title:P,children:jsxs(H,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":wt(e),sx:{background:d?.background||g?.background||"transparent",color:d?.color||g?.color||y.palette.info.dark},children:["Gateway ",l]})}),a&&jsx(p,{title:v,children:jsxs(H,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":wt(e),sx:{background:d?.background||g?.background||"transparent",color:d?.color||g?.color||y.palette.info.dark},children:["Acquirer ",a]})})]})]}):jsx(ye,{id:A,"data-testid":"ChargeStatusIcon_StatusIconWrapper",style:{...c},children:Ln$1?.includes(e||"")&&(h||v||P)?jsxs(eh,{"data-testid":"ChargeStatusIcon_UnCapturedContainer",whileHover:["animate","fadeIn"],style:{left:"0",...x&&{paddingInline:"12px",border:"1px solid #F2F2F2",borderRadius:"12px",backgroundColor:"#fff"},...s},children:[jsx(Qx,{"data-testid":"ChargeStatusIcon_UnCapturedBadge",sx:{borderRadius:"56px"},initial:{background:"transparent"},variants:{animate:{background:d?.background}},children:jsx(p,{title:h??S(wt(e)),children:jsxs(Fragment,{children:[M,jsx(Jx,{"data-testid":"ChargeStatusIcon_ErrorCodeWrapper",transition:{animate:{duration:.05}},variants:rh,style:{...r&&{padding:"0 !important"}},children:jsx(Zx,{"data-testid":"ChargeStatusIcon_ErrorCodeLabel",sx:{background:d?.color},transition:th,variants:ih,initial:{opacity:0},children:r})})]})})}),jsx(ep,{"data-testid":"ChargeStatusIcon_GatewaysContainer",transition:tp,variants:oh,style:f,isVisible:!!P,children:P&&jsx(p,{title:P,children:jsx(Qs,{"data-testid":"ChargeStatusIcon_GatewayIconWrapper",style:{background:d?.background,...m},children:jsx(Js,{src:d?.gatewayIcon,alt:"gateway-icon","data-testid":"ChargeStatusIcon_GatewayIcon",style:C})})})}),jsx(ep,{"data-testid":"ChargeStatusIcon_GatewaysContainer",transition:tp,variants:nh,style:f,isVisible:!!v,children:v&&jsx(p,{title:v,children:jsx(Qs,{"data-testid":"ChargeStatusIcon_AcquirerIconWrapper",style:{background:d?.background,...m},children:jsx(Js,{src:d?.acquirerIcon,alt:"acquirer-icon","data-testid":"ChargeStatusIcon_AcquirerIcon",style:C})})})})]}):jsx(p,{title:h??S(wt(e)),children:jsx(ye,{children:M})})})}var xA=()=>{let{t:e}=useTranslation(),t=Bc(useId(),"customer-initiated-icon");return jsx(p,{title:e("merchantInitiated"),children:jsx("img",{id:t,"data-testid":"merchantInitiatedIcon",src:wb,alt:"merchant",style:{width:"16px",height:"16px"}})})};var hA={G:"Global",R:"Regional",L:"Local"},kt=({geographyVariant:e,countryCode:t,isTextShown:o})=>{let n=e?hA[e]:void 0,r=n||t?`${n||""} ${n&&t?"-":""} ${t?`Country - ${t}`:""}`:void 0;return o||!t?null:jsx(p,{title:r,children:jsx(b$2,{countryCode:t})})};var bA=({geographyVariant:e,isTextShown:t,deviceCountry:o,deviceType:n,tableMode:r})=>{let i=Bc(useId(),"device-icon-chip");return jsxs(Un,{id:i,"data-testid":"DeviceIconChip",sx:{display:"flex",gap:"8px",alignItems:"center",...Ya(r)&&{height:"18px"}},children:[jsx(kt,{geographyVariant:e,isTextShown:t,countryCode:o}),jsx(c$1,{type:n,isTextShown:t,tableMode:r})]})};var wA=({isDisputeOpen:e,iconStyles:t})=>{let o=Bc(useId(),"dispute-icon");return jsx($,{id:o,"data-testid":"StatusCell_DisputeStatusIcon",sx:{width:"13.5px",height:"13.5px"},src:e?va:ua,alt:"dispute-icon",style:t})};var mh=styled$1(Un,{shouldForwardProp:e=>e!=="tableMode"})(({theme:e,tableMode:t})=>({display:"flex",gap:e.spacing(.5),...Ya(t)&&{height:"18px"},alignItems:"center"})),dh=styled$1("span")(({theme:e})=>({fontSize:"10px",fontWeight:500,color:e.palette.text.primary}));function rp({countryCode:e,isTextShown:t,cardNumber:o,bankName:n,tableMode:r}){let i=Bc(useId(),"issuer-icon"),l=o?.slice(0,4),a=o?.slice(-4);return jsxs(mh,{id:i,"data-testid":"IssuerIcon",tableMode:r,children:[e&&jsx(kt,{countryCode:e,isTextShown:t}),jsx(p,{title:`${n?`Issuer - ${n}`:""}`,children:jsx(dh,{children:`${l||""} ${a||""}`})})]})}var MA=rp;var kA=({payoutStatus:e$1="PENDING",isTextShown:t,payoutTooltip:o,iconStyles:n,isSheetViewShown:r,chipIndex:i=0,selectionProps:l={}})=>{let{t:a}=useTranslation(),s=Bc(useId(),"payout-icon"),p$1=a(wt(e$1)),c=o||p$1;return r?jsx(b$1,{copyTrigger:"press",copyText:p$1,children:p$1}):jsx(p,{title:c,children:t?jsx(wi,{id:s,"data-testid":"StatusCell_PayoutStatusLabel",children:p$1}):jsx($,{id:s,src:e[e$1],alt:"settled-icon","data-testid":"StatusCell_PayoutStatusIcon",style:n})})};var FA=({isTextShown:e,refundStatus:t="PENDING",refundTooltip:o="",refundCount:n,iconStyles:r,isSheetViewShown:i,chipIndex:l=0,selectionProps:a={}})=>{let{t:s}=useTranslation(),p$1=useTheme(),c=Bc(useId(),"refund-icon"),m=(n||0)>1,f=s(wt(t));if(i)return jsxs(b$1,{copyTrigger:"press",copyText:f,children:[f," ",m?`${n}x`:null]});let C=jsxs(Sd,{"data-testid":"StatusCell_RefundsCountBadge",initial:{width:0,opacity:0,padding:"0px"},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto",display:"flex",padding:"1.285px 2.569px"},fadeIn:{transition:{delay:.5},opacity:1}},children:[n,"x"]});return e?jsx(p,{title:jsx("div",{children:jsx("div",{children:o})}),children:jsx(wi,{id:c,"data-testid":"StatusCell_RefundStatusLabel",sx:{color:d$3[t].color,backgroundColor:d$3[t].backgroundColor,width:"90px"},children:jsxs(el,{whileInView:m?["animate","fadeIn"]:void 0,variants:{animate:{boxShadow:p$1.shadows[4],gap:p$1.spacing(.5)}},children:[f," ",m?C:null]})})}):jsx(p,{title:jsx("div",{children:jsx("div",{children:o})}),children:m?jsxs(el,{id:c,whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:p$1.shadows[4],gap:p$1.spacing(.5)}},children:[jsx(Td,{src:rk,alt:"multi-refunded-icon","data-testid":"StatusCell_MultiRefundIcon"}),C]}):jsx($,{id:c,src:c$4[t],alt:"refunded-icon","data-testid":"StatusCell_RefundStatusIcon",style:r})})},uh=FA;var HA=uh;var OA={american_express:"AMEX",debit:"card",credit:"card",unionpay:"UnionPay",jaywan:"JAYWAN"},de=e=>OA[e?.toLowerCase()||""]||e;styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)}));var fh=styled("img")(()=>({maxWidth:"24px",maxHeight:"16px"}));styled(motion.span,{shouldForwardProp:e=>e!=="sourcesCount"})(({theme:e,sourcesCount:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${t*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:e.palette.background.paper,borderRadius:"16px"}));var Ch=styled("span")(({theme:e})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:e.palette.text.primary})),gh=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px",textAlign:"center",width:"100%"}));styled("span")(({theme:e})=>({position:"absolute",left:0,zIndex:6,border:`1px solid ${e.palette.divider}`,borderRadius:"12px",backgroundColor:e.palette.background.paper,width:"36px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"}));var xh=styled("span")(({theme:e})=>({fontSize:"10px",fontWeight:500,color:e.palette.text.primary}));function Oe({source:e,isTextShown:t,title:o,width:n,height:r,imgSx:i}){let{t:l}=useTranslation(),a=h$1(e);return jsx(p,{title:o,children:t?jsx(gh,{"data-testid":"SourceCell_BadgeTextWrapper",children:jsx(Ch,{"data-testid":"SourceCell_TextLabel","data-source":e,children:l(wt(e))})}):jsx(fh,{src:a,alt:e,width:n,height:r,onError:s=>{s.currentTarget.src=h$1("card");},sx:i})})}function KA({payment:e,card:t,isTextShown:o,firstIcon:n}){let r=Bc(useId(),"source-icons"),{t:i}=useTranslation(),l=useCallback(()=>{let p=[],c=ec(e),m=e?.method,f=e?.scheme;return de(m)?.toLowerCase()===de(f)?.toLowerCase()?p.push(de(m),de(c)):p.push(de(m),de(c),de(f)),p},[e]),a=useMemo(()=>jsx(Oe,{source:n,isTextShown:o,title:i(wt(n))},n),[n,o,i]),s=useMemo(()=>l()?.filter(p=>!!p&&p!==n)?.map((p,c,m)=>{let f=e?.wallet===i("sv_wallet")?i("storedValueWallet"):i("passThruWallet"),C=c===m.length-1&&t?.last_four?`${i(wt(p))} - ${t?.last_four}`:i(wt(p));return jsx(Oe,{source:p,isTextShown:o,title:c===0&&p==="Wallet"?f:C},`${p}-${c}`)}),[l,e,t,o,i,n]);return jsxs(Box,{id:r,"data-testid":"SourceIcons",display:"flex",alignItems:"center",gap:.5,children:[n&&a,s,t?.last_four&&jsxs(xh,{children:["\xB7\xB7\xB7 ",t?.last_four]})]})}var Gn={PROCESSED:Ug$1,FAILED:""};var bh=styled("span")(({theme:e})=>({fontSize:"11px",padding:"2px 0",color:e.palette.text.primary})),Th=styled("img")(()=>({width:"16px",height:"16px"})),Sh=styled("span")(()=>({width:"24px",height:"24px",borderRadius:"50%",backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}));function gi({status:e,isTextShown:t,isSheetViewShown:o}){let n=useTheme$1(),{t:r}=useTranslation(),i=Bc(useId(),"destination-icon"),l=r(wt(e));return o&&Gn[e]?jsx(b$1,{copyTrigger:"press",copyText:l,children:l}):t&&Gn[e]?jsx(bh,{id:i,"data-testid":"ChargeStatusIcon_isTextShown","data-status":wt(e),sx:{background:"#1F88D00D",color:e==="PROCESSED"?n.palette.info.dark:n.palette.common.black},children:l}):jsx(Sh,{id:i,"data-testid":"DestinationIcon",className:"destination-status",children:e&&Gn[e]&&jsx(p,{title:r(wt(e)),children:jsx(Th,{src:Gn[e],alt:"destination-icon"})})})}
2
+ export{wA as $,ES as $a,zi as $b,gd as A,Hb as Aa,Fi as Ab,lx as Ac,Qa as B,Ub as Ba,Jl as Bb,cx as Bc,jr as C,Gb as Ca,Hi as Cb,ux as Cc,yE as D,qb as Da,Mw as Db,x1 as Dc,eo as E,Zb as Ea,Do as Eb,h1 as Ec,to as F,tT as Fa,Dn as Fb,$n as Fc,Ty as G,iT as Ga,ts as Gb,fx as Gc,Ay as H,cT as Ha,Ln as Hb,gx as Hc,Ey as I,uT as Ia,os as Ib,v1 as Ic,Ry as J,xT as Ja,ns as Jb,yx as Jc,By as K,yi as Ka,rs as Kb,Tx as Kc,Fy as L,zW as La,is as Lb,kx as Lc,rn as M,_u as Ma,se as Mb,zx as Mc,rl as N,s2 as Na,as as Nb,aa as Nc,ED as O,BT as Oa,ls as Ob,Ux as Oc,dI as P,FT as Pa,ss as Pb,la as Pc,xI as Q,zT as Qa,ps as Qb,sa as Qc,Bh as R,af as Ra,es as Rb,j1 as Rc,Fh as S,KT as Sa,Rn as Sb,Hh as T,hf as Ta,Dw as Tb,Xx as U,sS as Ua,cs as Ub,aA as V,pS as Va,ms as Vb,cA as W,dS as Wa,ds as Wb,qe as X,CS as Xa,fg as Xb,xA as Y,Sf as Ya,Oi as Yb,kt as Z,AS as Za,_i as Zb,bA as _,PS as _a,Lw as _b,w as a,MA as aa,MS as ab,Rw as ac,nd as b,kA as ba,Hf as bb,us as bc,Xo as c,HA as ca,_f as cb,fs as cc,pt as d,de as da,Xf as db,Cs as dc,tP as e,Oe as ea,nC as eb,Cg as ec,rd as f,KA as fa,$S as fb,kw as fc,oP as g,gi as ga,qS as gb,Vw as gc,id as h,bI as ha,QS as hb,Bw as hc,ad as i,vI as ia,hC as ib,gs as ic,H as j,DI as ja,vC as jb,$i as jc,ld as k,VI as ka,sw as kb,Ui as kc,sd as l,NL as la,EO as lb,Lo as lc,Wr as m,OI as ma,W as mb,Ss as mc,Se as n,$I as na,De as nb,As as nc,ye as o,qI as oa,Ni as ob,vs as oc,$ as p,RR as pa,Aw as pb,Ps as pc,Fr as q,FR as qa,Xl as qb,Ds as qc,ct as r,UR as ra,vw as rb,Ls as rc,Qo as s,XR as sa,Pw as sb,Nn as sc,md as t,nk as ta,Ew as tb,Hg as tc,iy as u,gb as ua,Wi as ub,Vs as uc,sy as v,yb as va,_t as vb,Bs as vc,dy as w,iu as wa,Le as wb,Ns as wc,Cy as x,lu as xa,mg as xb,O0 as xc,Yr as y,Bb as ya,Mn as yb,jg as yc,Cd as z,Wb as za,Zl as zb,Gs as zc};