@tap-payments/os-micro-frontend-shared 0.3.151 → 0.3.153

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 (106) hide show
  1. package/build/_chunks/{chunk-2WHC5EPT.js → chunk-25QNT5P5.js} +1 -1
  2. package/build/_chunks/{chunk-BNWEQO2B.js → chunk-2HOISDAH.js} +1 -1
  3. package/build/_chunks/{chunk-JVVVLEUF.js → chunk-2NZGAW6S.js} +1 -1
  4. package/build/_chunks/{chunk-X2IIYK74.js → chunk-2VUZLBHU.js} +1 -1
  5. package/build/_chunks/{chunk-KW2A7ATU.js → chunk-35TEE4H5.js} +1 -1
  6. package/build/_chunks/{chunk-KCXHCJAA.js → chunk-3DIM7TK6.js} +1 -1
  7. package/build/_chunks/{chunk-4IRFUOW5.js → chunk-3IPLKT42.js} +1 -1
  8. package/build/_chunks/{chunk-CO3EEXJQ.js → chunk-4IWLIKKI.js} +1 -1
  9. package/build/_chunks/{chunk-6NNBWGIW.js → chunk-66DANLIC.js} +1 -1
  10. package/build/_chunks/{chunk-VB7FCFAH.js → chunk-7MI55RIT.js} +1 -1
  11. package/build/_chunks/{chunk-ABYPGA6A.js → chunk-AMSY5XTV.js} +1 -1
  12. package/build/_chunks/{chunk-77BF7TSG.js → chunk-BM6KX6IL.js} +1 -1
  13. package/build/_chunks/{chunk-TNV4RSI6.js → chunk-H37QSJDD.js} +1 -1
  14. package/build/_chunks/{chunk-5ALWC7FS.js → chunk-IM3LJTBS.js} +1 -1
  15. package/build/_chunks/{chunk-MDJ47T6T.js → chunk-JRR2QYFF.js} +1 -1
  16. package/build/_chunks/{chunk-6OIXV5L2.js → chunk-LDNMTZPN.js} +1 -1
  17. package/build/_chunks/{chunk-KKIVDOOU.js → chunk-PDIRJI75.js} +1 -1
  18. package/build/_chunks/chunk-RBF2Y4OM.js +1 -0
  19. package/build/_chunks/{chunk-NY3LCGE5.js → chunk-RBUKY72C.js} +1 -1
  20. package/build/_chunks/{chunk-OVUUOEZN.js → chunk-SBWGLI2Z.js} +1 -1
  21. package/build/_chunks/chunk-VFZLSRQH.js +1 -0
  22. package/build/_chunks/{chunk-DBKRFR7R.js → chunk-WFIDLFYJ.js} +1 -1
  23. package/build/_chunks/{chunk-7OEJSZPG.js → chunk-WPZRME3K.js} +1 -1
  24. package/build/_chunks/chunk-Y3SU6WTJ.js +1 -0
  25. package/build/_chunks/chunk-ZPGWJ5RD.js +2 -0
  26. package/build/components/ActiveFilterChip/index.js +1 -1
  27. package/build/components/Amount/index.js +1 -1
  28. package/build/components/AmountConversionFilter/index.js +1 -1
  29. package/build/components/AmountInput/index.js +1 -1
  30. package/build/components/AmountSlider/index.js +1 -1
  31. package/build/components/AppServices/index.js +1 -1
  32. package/build/components/AppServicesBar/index.js +1 -1
  33. package/build/components/AppWindowWrapper/AppWindow/AppWindow.d.ts +1 -1
  34. package/build/components/AppWindowWrapper/AppWindow/type.d.ts +2 -0
  35. package/build/components/AppWindowWrapper/AppWindow/utils.d.ts +1 -1
  36. package/build/components/AppWindowWrapper/context/Provider.d.ts +1 -1
  37. package/build/components/AppWindowWrapper/context/type.d.ts +6 -0
  38. package/build/components/AppWindowWrapper/index.js +1 -1
  39. package/build/components/BrandLogo/index.js +1 -1
  40. package/build/components/ColumnViews/index.js +1 -1
  41. package/build/components/CopyImage/index.js +1 -1
  42. package/build/components/CountryFilter/index.js +1 -1
  43. package/build/components/CurrencyFilter/index.js +1 -1
  44. package/build/components/Customer/index.js +1 -1
  45. package/build/components/DateFilter/index.js +1 -1
  46. package/build/components/Discount/index.js +1 -1
  47. package/build/components/Dropdown2/index.js +1 -1
  48. package/build/components/DropdownButton/index.js +1 -1
  49. package/build/components/DropdownMenu/index.js +1 -1
  50. package/build/components/ExpandableSideBar/index.js +1 -1
  51. package/build/components/FileInputPreview/index.js +1 -1
  52. package/build/components/FilterDropdown/index.js +1 -1
  53. package/build/components/Filters/index.js +1 -1
  54. package/build/components/JSONViewer/JSONViewer.d.ts +1 -1
  55. package/build/components/JSONViewer/components/CopiedIndicator/CopiedIndicator.d.ts +11 -0
  56. package/build/components/JSONViewer/components/CopiedIndicator/index.d.ts +1 -0
  57. package/build/components/JSONViewer/context/Provider.d.ts +3 -2
  58. package/build/components/JSONViewer/index.js +1 -1
  59. package/build/components/JSONViewer/type.d.ts +2 -1
  60. package/build/components/LanguageDropdown/index.js +1 -1
  61. package/build/components/ListColumnFilter/index.js +1 -1
  62. package/build/components/ListHeader/index.js +1 -1
  63. package/build/components/MenuItem/index.js +1 -1
  64. package/build/components/MerchantCurrencyDropdown/index.js +1 -1
  65. package/build/components/MerchantLogo/index.js +1 -1
  66. package/build/components/MerchantsDropdown/index.js +1 -1
  67. package/build/components/MultiSelectDropdownButton/index.js +1 -1
  68. package/build/components/MultiSelectWithSearch/index.js +1 -1
  69. package/build/components/NestedDropdown/index.js +1 -1
  70. package/build/components/PartnersFilter/index.js +1 -1
  71. package/build/components/PaymentSourceFilter/index.js +1 -1
  72. package/build/components/PhoneFilter/index.js +1 -1
  73. package/build/components/RFH/index.js +1 -1
  74. package/build/components/RadioGroup/index.js +1 -1
  75. package/build/components/ReceiptsViewer/index.js +1 -1
  76. package/build/components/ReferenceTypeFilter/index.js +1 -1
  77. package/build/components/SalesChannelFilter/index.js +1 -1
  78. package/build/components/SearchButton/index.js +1 -1
  79. package/build/components/SelectWithSearch/index.js +1 -1
  80. package/build/components/StatusBar/index.js +1 -1
  81. package/build/components/StatusButton/index.js +1 -1
  82. package/build/components/StatusFilter/index.js +1 -1
  83. package/build/components/StatusIcons/index.js +1 -1
  84. package/build/components/TableCells/index.js +1 -1
  85. package/build/components/TableReports/index.js +1 -1
  86. package/build/components/TreeDropdown/index.js +1 -1
  87. package/build/components/VAT/index.js +1 -1
  88. package/build/components/VerificationIcon/index.js +1 -1
  89. package/build/components/ViewColumnRadioFilter/index.js +1 -1
  90. package/build/components/VirtualTables/index.js +1 -1
  91. package/build/components/WindowSideBar/index.js +1 -1
  92. package/build/components/index.d.ts +1 -1
  93. package/build/components/index.js +1 -1
  94. package/build/components/primitives/Backdrop/style.d.ts +2 -2
  95. package/build/components/primitives/Backdrop/type.d.ts +2 -4
  96. package/build/components/primitives/index.js +1 -1
  97. package/build/index.js +1 -1
  98. package/package.json +1 -1
  99. package/build/_chunks/chunk-C6FBKUMX.js +0 -1
  100. package/build/_chunks/chunk-DV5XS66I.js +0 -2
  101. package/build/_chunks/chunk-L2RZBHC7.js +0 -1
  102. package/build/_chunks/chunk-OK6HCBL2.js +0 -1
  103. package/build/_chunks/chunk-ULE5G4WB.js +0 -1
  104. package/build/components/WindowBackdrop/WindowBackdrop.d.ts +0 -6
  105. package/build/components/WindowBackdrop/index.d.ts +0 -1
  106. package/build/components/WindowBackdrop/index.js +0 -1
@@ -1 +1 @@
1
- import {a as a$1}from'./chunk-KHM5KW53.js';import {f}from'./chunk-DV5XS66I.js';import {a}from'./chunk-GNY2VGGW.js';import {yc}from'./chunk-2CIV4TII.js';import {wb}from'./chunk-KCEYICHJ.js';import {memo,useRef,useState,useEffect,useMemo,useId}from'react';import ie from'@mui/material/Popper';import {styled,Box}from'@mui/material';import {jsx,jsxs}from'react/jsx-runtime';var k=styled(a)(({theme:e})=>({fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.subtitle1.fontSize,color:e.palette.grey[700],paddingInlineStart:e.spacing(2),paddingTop:e.spacing(1),paddingBottom:e.spacing(1),paddingInlineEnd:e.spacing(1)})),R=styled(Box,{shouldForwardProp:e=>e!=="disabled"})(({theme:e,disabled:n})=>({fontWeight:e.typography.fontWeightMedium,padding:e.spacing(1),position:"relative",display:"flex",alignItems:"center",textTransform:"capitalize",cursor:n?"not-allowed":"pointer",flex:1,zIndex:99999,".MuiButtonBase-root":{width:"16px",marginInlineEnd:"4px"}})),z=styled(Box)(({theme:e})=>({borderRadius:e.spacing(.5),background:e.palette.background.default,width:"max-content",cursor:"pointer",zIndex:99999,boxShadow:e.shadows[11],display:"flex",flexDirection:"column",".nested-menu-item + .nested-menu-item":{borderTop:`1px solid ${e.palette.divider}`,zIndex:99999},".nested-menu-item:hover":{transition:e.transitions.create(["boxShadow","border"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.complex}),boxShadow:e.shadows[6],border:"none",position:"relative"}})),B=styled(Box)(({theme:e})=>({...e.typography.subtitle1,color:e.palette.text.primary})),H=styled(f)(()=>({padding:0,paddingRight:"4px",".MuiSvgIcon-root":{width:12,height:12}})),$=styled(Box)(()=>({display:"flex",gap:"4px",alignItems:"center",flexGrow:1,minWidth:0,overflow:"hidden"})),A=styled(Box)(()=>({display:"flex",gap:"12px",justifyContent:"space-between",flexGrow:1,alignItems:"center",minWidth:0,overflow:"hidden"})),O=styled(Box)(({theme:e})=>({borderRadius:"50%",background:e.palette.divider,width:13,height:14,fontSize:"8px",fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",lineHeight:"10px"})),G=styled(Box)(()=>({display:"flex",alignItems:"center",gap:"8px",flexShrink:0,position:"relative",left:4})),F=styled(Box)(()=>({flex:"1 0 auto"})),_=styled(Box)(()=>({position:"relative",zIndex:999999}));function q(e){return e.scrollWidth-e.clientWidth>1}function oe({children:e}){let n=useRef(null),[r,t]=useState(false);return jsx(a$1,{arrow:true,placement:"top",title:e,open:r,onOpen:()=>{let f=n.current;f&&q(f)&&t(true);},onClose:()=>t(false),componentsProps:{tooltip:{sx:{maxWidth:280,whiteSpace:"normal",wordBreak:"break-word"}}},wrapperProps:{sx:{flex:1,minWidth:0,display:"block",overflow:"hidden"}},children:jsx(B,{ref:n,sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e})})}var K=memo(oe);function se({label:e,icon:n,name:r,menuItems:t,setSelected:f,onSelect:C,selected:i,displayChildrenCount:I,disabled:s,placement:h="right",sx:g,menuSx:P}){let[u,S]=useState(null),l=useRef(null),[a,p]=useState(false),w=o=>{!s&&i!==void 0&&(f({name:o,selected:!i}),i||p(false));};return useEffect(()=>{p(!!(t?.some(o=>o.selected)&&!t?.every(o=>o.selected)));},[]),jsxs(R,{"data-testid":"NestedDropdown_MenuItem",ref:l,className:`nested-menu-item ${u?"active":""} ${s?"disabled":""}`,onMouseEnter:o=>{!u&&t?.length&&S(o.currentTarget);},onMouseLeave:()=>{u&&S(null);},onClick:o=>{s||(o.stopPropagation(),w(r));},sx:{...t?.length&&{cursor:s?"not-allowed":"pointer"},zIndex:99999,...g},disabled:s,children:[i!==void 0&&jsx(H,{size:"small",indeterminate:a,checked:i,disabled:s}),jsxs($,{children:[n&&n,jsxs(A,{children:[e&&jsx(K,{children:e}),!!t?.length&&jsxs(G,{children:[I&&jsx(O,{children:t.length}),jsx("img",{src:wb,className:"arrow-icon",alt:"arrow",style:{height:12}})]})]})]}),t?.length&&jsx(ie,{open:!!(u&&t?.length),anchorEl:u,placement:h==="left"?"left-start":"right-start",sx:{zIndex:99999,...P},children:jsx(T,{className:"child-dropdown",menuItems:t,placement:h,sx:P,onChildrenChange:o=>{let y=o.every(d=>d.selected);i!==void 0&&!s&&(y&&f({name:r,selected:true}),o.every(d=>!d.selected)&&f({name:r,selected:false}),p(o?.some(d=>d.selected)&&!o.every(d=>!d.selected)&&!y));},onSelect:o=>{C(o,r);}})})]})}var M=memo(se);function ae({title:e,menuItems:n,onChildrenChange:r,onSelect:t,className:f,updatedList:C,footer:i,header:I,placement:s="right",...h}){let[g,P]=useState({name:"",selected:false}),[u,S]=useState();return useEffect(()=>{S(n);},[n]),useEffect(()=>{if(g.name){let{name:l,selected:a}=g,p=[],w=d=>d?.map(m=>(p.push({name:m.name,selected:a}),{...m,selected:a,...m.menuItems?.length&&{menuItems:w(m.menuItems)}})),y=(d=>d.map(m=>m.name===l?(p.push({name:m.name,selected:a}),{...m,selected:a,...m.menuItems?.length&&{menuItems:w(m.menuItems)}}):m))(u);S(y),C&&C(y),r&&r(y),t&&t(p);}},[g]),jsxs(z,{component:"article",className:`tap-dropdown ${f||""}`,...h,children:[jsx(_,{children:e&&jsx(k,{component:"p",children:e})}),I,jsx(F,{children:u?.map((l,a)=>jsx(M,{setSelected:({name:p,selected:w})=>{P({name:p,selected:w});},onSelect:p=>{t&&t(p);},placement:s,...l},`${l.name}-${a}`))}),i&&i]})}var T=memo(ae);var Y=(e,{menuItemSx:n,menuSx:r})=>(e.forEach(t=>{t.sx={...n,...t.sx},t.menuSx={...r,...t.menuSx},t.menuItems?.length&&Y(t.menuItems,{menuItemSx:n,menuSx:r});}),e);function he({title:e,menuItems:n,onSelect:r,updatedList:t,header:f,placement:C="right",menuItemSx:i={},menuSx:I={},...s}){let h=useMemo(()=>Y(n,{menuItemSx:i,menuSx:I}),[n,i,I]),[g,P]=useState(h),u=yc(useId(),"nested-dropdown");useEffect(()=>{P(h);},[h]);let S=l=>{let a=w=>w.map(o=>({...o,selected:l.find(y=>o.name===y.name)?.selected??o.selected,...o.menuItems?.length&&{menuItems:a(o.menuItems)}})),p=a(g);P(p),t&&t(p);};return jsx(T,{id:u,"data-testid":"NestedDropdown",placement:C,menuItems:g,title:e,header:f,onSelect:l=>{r&&r(l),S(l);},...s})}var Z=memo(he);var Ue=Z;export{M as a,T as b,Ue as c};
1
+ import {a as a$1}from'./chunk-KHM5KW53.js';import {f}from'./chunk-ZPGWJ5RD.js';import {a}from'./chunk-GNY2VGGW.js';import {yc}from'./chunk-2CIV4TII.js';import {wb}from'./chunk-KCEYICHJ.js';import {memo,useRef,useState,useEffect,useMemo,useId}from'react';import ie from'@mui/material/Popper';import {styled,Box}from'@mui/material';import {jsx,jsxs}from'react/jsx-runtime';var k=styled(a)(({theme:e})=>({fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.subtitle1.fontSize,color:e.palette.grey[700],paddingInlineStart:e.spacing(2),paddingTop:e.spacing(1),paddingBottom:e.spacing(1),paddingInlineEnd:e.spacing(1)})),R=styled(Box,{shouldForwardProp:e=>e!=="disabled"})(({theme:e,disabled:n})=>({fontWeight:e.typography.fontWeightMedium,padding:e.spacing(1),position:"relative",display:"flex",alignItems:"center",textTransform:"capitalize",cursor:n?"not-allowed":"pointer",flex:1,zIndex:99999,".MuiButtonBase-root":{width:"16px",marginInlineEnd:"4px"}})),z=styled(Box)(({theme:e})=>({borderRadius:e.spacing(.5),background:e.palette.background.default,width:"max-content",cursor:"pointer",zIndex:99999,boxShadow:e.shadows[11],display:"flex",flexDirection:"column",".nested-menu-item + .nested-menu-item":{borderTop:`1px solid ${e.palette.divider}`,zIndex:99999},".nested-menu-item:hover":{transition:e.transitions.create(["boxShadow","border"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.complex}),boxShadow:e.shadows[6],border:"none",position:"relative"}})),B=styled(Box)(({theme:e})=>({...e.typography.subtitle1,color:e.palette.text.primary})),H=styled(f)(()=>({padding:0,paddingRight:"4px",".MuiSvgIcon-root":{width:12,height:12}})),$=styled(Box)(()=>({display:"flex",gap:"4px",alignItems:"center",flexGrow:1,minWidth:0,overflow:"hidden"})),A=styled(Box)(()=>({display:"flex",gap:"12px",justifyContent:"space-between",flexGrow:1,alignItems:"center",minWidth:0,overflow:"hidden"})),O=styled(Box)(({theme:e})=>({borderRadius:"50%",background:e.palette.divider,width:13,height:14,fontSize:"8px",fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",lineHeight:"10px"})),G=styled(Box)(()=>({display:"flex",alignItems:"center",gap:"8px",flexShrink:0,position:"relative",left:4})),F=styled(Box)(()=>({flex:"1 0 auto"})),_=styled(Box)(()=>({position:"relative",zIndex:999999}));function q(e){return e.scrollWidth-e.clientWidth>1}function oe({children:e}){let n=useRef(null),[r,t]=useState(false);return jsx(a$1,{arrow:true,placement:"top",title:e,open:r,onOpen:()=>{let f=n.current;f&&q(f)&&t(true);},onClose:()=>t(false),componentsProps:{tooltip:{sx:{maxWidth:280,whiteSpace:"normal",wordBreak:"break-word"}}},wrapperProps:{sx:{flex:1,minWidth:0,display:"block",overflow:"hidden"}},children:jsx(B,{ref:n,sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e})})}var K=memo(oe);function se({label:e,icon:n,name:r,menuItems:t,setSelected:f,onSelect:C,selected:i,displayChildrenCount:I,disabled:s,placement:h="right",sx:g,menuSx:P}){let[u,S]=useState(null),l=useRef(null),[a,p]=useState(false),w=o=>{!s&&i!==void 0&&(f({name:o,selected:!i}),i||p(false));};return useEffect(()=>{p(!!(t?.some(o=>o.selected)&&!t?.every(o=>o.selected)));},[]),jsxs(R,{"data-testid":"NestedDropdown_MenuItem",ref:l,className:`nested-menu-item ${u?"active":""} ${s?"disabled":""}`,onMouseEnter:o=>{!u&&t?.length&&S(o.currentTarget);},onMouseLeave:()=>{u&&S(null);},onClick:o=>{s||(o.stopPropagation(),w(r));},sx:{...t?.length&&{cursor:s?"not-allowed":"pointer"},zIndex:99999,...g},disabled:s,children:[i!==void 0&&jsx(H,{size:"small",indeterminate:a,checked:i,disabled:s}),jsxs($,{children:[n&&n,jsxs(A,{children:[e&&jsx(K,{children:e}),!!t?.length&&jsxs(G,{children:[I&&jsx(O,{children:t.length}),jsx("img",{src:wb,className:"arrow-icon",alt:"arrow",style:{height:12}})]})]})]}),t?.length&&jsx(ie,{open:!!(u&&t?.length),anchorEl:u,placement:h==="left"?"left-start":"right-start",sx:{zIndex:99999,...P},children:jsx(T,{className:"child-dropdown",menuItems:t,placement:h,sx:P,onChildrenChange:o=>{let y=o.every(d=>d.selected);i!==void 0&&!s&&(y&&f({name:r,selected:true}),o.every(d=>!d.selected)&&f({name:r,selected:false}),p(o?.some(d=>d.selected)&&!o.every(d=>!d.selected)&&!y));},onSelect:o=>{C(o,r);}})})]})}var M=memo(se);function ae({title:e,menuItems:n,onChildrenChange:r,onSelect:t,className:f,updatedList:C,footer:i,header:I,placement:s="right",...h}){let[g,P]=useState({name:"",selected:false}),[u,S]=useState();return useEffect(()=>{S(n);},[n]),useEffect(()=>{if(g.name){let{name:l,selected:a}=g,p=[],w=d=>d?.map(m=>(p.push({name:m.name,selected:a}),{...m,selected:a,...m.menuItems?.length&&{menuItems:w(m.menuItems)}})),y=(d=>d.map(m=>m.name===l?(p.push({name:m.name,selected:a}),{...m,selected:a,...m.menuItems?.length&&{menuItems:w(m.menuItems)}}):m))(u);S(y),C&&C(y),r&&r(y),t&&t(p);}},[g]),jsxs(z,{component:"article",className:`tap-dropdown ${f||""}`,...h,children:[jsx(_,{children:e&&jsx(k,{component:"p",children:e})}),I,jsx(F,{children:u?.map((l,a)=>jsx(M,{setSelected:({name:p,selected:w})=>{P({name:p,selected:w});},onSelect:p=>{t&&t(p);},placement:s,...l},`${l.name}-${a}`))}),i&&i]})}var T=memo(ae);var Y=(e,{menuItemSx:n,menuSx:r})=>(e.forEach(t=>{t.sx={...n,...t.sx},t.menuSx={...r,...t.menuSx},t.menuItems?.length&&Y(t.menuItems,{menuItemSx:n,menuSx:r});}),e);function he({title:e,menuItems:n,onSelect:r,updatedList:t,header:f,placement:C="right",menuItemSx:i={},menuSx:I={},...s}){let h=useMemo(()=>Y(n,{menuItemSx:i,menuSx:I}),[n,i,I]),[g,P]=useState(h),u=yc(useId(),"nested-dropdown");useEffect(()=>{P(h);},[h]);let S=l=>{let a=w=>w.map(o=>({...o,selected:l.find(y=>o.name===y.name)?.selected??o.selected,...o.menuItems?.length&&{menuItems:a(o.menuItems)}})),p=a(g);P(p),t&&t(p);};return jsx(T,{id:u,"data-testid":"NestedDropdown",placement:C,menuItems:g,title:e,header:f,onSelect:l=>{r&&r(l),S(l);},...s})}var Z=memo(he);var Ue=Z;export{M as a,T as b,Ue as c};
@@ -1 +1 @@
1
- import {f as f$1}from'./chunk-X2IIYK74.js';import {styled,Button,Box,alpha}from'@mui/material';var l=t=>({...t.typography.subtitle1,borderRadius:"50px",borderWidth:"1px",borderStyle:"solid",minWidth:"135.11px",height:"32px",display:"flex",justifyContent:"center",alignItems:"center",gap:"8px",textTransform:"none",transition:"none",paddingInline:t.spacing(2)}),n=styled(Button,{shouldForwardProp:t=>t!=="statusVariant"})(({theme:t,statusVariant:e})=>({...l(t),...e==="active"?{background:t.palette.background.gradient.shadedBlue,color:t.palette.common.white,"&:hover":{background:t.palette.background.gradient.shadedBlue,opacity:.8}}:{backgroundColor:t.palette.common.white,borderColor:t.palette.grey[100],color:t.palette.text.primary,"&:hover":{backgroundColor:t.palette.common.white,opacity:.7}}})),u={active:n,inActive:n};styled(Box)(({theme:t,variant:e})=>({borderRadius:"50px",backgroundColor:e==="active"?alpha(t.palette.text.primary,.1):t.palette.grey[100],display:"flex",justifyContent:"center",alignItems:"center",paddingInline:t.spacing(.5),paddingBlock:t.spacing(.25),color:e==="active"?t.palette.common.white:t.palette.text.primary,fontSize:"8px",fontWeight:700,lineHeight:"10px"}));styled("img")(({theme:t,variant:e,icon:a})=>({fill:e==="active"?t.palette.common.white:t.palette.text.primary,color:e==="active"?t.palette.common.white:t.palette.text.primary,...!(["openFlag","closedFlag"].includes(a??"")&&e==="inActive")&&a!=="captured"&&{filter:e==="active"?"brightness(0) invert(1)":"brightness(0) invert(0)"},maxWidth:"14px",maxHeight:"14px"}));var m=styled("p")(({theme:t})=>({fontSize:"0.6875rem",color:t.palette.background.default,fontStyle:"normal",margin:"auto",textTransform:"capitalize"})),h=styled(f$1)(({theme:t})=>({backgroundColor:"white",boxShadow:t.shadows[21],borderRadius:"0.25rem","& .MuiPaper-root":{borderRadius:"0.25rem",width:"12.5rem"}})),y=styled("span")(()=>({width:"27px",height:"100%",maxHeight:"100%",position:"absolute",top:"0",right:"0",bottom:"0",overflow:"hidden"})),b=styled(Box)(({variant:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"0.5rem",fontWeight:t==="active"?700:400})),f=styled(Box)(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"100%"})),S=styled("img")(({theme:t,variant:e,icon:a})=>({fill:e==="active"?t.palette.common.white:t.palette.text.primary,color:e==="active"?t.palette.common.white:t.palette.text.primary,...!(["openFlag","closedFlag"].includes(a??"")&&e==="inActive")&&a!=="captured"&&{filter:e==="active"?"brightness(0) invert(1)":"brightness(0) invert(0)"},maxWidth:"14px",maxHeight:"14px"})),v=styled(Box)(({variant:t})=>({width:"14px",height:"14px",display:"flex",alignItems:"center","& img":{width:"14px",height:"14px",filter:t==="active"?"brightness(0) invert(1)":"brightness(0) invert(0)"}}));export{u as a,m as b,h as c,y as d,b as e,f,S as g,v as h};
1
+ import {f as f$1}from'./chunk-2VUZLBHU.js';import {styled,Button,Box,alpha}from'@mui/material';var l=t=>({...t.typography.subtitle1,borderRadius:"50px",borderWidth:"1px",borderStyle:"solid",minWidth:"135.11px",height:"32px",display:"flex",justifyContent:"center",alignItems:"center",gap:"8px",textTransform:"none",transition:"none",paddingInline:t.spacing(2)}),n=styled(Button,{shouldForwardProp:t=>t!=="statusVariant"})(({theme:t,statusVariant:e})=>({...l(t),...e==="active"?{background:t.palette.background.gradient.shadedBlue,color:t.palette.common.white,"&:hover":{background:t.palette.background.gradient.shadedBlue,opacity:.8}}:{backgroundColor:t.palette.common.white,borderColor:t.palette.grey[100],color:t.palette.text.primary,"&:hover":{backgroundColor:t.palette.common.white,opacity:.7}}})),u={active:n,inActive:n};styled(Box)(({theme:t,variant:e})=>({borderRadius:"50px",backgroundColor:e==="active"?alpha(t.palette.text.primary,.1):t.palette.grey[100],display:"flex",justifyContent:"center",alignItems:"center",paddingInline:t.spacing(.5),paddingBlock:t.spacing(.25),color:e==="active"?t.palette.common.white:t.palette.text.primary,fontSize:"8px",fontWeight:700,lineHeight:"10px"}));styled("img")(({theme:t,variant:e,icon:a})=>({fill:e==="active"?t.palette.common.white:t.palette.text.primary,color:e==="active"?t.palette.common.white:t.palette.text.primary,...!(["openFlag","closedFlag"].includes(a??"")&&e==="inActive")&&a!=="captured"&&{filter:e==="active"?"brightness(0) invert(1)":"brightness(0) invert(0)"},maxWidth:"14px",maxHeight:"14px"}));var m=styled("p")(({theme:t})=>({fontSize:"0.6875rem",color:t.palette.background.default,fontStyle:"normal",margin:"auto",textTransform:"capitalize"})),h=styled(f$1)(({theme:t})=>({backgroundColor:"white",boxShadow:t.shadows[21],borderRadius:"0.25rem","& .MuiPaper-root":{borderRadius:"0.25rem",width:"12.5rem"}})),y=styled("span")(()=>({width:"27px",height:"100%",maxHeight:"100%",position:"absolute",top:"0",right:"0",bottom:"0",overflow:"hidden"})),b=styled(Box)(({variant:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"0.5rem",fontWeight:t==="active"?700:400})),f=styled(Box)(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"100%"})),S=styled("img")(({theme:t,variant:e,icon:a})=>({fill:e==="active"?t.palette.common.white:t.palette.text.primary,color:e==="active"?t.palette.common.white:t.palette.text.primary,...!(["openFlag","closedFlag"].includes(a??"")&&e==="inActive")&&a!=="captured"&&{filter:e==="active"?"brightness(0) invert(1)":"brightness(0) invert(0)"},maxWidth:"14px",maxHeight:"14px"})),v=styled(Box)(({variant:t})=>({width:"14px",height:"14px",display:"flex",alignItems:"center","& img":{width:"14px",height:"14px",filter:t==="active"?"brightness(0) invert(1)":"brightness(0) invert(0)"}}));export{u as a,m as b,h as c,y as d,b as e,f,S as g,v as h};
@@ -1 +1 @@
1
- import {f as f$1}from'./chunk-DV5XS66I.js';import {yc}from'./chunk-2CIV4TII.js';import {memo,useId}from'react';import f from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var d=styled(f,{shouldForwardProp:e=>e!=="disabled"})(({theme:e,disabled:o})=>({padding:e.spacing(1),position:"relative",display:"flex",alignItems:"center",gap:"8px",textTransform:"capitalize",cursor:o?"not-allowed":"pointer",flex:1,fontSize:"0.6875rem",color:"#20232B"})),a=styled(f$1)({padding:0,width:"14px !important",".MuiSvgIcon-root":{width:"14px !important",height:"14px !important"}});function g({isSelected:e,isDisabled:o,isIndeterminate:p,hideCheckbox:l,onClick:s,children:c,className:t,...x}){let u=yc(useId(),"menu-item"),n=o?"disabled menu-item":"menu-item",b=t?`${n} ${t}`:n;return jsxs(d,{id:u,"data-testid":"MenuItem",className:b,onClick:s,disabled:o,...x,children:[!l&&jsx(a,{size:"small",checked:e,indeterminate:p,disabled:o}),c]})}var v=memo(g);export{v as a};
1
+ import {f as f$1}from'./chunk-ZPGWJ5RD.js';import {yc}from'./chunk-2CIV4TII.js';import {memo,useId}from'react';import f from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var d=styled(f,{shouldForwardProp:e=>e!=="disabled"})(({theme:e,disabled:o})=>({padding:e.spacing(1),position:"relative",display:"flex",alignItems:"center",gap:"8px",textTransform:"capitalize",cursor:o?"not-allowed":"pointer",flex:1,fontSize:"0.6875rem",color:"#20232B"})),a=styled(f$1)({padding:0,width:"14px !important",".MuiSvgIcon-root":{width:"14px !important",height:"14px !important"}});function g({isSelected:e,isDisabled:o,isIndeterminate:p,hideCheckbox:l,onClick:s,children:c,className:t,...x}){let u=yc(useId(),"menu-item"),n=o?"disabled menu-item":"menu-item",b=t?`${n} ${t}`:n;return jsxs(d,{id:u,"data-testid":"MenuItem",className:b,onClick:s,disabled:o,...x,children:[!l&&jsx(a,{size:"small",checked:e,indeterminate:p,disabled:o}),c]})}var v=memo(g);export{v as a};
@@ -1 +1 @@
1
- import {k as k$1,l}from'./chunk-DV5XS66I.js';import {yc}from'./chunk-2CIV4TII.js';import {memo,useId,useMemo}from'react';import E from'@mui/material/RadioGroup';import {styled}from'@mui/material/styles';import F from'@mui/material/FormControlLabel';import {FormControl,FormLabel,Stack}from'@mui/material';import {jsxs,jsx}from'react/jsx-runtime';var C=styled(F,{shouldForwardProp:o=>!["size","showHoverEffects","labelSx"].includes(o)})(({size:o="small",showHoverEffects:e=true,labelSx:r})=>({margin:"0",width:"100%",cursor:"pointer",padding:o==="small"?"7.5px 16px 7.5px 8px":o==="medium"?"9px 16px 9px 10px":"11px 16px 11px 12px",maxHeight:o==="small"?"35px":o==="medium"?"40px":"45px",...e&&{"&:hover":{boxShadow:"0px 0px 16px 0px #00000021",borderLeft:"1px solid transparent"}},"& .MuiFormControlLabel-label":{fontSize:o==="small"?"11px":o==="medium"?"13px":"15px",fontWeight:"500",color:"#20232B",width:"100%",cursor:"pointer",...r},[`& .${k$1.root}`]:{cursor:"pointer",color:"#8C9196","&.Mui-checked":{color:"#1F88D0"}}}));var N={small:"sm",medium:"md",large:"lg"};function k({option:o,size:e="small",customLabelRenderer:r,labelPosition:p="end",showHoverEffects:i=true,customRadioProps:s,labelSx:n,icon:l$1,...d}){let m=r?r(o):o.label,u=useMemo(()=>l$1?jsxs(Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[m,jsx("img",{alt:"icon",...l$1})]}):m,[l$1,m]);return jsx(C,{value:o.value,control:jsx(l,{size:N[e??"small"],...s,...o.customProps}),label:u,disabled:o.disabled,size:e,labelPlacement:p,showHoverEffects:i,labelSx:n,...d})}function g({options:o,onOptionChange:e,size:r="small",customLabelRenderer:p,layout:i="vertical",spacing:s=0,labelPosition:n="end",showHoverEffects:l=true,customRadioProps:d,labelSx:m,onChange:u,title:c,sx:S,...P}){let v=t=>{let x=t.target.value;e?.(x),u?.(t,x);},w=yc(useId(),"radio-group");return jsxs(FormControl,{id:w,"data-testid":"RadioGroup",children:[typeof c=="string"?jsx(FormLabel,{children:c}):c,jsx(E,{onChange:v,sx:{display:"flex",flexDirection:i==="horizontal"?"row":"column",gap:s,...S},...P,children:o.map(t=>jsx(k,{icon:t.icon,option:t,size:r,customLabelRenderer:p,labelPosition:n,showHoverEffects:l,customRadioProps:d,labelSx:m},t.value))})]})}g.displayName="RadioGroup";var z=memo(g);export{z as a};
1
+ import {k as k$1,l}from'./chunk-ZPGWJ5RD.js';import {yc}from'./chunk-2CIV4TII.js';import {memo,useId,useMemo}from'react';import E from'@mui/material/RadioGroup';import {styled}from'@mui/material/styles';import F from'@mui/material/FormControlLabel';import {FormControl,FormLabel,Stack}from'@mui/material';import {jsxs,jsx}from'react/jsx-runtime';var C=styled(F,{shouldForwardProp:o=>!["size","showHoverEffects","labelSx"].includes(o)})(({size:o="small",showHoverEffects:e=true,labelSx:r})=>({margin:"0",width:"100%",cursor:"pointer",padding:o==="small"?"7.5px 16px 7.5px 8px":o==="medium"?"9px 16px 9px 10px":"11px 16px 11px 12px",maxHeight:o==="small"?"35px":o==="medium"?"40px":"45px",...e&&{"&:hover":{boxShadow:"0px 0px 16px 0px #00000021",borderLeft:"1px solid transparent"}},"& .MuiFormControlLabel-label":{fontSize:o==="small"?"11px":o==="medium"?"13px":"15px",fontWeight:"500",color:"#20232B",width:"100%",cursor:"pointer",...r},[`& .${k$1.root}`]:{cursor:"pointer",color:"#8C9196","&.Mui-checked":{color:"#1F88D0"}}}));var N={small:"sm",medium:"md",large:"lg"};function k({option:o,size:e="small",customLabelRenderer:r,labelPosition:p="end",showHoverEffects:i=true,customRadioProps:s,labelSx:n,icon:l$1,...d}){let m=r?r(o):o.label,u=useMemo(()=>l$1?jsxs(Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[m,jsx("img",{alt:"icon",...l$1})]}):m,[l$1,m]);return jsx(C,{value:o.value,control:jsx(l,{size:N[e??"small"],...s,...o.customProps}),label:u,disabled:o.disabled,size:e,labelPlacement:p,showHoverEffects:i,labelSx:n,...d})}function g({options:o,onOptionChange:e,size:r="small",customLabelRenderer:p,layout:i="vertical",spacing:s=0,labelPosition:n="end",showHoverEffects:l=true,customRadioProps:d,labelSx:m,onChange:u,title:c,sx:S,...P}){let v=t=>{let x=t.target.value;e?.(x),u?.(t,x);},w=yc(useId(),"radio-group");return jsxs(FormControl,{id:w,"data-testid":"RadioGroup",children:[typeof c=="string"?jsx(FormLabel,{children:c}):c,jsx(E,{onChange:v,sx:{display:"flex",flexDirection:i==="horizontal"?"row":"column",gap:s,...S},...P,children:o.map(t=>jsx(k,{icon:t.icon,option:t,size:r,customLabelRenderer:p,labelPosition:n,showHoverEffects:l,customRadioProps:d,labelSx:m},t.value))})]})}g.displayName="RadioGroup";var z=memo(g);export{z as a};
@@ -1 +1 @@
1
- import {b}from'./chunk-DBKRFR7R.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:i,buttonSx:l}){let{t:I}=useTranslation(),S=f??false,b$1=useCallback(s=>s===e&&!S?"active":"inActive",[e,S]),u=useCallback(s=>{i?.(s);},[i]);return jsx(Fragment,{children:v?.map(({render:s,...a},d)=>{if(s)return jsx(Fragment$1,{children:s({status:e,onChange:u},{...a,index:d})},`custom-status-slot-${d}`);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:l});if(!a.status)return null;let o=a.status.filter(Boolean).map(t=>typeof t=="string"?{value:t}:t)||[],c=!!e&&o.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:o.map(t=>({label:t?.label||I(t?.value||""),status:t?.value,icon:t.icon,onClick:()=>u(t.value)})),buttonSx:l})},o[0]?.value)})})}var p=memo(B);var M=p;export{M as a};
1
+ import {b}from'./chunk-WFIDLFYJ.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:i,buttonSx:l}){let{t:I}=useTranslation(),S=f??false,b$1=useCallback(s=>s===e&&!S?"active":"inActive",[e,S]),u=useCallback(s=>{i?.(s);},[i]);return jsx(Fragment,{children:v?.map(({render:s,...a},d)=>{if(s)return jsx(Fragment$1,{children:s({status:e,onChange:u},{...a,index:d})},`custom-status-slot-${d}`);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:l});if(!a.status)return null;let o=a.status.filter(Boolean).map(t=>typeof t=="string"?{value:t}:t)||[],c=!!e&&o.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:o.map(t=>({label:t?.label||I(t?.value||""),status:t?.value,icon:t.icon,onClick:()=>u(t.value)})),buttonSx:l})},o[0]?.value)})})}var p=memo(B);var M=p;export{M as a};
@@ -1 +1 @@
1
- import {c}from'./chunk-6NNBWGIW.js';import {s}from'./chunk-O5KFJKRT.js';import {memo,useState,useRef,useEffect}from'react';import {useTranslation}from'react-i18next';import F from'@mui/material/Box';import K from'@mui/material/Button';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var Q=styled(F)(({theme:n})=>({background:n.palette.grey[700],width:27,height:14,display:"inline-flex",alignItems:"center",marginInlineStart:"4px",borderRadius:"10px",padding:"2px 6px",img:{cursor:"pointer"}})),E=styled(F)(()=>({padding:"8px 16px",display:"flex",gap:"8px",justifyContent:"center"})),b=styled(K)(({theme:n})=>({textTransform:"capitalize",minWidth:"auto",width:"100%",borderRadius:"4px",border:`1px solid ${n.palette.info.dark}`,backgroundColor:n.palette.info.dark,fontWeight:700,fontSize:"11px",color:n.palette.common.white,"&:hover":{backgroundColor:n.palette.info.dark}})),O=styled(K)(({theme:n})=>({textTransform:"capitalize",minWidth:"auto",width:"100%",borderRadius:"4px",border:`1px solid ${n.palette.divider}`,backgroundColor:n.palette.common.white,fontWeight:500,fontSize:"11px",color:n.palette.text.primary,"&:hover":{background:"transparent"}}));var v="188px";function $({onCloseDropdown:n,filter:o,styles:g,header:R,searchable:c$1}){let[T,W]=useState([]),{t:f}=useTranslation(),p=useRef([]),B=o?.options?.map(e=>e.value).join(",")??"";useEffect(()=>{let e=i=>{let r=o?.data?.[o.apiKey]??[];if(Array.isArray(r)&&r.length)return new Set(r).has(i)},s=i=>i.map(({placeholder:r,value:t,isSelected:a,icon:l,options:d})=>{let x;if(c$1){let m=p.current.find(y=>y.apiKey===t);x=m!==void 0?m.isSelected??false:(a||e(t)||d?.every(({value:y})=>e(y)))??false;}else x=(a||e(t)||d?.every(({value:m})=>e(m)))??false;return {...r&&{label:r},name:t,selected:x,...l&&{icon:l},...d?.length&&{menuItems:s(d)}}});o.options&&W(s(o.options));},[o?.data,B,c$1]);let h=()=>{p.current=[];},P=e=>{h(),n(e);},I=()=>{if(c$1){let e=new Set(o?.data?.[o.apiKey]??[]);p.current.forEach(({apiKey:s,options:i,isSelected:r})=>{i?i.forEach(({apiKey:t,isSelected:a})=>{a?e.add(t):e.delete(t);}):r?e.add(s):e.delete(s);}),o?.onConfirm?.({[o.apiKey]:[...e]});}else {let e=p.current.reduce((s,{options:i,apiKey:r,isSelected:t})=>{if(i){let a=i.filter(({isSelected:l})=>l);a.length&&s.push(...a.map(({apiKey:l})=>l));}else t&&s.push(r);return s},[]);p.current.length&&o?.onConfirm?.({[o.apiKey]:[...new Set(e)]});}h();},V=s(I,n),A=e=>{I(),n(e);},N=e=>{let s=r=>r.map(({name:t,selected:a,menuItems:l,label:d})=>({...d&&{placeholder:d},apiKey:t,isSelected:a,...l?.length&&{options:s(l)}})),i=s(e);if(c$1){let r=new Set(i.map(t=>t.apiKey));p.current=[...p.current.filter(t=>!r.has(t.apiKey)),...i];}else p.current=i;},w=g?.maxWidth??v,k={maxWidth:w,width:`min(${w}, max-content)`};return jsx(c,{"data-testid":"ColumnFilter_List",title:f("filterBy")||"Filter by",menuItems:T,style:g,menuSx:k,sx:[e=>({...k,marginTop:"10px",textAlign:"left",boxShadow:e.shadows[3],overflow:"hidden",".nested-menu-item":{height:41,zIndex:9999}}),...(Array.isArray(o.sx)?o.sx:[o.sx]).filter(Boolean)],updatedList:N,header:R,onKeyDown:V,footer:jsxs(E,{sx:{position:"sticky",bottom:0,zIndex:99999},children:[jsx(O,{onClick:P,children:f("cancel")},"nested-dropdown-cancel"),jsx(b,{onClick:A,children:f("okay")},"nested-dropdown-ok")]})})}var M=memo($);var ce=M;export{v as a,Q as b,E as c,b as d,O as e,ce as f};
1
+ import {c}from'./chunk-66DANLIC.js';import {s}from'./chunk-O5KFJKRT.js';import {memo,useState,useRef,useEffect}from'react';import {useTranslation}from'react-i18next';import F from'@mui/material/Box';import K from'@mui/material/Button';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var Q=styled(F)(({theme:n})=>({background:n.palette.grey[700],width:27,height:14,display:"inline-flex",alignItems:"center",marginInlineStart:"4px",borderRadius:"10px",padding:"2px 6px",img:{cursor:"pointer"}})),E=styled(F)(()=>({padding:"8px 16px",display:"flex",gap:"8px",justifyContent:"center"})),b=styled(K)(({theme:n})=>({textTransform:"capitalize",minWidth:"auto",width:"100%",borderRadius:"4px",border:`1px solid ${n.palette.info.dark}`,backgroundColor:n.palette.info.dark,fontWeight:700,fontSize:"11px",color:n.palette.common.white,"&:hover":{backgroundColor:n.palette.info.dark}})),O=styled(K)(({theme:n})=>({textTransform:"capitalize",minWidth:"auto",width:"100%",borderRadius:"4px",border:`1px solid ${n.palette.divider}`,backgroundColor:n.palette.common.white,fontWeight:500,fontSize:"11px",color:n.palette.text.primary,"&:hover":{background:"transparent"}}));var v="188px";function $({onCloseDropdown:n,filter:o,styles:g,header:R,searchable:c$1}){let[T,W]=useState([]),{t:f}=useTranslation(),p=useRef([]),B=o?.options?.map(e=>e.value).join(",")??"";useEffect(()=>{let e=i=>{let r=o?.data?.[o.apiKey]??[];if(Array.isArray(r)&&r.length)return new Set(r).has(i)},s=i=>i.map(({placeholder:r,value:t,isSelected:a,icon:l,options:d})=>{let x;if(c$1){let m=p.current.find(y=>y.apiKey===t);x=m!==void 0?m.isSelected??false:(a||e(t)||d?.every(({value:y})=>e(y)))??false;}else x=(a||e(t)||d?.every(({value:m})=>e(m)))??false;return {...r&&{label:r},name:t,selected:x,...l&&{icon:l},...d?.length&&{menuItems:s(d)}}});o.options&&W(s(o.options));},[o?.data,B,c$1]);let h=()=>{p.current=[];},P=e=>{h(),n(e);},I=()=>{if(c$1){let e=new Set(o?.data?.[o.apiKey]??[]);p.current.forEach(({apiKey:s,options:i,isSelected:r})=>{i?i.forEach(({apiKey:t,isSelected:a})=>{a?e.add(t):e.delete(t);}):r?e.add(s):e.delete(s);}),o?.onConfirm?.({[o.apiKey]:[...e]});}else {let e=p.current.reduce((s,{options:i,apiKey:r,isSelected:t})=>{if(i){let a=i.filter(({isSelected:l})=>l);a.length&&s.push(...a.map(({apiKey:l})=>l));}else t&&s.push(r);return s},[]);p.current.length&&o?.onConfirm?.({[o.apiKey]:[...new Set(e)]});}h();},V=s(I,n),A=e=>{I(),n(e);},N=e=>{let s=r=>r.map(({name:t,selected:a,menuItems:l,label:d})=>({...d&&{placeholder:d},apiKey:t,isSelected:a,...l?.length&&{options:s(l)}})),i=s(e);if(c$1){let r=new Set(i.map(t=>t.apiKey));p.current=[...p.current.filter(t=>!r.has(t.apiKey)),...i];}else p.current=i;},w=g?.maxWidth??v,k={maxWidth:w,width:`min(${w}, max-content)`};return jsx(c,{"data-testid":"ColumnFilter_List",title:f("filterBy")||"Filter by",menuItems:T,style:g,menuSx:k,sx:[e=>({...k,marginTop:"10px",textAlign:"left",boxShadow:e.shadows[3],overflow:"hidden",".nested-menu-item":{height:41,zIndex:9999}}),...(Array.isArray(o.sx)?o.sx:[o.sx]).filter(Boolean)],updatedList:N,header:R,onKeyDown:V,footer:jsxs(E,{sx:{position:"sticky",bottom:0,zIndex:99999},children:[jsx(O,{onClick:P,children:f("cancel")},"nested-dropdown-cancel"),jsx(b,{onClick:A,children:f("okay")},"nested-dropdown-ok")]})})}var M=memo($);var ce=M;export{v as a,Q as b,E as c,b as d,O as e,ce as f};
@@ -1 +1 @@
1
- import {a as a$3}from'./chunk-H6HHXYRL.js';import {a as a$1}from'./chunk-C6FBKUMX.js';import {a as a$2}from'./chunk-O2SPQA5J.js';import {f}from'./chunk-DV5XS66I.js';import {a}from'./chunk-GNY2VGGW.js';import {wb,Fb,B,Db,Qc}from'./chunk-KCEYICHJ.js';import me,{useState,useRef,useMemo}from'react';import {Box,CircularProgress,Typography}from'@mui/material';import xe from'@mui/material/ClickAwayListener';import h from'@mui/material/Box';import le from'@mui/material/Input';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';styled(a)(({theme:e})=>({fontSize:"10px",color:e.palette.grey[700],fontWeight:600,lineHeight:"10px"}));styled(a)(({theme:e})=>({fontSize:"11px",color:e.palette.text.primary,fontWeight:600,lineHeight:"14.3px",width:200}));styled(h)(()=>({display:"flex",flexDirection:"column",maxHeight:400,overflow:"auto",gap:"8px"}));var H=styled(le)(({theme:e})=>({width:"inherit",height:32,padding:"11px 12px",fontSize:"10px",borderRadius:"5px",backgroundColor:"#F9F9F9",border:"1px solid transparent","&.Mui-focused":{borderColor:e.palette.info.dark}}));styled(f)({padding:0,width:12,height:12,".MuiSvgIcon-root, img":{width:12,height:12}});var D=styled(h)(()=>({display:"flex",flexDirection:"column",gap:"8px",padding:"4px"})),I=styled(h)(()=>({display:"flex",gap:"8px",padding:"4px",flexWrap:"wrap",paddingInlineEnd:"20px"})),M=styled(h)(({theme:e,maxWidth:o})=>({display:"flex",padding:"4px 8px 4px 6px",alignItems:"center",gap:"4px",borderRadius:"13px",backgroundColor:`${e.palette.info.dark}1a`,fontSize:"10px",fontWeight:500,cursor:"pointer",...o&&{maxWidth:`${o}%`}}));styled(a)(({theme:e})=>({display:"flex",gap:"8px",alignItems:"center",fontSize:"10px",fontWeight:500,color:e.palette.common.black,cursor:"pointer",padding:8}));var N=styled(h)(({theme:e})=>({width:"100%",flexDirection:"column",border:`1px solid ${e.palette.grey[100]}`,borderRadius:"4px",backgroundColor:e.palette.grey[400],minWidth:"89px",position:"relative"})),z=styled(h)(()=>({position:"absolute",right:8,bottom:13.5,width:15,height:15}));var R=e=>e.length===0?true:"value"in e[0],$=(e,o,p)=>o?e.filter(r=>p.some(a=>r?.[a]?.toLowerCase().includes(o.toLowerCase()))):e,G=(e,o,p)=>e.map(r=>{let a=r?.options.map(l=>{let S=l?.options?.filter(n=>p.some(d=>n?.[d]?.toLowerCase().includes(o.toLowerCase())));return {...l,options:S}}).filter(l=>l?.options?.length>0);return {...r,options:a}}).filter(r=>r?.options?.length>0);function X({childOption:e,selectedOptions:o,onChangeOptions:p}){let[r,a]=useState(null),l=n=>{p([...o||[],n]);},S=n=>{p(o?.filter(d=>d.value!==n.value)||[]);};return jsxs(a$1,{onMouseEnter:n=>{e.options?.length>0&&a(n.currentTarget);},onMouseLeave:()=>{r&&a(null);},children:[jsxs(Box,{sx:{display:"flex",gap:"12px",justifyContent:"space-between",flexGrow:1,alignItems:"center",maxWidth:"220px",minWidth:"89px"},children:[e.label,jsx("img",{src:wb,className:"arrow-icon",alt:"arrow"})]}),jsx(a$2,{sx:{maxHeight:"450px",overflow:"auto"},open:!!r,anchorEl:r,placement:"right-start",children:e.options?.map(n=>{let w=!!o?.find(s=>s.value===n.value);return jsx(a$1,{isSelected:w,onClick:s=>{s.stopPropagation(),s.preventDefault(),w?S(n):l(n);},children:jsx(Box,{sx:{flex:1,maxWidth:"220px",minWidth:"89px"},children:n.label})},n.value)})})]})}function J({parentOption:e,selectedOptions:o,onChangeOptions:p}){let[r,a]=useState(null);return jsxs(a$1,{onMouseEnter:l=>{e.options?.length>0&&a(l.currentTarget);},onMouseLeave:()=>{r&&a(null);},children:[jsxs(Box,{sx:{display:"flex",gap:"12px",justifyContent:"space-between",flexGrow:1,alignItems:"center",maxWidth:"340px",minWidth:"89px"},children:[e.label,jsx("img",{src:wb,className:"arrow-icon",alt:"arrow"})]}),jsx(a$2,{sx:{maxHeight:"450px",overflow:"auto"},open:!!r,anchorEl:r,placement:"right-start",children:e.options?.map(l=>jsx(X,{childOption:l,selectedOptions:o,onChangeOptions:p},l.label))})]})}function Q({option:e,selectedOptions:o,onChangeOptions:p}){let r=o?.some(a=>a.value===e.value)??false;return jsx(a$1,{isSelected:r,onClick:a=>{if(a.stopPropagation(),a.preventDefault(),r){p(o?.filter(l=>l.value!==e.value)||[]);return}p([...o||[],e]);},children:jsx(Box,{sx:{flex:1,maxWidth:"220px",minWidth:"89px"},children:e.label})})}function ge({options:e,onChangeOptions:o,selectedOptions:p,placeholder:r,isLoading:a,searchBy:l=["label"],disabled:S}){let n=R(e),[d,w]=useState(null),[s,E]=useState(""),ee=useRef(null),b=!!d,te=t=>{w(b?null:t.currentTarget);},oe=()=>{w(null);},re=()=>{s&&E("");},T=useMemo(()=>{if(n)return $(e,s,l)},[n,e,s,l]),F=useMemo(()=>{if(!n)return s?G(e,s,l):e},[n,e,s,l]),ne=!!(n?T:F)?.length,ie=a?jsx(CircularProgress,{size:16}):jsx(a$3,{src:s?Fb:B,alt:s?"close":"search",onClick:re,sx:{width:12,height:12}}),f=Number(p?.length??0);return jsx(xe,{onClickAway:()=>{b&&oe();},children:jsxs(N,{id:"TriggerWrapper","data-testid":"MultiSelectWithSearch",onClick:t=>!S&&te(t),ref:ee,children:[jsx(Typography,{color:"grey",sx:{cursor:"pointer",fontSize:"10px",padding:"4px"},component:"label",children:r}),f===0&&jsx(Typography,{sx:{fontWeight:500,fontSize:"11px",padding:"0px 4px 4px"},component:"p",children:"Please Select"}),jsx(z,{component:"img",src:Db,alt:"down arrow",sx:{...b&&{transform:"rotate(180deg)"}}}),!!f&&jsx(I,{id:"SelectedBadgesWrapper",children:f>0&&f<=2?p?.map(t=>jsxs(M,{maxWidth:90,children:[jsx(a$3,{src:Qc,alt:"blue-check",sx:{width:10,height:7.5}}),jsx("span",{children:t.label})]},t.value)):f>2&&p?.slice(0,2)?.map((t,y)=>jsxs(me.Fragment,{children:[jsxs(M,{maxWidth:90,children:[jsx(a$3,{src:Qc,alt:"blue-check",sx:{width:10,height:7.5}}),jsx("span",{children:t.label})]}),y===1&&jsx(M,{maxWidth:90,children:jsxs("span",{children:["+",f-2]})})]},t.value))}),jsx(a$2,{open:b,anchorEl:d,sx:{margin:"8px 0",maxHeight:330,overflow:"auto",maxWidth:"340px"},children:jsxs(D,{children:[jsx(H,{placeholder:r||"Select",endAdornment:ie,onClick:t=>{t.stopPropagation();},value:s,onChange:t=>{E(t.target.value);},disableUnderline:true,sx:{cursor:"default",width:"100%",backgroundColor:"white",border:"1px solid #F2F2F2",...ne&&{marginBottom:"4px"},...s&&{cursor:"pointer"}}}),jsx(I,{children:p?.map(t=>jsxs(M,{sx:{maxWidth:"150px"},onClick:y=>{y.stopPropagation(),y.preventDefault(),o(p?.filter(pe=>pe.value!==t.value)||[]);},children:[jsx(a$3,{src:Qc,alt:"blue-check",sx:{width:10,height:7.5}}),jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.label}),jsx(a$3,{src:Fb,alt:"close",sx:{width:9,height:9}})]},t.value))}),n?T?.map(t=>jsx(Q,{option:t,selectedOptions:p,onChangeOptions:o},t.value)):F?.map(t=>jsx(J,{parentOption:t,selectedOptions:p,onChangeOptions:o},t.label))]})})]})})}var j=ge;var st=j;export{X as a,J as b,Q as c,st as d};
1
+ import {a as a$3}from'./chunk-H6HHXYRL.js';import {a as a$1}from'./chunk-RBF2Y4OM.js';import {a as a$2}from'./chunk-O2SPQA5J.js';import {f}from'./chunk-ZPGWJ5RD.js';import {a}from'./chunk-GNY2VGGW.js';import {wb,Fb,B,Db,Qc}from'./chunk-KCEYICHJ.js';import me,{useState,useRef,useMemo}from'react';import {Box,CircularProgress,Typography}from'@mui/material';import xe from'@mui/material/ClickAwayListener';import h from'@mui/material/Box';import le from'@mui/material/Input';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';styled(a)(({theme:e})=>({fontSize:"10px",color:e.palette.grey[700],fontWeight:600,lineHeight:"10px"}));styled(a)(({theme:e})=>({fontSize:"11px",color:e.palette.text.primary,fontWeight:600,lineHeight:"14.3px",width:200}));styled(h)(()=>({display:"flex",flexDirection:"column",maxHeight:400,overflow:"auto",gap:"8px"}));var H=styled(le)(({theme:e})=>({width:"inherit",height:32,padding:"11px 12px",fontSize:"10px",borderRadius:"5px",backgroundColor:"#F9F9F9",border:"1px solid transparent","&.Mui-focused":{borderColor:e.palette.info.dark}}));styled(f)({padding:0,width:12,height:12,".MuiSvgIcon-root, img":{width:12,height:12}});var D=styled(h)(()=>({display:"flex",flexDirection:"column",gap:"8px",padding:"4px"})),I=styled(h)(()=>({display:"flex",gap:"8px",padding:"4px",flexWrap:"wrap",paddingInlineEnd:"20px"})),M=styled(h)(({theme:e,maxWidth:o})=>({display:"flex",padding:"4px 8px 4px 6px",alignItems:"center",gap:"4px",borderRadius:"13px",backgroundColor:`${e.palette.info.dark}1a`,fontSize:"10px",fontWeight:500,cursor:"pointer",...o&&{maxWidth:`${o}%`}}));styled(a)(({theme:e})=>({display:"flex",gap:"8px",alignItems:"center",fontSize:"10px",fontWeight:500,color:e.palette.common.black,cursor:"pointer",padding:8}));var N=styled(h)(({theme:e})=>({width:"100%",flexDirection:"column",border:`1px solid ${e.palette.grey[100]}`,borderRadius:"4px",backgroundColor:e.palette.grey[400],minWidth:"89px",position:"relative"})),z=styled(h)(()=>({position:"absolute",right:8,bottom:13.5,width:15,height:15}));var R=e=>e.length===0?true:"value"in e[0],$=(e,o,p)=>o?e.filter(r=>p.some(a=>r?.[a]?.toLowerCase().includes(o.toLowerCase()))):e,G=(e,o,p)=>e.map(r=>{let a=r?.options.map(l=>{let S=l?.options?.filter(n=>p.some(d=>n?.[d]?.toLowerCase().includes(o.toLowerCase())));return {...l,options:S}}).filter(l=>l?.options?.length>0);return {...r,options:a}}).filter(r=>r?.options?.length>0);function X({childOption:e,selectedOptions:o,onChangeOptions:p}){let[r,a]=useState(null),l=n=>{p([...o||[],n]);},S=n=>{p(o?.filter(d=>d.value!==n.value)||[]);};return jsxs(a$1,{onMouseEnter:n=>{e.options?.length>0&&a(n.currentTarget);},onMouseLeave:()=>{r&&a(null);},children:[jsxs(Box,{sx:{display:"flex",gap:"12px",justifyContent:"space-between",flexGrow:1,alignItems:"center",maxWidth:"220px",minWidth:"89px"},children:[e.label,jsx("img",{src:wb,className:"arrow-icon",alt:"arrow"})]}),jsx(a$2,{sx:{maxHeight:"450px",overflow:"auto"},open:!!r,anchorEl:r,placement:"right-start",children:e.options?.map(n=>{let w=!!o?.find(s=>s.value===n.value);return jsx(a$1,{isSelected:w,onClick:s=>{s.stopPropagation(),s.preventDefault(),w?S(n):l(n);},children:jsx(Box,{sx:{flex:1,maxWidth:"220px",minWidth:"89px"},children:n.label})},n.value)})})]})}function J({parentOption:e,selectedOptions:o,onChangeOptions:p}){let[r,a]=useState(null);return jsxs(a$1,{onMouseEnter:l=>{e.options?.length>0&&a(l.currentTarget);},onMouseLeave:()=>{r&&a(null);},children:[jsxs(Box,{sx:{display:"flex",gap:"12px",justifyContent:"space-between",flexGrow:1,alignItems:"center",maxWidth:"340px",minWidth:"89px"},children:[e.label,jsx("img",{src:wb,className:"arrow-icon",alt:"arrow"})]}),jsx(a$2,{sx:{maxHeight:"450px",overflow:"auto"},open:!!r,anchorEl:r,placement:"right-start",children:e.options?.map(l=>jsx(X,{childOption:l,selectedOptions:o,onChangeOptions:p},l.label))})]})}function Q({option:e,selectedOptions:o,onChangeOptions:p}){let r=o?.some(a=>a.value===e.value)??false;return jsx(a$1,{isSelected:r,onClick:a=>{if(a.stopPropagation(),a.preventDefault(),r){p(o?.filter(l=>l.value!==e.value)||[]);return}p([...o||[],e]);},children:jsx(Box,{sx:{flex:1,maxWidth:"220px",minWidth:"89px"},children:e.label})})}function ge({options:e,onChangeOptions:o,selectedOptions:p,placeholder:r,isLoading:a,searchBy:l=["label"],disabled:S}){let n=R(e),[d,w]=useState(null),[s,E]=useState(""),ee=useRef(null),b=!!d,te=t=>{w(b?null:t.currentTarget);},oe=()=>{w(null);},re=()=>{s&&E("");},T=useMemo(()=>{if(n)return $(e,s,l)},[n,e,s,l]),F=useMemo(()=>{if(!n)return s?G(e,s,l):e},[n,e,s,l]),ne=!!(n?T:F)?.length,ie=a?jsx(CircularProgress,{size:16}):jsx(a$3,{src:s?Fb:B,alt:s?"close":"search",onClick:re,sx:{width:12,height:12}}),f=Number(p?.length??0);return jsx(xe,{onClickAway:()=>{b&&oe();},children:jsxs(N,{id:"TriggerWrapper","data-testid":"MultiSelectWithSearch",onClick:t=>!S&&te(t),ref:ee,children:[jsx(Typography,{color:"grey",sx:{cursor:"pointer",fontSize:"10px",padding:"4px"},component:"label",children:r}),f===0&&jsx(Typography,{sx:{fontWeight:500,fontSize:"11px",padding:"0px 4px 4px"},component:"p",children:"Please Select"}),jsx(z,{component:"img",src:Db,alt:"down arrow",sx:{...b&&{transform:"rotate(180deg)"}}}),!!f&&jsx(I,{id:"SelectedBadgesWrapper",children:f>0&&f<=2?p?.map(t=>jsxs(M,{maxWidth:90,children:[jsx(a$3,{src:Qc,alt:"blue-check",sx:{width:10,height:7.5}}),jsx("span",{children:t.label})]},t.value)):f>2&&p?.slice(0,2)?.map((t,y)=>jsxs(me.Fragment,{children:[jsxs(M,{maxWidth:90,children:[jsx(a$3,{src:Qc,alt:"blue-check",sx:{width:10,height:7.5}}),jsx("span",{children:t.label})]}),y===1&&jsx(M,{maxWidth:90,children:jsxs("span",{children:["+",f-2]})})]},t.value))}),jsx(a$2,{open:b,anchorEl:d,sx:{margin:"8px 0",maxHeight:330,overflow:"auto",maxWidth:"340px"},children:jsxs(D,{children:[jsx(H,{placeholder:r||"Select",endAdornment:ie,onClick:t=>{t.stopPropagation();},value:s,onChange:t=>{E(t.target.value);},disableUnderline:true,sx:{cursor:"default",width:"100%",backgroundColor:"white",border:"1px solid #F2F2F2",...ne&&{marginBottom:"4px"},...s&&{cursor:"pointer"}}}),jsx(I,{children:p?.map(t=>jsxs(M,{sx:{maxWidth:"150px"},onClick:y=>{y.stopPropagation(),y.preventDefault(),o(p?.filter(pe=>pe.value!==t.value)||[]);},children:[jsx(a$3,{src:Qc,alt:"blue-check",sx:{width:10,height:7.5}}),jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.label}),jsx(a$3,{src:Fb,alt:"close",sx:{width:9,height:9}})]},t.value))}),n?T?.map(t=>jsx(Q,{option:t,selectedOptions:p,onChangeOptions:o},t.value)):F?.map(t=>jsx(J,{parentOption:t,selectedOptions:p,onChangeOptions:o},t.label))]})})]})})}var j=ge;var st=j;export{X as a,J as b,Q as c,st as d};
@@ -1 +1 @@
1
- import {d as d$1}from'./chunk-KKIVDOOU.js';import {a}from'./chunk-ABYPGA6A.js';import {yc}from'./chunk-2CIV4TII.js';import {Fb,B}from'./chunk-KCEYICHJ.js';import {useId,useMemo,useState}from'react';import d from'@mui/material/Box';import R from'@mui/material/Skeleton';import {styled}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var b=styled(d)(({theme:e})=>({display:"flex",flexDirection:"column",borderRadius:"8px",border:`1px solid ${e.palette.divider}`,backgroundColor:e.palette.common.white,maxHeight:"232px",overflow:"auto"})),k=styled(d)(()=>({display:"flex",flexDirection:"column",gap:"8px"})),v=styled(d,{shouldForwardProp:e=>e!=="$active"})(({$active:e})=>({display:"flex",alignItems:"center",justifyContent:"center",width:"13px",height:"13px",borderRadius:"50%",...e&&{backgroundColor:"#F2F2F2"}})),y=styled("img",{shouldForwardProp:e=>e!=="$isClear"})(({$isClear:e})=>({...e&&{backgroundColor:"#F2F2F2",borderRadius:"4px",width:"8px",height:"8px"}})),W=styled(d$1,{shouldForwardProp:e=>e!=="$hasSearchValue"})(({$hasSearchValue:e})=>({cursor:e?"pointer":"default",width:"100%",fontSize:"11px",border:"1px solid #F2F2F2",backgroundColor:"#fff","&.Mui-disabled":{backgroundColor:"#F8F8F8"}})),w=styled(a)(({theme:e})=>({backgroundColor:"#F8F8F8",fontSize:"11px",fontWeight:600,padding:"4px 8px",color:e.palette.info.dark,gap:"4px"})),A=styled(a)(()=>({fontSize:"11px",padding:"4px 8px",gap:"4px",fontWeight:400})),L=styled(R)(()=>({width:"100%",height:24}));function M({onSalesChannelChange:e,onSearchChange:h,filteredOptions:a,isLoading:P,initialSalesChannels:m,initialSalesChannelsSearch:V}){let B$1=yc(useId(),"sales-channel-filter"),o=useMemo(()=>m||[],[m]),[l,u]=useState(V||""),S=t=>o.some(i=>i.id===t),s=useMemo(()=>o?.length===a.length&&a?.length>0,[o,a]),g=useMemo(()=>o?.some(t=>t.id==="blank")&&o?.length===1,[o]),x=useMemo(()=>o?.length===0||g,[g,o?.length]);return jsxs(k,{id:B$1,"data-testid":"SalesChannelFilter",children:[jsx(W,{$hasSearchValue:!!l,placeholder:"Search",endAdornment:!x&&jsx(v,{$active:!!l,children:jsx(y,{src:l?Fb:B,alt:"search",$isClear:!!l,onClick:()=>{u(""),h("");}})}),disabled:x,onChange:t=>{u(t.target.value),h(t.target.value);},value:l,disableUnderline:true}),jsx(b,{children:P?Array.from({length:9}).map((t,i)=>jsx(L,{variant:"rectangular"},i)):jsxs(Fragment,{children:[jsx(w,{isSelected:s,isIndeterminate:!s&&(o?.length||0)>0,onClick:t=>{t.stopPropagation(),e(s?[]:a);},children:s?"Deselect All":"Select All"}),a.map(t=>jsx(A,{isSelected:S(t.id),onClick:i=>{i.stopPropagation();let O=S(t.id)?o?.filter(D=>D.id!==t.id):[...o??[],t];e(O);},children:t?.name?.en},t.id))]})})]})}export{M as a};
1
+ import {d as d$1}from'./chunk-PDIRJI75.js';import {a}from'./chunk-AMSY5XTV.js';import {yc}from'./chunk-2CIV4TII.js';import {Fb,B}from'./chunk-KCEYICHJ.js';import {useId,useMemo,useState}from'react';import d from'@mui/material/Box';import R from'@mui/material/Skeleton';import {styled}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var b=styled(d)(({theme:e})=>({display:"flex",flexDirection:"column",borderRadius:"8px",border:`1px solid ${e.palette.divider}`,backgroundColor:e.palette.common.white,maxHeight:"232px",overflow:"auto"})),k=styled(d)(()=>({display:"flex",flexDirection:"column",gap:"8px"})),v=styled(d,{shouldForwardProp:e=>e!=="$active"})(({$active:e})=>({display:"flex",alignItems:"center",justifyContent:"center",width:"13px",height:"13px",borderRadius:"50%",...e&&{backgroundColor:"#F2F2F2"}})),y=styled("img",{shouldForwardProp:e=>e!=="$isClear"})(({$isClear:e})=>({...e&&{backgroundColor:"#F2F2F2",borderRadius:"4px",width:"8px",height:"8px"}})),W=styled(d$1,{shouldForwardProp:e=>e!=="$hasSearchValue"})(({$hasSearchValue:e})=>({cursor:e?"pointer":"default",width:"100%",fontSize:"11px",border:"1px solid #F2F2F2",backgroundColor:"#fff","&.Mui-disabled":{backgroundColor:"#F8F8F8"}})),w=styled(a)(({theme:e})=>({backgroundColor:"#F8F8F8",fontSize:"11px",fontWeight:600,padding:"4px 8px",color:e.palette.info.dark,gap:"4px"})),A=styled(a)(()=>({fontSize:"11px",padding:"4px 8px",gap:"4px",fontWeight:400})),L=styled(R)(()=>({width:"100%",height:24}));function M({onSalesChannelChange:e,onSearchChange:h,filteredOptions:a,isLoading:P,initialSalesChannels:m,initialSalesChannelsSearch:V}){let B$1=yc(useId(),"sales-channel-filter"),o=useMemo(()=>m||[],[m]),[l,u]=useState(V||""),S=t=>o.some(i=>i.id===t),s=useMemo(()=>o?.length===a.length&&a?.length>0,[o,a]),g=useMemo(()=>o?.some(t=>t.id==="blank")&&o?.length===1,[o]),x=useMemo(()=>o?.length===0||g,[g,o?.length]);return jsxs(k,{id:B$1,"data-testid":"SalesChannelFilter",children:[jsx(W,{$hasSearchValue:!!l,placeholder:"Search",endAdornment:!x&&jsx(v,{$active:!!l,children:jsx(y,{src:l?Fb:B,alt:"search",$isClear:!!l,onClick:()=>{u(""),h("");}})}),disabled:x,onChange:t=>{u(t.target.value),h(t.target.value);},value:l,disableUnderline:true}),jsx(b,{children:P?Array.from({length:9}).map((t,i)=>jsx(L,{variant:"rectangular"},i)):jsxs(Fragment,{children:[jsx(w,{isSelected:s,isIndeterminate:!s&&(o?.length||0)>0,onClick:t=>{t.stopPropagation(),e(s?[]:a);},children:s?"Deselect All":"Select All"}),a.map(t=>jsx(A,{isSelected:S(t.id),onClick:i=>{i.stopPropagation();let O=S(t.id)?o?.filter(D=>D.id!==t.id):[...o??[],t];e(O);},children:t?.name?.en},t.id))]})})]})}export{M as a};
@@ -1 +1 @@
1
- import {a as a$1}from'./chunk-CWBSYHQB.js';import {a as a$2}from'./chunk-26M2HXR5.js';import {f}from'./chunk-DV5XS66I.js';import {a}from'./chunk-GNY2VGGW.js';import {yc}from'./chunk-2CIV4TII.js';import {Qc}from'./chunk-KCEYICHJ.js';import {useId,useState,useCallback,useMemo,createElement}from'react';import c from'@mui/material/Box';import ne from'@mui/material/Typography';import O from'@mui/material/Input';import {styled}from'@mui/material/styles';import {CircularProgress}from'@mui/material';import ee from'@mui/material/SvgIcon';import {jsx,jsxs}from'react/jsx-runtime';var xe=styled(a)(({theme:e})=>({fontSize:"10px",color:e.palette.grey[700],fontWeight:600,lineHeight:"10px"})),fe=styled(a)(({theme:e})=>({fontSize:"11px",color:e.palette.text.primary,fontWeight:600,lineHeight:"14.3px",width:200})),Se=styled(c)(()=>({display:"flex",flexDirection:"column",maxHeight:400,overflow:"auto",gap:"8px"})),D=styled(O)(({theme:e})=>({width:"inherit",height:32,padding:"11px 12px",fontSize:"10px",borderRadius:"5px",backgroundColor:"#F9F9F9",border:"1px solid transparent","&.Mui-focused":{borderColor:e.palette.info.dark}})),ge=styled(f)({padding:0,width:12,height:12,".MuiSvgIcon-root, img":{width:12,height:12}}),F=styled(c)(()=>({display:"flex",flexDirection:"column",gap:"8px",padding:"4px"})),Ce=styled(c)(()=>({display:"flex",gap:"8px",padding:"4px",flexWrap:"wrap"})),Ie=styled(c)(({theme:e})=>({display:"flex",padding:"4px 8px 4px 6px",alignItems:"center",gap:"4px",borderRadius:"13px",backgroundColor:`${e.palette.info.dark}1a`,fontSize:"10px",fontWeight:500,cursor:"pointer"})),g=styled(a)(({theme:e,selected:n})=>({display:"flex",gap:"8px",alignItems:"center",fontSize:"10px",fontWeight:500,color:e.palette.common.black,cursor:"pointer",padding:8,justifyContent:"space-between",...n&&{backgroundColor:"#F8F8F8"}}));var te="M4.83332 0C2.16987 0 0 2.16988 0 4.83334C0 7.4968 2.16987 9.66668 4.83332 9.66668C5.98544 9.66668 7.04455 9.2597 7.87628 8.58335L11.1465 11.8535C11.1925 11.9015 11.2477 11.9398 11.3088 11.9662C11.3698 11.9926 11.4356 12.0066 11.5021 12.0072C11.5686 12.0079 11.6346 11.9953 11.6962 11.9702C11.7578 11.945 11.8137 11.9078 11.8607 11.8608C11.9078 11.8138 11.945 11.7578 11.9701 11.6962C11.9953 11.6346 12.0079 11.5686 12.0072 11.5021C12.0065 11.4356 11.9926 11.3699 11.9662 11.3088C11.9398 11.2478 11.9015 11.1926 11.8535 11.1465L8.58331 7.87632C9.25966 7.04458 9.66664 5.98546 9.66664 4.83334C9.66664 2.16988 7.49677 0 4.83332 0ZM4.83332 1C6.95633 1 8.66665 2.71032 8.66665 4.83334C8.66665 5.86755 8.25871 6.80192 7.59699 7.49025C7.5562 7.52023 7.5202 7.55623 7.49022 7.59702C6.80189 8.25875 5.86752 8.66668 4.83332 8.66668C2.71031 8.66668 0.999997 6.95636 0.999997 4.83334C0.999997 2.71032 2.71031 1 4.83332 1Z";function oe({size:e=12,sx:n,className:r,...d}){return jsx(ee,{viewBox:"0 0 12 12",inheritViewBox:true,className:`${r??""} MUISvgIcon__search-icon`,sx:{width:e,height:e,color:"text.primary",...n},...d,children:jsx("path",{d:te,fill:"currentColor"})})}var N=oe;function pe({options:e,onChangeOption:n,selectedOption:r,placeholder:d,label:A,isLoading:R,renderOption:C,iconUrl:h,disabled:u,onClearValue:m,slotProps:V={},hideSelectedCheckmark:$,listWrapperSx:Z={},name:U,...q}){let G=yc(useId(),"select-with-search"),{selectInput:I={},searchInput:J={},dropdownContainer:v={},item:b={}}=V,[w,y]=useState(null),[a,x]=useState(""),K=useCallback(()=>{m!==void 0?m():n(null);},[m,n]),f=!!w,Q=t=>{u||y(f?null:t.currentTarget);},S=()=>{y(null),x("");},X=R?jsx(CircularProgress,{size:16}):jsx(N,{onClick:()=>{a&&x("");},role:"button"}),W=useMemo(()=>a?e.filter(t=>{let p=t?.label?.toLowerCase(),j=t?.value?.toLowerCase();return p?.includes(a.toLowerCase())||j?.includes(a.toLowerCase())}):e,[e,a]),Y=useMemo(()=>jsx(c,{sx:{display:"flex",alignItems:"center",maxWidth:16},children:jsx(c,{component:"img",src:h,alt:"icon",sx:{maxWidth:12,height:12}})}),[h]);return jsx(a$1,{id:G,"data-testid":"SelectWithSearch",disabled:u,open:f,anchorEl:w,onOpen:Q,onClose:S,hasValue:!!r?.value,onClear:K,trigger:jsx(a$2,{className:"SelectWithSearch_input",name:U,placeholder:"Please Select",label:A,sx:{cursor:"pointer"},value:r?.label||"",InputLabelProps:{filled:!!r?.label},disabled:u,...I,InputProps:{readOnly:true,disableUnderline:true,...!!h&&{startAdornment:Y},...I.InputProps}}),listWrapperSx:{height:"100%",overflow:"hidden",...Z},slotProps:{popover:{slotProps:{paper:{sx:{overflow:"hidden"}}}}},...q,children:jsxs(F,{...v,className:`SelectWithSearch_container ${v?.className??""}`,children:[jsx(D,{className:"SelectWithSearch_input",placeholder:d||"Select",endAdornment:X,onClick:t=>{t.stopPropagation();},value:a,onChange:t=>{x(t.target.value);},disableUnderline:true,sx:{cursor:"default",width:"100%",backgroundColor:"white",border:"1px solid #F2F2F2",...e.length&&{marginBottom:"4px"},...a&&{cursor:"pointer"}},...J}),jsxs(c,{className:"SelectWithSearch_options",overflow:"auto",maxHeight:400,children:[W.length===0&&a&&jsx(g,{selected:false,...b,children:jsx(ne,{component:"span",fontSize:"10px",fontWeight:500,color:"#8D8D94",children:"No results found"})}),W.map(t=>C?C(t,{closeDropdown:S,open:f}):createElement(g,{...b,className:`SelectWithSearch_item ${r?.value===t.value?"SelectWithSearch_item-selected":""}`,key:t.value,selected:r?.value===t.value,onClick:p=>{p.stopPropagation(),p.preventDefault(),r?.value===t.value?n(null):n(t),S();}},jsx("span",{children:t.label}),!$&&r?.value===t?.value&&jsx(c,{component:"img",src:Qc,alt:"close",sx:{width:10,height:7.5}})))]})]})})}var H=pe;var Ve=H;export{xe as a,fe as b,Se as c,D as d,ge as e,F as f,Ce as g,Ie as h,g as i,Ve as j};
1
+ import {a as a$1}from'./chunk-CWBSYHQB.js';import {a as a$2}from'./chunk-26M2HXR5.js';import {f}from'./chunk-ZPGWJ5RD.js';import {a}from'./chunk-GNY2VGGW.js';import {yc}from'./chunk-2CIV4TII.js';import {Qc}from'./chunk-KCEYICHJ.js';import {useId,useState,useCallback,useMemo,createElement}from'react';import c from'@mui/material/Box';import ne from'@mui/material/Typography';import O from'@mui/material/Input';import {styled}from'@mui/material/styles';import {CircularProgress}from'@mui/material';import ee from'@mui/material/SvgIcon';import {jsx,jsxs}from'react/jsx-runtime';var xe=styled(a)(({theme:e})=>({fontSize:"10px",color:e.palette.grey[700],fontWeight:600,lineHeight:"10px"})),fe=styled(a)(({theme:e})=>({fontSize:"11px",color:e.palette.text.primary,fontWeight:600,lineHeight:"14.3px",width:200})),Se=styled(c)(()=>({display:"flex",flexDirection:"column",maxHeight:400,overflow:"auto",gap:"8px"})),D=styled(O)(({theme:e})=>({width:"inherit",height:32,padding:"11px 12px",fontSize:"10px",borderRadius:"5px",backgroundColor:"#F9F9F9",border:"1px solid transparent","&.Mui-focused":{borderColor:e.palette.info.dark}})),ge=styled(f)({padding:0,width:12,height:12,".MuiSvgIcon-root, img":{width:12,height:12}}),F=styled(c)(()=>({display:"flex",flexDirection:"column",gap:"8px",padding:"4px"})),Ce=styled(c)(()=>({display:"flex",gap:"8px",padding:"4px",flexWrap:"wrap"})),Ie=styled(c)(({theme:e})=>({display:"flex",padding:"4px 8px 4px 6px",alignItems:"center",gap:"4px",borderRadius:"13px",backgroundColor:`${e.palette.info.dark}1a`,fontSize:"10px",fontWeight:500,cursor:"pointer"})),g=styled(a)(({theme:e,selected:n})=>({display:"flex",gap:"8px",alignItems:"center",fontSize:"10px",fontWeight:500,color:e.palette.common.black,cursor:"pointer",padding:8,justifyContent:"space-between",...n&&{backgroundColor:"#F8F8F8"}}));var te="M4.83332 0C2.16987 0 0 2.16988 0 4.83334C0 7.4968 2.16987 9.66668 4.83332 9.66668C5.98544 9.66668 7.04455 9.2597 7.87628 8.58335L11.1465 11.8535C11.1925 11.9015 11.2477 11.9398 11.3088 11.9662C11.3698 11.9926 11.4356 12.0066 11.5021 12.0072C11.5686 12.0079 11.6346 11.9953 11.6962 11.9702C11.7578 11.945 11.8137 11.9078 11.8607 11.8608C11.9078 11.8138 11.945 11.7578 11.9701 11.6962C11.9953 11.6346 12.0079 11.5686 12.0072 11.5021C12.0065 11.4356 11.9926 11.3699 11.9662 11.3088C11.9398 11.2478 11.9015 11.1926 11.8535 11.1465L8.58331 7.87632C9.25966 7.04458 9.66664 5.98546 9.66664 4.83334C9.66664 2.16988 7.49677 0 4.83332 0ZM4.83332 1C6.95633 1 8.66665 2.71032 8.66665 4.83334C8.66665 5.86755 8.25871 6.80192 7.59699 7.49025C7.5562 7.52023 7.5202 7.55623 7.49022 7.59702C6.80189 8.25875 5.86752 8.66668 4.83332 8.66668C2.71031 8.66668 0.999997 6.95636 0.999997 4.83334C0.999997 2.71032 2.71031 1 4.83332 1Z";function oe({size:e=12,sx:n,className:r,...d}){return jsx(ee,{viewBox:"0 0 12 12",inheritViewBox:true,className:`${r??""} MUISvgIcon__search-icon`,sx:{width:e,height:e,color:"text.primary",...n},...d,children:jsx("path",{d:te,fill:"currentColor"})})}var N=oe;function pe({options:e,onChangeOption:n,selectedOption:r,placeholder:d,label:A,isLoading:R,renderOption:C,iconUrl:h,disabled:u,onClearValue:m,slotProps:V={},hideSelectedCheckmark:$,listWrapperSx:Z={},name:U,...q}){let G=yc(useId(),"select-with-search"),{selectInput:I={},searchInput:J={},dropdownContainer:v={},item:b={}}=V,[w,y]=useState(null),[a,x]=useState(""),K=useCallback(()=>{m!==void 0?m():n(null);},[m,n]),f=!!w,Q=t=>{u||y(f?null:t.currentTarget);},S=()=>{y(null),x("");},X=R?jsx(CircularProgress,{size:16}):jsx(N,{onClick:()=>{a&&x("");},role:"button"}),W=useMemo(()=>a?e.filter(t=>{let p=t?.label?.toLowerCase(),j=t?.value?.toLowerCase();return p?.includes(a.toLowerCase())||j?.includes(a.toLowerCase())}):e,[e,a]),Y=useMemo(()=>jsx(c,{sx:{display:"flex",alignItems:"center",maxWidth:16},children:jsx(c,{component:"img",src:h,alt:"icon",sx:{maxWidth:12,height:12}})}),[h]);return jsx(a$1,{id:G,"data-testid":"SelectWithSearch",disabled:u,open:f,anchorEl:w,onOpen:Q,onClose:S,hasValue:!!r?.value,onClear:K,trigger:jsx(a$2,{className:"SelectWithSearch_input",name:U,placeholder:"Please Select",label:A,sx:{cursor:"pointer"},value:r?.label||"",InputLabelProps:{filled:!!r?.label},disabled:u,...I,InputProps:{readOnly:true,disableUnderline:true,...!!h&&{startAdornment:Y},...I.InputProps}}),listWrapperSx:{height:"100%",overflow:"hidden",...Z},slotProps:{popover:{slotProps:{paper:{sx:{overflow:"hidden"}}}}},...q,children:jsxs(F,{...v,className:`SelectWithSearch_container ${v?.className??""}`,children:[jsx(D,{className:"SelectWithSearch_input",placeholder:d||"Select",endAdornment:X,onClick:t=>{t.stopPropagation();},value:a,onChange:t=>{x(t.target.value);},disableUnderline:true,sx:{cursor:"default",width:"100%",backgroundColor:"white",border:"1px solid #F2F2F2",...e.length&&{marginBottom:"4px"},...a&&{cursor:"pointer"}},...J}),jsxs(c,{className:"SelectWithSearch_options",overflow:"auto",maxHeight:400,children:[W.length===0&&a&&jsx(g,{selected:false,...b,children:jsx(ne,{component:"span",fontSize:"10px",fontWeight:500,color:"#8D8D94",children:"No results found"})}),W.map(t=>C?C(t,{closeDropdown:S,open:f}):createElement(g,{...b,className:`SelectWithSearch_item ${r?.value===t.value?"SelectWithSearch_item-selected":""}`,key:t.value,selected:r?.value===t.value,onClick:p=>{p.stopPropagation(),p.preventDefault(),r?.value===t.value?n(null):n(t),S();}},jsx("span",{children:t.label}),!$&&r?.value===t?.value&&jsx(c,{component:"img",src:Qc,alt:"close",sx:{width:10,height:7.5}})))]})]})})}var H=pe;var Ve=H;export{xe as a,fe as b,Se as c,D as d,ge as e,F as f,Ce as g,Ie as h,g as i,Ve as j};
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-AMSY5XTV.js';var m=a;export{m as a};
@@ -1 +1 @@
1
- import {a as a$1}from'./chunk-C6FBKUMX.js';import {a}from'./chunk-O2SPQA5J.js';import {a as a$2}from'./chunk-NJFK5TAC.js';import {yc}from'./chunk-2CIV4TII.js';import {Db}from'./chunk-KCEYICHJ.js';import {Box}from'@mui/material';import r from'@mui/material/Box';import {styled}from'@mui/material/styles';import {useId,useState}from'react';import {jsxs,jsx}from'react/jsx-runtime';var h=styled(r,{shouldForwardProp:o=>o!=="open"})(({theme:o,open:a})=>({minWidth:105,height:32,cursor:"pointer",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"1px",border:`1px solid ${o.palette.divider}`,borderRadius:"4px",padding:"7px 8px",paddingRight:"4px",...a&&{boxShadow:o.shadows[7],borderColor:o.palette.info.dark}})),w=styled(r)(()=>({display:"flex",flexDirection:"column",gap:"1px"})),b=styled(r)(()=>({fontWeight:600,fontSize:"8px",color:"#8D8D94"})),v=styled(r)(({theme:o})=>({fontWeight:500,fontSize:"11px",lineHeight:1.1,color:o.palette.text.primary}));function i({defaultValue:o,label:a$3,onChange:D,options:l}){let M=yc(useId(),"dropdown2"),[d,s]=useState(null),[y,E]=useState(o),t=!!d,W=e=>{t||s(e.currentTarget);},m=()=>{t&&s(null);},k=e=>{E(e),D?.(e),m();};return jsxs(h,{onClick:W,open:t,id:M,"data-testid":"Dropdown2",children:[jsxs(w,{children:[jsx(b,{children:a$3}),jsx(v,{children:y})]}),jsx(Box,{component:"img",src:Db,alt:"down arrow",sx:{width:15,...t&&{transform:"rotate(180deg)"}}}),jsx(a,{open:t,anchorEl:d,sx:{minWidth:105,marginTop:"8px",marginBottom:"8px"},placement:"top",children:l.map((e,B)=>jsx(a$1,{onClick:()=>{k(e.value);},sx:T=>({...B!==l.length-1&&{borderBottom:`1px solid ${T.palette.divider}`}}),children:e.label},e.value))}),t&&jsx(a$2,{onClick:m})]})}var Q=i;export{Q as a};
1
+ import {a as a$1}from'./chunk-RBF2Y4OM.js';import {a}from'./chunk-O2SPQA5J.js';import {a as a$2}from'./chunk-NJFK5TAC.js';import {yc}from'./chunk-2CIV4TII.js';import {Db}from'./chunk-KCEYICHJ.js';import {Box}from'@mui/material';import r from'@mui/material/Box';import {styled}from'@mui/material/styles';import {useId,useState}from'react';import {jsxs,jsx}from'react/jsx-runtime';var h=styled(r,{shouldForwardProp:o=>o!=="open"})(({theme:o,open:a})=>({minWidth:105,height:32,cursor:"pointer",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"1px",border:`1px solid ${o.palette.divider}`,borderRadius:"4px",padding:"7px 8px",paddingRight:"4px",...a&&{boxShadow:o.shadows[7],borderColor:o.palette.info.dark}})),w=styled(r)(()=>({display:"flex",flexDirection:"column",gap:"1px"})),b=styled(r)(()=>({fontWeight:600,fontSize:"8px",color:"#8D8D94"})),v=styled(r)(({theme:o})=>({fontWeight:500,fontSize:"11px",lineHeight:1.1,color:o.palette.text.primary}));function i({defaultValue:o,label:a$3,onChange:D,options:l}){let M=yc(useId(),"dropdown2"),[d,s]=useState(null),[y,E]=useState(o),t=!!d,W=e=>{t||s(e.currentTarget);},m=()=>{t&&s(null);},k=e=>{E(e),D?.(e),m();};return jsxs(h,{onClick:W,open:t,id:M,"data-testid":"Dropdown2",children:[jsxs(w,{children:[jsx(b,{children:a$3}),jsx(v,{children:y})]}),jsx(Box,{component:"img",src:Db,alt:"down arrow",sx:{width:15,...t&&{transform:"rotate(180deg)"}}}),jsx(a,{open:t,anchorEl:d,sx:{minWidth:105,marginTop:"8px",marginBottom:"8px"},placement:"top",children:l.map((e,B)=>jsx(a$1,{onClick:()=>{k(e.value);},sx:T=>({...B!==l.length-1&&{borderBottom:`1px solid ${T.palette.divider}`}}),children:e.label},e.value))}),t&&jsx(a$2,{onClick:m})]})}var Q=i;export{Q as a};
@@ -1 +1 @@
1
- import {f,b as b$1,g,a as a$3,e,d,c as c$1}from'./chunk-LDLGBNMM.js';import {a as a$5}from'./chunk-UJ4IYIJH.js';import {a as a$2}from'./chunk-H6HHXYRL.js';import {c}from'./chunk-4XDOS6NM.js';import {a as a$1}from'./chunk-ZONDSLTR.js';import {o,j as j$1,k,l,p}from'./chunk-RHUTFOWS.js';import {a}from'./chunk-KHM5KW53.js';import {b}from'./chunk-2U6YCW6N.js';import {z}from'./chunk-DV5XS66I.js';import {a as a$4}from'./chunk-4DSO4G5S.js';import {Va,yc,Ha,Ia,bc,f as f$1}from'./chunk-2CIV4TII.js';import {s}from'./chunk-BXMBE224.js';import {U,ui,wi,vi,ti,Ai,_g,Rg,Zg,Nj,Oj,ub,ck,fk,wk,dk,vb,wa,va,ok,h,Qg}from'./chunk-KCEYICHJ.js';import {useId,useMemo,useCallback}from'react';import {useTranslation}from'react-i18next';import {styled,Box,useTheme}from'@mui/material';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {motion}from'framer-motion';import {styled as styled$1,useTheme as useTheme$1}from'@mui/material/styles';import _ from'lodash/camelCase';import Qe from'@mui/material/Box';var lt={ORDER:{label:"order",icon:ti,color:"#5E30EB"},SAVED_CARD:{label:"cardAgreement",icon:vi,color:"#76BB40"},SUBSCRIPTION:{label:"subscription",icon:wi,color:"#00C7BE"},INSTALLMENT:{label:"installment",icon:ui,color:"#32ADE6"}},dt={SAVED_TOKEN:{label:"savedToken",icon:U,color:"#76BB40"},COUNT:{label:"countBadge",icon:"countBadge",color:"#76BB40"}};styled("span")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.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 ct=styled("span")(({theme:t})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:t.palette.text.primary})),mt=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px"}));function Ie({type:t,hasSavedCard:o,totalPaymentsCount:e,isTextShown:r}){let l=yc(useId(),"agreement-icon"),p=useTheme(),{t:a$3}=useTranslation(),n=useMemo(()=>[...o?[dt.SAVED_TOKEN]:[],...(e||0)>0?[dt.COUNT]:[],...t&&lt[t]?[lt[t]]:[]],[o,e,t]),d=c=>r?jsx(a$1,{"data-testid":"AgreementCell_countBadge",children:jsx(a,{title:a$3("totalPaymentCount",{amount:f$1(e)}),children:jsx(mt,{children:jsxs(ct,{"data-testid":"AgreementCell_totalPaymentsCount",sx:{color:dt.COUNT.color},children:["x",e]})})})},c):jsx(a$5,{value:e,index:c},c),s=n.map((c,g)=>c.label==="countBadge"?d(g):jsx(a,{title:a$3(c.label),children:jsx(a$1,{children:r?jsx(mt,{children:jsx(ct,{"data-testid":"AgreementCell_agreementType",sx:{color:c.color},children:a$3(c.label)})}):jsx(a$2,{sx:{maxWidth:"16px",maxHeight:"16px",height:"auto",width:"auto"},src:c.icon,alt:"agreement"})},c.color)},c.color)),f=jsx(a,{title:"No agreement",children:jsx(a$1,{children:r?jsx(mt,{children:jsx(ct,{"data-testid":"AgreementCell_agreementType",sx:{color:p.palette.text.secondary},children:"No agreement"})}):jsx(a$2,{sx:{maxWidth:"24px",maxHeight:"24px",height:"auto",width:"auto"},src:Ai,alt:"agreement"})},"no-agreement")},"no-agreement");return jsx(Box,{id:l,"data-testid":"AgreementIcon",sx:{display:"flex",alignItems:"center",gap:"4px"},children:s?.length>0?s:f})}var To=Ie;var Ce=To;styled("span")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(1)}));styled("img")(()=>({maxWidth:"36px",maxHeight:"24px"}));styled(motion.span,{shouldForwardProp:t=>t!=="sourcesCount"})(({theme:t,sourcesCount:o})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${o*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:t.palette.background.paper,borderRadius:"16px"}));var Ao=styled("span")(({theme:t})=>({fontSize:"11px",padding:"2px 0",color:t.palette.text.primary})),Po=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"4px",textAlign:"center",width:"100%"}));styled("span")(({theme:t})=>({position:"absolute",left:0,zIndex:6,border:`1px solid ${t.palette.divider}`,borderRadius:"12px",backgroundColor:t.palette.background.paper,width:"36px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"}));styled(motion.div)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(1)}));var Wo=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px"}));var kt={"3DS":{tooltip:"3DS",icon:Oj,borderColor:"rgba(31, 136, 208, 0.10)"},"Device Biometric":{tooltip:"Biometric",icon:Nj,borderColor:"rgba(31, 136, 208, 0.10)"},"Non-3DS":{tooltip:"Non 3DS",icon:Zg,borderColor:"rgba(31, 136, 208, 0.10)"}},vo={FAILED:{tooltip:"Failed",icon:Rg,borderColor:"rgba(255, 61, 0, 0.10)"},REJECTED:{tooltip:"Rejected",icon:_g,borderColor:"rgba(255, 61, 0, 0.10)"}};function be({transactionStatus:t,eci:o,authType:e,isTextShown:r}){let l=yc(useId(),"auth-icons"),p=useMemo(()=>{let n=t?vo[t]:null,d=n?.tooltip,s=t==="AUTHENTICATED"?null:n?.icon;return [{tooltip:d,content:r?d:s,type:r?"text":"icon"},...e?[{tooltip:e,content:r?kt[e]?.tooltip:kt[e]?.icon,type:r?"text":"icon"}]:[],{tooltip:"",content:o?`ECI ${o}`:"",type:"text"}]},[t,r,e,o]),a$1=useMemo(()=>p.filter(n=>!!n.content).map((n,d)=>{let s=n.type==="text"?jsx(Po,{"data-testid":"AuthenticationCell_BadgeTextWrapper",children:jsx(Ao,{sx:{border:"none"},"data-testid":"AuthenticationCell_TextLabel","data-source":n.content,children:n.content})}):jsx(a$2,{sx:{width:"16px",height:"16px"},src:n.content,alt:n.tooltip});return jsx(a,{title:n.tooltip,children:s},`${n.tooltip}-${d}`)}),[p]);return jsx(Wo,{id:l,"data-testid":"AuthIcons",children:a$1})}var ko=be;var Se=(t,o,e)=>({start:{x:t*6,transition:{duration:.3,type:"tween",ease:"easeIn"},...t>0&&{opacity:0}},animate:{x:e?t*e:t*39,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:o,...t>0&&{opacity:1}}});var Te=ko;var tt={VOID:{icon:dk},CAPTURED:{icon:ck}};var ut=styled$1(motion.div)(({theme:t,isCapture:o})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:t.spacing(.5),paddingInline:t.spacing(.3),paddingBlock:t.spacing(.3),height:"100%",minWidth:"100%",backgroundColor:o?"#eaf3fb":"#eeeeee",borderRadius:"56px",width:"fit-content",fontSize:"10px",color:t.palette.text.primary,position:"relative",zIndex:10})),ft=styled$1("div")(({theme:t,percentage:o,isCapture:e})=>({border:`0.6px ${[0,100].includes(o)?"solid":"dashed"} ${e?t.palette.info.dark:"#656565"}`,borderRadius:"80px",padding:t.spacing(.316),paddingLeft:t.spacing(.516),fontSize:"7px",fontWeight:t.typography.fontWeightBold,color:e?t.palette.info.dark:"#656565",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.5)})),xt=styled$1("div")(({percentage:t,isCapture:o,theme:e})=>({background:`conic-gradient(${o?e.palette.info.dark:"#656565"} ${t}%, transparent 0.00%)`,borderRadius:"50%",width:"8.333px",height:"8.333px",border:`0.6px solid ${o?e.palette.info.dark:"#656565"}`})),gt=styled$1("img")({width:"14px",height:"14px"}),j=styled$1(o)({width:"16px",height:"16px"}),N=styled$1("img")({width:"16px",height:"16px"}),Bo=styled$1(Box)({display:"flex",alignItems:"center",justifyContent:"center"});function It(t){return t<5?5:t===100?95:t}function Be({voidPercentage:t,capturePercentage:o,captureCount:e,autoType:r,captureAmount:l,voidAmount:p,currency:a$1,isTextShown:n,remainingAmount:d,isSheetViewShown:s,selectionProps:f={}}){let c=Number(o)+Number(t)===100||d<=0,g=yc(useId(),"capture-auto-icon"),T=useTheme$1(),{t:A}=useTranslation(),P=Ha(d||0),L=useCallback(C=>`Auto ${C} - ${a$1} ${P.integerAmount}.${P.decimalAmount}`,[a$1,P.decimalAmount,P.integerAmount]),J=useCallback(C=>{let X=C==="Capture"?l:p,{integerAmount:D,decimalAmount:v}=Ia(X,a$1);return `Partial ${C} - ${a$1} ${D}.${v}`},[l,p,a$1]),x=o>0?jsx(a,{title:J("Capture"),children:jsxs(ut,{isCapture:true,isFullyUsed:c,whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:T.shadows[4]}},children:[jsx(gt,{src:ub,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(ft,{isCapture:true,percentage:o,children:[o,"% ",jsx(xt,{isCapture:true,percentage:It(o)})]}),e>1&&jsxs(z,{compact:true,color:"dark",children:[e,"x"]})]})]})}):r==="CAPTURED"&&!c?jsx(a,{title:L("Capture"),children:jsx(j,{children:jsx(N,{src:tt.CAPTURED?.icon,alt:"auto"})})}):jsx(a,{title:L("Capture"),children:jsx(j,{children:jsx(N,{src:tt.CAPTURED?.icon,alt:"auto"})})}),I=o===100?jsx(a,{title:A("captured"),children:jsx(Bo,{children:jsx(N,{src:fk,alt:"captured"})})}):x,W=useMemo(()=>s&&I?jsx(b,{chipIndex:4,copyText:A("captured"),selectionProps:f,children:A("captured")}):n&&I?jsx(k,{children:A("captured")}):I,[n,I,s,f]);return W&&jsx("div",{id:g,"data-testid":"CaptureAutoIcon",style:{zIndex:12},children:W})}var Do=Be;function Ve({voidPercentage:t,capturePercentage:o,voidCount:e,autoType:r,captureAmount:l$1,voidAmount:p,currency:a$1,isTextShown:n,isSheetViewShown:d,selectionProps:s={},remainingAmount:f}){let c=Number(o)+Number(t)===100||f<=0,g=yc(useId(),"void-auto-icon"),T=useTheme$1(),{t:A}=useTranslation(),P=Ha(f||0),L=useCallback(C=>`Auto ${C} - ${a$1} ${P.integerAmount}.${P.decimalAmount}`,[a$1,P.decimalAmount,P.integerAmount]),J=useCallback(C=>{let X=C==="Capture"?l$1:p,{integerAmount:D,decimalAmount:v}=Ia(X,a$1);return `Partial ${C} - ${a$1} ${D}.${v}`},[l$1,p,a$1]),x=t>0||p?jsx(a,{title:J("Void"),children:jsxs(ut,{isFullyUsed:c,whileHover:["animate","fadeIn"],animate:"start",sx:{zIndex:14,background:T.palette.common.white,border:`0.75px solid ${T.palette.grey[600]}1A`},variants:{animate:{boxShadow:T.shadows[4]}},children:[jsx(gt,{src:wk,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(ft,{percentage:t,children:[t,"% ",jsx(xt,{percentage:It(t)})]}),e>0&&jsxs(z,{compact:true,color:"neutral",children:[e,"x"]})]})]})}):r==="VOID"&&!c?jsx(a,{title:L("Void"),children:jsx(j,{children:jsx(N,{src:tt.VOID?.icon,alt:"auto"})})}):null,I=t===100?jsx(a,{title:A("void"),children:jsx(j,{children:jsx(N,{src:wk,alt:"void"})})}):x,W=useMemo(()=>d&&I?jsx(b,{chipIndex:5,copyText:A("void"),selectionProps:s,children:A("void")}):n&&I?jsx(l,{children:A("void")}):I,[n,I,d,s]);return W?jsx("div",{id:g,"data-testid":"VoidAutoIcon",style:{...!d&&{zIndex:11}},children:W}):null}var $o=Ve;var Me=Do;var Fe=({authorizedStatus:t,isTextShown:o,iconStyles:e,tableMode:r,chipIndex:l=0,selectionProps:p={}})=>{let{t:a$1}=useTranslation(),n=useTheme$1(),d=a$1(_(t));return Va(r)?jsx(b,{copyText:d,chipIndex:l,selectionProps:p,children:d}):jsx(a,{title:d,children:o?jsx(j$1,{"data-testid":"StatusCell_AuthorizedStatusLabel",sx:{color:n.palette.info.dark},children:d}):jsx(a$2,{src:f[t],alt:"authorized-icon","data-testid":"StatusCell_AuthorizedStatusIcon",sx:e})})};var _o=styled$1(motion.span)(({theme:t})=>({color:t.palette.common.white,display:"block",fontWeight:t.typography.fontWeightBold,fontSize:"9.78px",borderRadius:"4px",paddingInline:t.spacing(.45)})),Vo=styled$1(motion.span)(()=>({display:"block",width:"0",overflow:"hidden"})),Bt=styled$1("img")(()=>({width:"10px",height:"10px"})),Lt=styled$1(motion.span)(({theme:t})=>({width:"18px",height:"18px",borderRadius:"50%",backgroundColor:t.palette.background.paper,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,position:"relative"})),Dt=styled$1(motion.div,{shouldForwardProp:t=>t!=="isVisible"})(({isVisible:t})=>({display:"flex",justifyContent:"center",alignItems:"center",gap:"4px",width:"0",overflow:"hidden",opacity:0,...!t&&{padding:"0 !important"}})),Mo=styled$1(motion.div)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start"})),zo=styled$1(motion.span)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minHeight:"24px",cursor:"pointer",borderRadius:"16px"})),No={delay:.2,ease:"easeIn",fadeIn:{duration:.2}},Go={animate:{width:"auto",paddingRight:"4px",paddingLeft:"4px"},fadeIn:{opacity:1,transition:{delay:.7}}},Fo={animate:{width:"auto"},fadeIn:{opacity:1,transition:{delay:1}}},Uo={animate:{width:"auto",paddingRight:"8px",paddingLeft:"4px"}},Et={fadeIn:{duration:.3},animate:{duration:.1}},Oo={fadeIn:{opacity:1}},jo=styled$1(j$1)(()=>({width:"88px",height:"100%"})),$t=styled$1(Box)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.25),height:"100%"}));function qe({chargeStatus:t,gatewayTooltip:o$1,acquirerTooltip:e,chargeTooltip:r,errorCode:l,isTextShown:p$1,gatewayCode:a$1,acquirerCode:n,unCapturedStyles:d,iconStyles:s$1,iconWrapperStyles:f,gatewayIconWrapperStyles:c,gatewayContainerStyles:g$1,gateWayIconStyles:T,showBadge:A=true,isSheetViewShown:P=false,selectionProps:L={},chipIndex:J=0}){let x=t?b$1[t]:null,I=t?g[t]:null,W=useTheme$1(),{t:C}=useTranslation(),X=yc(useId(),"charge-status-icon"),D=r&&jsx(Fragment,{children:jsx("div",{children:r})}),v=e&&jsxs(Fragment,{children:[jsx("div",{children:"Acquirer"}),jsx("div",{children:e})]}),Y=o$1&&jsxs(Fragment,{children:[jsx("div",{children:"Gateway"}),jsx("div",{children:o$1})]}),Ft=t&&a$3[t]&&jsx("div",{"data-testid":"ChargeStatusIcon_ChargeIcon",style:{display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",borderRadius:x?"50%":"",...f},children:jsx(p,{src:a$3[t],alt:"charge-icon","data-testid":"ChargeStatusIcon_StatusIcon",style:{borderRadius:x?"50%":"",width:"16px",height:"16px",...s$1}})});return P?jsxs($t,{children:[jsxs(b,{copyText:C(_(t)),chipIndex:J,selectionProps:L,children:[C(_(t))," ",l]}),x&&jsxs(Fragment,{children:[a$1&&jsxs(b,{copyText:"Gateway",chipIndex:1,selectionProps:L,children:["Gateway ",a$1]}),n&&jsxs(b,{copyText:"Acquirer",chipIndex:2,selectionProps:L,children:["Acquirer ",n]})]})]}):p$1?jsxs($t,{children:[jsx(a,{title:D,children:jsxs(jo,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":_(t),sx:{background:x?.background||I?.background||"transparent",color:x?.color||I?.color||W.palette.info.dark,borderColor:`${x?.color||I?.color||W.palette.info.dark}1A`},children:[C(_(t))," ",l]})}),x&&jsxs(Fragment,{children:[a$1&&jsx(a,{title:Y,children:jsxs(j$1,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":_(t),sx:{background:x?.background||I?.background||"transparent",color:x?.color||I?.color||W.palette.info.dark},children:["Gateway ",a$1]})}),n&&jsx(a,{title:v,children:jsxs(j$1,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":_(t),sx:{background:x?.background||I?.background||"transparent",color:x?.color||I?.color||W.palette.info.dark},children:["Acquirer ",n]})})]})]}):jsx(o,{id:X,"data-testid":"ChargeStatusIcon_StatusIconWrapper",style:{...f},children:s?.includes(t||"")&&(D||v||Y)?jsxs(zo,{"data-testid":"ChargeStatusIcon_UnCapturedContainer",whileHover:["animate","fadeIn"],style:{left:"0",...A&&{paddingInline:"12px",border:"1px solid #F2F2F2",borderRadius:"12px",backgroundColor:"#fff"},...d},children:[jsx(Mo,{"data-testid":"ChargeStatusIcon_UnCapturedBadge",sx:{borderRadius:"56px"},initial:{background:"transparent"},variants:{animate:{background:x?.background}},children:jsx(a,{title:D??C(_(t)),children:jsxs(Fragment,{children:[Ft,jsx(Vo,{"data-testid":"ChargeStatusIcon_ErrorCodeWrapper",transition:{animate:{duration:.05}},variants:Uo,style:{...l&&{padding:"0 !important"}},children:jsx(_o,{"data-testid":"ChargeStatusIcon_ErrorCodeLabel",sx:{background:x?.color},transition:No,variants:Oo,initial:{opacity:0},children:l})})]})})}),jsx(Dt,{"data-testid":"ChargeStatusIcon_GatewaysContainer",transition:Et,variants:Go,style:g$1,isVisible:!!Y,children:Y&&jsx(a,{title:Y,children:jsx(Lt,{"data-testid":"ChargeStatusIcon_GatewayIconWrapper",style:{background:x?.background,...c},children:jsx(Bt,{src:x?.gatewayIcon,alt:"gateway-icon","data-testid":"ChargeStatusIcon_GatewayIcon",style:T})})})}),jsx(Dt,{"data-testid":"ChargeStatusIcon_GatewaysContainer",transition:Et,variants:Fo,style:g$1,isVisible:!!v,children:v&&jsx(a,{title:v,children:jsx(Lt,{"data-testid":"ChargeStatusIcon_AcquirerIconWrapper",style:{background:x?.background,...c},children:jsx(Bt,{src:x?.acquirerIcon,alt:"acquirer-icon","data-testid":"ChargeStatusIcon_AcquirerIcon",style:T})})})})]}):jsx(a,{title:D??C(_(t)),children:jsx(o,{children:Ft})})})}var Xe=()=>{let{t}=useTranslation(),o=yc(useId(),"customer-initiated-icon");return jsx(a,{title:t("merchantInitiated"),children:jsx("img",{id:o,"data-testid":"merchantInitiatedIcon",src:vb,alt:"merchant",style:{width:"16px",height:"16px"}})})};var Ye={G:"Global",R:"Regional",L:"Local"},ot=({geographyVariant:t,countryCode:o,isTextShown:e})=>{let r=t?Ye[t]:void 0,l=r||o?`${r||""} ${r&&o?"-":""} ${o?`Country - ${o}`:""}`:void 0;return e||!o?null:jsx(a,{title:l,children:jsx(a$4,{countryCode:o})})};var tr=({geographyVariant:t,isTextShown:o,deviceCountry:e,deviceType:r,tableMode:l})=>{let p=yc(useId(),"device-icon-chip");return jsxs(Qe,{id:p,"data-testid":"DeviceIconChip",sx:{display:"flex",gap:"8px",alignItems:"center",...Va(l)&&{height:"18px"}},children:[jsx(ot,{geographyVariant:t,isTextShown:o,countryCode:e}),jsx(c,{type:r,isTextShown:o,tableMode:l})]})};var rr=({isDisputeOpen:t,iconStyles:o})=>{let e=yc(useId(),"dispute-icon");return jsx(p,{id:e,"data-testid":"StatusCell_DisputeStatusIcon",sx:{width:"13.5px",height:"13.5px"},src:t?wa:va,alt:"dispute-icon",style:o})};var Xo=styled$1(Qe,{shouldForwardProp:t=>t!=="tableMode"})(({theme:t,tableMode:o})=>({display:"flex",gap:t.spacing(.5),...Va(o)&&{height:"18px"},alignItems:"center"})),Yo=styled$1("span")(({theme:t})=>({fontSize:"10px",fontWeight:500,color:t.palette.text.primary}));function Vt({countryCode:t,isTextShown:o,cardNumber:e,bankName:r,tableMode:l}){let p=yc(useId(),"issuer-icon"),a$1=e?.slice(0,4),n=e?.slice(-4);return jsxs(Xo,{id:p,"data-testid":"IssuerIcon",tableMode:l,children:[t&&jsx(ot,{countryCode:t,isTextShown:o}),jsx(a,{title:`${r?`Issuer - ${r}`:""}`,children:jsx(Yo,{children:`${a$1||""} ${n||""}`})})]})}var sr=Vt;styled(motion.div)(({theme:t,background:o})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.5),paddingInline:t.spacing(.75),paddingBlock:t.spacing(.5),backgroundColor:o,height:"24px",width:"fit-content",borderRadius:"24px",fontSize:"10px",color:t.palette.text.primary}));var Ra=styled("img")(()=>({height:"13.125px",width:"12px"})),bt=styled("div")(()=>({fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"center",width:"65px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"4.5px 8px",borderRadius:"24px"})),ka=styled("div")(({theme:t})=>({color:t.palette.common.white,background:t.palette.error.main,fontSize:"0.6rem",fontWeight:600,borderRadius:"16px",padding:"2px 8px",display:"flex",alignItems:"center",justifyContent:"center"})),Ba=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px"}));var ur=({payoutStatus:t="PENDING",isTextShown:o,payoutTooltip:e$1,iconStyles:r,isSheetViewShown:l,chipIndex:p$1=0,selectionProps:a$1={}})=>{let{t:n}=useTranslation(),d=yc(useId(),"payout-icon"),s=n(_(t)),f=e$1||s;return l?jsx(b,{chipIndex:p$1,copyText:s,selectionProps:a$1,children:s}):jsx(a,{title:f,children:o?jsx(bt,{id:d,"data-testid":"StatusCell_PayoutStatusLabel",children:s}):jsx(p,{id:d,src:e[t],alt:"settled-icon","data-testid":"StatusCell_PayoutStatusIcon",style:r})})};var Qo=styled$1(motion.img)(()=>({width:"14px",height:"14px"})),Zo=styled$1(motion.span)(({theme:t})=>({color:t.palette.common.white,borderRadius:t.spacing(.5),height:"12px",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"9.782px",fontWeight:600,backgroundColor:t.palette.secondary.main})),Mt=styled$1(motion.div)(({theme:t})=>({height:"16px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:`${t.palette.secondary.main}1A`,paddingInline:t.spacing(.5),borderRadius:"56px"})),qa=(t,o,e)=>({start:{x:t*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:e?t*e:t*49,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:o}}),Ka=styled$1(motion.span)(({isTextShown:t,theme:o})=>({border:`1px solid ${o.palette.divider}`,borderRadius:"12px",backgroundColor:o.palette.background.paper,height:"24px",display:"flex",alignItems:"center",justifyContent:"center",minWidth:t?"auto":"36px",...t&&{border:"none"}})),Ja=styled$1(motion.div,{shouldForwardProp:t=>t!=="order"})(({order:t=0})=>({display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:0,left:0,zIndex:t+6,width:"fit-content",height:"24px",cursor:"pointer",borderRadius:"16px","&:hover":{zIndex:200}})),Xa=styled$1(motion.div,{shouldForwardProp:t=>t!=="statusesCount"})(({statusesCount:t=1})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"relative",minWidth:`${t*6+36}px`,height:"24px",cursor:"pointer",borderRadius:"16px",overflow:"visible"})),Ya=styled$1("div")(()=>({display:"flex",gap:"4px",justifyContent:"flex-start",alignItems:"center",position:"relative",width:"100%",overflow:"visible"}));var hr=({isTextShown:t,refundStatus:o="PENDING",refundTooltip:e="",refundCount:r,iconStyles:l,isSheetViewShown:p$1,chipIndex:a$1=0,selectionProps:n={}})=>{let{t:d$1}=useTranslation(),s=useTheme$1(),f=yc(useId(),"refund-icon"),c=(r||0)>1,g=d$1(_(o));if(p$1)return jsxs(b,{chipIndex:a$1,selectionProps:n,copyText:g,children:[g," ",c?`${r}x`:null]});let T=jsxs(Zo,{"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:[r,"x"]});return t?jsx(a,{title:jsx("div",{children:jsx("div",{children:e})}),children:jsx(bt,{id:f,"data-testid":"StatusCell_RefundStatusLabel",sx:{color:d[o].color,backgroundColor:d[o].backgroundColor,width:"90px"},children:jsxs(Mt,{whileInView:c?["animate","fadeIn"]:void 0,variants:{animate:{boxShadow:s.shadows[4],gap:s.spacing(.5)}},children:[g," ",c?T:null]})})}):jsx(a,{title:jsx("div",{children:jsx("div",{children:e})}),children:c?jsxs(Mt,{id:f,whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:s.shadows[4],gap:s.spacing(.5)}},children:[jsx(Qo,{src:ok,alt:"multi-refunded-icon","data-testid":"StatusCell_MultiRefundIcon"}),T]}):jsx(p,{id:f,src:c$1[o],alt:"refunded-icon","data-testid":"StatusCell_RefundStatusIcon",style:l})})},te=hr;var Cr=te;var yr={american_express:"AMEX",debit:"card",credit:"card",unionpay:"UnionPay",jaywan:"JAYWAN"},B=t=>yr[t?.toLowerCase()||""]||t;styled("span")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(1)}));var oe=styled("img")(()=>({maxWidth:"24px",maxHeight:"16px"}));styled(motion.span,{shouldForwardProp:t=>t!=="sourcesCount"})(({theme:t,sourcesCount:o})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${o*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:t.palette.background.paper,borderRadius:"16px"}));var ee=styled("span")(({theme:t})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:t.palette.text.primary})),re=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px",textAlign:"center",width:"100%"}));styled("span")(({theme:t})=>({position:"absolute",left:0,zIndex:6,border:`1px solid ${t.palette.divider}`,borderRadius:"12px",backgroundColor:t.palette.background.paper,width:"36px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"}));var ne=styled("span")(({theme:t})=>({fontSize:"10px",fontWeight:500,color:t.palette.text.primary}));function At({source:t,isTextShown:o,title:e,width:r,height:l,imgSx:p}){let{t:a$1}=useTranslation(),n=h(t);return jsx(a,{title:e,children:o?jsx(re,{"data-testid":"SourceCell_BadgeTextWrapper",children:jsx(ee,{"data-testid":"SourceCell_TextLabel","data-source":t,children:a$1(_(t))})}):jsx(oe,{src:n,alt:t,width:r,height:l,onError:d=>{d.currentTarget.src=h("card");},sx:p})})}function vr({payment:t,card:o,isTextShown:e,firstIcon:r}){let l=yc(useId(),"source-icons"),{t:p}=useTranslation(),a=useCallback(()=>{let s=[],f=bc(t),c=t?.method,g=t?.scheme;return B(c)?.toLowerCase()===B(g)?.toLowerCase()?s.push(B(c),B(f)):s.push(B(c),B(f),B(g)),s},[t]),n=useMemo(()=>jsx(At,{source:r,isTextShown:e,title:p(_(r))},r),[r,e,p]),d=useMemo(()=>a()?.filter(s=>!!s&&s!==r)?.map((s,f,c)=>{let g=t?.wallet===p("sv_wallet")?p("storedValueWallet"):p("passThruWallet"),T=f===c.length-1&&o?.last_four?`${p(_(s))} - ${o?.last_four}`:p(_(s));return jsx(At,{source:s,isTextShown:e,title:f===0&&s==="Wallet"?g:T},`${s}-${f}`)}),[a,t,o,e,p,r]);return jsxs(Box,{id:l,"data-testid":"SourceIcons",display:"flex",alignItems:"center",gap:.5,children:[r&&n,d,o?.last_four&&jsxs(ne,{children:["\xB7\xB7\xB7 ",o?.last_four]})]})}var rt={PROCESSED:Qg,FAILED:""};var se=styled("span")(({theme:t})=>({fontSize:"11px",padding:"2px 0",color:t.palette.text.primary})),le=styled("img")(()=>({width:"16px",height:"16px"})),de=styled("span")(()=>({width:"24px",height:"24px",borderRadius:"50%",backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}));function ce({status:t,isTextShown:o,isSheetViewShown:e,chipIndex:r=0,selectionProps:l={}}){let p=useTheme(),{t:a$1}=useTranslation(),n=yc(useId(),"destination-icon"),d=a$1(_(t));return e&&rt[t]?jsx(b,{copyText:d,chipIndex:r,selectionProps:l,children:d}):o&&rt[t]?jsx(se,{id:n,"data-testid":"ChargeStatusIcon_isTextShown","data-status":_(t),sx:{background:"#1F88D00D",color:t==="PROCESSED"?p.palette.info.dark:p.palette.common.black},children:d}):jsx(de,{id:n,"data-testid":"DestinationIcon",className:"destination-status",children:t&&rt[t]&&jsx(a,{title:a$1(_(t)),children:jsx(le,{src:rt[t],alt:"destination-icon"})})})}export{qa as a,Ka as b,Ja as c,Xa as d,Ya as e,Ce as f,Se as g,Te as h,$o as i,Me as j,Fe as k,qe as l,Xe as m,ot as n,tr as o,rr as p,sr as q,Ra as r,ka as s,Ba as t,ur as u,Cr as v,B as w,At as x,vr as y,ce as z};
1
+ import {f,b as b$1,g,a as a$3,e,d,c as c$1}from'./chunk-LDLGBNMM.js';import {a as a$5}from'./chunk-UJ4IYIJH.js';import {a as a$2}from'./chunk-H6HHXYRL.js';import {c}from'./chunk-4XDOS6NM.js';import {a as a$1}from'./chunk-ZONDSLTR.js';import {o,j as j$1,k,l,p}from'./chunk-RHUTFOWS.js';import {a}from'./chunk-KHM5KW53.js';import {b}from'./chunk-2U6YCW6N.js';import {z}from'./chunk-ZPGWJ5RD.js';import {a as a$4}from'./chunk-4DSO4G5S.js';import {Va,yc,Ha,Ia,bc,f as f$1}from'./chunk-2CIV4TII.js';import {s}from'./chunk-BXMBE224.js';import {U,ui,wi,vi,ti,Ai,_g,Rg,Zg,Nj,Oj,ub,ck,fk,wk,dk,vb,wa,va,ok,h,Qg}from'./chunk-KCEYICHJ.js';import {useId,useMemo,useCallback}from'react';import {useTranslation}from'react-i18next';import {styled,Box,useTheme}from'@mui/material';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {motion}from'framer-motion';import {styled as styled$1,useTheme as useTheme$1}from'@mui/material/styles';import _ from'lodash/camelCase';import Qe from'@mui/material/Box';var lt={ORDER:{label:"order",icon:ti,color:"#5E30EB"},SAVED_CARD:{label:"cardAgreement",icon:vi,color:"#76BB40"},SUBSCRIPTION:{label:"subscription",icon:wi,color:"#00C7BE"},INSTALLMENT:{label:"installment",icon:ui,color:"#32ADE6"}},dt={SAVED_TOKEN:{label:"savedToken",icon:U,color:"#76BB40"},COUNT:{label:"countBadge",icon:"countBadge",color:"#76BB40"}};styled("span")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.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 ct=styled("span")(({theme:t})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:t.palette.text.primary})),mt=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px"}));function Ie({type:t,hasSavedCard:o,totalPaymentsCount:e,isTextShown:r}){let l=yc(useId(),"agreement-icon"),p=useTheme(),{t:a$3}=useTranslation(),n=useMemo(()=>[...o?[dt.SAVED_TOKEN]:[],...(e||0)>0?[dt.COUNT]:[],...t&&lt[t]?[lt[t]]:[]],[o,e,t]),d=c=>r?jsx(a$1,{"data-testid":"AgreementCell_countBadge",children:jsx(a,{title:a$3("totalPaymentCount",{amount:f$1(e)}),children:jsx(mt,{children:jsxs(ct,{"data-testid":"AgreementCell_totalPaymentsCount",sx:{color:dt.COUNT.color},children:["x",e]})})})},c):jsx(a$5,{value:e,index:c},c),s=n.map((c,g)=>c.label==="countBadge"?d(g):jsx(a,{title:a$3(c.label),children:jsx(a$1,{children:r?jsx(mt,{children:jsx(ct,{"data-testid":"AgreementCell_agreementType",sx:{color:c.color},children:a$3(c.label)})}):jsx(a$2,{sx:{maxWidth:"16px",maxHeight:"16px",height:"auto",width:"auto"},src:c.icon,alt:"agreement"})},c.color)},c.color)),f=jsx(a,{title:"No agreement",children:jsx(a$1,{children:r?jsx(mt,{children:jsx(ct,{"data-testid":"AgreementCell_agreementType",sx:{color:p.palette.text.secondary},children:"No agreement"})}):jsx(a$2,{sx:{maxWidth:"24px",maxHeight:"24px",height:"auto",width:"auto"},src:Ai,alt:"agreement"})},"no-agreement")},"no-agreement");return jsx(Box,{id:l,"data-testid":"AgreementIcon",sx:{display:"flex",alignItems:"center",gap:"4px"},children:s?.length>0?s:f})}var To=Ie;var Ce=To;styled("span")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(1)}));styled("img")(()=>({maxWidth:"36px",maxHeight:"24px"}));styled(motion.span,{shouldForwardProp:t=>t!=="sourcesCount"})(({theme:t,sourcesCount:o})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${o*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:t.palette.background.paper,borderRadius:"16px"}));var Ao=styled("span")(({theme:t})=>({fontSize:"11px",padding:"2px 0",color:t.palette.text.primary})),Po=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"4px",textAlign:"center",width:"100%"}));styled("span")(({theme:t})=>({position:"absolute",left:0,zIndex:6,border:`1px solid ${t.palette.divider}`,borderRadius:"12px",backgroundColor:t.palette.background.paper,width:"36px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"}));styled(motion.div)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(1)}));var Wo=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px"}));var kt={"3DS":{tooltip:"3DS",icon:Oj,borderColor:"rgba(31, 136, 208, 0.10)"},"Device Biometric":{tooltip:"Biometric",icon:Nj,borderColor:"rgba(31, 136, 208, 0.10)"},"Non-3DS":{tooltip:"Non 3DS",icon:Zg,borderColor:"rgba(31, 136, 208, 0.10)"}},vo={FAILED:{tooltip:"Failed",icon:Rg,borderColor:"rgba(255, 61, 0, 0.10)"},REJECTED:{tooltip:"Rejected",icon:_g,borderColor:"rgba(255, 61, 0, 0.10)"}};function be({transactionStatus:t,eci:o,authType:e,isTextShown:r}){let l=yc(useId(),"auth-icons"),p=useMemo(()=>{let n=t?vo[t]:null,d=n?.tooltip,s=t==="AUTHENTICATED"?null:n?.icon;return [{tooltip:d,content:r?d:s,type:r?"text":"icon"},...e?[{tooltip:e,content:r?kt[e]?.tooltip:kt[e]?.icon,type:r?"text":"icon"}]:[],{tooltip:"",content:o?`ECI ${o}`:"",type:"text"}]},[t,r,e,o]),a$1=useMemo(()=>p.filter(n=>!!n.content).map((n,d)=>{let s=n.type==="text"?jsx(Po,{"data-testid":"AuthenticationCell_BadgeTextWrapper",children:jsx(Ao,{sx:{border:"none"},"data-testid":"AuthenticationCell_TextLabel","data-source":n.content,children:n.content})}):jsx(a$2,{sx:{width:"16px",height:"16px"},src:n.content,alt:n.tooltip});return jsx(a,{title:n.tooltip,children:s},`${n.tooltip}-${d}`)}),[p]);return jsx(Wo,{id:l,"data-testid":"AuthIcons",children:a$1})}var ko=be;var Se=(t,o,e)=>({start:{x:t*6,transition:{duration:.3,type:"tween",ease:"easeIn"},...t>0&&{opacity:0}},animate:{x:e?t*e:t*39,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:o,...t>0&&{opacity:1}}});var Te=ko;var tt={VOID:{icon:dk},CAPTURED:{icon:ck}};var ut=styled$1(motion.div)(({theme:t,isCapture:o})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:t.spacing(.5),paddingInline:t.spacing(.3),paddingBlock:t.spacing(.3),height:"100%",minWidth:"100%",backgroundColor:o?"#eaf3fb":"#eeeeee",borderRadius:"56px",width:"fit-content",fontSize:"10px",color:t.palette.text.primary,position:"relative",zIndex:10})),ft=styled$1("div")(({theme:t,percentage:o,isCapture:e})=>({border:`0.6px ${[0,100].includes(o)?"solid":"dashed"} ${e?t.palette.info.dark:"#656565"}`,borderRadius:"80px",padding:t.spacing(.316),paddingLeft:t.spacing(.516),fontSize:"7px",fontWeight:t.typography.fontWeightBold,color:e?t.palette.info.dark:"#656565",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.5)})),xt=styled$1("div")(({percentage:t,isCapture:o,theme:e})=>({background:`conic-gradient(${o?e.palette.info.dark:"#656565"} ${t}%, transparent 0.00%)`,borderRadius:"50%",width:"8.333px",height:"8.333px",border:`0.6px solid ${o?e.palette.info.dark:"#656565"}`})),gt=styled$1("img")({width:"14px",height:"14px"}),j=styled$1(o)({width:"16px",height:"16px"}),N=styled$1("img")({width:"16px",height:"16px"}),Bo=styled$1(Box)({display:"flex",alignItems:"center",justifyContent:"center"});function It(t){return t<5?5:t===100?95:t}function Be({voidPercentage:t,capturePercentage:o,captureCount:e,autoType:r,captureAmount:l,voidAmount:p,currency:a$1,isTextShown:n,remainingAmount:d,isSheetViewShown:s,selectionProps:f={}}){let c=Number(o)+Number(t)===100||d<=0,g=yc(useId(),"capture-auto-icon"),T=useTheme$1(),{t:A}=useTranslation(),P=Ha(d||0),L=useCallback(C=>`Auto ${C} - ${a$1} ${P.integerAmount}.${P.decimalAmount}`,[a$1,P.decimalAmount,P.integerAmount]),J=useCallback(C=>{let X=C==="Capture"?l:p,{integerAmount:D,decimalAmount:v}=Ia(X,a$1);return `Partial ${C} - ${a$1} ${D}.${v}`},[l,p,a$1]),x=o>0?jsx(a,{title:J("Capture"),children:jsxs(ut,{isCapture:true,isFullyUsed:c,whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:T.shadows[4]}},children:[jsx(gt,{src:ub,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(ft,{isCapture:true,percentage:o,children:[o,"% ",jsx(xt,{isCapture:true,percentage:It(o)})]}),e>1&&jsxs(z,{compact:true,color:"dark",children:[e,"x"]})]})]})}):r==="CAPTURED"&&!c?jsx(a,{title:L("Capture"),children:jsx(j,{children:jsx(N,{src:tt.CAPTURED?.icon,alt:"auto"})})}):jsx(a,{title:L("Capture"),children:jsx(j,{children:jsx(N,{src:tt.CAPTURED?.icon,alt:"auto"})})}),I=o===100?jsx(a,{title:A("captured"),children:jsx(Bo,{children:jsx(N,{src:fk,alt:"captured"})})}):x,W=useMemo(()=>s&&I?jsx(b,{chipIndex:4,copyText:A("captured"),selectionProps:f,children:A("captured")}):n&&I?jsx(k,{children:A("captured")}):I,[n,I,s,f]);return W&&jsx("div",{id:g,"data-testid":"CaptureAutoIcon",style:{zIndex:12},children:W})}var Do=Be;function Ve({voidPercentage:t,capturePercentage:o,voidCount:e,autoType:r,captureAmount:l$1,voidAmount:p,currency:a$1,isTextShown:n,isSheetViewShown:d,selectionProps:s={},remainingAmount:f}){let c=Number(o)+Number(t)===100||f<=0,g=yc(useId(),"void-auto-icon"),T=useTheme$1(),{t:A}=useTranslation(),P=Ha(f||0),L=useCallback(C=>`Auto ${C} - ${a$1} ${P.integerAmount}.${P.decimalAmount}`,[a$1,P.decimalAmount,P.integerAmount]),J=useCallback(C=>{let X=C==="Capture"?l$1:p,{integerAmount:D,decimalAmount:v}=Ia(X,a$1);return `Partial ${C} - ${a$1} ${D}.${v}`},[l$1,p,a$1]),x=t>0||p?jsx(a,{title:J("Void"),children:jsxs(ut,{isFullyUsed:c,whileHover:["animate","fadeIn"],animate:"start",sx:{zIndex:14,background:T.palette.common.white,border:`0.75px solid ${T.palette.grey[600]}1A`},variants:{animate:{boxShadow:T.shadows[4]}},children:[jsx(gt,{src:wk,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(ft,{percentage:t,children:[t,"% ",jsx(xt,{percentage:It(t)})]}),e>0&&jsxs(z,{compact:true,color:"neutral",children:[e,"x"]})]})]})}):r==="VOID"&&!c?jsx(a,{title:L("Void"),children:jsx(j,{children:jsx(N,{src:tt.VOID?.icon,alt:"auto"})})}):null,I=t===100?jsx(a,{title:A("void"),children:jsx(j,{children:jsx(N,{src:wk,alt:"void"})})}):x,W=useMemo(()=>d&&I?jsx(b,{chipIndex:5,copyText:A("void"),selectionProps:s,children:A("void")}):n&&I?jsx(l,{children:A("void")}):I,[n,I,d,s]);return W?jsx("div",{id:g,"data-testid":"VoidAutoIcon",style:{...!d&&{zIndex:11}},children:W}):null}var $o=Ve;var Me=Do;var Fe=({authorizedStatus:t,isTextShown:o,iconStyles:e,tableMode:r,chipIndex:l=0,selectionProps:p={}})=>{let{t:a$1}=useTranslation(),n=useTheme$1(),d=a$1(_(t));return Va(r)?jsx(b,{copyText:d,chipIndex:l,selectionProps:p,children:d}):jsx(a,{title:d,children:o?jsx(j$1,{"data-testid":"StatusCell_AuthorizedStatusLabel",sx:{color:n.palette.info.dark},children:d}):jsx(a$2,{src:f[t],alt:"authorized-icon","data-testid":"StatusCell_AuthorizedStatusIcon",sx:e})})};var _o=styled$1(motion.span)(({theme:t})=>({color:t.palette.common.white,display:"block",fontWeight:t.typography.fontWeightBold,fontSize:"9.78px",borderRadius:"4px",paddingInline:t.spacing(.45)})),Vo=styled$1(motion.span)(()=>({display:"block",width:"0",overflow:"hidden"})),Bt=styled$1("img")(()=>({width:"10px",height:"10px"})),Lt=styled$1(motion.span)(({theme:t})=>({width:"18px",height:"18px",borderRadius:"50%",backgroundColor:t.palette.background.paper,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,position:"relative"})),Dt=styled$1(motion.div,{shouldForwardProp:t=>t!=="isVisible"})(({isVisible:t})=>({display:"flex",justifyContent:"center",alignItems:"center",gap:"4px",width:"0",overflow:"hidden",opacity:0,...!t&&{padding:"0 !important"}})),Mo=styled$1(motion.div)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start"})),zo=styled$1(motion.span)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minHeight:"24px",cursor:"pointer",borderRadius:"16px"})),No={delay:.2,ease:"easeIn",fadeIn:{duration:.2}},Go={animate:{width:"auto",paddingRight:"4px",paddingLeft:"4px"},fadeIn:{opacity:1,transition:{delay:.7}}},Fo={animate:{width:"auto"},fadeIn:{opacity:1,transition:{delay:1}}},Uo={animate:{width:"auto",paddingRight:"8px",paddingLeft:"4px"}},Et={fadeIn:{duration:.3},animate:{duration:.1}},Oo={fadeIn:{opacity:1}},jo=styled$1(j$1)(()=>({width:"88px",height:"100%"})),$t=styled$1(Box)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.25),height:"100%"}));function qe({chargeStatus:t,gatewayTooltip:o$1,acquirerTooltip:e,chargeTooltip:r,errorCode:l,isTextShown:p$1,gatewayCode:a$1,acquirerCode:n,unCapturedStyles:d,iconStyles:s$1,iconWrapperStyles:f,gatewayIconWrapperStyles:c,gatewayContainerStyles:g$1,gateWayIconStyles:T,showBadge:A=true,isSheetViewShown:P=false,selectionProps:L={},chipIndex:J=0}){let x=t?b$1[t]:null,I=t?g[t]:null,W=useTheme$1(),{t:C}=useTranslation(),X=yc(useId(),"charge-status-icon"),D=r&&jsx(Fragment,{children:jsx("div",{children:r})}),v=e&&jsxs(Fragment,{children:[jsx("div",{children:"Acquirer"}),jsx("div",{children:e})]}),Y=o$1&&jsxs(Fragment,{children:[jsx("div",{children:"Gateway"}),jsx("div",{children:o$1})]}),Ft=t&&a$3[t]&&jsx("div",{"data-testid":"ChargeStatusIcon_ChargeIcon",style:{display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",borderRadius:x?"50%":"",...f},children:jsx(p,{src:a$3[t],alt:"charge-icon","data-testid":"ChargeStatusIcon_StatusIcon",style:{borderRadius:x?"50%":"",width:"16px",height:"16px",...s$1}})});return P?jsxs($t,{children:[jsxs(b,{copyText:C(_(t)),chipIndex:J,selectionProps:L,children:[C(_(t))," ",l]}),x&&jsxs(Fragment,{children:[a$1&&jsxs(b,{copyText:"Gateway",chipIndex:1,selectionProps:L,children:["Gateway ",a$1]}),n&&jsxs(b,{copyText:"Acquirer",chipIndex:2,selectionProps:L,children:["Acquirer ",n]})]})]}):p$1?jsxs($t,{children:[jsx(a,{title:D,children:jsxs(jo,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":_(t),sx:{background:x?.background||I?.background||"transparent",color:x?.color||I?.color||W.palette.info.dark,borderColor:`${x?.color||I?.color||W.palette.info.dark}1A`},children:[C(_(t))," ",l]})}),x&&jsxs(Fragment,{children:[a$1&&jsx(a,{title:Y,children:jsxs(j$1,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":_(t),sx:{background:x?.background||I?.background||"transparent",color:x?.color||I?.color||W.palette.info.dark},children:["Gateway ",a$1]})}),n&&jsx(a,{title:v,children:jsxs(j$1,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":_(t),sx:{background:x?.background||I?.background||"transparent",color:x?.color||I?.color||W.palette.info.dark},children:["Acquirer ",n]})})]})]}):jsx(o,{id:X,"data-testid":"ChargeStatusIcon_StatusIconWrapper",style:{...f},children:s?.includes(t||"")&&(D||v||Y)?jsxs(zo,{"data-testid":"ChargeStatusIcon_UnCapturedContainer",whileHover:["animate","fadeIn"],style:{left:"0",...A&&{paddingInline:"12px",border:"1px solid #F2F2F2",borderRadius:"12px",backgroundColor:"#fff"},...d},children:[jsx(Mo,{"data-testid":"ChargeStatusIcon_UnCapturedBadge",sx:{borderRadius:"56px"},initial:{background:"transparent"},variants:{animate:{background:x?.background}},children:jsx(a,{title:D??C(_(t)),children:jsxs(Fragment,{children:[Ft,jsx(Vo,{"data-testid":"ChargeStatusIcon_ErrorCodeWrapper",transition:{animate:{duration:.05}},variants:Uo,style:{...l&&{padding:"0 !important"}},children:jsx(_o,{"data-testid":"ChargeStatusIcon_ErrorCodeLabel",sx:{background:x?.color},transition:No,variants:Oo,initial:{opacity:0},children:l})})]})})}),jsx(Dt,{"data-testid":"ChargeStatusIcon_GatewaysContainer",transition:Et,variants:Go,style:g$1,isVisible:!!Y,children:Y&&jsx(a,{title:Y,children:jsx(Lt,{"data-testid":"ChargeStatusIcon_GatewayIconWrapper",style:{background:x?.background,...c},children:jsx(Bt,{src:x?.gatewayIcon,alt:"gateway-icon","data-testid":"ChargeStatusIcon_GatewayIcon",style:T})})})}),jsx(Dt,{"data-testid":"ChargeStatusIcon_GatewaysContainer",transition:Et,variants:Fo,style:g$1,isVisible:!!v,children:v&&jsx(a,{title:v,children:jsx(Lt,{"data-testid":"ChargeStatusIcon_AcquirerIconWrapper",style:{background:x?.background,...c},children:jsx(Bt,{src:x?.acquirerIcon,alt:"acquirer-icon","data-testid":"ChargeStatusIcon_AcquirerIcon",style:T})})})})]}):jsx(a,{title:D??C(_(t)),children:jsx(o,{children:Ft})})})}var Xe=()=>{let{t}=useTranslation(),o=yc(useId(),"customer-initiated-icon");return jsx(a,{title:t("merchantInitiated"),children:jsx("img",{id:o,"data-testid":"merchantInitiatedIcon",src:vb,alt:"merchant",style:{width:"16px",height:"16px"}})})};var Ye={G:"Global",R:"Regional",L:"Local"},ot=({geographyVariant:t,countryCode:o,isTextShown:e})=>{let r=t?Ye[t]:void 0,l=r||o?`${r||""} ${r&&o?"-":""} ${o?`Country - ${o}`:""}`:void 0;return e||!o?null:jsx(a,{title:l,children:jsx(a$4,{countryCode:o})})};var tr=({geographyVariant:t,isTextShown:o,deviceCountry:e,deviceType:r,tableMode:l})=>{let p=yc(useId(),"device-icon-chip");return jsxs(Qe,{id:p,"data-testid":"DeviceIconChip",sx:{display:"flex",gap:"8px",alignItems:"center",...Va(l)&&{height:"18px"}},children:[jsx(ot,{geographyVariant:t,isTextShown:o,countryCode:e}),jsx(c,{type:r,isTextShown:o,tableMode:l})]})};var rr=({isDisputeOpen:t,iconStyles:o})=>{let e=yc(useId(),"dispute-icon");return jsx(p,{id:e,"data-testid":"StatusCell_DisputeStatusIcon",sx:{width:"13.5px",height:"13.5px"},src:t?wa:va,alt:"dispute-icon",style:o})};var Xo=styled$1(Qe,{shouldForwardProp:t=>t!=="tableMode"})(({theme:t,tableMode:o})=>({display:"flex",gap:t.spacing(.5),...Va(o)&&{height:"18px"},alignItems:"center"})),Yo=styled$1("span")(({theme:t})=>({fontSize:"10px",fontWeight:500,color:t.palette.text.primary}));function Vt({countryCode:t,isTextShown:o,cardNumber:e,bankName:r,tableMode:l}){let p=yc(useId(),"issuer-icon"),a$1=e?.slice(0,4),n=e?.slice(-4);return jsxs(Xo,{id:p,"data-testid":"IssuerIcon",tableMode:l,children:[t&&jsx(ot,{countryCode:t,isTextShown:o}),jsx(a,{title:`${r?`Issuer - ${r}`:""}`,children:jsx(Yo,{children:`${a$1||""} ${n||""}`})})]})}var sr=Vt;styled(motion.div)(({theme:t,background:o})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.5),paddingInline:t.spacing(.75),paddingBlock:t.spacing(.5),backgroundColor:o,height:"24px",width:"fit-content",borderRadius:"24px",fontSize:"10px",color:t.palette.text.primary}));var Ra=styled("img")(()=>({height:"13.125px",width:"12px"})),bt=styled("div")(()=>({fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"center",width:"65px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"4.5px 8px",borderRadius:"24px"})),ka=styled("div")(({theme:t})=>({color:t.palette.common.white,background:t.palette.error.main,fontSize:"0.6rem",fontWeight:600,borderRadius:"16px",padding:"2px 8px",display:"flex",alignItems:"center",justifyContent:"center"})),Ba=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px"}));var ur=({payoutStatus:t="PENDING",isTextShown:o,payoutTooltip:e$1,iconStyles:r,isSheetViewShown:l,chipIndex:p$1=0,selectionProps:a$1={}})=>{let{t:n}=useTranslation(),d=yc(useId(),"payout-icon"),s=n(_(t)),f=e$1||s;return l?jsx(b,{chipIndex:p$1,copyText:s,selectionProps:a$1,children:s}):jsx(a,{title:f,children:o?jsx(bt,{id:d,"data-testid":"StatusCell_PayoutStatusLabel",children:s}):jsx(p,{id:d,src:e[t],alt:"settled-icon","data-testid":"StatusCell_PayoutStatusIcon",style:r})})};var Qo=styled$1(motion.img)(()=>({width:"14px",height:"14px"})),Zo=styled$1(motion.span)(({theme:t})=>({color:t.palette.common.white,borderRadius:t.spacing(.5),height:"12px",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"9.782px",fontWeight:600,backgroundColor:t.palette.secondary.main})),Mt=styled$1(motion.div)(({theme:t})=>({height:"16px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:`${t.palette.secondary.main}1A`,paddingInline:t.spacing(.5),borderRadius:"56px"})),qa=(t,o,e)=>({start:{x:t*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:e?t*e:t*49,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:o}}),Ka=styled$1(motion.span)(({isTextShown:t,theme:o})=>({border:`1px solid ${o.palette.divider}`,borderRadius:"12px",backgroundColor:o.palette.background.paper,height:"24px",display:"flex",alignItems:"center",justifyContent:"center",minWidth:t?"auto":"36px",...t&&{border:"none"}})),Ja=styled$1(motion.div,{shouldForwardProp:t=>t!=="order"})(({order:t=0})=>({display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:0,left:0,zIndex:t+6,width:"fit-content",height:"24px",cursor:"pointer",borderRadius:"16px","&:hover":{zIndex:200}})),Xa=styled$1(motion.div,{shouldForwardProp:t=>t!=="statusesCount"})(({statusesCount:t=1})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"relative",minWidth:`${t*6+36}px`,height:"24px",cursor:"pointer",borderRadius:"16px",overflow:"visible"})),Ya=styled$1("div")(()=>({display:"flex",gap:"4px",justifyContent:"flex-start",alignItems:"center",position:"relative",width:"100%",overflow:"visible"}));var hr=({isTextShown:t,refundStatus:o="PENDING",refundTooltip:e="",refundCount:r,iconStyles:l,isSheetViewShown:p$1,chipIndex:a$1=0,selectionProps:n={}})=>{let{t:d$1}=useTranslation(),s=useTheme$1(),f=yc(useId(),"refund-icon"),c=(r||0)>1,g=d$1(_(o));if(p$1)return jsxs(b,{chipIndex:a$1,selectionProps:n,copyText:g,children:[g," ",c?`${r}x`:null]});let T=jsxs(Zo,{"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:[r,"x"]});return t?jsx(a,{title:jsx("div",{children:jsx("div",{children:e})}),children:jsx(bt,{id:f,"data-testid":"StatusCell_RefundStatusLabel",sx:{color:d[o].color,backgroundColor:d[o].backgroundColor,width:"90px"},children:jsxs(Mt,{whileInView:c?["animate","fadeIn"]:void 0,variants:{animate:{boxShadow:s.shadows[4],gap:s.spacing(.5)}},children:[g," ",c?T:null]})})}):jsx(a,{title:jsx("div",{children:jsx("div",{children:e})}),children:c?jsxs(Mt,{id:f,whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:s.shadows[4],gap:s.spacing(.5)}},children:[jsx(Qo,{src:ok,alt:"multi-refunded-icon","data-testid":"StatusCell_MultiRefundIcon"}),T]}):jsx(p,{id:f,src:c$1[o],alt:"refunded-icon","data-testid":"StatusCell_RefundStatusIcon",style:l})})},te=hr;var Cr=te;var yr={american_express:"AMEX",debit:"card",credit:"card",unionpay:"UnionPay",jaywan:"JAYWAN"},B=t=>yr[t?.toLowerCase()||""]||t;styled("span")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(1)}));var oe=styled("img")(()=>({maxWidth:"24px",maxHeight:"16px"}));styled(motion.span,{shouldForwardProp:t=>t!=="sourcesCount"})(({theme:t,sourcesCount:o})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${o*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:t.palette.background.paper,borderRadius:"16px"}));var ee=styled("span")(({theme:t})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:t.palette.text.primary})),re=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px",textAlign:"center",width:"100%"}));styled("span")(({theme:t})=>({position:"absolute",left:0,zIndex:6,border:`1px solid ${t.palette.divider}`,borderRadius:"12px",backgroundColor:t.palette.background.paper,width:"36px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"}));var ne=styled("span")(({theme:t})=>({fontSize:"10px",fontWeight:500,color:t.palette.text.primary}));function At({source:t,isTextShown:o,title:e,width:r,height:l,imgSx:p}){let{t:a$1}=useTranslation(),n=h(t);return jsx(a,{title:e,children:o?jsx(re,{"data-testid":"SourceCell_BadgeTextWrapper",children:jsx(ee,{"data-testid":"SourceCell_TextLabel","data-source":t,children:a$1(_(t))})}):jsx(oe,{src:n,alt:t,width:r,height:l,onError:d=>{d.currentTarget.src=h("card");},sx:p})})}function vr({payment:t,card:o,isTextShown:e,firstIcon:r}){let l=yc(useId(),"source-icons"),{t:p}=useTranslation(),a=useCallback(()=>{let s=[],f=bc(t),c=t?.method,g=t?.scheme;return B(c)?.toLowerCase()===B(g)?.toLowerCase()?s.push(B(c),B(f)):s.push(B(c),B(f),B(g)),s},[t]),n=useMemo(()=>jsx(At,{source:r,isTextShown:e,title:p(_(r))},r),[r,e,p]),d=useMemo(()=>a()?.filter(s=>!!s&&s!==r)?.map((s,f,c)=>{let g=t?.wallet===p("sv_wallet")?p("storedValueWallet"):p("passThruWallet"),T=f===c.length-1&&o?.last_four?`${p(_(s))} - ${o?.last_four}`:p(_(s));return jsx(At,{source:s,isTextShown:e,title:f===0&&s==="Wallet"?g:T},`${s}-${f}`)}),[a,t,o,e,p,r]);return jsxs(Box,{id:l,"data-testid":"SourceIcons",display:"flex",alignItems:"center",gap:.5,children:[r&&n,d,o?.last_four&&jsxs(ne,{children:["\xB7\xB7\xB7 ",o?.last_four]})]})}var rt={PROCESSED:Qg,FAILED:""};var se=styled("span")(({theme:t})=>({fontSize:"11px",padding:"2px 0",color:t.palette.text.primary})),le=styled("img")(()=>({width:"16px",height:"16px"})),de=styled("span")(()=>({width:"24px",height:"24px",borderRadius:"50%",backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}));function ce({status:t,isTextShown:o,isSheetViewShown:e,chipIndex:r=0,selectionProps:l={}}){let p=useTheme(),{t:a$1}=useTranslation(),n=yc(useId(),"destination-icon"),d=a$1(_(t));return e&&rt[t]?jsx(b,{copyText:d,chipIndex:r,selectionProps:l,children:d}):o&&rt[t]?jsx(se,{id:n,"data-testid":"ChargeStatusIcon_isTextShown","data-status":_(t),sx:{background:"#1F88D00D",color:t==="PROCESSED"?p.palette.info.dark:p.palette.common.black},children:d}):jsx(de,{id:n,"data-testid":"DestinationIcon",className:"destination-status",children:t&&rt[t]&&jsx(a,{title:a$1(_(t)),children:jsx(le,{src:rt[t],alt:"destination-icon"})})})}export{qa as a,Ka as b,Ja as c,Xa as d,Ya as e,Ce as f,Se as g,Te as h,$o as i,Me as j,Fe as k,qe as l,Xe as m,ot as n,tr as o,rr as p,sr as q,Ra as r,ka as s,Ba as t,ur as u,Cr as v,B as w,At as x,vr as y,ce as z};
@@ -0,0 +1 @@
1
+ import {c,d}from'./chunk-PPC5EHKW.js';import {a,c as c$1,d as d$1}from'./chunk-RMTT4FOG.js';import {b,a as a$1}from'./chunk-O5KFJKRT.js';import {yc,xa}from'./chunk-2CIV4TII.js';import {Hf}from'./chunk-KCEYICHJ.js';import {createContext,memo,useRef,useId,useContext,useMemo,useState,useLayoutEffect,useCallback}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {createPortal}from'react-dom';import {styled,Box,Button,alpha,Dialog}from'@mui/material';import nt from'@mui/material/Box';import {Resizable}from're-resizable';import st from'react-draggable';import {motion}from'framer-motion';var Y=createContext({viewerDefaultWidth:555,viewerDefaultHeight:545,position:{x:0,y:0},setPosition:()=>{},dimensions:{width:0,height:0},windowZIndex:1e4,isOpen:true,setIsMaximized:()=>{},setIsSidebarExpanded:()=>{},setIsToolbarAnimationDisabled:()=>{},setIsResized:()=>{},setNewDimensions:()=>{},isMaximized:false,isToolbarAnimationDisabled:true,isSidebarExpanded:false,isResized:false,onClose:()=>{},fullWindowWidth:0,fullWindowHeight:0,resizableRef:{current:null},updateRefSize:()=>{},updateSize:()=>{},containerRef:{current:null}});var Oe=555,Ve=545;function Q({children:e,isOpen:t,onClose:i,defaultWindowHeight:r,defaultWindowWidth:n,initialPosition:p,minWidth:l,maxWidth:s,minHeight:a,maxHeight:d,containerRef:m,windowZIndex:f=1}){let{height:c,width:E}=a$1(),[o,k]=useState(false),L=o?null:m?.current,H=L?.clientWidth||E,h=L?.clientHeight||c,I=n||Oe,g=r||Ve,[v,_]=useState({x:p?.x??H/2+I/2,y:p?.y??h/2-g/2}),[W,z]=useState(false),[T,D]=useState(false),[C,w]=useState(true),y=useRef(),[F,P]=useState({width:n??0,height:r??0}),G=useCallback(b=>{y?.current?.updateSize(b);},[]),O=useCallback(b=>{y.current?.updateSize(b),P(u=>({width:b.width??u.width,height:b.height??u.height}));},[]),J=useMemo(()=>({position:v,setPosition:_,resizableRef:y,windowZIndex:f,isOpen:t,setIsMaximized:k,setIsSidebarExpanded:w,setIsToolbarAnimationDisabled:D,setIsResized:z,isMaximized:o,isToolbarAnimationDisabled:T,isSidebarExpanded:C,isResized:W,dimensions:F,setNewDimensions:P,viewerDefaultWidth:I,viewerDefaultHeight:g,onClose:i,fullWindowWidth:H,fullWindowHeight:h,updateRefSize:G,updateSize:O,minWidth:l,maxWidth:s,minHeight:a,maxHeight:d,containerRef:m}),[v,_,y,t,k,w,D,z,o,T,C,W,F,P,H,h,I,g,G,O,i,l,s,a,d,m,f]);return jsx(Y.Provider,{value:J,children:e})}var xe=(e,t)=>t.toLowerCase().includes(e);function he(e,t,i){let r=xe("top",t),n=xe("left",t);return !r&&!n?null:{x:n?e.x+i.width:e.x,y:r?e.y-i.height:e.y}}var S=.5,we=183,be=287,ge=840,We=545,ee=35;function Xe({title:e,onClose:t,onMaximize:i,maximized:r=false,id:n,onRequestClick:p,isSidebarExpanded:l=false,isHovered:s=false,onMouseHover:a$1,onMouseLeave:d$2,showSectionsButton:m,rightActions:f,icon:c$2}){return jsx(c,{id:n,"data-testid":"UserTitleBar",maximized:r||false,children:jsx(d,{onMouseEnter:a$1,onMouseLeave:d$2,isMaximized:r,isHovered:s,title:e,icon:c$2||Hf,leftActions:jsxs(Fragment,{children:[jsx(a,{onClick:t}),jsx(c$1,{isMaximized:r,onClick:i}),m&&jsx(d$1,{onClick:p,isExpanded:!l,isHovered:s,children:"Sidebar"})]}),rightActions:f})})}var He=memo(Xe);var te=He;function Ze({isMaximized:e,setIsToolbarAnimationDisabled:t,setIsMaximized:i,onClose:r,isSidebarExpanded:n,setIsSidebarExpanded:p,isToolbarAnimationDisabled:l,title:s,showSectionsButton:a,rightActions:d,icon:m}){let{isHovered:f,onMouseEnter:c,onMouseLeave:E}=b();return jsx(motion.div,{style:{...e&&{height:0,zIndex:1e3,position:"relative"}},animate:{...e&&{width:"100vw"},...!e&&{transform:"translateX(0px)",width:"100%"}},transition:{duration:.5,...l&&{duration:0}},children:jsx(te,{title:s||"Users",showSectionsButton:a,onClose:r,onMaximize:()=>{i?.(o=>!o),t?.(true),setTimeout(()=>{t?.(false);},.5*1e3);},maximized:e,id:"draggable-dialog-title",onRequestClick:()=>{t?.(false),p(!n);},isSidebarExpanded:n,isHovered:f,onMouseHover:c,onMouseLeave:E,rightActions:d,icon:m})})}var Ae=memo(Ze);var Re=Ae;function dt({children:e,titleBar:t,titleBarText:i,mainAppOrder:r,mainAppIsMinimized:n,showSectionsButton:p=true,rightActions:l,titleBarIcon:s,overflow:a="hidden"}){let d=useRef(null),m=yc(useId(),"app-window"),{dimensions:f,position:c,resizableRef:E,isMaximized:o,isOpen:k,onClose:L,viewerDefaultWidth:H,viewerDefaultHeight:h,windowZIndex:I,setPosition:g,setNewDimensions:v,isToolbarAnimationDisabled:_,fullWindowWidth:W,fullWindowHeight:z,setIsMaximized:T,setIsResized:D,isResized:C,setIsToolbarAnimationDisabled:w,setIsSidebarExpanded:y,isSidebarExpanded:F,minWidth:P,maxWidth:G,minHeight:O,maxHeight:J,containerRef:b}=useContext(Y),u=useMemo(()=>document.createElement("div"),[]),[Pe,Be]=useState(null);useLayoutEffect(()=>{Be(b?.current??document.body);},[b]);let x=o?document.body:Pe;useLayoutEffect(()=>{if(!x)return;let A=x===document.body;return u.style.position=A?"":"absolute",u.style.inset=A?"":"0",u.style.pointerEvents="none",x.appendChild(u),()=>{u.parentNode===x&&x.removeChild(u);}},[x,u]);let ne=useRef({x:0,y:0}),ae=xa(),Me=useCallback((A,N,se,Le)=>{D(true),v({width:se.offsetWidth,height:se.offsetHeight});let de=he(ne.current,N,Le);de&&g(de);},[v,D,g]),V=f.width||H;if(!x)return null;let ke=jsx(st,{nodeRef:d,disabled:o,handle:"#draggable-dialog-title",cancel:'[class*="MuiDialogContent-root"]',defaultClassName:"draggable-lead-dialog",defaultPosition:{x:W/2-V/2,y:z/2-h/2},position:{x:W-c.x,y:c.y},onStop:(A,N)=>{g({x:W-N.x,y:N.y});},...x===document.body&&{bounds:{top:10}},children:jsx(Dialog,{ref:d,sx:{backgroundColor:"transparent",pointerEvents:"none",zIndex:Number(r||0)+I+(o?1:0),...n&&{display:"none"},...x===document.body?!o&&{transform:"translate(180px, 14px)"}:!o&&{position:"absolute"},...!o&&{width:ae?V:"fit-content",height:ae?h:"fit-content"},...o&&{transform:"none !important"},boxShadow:"0px 0px 20px 0px rgba(0, 0, 0, 0.15)",...a==="visible"&&{overflow:"visible","& .MuiDialog-container":{overflow:"visible"}}},PaperProps:{style:{margin:0,maxHeight:"100%",maxWidth:"none",background:"transparent",pointerEvents:"auto",overflow:a,width:C?"fit-content":V,height:C?"fit-content":"100%",...o&&{width:"100%",height:"100%"},position:"relative"}},onClose:()=>{T(false),w(true),setTimeout(()=>{w(false);},.5*1e3);},open:k,hideBackdrop:true,disableEnforceFocus:true,container:u,fullScreen:o,"aria-labelledby":"draggable-dialog-title",disablePortal:true,children:jsx(Resizable,{"data-testid":"Resizable",enable:{topLeft:true,topRight:true,bottomLeft:true,bottomRight:true,left:true,right:true,bottom:true,top:true},handleStyles:{bottom:{zIndex:2},bottomLeft:{zIndex:2},bottomRight:{zIndex:2}},size:{width:f.width,height:f.height},maxHeight:J??z-40,maxWidth:G??W,minWidth:o?"100vw":P??H,minHeight:o?"100vh":O??h,ref:A=>{E.current=A;},onResizeStart:()=>{ne.current=c,w(true);},onResizeStop:()=>{w(false);},onResize:Me,defaultSize:{width:V,height:h},style:{background:"transparent",height:f.height,overflow:a,...o&&{height:"100% !important",width:"100% !important",flex:1},...o&&{position:"relative"}},children:jsxs(nt,{sx:{height:"100%"},id:m,"data-testid":"AppWindow",children:[t??jsx(Re,{setIsToolbarAnimationDisabled:w,onClose:L,setIsMaximized:T,isToolbarAnimationDisabled:_,setIsSidebarExpanded:y,isSidebarExpanded:F,title:i,isMaximized:o,showSectionsButton:p,rightActions:l,icon:s}),e]})})})});return createPortal(ke,u)}var Ie=memo(dt);var ut=styled(Box,{shouldForwardProp:e=>e!=="isActive"})(({theme:e,isActive:t})=>({background:t?"linear-gradient(270deg, #147DC5 0.67%, #3DA6E1 98.91%)":"transparent",borderRadius:"4px",padding:"4px 8px",color:t?e.palette.common.white:e.palette.text.primary,fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px",cursor:"pointer"})),mt=styled(Button)(({theme:e,disabled:t})=>({background:t?alpha(e.palette.info.dark,.4):e.palette.info.dark,color:e.palette.common.white,padding:"0px 8px",fontSize:"9px",fontWeight:600,height:"24px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",textTransform:"none","&:hover":{background:e.palette.info.dark,opacity:.8},"&.Mui-disabled":{color:e.palette.common.white}})),ft=styled(Box)(({theme:e})=>({display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"8px",backgroundColor:e.palette.background.paper,padding:"6px",transform:"translateY(calc(-50% - 6px))",boxShadow:"0px 4px 40px 0px rgba(0, 0, 0, 0.19)",borderRadius:"4px",height:"36px",transition:e.transitions.create(["width"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.complex})})),ct=styled(Box)(()=>({position:"fixed",height:35,bottom:0,left:0,right:0,padding:"6px 16px",zIndex:1,backgroundColor:"#eaeaea",backdropFilter:"blur(12px)",display:"flex",justifyContent:"flex-end",borderBottomLeftRadius:"12px",borderBottomRightRadius:"12px"})),xt=styled(Button)(()=>({padding:"4px 8px",boxShadow:"0px 0px 4px 0px rgba(0, 0, 0, 0.08)",display:"flex",justifyContent:"flex-start",alignItems:"center",gap:"4px",color:"rgba(32, 35, 43, 0.80)",fontWeight:600,fontSize:"9px",textTransform:"none"}));var ie=Ie;function ht({children:e,windowProps:t,...i}){return i.isOpen?jsx(Q,{...i,children:jsx(ie,{...t,children:e})}):null}var Te=ht;function bt({title:e,maximized:t=false,id:i,isHovered:r=false,onMouseHover:n,onMouseLeave:p,leftActions:l,titleIconSrc:s,sx:a,...d$1}){return jsx(c,{className:"header-wrapper",id:i,maximized:t||false,sx:a,...d$1,children:jsx(d,{onMouseEnter:n,onMouseLeave:p,isMaximized:t,isHovered:r,title:e||"",icon:s,leftActions:l})})}var re=memo(bt);function Ht({isMaximized:e,id:t,isToolbarAnimationDisabled:i,title:r,leftActions:n,onClose:p,onMaximize:l,sx:s}){let{isHovered:a$1,onMouseEnter:d,onMouseLeave:m}=b();return jsx(motion.div,{style:{...e&&{height:0,zIndex:1e3,position:"relative"}},animate:{...e&&{width:"100vw"},...!e&&{transform:"translateX(0px)",width:"100%"}},transition:{duration:.5,...i&&{duration:0}},children:jsx(re,{title:r,maximized:e,id:t||"draggable-dialog-title",isHovered:a$1,onMouseHover:d,onMouseLeave:m,leftActions:n||jsxs(Fragment,{children:[jsx(a,{onClick:p}),jsx(c$1,{isMaximized:e,onClick:()=>l?.(!e)})]}),sx:s})})}var Ce=memo(Ht);var Rt=Ce;var Vo=Te;export{Y as a,Q as b,S as c,we as d,be as e,ge as f,We as g,ee as h,te as i,ut as j,mt as k,ft as l,ct as m,xt as n,ie as o,re as p,Rt as q,Vo as r};
@@ -1,2 +1,2 @@
1
- import {h,g,a,f,e,d,c}from'./chunk-VB7FCFAH.js';import {z}from'./chunk-DV5XS66I.js';import {yc,Ka,g as g$1}from'./chunk-2CIV4TII.js';import {vl,ka,Ua,Lg,fl,Za,Ta,Ug,Tg,Vg,Sg,Xg,Ab,zb,xk,fk,hb,sk,C,w,B,E,Qh,ek,u,yk}from'./chunk-KCEYICHJ.js';import {memo,useId,useState,useRef,useEffect,useMemo,useCallback}from'react';import {useTranslation}from'react-i18next';import {useTheme}from'@mui/material';import {jsx,jsxs,Fragment}from'react/jsx-runtime';function L({isActive:p,disableHover:n}){let[c,C]=useState(false),s=useTheme(),e=()=>{n||C(true);},i=()=>{C(false);},h=p?s.palette.common.white:s.palette.grey[700],u=c?s.palette.common.black:"transparent";return jsx("svg",{width:"27",height:"30",viewBox:"0 0 27 32",xmlns:"http://www.w3.org/2000/svg",children:jsxs("g",{id:"Group 140343",children:[jsx("path",{id:"Active",d:"M0 0H11C19.8366 0 27 7.16344 27 16C27 24.8366 19.8366 32 11 32H0V0Z",fill:u,fillOpacity:"0.1",onMouseEnter:e,onMouseLeave:i}),jsx("path",{id:"Union",fillRule:"evenodd",clipRule:"evenodd",d:"M15.6941 15.0078C15.6494 15.0193 15.6083 15.043 15.5758 15.0769L12.5026 18.1501L12.5025 18.1501L15.5756 15.0769C15.6082 15.043 15.6493 15.0193 15.6941 15.0078ZM12.5619 18.7465C12.5426 18.7512 12.5227 18.7536 12.5026 18.7536C12.4363 18.7536 12.3727 18.7273 12.3258 18.6804L9.07581 15.4304C9.04012 15.3957 9.01559 15.3512 9.00535 15.3025C8.99511 15.2538 8.99963 15.2032 9.01833 15.1571C9.03703 15.111 9.06907 15.0715 9.11033 15.0437C9.13446 15.0275 9.16112 15.0156 9.18904 15.0086C9.16105 15.0156 9.13433 15.0275 9.11013 15.0438C9.06887 15.0716 9.03684 15.111 9.01814 15.1571C8.99944 15.2032 8.99492 15.2539 9.00516 15.3026C9.0154 15.3513 9.03993 15.3958 9.07562 15.4305L12.3256 18.6805C12.3725 18.7273 12.4361 18.7537 12.5024 18.7537C12.5226 18.7537 12.5426 18.7512 12.5619 18.7465ZM16.1965 15.342C16.1781 15.4301 16.1338 15.5105 16.0693 15.5731L12.8205 18.8219C12.7361 18.9063 12.6217 18.9537 12.5024 18.9537C12.3831 18.9537 12.2686 18.9062 12.1842 18.8219L8.93507 15.5728C8.87148 15.5105 8.82775 15.4308 8.80944 15.3437C8.79101 15.2561 8.79914 15.165 8.8328 15.082C8.86646 14.999 8.92412 14.9279 8.99839 14.8779C9.07266 14.8279 9.16022 14.8011 9.24978 14.8011C9.30998 14.8011 9.36958 14.8132 9.42503 14.8366C9.47997 14.8599 9.52973 14.8938 9.57144 14.9364L12.5024 17.8673L15.433 14.9368C15.5151 14.852 15.6273 14.803 15.7454 14.8002C15.836 14.798 15.9252 14.8233 16.0013 14.8728C16.0773 14.9222 16.1367 14.9935 16.1715 15.0772C16.2063 15.1609 16.2151 15.2533 16.1965 15.342Z",fill:h})]})})}var vt={inProgress:yk,initiated:yk,abandoned:u,cancelled:ek,reversed:Qh,reports:E,search:B,chevronDown:w,unAuthorized:C,unSettled:sk,unCaptured:hb,captured:fk,authorized:xk,openFlag:zb,closedFlag:Ab,unauthenticated:Xg,authenticated:Sg,paidOut:Vg,scheduled:Tg,checked:Ug,dashedChecked:Ta,deactivated:Za,destination:fl,destinationReversed:Lg,outstanding:Ua,active:ka,inactive:vl};var Nt=memo(p=>{let{variant:n="inActive",badgeCount:c$1,icon:C,label:s,dropdownOptions:e$1,selectedStatus:i,onButtonBodyClick:h$1,iconMapper:u=vt,buttonSx:Bt,...bt}=p,St=yc(useId(),"status-button"),[Lt,M]=useState(0),{t:y}=useTranslation(),E=useRef(null),[x,f$1]=useState(null),[o,H]=useState(i??e$1?.[0]?.status);useEffect(()=>{i!==void 0&&H(i);},[i]);let d$1=useMemo(()=>!!e$1?.length,[e$1]),I=!!x&&Lt>1,l=n==="active",P=useMemo(()=>l?"active":"inactive",[l]),m=useMemo(()=>o?e$1?.find(t=>t.status===o):null,[o,e$1]),kt=useMemo(()=>{if(m?.icon)return jsx(h,{variant:n,children:m.icon});let t=o&&u[o]?o:C;if(t&&u[t])return jsx(g,{icon:t,variant:n,src:u[t],alt:`${t}-icon`})},[m,o,u,C,n]),wt=useMemo(()=>!c$1||Number.isNaN(Ka(c$1))?null:jsx(z,{color:P,children:g$1(Number(c$1))}),[c$1,P]),T=useMemo(()=>d$1?jsx(L,{isActive:l}):null,[d$1,l]);useEffect(()=>{l||(M(0),f$1(null));},[l]);let g$2=useCallback(()=>{f$1(null);},[]),A=useCallback(()=>{d$1&&f$1(I?null:E.current);},[d$1,I]),Mt=useCallback(t=>{t.stopPropagation(),p?.onClick?.(t),h$1?.(o||e$1?.[0]?.status||"all"),A(),M(B=>B+1);},[p,h$1,o,e$1,A]),D=useCallback(t=>B=>{t?.onClick?.(B),H(t.status),g$2();},[g$2]),yt=useMemo(()=>e$1?.map(t=>({...t,onClick:D(t)}))||[],[e$1,D]),Et=a[n],xt=useMemo(()=>m?.label||(o?y(o):s),[m,o,y,s]);return jsxs(Fragment,{children:[jsx(Et,{id:St,"data-testid":"StatusButton",...bt,ref:E,onClick:Mt,statusVariant:n,sx:{...d$1&&{paddingInlineEnd:"27px"},...Bt},children:jsxs(f,{children:[jsxs(e,{variant:n,children:[kt,xt,wt]}),T&&jsx(d,{children:T})]})}),I&&d$1&&jsx(c,{open:I,onClose:g$2,anchorEl:x,menuItems:yt})]})}),gt=Nt;var oo=gt;
1
+ import {h,g,a,f,e,d,c}from'./chunk-7MI55RIT.js';import {z}from'./chunk-ZPGWJ5RD.js';import {yc,Ka,g as g$1}from'./chunk-2CIV4TII.js';import {vl,ka,Ua,Lg,fl,Za,Ta,Ug,Tg,Vg,Sg,Xg,Ab,zb,xk,fk,hb,sk,C,w,B,E,Qh,ek,u,yk}from'./chunk-KCEYICHJ.js';import {memo,useId,useState,useRef,useEffect,useMemo,useCallback}from'react';import {useTranslation}from'react-i18next';import {useTheme}from'@mui/material';import {jsx,jsxs,Fragment}from'react/jsx-runtime';function L({isActive:p,disableHover:n}){let[c,C]=useState(false),s=useTheme(),e=()=>{n||C(true);},i=()=>{C(false);},h=p?s.palette.common.white:s.palette.grey[700],u=c?s.palette.common.black:"transparent";return jsx("svg",{width:"27",height:"30",viewBox:"0 0 27 32",xmlns:"http://www.w3.org/2000/svg",children:jsxs("g",{id:"Group 140343",children:[jsx("path",{id:"Active",d:"M0 0H11C19.8366 0 27 7.16344 27 16C27 24.8366 19.8366 32 11 32H0V0Z",fill:u,fillOpacity:"0.1",onMouseEnter:e,onMouseLeave:i}),jsx("path",{id:"Union",fillRule:"evenodd",clipRule:"evenodd",d:"M15.6941 15.0078C15.6494 15.0193 15.6083 15.043 15.5758 15.0769L12.5026 18.1501L12.5025 18.1501L15.5756 15.0769C15.6082 15.043 15.6493 15.0193 15.6941 15.0078ZM12.5619 18.7465C12.5426 18.7512 12.5227 18.7536 12.5026 18.7536C12.4363 18.7536 12.3727 18.7273 12.3258 18.6804L9.07581 15.4304C9.04012 15.3957 9.01559 15.3512 9.00535 15.3025C8.99511 15.2538 8.99963 15.2032 9.01833 15.1571C9.03703 15.111 9.06907 15.0715 9.11033 15.0437C9.13446 15.0275 9.16112 15.0156 9.18904 15.0086C9.16105 15.0156 9.13433 15.0275 9.11013 15.0438C9.06887 15.0716 9.03684 15.111 9.01814 15.1571C8.99944 15.2032 8.99492 15.2539 9.00516 15.3026C9.0154 15.3513 9.03993 15.3958 9.07562 15.4305L12.3256 18.6805C12.3725 18.7273 12.4361 18.7537 12.5024 18.7537C12.5226 18.7537 12.5426 18.7512 12.5619 18.7465ZM16.1965 15.342C16.1781 15.4301 16.1338 15.5105 16.0693 15.5731L12.8205 18.8219C12.7361 18.9063 12.6217 18.9537 12.5024 18.9537C12.3831 18.9537 12.2686 18.9062 12.1842 18.8219L8.93507 15.5728C8.87148 15.5105 8.82775 15.4308 8.80944 15.3437C8.79101 15.2561 8.79914 15.165 8.8328 15.082C8.86646 14.999 8.92412 14.9279 8.99839 14.8779C9.07266 14.8279 9.16022 14.8011 9.24978 14.8011C9.30998 14.8011 9.36958 14.8132 9.42503 14.8366C9.47997 14.8599 9.52973 14.8938 9.57144 14.9364L12.5024 17.8673L15.433 14.9368C15.5151 14.852 15.6273 14.803 15.7454 14.8002C15.836 14.798 15.9252 14.8233 16.0013 14.8728C16.0773 14.9222 16.1367 14.9935 16.1715 15.0772C16.2063 15.1609 16.2151 15.2533 16.1965 15.342Z",fill:h})]})})}var vt={inProgress:yk,initiated:yk,abandoned:u,cancelled:ek,reversed:Qh,reports:E,search:B,chevronDown:w,unAuthorized:C,unSettled:sk,unCaptured:hb,captured:fk,authorized:xk,openFlag:zb,closedFlag:Ab,unauthenticated:Xg,authenticated:Sg,paidOut:Vg,scheduled:Tg,checked:Ug,dashedChecked:Ta,deactivated:Za,destination:fl,destinationReversed:Lg,outstanding:Ua,active:ka,inactive:vl};var Nt=memo(p=>{let{variant:n="inActive",badgeCount:c$1,icon:C,label:s,dropdownOptions:e$1,selectedStatus:i,onButtonBodyClick:h$1,iconMapper:u=vt,buttonSx:Bt,...bt}=p,St=yc(useId(),"status-button"),[Lt,M]=useState(0),{t:y}=useTranslation(),E=useRef(null),[x,f$1]=useState(null),[o,H]=useState(i??e$1?.[0]?.status);useEffect(()=>{i!==void 0&&H(i);},[i]);let d$1=useMemo(()=>!!e$1?.length,[e$1]),I=!!x&&Lt>1,l=n==="active",P=useMemo(()=>l?"active":"inactive",[l]),m=useMemo(()=>o?e$1?.find(t=>t.status===o):null,[o,e$1]),kt=useMemo(()=>{if(m?.icon)return jsx(h,{variant:n,children:m.icon});let t=o&&u[o]?o:C;if(t&&u[t])return jsx(g,{icon:t,variant:n,src:u[t],alt:`${t}-icon`})},[m,o,u,C,n]),wt=useMemo(()=>!c$1||Number.isNaN(Ka(c$1))?null:jsx(z,{color:P,children:g$1(Number(c$1))}),[c$1,P]),T=useMemo(()=>d$1?jsx(L,{isActive:l}):null,[d$1,l]);useEffect(()=>{l||(M(0),f$1(null));},[l]);let g$2=useCallback(()=>{f$1(null);},[]),A=useCallback(()=>{d$1&&f$1(I?null:E.current);},[d$1,I]),Mt=useCallback(t=>{t.stopPropagation(),p?.onClick?.(t),h$1?.(o||e$1?.[0]?.status||"all"),A(),M(B=>B+1);},[p,h$1,o,e$1,A]),D=useCallback(t=>B=>{t?.onClick?.(B),H(t.status),g$2();},[g$2]),yt=useMemo(()=>e$1?.map(t=>({...t,onClick:D(t)}))||[],[e$1,D]),Et=a[n],xt=useMemo(()=>m?.label||(o?y(o):s),[m,o,y,s]);return jsxs(Fragment,{children:[jsx(Et,{id:St,"data-testid":"StatusButton",...bt,ref:E,onClick:Mt,statusVariant:n,sx:{...d$1&&{paddingInlineEnd:"27px"},...Bt},children:jsxs(f,{children:[jsxs(e,{variant:n,children:[kt,xt,wt]}),T&&jsx(d,{children:T})]})}),I&&d$1&&jsx(c,{open:I,onClose:g$2,anchorEl:x,menuItems:yt})]})}),gt=Nt;var oo=gt;
2
2
  export{L as a,oo as b};
@@ -1 +1 @@
1
- import {b}from'./chunk-VB7FCFAH.js';import {z}from'./chunk-DV5XS66I.js';import {yc}from'./chunk-2CIV4TII.js';import {Nh}from'./chunk-KCEYICHJ.js';import {memo,useId}from'react';import {styled,Box}from'@mui/material';import {jsxs,jsx}from'react/jsx-runtime';var a=styled(Box,{shouldForwardProp:t=>t!=="isLongLabel"})(({theme:t,isLongLabel:e})=>({display:"flex",justifyContent:"center",alignItems:"center",padding:"6px 16px",height:"32px",background:t.palette.background.gradient.shadedBlue,color:t.palette.common.white,borderRadius:"50px",fontSize:"11px",gap:t.spacing(1),minWidth:e?"12rem":"8.4rem",marginRight:"auto",position:"relative"}));function u({ids:t,visible:e,label:o,onDismiss:c,dismissible:m=true}){let d=yc(useId(),"active-filter-chip");return e?jsxs(a,{id:d,"data-testid":"ActiveFilterChip",isLongLabel:(o?.length??0)>11,children:[o?jsx(b,{children:o}):jsx("span",{children:t?.join(",")}),m&&jsx(z,{pointer:true,round:true,onClick:c,color:"active",sx:{position:"absolute",right:"8px"},children:jsx("img",{src:Nh,alt:"close",style:{width:"8px",height:"7px"}})})]}):null}var s=memo(u);var S=s;export{S as a};
1
+ import {b}from'./chunk-7MI55RIT.js';import {z}from'./chunk-ZPGWJ5RD.js';import {yc}from'./chunk-2CIV4TII.js';import {Nh}from'./chunk-KCEYICHJ.js';import {memo,useId}from'react';import {styled,Box}from'@mui/material';import {jsxs,jsx}from'react/jsx-runtime';var a=styled(Box,{shouldForwardProp:t=>t!=="isLongLabel"})(({theme:t,isLongLabel:e})=>({display:"flex",justifyContent:"center",alignItems:"center",padding:"6px 16px",height:"32px",background:t.palette.background.gradient.shadedBlue,color:t.palette.common.white,borderRadius:"50px",fontSize:"11px",gap:t.spacing(1),minWidth:e?"12rem":"8.4rem",marginRight:"auto",position:"relative"}));function u({ids:t,visible:e,label:o,onDismiss:c,dismissible:m=true}){let d=yc(useId(),"active-filter-chip");return e?jsxs(a,{id:d,"data-testid":"ActiveFilterChip",isLongLabel:(o?.length??0)>11,children:[o?jsx(b,{children:o}):jsx("span",{children:t?.join(",")}),m&&jsx(z,{pointer:true,round:true,onClick:c,color:"active",sx:{position:"absolute",right:"8px"},children:jsx("img",{src:Nh,alt:"close",style:{width:"8px",height:"7px"}})})]}):null}var s=memo(u);var S=s;export{S as a};
@@ -0,0 +1 @@
1
+ import {c as c$2}from'./chunk-NBGDT62B.js';import {r,a as a$2}from'./chunk-VFZLSRQH.js';import {c,d}from'./chunk-PPC5EHKW.js';import {a,c as c$1,d as d$1}from'./chunk-RMTT4FOG.js';import {a as a$1,b}from'./chunk-O5KFJKRT.js';import'./chunk-BXMBE224.js';import {ua,$k,al,si,Fk,B as B$1,Ud,we as we$1,ve,ta,ra,sa}from'./chunk-KCEYICHJ.js';import Gt,{memo,createContext,useState,useRef,useId,useMemo,useCallback,useEffect,useContext}from'react';import {styled,Popover,Input,Typography,Box}from'@mui/material';import C from'@uiw/react-json-view';import {motion,AnimatePresence}from'framer-motion';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import Xt from'@mui/material/Box';import {useTranslation}from'react-i18next';import {styled as styled$1}from'@mui/material/styles';var R=37,de="32px",W=545;styled(Popover)(({theme:e})=>({backgroundColor:e.palette.background.default,boxShadow:e.shadows[21],"& .MuiPaper-root":{borderRadius:"12px"}}));var Kt=44,ce={"--w-rjv-color":"#9cdcfe","--w-rjv-key-string":"#357fb9","--w-rjv-background-color":"#ffffff","--w-rjv-line-color":"#ffffff","--w-rjv-arrow-color":"#116e6bed","--w-rjv-edit-color":"#9cdcfe","--w-rjv-info-color":"#9c9c9c7a","--w-rjv-update-color":"#FFE20B","--w-rjv-copied-color":"#9cdcfe","--w-rjv-copied-success-color":"#28a745","--w-rjv-curlybraces-color":"#000000","--w-rjv-colon-color":"#000000","--w-rjv-brackets-color":"#000000","--w-rjv-quotes-color":"#9cdcfe","--w-rjv-quotes-string-color":"#c27c46","--w-rjv-type-string-color":"#c27c46","--w-rjv-type-int-color":"#956ea5","--w-rjv-type-float-color":"#956ea5","--w-rjv-type-bigint-color":"#956ea5","--w-rjv-type-boolean-color":"#956ea5","--w-rjv-type-date-color":"#956ea5","--w-rjv-type-url-color":"#3b89cf","--w-rjv-type-null-color":"#956ea5","--w-rjv-type-nan-color":"#956ea5","--w-rjv-type-undefined-color":"#956ea5",padding:"1rem",height:`calc(100% - ${Kt+R}px`,overflow:"auto"},Ye={...ce,background:"transparent","--w-rjv-line-color":"transparent"},Xe=styled("button")(({theme:e})=>({padding:"0rem",borderRadius:"0.25rem",backgroundColor:e.palette.background.paper,display:"flex",alignItems:"center",justifyContent:"center",gap:"0.25rem",color:e.palette.text.primary,fontSize:"0.625rem",fontWeight:e.typography.fontWeightBold,outline:"none",cursor:"pointer",border:`1px solid ${e.palette.grey[100]}`,"&:hover":{boxShadow:"0px 0px 8px 0px rgba(31, 136, 208, 0.30)",border:`1px solid ${e.palette.info.dark};`},position:"relative",overflow:"hidden",transition:"all 0.2s ease-in-out",width:"24px",height:"24px",flexShrink:0})),Qe=styled("button")(({theme:e})=>({outline:"none",cursor:"pointer",border:"1px solid transparent","&:hover":{boxShadow:e.shadows[8]},borderRadius:"0.25rem",position:"relative",backgroundColor:e.palette.background.transparent,display:"inline-flex",alignItems:"center",justifyContent:"center"}));styled(Input)(({theme:e})=>({border:`1px solid ${e.palette.grey[100]}`,borderRadius:"0.25rem",padding:"0.375rem",fontSize:"0.625rem",outline:"none",width:"100%",maxWidth:"150px",height:"1.5rem",backgroundColor:e.palette.background.paper,"&:focus":{border:`1px solid ${e.palette.info.dark}`}}));var ue=styled(Typography)(()=>({border:"1px solid rgba(242, 242, 242, 0.70);",display:"inline-flex",height:"24px",padding:"0px 8px",justifyContent:"center",alignItems:"center",borderRadius:"37.5px",backgroundColor:"#fff"})),fe=styled(Box,{shouldForwardProp:e=>!["isMaximized","isScrollingRequest","isRequestShown"].includes(e)})(({isScrollingRequest:e,isMaximized:t,isRequestShown:r,theme:o})=>({display:"flex",justifyContent:"space-between",alignItems:"center",gap:"4px",paddingBlock:"0px",paddingInlineStart:"12px",paddingInlineEnd:"12px",position:"sticky",left:0,right:0,top:0,background:"#fff",zIndex:5,...e&&{boxShadow:o.shadows[23]},...t&&{paddingTop:de,transition:"padding 0.3s ease-in-out",...r&&{width:"50%"}}})),me=styled(Box,{shouldForwardProp:e=>!["isMaximized","isRequestShown"].includes(e)})(({isMaximized:e,isRequestShown:t})=>({display:"flex",justifyContent:"space-between",alignItems:"center",gap:"8px",height:R,position:"fixed",bottom:0,right:0,left:e?"50vw":0,...!t&&{left:0}})),ge=styled(Box)(()=>({display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"4px",paddingBlock:"10px",paddingInlineStart:"8px",paddingInlineEnd:"0px"})),he=styled(Box)(()=>({display:"flex",justifyContent:"flex-start",alignItems:"center",gap:"4px",paddingBlock:"10px",paddingInlineStart:"0px",paddingInlineEnd:"12px"})),Ue=styled(motion.div,{shouldForwardProp:e=>!["isRequestShown","isMaximized"].includes(e)})(({isRequestShown:e,isMaximized:t})=>({width:"100%",height:"100%",overflowY:"auto",overflowX:"hidden",background:"#fff",zIndex:20,position:"relative",display:"flex",flexDirection:"column",borderBottomRightRadius:"12px",borderBottomLeftRadius:e?0:"12px",...t&&{borderBottomLeftRadius:0,borderBottomRightRadius:0,height:"100vh"}}));styled(motion.div,{shouldForwardProp:e=>!["isMaximized","currentRequestWidth"].includes(e)})(({isMaximized:e,currentRequestWidth:t})=>({backgroundColor:"#E7E7E7B2",backdropFilter:"blur(12px)",height:e?"100vh":"100%",overflowY:"auto",overflowX:"hidden",position:"absolute",width:e?"100vw":t,zIndex:19,display:"flex",flexDirection:"column",borderBottomLeftRadius:"12px"}));styled(Box,{shouldForwardProp:e=>!["isMaximized","currentHeight"].includes(e)})(({isMaximized:e,currentHeight:t})=>({display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start",height:e?`calc(100vh - ${R}px)`:(t||W)-R+5,background:"transparent",position:"fixed",width:"100%"}));var Ze=styled(Box)(()=>({position:"fixed",width:"100%",background:"transparent",height:"100%"})),et=styled("span")(()=>({color:"#032F62"})),tt=styled("span")(()=>({color:"#357fb9"}));function $({"data-copied":e,style:t,onClick:r},{keyName:o}){return o?jsxs(Qe,{style:t,onClick:n=>{r?.(n);},children:[jsx(AnimatePresence,{children:e&&jsx(motion.img,{style:{height:"14px",width:"14px"},initial:{opacity:0},animate:{opacity:1,position:"absolute"},exit:{opacity:0},transition:{duration:.4},src:ua,alt:"icon"},"copied-icon")}),jsx(AnimatePresence,{children:!e&&jsx(motion.img,{style:{height:"14px",width:"14px"},initial:{opacity:0},animate:{opacity:1,position:"absolute"},exit:{opacity:0},transition:{duration:.4},src:sa,alt:"icon"},"copy-icon")})]}):jsx("span",{})}function Ut({onClick:e,icon:t,label:r,disableAnimation:o,...n}){let[s,l]=Gt.useState(false),{t:p}=useTranslation();return jsxs(Xe,{...n,onClick:d=>{e?.(d),!o&&(l(true),setTimeout(()=>{l(false);},2e3));},children:[jsxs(Xt,{sx:{width:"16px",display:"flex",overflow:"hidden",justifyContent:"center",alignItems:"center"},children:[jsx(AnimatePresence,{mode:"wait",children:s&&jsx(motion.img,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.4}},exit:{opacity:0,transition:{duration:.1}},transition:{duration:.4},src:ua,alt:"icon"},"id-icon")}),jsx(AnimatePresence,{mode:"wait",children:!s&&jsx(motion.img,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.4}},exit:{opacity:0,transition:{duration:.1}},transition:{duration:.4},src:t,alt:"icon"},"id-icon")})]}),r&&jsxs(Fragment,{children:[jsx(AnimatePresence,{children:s&&jsx(motion.span,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,position:"absolute"},transition:{duration:.4},children:p("copied")})}),jsx(AnimatePresence,{children:!s&&jsx(motion.span,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,position:"absolute",width:"53px"},transition:{duration:.4},children:r})})]})]})}var rt=memo(Ut);var B=rt;var it=styled$1("div")(()=>({display:"flex",alignItems:"center",position:"relative",flexShrink:0,width:"24px",height:"24px"})),st=styled$1("button")(({theme:e,isActive:t})=>({width:"24px",height:"24px",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",border:`1px solid ${t?e.palette.info.dark:e.palette.grey[100]}`,backgroundColor:e.palette.background.paper,cursor:"pointer",outline:"none",padding:0,position:"relative",zIndex:11,transition:"all 0.2s ease-in-out","&:hover":{boxShadow:"0px 0px 8px 0px rgba(31, 136, 208, 0.30)",border:`1px solid ${e.palette.info.dark}`}})),at=styled$1(motion.div)(()=>({position:"absolute",right:0,top:0,height:"24px",display:"flex",alignItems:"center",zIndex:20,background:"transparent"})),lt=styled$1(motion.input)(({theme:e})=>({width:"177px",height:"24px",borderRadius:"4px",color:e.palette.text.primary,fontSize:"10px",outline:0,background:e.palette.background.paper,boxShadow:"0px 0px 8px 0px rgba(31, 136, 208, 0.30)",border:`1px solid ${e.palette.info.dark}`,paddingLeft:"8px",boxSizing:"border-box","::placeholder":{color:"#D5D5D5"}})),ye={position:"absolute",top:"50%",transform:"translateY(-50%)",zIndex:2,userSelect:"none"},pt={...ye,background:"none",border:"none",padding:0,margin:0,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",outline:"none","&:disabled":{opacity:.3,cursor:"default"}},dt=styled$1("button")(()=>({...pt,right:53})),ct=styled$1("button")(()=>({...pt,right:39})),ut=styled$1(motion.img)(()=>({...ye,right:24,width:10,height:10,cursor:"pointer"})),ft=styled$1(motion.img)(()=>({...ye,right:8,width:11,height:11,cursor:"default"})),we=styled$1("img")(()=>({width:10,height:10})),mt=styled$1("img")(()=>({width:12,height:12})),gt=styled$1("span")(({theme:e})=>({position:"absolute",right:67,top:"50%",transform:"translateY(-50%)",fontSize:"9px",lineHeight:1,color:e.palette.text.secondary,whiteSpace:"nowrap",userSelect:"none",zIndex:2,pointerEvents:"none"}));function ro({value:e,onChange:t,currentIndex:r,totalCount:o,onPrev:n,onNext:s,onOpen:l,placeholder:p="Search..."}){let[i,d]=useState(false),g=useRef(null),m=e.trim().length>0,w=o>0,x=m,b=()=>{l?.(),d(true),requestAnimationFrame(()=>g.current?.focus());},S=()=>{t(""),d(false);};return jsxs(it,{children:[jsx(AnimatePresence,{children:i&&jsxs(at,{initial:{clipPath:"inset(0 0 0 100%)",opacity:0},animate:{clipPath:"inset(0 0 0 0%)",opacity:1},exit:{clipPath:"inset(0 0 0 100%)",opacity:0},transition:{duration:.22,ease:[.4,0,.2,1]},children:[jsx(lt,{ref:g,initial:false,animate:{paddingRight:x?"98px":"24px"},transition:{duration:.15},placeholder:p,value:e,onChange:u=>t(u.target.value),onKeyDown:u=>{u.key==="Enter"&&(u.shiftKey?n():s()),u.key==="Escape"&&S();},onBlur:()=>{m||d(false);}}),x&&jsx(dt,{onClick:n,disabled:!w,title:"Previous match (Shift+Enter)",children:jsx(we,{src:$k,alt:"prev"})}),x&&jsx(ct,{onClick:s,disabled:!w,title:"Next match (Enter)",children:jsx(we,{src:al,alt:"next"})}),x&&jsx(ut,{src:si,alt:"clear",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:S}),jsx(ft,{src:Fk,alt:"search",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}}),x&&jsx(gt,{children:w?`${r+1}/${o}`:"0/0"})]},"input-area")}),jsx(AnimatePresence,{children:!i&&jsx(motion.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.15},children:jsx(st,{isActive:false,onClick:b,title:"Search",children:jsx(mt,{src:B$1,alt:"search"})})})})]})}var z=memo(ro);function yt(e,t){let r=[],o=t.length,n=0,s=e.indexOf(t,n);for(;s!==-1;){let l=s+o;r.push([s,l]),n=l,s=e.indexOf(t,n);}return r}var io={padding:0,outline:"none"};function bt({text:e,queryLength:t,ranges:r,idPrefix:o}){let n=[],s=0;return r.forEach(([l,p],i)=>{l>s&&n.push(e.slice(s,l)),n.push(jsx("mark",{style:io,children:e.slice(l,l+t)},`${o}-${i}`)),s=p;}),s<e.length&&n.push(e.slice(s)),jsx(Fragment,{children:n})}function E({text:e,query:t}){let r=useId(),o=useMemo(()=>t.trim().toLowerCase(),[t]),n=useMemo(()=>{if(!o)return e;let s=e.toLowerCase(),l=yt(s,o);return l.length===0?e:jsx(bt,{text:e,queryLength:t.length,ranges:l,idPrefix:r})},[e,t.length,o,r]);return jsx(Fragment,{children:n})}function Q(e,t){return e.toLowerCase().includes(t)}function U(e){return e.trim().toLowerCase()}function Z(e){let t=U(e);return (r,{keyName:o})=>{if(!t||!o)return;let n=String(o);if(Q(n,t))return jsx(tt,{children:jsx(E,{text:String(o),query:e})})}}function ee(e){let t=U(e);return (r,{value:o})=>{if(!t)return;let n=String(o??"");if(Q(n,t))return jsxs(et,{children:['"',jsx(E,{text:String(o??""),query:e}),'"']})}}function fo({title:e,onClose:t,onMaximize:r,maximized:o=false,id:n,onMouseHover:s,onMouseLeave:l,onRequestClick:p,isRequestExpanded:i=false,showRequestIcon:d$2=false,isHovered:g=false}){return jsx(c,{id:n,maximized:o||false,children:jsx(d,{isHovered:true,onMouseEnter:s,onMouseLeave:l,isMaximized:o,title:e,icon:Ud,leftActions:jsxs(Fragment,{children:[jsx(a,{onClick:t}),jsx(c$1,{isMaximized:o,onClick:r}),d$2&&jsx(d$1,{onClick:p,isExpanded:i,isHovered:g,children:"Request"})]})})})}var It=memo(fo);var be=It;var M=createContext({jsonViewerList:[],handleJsonViewerDialogOpen:()=>{},handleWindowMinimize:()=>{},handleWindowOrder:()=>{},registerJsonViewerEvents:()=>{},containerRef:{current:null}});var Jt=({list:e,events:t,onClose:r,isWindowMinimized:o,windowOrder:n})=>e?.length?jsx(Fragment,{children:e.map((s,l)=>jsx(q,{index:l,...t,...s,onClose:()=>{r(l);},isWindowMinimized:o,windowOrder:n},s.json.id))}):null;var wo=({children:e,containerRef:t})=>{let[r,o]=useState([]),[n,s]=useState(false),[l,p]=useState(1),i=useRef({}),d=useCallback(c=>{if(r.length===7){alert("Maximum allowed active Json Viewer is 7 per table.");return}if(r.some(N=>N.json.id===c.json.id))return;let T=structuredClone(c.json),V=T.request_body,u={...c,json:T,requestJson:c.requestJson||V||void 0};delete u.json.request_body,o(N=>[...N,u]);},[r]),g=useCallback(c=>{o(T=>T.filter((V,u)=>c!==u));},[]),m=useCallback(c=>{s(c);},[]),w=useCallback(c=>{p(c);},[]),x=useCallback(c=>{i.current=c;},[]),b=useMemo(()=>({onJsonRequestOpen:()=>i.current.onJsonRequestOpen?.(),onJsonSearch:()=>i.current.onJsonSearch?.(),onJsonCopy:()=>i.current.onJsonCopy?.(),onJsonIdCopy:()=>i.current.onJsonIdCopy?.(),onJsonNodesMinimize:()=>i.current.onJsonNodesMinimize?.(),onJsonNodesMaximize:()=>i.current.onJsonNodesMaximize?.()}),[]),S=useMemo(()=>({jsonViewerList:r,handleJsonViewerDialogOpen:d,handleWindowMinimize:m,handleWindowOrder:w,registerJsonViewerEvents:x,containerRef:t}),[r,d,m,w,x,t]);return jsxs(M.Provider,{value:S,children:[e,jsx(Jt,{list:r,events:b,onClose:g,isWindowMinimized:n,windowOrder:l})]})};var Et="#FFE20B";function te(e,t){let[r,o]=useState(0),[n,s]=useState(0);useEffect(()=>{if(!t.trim()){s(0),o(0);return}let i=setTimeout(()=>{let d=e.current?.querySelectorAll("mark")??[];s(d.length),o(0);},50);return ()=>clearTimeout(i)},[t,e]),useEffect(()=>{if(!e.current||!t.trim())return;let i=Array.from(e.current.querySelectorAll("mark"));i.forEach((d,g)=>{let m=g===r;d.style.backgroundColor=m?Et:"transparent",d.style.outline=m?`1px solid ${Et}`:"none",d.style.borderRadius="2px";}),i[r]?.scrollIntoView({behavior:"smooth",block:"nearest"});},[r,n,t,e]);let l=useCallback(()=>{n!==0&&o(i=>(i+1)%n);},[n]),p=useCallback(()=>{n!==0&&o(i=>(i-1+n)%n);},[n]);return {currentIndex:r,totalCount:n,goNext:l,goPrev:p}}function Ot(e,t){return e==null?String(e).includes(t):typeof e=="string"?e.toLowerCase().includes(t):typeof e=="number"||typeof e=="boolean"?String(e).includes(t):false}function Vt(e,t){if(Array.isArray(e)){let r=e.map(o=>Vt(o,t)).filter(o=>o!=null);return r.length>0?r:null}return typeof e=="object"&&e!==null?Ht(e,t):Ot(e,t)?e:null}function Ht(e,t){let r={};for(let[o,n]of Object.entries(e))if(o.toLowerCase().includes(t))r[o]=n;else if(typeof n=="object"&&n!==null){let s=Vt(n,t);s!==null&&(r[o]=s);}else Ot(n,t)&&(r[o]=n);return Object.keys(r).length>0?r:null}function Ce(e,t){return t.trim()?Ht(e,t.toLowerCase()):e}var L=400,ne=.5;function q(e){let{containerRef:t}=useContext(M),{height:r$1,width:o}=a$1(),[n,s]=useState(false),l=t?.current,p=l?.clientWidth||o,i=l?.clientHeight||r$1;return jsx(r,{isOpen:true,onClose:e.onClose,containerRef:t,defaultWindowWidth:L,defaultWindowHeight:W,minHeight:300,windowZIndex:3,initialPosition:{x:p/2+L/4-e.index*20,y:i/2-W/2+e.index*30},windowProps:{mainAppOrder:e.windowOrder,mainAppIsMinimized:e.isWindowMinimized,overflow:"visible",titleBar:jsx(Co,{...e,isRequestShown:n,setIsRequestShown:s})},children:jsx(vo,{...e,isRequestShown:n})})}function Co({requestJson:e={},onClose:t,onJsonRequestOpen:r,isRequestShown:o,setIsRequestShown:n}){let{isMaximized:s,setIsMaximized:l,isToolbarAnimationDisabled:p,setIsToolbarAnimationDisabled:i,dimensions:d,updateSize:g}=useContext(a$2),{onMouseEnter:m,onMouseLeave:w,isHovered:x}=b(),b$1=d.width||L,S=Object.keys(e)?.length;return jsx(motion.div,{style:{...s&&{height:de,position:"fixed",zIndex:1e3}},animate:{width:o?b$1*2:b$1,...s&&{width:"100vw"},...!s&&{transform:`translateX(${o?-b$1:0}px)`}},transition:{duration:ne,...p&&{duration:0}},children:jsx(be,{title:o?"JSON Request & Response":"JSON Response",onClose:()=>t(),onMaximize:()=>{l(c=>!c),i(true),setTimeout(()=>{i(false);},ne*1e3);},isHovered:x,onMouseHover:m,onMouseLeave:w,maximized:s,id:"draggable-dialog-title",onRequestClick:()=>{n(c=>!c),i(false),o||(r?.(),g({width:L,height:W}));},isRequestExpanded:o,showRequestIcon:!!S})})}function vo({json:e,requestJson:t={},onJsonSearch:r,onJsonCopy:o,onJsonIdCopy:n,onJsonNodesMinimize:s,onJsonNodesMaximize:l,isRequestShown:p}){let{isMaximized:i,isToolbarAnimationDisabled:d,dimensions:g}=useContext(a$2),[m,w]=useState(false),[x,b]=useState(false),[S,c]=useState(true),[T,V]=useState(false),[u,N]=useState(""),[k,jt]=useState(""),Je=useRef(null),ke=useRef(null),F=te(Je,u),_=te(ke,k),qt=useMemo(()=>Object.keys(e)?.length,[e]),Pe=g.width||L,Be=v=>{setTimeout(()=>{navigator.clipboard.writeText(v||"").then(()=>{});},10);},Dt=useMemo(()=>Object.keys(t)?.length,[t]),Te=useMemo(()=>Ce(e,u),[e,u]),Ee=useMemo(()=>Ce(t,k),[t,k]);return jsx(Ze,{"data-testid":"JSONViewer",children:jsxs(Box,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start",height:i?`calc(100vh - ${R}px)`:(g.height||W)-R+5,background:"transparent",position:"fixed",width:"100%"},children:[jsx(AnimatePresence,{children:p&&jsxs(motion.div,{initial:{left:i?"50vw":0,...i&&{position:"relative",left:"-50vw"}},animate:{left:i?"50vw":-Pe,...i&&{position:"relative",left:"0"},...!p&&{left:0}},exit:{left:i?"50vw":0,...i&&{position:"relative",left:"0"}},transition:{duration:ne,...d&&{duration:0}},ref:ke,style:{flex:1,backgroundColor:"#E7E7E7B2",backdropFilter:"blur(12px)",height:i?"100vh":"100%",overflowY:"auto",position:"absolute",width:i?"100vw":Pe,zIndex:19,display:"flex",flexDirection:"column",borderBottomLeftRadius:"12px"},onScroll:()=>{V(true),setTimeout(()=>{V(false);},2e3);},children:[jsxs(fe,{isMaximized:i,isScrollingRequest:T,sx:{background:"#E7E7E7B2"},isRequestShown:p,children:[jsx(he,{children:jsx(ue,{variant:"subtitle1",children:"API Request"})}),jsxs(ge,{children:[jsx(z,{value:k,onChange:jt,onOpen:()=>r?.(),currentIndex:_.currentIndex,totalCount:_.totalCount,onPrev:_.goPrev,onNext:_.goNext}),jsx(B,{disableAnimation:true,onClick:()=>{S?l?.():s?.(),c(v=>!v);},icon:S?we$1:ve}),jsx(B,{onClick:()=>{o?.(),navigator.clipboard.writeText(JSON.stringify(t,null,2)).then(()=>{});},icon:ta}),jsx(B,{onClick:()=>{n?.(),navigator.clipboard.writeText(e?.id||"").then(()=>{});},icon:ra})]})]}),k.trim()&&Ee===null?jsx(Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",flex:1,height:"100%"},children:jsx(Typography,{variant:"body2",sx:{fontSize:"0.75rem",color:"text.secondary"},children:"No Data Found"})}):jsxs(C,{value:Ee??t,style:Ye,displayDataTypes:false,collapsed:k.trim()?void 0:S?1:void 0,onCopied:(v,I)=>{typeof I=="string"&&Be(I);},enableClipboard:false,children:[jsx(C.String,{render:ee(k)}),jsx(C.KeyName,{render:Z(k)}),jsx(C.CountInfo,{render:(v,{keyName:I})=>{if(!I)return jsx("span",{})}}),jsx(C.Copied,{render:$})]}),jsx(AnimatePresence,{children:p&&jsx(me,{sx:{flex:1,height:R,left:0},children:jsx(c$2,{sx:{paddingLeft:"12px",borderBottomRightRadius:"0",background:"#f8f9fb",flex:1},totalCount:Dt})})})]})}),jsxs(Ue,{ref:Je,isMaximized:i,isRequestShown:p,style:{left:0,maxHeight:"100vw"},initial:{...i&&{width:"100vw",left:0}},animate:{...i&&{position:"absolute",left:p?"50vw":"0"}},transition:{duration:ne,...d&&{duration:0}},onScroll:()=>{b(true),setTimeout(()=>{b(false);},2e3);},children:[jsxs(fe,{isMaximized:i,isScrollingRequest:x,isRequestShown:p,children:[jsx(he,{children:jsx(ue,{variant:"subtitle1",children:"API Response"})}),jsxs(ge,{children:[jsx(z,{value:u,onChange:N,onOpen:()=>r?.(),currentIndex:F.currentIndex,totalCount:F.totalCount,onPrev:F.goPrev,onNext:F.goNext}),jsx(B,{disableAnimation:true,onClick:()=>{m?l?.():s?.(),w(v=>!v);},icon:m?we$1:ve}),jsx(B,{onClick:()=>{o?.(),navigator.clipboard.writeText(JSON.stringify(e,null,2)).then(()=>{});},icon:ta}),jsx(B,{onClick:()=>{n?.(),navigator.clipboard.writeText(e?.id||"").then(()=>{});},icon:ra})]})]}),u.trim()&&Te===null?jsx(Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",flex:1,height:"100%"},children:jsx(Typography,{variant:"body2",sx:{fontSize:"0.75rem",color:"text.secondary"},children:"No Data Found"})}):jsxs(C,{value:Te??e,style:ce,displayDataTypes:false,collapsed:u.trim()?void 0:m?1:void 0,onCopied:(v,I)=>{typeof I=="string"&&Be(I);},children:[jsx(C.String,{render:ee(u)}),jsx(C.KeyName,{render:Z(u)}),jsx(C.CountInfo,{render:(v,{keyName:I})=>{if(!I)return jsx("span",{})}}),jsx(C.Copied,{render:$})]}),jsx(me,{sx:{flex:1,height:R},children:jsx(c$2,{sx:{borderBottomLeftRadius:p?0:"12px",background:"#f8f9fb",flex:1},totalCount:qt})})]})]})})}var Ro=({isWindowMinimized:e,windowOrder:t,...r})=>{let{handleJsonViewerDialogOpen:o,handleWindowMinimize:n,handleWindowOrder:s,registerJsonViewerEvents:l}=useContext(M),p=useCallback(()=>{n(e);},[n,e]),i=useCallback(()=>{s(t);},[s,t]);return useEffect(()=>{i();},[i]),useEffect(()=>{p();},[p]),useEffect(()=>{l(r);},[l,r]),{handleJsonViewerDialogOpen:o}};var Ar=q;export{B as a,z as b,E as c,be as d,M as e,Jt as f,wo as g,te as h,Ro as i,Ar as j};