@tap-payments/os-micro-frontend-shared 0.3.187 → 0.3.188

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 (219) hide show
  1. package/build/_chunks/{chunk-OVRSF46B.js → chunk-2DC5PMER.js} +1 -1
  2. package/build/_chunks/{chunk-TSK5JEWD.js → chunk-2QOHNFXP.js} +1 -1
  3. package/build/_chunks/{chunk-7GP7UMYC.js → chunk-2TKE6MVM.js} +1 -1
  4. package/build/_chunks/{chunk-MG67WXX5.js → chunk-2XKWNE4A.js} +1 -1
  5. package/build/_chunks/{chunk-MSQE22CO.js → chunk-3Q5OZQPU.js} +1 -1
  6. package/build/_chunks/{chunk-MYJR6G6O.js → chunk-3U4CMVIQ.js} +1 -1
  7. package/build/_chunks/{chunk-J2FIAUQP.js → chunk-42DLESST.js} +1 -1
  8. package/build/_chunks/{chunk-ZPOBV45B.js → chunk-4CCJR5TN.js} +1 -1
  9. package/build/_chunks/{chunk-JMUOAAWB.js → chunk-4H7CRAGJ.js} +1 -1
  10. package/build/_chunks/{chunk-7TOPMSDQ.js → chunk-4KSZBODD.js} +1 -1
  11. package/build/_chunks/{chunk-QJOKZDD2.js → chunk-4QONVXGE.js} +1 -1
  12. package/build/_chunks/{chunk-SY55AXTN.js → chunk-4TUFZ5TE.js} +1 -1
  13. package/build/_chunks/{chunk-ELPPQF5J.js → chunk-4UDFMCAW.js} +1 -1
  14. package/build/_chunks/{chunk-PE77GNPM.js → chunk-4Y7VUXWK.js} +1 -1
  15. package/build/_chunks/{chunk-PLCHPHE7.js → chunk-54RTNLV2.js} +1 -1
  16. package/build/_chunks/{chunk-ZJW6D4EL.js → chunk-5B3PDE2S.js} +1 -1
  17. package/build/_chunks/{chunk-TIBMC5I4.js → chunk-5HWIH67B.js} +1 -1
  18. package/build/_chunks/{chunk-4265QFS4.js → chunk-5YBO25PL.js} +1 -1
  19. package/build/_chunks/{chunk-QBC2Q5RD.js → chunk-6Z43FXSQ.js} +1 -1
  20. package/build/_chunks/{chunk-XJ4J4ZTF.js → chunk-723WTKP3.js} +1 -1
  21. package/build/_chunks/{chunk-URFOGS4G.js → chunk-75SYJJXU.js} +1 -1
  22. package/build/_chunks/{chunk-GWI4E2CG.js → chunk-7FSJ7HJQ.js} +1 -1
  23. package/build/_chunks/{chunk-QGFUG6B5.js → chunk-7KJUI4WS.js} +1 -1
  24. package/build/_chunks/{chunk-AW46BQEB.js → chunk-7MYMNHTF.js} +1 -1
  25. package/build/_chunks/{chunk-ANI5BUWO.js → chunk-7YM2GCX3.js} +1 -1
  26. package/build/_chunks/{chunk-4VQO5ISN.js → chunk-7YO3MHIA.js} +1 -1
  27. package/build/_chunks/{chunk-HQQVIB55.js → chunk-AAYATR56.js} +1 -1
  28. package/build/_chunks/{chunk-6G4KTRER.js → chunk-ALNHN3O3.js} +1 -1
  29. package/build/_chunks/{chunk-3VCDLYKF.js → chunk-AWNFVAW7.js} +1 -1
  30. package/build/_chunks/{chunk-JYJFK5YD.js → chunk-BAQJYU5V.js} +1 -1
  31. package/build/_chunks/{chunk-QEYSJNB6.js → chunk-BIO2EJBT.js} +1 -1
  32. package/build/_chunks/{chunk-DQ27NS3E.js → chunk-BMS2QU4W.js} +1 -1
  33. package/build/_chunks/{chunk-276DOP2X.js → chunk-BR33EMDB.js} +1 -1
  34. package/build/_chunks/{chunk-HRKQHD3D.js → chunk-C2FOU777.js} +1 -1
  35. package/build/_chunks/{chunk-HPXM27QJ.js → chunk-CDEAHMMR.js} +1 -1
  36. package/build/_chunks/{chunk-S5JEIN33.js → chunk-COOJVNLX.js} +1 -1
  37. package/build/_chunks/{chunk-XFNR5APT.js → chunk-CQ4IGQSQ.js} +1 -1
  38. package/build/_chunks/{chunk-OV2FBDMY.js → chunk-DFOJBASH.js} +1 -1
  39. package/build/_chunks/{chunk-XAGAK6OO.js → chunk-ECEVCQVI.js} +1 -1
  40. package/build/_chunks/{chunk-TEUTX345.js → chunk-EPAZDHMC.js} +1 -1
  41. package/build/_chunks/{chunk-DOOXVBCT.js → chunk-EXF45OIA.js} +1 -1
  42. package/build/_chunks/{chunk-GDCYJVWR.js → chunk-F75FA5MZ.js} +1 -1
  43. package/build/_chunks/{chunk-VD3MJI6L.js → chunk-FN6O2SPP.js} +1 -1
  44. package/build/_chunks/{chunk-YQ5U7VLE.js → chunk-FYK4YJFM.js} +1 -1
  45. package/build/_chunks/{chunk-BAH2LASV.js → chunk-G3LCY5M2.js} +1 -1
  46. package/build/_chunks/{chunk-AJQM3TP2.js → chunk-GJNLLQQ4.js} +1 -1
  47. package/build/_chunks/{chunk-QP3XLJDW.js → chunk-GMKDBZUE.js} +1 -1
  48. package/build/_chunks/{chunk-A4VHKHJ2.js → chunk-GTARVX4J.js} +1 -1
  49. package/build/_chunks/{chunk-4FW6OFEP.js → chunk-GVNH5L6C.js} +1 -1
  50. package/build/_chunks/{chunk-A47S5NP5.js → chunk-HMXIKTDO.js} +1 -1
  51. package/build/_chunks/{chunk-ME7RRWVT.js → chunk-IB2AXE4G.js} +1 -1
  52. package/build/_chunks/{chunk-M5YBHPUM.js → chunk-IBISZDVP.js} +1 -1
  53. package/build/_chunks/{chunk-7OAWSBES.js → chunk-ID3KOB3O.js} +1 -1
  54. package/build/_chunks/{chunk-ITGCWAHH.js → chunk-JNQOE4E7.js} +1 -1
  55. package/build/_chunks/{chunk-26QGNM5H.js → chunk-JRDLOVN2.js} +1 -1
  56. package/build/_chunks/{chunk-LLR7XVQF.js → chunk-JSFXW2T5.js} +1 -1
  57. package/build/_chunks/{chunk-A3XCKNM3.js → chunk-JTC7EPQL.js} +1 -1
  58. package/build/_chunks/{chunk-75UZ7VWZ.js → chunk-K7E7VQC6.js} +1 -1
  59. package/build/_chunks/{chunk-5WMKQ7VK.js → chunk-KHFP7V7Z.js} +1 -1
  60. package/build/_chunks/{chunk-6I2STHDU.js → chunk-L6FVX4JA.js} +1 -1
  61. package/build/_chunks/{chunk-CE4LFJNN.js → chunk-L7UCO3DZ.js} +1 -1
  62. package/build/_chunks/{chunk-CSH3Q3F4.js → chunk-LLEGWG6Q.js} +1 -1
  63. package/build/_chunks/{chunk-N3MKHOTP.js → chunk-MR7E7S3Z.js} +1 -1
  64. package/build/_chunks/{chunk-G72OV2FW.js → chunk-MRFOSMBQ.js} +1 -1
  65. package/build/_chunks/{chunk-NRL6BKUW.js → chunk-NOSXWNRT.js} +1 -1
  66. package/build/_chunks/{chunk-CIKLIBPZ.js → chunk-OBBOIKJ2.js} +1 -1
  67. package/build/_chunks/{chunk-X75LTCLU.js → chunk-OPRG5H25.js} +1 -1
  68. package/build/_chunks/{chunk-7IL7T22I.js → chunk-OWCVVQWF.js} +1 -1
  69. package/build/_chunks/{chunk-UT4SEMJT.js → chunk-P6AANDMG.js} +1 -1
  70. package/build/_chunks/{chunk-N63GXPYS.js → chunk-PHQKSCFX.js} +1 -1
  71. package/build/_chunks/chunk-PLMJIRXJ.js +1 -0
  72. package/build/_chunks/{chunk-EZR6HWH7.js → chunk-PXE6WK3D.js} +1 -1
  73. package/build/_chunks/{chunk-VEFPOPJY.js → chunk-Q4Y4LBX7.js} +1 -1
  74. package/build/_chunks/{chunk-V36YAPEF.js → chunk-QXHIDHUU.js} +1 -1
  75. package/build/_chunks/{chunk-ZMYJK2CH.js → chunk-R32QZGPK.js} +1 -1
  76. package/build/_chunks/chunk-SV3TAH6C.js +1 -0
  77. package/build/_chunks/{chunk-Y2ME3P6W.js → chunk-TAKHLPXX.js} +1 -1
  78. package/build/_chunks/{chunk-DDIY3BE5.js → chunk-TZ5FU2AJ.js} +1 -1
  79. package/build/_chunks/{chunk-DFDINIYM.js → chunk-U65WWVD6.js} +1 -1
  80. package/build/_chunks/{chunk-7YBYRZBB.js → chunk-UZSTD2CE.js} +1 -1
  81. package/build/_chunks/{chunk-O2QL22TT.js → chunk-VAHQKZXS.js} +1 -1
  82. package/build/_chunks/{chunk-HG36QYFV.js → chunk-VEF6ESUZ.js} +1 -1
  83. package/build/_chunks/{chunk-6WEXXGIH.js → chunk-VWIY6RR5.js} +1 -1
  84. package/build/_chunks/{chunk-J32SVVRL.js → chunk-W42Z4TFL.js} +1 -1
  85. package/build/_chunks/{chunk-LBTXKWTF.js → chunk-WHXHVOBY.js} +1 -1
  86. package/build/_chunks/{chunk-76BTM6X5.js → chunk-WT7LLT5P.js} +1 -1
  87. package/build/_chunks/{chunk-FRR2JSWK.js → chunk-YABQXVHX.js} +1 -1
  88. package/build/_chunks/{chunk-TFOUH7SL.js → chunk-YEDSUHFZ.js} +1 -1
  89. package/build/_chunks/{chunk-IV5LFWNE.js → chunk-YS6IXKH4.js} +1 -1
  90. package/build/_chunks/{chunk-FKWU5NB2.js → chunk-YTYL4BRQ.js} +1 -1
  91. package/build/_chunks/chunk-ZEHPQA26.js +2 -0
  92. package/build/_chunks/{chunk-SJ44RLQH.js → chunk-ZYPVGU62.js} +1 -1
  93. package/build/components/AccountDropdown/index.js +1 -1
  94. package/build/components/ActionMenu/index.js +1 -1
  95. package/build/components/ActionsDropdownMenu/index.js +1 -1
  96. package/build/components/ActiveFilterChip/index.js +1 -1
  97. package/build/components/ActivityAreaChart/index.js +1 -1
  98. package/build/components/AmountConversionFilter/index.js +1 -1
  99. package/build/components/AmountInput/index.js +1 -1
  100. package/build/components/AmountSlider/index.js +1 -1
  101. package/build/components/AmountStatusChip/index.js +1 -1
  102. package/build/components/AnimatedSpinnerIcon/index.js +1 -1
  103. package/build/components/AppServices/index.js +1 -1
  104. package/build/components/AppServicesBar/index.js +1 -1
  105. package/build/components/AppWindowWrapper/index.js +1 -1
  106. package/build/components/AuthenticationTypeChip/index.js +1 -1
  107. package/build/components/Autocomplete/index.js +1 -1
  108. package/build/components/BetaBanner/index.js +1 -1
  109. package/build/components/BrandLogo/index.js +1 -1
  110. package/build/components/Button/index.js +1 -1
  111. package/build/components/Calender/index.js +1 -1
  112. package/build/components/CardEmptyState/index.js +1 -1
  113. package/build/components/Chip/index.js +1 -1
  114. package/build/components/ChipStack/index.js +1 -1
  115. package/build/components/ColorPicker/index.js +1 -1
  116. package/build/components/ColumnViews/index.js +1 -1
  117. package/build/components/ConfirmDialog/index.js +1 -1
  118. package/build/components/CountryFilter/index.js +1 -1
  119. package/build/components/CountryFlag/index.js +1 -1
  120. package/build/components/CurrencyAmount/index.js +1 -1
  121. package/build/components/CurrencyFilter/index.js +1 -1
  122. package/build/components/CurrencySymbol/index.js +1 -1
  123. package/build/components/CustomBackdrop/index.js +1 -1
  124. package/build/components/Customer/index.js +1 -1
  125. package/build/components/DateFilter/index.js +1 -1
  126. package/build/components/DeviceIcon/index.js +1 -1
  127. package/build/components/Discount/index.js +1 -1
  128. package/build/components/DisplayAmount/index.js +1 -1
  129. package/build/components/Dropdown2/index.js +1 -1
  130. package/build/components/DropdownButton/index.js +1 -1
  131. package/build/components/DropdownMenu/index.js +1 -1
  132. package/build/components/Error/index.js +1 -1
  133. package/build/components/ErrorToast/index.js +1 -1
  134. package/build/components/ExpandableSideBar/index.js +1 -1
  135. package/build/components/FileInputPreview/index.js +1 -1
  136. package/build/components/FilePreview/index.js +1 -1
  137. package/build/components/FileUpload/index.js +1 -1
  138. package/build/components/FileUploader/index.js +1 -1
  139. package/build/components/FilterDropdown/index.js +1 -1
  140. package/build/components/Filters/index.js +1 -1
  141. package/build/components/FlippingCard/index.js +1 -1
  142. package/build/components/HeatMap/index.js +1 -1
  143. package/build/components/Icon/index.js +1 -1
  144. package/build/components/IconWithBadge/index.js +1 -1
  145. package/build/components/Input/index.js +1 -1
  146. package/build/components/InputBase/index.js +1 -1
  147. package/build/components/InputNumber/index.js +1 -1
  148. package/build/components/Inputs/index.js +1 -1
  149. package/build/components/JSONViewer/index.js +1 -1
  150. package/build/components/LanguageDropdown/index.js +1 -1
  151. package/build/components/LeftPeekRightExpandingChip/index.js +1 -1
  152. package/build/components/ListColumnFilter/index.js +1 -1
  153. package/build/components/ListHeader/index.js +1 -1
  154. package/build/components/ListLayout/index.js +1 -1
  155. package/build/components/Loader/index.js +1 -1
  156. package/build/components/MFWidgetLoader/index.js +1 -1
  157. package/build/components/MaskedText/index.js +1 -1
  158. package/build/components/MerchantCurrencyDropdown/index.js +1 -1
  159. package/build/components/MerchantLogo/index.js +1 -1
  160. package/build/components/MerchantsDropdown/index.js +1 -1
  161. package/build/components/MultiSelectDropdownButton/index.js +1 -1
  162. package/build/components/MultiSelectWithSearch/index.js +1 -1
  163. package/build/components/NestedDropdown/index.js +1 -1
  164. package/build/components/NoInternet/index.js +1 -1
  165. package/build/components/OpenFileInNewTab/index.js +1 -1
  166. package/build/components/PartnersFilter/index.js +1 -1
  167. package/build/components/PaymentSourceFilter/index.js +1 -1
  168. package/build/components/PhoneFilter/index.js +1 -1
  169. package/build/components/ProgressRing/index.js +1 -1
  170. package/build/components/RFH/index.js +1 -1
  171. package/build/components/RadioGroup/index.js +1 -1
  172. package/build/components/RangeCalender/index.js +1 -1
  173. package/build/components/RatingCount/index.js +1 -1
  174. package/build/components/ReceiptsViewer/index.js +1 -1
  175. package/build/components/ReferenceTypeFilter/index.js +1 -1
  176. package/build/components/ResizableHeightInput/index.js +1 -1
  177. package/build/components/RightLeftExpandingCenterChip/index.js +1 -1
  178. package/build/components/SalesChannelFilter/index.js +1 -1
  179. package/build/components/SearchButton/index.js +1 -1
  180. package/build/components/SearchListInput/index.js +1 -1
  181. package/build/components/SelectDropdown/index.js +1 -1
  182. package/build/components/SelectWithSearch/index.js +1 -1
  183. package/build/components/StatusBar/index.js +1 -1
  184. package/build/components/StatusButton/index.js +1 -1
  185. package/build/components/StatusChip/index.js +1 -1
  186. package/build/components/StatusChipWithCopy/index.js +1 -1
  187. package/build/components/StatusFilter/index.js +1 -1
  188. package/build/components/StatusGroupChips/index.js +1 -1
  189. package/build/components/StatusIcons/index.js +1 -1
  190. package/build/components/StatusLabel/index.js +1 -1
  191. package/build/components/TableCells/index.js +1 -1
  192. package/build/components/TableReports/index.js +1 -1
  193. package/build/components/Timepicker/index.js +1 -1
  194. package/build/components/Toaster/index.js +1 -1
  195. package/build/components/ToggleView/index.js +1 -1
  196. package/build/components/Toolbar/index.js +1 -1
  197. package/build/components/ToolbarIcon/index.js +1 -1
  198. package/build/components/TooltipChip/index.js +1 -1
  199. package/build/components/TreeDropdown/index.js +1 -1
  200. package/build/components/VAT/index.js +1 -1
  201. package/build/components/VerificationIcon/index.js +1 -1
  202. package/build/components/ViewColumnRadioFilter/index.js +1 -1
  203. package/build/components/VirtualTables/index.js +1 -1
  204. package/build/components/Widget/index.js +1 -1
  205. package/build/components/Window/index.js +1 -1
  206. package/build/components/WindowAppIcon/index.js +1 -1
  207. package/build/components/WindowSideBar/index.js +1 -1
  208. package/build/components/index.js +1 -1
  209. package/build/components/primitives/index.js +1 -1
  210. package/build/constants/index.js +1 -1
  211. package/build/constants/timezones.d.ts +4 -2
  212. package/build/hooks/index.js +1 -1
  213. package/build/index.js +1 -1
  214. package/build/utils/index.js +1 -1
  215. package/build/utils/timezone.d.ts +13 -2
  216. package/package.json +2 -1
  217. package/build/_chunks/chunk-EEIJA6B7.js +0 -1
  218. package/build/_chunks/chunk-PCOFZFBL.js +0 -1
  219. package/build/_chunks/chunk-S7P32UF6.js +0 -2
@@ -1 +1 @@
1
- import {yc}from'./chunk-EEIJA6B7.js';import {Pj,j,m as m$1}from'./chunk-YKKS24ES.js';import {memo,useId}from'react';import d from'@mui/material/Box';import {jsx}from'react/jsx-runtime';function g({countryCode:o,currencyCode:t,...n}){let l=yc(useId(),"country-flag");return jsx(d,{...n,id:l,"data-testid":"CountryFlag",component:"img",src:o&&j(o)||t&&m$1(t)||Pj,width:n.width||16,alt:o??t??"flag",loading:"lazy",onError:u=>{u.currentTarget.src=Pj;}})}g.displayName="CountryFlag";var m=memo(g);var h=m;export{h as a};
1
+ import {yc}from'./chunk-PLMJIRXJ.js';import {Pj,j,m as m$1}from'./chunk-YKKS24ES.js';import {memo,useId}from'react';import d from'@mui/material/Box';import {jsx}from'react/jsx-runtime';function g({countryCode:o,currencyCode:t,...n}){let l=yc(useId(),"country-flag");return jsx(d,{...n,id:l,"data-testid":"CountryFlag",component:"img",src:o&&j(o)||t&&m$1(t)||Pj,width:n.width||16,alt:o??t??"flag",loading:"lazy",onError:u=>{u.currentTarget.src=Pj;}})}g.displayName="CountryFlag";var m=memo(g);var h=m;export{h as a};
@@ -1 +1 @@
1
- import {f,v}from'./chunk-CIKLIBPZ.js';import {yc}from'./chunk-EEIJA6B7.js';import {useId}from'react';import {styled,MenuItem,Menu,ListItemIcon,ListItemText,Select,useTheme,Box}from'@mui/material';import {jsxs,jsx}from'react/jsx-runtime';var g=styled(MenuItem,{shouldForwardProp:t=>t!=="alwaysShowRightAction"})(({theme:t,alwaysShowRightAction:n})=>({backgroundColor:n?t.palette.common.lightOrange:"","&:hover":{backgroundColor:n?t.palette.common.lightOrange:"",boxShadow:t.shadows[10],":hover":{"& .sandbox-Icon":{left:"-16px !important",transition:"all 0.3s ease-in-out"},"& .close-Icon":{display:"block !important"}}}})),h=styled(Menu,{shouldForwardProp:t=>t!=="minWidth"})(({theme:t,minWidth:n})=>({".MuiMenu-paper":{borderRadius:4,minWidth:n},".MuiMenuItem-root":{display:"flex",gap:"4px",minHeight:"36px",alignItems:"center",paddingInline:8,transition:t.transitions.create(["visibility"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.complex}),".menu-right-action":{visibility:"hidden"},"&:hover":{".menu-right-action":{visibility:"visible"}}},"&.tap-dropdown":{zIndex:2e3,".MuiList-root":{padding:0}}})),x=styled(ListItemIcon)(()=>({minWidth:"16px !important"})),S=styled(ListItemText)(()=>({".MuiTypography-root":{fontSize:"0.6875rem"}})),D=styled(Select)(({theme:t})=>({padding:"0.25rem 0.34rem 0.25rem 0.5rem",display:"flex",justifyContent:"center",alignItems:"center",gap:"0.19rem",width:"auto",flexShrink:0,borderRadius:"0.5rem",boxShadow:t.shadows[5],cursor:"pointer",outline:t.palette.background.default,border:"none",backgroundColor:t.palette.background.default,"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},"& .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},"& .MuiMenuList-root":{padding:"0px !important",margin:0},"& .MuiSelect-outlined":{padding:"0px !important"}})),z=styled(MenuItem)(({theme:t})=>({display:"flex",height:"2.5rem",width:"10.43rem",alignItems:"center",gap:"0.5",alignSelf:"stretch",transition:"boxShadow 0.2s ease-in-out",backgroundColor:"inherit !important",margin:0,padding:0,paddingTop:"0px !important",paddingBottom:"0px !important","&:hover":{boxSizing:"border-box",boxShadow:`${t.shadows[3]}`}})),A=styled("p")(({theme:t})=>({color:t.palette.text.primary,fontSize:"0.68rem",fontWeight:600,textAlign:"center",padding:"0 !important",margin:"0 !important",textTransform:"capitalize",".MuiOutlinedInput-input":{paddingRight:0},"MuiInputBase-input":{paddingRight:0},".MuiSelect-select":{paddingRight:0}})),W=styled("p")(({theme:t})=>({fontSize:"0.75rem",fontWeight:500,color:t.palette.text.primary,paddingLeft:"1rem !important",transition:"boxShadow 0.2s ease-in-out"})),B=styled("img")(()=>({width:"0.75rem",height:"auto",padding:0,paddingBottom:.5,margin:0,verticalAlign:"middle",boxSizing:"border-box"})),y=styled(f)(()=>({padding:0,paddingRight:"4px",width:"14px !important",".MuiSvgIcon-root":{width:"12px !important",height:"12px !important"}}));function N({open:t,menuItems:n,anchorEl:a,onClose:d,footer:f,selected:w,multiple:M,allowShadows:p=true,...C}){let k=yc(useId(),"dropdown-menu"),l=useTheme();return jsxs(h,{id:k,"data-testid":"DropdownMenu",open:t,anchorEl:a,onClose:d,onContextMenu:o=>{o.preventDefault(),d();},...C,className:"tap-dropdown",minWidth:a?.clientWidth||"auto",children:[n.map((o,r)=>o.name==="divider"?jsx(v,{sx:{margin:"0 !important"}},`${o.label}-${r}`):jsx("div",{children:o.label&&jsxs(g,{alwaysShowRightAction:o.alwaysShowRightAction,onClick:v=>{o.onClick&&o.onClick(v);},onContextMenu:o.onRightClick,selected:o.selected,sx:{"&:hover":{backgroundColor:"transparent",boxShadow:p?l.shadows[10]:"none","& .sandbox-Icon":{display:"none"},"& .close-Icon":{display:"block !important"}},...r===w&&{backgroundColor:"transparent",boxShadow:p?l.shadows[10]:"none"},...o.sx},children:[M&&jsx(y,{size:"small",checked:o.selected}),o.icon&&jsx(x,{children:o.icon}),jsx(S,{children:o.label}),jsx(Box,{className:o.alwaysShowRightAction?"":"menu-right-action",children:o.rightAction&&o.rightAction})]})},`${o.label}-${r}`)),f]})}var I=N;var Y=I;export{D as a,z as b,A as c,W as d,B as e,Y as f};
1
+ import {f,v}from'./chunk-OBBOIKJ2.js';import {yc}from'./chunk-PLMJIRXJ.js';import {useId}from'react';import {styled,MenuItem,Menu,ListItemIcon,ListItemText,Select,useTheme,Box}from'@mui/material';import {jsxs,jsx}from'react/jsx-runtime';var g=styled(MenuItem,{shouldForwardProp:t=>t!=="alwaysShowRightAction"})(({theme:t,alwaysShowRightAction:n})=>({backgroundColor:n?t.palette.common.lightOrange:"","&:hover":{backgroundColor:n?t.palette.common.lightOrange:"",boxShadow:t.shadows[10],":hover":{"& .sandbox-Icon":{left:"-16px !important",transition:"all 0.3s ease-in-out"},"& .close-Icon":{display:"block !important"}}}})),h=styled(Menu,{shouldForwardProp:t=>t!=="minWidth"})(({theme:t,minWidth:n})=>({".MuiMenu-paper":{borderRadius:4,minWidth:n},".MuiMenuItem-root":{display:"flex",gap:"4px",minHeight:"36px",alignItems:"center",paddingInline:8,transition:t.transitions.create(["visibility"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.complex}),".menu-right-action":{visibility:"hidden"},"&:hover":{".menu-right-action":{visibility:"visible"}}},"&.tap-dropdown":{zIndex:2e3,".MuiList-root":{padding:0}}})),x=styled(ListItemIcon)(()=>({minWidth:"16px !important"})),S=styled(ListItemText)(()=>({".MuiTypography-root":{fontSize:"0.6875rem"}})),D=styled(Select)(({theme:t})=>({padding:"0.25rem 0.34rem 0.25rem 0.5rem",display:"flex",justifyContent:"center",alignItems:"center",gap:"0.19rem",width:"auto",flexShrink:0,borderRadius:"0.5rem",boxShadow:t.shadows[5],cursor:"pointer",outline:t.palette.background.default,border:"none",backgroundColor:t.palette.background.default,"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},"& .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},"& .MuiMenuList-root":{padding:"0px !important",margin:0},"& .MuiSelect-outlined":{padding:"0px !important"}})),z=styled(MenuItem)(({theme:t})=>({display:"flex",height:"2.5rem",width:"10.43rem",alignItems:"center",gap:"0.5",alignSelf:"stretch",transition:"boxShadow 0.2s ease-in-out",backgroundColor:"inherit !important",margin:0,padding:0,paddingTop:"0px !important",paddingBottom:"0px !important","&:hover":{boxSizing:"border-box",boxShadow:`${t.shadows[3]}`}})),A=styled("p")(({theme:t})=>({color:t.palette.text.primary,fontSize:"0.68rem",fontWeight:600,textAlign:"center",padding:"0 !important",margin:"0 !important",textTransform:"capitalize",".MuiOutlinedInput-input":{paddingRight:0},"MuiInputBase-input":{paddingRight:0},".MuiSelect-select":{paddingRight:0}})),W=styled("p")(({theme:t})=>({fontSize:"0.75rem",fontWeight:500,color:t.palette.text.primary,paddingLeft:"1rem !important",transition:"boxShadow 0.2s ease-in-out"})),B=styled("img")(()=>({width:"0.75rem",height:"auto",padding:0,paddingBottom:.5,margin:0,verticalAlign:"middle",boxSizing:"border-box"})),y=styled(f)(()=>({padding:0,paddingRight:"4px",width:"14px !important",".MuiSvgIcon-root":{width:"12px !important",height:"12px !important"}}));function N({open:t,menuItems:n,anchorEl:a,onClose:d,footer:f,selected:w,multiple:M,allowShadows:p=true,...C}){let k=yc(useId(),"dropdown-menu"),l=useTheme();return jsxs(h,{id:k,"data-testid":"DropdownMenu",open:t,anchorEl:a,onClose:d,onContextMenu:o=>{o.preventDefault(),d();},...C,className:"tap-dropdown",minWidth:a?.clientWidth||"auto",children:[n.map((o,r)=>o.name==="divider"?jsx(v,{sx:{margin:"0 !important"}},`${o.label}-${r}`):jsx("div",{children:o.label&&jsxs(g,{alwaysShowRightAction:o.alwaysShowRightAction,onClick:v=>{o.onClick&&o.onClick(v);},onContextMenu:o.onRightClick,selected:o.selected,sx:{"&:hover":{backgroundColor:"transparent",boxShadow:p?l.shadows[10]:"none","& .sandbox-Icon":{display:"none"},"& .close-Icon":{display:"block !important"}},...r===w&&{backgroundColor:"transparent",boxShadow:p?l.shadows[10]:"none"},...o.sx},children:[M&&jsx(y,{size:"small",checked:o.selected}),o.icon&&jsx(x,{children:o.icon}),jsx(S,{children:o.label}),jsx(Box,{className:o.alwaysShowRightAction?"":"menu-right-action",children:o.rightAction&&o.rightAction})]})},`${o.label}-${r}`)),f]})}var I=N;var Y=I;export{D as a,z as b,A as c,W as d,B as e,Y as f};
@@ -1 +1 @@
1
- import {a}from'./chunk-7TOPMSDQ.js';import {j as j$1,R as R$1}from'./chunk-CIKLIBPZ.js';import {yc,Ka}from'./chunk-EEIJA6B7.js';import {dl,el}from'./chunk-YKKS24ES.js';import {useId,useState,useEffect}from'react';import te from'@mui/material/ClickAwayListener';import g from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var S=styled(g)(()=>({width:157,padding:"16px",display:"flex",alignItems:"center",justifyContent:"center",gap:"16px"})),z=styled(j$1,{shouldForwardProp:r=>r!=="open"&&r!=="size"})(({theme:r,open:o,size:i})=>{let{base:a,grey:p,brand:b}=r.v2.palette;return {fontSize:"11px",fontWeight:500,background:a.white,border:`1px solid ${p[100]}`,borderRadius:"19px",height:i==="large"?32:24,width:i==="large"?74:58,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",...o&&{boxShadow:"0px 0px 4px 0px #1F88D080",borderColor:b[500]}}}),d=styled(g)(()=>({textAlign:"center",cursor:"pointer",userSelect:"none"})),$=styled(j$1,{shouldForwardProp:r=>r!=="selected"})(({theme:r,selected:o})=>{let{base:i,grey:a,brand:p}=r.v2.palette;return {fontSize:"11px",fontWeight:500,background:i.white,border:`1px solid ${a[100]}`,borderRadius:"4px",height:24,width:33,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",...o&&{borderColor:"transparent",color:p[500],backgroundColor:alpha(p[500],.1)}}}),j=styled(g)(()=>({display:"flex",flexDirection:"column",gap:"4px"})),F=styled(g)(()=>({display:"flex",alignItems:"center",justifyContent:"center",gap:"4px"})),k=styled(g)(()=>({display:"flex",flexDirection:"column",justifyContent:"center",gap:"6px"})),H=styled(a)(()=>({".MuiInput-input":{fontWeight:"500",fontSize:"11px"},height:32,width:32}));var _=r=>r===0?12:r<=12?r:r-12,ue=r=>r>=12?"PM":"AM",N=()=>new Date().getMinutes(),R=()=>{let r=new Date().getHours();return _(r)},ce=(r,o)=>o==="AM"&&r===12?0:o==="PM"&&r!==12?r+12:r;var O=["AM","PM"],x=12,h=59;function U({onChange:r,defaultTime:o,enableRealTimeChange:i,size:a="large"}){let p=yc(useId(),"time-picker"),[b,I]=useState(null),[u,q]=useState(o?.period??(new Date().getHours()>=12?"PM":"AM")),[c,C]=useState(o?.hour??R()),[l,y]=useState(o?.minute??N()),v=!!b;useEffect(()=>{i&&r?.({hour:c,minute:l,period:u});},[c,l,u,i]);let G=e=>{I(e.currentTarget);},J=()=>{I(null),r?.({hour:c,minute:l,period:u});},K=e=>{q(e);},s=e=>e<10?`0${e}`:e.toString(),Q=e=>{let m=Ka(s(Number(e.target.value)));if(m>12){e.preventDefault();return}C(m);},D=()=>{C(e=>e===12?1:e+1);},E=()=>{C(e=>e===1?12:e-1);},V=e=>{let m=Ka(s(Number(e.target.value)));if(m>59){e.preventDefault();return}y(m);},X=()=>{y(e=>e===59?(D(),0):e+1);},Y=()=>{y(e=>e===0?(E(),59):e-1);};return jsx(te,{onClickAway:J,children:jsxs(g,{id:p,"data-testid":"TimePicker",children:[jsx(z,{size:a,open:v,onClick:G,children:`${s(c)}:${s(l)}${u.toLowerCase()}`}),jsx(R$1,{open:v,anchorEl:b,placement:"top-start",sx:{marginTop:"8px",marginBottom:"8px"},children:jsxs(S,{children:[jsxs(F,{children:[jsxs(k,{children:[jsx(d,{onClick:D,children:jsx("img",{src:dl,alt:"arrow"})}),jsx(H,{value:s(c),onChange:Q}),jsx(d,{onClick:E,children:jsx("img",{src:el,alt:"arrow"})})]}),jsx(j$1,{children:":"}),jsxs(k,{children:[jsx(d,{onClick:X,children:jsx("img",{src:dl,alt:"arrow"})}),jsx(H,{value:s(l),onChange:V}),jsx(d,{onClick:Y,children:jsx("img",{src:el,alt:"arrow"})})]})]}),jsx(j,{children:O.map(e=>jsx($,{onClick:()=>{K(e);},selected:u===e,children:e},e))})]})})]})})}var ve=U;export{_ as a,ue as b,N as c,R as d,ce as e,O as f,x as g,h,U as i,ve as j};
1
+ import {a}from'./chunk-4KSZBODD.js';import {j as j$1,R as R$1}from'./chunk-OBBOIKJ2.js';import {yc,Ka}from'./chunk-PLMJIRXJ.js';import {dl,el}from'./chunk-YKKS24ES.js';import {useId,useState,useEffect}from'react';import te from'@mui/material/ClickAwayListener';import g from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var S=styled(g)(()=>({width:157,padding:"16px",display:"flex",alignItems:"center",justifyContent:"center",gap:"16px"})),z=styled(j$1,{shouldForwardProp:r=>r!=="open"&&r!=="size"})(({theme:r,open:o,size:i})=>{let{base:a,grey:p,brand:b}=r.v2.palette;return {fontSize:"11px",fontWeight:500,background:a.white,border:`1px solid ${p[100]}`,borderRadius:"19px",height:i==="large"?32:24,width:i==="large"?74:58,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",...o&&{boxShadow:"0px 0px 4px 0px #1F88D080",borderColor:b[500]}}}),d=styled(g)(()=>({textAlign:"center",cursor:"pointer",userSelect:"none"})),$=styled(j$1,{shouldForwardProp:r=>r!=="selected"})(({theme:r,selected:o})=>{let{base:i,grey:a,brand:p}=r.v2.palette;return {fontSize:"11px",fontWeight:500,background:i.white,border:`1px solid ${a[100]}`,borderRadius:"4px",height:24,width:33,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",...o&&{borderColor:"transparent",color:p[500],backgroundColor:alpha(p[500],.1)}}}),j=styled(g)(()=>({display:"flex",flexDirection:"column",gap:"4px"})),F=styled(g)(()=>({display:"flex",alignItems:"center",justifyContent:"center",gap:"4px"})),k=styled(g)(()=>({display:"flex",flexDirection:"column",justifyContent:"center",gap:"6px"})),H=styled(a)(()=>({".MuiInput-input":{fontWeight:"500",fontSize:"11px"},height:32,width:32}));var _=r=>r===0?12:r<=12?r:r-12,ue=r=>r>=12?"PM":"AM",N=()=>new Date().getMinutes(),R=()=>{let r=new Date().getHours();return _(r)},ce=(r,o)=>o==="AM"&&r===12?0:o==="PM"&&r!==12?r+12:r;var O=["AM","PM"],x=12,h=59;function U({onChange:r,defaultTime:o,enableRealTimeChange:i,size:a="large"}){let p=yc(useId(),"time-picker"),[b,I]=useState(null),[u,q]=useState(o?.period??(new Date().getHours()>=12?"PM":"AM")),[c,C]=useState(o?.hour??R()),[l,y]=useState(o?.minute??N()),v=!!b;useEffect(()=>{i&&r?.({hour:c,minute:l,period:u});},[c,l,u,i]);let G=e=>{I(e.currentTarget);},J=()=>{I(null),r?.({hour:c,minute:l,period:u});},K=e=>{q(e);},s=e=>e<10?`0${e}`:e.toString(),Q=e=>{let m=Ka(s(Number(e.target.value)));if(m>12){e.preventDefault();return}C(m);},D=()=>{C(e=>e===12?1:e+1);},E=()=>{C(e=>e===1?12:e-1);},V=e=>{let m=Ka(s(Number(e.target.value)));if(m>59){e.preventDefault();return}y(m);},X=()=>{y(e=>e===59?(D(),0):e+1);},Y=()=>{y(e=>e===0?(E(),59):e-1);};return jsx(te,{onClickAway:J,children:jsxs(g,{id:p,"data-testid":"TimePicker",children:[jsx(z,{size:a,open:v,onClick:G,children:`${s(c)}:${s(l)}${u.toLowerCase()}`}),jsx(R$1,{open:v,anchorEl:b,placement:"top-start",sx:{marginTop:"8px",marginBottom:"8px"},children:jsxs(S,{children:[jsxs(F,{children:[jsxs(k,{children:[jsx(d,{onClick:D,children:jsx("img",{src:dl,alt:"arrow"})}),jsx(H,{value:s(c),onChange:Q}),jsx(d,{onClick:E,children:jsx("img",{src:el,alt:"arrow"})})]}),jsx(j$1,{children:":"}),jsxs(k,{children:[jsx(d,{onClick:X,children:jsx("img",{src:dl,alt:"arrow"})}),jsx(H,{value:s(l),onChange:V}),jsx(d,{onClick:Y,children:jsx("img",{src:el,alt:"arrow"})})]})]}),jsx(j,{children:O.map(e=>jsx($,{onClick:()=>{K(e);},selected:u===e,children:e},e))})]})})]})})}var ve=U;export{_ as a,ue as b,N as c,R as d,ce as e,O as f,x as g,h,U as i,ve as j};
@@ -1 +1 @@
1
- import {f,b as b$1,g,a as a$2,e,d,c as c$1}from'./chunk-DGAX7HUY.js';import {a as a$4}from'./chunk-CSH3Q3F4.js';import {a as a$1}from'./chunk-OVRSF46B.js';import {c}from'./chunk-XAGAK6OO.js';import {a}from'./chunk-ZONDSLTR.js';import {o,j as j$1,k,l,p as p$1}from'./chunk-Y2ME3P6W.js';import {b}from'./chunk-3VCDLYKF.js';import {a as a$3}from'./chunk-PLCHPHE7.js';import {p,z}from'./chunk-CIKLIBPZ.js';import {Va,yc,Ha,Ia,bc,f as f$1}from'./chunk-EEIJA6B7.js';import {s}from'./chunk-LBTXKWTF.js';import {T,yi,Ai,zi,xi,Ei,ch,Vg,bh,Rj,Sj,tb,gk,jk,Ak,hk,ub,va,ua,sk,h,Ug}from'./chunk-YKKS24ES.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:xi,color:"#5E30EB"},SAVED_CARD:{label:"cardAgreement",icon:zi,color:"#76BB40"},SUBSCRIPTION:{label:"subscription",icon:Ai,color:"#00C7BE"},INSTALLMENT:{label:"installment",icon:yi,color:"#32ADE6"}},dt={SAVED_TOKEN:{label:"savedToken",icon:T,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$1=useTheme(),{t:a$2}=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,{"data-testid":"AgreementCell_countBadge",children:jsx(p,{title:a$2("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$4,{value:e,index:c},c),s=n.map((c,g)=>c.label==="countBadge"?d(g):jsx(p,{title:a$2(c.label),children:jsx(a,{children:r?jsx(mt,{children:jsx(ct,{"data-testid":"AgreementCell_agreementType",sx:{color:c.color},children:a$2(c.label)})}):jsx(a$1,{sx:{maxWidth:"16px",maxHeight:"16px",height:"auto",width:"auto"},src:c.icon,alt:"agreement"})},c.color)},c.color)),f=jsx(p,{title:"No agreement",children:jsx(a,{children:r?jsx(mt,{children:jsx(ct,{"data-testid":"AgreementCell_agreementType",sx:{color:p$1.palette.text.secondary},children:"No agreement"})}):jsx(a$1,{sx:{maxWidth:"24px",maxHeight:"24px",height:"auto",width:"auto"},src:Ei,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:Sj,borderColor:"rgba(31, 136, 208, 0.10)"},"Device Biometric":{tooltip:"Biometric",icon:Rj,borderColor:"rgba(31, 136, 208, 0.10)"},"Non-3DS":{tooltip:"Non 3DS",icon:bh,borderColor:"rgba(31, 136, 208, 0.10)"}},vo={FAILED:{tooltip:"Failed",icon:Vg,borderColor:"rgba(255, 61, 0, 0.10)"},REJECTED:{tooltip:"Rejected",icon:ch,borderColor:"rgba(255, 61, 0, 0.10)"}};function be({transactionStatus:t,eci:o,authType:e,isTextShown:r}){let l=yc(useId(),"auth-icons"),p$1=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=useMemo(()=>p$1.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$1,{sx:{width:"16px",height:"16px"},src:n.content,alt:n.tooltip});return jsx(p,{title:n.tooltip,children:s},`${n.tooltip}-${d}`)}),[p$1]);return jsx(Wo,{id:l,"data-testid":"AuthIcons",children:a})}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:hk},CAPTURED:{icon:gk}};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$1,currency:a,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} ${P.integerAmount}.${P.decimalAmount}`,[a,P.decimalAmount,P.integerAmount]),J=useCallback(C=>{let X=C==="Capture"?l:p$1,{integerAmount:D,decimalAmount:v}=Ia(X,a);return `Partial ${C} - ${a} ${D}.${v}`},[l,p$1,a]),x=o>0?jsx(p,{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:tb,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(p,{title:L("Capture"),children:jsx(j,{children:jsx(N,{src:tt.CAPTURED?.icon,alt:"auto"})})}):jsx(p,{title:L("Capture"),children:jsx(j,{children:jsx(N,{src:tt.CAPTURED?.icon,alt:"auto"})})}),I=o===100?jsx(p,{title:A("captured"),children:jsx(Bo,{children:jsx(N,{src:jk,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$1,currency:a,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} ${P.integerAmount}.${P.decimalAmount}`,[a,P.decimalAmount,P.integerAmount]),J=useCallback(C=>{let X=C==="Capture"?l$1:p$1,{integerAmount:D,decimalAmount:v}=Ia(X,a);return `Partial ${C} - ${a} ${D}.${v}`},[l$1,p$1,a]),x=t>0||p$1?jsx(p,{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:Ak,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(p,{title:L("Void"),children:jsx(j,{children:jsx(N,{src:tt.VOID?.icon,alt:"auto"})})}):null,I=t===100?jsx(p,{title:A("void"),children:jsx(j,{children:jsx(N,{src:Ak,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$1={}})=>{let{t:a}=useTranslation(),n=useTheme$1(),d=a(_(t));return Va(r)?jsx(b,{copyText:d,chipIndex:l,selectionProps:p$1,children:d}):jsx(p,{title:d,children:o?jsx(j$1,{"data-testid":"StatusCell_AuthorizedStatusLabel",sx:{color:n.palette.info.dark},children:d}):jsx(a$1,{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$2,gatewayCode:a,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$2[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$1,{src:a$2[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&&jsxs(b,{copyText:"Gateway",chipIndex:1,selectionProps:L,children:["Gateway ",a]}),n&&jsxs(b,{copyText:"Acquirer",chipIndex:2,selectionProps:L,children:["Acquirer ",n]})]})]}):p$2?jsxs($t,{children:[jsx(p,{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&&jsx(p,{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]})}),n&&jsx(p,{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(p,{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(p,{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(p,{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(p,{title:D??C(_(t)),children:jsx(o,{children:Ft})})})}var Xe=()=>{let{t}=useTranslation(),o=yc(useId(),"customer-initiated-icon");return jsx(p,{title:t("merchantInitiated"),children:jsx("img",{id:o,"data-testid":"merchantInitiatedIcon",src:ub,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(p,{title:l,children:jsx(a$3,{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$1,{id:e,"data-testid":"StatusCell_DisputeStatusIcon",sx:{width:"13.5px",height:"13.5px"},src:t?va:ua,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$1=yc(useId(),"issuer-icon"),a=e?.slice(0,4),n=e?.slice(-4);return jsxs(Xo,{id:p$1,"data-testid":"IssuerIcon",tableMode:l,children:[t&&jsx(ot,{countryCode:t,isTextShown:o}),jsx(p,{title:`${r?`Issuer - ${r}`:""}`,children:jsx(Yo,{children:`${a||""} ${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$2=0,selectionProps:a={}})=>{let{t:n}=useTranslation(),d=yc(useId(),"payout-icon"),s=n(_(t)),f=e$1||s;return l?jsx(b,{chipIndex:p$2,copyText:s,selectionProps:a,children:s}):jsx(p,{title:f,children:o?jsx(bt,{id:d,"data-testid":"StatusCell_PayoutStatusLabel",children:s}):jsx(p$1,{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$2,chipIndex:a=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$2)return jsxs(b,{chipIndex:a,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(p,{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(p,{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:sk,alt:"multi-refunded-icon","data-testid":"StatusCell_MultiRefundIcon"}),T]}):jsx(p$1,{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$1}){let{t:a}=useTranslation(),n=h(t);return jsx(p,{title:e,children:o?jsx(re,{"data-testid":"SourceCell_BadgeTextWrapper",children:jsx(ee,{"data-testid":"SourceCell_TextLabel","data-source":t,children:a(_(t))})}):jsx(oe,{src:n,alt:t,width:r,height:l,onError:d=>{d.currentTarget.src=h("card");},sx:p$1})})}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:Ug,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$1=useTheme(),{t:a}=useTranslation(),n=yc(useId(),"destination-icon"),d=a(_(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$1.palette.info.dark:p$1.palette.common.black},children:d}):jsx(de,{id:n,"data-testid":"DestinationIcon",className:"destination-status",children:t&&rt[t]&&jsx(p,{title:a(_(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$2,e,d,c as c$1}from'./chunk-DGAX7HUY.js';import {a as a$4}from'./chunk-LLEGWG6Q.js';import {a as a$1}from'./chunk-2DC5PMER.js';import {c}from'./chunk-ECEVCQVI.js';import {a}from'./chunk-ZONDSLTR.js';import {o,j as j$1,k,l,p as p$1}from'./chunk-TAKHLPXX.js';import {a as a$3}from'./chunk-54RTNLV2.js';import {b}from'./chunk-AWNFVAW7.js';import {p,z}from'./chunk-OBBOIKJ2.js';import {Va,yc,Ha,Ia,bc,f as f$1}from'./chunk-PLMJIRXJ.js';import {s}from'./chunk-WHXHVOBY.js';import {T,yi,Ai,zi,xi,Ei,ch,Vg,bh,Rj,Sj,tb,gk,jk,Ak,hk,ub,va,ua,sk,h,Ug}from'./chunk-YKKS24ES.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:xi,color:"#5E30EB"},SAVED_CARD:{label:"cardAgreement",icon:zi,color:"#76BB40"},SUBSCRIPTION:{label:"subscription",icon:Ai,color:"#00C7BE"},INSTALLMENT:{label:"installment",icon:yi,color:"#32ADE6"}},dt={SAVED_TOKEN:{label:"savedToken",icon:T,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$1=useTheme(),{t:a$2}=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,{"data-testid":"AgreementCell_countBadge",children:jsx(p,{title:a$2("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$4,{value:e,index:c},c),s=n.map((c,g)=>c.label==="countBadge"?d(g):jsx(p,{title:a$2(c.label),children:jsx(a,{children:r?jsx(mt,{children:jsx(ct,{"data-testid":"AgreementCell_agreementType",sx:{color:c.color},children:a$2(c.label)})}):jsx(a$1,{sx:{maxWidth:"16px",maxHeight:"16px",height:"auto",width:"auto"},src:c.icon,alt:"agreement"})},c.color)},c.color)),f=jsx(p,{title:"No agreement",children:jsx(a,{children:r?jsx(mt,{children:jsx(ct,{"data-testid":"AgreementCell_agreementType",sx:{color:p$1.palette.text.secondary},children:"No agreement"})}):jsx(a$1,{sx:{maxWidth:"24px",maxHeight:"24px",height:"auto",width:"auto"},src:Ei,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:Sj,borderColor:"rgba(31, 136, 208, 0.10)"},"Device Biometric":{tooltip:"Biometric",icon:Rj,borderColor:"rgba(31, 136, 208, 0.10)"},"Non-3DS":{tooltip:"Non 3DS",icon:bh,borderColor:"rgba(31, 136, 208, 0.10)"}},vo={FAILED:{tooltip:"Failed",icon:Vg,borderColor:"rgba(255, 61, 0, 0.10)"},REJECTED:{tooltip:"Rejected",icon:ch,borderColor:"rgba(255, 61, 0, 0.10)"}};function be({transactionStatus:t,eci:o,authType:e,isTextShown:r}){let l=yc(useId(),"auth-icons"),p$1=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=useMemo(()=>p$1.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$1,{sx:{width:"16px",height:"16px"},src:n.content,alt:n.tooltip});return jsx(p,{title:n.tooltip,children:s},`${n.tooltip}-${d}`)}),[p$1]);return jsx(Wo,{id:l,"data-testid":"AuthIcons",children:a})}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:hk},CAPTURED:{icon:gk}};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$1,currency:a,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} ${P.integerAmount}.${P.decimalAmount}`,[a,P.decimalAmount,P.integerAmount]),J=useCallback(C=>{let X=C==="Capture"?l:p$1,{integerAmount:D,decimalAmount:v}=Ia(X,a);return `Partial ${C} - ${a} ${D}.${v}`},[l,p$1,a]),x=o>0?jsx(p,{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:tb,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(p,{title:L("Capture"),children:jsx(j,{children:jsx(N,{src:tt.CAPTURED?.icon,alt:"auto"})})}):jsx(p,{title:L("Capture"),children:jsx(j,{children:jsx(N,{src:tt.CAPTURED?.icon,alt:"auto"})})}),I=o===100?jsx(p,{title:A("captured"),children:jsx(Bo,{children:jsx(N,{src:jk,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$1,currency:a,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} ${P.integerAmount}.${P.decimalAmount}`,[a,P.decimalAmount,P.integerAmount]),J=useCallback(C=>{let X=C==="Capture"?l$1:p$1,{integerAmount:D,decimalAmount:v}=Ia(X,a);return `Partial ${C} - ${a} ${D}.${v}`},[l$1,p$1,a]),x=t>0||p$1?jsx(p,{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:Ak,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(p,{title:L("Void"),children:jsx(j,{children:jsx(N,{src:tt.VOID?.icon,alt:"auto"})})}):null,I=t===100?jsx(p,{title:A("void"),children:jsx(j,{children:jsx(N,{src:Ak,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$1={}})=>{let{t:a}=useTranslation(),n=useTheme$1(),d=a(_(t));return Va(r)?jsx(b,{copyText:d,chipIndex:l,selectionProps:p$1,children:d}):jsx(p,{title:d,children:o?jsx(j$1,{"data-testid":"StatusCell_AuthorizedStatusLabel",sx:{color:n.palette.info.dark},children:d}):jsx(a$1,{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$2,gatewayCode:a,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$2[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$1,{src:a$2[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&&jsxs(b,{copyText:"Gateway",chipIndex:1,selectionProps:L,children:["Gateway ",a]}),n&&jsxs(b,{copyText:"Acquirer",chipIndex:2,selectionProps:L,children:["Acquirer ",n]})]})]}):p$2?jsxs($t,{children:[jsx(p,{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&&jsx(p,{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]})}),n&&jsx(p,{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(p,{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(p,{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(p,{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(p,{title:D??C(_(t)),children:jsx(o,{children:Ft})})})}var Xe=()=>{let{t}=useTranslation(),o=yc(useId(),"customer-initiated-icon");return jsx(p,{title:t("merchantInitiated"),children:jsx("img",{id:o,"data-testid":"merchantInitiatedIcon",src:ub,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(p,{title:l,children:jsx(a$3,{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$1,{id:e,"data-testid":"StatusCell_DisputeStatusIcon",sx:{width:"13.5px",height:"13.5px"},src:t?va:ua,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$1=yc(useId(),"issuer-icon"),a=e?.slice(0,4),n=e?.slice(-4);return jsxs(Xo,{id:p$1,"data-testid":"IssuerIcon",tableMode:l,children:[t&&jsx(ot,{countryCode:t,isTextShown:o}),jsx(p,{title:`${r?`Issuer - ${r}`:""}`,children:jsx(Yo,{children:`${a||""} ${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$2=0,selectionProps:a={}})=>{let{t:n}=useTranslation(),d=yc(useId(),"payout-icon"),s=n(_(t)),f=e$1||s;return l?jsx(b,{chipIndex:p$2,copyText:s,selectionProps:a,children:s}):jsx(p,{title:f,children:o?jsx(bt,{id:d,"data-testid":"StatusCell_PayoutStatusLabel",children:s}):jsx(p$1,{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$2,chipIndex:a=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$2)return jsxs(b,{chipIndex:a,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(p,{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(p,{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:sk,alt:"multi-refunded-icon","data-testid":"StatusCell_MultiRefundIcon"}),T]}):jsx(p$1,{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$1}){let{t:a}=useTranslation(),n=h(t);return jsx(p,{title:e,children:o?jsx(re,{"data-testid":"SourceCell_BadgeTextWrapper",children:jsx(ee,{"data-testid":"SourceCell_TextLabel","data-source":t,children:a(_(t))})}):jsx(oe,{src:n,alt:t,width:r,height:l,onError:d=>{d.currentTarget.src=h("card");},sx:p$1})})}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:Ug,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$1=useTheme(),{t:a}=useTranslation(),n=yc(useId(),"destination-icon"),d=a(_(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$1.palette.info.dark:p$1.palette.common.black},children:d}):jsx(de,{id:n,"data-testid":"DestinationIcon",className:"destination-status",children:t&&rt[t]&&jsx(p,{title:a(_(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 +1 @@
1
- import {yc}from'./chunk-EEIJA6B7.js';import {qi,ri}from'./chunk-YKKS24ES.js';import {styled,Box}from'@mui/material';import I,{useId,useMemo}from'react';import {jsx,jsxs}from'react/jsx-runtime';var c=styled(Box)(({theme:e})=>({height:"32px",borderRadius:"4px",backgroundColor:e.palette.action.hover,padding:"2px",display:"flex",alignItems:"center",position:"relative",cursor:"pointer",zIndex:1})),u=styled(Box,{shouldForwardProp:e=>e!=="isActive"})(({isActive:e})=>({flex:1,display:"flex",justifyContent:"center",alignItems:"center",position:"relative",zIndex:2,opacity:e?1:.5})),x=styled(Box,{shouldForwardProp:e=>e!=="activeIndex"})(({theme:e,activeIndex:o})=>({position:"absolute",top:2,left:o*30+2,transition:"all 0.25s ease-in-out",width:"28px",height:"28px",backgroundColor:e.palette.common.white,borderRadius:"2px",boxShadow:"0px 0px 4px 0px rgba(0, 0, 0, 0.20)"}));var m=(t=>(t.LIST="LIST",t.CARDS="CARDS",t.MAP="MAP",t))(m||{});var y=e=>{let o=I.Children.count(e.children)-1;return jsx(c,{...e,sx:{width:o*30+2}})},w=y;var T=[{icon:jsx("img",{src:qi,alt:"card"}),value:"CARDS"},{icon:jsx("img",{src:ri,alt:"LIST"}),value:"LIST"}],S=e=>{let{currentView:o,onToggleClick:s,getOverrideViews:t}=e,v=yc(useId(),"toggle-view"),l=useMemo(()=>t?t(T):T,[t]),h=useMemo(()=>l.findIndex(r=>r.value===o),[l,o]);return s?jsxs(w,{id:v,"data-testid":"ToggleView",children:[l.map(r=>jsx(u,{onClick:()=>s(r.value),sx:{height:"11.6px",width:"11.6px"},isActive:o===r.value,children:r.icon},r.value)),jsx(x,{activeIndex:h})]}):null},f=S;var $=f;export{m as a,$ as b};
1
+ import {yc}from'./chunk-PLMJIRXJ.js';import {qi,ri}from'./chunk-YKKS24ES.js';import {styled,Box}from'@mui/material';import I,{useId,useMemo}from'react';import {jsx,jsxs}from'react/jsx-runtime';var c=styled(Box)(({theme:e})=>({height:"32px",borderRadius:"4px",backgroundColor:e.palette.action.hover,padding:"2px",display:"flex",alignItems:"center",position:"relative",cursor:"pointer",zIndex:1})),u=styled(Box,{shouldForwardProp:e=>e!=="isActive"})(({isActive:e})=>({flex:1,display:"flex",justifyContent:"center",alignItems:"center",position:"relative",zIndex:2,opacity:e?1:.5})),x=styled(Box,{shouldForwardProp:e=>e!=="activeIndex"})(({theme:e,activeIndex:o})=>({position:"absolute",top:2,left:o*30+2,transition:"all 0.25s ease-in-out",width:"28px",height:"28px",backgroundColor:e.palette.common.white,borderRadius:"2px",boxShadow:"0px 0px 4px 0px rgba(0, 0, 0, 0.20)"}));var m=(t=>(t.LIST="LIST",t.CARDS="CARDS",t.MAP="MAP",t))(m||{});var y=e=>{let o=I.Children.count(e.children)-1;return jsx(c,{...e,sx:{width:o*30+2}})},w=y;var T=[{icon:jsx("img",{src:qi,alt:"card"}),value:"CARDS"},{icon:jsx("img",{src:ri,alt:"LIST"}),value:"LIST"}],S=e=>{let{currentView:o,onToggleClick:s,getOverrideViews:t}=e,v=yc(useId(),"toggle-view"),l=useMemo(()=>t?t(T):T,[t]),h=useMemo(()=>l.findIndex(r=>r.value===o),[l,o]);return s?jsxs(w,{id:v,"data-testid":"ToggleView",children:[l.map(r=>jsx(u,{onClick:()=>s(r.value),sx:{height:"11.6px",width:"11.6px"},isActive:o===r.value,children:r.icon},r.value)),jsx(x,{activeIndex:h})]}):null},f=S;var $=f;export{m as a,$ as b};
@@ -1 +1 @@
1
- import {yc}from'./chunk-EEIJA6B7.js';import {Cj}from'./chunk-YKKS24ES.js';import {memo,useId}from'react';import f from'@mui/material/ButtonBase';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';import {Box}from'@mui/material';var d=styled(f,{shouldForwardProp:t=>t!=="variant"&&t!=="size"&&t!=="width"&&t!=="height"})(({theme:t,variant:o="confirm",size:e="default",width:n,height:r})=>({textTransform:"capitalize",borderRadius:"4px",lineHeight:"100%",gap:"8px","&.Mui-disabled":{opacity:.5},...o==="confirm"&&{color:t.palette.common.white,background:t.palette.info.dark},...o==="cancel"&&{color:t.palette.grey[700],border:`1px solid ${t.palette.divider}`},...e==="small"&&{height:24,width:"auto",padding:"8px 16px",fontWeight:600,fontSize:"10px"},...e==="default"&&{height:32,width:75,fontWeight:700,padding:"8px 24px",fontSize:"11px"},...n!==void 0&&{width:n},...r!==void 0&&{height:r}}));function u({children:t,sx:o,...e}){let n=yc(useId(),"button");return jsx(d,{id:n,"data-testid":"Button",sx:o,...e,children:t})}u.displayName="Button";var p=memo(u);function s({...t}){return jsx(Box,{component:"button","data-testid":"PlusButton",...t,sx:{cursor:"pointer",padding:0,margin:0,background:"transparent",border:"none",width:24,height:24,...t.sx},children:jsx("img",{src:Cj,alt:"Plus Button",width:24,height:24})})}s.displayName="PlusButton";var l=memo(s);var y=l;var q=p;export{y as a,q as b};
1
+ import {yc}from'./chunk-PLMJIRXJ.js';import {Cj}from'./chunk-YKKS24ES.js';import {memo,useId}from'react';import f from'@mui/material/ButtonBase';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';import {Box}from'@mui/material';var d=styled(f,{shouldForwardProp:t=>t!=="variant"&&t!=="size"&&t!=="width"&&t!=="height"})(({theme:t,variant:o="confirm",size:e="default",width:n,height:r})=>({textTransform:"capitalize",borderRadius:"4px",lineHeight:"100%",gap:"8px","&.Mui-disabled":{opacity:.5},...o==="confirm"&&{color:t.palette.common.white,background:t.palette.info.dark},...o==="cancel"&&{color:t.palette.grey[700],border:`1px solid ${t.palette.divider}`},...e==="small"&&{height:24,width:"auto",padding:"8px 16px",fontWeight:600,fontSize:"10px"},...e==="default"&&{height:32,width:75,fontWeight:700,padding:"8px 24px",fontSize:"11px"},...n!==void 0&&{width:n},...r!==void 0&&{height:r}}));function u({children:t,sx:o,...e}){let n=yc(useId(),"button");return jsx(d,{id:n,"data-testid":"Button",sx:o,...e,children:t})}u.displayName="Button";var p=memo(u);function s({...t}){return jsx(Box,{component:"button","data-testid":"PlusButton",...t,sx:{cursor:"pointer",padding:0,margin:0,background:"transparent",border:"none",width:24,height:24,...t.sx},children:jsx("img",{src:Cj,alt:"Plus Button",width:24,height:24})})}s.displayName="PlusButton";var l=memo(s);var y=l;var q=p;export{y as a,q as b};
@@ -1 +1 @@
1
- import {a as a$1}from'./chunk-A4VHKHJ2.js';import {a}from'./chunk-PLCHPHE7.js';import {r}from'./chunk-CIKLIBPZ.js';import {yc,Fa,Ga,Ea,h}from'./chunk-EEIJA6B7.js';import {Yc,Xc,Oc,Nc,Mc,Pc,Te}from'./chunk-YKKS24ES.js';import {useRef,useId,useState,useEffect}from'react';import {useTranslation}from'react-i18next';import {createPortal}from'react-dom';import {styled,alpha}from'@mui/material';import oe from'@mui/material/Popover';import Je from'react-currency-input-field';import {jsx,Fragment,jsxs}from'react/jsx-runtime';var ne=styled("div")(({showWarning:e})=>({display:"flex",gap:"0.25rem",justifyContent:"flex-start",alignItems:"flex-start",padding:"0.25rem",borderRadius:"0.25rem",width:"14.25rem",minHeight:e?"3.6rem":"2.5rem"})),te=styled("div")(()=>({display:"flex",flexDirection:"column",width:"100%"})),re=styled("div")(()=>({display:"flex",alignItems:"flex-start",justifyContent:"space-between",flex:1})),ie=styled("div")(({theme:e,showWarning:o,showDropDown:t})=>({height:"2rem",border:o?`1px solid ${e.palette.common.red}24`:t?`1px solid ${e.palette.info.dark}`:`1px solid ${e.palette.grey[100]}`,borderRadius:o?"0.25rem 0.25rem 0rem 0rem":"0.25rem",display:"flex",alignItems:"center",justifyContent:"space-between",paddingRight:"0.5rem",paddingLeft:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",margin:0,zIndex:4e3,...t&&{boxShadow:`0px 0px 4px 0px ${e.palette.info.dark}80`}})),ae=styled("div")(({theme:e})=>({height:"1.1rem",borderRadius:"0rem 0rem 0.25rem 0.25rem",display:"flex",justifyContent:"flex-start",margin:0,alignItems:"center",background:e.palette.background.gradient.error,paddingLeft:"0.5rem"})),se=styled("p")(({theme:e})=>({color:e.palette.common.red,fontSize:"0.62rem",fontWeight:400,fontFamily:"Lato",padding:0,margin:0,paddingLeft:"0.25rem"})),de=styled("img")({height:"auto",width:"auto",verticalAlign:"top"}),le=styled("div")({display:"flex",flexDirection:"column",justifyContent:"center"}),ce=styled("div")({display:"flex",height:"0.8rem",alignItems:"center",width:"8.5rem"}),pe=styled(Je)(({theme:e,showWarning:o,disabled:t})=>({color:o?e.palette.common.red:e.palette.text.primary,fontSize:"0.8125rem",fontWeight:600,width:"4.5rem",height:"0.9rem",border:"none",outline:"none",textAlign:"right",padding:0,"&::-webkit-outer-spin-button":{appearance:"none",margin:0},"&::-webkit-inner-spin-button":{appearance:"none",margin:0},backgroundColor:"transparent",alignSelf:"flex-end","&::placeholder":{color:e.palette.grey.A400},...t&&{opacity:.3}})),me=styled("p")(({theme:e})=>({color:e.palette.text.primary,fontSize:"0.8125rem",fontWeight:600,width:"5.2rem",border:"none",outline:"none",padding:0,margin:0,paddingLeft:16,textAlign:"right","&::-webkit-outer-spin-button":{appearance:"none",margin:0},"&::-webkit-inner-spin-button":{appearance:"none",margin:0},alignSelf:"center"})),I=styled("p")(({theme:e,showWarning:o,showBottomPadding:t,autoMargin:i})=>({color:o?e.palette.common.red:e.palette.grey[700],fontSize:"0.625rem",fontWeight:500,padding:0,margin:0,height:t?"0.43rem":"auto",...t&&{lineHeight:"0.625",leadingTrim:"both",paddingBottom:"0.31rem"},...i&&{paddingBottom:"0.43rem",lineHeight:"0.625"}})),Ne=styled("div")({display:"flex"}),v=styled(Ne)(({limited:e,paddingTop:o,marginRightAuto:t})=>({paddingRight:"0.5rem",alignItems:"center",cursor:"pointer",...t&&{marginRight:"auto"},...e&&{width:"3rem"},...o&&{paddingTop:"0.31rem"}})),A=styled("p")(({theme:e})=>({color:e.palette.text.primary,fontSize:"0.68rem",fontWeight:500,margin:0,padding:0,textTransform:"capitalize",paddingRight:"0.25rem",paddingLeft:"0.2rem",lineHeight:"0.865"})),ue=styled("div")({width:0,height:0}),ge=styled(oe)(({theme:e})=>({backgroundColor:e.palette.background.default,boxShadow:e.shadows[21],"& .MuiPaper-root":{borderRadius:"0.25rem"}})),F=styled("div")(({theme:e,disabled:o,isRefundInProcess:t,warning:i,isHighlighted:a})=>({borderRadius:"0.3rem",backgroundColor:e.palette.common.white,border:`1px solid ${t?e.palette.info.dark:e.palette.grey[100]}`,width:"2rem",height:"2rem",display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",pointerEvents:o?"none":"auto",transition:"all 0.2s ease-in-out","&:hover":{border:`1px solid ${i?e.palette.common.red:e.palette.info.dark}`},...a&&{border:`1px solid ${e.palette.info.dark}`},...o&&{opacity:.3}})),H=styled("img")(()=>({width:"0.85rem",height:"0.85rem"})),fe=styled(oe)(({theme:e})=>({backgroundColor:"transparent",boxShadow:e.shadows[21],borderRadius:"0.25rem","& .MuiPaper-root":{borderRadius:"0.25rem"}})),he=styled("div")(({showDaysMenu:e})=>({height:e?"4.5rem":"auto"})),ye=styled("div")(({theme:e})=>({display:"flex",alignItems:"flex-start",justifyContent:"space-between",borderBottom:`1px solid ${e.palette.grey[100]}`,maxWidth:"9.25rem",height:"2.75rem",padding:"0.5rem",cursor:"pointer",gap:"0.31rem",flexDirection:"column",transition:"all 0.2s ease-in-out","&:hover":{boxShadow:`0px 0px 16px 0px ${alpha(e.palette.common.black,.13)}`}})),Ce=styled("img")(({spaceFromBottom:e,currencyPadding:o})=>({height:"0.4rem",width:"0.6rem",cursor:"pointer",marginBottom:e||o?"0":"auto",verticalAlign:"middle",...e&&{marginTop:"2px"}}));var Xe=({selectedCurrency:e,option:o,closeDropdown:t,handleSelectOption:i})=>{let{t:a$1}=useTranslation();return jsxs(ye,{onClick:()=>{i&&i(o.value,o?.currency),t();},children:[jsx(I,{showBottomPadding:true,showWarning:false,children:a$1(o.name)}),jsxs(ce,{children:[jsxs(v,{marginRightAuto:true,children:[jsx(a,{currencyCode:o?.currency??e,width:"0.76rem"}),jsx(A,{children:o?.currency??e})]}),jsx(me,{showWarning:false,children:Fa(o.value||0,o?.currency??e)})]})]})};function Ye({menuAnchor:e,showDropDown:o,selectedCurrency:t,options:i,closeDropdown:a,handleSelectOption:g}){return i.length<=1?null:jsx(fe,{open:o,anchorEl:e,anchorOrigin:{vertical:18,horizontal:-76},style:{backgroundColor:"transparent",zIndex:4e3,padding:0,margin:0},onClose:a,children:jsx(he,{children:i.map(f=>jsx(Fragment,{children:Xe({selectedCurrency:t,option:f,closeDropdown:a,handleSelectOption:g})}))})})}var $=Ye;function oo({showWarning:e,selectedCurrency:o,onAmountChange:t,amount:i,currencyConfig:a$2,toggleDropDown:g,showDropDown:f,showDropdownIcon:M,disabled:x,isLoading:h}){let{t:b}=useTranslation(),y=useRef(null),C=()=>{y.current&&y.current.click();};return jsxs(Fragment,{children:[jsxs(le,{children:[jsx(I,{showBottomPadding:true,showWarning:e,children:b("amount")}),jsxs(v,{limited:true,paddingTop:true,onClick:C,children:[jsx(a,{currencyCode:o,width:"0.76rem"}),jsx(A,{children:jsx(a$1,{currency:o})}),!e&&M&&jsx(Ce,{src:f?Yc:Xc,alt:"drop-down icon",currencyPadding:true})]})]}),jsx(ue,{ref:y,onClick:g}),h?jsx(r,{variant:"text",width:"100%",height:"100%"}):jsx(pe,{disabled:x,placeholder:a$2[o]?"0.000":"0.00",onValueChange:t,value:i,decimalsLimit:a$2[o]??2,showWarning:e||false,decimalScale:a$2[o]??2,autoFocus:true})]})}var B=oo;function so({anchorEl:e,initialAmount:o,options:t,onConfirm:i,handleClose:a,currency:g,isCheckMarkHighlighted:f}){let M=yc(useId(),"action-menu"),{t:x}=useTranslation(),[h$1,b]=useState(o?.toString()),[y,C]=useState(),[u,k]=useState(""),be=useRef(null),[R,E]=useState(false),[c,Se]=useState(g),j=false,[De,Ie]=useState(false),[ve,G]=useState(Oc),[Ae,K]=useState(Nc),Me=useRef(),ke=()=>{C(void 0),E(false);};useEffect(()=>{Me.current?.focus();},[De]);let Re=()=>{ke(),Ie(r=>!r);},Ee=!!e,We=r=>{E(p=>!p),C(r.currentTarget);},Pe=t?.find(r=>r.currency===c)?.value,Te$1=Fa(Pe||0,c),Oe=`${x("maxAllowed")} ${Te$1}`,Fe=`${x("minAllowed")} ${Ga(.1,c||"KWD")}`,He=r=>{let p=h(r);p>o?k(Oe):p<.1&&r!==void 0?k(Fe):k(""),b(r);},Le=(r,p)=>{let Ve=Ga(r||0,p||"KWD");b(Ve),Se(p||c);},U=r=>{C(void 0),E(false),a(r);},$e=()=>{K(Pc);},ze=()=>{K(Nc);},V=r=>{U(r);},Be=()=>{U();},je=()=>{G(Te);},Ge=()=>{G(Oc);},Ke=()=>{i?.(h(h$1),c),V();},Ue=!!u||!h$1;return createPortal(jsx(ge,{id:M,"data-testid":"ActionMenu",open:Ee,anchorEl:e,style:{backgroundColor:"transparent",zIndex:3e3},"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",anchorOrigin:{vertical:"top",horizontal:-234},ref:be,onClose:r=>{V(r);},children:jsxs(ne,{showWarning:!!u,children:[jsxs(te,{children:[jsxs(ie,{showWarning:!!u,showDropDown:R,children:[jsx(B,{showWarning:!!u,selectedCurrency:c,onAmountChange:He,amount:h$1,currencyConfig:Ea,toggleDropDown:We,showDropDown:!R,showDropdownIcon:(t?.length||0)>1}),jsx($,{showDropDown:R,menuAnchor:y,selectedCurrency:c,closeDropdown:Re,options:t??[],handleSelectOption:Le})]}),!!u&&jsxs(ae,{children:[jsx(de,{src:Mc,alt:"info"}),jsx(se,{children:u})]})]}),jsxs(re,{children:[jsx(F,{onMouseLeave:Ge,onMouseEnter:je,warning:true,role:"button",onClick:Be,children:jsx(H,{isRefundInProcess:j,src:ve,alt:"Cross icon"})}),jsx(F,{onMouseLeave:ze,onMouseEnter:$e,isRefundInProcess:j,disabled:Ue,role:"button",onClick:Ke,isHighlighted:f,children:jsx(H,{src:Ae,alt:"Check icon"})})]})]})}),document.body)}var xe=so;var jo=xe;export{$ as a,B as b,jo as c};
1
+ import {a as a$1}from'./chunk-GTARVX4J.js';import {a}from'./chunk-54RTNLV2.js';import {r}from'./chunk-OBBOIKJ2.js';import {yc,Fa,Ga,Ea,h}from'./chunk-PLMJIRXJ.js';import {Yc,Xc,Oc,Nc,Mc,Pc,Te}from'./chunk-YKKS24ES.js';import {useRef,useId,useState,useEffect}from'react';import {useTranslation}from'react-i18next';import {createPortal}from'react-dom';import {styled,alpha}from'@mui/material';import oe from'@mui/material/Popover';import Je from'react-currency-input-field';import {jsx,Fragment,jsxs}from'react/jsx-runtime';var ne=styled("div")(({showWarning:e})=>({display:"flex",gap:"0.25rem",justifyContent:"flex-start",alignItems:"flex-start",padding:"0.25rem",borderRadius:"0.25rem",width:"14.25rem",minHeight:e?"3.6rem":"2.5rem"})),te=styled("div")(()=>({display:"flex",flexDirection:"column",width:"100%"})),re=styled("div")(()=>({display:"flex",alignItems:"flex-start",justifyContent:"space-between",flex:1})),ie=styled("div")(({theme:e,showWarning:o,showDropDown:t})=>({height:"2rem",border:o?`1px solid ${e.palette.common.red}24`:t?`1px solid ${e.palette.info.dark}`:`1px solid ${e.palette.grey[100]}`,borderRadius:o?"0.25rem 0.25rem 0rem 0rem":"0.25rem",display:"flex",alignItems:"center",justifyContent:"space-between",paddingRight:"0.5rem",paddingLeft:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",margin:0,zIndex:4e3,...t&&{boxShadow:`0px 0px 4px 0px ${e.palette.info.dark}80`}})),ae=styled("div")(({theme:e})=>({height:"1.1rem",borderRadius:"0rem 0rem 0.25rem 0.25rem",display:"flex",justifyContent:"flex-start",margin:0,alignItems:"center",background:e.palette.background.gradient.error,paddingLeft:"0.5rem"})),se=styled("p")(({theme:e})=>({color:e.palette.common.red,fontSize:"0.62rem",fontWeight:400,fontFamily:"Lato",padding:0,margin:0,paddingLeft:"0.25rem"})),de=styled("img")({height:"auto",width:"auto",verticalAlign:"top"}),le=styled("div")({display:"flex",flexDirection:"column",justifyContent:"center"}),ce=styled("div")({display:"flex",height:"0.8rem",alignItems:"center",width:"8.5rem"}),pe=styled(Je)(({theme:e,showWarning:o,disabled:t})=>({color:o?e.palette.common.red:e.palette.text.primary,fontSize:"0.8125rem",fontWeight:600,width:"4.5rem",height:"0.9rem",border:"none",outline:"none",textAlign:"right",padding:0,"&::-webkit-outer-spin-button":{appearance:"none",margin:0},"&::-webkit-inner-spin-button":{appearance:"none",margin:0},backgroundColor:"transparent",alignSelf:"flex-end","&::placeholder":{color:e.palette.grey.A400},...t&&{opacity:.3}})),me=styled("p")(({theme:e})=>({color:e.palette.text.primary,fontSize:"0.8125rem",fontWeight:600,width:"5.2rem",border:"none",outline:"none",padding:0,margin:0,paddingLeft:16,textAlign:"right","&::-webkit-outer-spin-button":{appearance:"none",margin:0},"&::-webkit-inner-spin-button":{appearance:"none",margin:0},alignSelf:"center"})),I=styled("p")(({theme:e,showWarning:o,showBottomPadding:t,autoMargin:i})=>({color:o?e.palette.common.red:e.palette.grey[700],fontSize:"0.625rem",fontWeight:500,padding:0,margin:0,height:t?"0.43rem":"auto",...t&&{lineHeight:"0.625",leadingTrim:"both",paddingBottom:"0.31rem"},...i&&{paddingBottom:"0.43rem",lineHeight:"0.625"}})),Ne=styled("div")({display:"flex"}),v=styled(Ne)(({limited:e,paddingTop:o,marginRightAuto:t})=>({paddingRight:"0.5rem",alignItems:"center",cursor:"pointer",...t&&{marginRight:"auto"},...e&&{width:"3rem"},...o&&{paddingTop:"0.31rem"}})),A=styled("p")(({theme:e})=>({color:e.palette.text.primary,fontSize:"0.68rem",fontWeight:500,margin:0,padding:0,textTransform:"capitalize",paddingRight:"0.25rem",paddingLeft:"0.2rem",lineHeight:"0.865"})),ue=styled("div")({width:0,height:0}),ge=styled(oe)(({theme:e})=>({backgroundColor:e.palette.background.default,boxShadow:e.shadows[21],"& .MuiPaper-root":{borderRadius:"0.25rem"}})),F=styled("div")(({theme:e,disabled:o,isRefundInProcess:t,warning:i,isHighlighted:a})=>({borderRadius:"0.3rem",backgroundColor:e.palette.common.white,border:`1px solid ${t?e.palette.info.dark:e.palette.grey[100]}`,width:"2rem",height:"2rem",display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",pointerEvents:o?"none":"auto",transition:"all 0.2s ease-in-out","&:hover":{border:`1px solid ${i?e.palette.common.red:e.palette.info.dark}`},...a&&{border:`1px solid ${e.palette.info.dark}`},...o&&{opacity:.3}})),H=styled("img")(()=>({width:"0.85rem",height:"0.85rem"})),fe=styled(oe)(({theme:e})=>({backgroundColor:"transparent",boxShadow:e.shadows[21],borderRadius:"0.25rem","& .MuiPaper-root":{borderRadius:"0.25rem"}})),he=styled("div")(({showDaysMenu:e})=>({height:e?"4.5rem":"auto"})),ye=styled("div")(({theme:e})=>({display:"flex",alignItems:"flex-start",justifyContent:"space-between",borderBottom:`1px solid ${e.palette.grey[100]}`,maxWidth:"9.25rem",height:"2.75rem",padding:"0.5rem",cursor:"pointer",gap:"0.31rem",flexDirection:"column",transition:"all 0.2s ease-in-out","&:hover":{boxShadow:`0px 0px 16px 0px ${alpha(e.palette.common.black,.13)}`}})),Ce=styled("img")(({spaceFromBottom:e,currencyPadding:o})=>({height:"0.4rem",width:"0.6rem",cursor:"pointer",marginBottom:e||o?"0":"auto",verticalAlign:"middle",...e&&{marginTop:"2px"}}));var Xe=({selectedCurrency:e,option:o,closeDropdown:t,handleSelectOption:i})=>{let{t:a$1}=useTranslation();return jsxs(ye,{onClick:()=>{i&&i(o.value,o?.currency),t();},children:[jsx(I,{showBottomPadding:true,showWarning:false,children:a$1(o.name)}),jsxs(ce,{children:[jsxs(v,{marginRightAuto:true,children:[jsx(a,{currencyCode:o?.currency??e,width:"0.76rem"}),jsx(A,{children:o?.currency??e})]}),jsx(me,{showWarning:false,children:Fa(o.value||0,o?.currency??e)})]})]})};function Ye({menuAnchor:e,showDropDown:o,selectedCurrency:t,options:i,closeDropdown:a,handleSelectOption:g}){return i.length<=1?null:jsx(fe,{open:o,anchorEl:e,anchorOrigin:{vertical:18,horizontal:-76},style:{backgroundColor:"transparent",zIndex:4e3,padding:0,margin:0},onClose:a,children:jsx(he,{children:i.map(f=>jsx(Fragment,{children:Xe({selectedCurrency:t,option:f,closeDropdown:a,handleSelectOption:g})}))})})}var $=Ye;function oo({showWarning:e,selectedCurrency:o,onAmountChange:t,amount:i,currencyConfig:a$2,toggleDropDown:g,showDropDown:f,showDropdownIcon:M,disabled:x,isLoading:h}){let{t:b}=useTranslation(),y=useRef(null),C=()=>{y.current&&y.current.click();};return jsxs(Fragment,{children:[jsxs(le,{children:[jsx(I,{showBottomPadding:true,showWarning:e,children:b("amount")}),jsxs(v,{limited:true,paddingTop:true,onClick:C,children:[jsx(a,{currencyCode:o,width:"0.76rem"}),jsx(A,{children:jsx(a$1,{currency:o})}),!e&&M&&jsx(Ce,{src:f?Yc:Xc,alt:"drop-down icon",currencyPadding:true})]})]}),jsx(ue,{ref:y,onClick:g}),h?jsx(r,{variant:"text",width:"100%",height:"100%"}):jsx(pe,{disabled:x,placeholder:a$2[o]?"0.000":"0.00",onValueChange:t,value:i,decimalsLimit:a$2[o]??2,showWarning:e||false,decimalScale:a$2[o]??2,autoFocus:true})]})}var B=oo;function so({anchorEl:e,initialAmount:o,options:t,onConfirm:i,handleClose:a,currency:g,isCheckMarkHighlighted:f}){let M=yc(useId(),"action-menu"),{t:x}=useTranslation(),[h$1,b]=useState(o?.toString()),[y,C]=useState(),[u,k]=useState(""),be=useRef(null),[R,E]=useState(false),[c,Se]=useState(g),j=false,[De,Ie]=useState(false),[ve,G]=useState(Oc),[Ae,K]=useState(Nc),Me=useRef(),ke=()=>{C(void 0),E(false);};useEffect(()=>{Me.current?.focus();},[De]);let Re=()=>{ke(),Ie(r=>!r);},Ee=!!e,We=r=>{E(p=>!p),C(r.currentTarget);},Pe=t?.find(r=>r.currency===c)?.value,Te$1=Fa(Pe||0,c),Oe=`${x("maxAllowed")} ${Te$1}`,Fe=`${x("minAllowed")} ${Ga(.1,c||"KWD")}`,He=r=>{let p=h(r);p>o?k(Oe):p<.1&&r!==void 0?k(Fe):k(""),b(r);},Le=(r,p)=>{let Ve=Ga(r||0,p||"KWD");b(Ve),Se(p||c);},U=r=>{C(void 0),E(false),a(r);},$e=()=>{K(Pc);},ze=()=>{K(Nc);},V=r=>{U(r);},Be=()=>{U();},je=()=>{G(Te);},Ge=()=>{G(Oc);},Ke=()=>{i?.(h(h$1),c),V();},Ue=!!u||!h$1;return createPortal(jsx(ge,{id:M,"data-testid":"ActionMenu",open:Ee,anchorEl:e,style:{backgroundColor:"transparent",zIndex:3e3},"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",anchorOrigin:{vertical:"top",horizontal:-234},ref:be,onClose:r=>{V(r);},children:jsxs(ne,{showWarning:!!u,children:[jsxs(te,{children:[jsxs(ie,{showWarning:!!u,showDropDown:R,children:[jsx(B,{showWarning:!!u,selectedCurrency:c,onAmountChange:He,amount:h$1,currencyConfig:Ea,toggleDropDown:We,showDropDown:!R,showDropdownIcon:(t?.length||0)>1}),jsx($,{showDropDown:R,menuAnchor:y,selectedCurrency:c,closeDropdown:Re,options:t??[],handleSelectOption:Le})]}),!!u&&jsxs(ae,{children:[jsx(de,{src:Mc,alt:"info"}),jsx(se,{children:u})]})]}),jsxs(re,{children:[jsx(F,{onMouseLeave:Ge,onMouseEnter:je,warning:true,role:"button",onClick:Be,children:jsx(H,{isRefundInProcess:j,src:ve,alt:"Cross icon"})}),jsx(F,{onMouseLeave:ze,onMouseEnter:$e,isRefundInProcess:j,disabled:Ue,role:"button",onClick:Ke,isHighlighted:f,children:jsx(H,{src:Ae,alt:"Check icon"})})]})]})}),document.body)}var xe=so;var jo=xe;export{$ as a,B as b,jo as c};
@@ -1 +1 @@
1
- import {b}from'./chunk-G72OV2FW.js';import {z}from'./chunk-CIKLIBPZ.js';import {yc}from'./chunk-EEIJA6B7.js';import {Rh}from'./chunk-YKKS24ES.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:Rh,alt:"close",style:{width:"8px",height:"7px"}})})]}):null}var s=memo(u);var S=s;export{S as a};
1
+ import {b}from'./chunk-MRFOSMBQ.js';import {z}from'./chunk-OBBOIKJ2.js';import {yc}from'./chunk-PLMJIRXJ.js';import {Rh}from'./chunk-YKKS24ES.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:Rh,alt:"close",style:{width:"8px",height:"7px"}})})]}):null}var s=memo(u);var S=s;export{S as a};
@@ -1 +1 @@
1
- import {r,p as p$1}from'./chunk-CIKLIBPZ.js';import {yc}from'./chunk-EEIJA6B7.js';import {useId}from'react';import p from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var u=styled(p)(({rows:e,columns:t})=>({display:"grid",gridTemplateColumns:`auto repeat(${t}, 1fr)`,gridTemplateRows:`auto repeat(${e}, 1fr)`,gap:"6px"})),$=styled(p)(()=>({width:24,position:"sticky",top:0,left:0,zIndex:3})),g=styled(p)(({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",textAlign:"center",fontSize:"10px",fontWeight:500,color:e.palette.grey[700],lineHeight:"100%",letterSpacing:"0",position:"sticky",top:0,zIndex:2,backgroundColor:"#fbfbfb"})),M=styled(p)(({theme:e,percentage:t=0})=>({width:"24px",height:"8px",borderRadius:"1px",backgroundColor:t===0?alpha(e.palette.grey[700],.1):alpha(e.palette.info.dark,t)})),O=styled(g)(()=>({fontSize:"9px",top:"auto",left:0,zIndex:1})),w=styled(p)(()=>({padding:"22px 12px",overflow:"auto",maxHeight:"480px"}));function b({xAxis:e,yAxis:t,series:n,isLoading:m,tooltip:l}){let s=yc(useId(),"heat-map"),d=e.labels,y=t.labels;return jsxs(w,{id:s,"data-testid":"HeatMap",children:[jsxs(u,{className:"x-labels",rows:1,columns:d.length,children:[jsx($,{}),d.map((r,c)=>jsx(g,{children:e.render?e.render(r):r},`x-${c}-${r}`))]}),jsx(u,{className:"y-labels",rows:y.length,columns:d.length,children:y.map((r$1,c)=>jsxs(Fragment,{children:[jsx(O,{sx:{minWidth:"25px"},children:t.render?t.render(r$1):r$1},`y-${c}-${r$1}`),d.map((i,h)=>{if(m)return jsx(r,{variant:"rectangular",width:"24px",height:"8px"},`${i}-${h}`);let f=n?.[i]?.[r$1]??{};return jsx(p$1,{title:l?.render&&f?.value?l.render(f,i,r$1):null,children:jsx(M,{percentage:f?.colorOpacityDegree})},`${i}-${h}`)})]}))})]})}var H=[.06,.1,.2,.3,.4,.5,.6,.7,.8,.9,1];function D(e,t,n){if(t===n)return 0;let m=n-t,l=(e-t)/m,s=Math.floor(l*10);return H[Math.max(0,Math.min(10,s))]}var q=b;export{D as a,q as b};
1
+ import {r,p as p$1}from'./chunk-OBBOIKJ2.js';import {yc}from'./chunk-PLMJIRXJ.js';import {useId}from'react';import p from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var u=styled(p)(({rows:e,columns:t})=>({display:"grid",gridTemplateColumns:`auto repeat(${t}, 1fr)`,gridTemplateRows:`auto repeat(${e}, 1fr)`,gap:"6px"})),$=styled(p)(()=>({width:24,position:"sticky",top:0,left:0,zIndex:3})),g=styled(p)(({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",textAlign:"center",fontSize:"10px",fontWeight:500,color:e.palette.grey[700],lineHeight:"100%",letterSpacing:"0",position:"sticky",top:0,zIndex:2,backgroundColor:"#fbfbfb"})),M=styled(p)(({theme:e,percentage:t=0})=>({width:"24px",height:"8px",borderRadius:"1px",backgroundColor:t===0?alpha(e.palette.grey[700],.1):alpha(e.palette.info.dark,t)})),O=styled(g)(()=>({fontSize:"9px",top:"auto",left:0,zIndex:1})),w=styled(p)(()=>({padding:"22px 12px",overflow:"auto",maxHeight:"480px"}));function b({xAxis:e,yAxis:t,series:n,isLoading:m,tooltip:l}){let s=yc(useId(),"heat-map"),d=e.labels,y=t.labels;return jsxs(w,{id:s,"data-testid":"HeatMap",children:[jsxs(u,{className:"x-labels",rows:1,columns:d.length,children:[jsx($,{}),d.map((r,c)=>jsx(g,{children:e.render?e.render(r):r},`x-${c}-${r}`))]}),jsx(u,{className:"y-labels",rows:y.length,columns:d.length,children:y.map((r$1,c)=>jsxs(Fragment,{children:[jsx(O,{sx:{minWidth:"25px"},children:t.render?t.render(r$1):r$1},`y-${c}-${r$1}`),d.map((i,h)=>{if(m)return jsx(r,{variant:"rectangular",width:"24px",height:"8px"},`${i}-${h}`);let f=n?.[i]?.[r$1]??{};return jsx(p$1,{title:l?.render&&f?.value?l.render(f,i,r$1):null,children:jsx(M,{percentage:f?.colorOpacityDegree})},`${i}-${h}`)})]}))})]})}var H=[.06,.1,.2,.3,.4,.5,.6,.7,.8,.9,1];function D(e,t,n){if(t===n)return 0;let m=n-t,l=(e-t)/m,s=Math.floor(l*10);return H[Math.max(0,Math.min(10,s))]}var q=b;export{D as a,q as b};
@@ -1 +1 @@
1
- import {j as j$1}from'./chunk-CIKLIBPZ.js';import {yc}from'./chunk-EEIJA6B7.js';import {Xc,Cb}from'./chunk-YKKS24ES.js';import {memo,useId}from'react';import n from'@mui/material/Box';import W from'@mui/material/Popover';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var x=styled(n,{shouldForwardProp:o=>o!=="open"&&o!=="disabled"})(({theme:o,open:e,disabled:r})=>({display:"flex",alignItems:"center",justifyContent:"space-between",paddingInlineStart:"8px",paddingInlineEnd:"4px",paddingTop:"6px",paddingBottom:"6px",borderRadius:"4px",background:"#F9F9F9",border:"1px solid #F9F9F9",cursor:"pointer",...e&&{borderColor:o.palette.info.dark,background:o.palette.common.white},...r&&{cursor:"not-allowed"}})),s=styled(n)(()=>({display:"flex",flexDirection:"column",gap:"4px",fontSize:"10px",fontWeight:500,flex:1})),c=styled(n)(({theme:o})=>({padding:"4px",borderRadius:"4px",boxShadow:"-26px 156px 44px 0px rgba(0, 0, 0, 0.00), -17px 100px 41px 0px rgba(0, 0, 0, 0.01), -9px 56px 34px 0px rgba(0, 0, 0, 0.05), -4px 25px 25px 0px rgba(0, 0, 0, 0.09), -1px 6px 14px 0px rgba(0, 0, 0, 0.10), 0px 0px 0px 0px rgba(0, 0, 0, 0.10)",backgroundColor:o.palette.common.white,maxHeight:200,marginTop:"4px",width:"auto",overflow:"auto"}));styled(j$1,{shouldForwardProp:o=>o!=="selected"})(({selected:o})=>({paddingInlineStart:"12px",paddingInlineEnd:"8px",paddingTop:"8px",paddingBottom:"8px",fontSize:"10px",color:"#000",fontWeight:500,lineHeight:"10px",cursor:"pointer",...o&&{backgroundColor:"#F8F8F8"}}));function H({onClose:o,open:e,anchorEl:r,trigger:b,onOpen:f,children:h,disabled:u}){let w=yc(useId(),"account-dropdown");return jsxs(x,{id:w,open:e,onClick:f,"data-testid":"Dropdown",disabled:u,children:[jsx(s,{children:b}),jsx(n,{sx:{width:16,height:16,display:"flex",alignItems:"center"},children:jsx(n,{component:"img",src:e?Xc:Cb,alt:"arrow",sx:{width:16,height:16,...e&&{width:12,height:12,padding:"2px"}}})}),jsx(W,{open:e,anchorEl:r,sx:{width:r?.clientWidth},onClose:o,anchorOrigin:{vertical:"bottom",horizontal:"left"},slotProps:{paper:{style:{width:r?.clientWidth,maxWidth:"unset"}}},children:jsx(c,{children:h})})]})}var g=memo(H);var j=g;export{j as a};
1
+ import {j as j$1}from'./chunk-OBBOIKJ2.js';import {yc}from'./chunk-PLMJIRXJ.js';import {Xc,Cb}from'./chunk-YKKS24ES.js';import {memo,useId}from'react';import n from'@mui/material/Box';import W from'@mui/material/Popover';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var x=styled(n,{shouldForwardProp:o=>o!=="open"&&o!=="disabled"})(({theme:o,open:e,disabled:r})=>({display:"flex",alignItems:"center",justifyContent:"space-between",paddingInlineStart:"8px",paddingInlineEnd:"4px",paddingTop:"6px",paddingBottom:"6px",borderRadius:"4px",background:"#F9F9F9",border:"1px solid #F9F9F9",cursor:"pointer",...e&&{borderColor:o.palette.info.dark,background:o.palette.common.white},...r&&{cursor:"not-allowed"}})),s=styled(n)(()=>({display:"flex",flexDirection:"column",gap:"4px",fontSize:"10px",fontWeight:500,flex:1})),c=styled(n)(({theme:o})=>({padding:"4px",borderRadius:"4px",boxShadow:"-26px 156px 44px 0px rgba(0, 0, 0, 0.00), -17px 100px 41px 0px rgba(0, 0, 0, 0.01), -9px 56px 34px 0px rgba(0, 0, 0, 0.05), -4px 25px 25px 0px rgba(0, 0, 0, 0.09), -1px 6px 14px 0px rgba(0, 0, 0, 0.10), 0px 0px 0px 0px rgba(0, 0, 0, 0.10)",backgroundColor:o.palette.common.white,maxHeight:200,marginTop:"4px",width:"auto",overflow:"auto"}));styled(j$1,{shouldForwardProp:o=>o!=="selected"})(({selected:o})=>({paddingInlineStart:"12px",paddingInlineEnd:"8px",paddingTop:"8px",paddingBottom:"8px",fontSize:"10px",color:"#000",fontWeight:500,lineHeight:"10px",cursor:"pointer",...o&&{backgroundColor:"#F8F8F8"}}));function H({onClose:o,open:e,anchorEl:r,trigger:b,onOpen:f,children:h,disabled:u}){let w=yc(useId(),"account-dropdown");return jsxs(x,{id:w,open:e,onClick:f,"data-testid":"Dropdown",disabled:u,children:[jsx(s,{children:b}),jsx(n,{sx:{width:16,height:16,display:"flex",alignItems:"center"},children:jsx(n,{component:"img",src:e?Xc:Cb,alt:"arrow",sx:{width:16,height:16,...e&&{width:12,height:12,padding:"2px"}}})}),jsx(W,{open:e,anchorEl:r,sx:{width:r?.clientWidth},onClose:o,anchorOrigin:{vertical:"bottom",horizontal:"left"},slotProps:{paper:{style:{width:r?.clientWidth,maxWidth:"unset"}}},children:jsx(c,{children:h})})]})}var g=memo(H);var j=g;export{j as a};
@@ -1 +1 @@
1
- import {a}from'./chunk-QJOKZDD2.js';import {yc,$b}from'./chunk-EEIJA6B7.js';import {Di,Ak,ja,Ud,Vj,E,nl,C,vb}from'./chunk-YKKS24ES.js';import {useId,useMemo,useState,useCallback}from'react';import {useTranslation}from'react-i18next';import b from'@mui/material/Box';import V from'@mui/material/Popper';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var L=styled(b)(({theme:n})=>({background:n.palette.common.white,borderRadius:"4px",filter:"drop-shadow(0px 8px 30px rgba(0, 0, 0, 0.16))",minWidth:148,width:"max-content",marginTop:"8px"})),l=styled(b,{shouldForwardProp:n=>n!=="open"})(({theme:n,open:s})=>({display:"flex",alignItems:"center",justifyContent:"space-between",height:32,padding:"8px 8px 8px 12px",cursor:"pointer",fontSize:"11px",fontWeight:500,color:n.palette.text.primary,"&:hover":{boxShadow:n.shadows[3]},...s&&{boxShadow:n.shadows[3]}})),u=styled(b)(()=>({display:"flex",alignItems:"center",gap:"8px"})),d=styled("img")(()=>({width:16,height:16,objectFit:"contain"})),$=styled(b)(()=>({height:27,display:"flex",alignItems:"center",padding:"0 12px",fontFamily:"Tap Sans",fontWeight:500,fontSize:"11px",lineHeight:"100%",letterSpacing:"0%",color:"#8D8D94",pointerEvents:"none",userSelect:"none"}));var F={refund:nl,flag:E,viewReceipt:Vj,viewApi:Ud,capture:ja,void:Ak,clipboard:Di};var X=({anchorEl:n,onClose:s,actions:h=[],linkedActions:M=[]})=>{let v=yc(useId(),"actions-dropdown-menu"),{t:E}=useTranslation(),I=!!n,f=useMemo(()=>h.filter(e=>e.isShown!==false),[h]),g=useMemo(()=>M.filter(e=>e.isShown!==false),[M]);return I?jsxs(b,{id:v,"data-testid":"ActionsDropdownMenu",children:[jsx(a,{onClick:s}),jsx(V,{open:I,anchorEl:n,placement:"bottom-end",sx:{zIndex:1e3},children:jsxs(L,{children:[f.map((e,r)=>jsx(l,{onClick:p=>{p.stopPropagation(),e.onClick?.(p);},sx:r===f.length-1&&g.length>0?{borderBottom:"1px solid",borderColor:"divider"}:void 0,children:jsxs(u,{children:[jsx(d,{src:F[e.icon]??e.icon??C,alt:"action-icon"}),jsx("span",{children:e.label})]})},`direct-${r}`)),g.length>0&&jsx($,{children:E("linkedActions")}),g.map(({render:e,icon:r,label:p,onClick:T,onRightClick:i},c)=>{let m=e?.();return e&&!m?null:m?jsx(b,{children:m},`linked-${c}`):jsxs(l,{onClick:a=>{a.stopPropagation(),T?.(a),s();},onContextMenu:i?a=>{i(a);}:void 0,children:[jsxs(u,{children:[r&&jsx(d,{src:r,alt:"linked-action-icon"}),jsx("span",{children:p})]}),jsx("img",{src:vb,alt:""})]},`linked-${c}`)})]})})]}):null};var ne=({appCode:n,appIcon:s,appName:h,appInfo:M,menuItems:v})=>{let[E,I]=useState(null),f=!!E,g=useCallback(i=>{let c=i.currentTarget.firstElementChild;I(c);},[]),e=useCallback(()=>{I(null);},[]),r=useMemo(()=>v?.filter(({isShown:i=true})=>i),[v]);if(!r?.length)return null;let p=M?.iconUrl??s,T=$b(M?.name)??h;return jsxs(b,{onMouseEnter:g,onMouseLeave:e,children:[jsxs(l,{open:f,children:[jsxs(u,{children:[p&&jsx(d,{src:p,alt:"app"}),jsx("span",{children:T})]}),jsx("img",{src:vb,alt:""})]}),jsx(V,{open:f,anchorEl:E,placement:"left-start",sx:{zIndex:1301},children:jsx(L,{sx:{marginTop:0},children:r.map(({render:i,label:c,icon:m,onClick:a,onContextMenu:k},J)=>jsx(b,{children:i?.()??jsx(l,{onClick:C=>{C.stopPropagation(),a?.(C);},onContextMenu:k?C=>{k(C);}:void 0,children:jsxs(u,{children:[m&&jsx(d,{src:m,alt:"icon"}),jsx("span",{children:c})]})})},`app-${J}`))})})]})};export{X as a,ne as b};
1
+ import {a}from'./chunk-4QONVXGE.js';import {yc,$b}from'./chunk-PLMJIRXJ.js';import {Di,Ak,ja,Ud,Vj,E,nl,C,vb}from'./chunk-YKKS24ES.js';import {useId,useMemo,useState,useCallback}from'react';import {useTranslation}from'react-i18next';import b from'@mui/material/Box';import V from'@mui/material/Popper';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var L=styled(b)(({theme:n})=>({background:n.palette.common.white,borderRadius:"4px",filter:"drop-shadow(0px 8px 30px rgba(0, 0, 0, 0.16))",minWidth:148,width:"max-content",marginTop:"8px"})),l=styled(b,{shouldForwardProp:n=>n!=="open"})(({theme:n,open:s})=>({display:"flex",alignItems:"center",justifyContent:"space-between",height:32,padding:"8px 8px 8px 12px",cursor:"pointer",fontSize:"11px",fontWeight:500,color:n.palette.text.primary,"&:hover":{boxShadow:n.shadows[3]},...s&&{boxShadow:n.shadows[3]}})),u=styled(b)(()=>({display:"flex",alignItems:"center",gap:"8px"})),d=styled("img")(()=>({width:16,height:16,objectFit:"contain"})),$=styled(b)(()=>({height:27,display:"flex",alignItems:"center",padding:"0 12px",fontFamily:"Tap Sans",fontWeight:500,fontSize:"11px",lineHeight:"100%",letterSpacing:"0%",color:"#8D8D94",pointerEvents:"none",userSelect:"none"}));var F={refund:nl,flag:E,viewReceipt:Vj,viewApi:Ud,capture:ja,void:Ak,clipboard:Di};var X=({anchorEl:n,onClose:s,actions:h=[],linkedActions:M=[]})=>{let v=yc(useId(),"actions-dropdown-menu"),{t:E}=useTranslation(),I=!!n,f=useMemo(()=>h.filter(e=>e.isShown!==false),[h]),g=useMemo(()=>M.filter(e=>e.isShown!==false),[M]);return I?jsxs(b,{id:v,"data-testid":"ActionsDropdownMenu",children:[jsx(a,{onClick:s}),jsx(V,{open:I,anchorEl:n,placement:"bottom-end",sx:{zIndex:1e3},children:jsxs(L,{children:[f.map((e,r)=>jsx(l,{onClick:p=>{p.stopPropagation(),e.onClick?.(p);},sx:r===f.length-1&&g.length>0?{borderBottom:"1px solid",borderColor:"divider"}:void 0,children:jsxs(u,{children:[jsx(d,{src:F[e.icon]??e.icon??C,alt:"action-icon"}),jsx("span",{children:e.label})]})},`direct-${r}`)),g.length>0&&jsx($,{children:E("linkedActions")}),g.map(({render:e,icon:r,label:p,onClick:T,onRightClick:i},c)=>{let m=e?.();return e&&!m?null:m?jsx(b,{children:m},`linked-${c}`):jsxs(l,{onClick:a=>{a.stopPropagation(),T?.(a),s();},onContextMenu:i?a=>{i(a);}:void 0,children:[jsxs(u,{children:[r&&jsx(d,{src:r,alt:"linked-action-icon"}),jsx("span",{children:p})]}),jsx("img",{src:vb,alt:""})]},`linked-${c}`)})]})})]}):null};var ne=({appCode:n,appIcon:s,appName:h,appInfo:M,menuItems:v})=>{let[E,I]=useState(null),f=!!E,g=useCallback(i=>{let c=i.currentTarget.firstElementChild;I(c);},[]),e=useCallback(()=>{I(null);},[]),r=useMemo(()=>v?.filter(({isShown:i=true})=>i),[v]);if(!r?.length)return null;let p=M?.iconUrl??s,T=$b(M?.name)??h;return jsxs(b,{onMouseEnter:g,onMouseLeave:e,children:[jsxs(l,{open:f,children:[jsxs(u,{children:[p&&jsx(d,{src:p,alt:"app"}),jsx("span",{children:T})]}),jsx("img",{src:vb,alt:""})]}),jsx(V,{open:f,anchorEl:E,placement:"left-start",sx:{zIndex:1301},children:jsx(L,{sx:{marginTop:0},children:r.map(({render:i,label:c,icon:m,onClick:a,onContextMenu:k},J)=>jsx(b,{children:i?.()??jsx(l,{onClick:C=>{C.stopPropagation(),a?.(C);},onContextMenu:k?C=>{k(C);}:void 0,children:jsxs(u,{children:[m&&jsx(d,{src:m,alt:"icon"}),jsx("span",{children:c})]})})},`app-${J}`))})})]})};export{X as a,ne as b};
@@ -1 +1 @@
1
- import {b}from'./chunk-3VCDLYKF.js';import {yc}from'./chunk-EEIJA6B7.js';import {useId}from'react';import {styled,Box}from'@mui/material';import {jsx}from'react/jsx-runtime';var r=styled(Box)(()=>({display:"flex",gap:"4px",alignItems:"center",flexDirection:"row"})),i=styled(b)(()=>({padding:"0.75px 12px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"flex",alignItems:"center",gap:"4px"}));var x=({chips:t,containerSx:a,defaultChipSx:n,...l})=>{let u=yc(useId(),"status-group-chips");return !t||t.length===0?null:jsx(r,{id:u,"data-testid":"StatusGroupChips",sx:a,...l,children:t.map(({key:d,content:C,sx:f,...m})=>jsx(i,{sx:{...n,...f},...m,children:C},d))})},y=x;export{y as a};
1
+ import {b}from'./chunk-AWNFVAW7.js';import {yc}from'./chunk-PLMJIRXJ.js';import {useId}from'react';import {styled,Box}from'@mui/material';import {jsx}from'react/jsx-runtime';var r=styled(Box)(()=>({display:"flex",gap:"4px",alignItems:"center",flexDirection:"row"})),i=styled(b)(()=>({padding:"0.75px 12px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"flex",alignItems:"center",gap:"4px"}));var x=({chips:t,containerSx:a,defaultChipSx:n,...l})=>{let u=yc(useId(),"status-group-chips");return !t||t.length===0?null:jsx(r,{id:u,"data-testid":"StatusGroupChips",sx:a,...l,children:t.map(({key:d,content:C,sx:f,...m})=>jsx(i,{sx:{...n,...f},...m,children:C},d))})},y=x;export{y as a};
@@ -1 +1 @@
1
- import {yc}from'./chunk-EEIJA6B7.js';import {useId}from'react';import d from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var n=styled(d)(()=>({color:"#1F88D0",backgroundColor:"#1F88D00D",padding:"8px 12px",borderRadius:"4px",fontSize:"11px",display:"flex",alignItems:"center",gap:"2px"})),r=styled("span")(()=>({fontWeight:700})),a=styled("span")(()=>({fontWeight:500}));function t(){let i=yc(useId(),"beta-banner");return jsxs(n,{id:i,"data-testid":"BetaBanner",children:[jsx(r,{children:"Insights is in beta -"}),jsx(a,{children:"improvements are ongoing, thanks for your patience."})]})}var C=t;export{C as a};
1
+ import {yc}from'./chunk-PLMJIRXJ.js';import {useId}from'react';import d from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var n=styled(d)(()=>({color:"#1F88D0",backgroundColor:"#1F88D00D",padding:"8px 12px",borderRadius:"4px",fontSize:"11px",display:"flex",alignItems:"center",gap:"2px"})),r=styled("span")(()=>({fontWeight:700})),a=styled("span")(()=>({fontWeight:500}));function t(){let i=yc(useId(),"beta-banner");return jsxs(n,{id:i,"data-testid":"BetaBanner",children:[jsx(r,{children:"Insights is in beta -"}),jsx(a,{children:"improvements are ongoing, thanks for your patience."})]})}var C=t;export{C as a};
@@ -1 +1 @@
1
- import {T,S,b as b$1}from'./chunk-CIKLIBPZ.js';import {forwardRef,memo,createContext,useState,useRef,useCallback,useMemo,useContext}from'react';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var u=styled(T)(({theme:o})=>({[`& .${S.title}`]:{fontSize:"13px",fontWeight:700,lineHeight:o.typography.h6.lineHeight,borderBottom:`1px solid ${o.palette.divider}`,margin:0,padding:"16px 16px 16px 12px",color:o.palette.text.primary}})),x=styled("div")(({theme:o})=>({display:"flex",flexDirection:"column",gap:o.spacing(2),minWidth:"256px",padding:o.spacing(2)})),d=styled(b$1)(({theme:o})=>({paddingInline:o.spacing(3),paddingBlock:o.spacing(1),borderRadius:o.spacing(.5),minWidth:64,fontSize:"11px",fontWeight:o.typography.fontWeightMedium,color:o.palette.text.primary,textTransform:"none",border:`1px solid ${o.palette.divider}`,boxShadow:"none","&:hover":{boxShadow:"none",backgroundColor:o.palette.action.hover}})),y=styled("p")(({theme:o})=>({margin:0,fontSize:o.typography.fontSize,fontWeight:o.typography.fontWeightMedium,lineHeight:o.typography.body1.lineHeight})),D=styled("div")(({theme:o})=>({display:"flex",gap:o.spacing(1),justifyContent:"flex-end"}));var v=forwardRef(({message:o,title:t,confirmText:a,cancelText:i,onConfirm:r,onCancel:s,className:m,sx:e,...n},T)=>jsx(u,{ref:T,"data-testid":"ConfirmDialog",heading:t,className:m,sx:e,...n,children:jsxs(x,{children:[jsx(y,{children:o}),jsxs(D,{children:[jsx(d,{variant:"ghost",onClick:s,children:i||"No"}),jsx(d,{variant:"ghost",onClick:r,children:a||"Yes"})]})]})}));v.displayName="ConfirmDialog";var b=memo(v);var p=createContext(null);function W(){let o=useContext(p);if(!o)throw new Error("useConfirm must be used within <ConfirmDialogProvider>");return o}var R={open:false,message:null,title:void 0,confirmText:void 0,cancelText:void 0,sx:void 0,dismissible:true};function z({children:o}){let[t,a]=useState(R),i=useRef(null),r=useCallback(e=>{let n=i.current;n&&(i.current=null,a(R),n(e));},[]),s=useCallback(e=>new Promise(n=>{i.current?.(false),i.current=n,a({open:true,dismissible:e.dismissible??true,message:e.message,title:e.title,confirmText:e.confirmText,cancelText:e.cancelText,sx:e.sx});}),[]),m=useMemo(()=>({confirm:s}),[s]);return jsxs(p.Provider,{value:m,children:[o,jsx(b,{open:t.open,message:t.message,title:t.title,confirmText:t.confirmText,cancelText:t.cancelText,onConfirm:()=>r(true),onCancel:()=>r(false),onClose:t.dismissible?()=>r(false):void 0,sx:t.sx})]})}var O=memo(z);export{W as a,O as b};
1
+ import {T,S,b as b$1}from'./chunk-OBBOIKJ2.js';import {forwardRef,memo,createContext,useState,useRef,useCallback,useMemo,useContext}from'react';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var u=styled(T)(({theme:o})=>({[`& .${S.title}`]:{fontSize:"13px",fontWeight:700,lineHeight:o.typography.h6.lineHeight,borderBottom:`1px solid ${o.palette.divider}`,margin:0,padding:"16px 16px 16px 12px",color:o.palette.text.primary}})),x=styled("div")(({theme:o})=>({display:"flex",flexDirection:"column",gap:o.spacing(2),minWidth:"256px",padding:o.spacing(2)})),d=styled(b$1)(({theme:o})=>({paddingInline:o.spacing(3),paddingBlock:o.spacing(1),borderRadius:o.spacing(.5),minWidth:64,fontSize:"11px",fontWeight:o.typography.fontWeightMedium,color:o.palette.text.primary,textTransform:"none",border:`1px solid ${o.palette.divider}`,boxShadow:"none","&:hover":{boxShadow:"none",backgroundColor:o.palette.action.hover}})),y=styled("p")(({theme:o})=>({margin:0,fontSize:o.typography.fontSize,fontWeight:o.typography.fontWeightMedium,lineHeight:o.typography.body1.lineHeight})),D=styled("div")(({theme:o})=>({display:"flex",gap:o.spacing(1),justifyContent:"flex-end"}));var v=forwardRef(({message:o,title:t,confirmText:a,cancelText:i,onConfirm:r,onCancel:s,className:m,sx:e,...n},T)=>jsx(u,{ref:T,"data-testid":"ConfirmDialog",heading:t,className:m,sx:e,...n,children:jsxs(x,{children:[jsx(y,{children:o}),jsxs(D,{children:[jsx(d,{variant:"ghost",onClick:s,children:i||"No"}),jsx(d,{variant:"ghost",onClick:r,children:a||"Yes"})]})]})}));v.displayName="ConfirmDialog";var b=memo(v);var p=createContext(null);function W(){let o=useContext(p);if(!o)throw new Error("useConfirm must be used within <ConfirmDialogProvider>");return o}var R={open:false,message:null,title:void 0,confirmText:void 0,cancelText:void 0,sx:void 0,dismissible:true};function z({children:o}){let[t,a]=useState(R),i=useRef(null),r=useCallback(e=>{let n=i.current;n&&(i.current=null,a(R),n(e));},[]),s=useCallback(e=>new Promise(n=>{i.current?.(false),i.current=n,a({open:true,dismissible:e.dismissible??true,message:e.message,title:e.title,confirmText:e.confirmText,cancelText:e.cancelText,sx:e.sx});}),[]),m=useMemo(()=>({confirm:s}),[s]);return jsxs(p.Provider,{value:m,children:[o,jsx(b,{open:t.open,message:t.message,title:t.title,confirmText:t.confirmText,cancelText:t.cancelText,onConfirm:()=>r(true),onCancel:()=>r(false),onClose:t.dismissible?()=>r(false):void 0,sx:t.sx})]})}var O=memo(z);export{W as a,O as b};
@@ -1 +1 @@
1
- import {a}from'./chunk-MSQE22CO.js';import {yc}from'./chunk-EEIJA6B7.js';import {memo,useId,useMemo}from'react';import {jsx}from'react/jsx-runtime';var m=({chipIndex:i,rowIndex:r,colIndex:t,selectedId:s})=>{let[,e,o,p]=(s??"").split("-");return Number(e)===r&&Number(o)===t&&Number(p)===i};function x({children:i,copyText:r,chipIndex:t,selectionProps:{onClick:s,rowIndex:e,colIndex:o,selectedId:p},...l}){let h=yc(useId(),"status-chip-with-copy"),d=useMemo(()=>m({rowIndex:e,colIndex:o,selectedId:p,chipIndex:t}),[e,o,p,t]);return jsx(a,{...l,id:h,"data-testid":"StatusChipWithCopy",copyText:r,onClick:C=>{s?.(C,t);},isSelected:d,children:i})}var u=memo(x);var M=u;export{m as a,M as b};
1
+ import {a}from'./chunk-3Q5OZQPU.js';import {yc}from'./chunk-PLMJIRXJ.js';import {memo,useId,useMemo}from'react';import {jsx}from'react/jsx-runtime';var m=({chipIndex:i,rowIndex:r,colIndex:t,selectedId:s})=>{let[,e,o,p]=(s??"").split("-");return Number(e)===r&&Number(o)===t&&Number(p)===i};function x({children:i,copyText:r,chipIndex:t,selectionProps:{onClick:s,rowIndex:e,colIndex:o,selectedId:p},...l}){let h=yc(useId(),"status-chip-with-copy"),d=useMemo(()=>m({rowIndex:e,colIndex:o,selectedId:p,chipIndex:t}),[e,o,p,t]);return jsx(a,{...l,id:h,"data-testid":"StatusChipWithCopy",copyText:r,onClick:C=>{s?.(C,t);},isSelected:d,children:i})}var u=memo(x);var M=u;export{m as a,M as b};
@@ -1 +1 @@
1
- import {v}from'./chunk-CIKLIBPZ.js';import {yc,Ba,Ca}from'./chunk-EEIJA6B7.js';import {Eb,Vc}from'./chunk-YKKS24ES.js';import mo,{useId,useState,useRef,useCallback,useEffect,useMemo}from'react';import B from'@mui/material/Box';import uo from'@mui/material/ClickAwayListener';import ro from'@mui/material/Stack';import Y from'@mui/material/Typography';import {styled,alpha}from'@mui/material/styles';import O from'@mui/material/Button';import lo from'@mui/material/TextField';import po from'@mui/material/MenuList';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {useTranslation}from'react-i18next';import {RgbColorPicker,RgbaColorPicker}from'react-colorful';import fo from'@mui/material/Popper';import J from'@mui/material/MenuItem';import j from'@mui/material/InputAdornment';import v$1 from'color';import {Popper}from'@mui/material';var G=styled("button")({background:"transparent",border:"none",padding:0,margin:0,cursor:"pointer",width:10,height:10,display:"flex",justifyContent:"center",alignItems:"center","&:disabled, &.Mui-disabled":{opacity:.5,cursor:"not-allowed"}}),D=styled(B)(({theme:o})=>({boxShadow:"0px 8px 30px rgba(0, 0, 0, 0.16)",width:264,backgroundColor:"#ffffff",padding:"12px",borderRadius:o.spacing(1),"& .react-colorful":{width:"100%","&__saturation":{minHeight:152,borderRadius:"4px",marginBottom:o.spacing(2),border:0,"&-pointer":{width:13,height:13}},"&__hue":{borderRadius:"4px",height:"8px","&-pointer":{width:10,height:10}},"&__alpha":{marginTop:o.spacing(2),marginBottom:0,border:0,borderRadius:"4px",height:"8px","&-pointer":{width:10,height:10}}}})),V=styled(B)(()=>({display:"flex",gap:"8px",justifyContent:"flex-end"})),X=styled(o=>jsx(Y,{...o,component:"button"}))(({theme:o})=>({fontWeight:500,fontSize:"9px",color:o.palette.info.dark,textDecoration:"underline",cursor:"pointer",background:"transparent",border:"none",padding:0,margin:0,"&:disabled, &.Mui-disabled":{color:alpha(o.palette.info.dark,.5),textDecoration:"none"},"&:hover":{textDecoration:"none"}})),$=styled(O)(({theme:o})=>({textTransform:"capitalize",minWidth:"auto",width:74,borderRadius:"4px",border:`1px solid ${o.palette.info.dark}`,backgroundColor:o.palette.info.dark,fontWeight:700,fontSize:"11px",color:o.palette.common.white,"&:hover":{backgroundColor:o.palette.info.dark}})),U=styled(O)(({theme:o})=>({textTransform:"capitalize",minWidth:"auto",width:74,borderRadius:"4px",border:`1px solid ${o.palette.divider}`,backgroundColor:o.palette.common.white,fontWeight:500,fontSize:"11px",color:o.palette.text.primary,"&:hover":{background:"transparent"}})),Z=styled(B,{shouldForwardProp:o=>o!=="active"})(({theme:o,active:s})=>({display:"flex",justifyContent:"space-between",alignItems:"center",color:o.palette.text.primary,border:"1px solid #F2F2F2",fontSize:12,fontWeight:500,backgroundColor:"transparent",padding:"4px 8px",borderRadius:"4px",minWidth:70,cursor:"pointer",...s&&{border:"1px solid #1F88D0",boxShadow:"0px 0px 4px 0px #1F88D080"}})),q=styled(po)({backgroundColor:"#ffffff",borderRadius:"4px",boxShadow:"0px 8px 30px 0px #00000029",minWidth:70,"& .MuiMenuItem-root":{fontSize:12,fontWeight:500,padding:"4px 8px"}}),x=styled(lo)(({theme:o})=>({"& .MuiOutlinedInput-root":{fontSize:"12px",fontWeight:500,borderRadius:"4px","& input":{padding:"4px","&::-webkit-outer-spin-button, &::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0},"&[type=number]":{MozAppearance:"textfield"}},"& .MuiOutlinedInput-notchedOutline":{borderColor:o.palette.divider,borderWidth:"1px"},"&:hover, &.Mui-focused":{"& .MuiOutlinedInput-notchedOutline":{borderColor:o.palette.divider,borderWidth:"1px"}}}}));var ho=({scheme:o,setScheme:s})=>{let[n,r]=mo.useState(null),m=!!n,a=useCallback(c=>{r(n?null:c.currentTarget);},[n]),i=useCallback(()=>{r(null);},[]),d=useCallback(c=>{i(),s(c);},[i,s]);return jsxs(Fragment,{children:[jsxs(Z,{component:"button",active:m,onClick:a,children:[o,jsx(B,{component:"img",sx:{transform:m?"rotateZ(180deg)":"rotateZ(0)",transition:"200ms transform ease-out"},src:Vc})]}),jsx(fo,{anchorEl:n,open:!!n,placement:"bottom",disablePortal:true,keepMounted:true,modifiers:[{name:"offset",options:{offset:[0,4]}}],children:jsx(uo,{onClickAway:c=>{n?.contains(c.target)||i();},children:jsxs(q,{children:[jsx(J,{onClick:()=>d("RGB"),children:"RGB"}),jsx(J,{onClick:()=>d("HEX"),children:"HEX"})]})})})]})},K=ho;var Ro=({value:o,onChange:s,disableAlpha:n=false})=>{let[r,m]=useState(o),{r:a,g:i,b:d,a:c}=r;useEffect(()=>{m(o);},[o]);let u=useCallback((l,f)=>(isNaN(l)&&(l=0),l<0&&(l=0),l>f&&(l=f),console.log("num",l),l),[]),t=useCallback((l,f)=>P=>{m({...r,[l]:u(+P.target.value,f)});},[r,u]),e=useCallback((l,f)=>{s({...r,[l]:u(r[l],f)});},[s,r,u]);return jsxs(ro,{direction:"row",spacing:1,...n&&{flex:1},children:[jsx(x,{type:"number",value:a,onBlur:()=>e("r",255),onChange:t("r",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...n&&{sx:{flex:1}}}),jsx(x,{type:"number",value:i,onBlur:()=>e("g",255),onChange:t("g",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...n&&{sx:{flex:1}}}),jsx(x,{type:"number",value:d,onBlur:()=>e("b",255),onChange:t("b",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...n&&{sx:{flex:1}}}),!n&&jsx(x,{type:"number",value:c,onBlur:()=>e("a",100),onChange:t("a",100),inputProps:{min:0,max:100,style:{textAlign:"center"}},variant:"outlined",sx:{"& .MuiOutlinedInput-root":{pr:1}},InputProps:{endAdornment:jsx(j,{position:"end",sx:{m:0},children:jsx(Y,{component:"span",display:"inline-block",fontSize:12,fontWeight:500,children:"%"})})},size:"small"})]})},Q=Ro;var vo=({value:o,onChange:s,disableAlpha:n=false})=>{let r=useMemo(()=>v$1.rgb(o.r,o.g,o.b,o.a).hex().replace("#",""),[o]),[m,a]=useState(r),i=Math.round(o.a*100);return useEffect(()=>{let t=v$1.rgb(o.r,o.g,o.b).hex().replace("#","");a(t);},[o.r,o.g,o.b]),jsxs(ro,{direction:"row",spacing:1,alignItems:"flex-start",children:[jsx(x,{value:m,onChange:t=>{let e=t.target.value.replace(/[^0-9a-fA-F]/g,"").toUpperCase();e.length>6&&(e=e.slice(0,6)),a(e);},onBlur:()=>{let t=m;if(t.length===3&&(t=t.split("").map(e=>e+e).join(""),a(t)),t.length===6)try{let e=v$1(`#${t}`).alpha(o.a);s({r:e.red(),g:e.green(),b:e.blue(),a:e.alpha()});}catch{a(r);}else a(r);},placeholder:"FFFFFF",sx:{flex:1.4,"& .MuiOutlinedInput-root":{pl:1}},InputProps:{startAdornment:jsx(j,{position:"start",sx:{m:0},children:jsx(Y,{component:"span",color:t=>alpha(t.palette.text.primary,.5),display:"inline-block",fontSize:12,fontWeight:500,children:"#"})})}}),!n&&jsx(x,{type:"number",value:i,onChange:t=>{let e=parseInt(t.target.value,10);isNaN(e)&&(e=0),e<0&&(e=0),e>100&&(e=100),s({...o,a:e/100});},inputProps:{min:0,max:100},sx:{flex:.8,"& .MuiOutlinedInput-root":{pr:1}},InputProps:{endAdornment:jsx(j,{position:"end",sx:{m:0},children:jsx(Y,{component:"span",color:"text.primary",display:"inline-block",fontSize:12,fontWeight:500,children:"%"})})}})]})},oo=vo;var Wo=({initialValue:o="#ffffff",onCancel:s,onConfirm:n,disableAlpha:r=false})=>{let[m,a]=useState("RGB"),[i,d]=useState(()=>{let{alpha:p,...y}=Ba(o).value;return {...y,a:p}}),{t:c}=useTranslation(),u=useCallback(()=>{let{alpha:p,...y}=Ba(o).value;d({...y,a:p}),s();},[o,s]),t=useCallback(()=>{let{a:p,...y}=i;n(Ca({...y,alpha:r?1:p}));},[i,n,r]),e=useCallback(p=>{d(r?{...p,a:1}:p);},[r]),l=useCallback(p=>{d({...p,a:p.a/100});},[]),f=useCallback(p=>{d({...p,a:p.a});},[]);return jsxs(D,{className:"color-picker__widget",children:[jsx(r?RgbColorPicker:RgbaColorPicker,{color:i,onChange:e}),jsxs(ro,{mt:2,spacing:1,direction:"row",children:[jsx(K,{scheme:m,setScheme:a}),m==="RGB"?jsx(Q,{value:{...i,a:Math.round(i.a*100)},onChange:l,disableAlpha:r}):jsx(oo,{value:{...i,a:i.a},onChange:f,disableAlpha:r})]}),jsx(v,{sx:{my:"12px"}}),jsxs(V,{className:"color-picker__widget-actions",children:[jsx(U,{className:"color-picker__widget-actions__cancel",onClick:u,children:c("cancel")}),jsx($,{className:"color-picker__widget-actions__confirm",onClick:t,children:c("okay")})]})]})},to=Wo;var no={hideReset:false,disableAlpha:false},Vo=({value:o="#ffffff",onChange:s,onReset:n,sx:r,options:m=no,disabled:a=false})=>{let i=yc(useId(),"color-picker"),[d,c]=useState(null),{disableAlpha:u=false,hideReset:t=false}={...no,...m},e=useRef(null),l=useCallback(()=>{a||c(e.current);},[a]),f=useCallback(()=>{a||c(null);},[a]),P=useCallback(p=>{s(u?p.substring(0,7):p),c(null);},[s,u]);return jsx(uo,{onClickAway:()=>c(null),children:jsxs(ro,{ref:e,id:i,"data-testid":"ColorPicker",bgcolor:"grey.400",borderRadius:"4px",p:"4px",pr:"12px",direction:"row",justifyContent:"space-between",spacing:1,alignItems:"center",className:"color-picker",sx:r,children:[jsxs(ro,{direction:"row",spacing:1,alignItems:"center",className:"color-picker__controls-wrapper",children:[jsx(B,{borderRadius:"5px",width:32,height:32,sx:{backgroundColor:o},className:"color-picker__viewer"}),jsxs(B,{className:"color-picker__actions-wrapper",children:[jsx(Y,{className:"color-picker__label",fontWeight:500,fontSize:9,color:"text.primary",textTransform:"uppercase",children:o}),jsx(X,{className:"color-picker__edit-btn",type:"button",onClick:l,disabled:a,children:"Edit"})]})]}),t?jsx("div",{}):jsx(G,{className:"color-picker__close-btn",type:"button",disabled:a,onClick:n,children:jsx(B,{component:"img",src:Eb,width:10,height:10})}),jsx(Popper,{anchorEl:d,open:!!d,placement:"top",children:jsx(to,{initialValue:o,onCancel:f,onConfirm:P,disableAlpha:u})})]})})},ao=Vo;var ot=ao;export{ot as a};
1
+ import {v}from'./chunk-OBBOIKJ2.js';import {yc,Ba,Ca}from'./chunk-PLMJIRXJ.js';import {Eb,Vc}from'./chunk-YKKS24ES.js';import mo,{useId,useState,useRef,useCallback,useEffect,useMemo}from'react';import B from'@mui/material/Box';import uo from'@mui/material/ClickAwayListener';import ro from'@mui/material/Stack';import Y from'@mui/material/Typography';import {styled,alpha}from'@mui/material/styles';import O from'@mui/material/Button';import lo from'@mui/material/TextField';import po from'@mui/material/MenuList';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {useTranslation}from'react-i18next';import {RgbColorPicker,RgbaColorPicker}from'react-colorful';import fo from'@mui/material/Popper';import J from'@mui/material/MenuItem';import j from'@mui/material/InputAdornment';import v$1 from'color';import {Popper}from'@mui/material';var G=styled("button")({background:"transparent",border:"none",padding:0,margin:0,cursor:"pointer",width:10,height:10,display:"flex",justifyContent:"center",alignItems:"center","&:disabled, &.Mui-disabled":{opacity:.5,cursor:"not-allowed"}}),D=styled(B)(({theme:o})=>({boxShadow:"0px 8px 30px rgba(0, 0, 0, 0.16)",width:264,backgroundColor:"#ffffff",padding:"12px",borderRadius:o.spacing(1),"& .react-colorful":{width:"100%","&__saturation":{minHeight:152,borderRadius:"4px",marginBottom:o.spacing(2),border:0,"&-pointer":{width:13,height:13}},"&__hue":{borderRadius:"4px",height:"8px","&-pointer":{width:10,height:10}},"&__alpha":{marginTop:o.spacing(2),marginBottom:0,border:0,borderRadius:"4px",height:"8px","&-pointer":{width:10,height:10}}}})),V=styled(B)(()=>({display:"flex",gap:"8px",justifyContent:"flex-end"})),X=styled(o=>jsx(Y,{...o,component:"button"}))(({theme:o})=>({fontWeight:500,fontSize:"9px",color:o.palette.info.dark,textDecoration:"underline",cursor:"pointer",background:"transparent",border:"none",padding:0,margin:0,"&:disabled, &.Mui-disabled":{color:alpha(o.palette.info.dark,.5),textDecoration:"none"},"&:hover":{textDecoration:"none"}})),$=styled(O)(({theme:o})=>({textTransform:"capitalize",minWidth:"auto",width:74,borderRadius:"4px",border:`1px solid ${o.palette.info.dark}`,backgroundColor:o.palette.info.dark,fontWeight:700,fontSize:"11px",color:o.palette.common.white,"&:hover":{backgroundColor:o.palette.info.dark}})),U=styled(O)(({theme:o})=>({textTransform:"capitalize",minWidth:"auto",width:74,borderRadius:"4px",border:`1px solid ${o.palette.divider}`,backgroundColor:o.palette.common.white,fontWeight:500,fontSize:"11px",color:o.palette.text.primary,"&:hover":{background:"transparent"}})),Z=styled(B,{shouldForwardProp:o=>o!=="active"})(({theme:o,active:s})=>({display:"flex",justifyContent:"space-between",alignItems:"center",color:o.palette.text.primary,border:"1px solid #F2F2F2",fontSize:12,fontWeight:500,backgroundColor:"transparent",padding:"4px 8px",borderRadius:"4px",minWidth:70,cursor:"pointer",...s&&{border:"1px solid #1F88D0",boxShadow:"0px 0px 4px 0px #1F88D080"}})),q=styled(po)({backgroundColor:"#ffffff",borderRadius:"4px",boxShadow:"0px 8px 30px 0px #00000029",minWidth:70,"& .MuiMenuItem-root":{fontSize:12,fontWeight:500,padding:"4px 8px"}}),x=styled(lo)(({theme:o})=>({"& .MuiOutlinedInput-root":{fontSize:"12px",fontWeight:500,borderRadius:"4px","& input":{padding:"4px","&::-webkit-outer-spin-button, &::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0},"&[type=number]":{MozAppearance:"textfield"}},"& .MuiOutlinedInput-notchedOutline":{borderColor:o.palette.divider,borderWidth:"1px"},"&:hover, &.Mui-focused":{"& .MuiOutlinedInput-notchedOutline":{borderColor:o.palette.divider,borderWidth:"1px"}}}}));var ho=({scheme:o,setScheme:s})=>{let[n,r]=mo.useState(null),m=!!n,a=useCallback(c=>{r(n?null:c.currentTarget);},[n]),i=useCallback(()=>{r(null);},[]),d=useCallback(c=>{i(),s(c);},[i,s]);return jsxs(Fragment,{children:[jsxs(Z,{component:"button",active:m,onClick:a,children:[o,jsx(B,{component:"img",sx:{transform:m?"rotateZ(180deg)":"rotateZ(0)",transition:"200ms transform ease-out"},src:Vc})]}),jsx(fo,{anchorEl:n,open:!!n,placement:"bottom",disablePortal:true,keepMounted:true,modifiers:[{name:"offset",options:{offset:[0,4]}}],children:jsx(uo,{onClickAway:c=>{n?.contains(c.target)||i();},children:jsxs(q,{children:[jsx(J,{onClick:()=>d("RGB"),children:"RGB"}),jsx(J,{onClick:()=>d("HEX"),children:"HEX"})]})})})]})},K=ho;var Ro=({value:o,onChange:s,disableAlpha:n=false})=>{let[r,m]=useState(o),{r:a,g:i,b:d,a:c}=r;useEffect(()=>{m(o);},[o]);let u=useCallback((l,f)=>(isNaN(l)&&(l=0),l<0&&(l=0),l>f&&(l=f),console.log("num",l),l),[]),t=useCallback((l,f)=>P=>{m({...r,[l]:u(+P.target.value,f)});},[r,u]),e=useCallback((l,f)=>{s({...r,[l]:u(r[l],f)});},[s,r,u]);return jsxs(ro,{direction:"row",spacing:1,...n&&{flex:1},children:[jsx(x,{type:"number",value:a,onBlur:()=>e("r",255),onChange:t("r",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...n&&{sx:{flex:1}}}),jsx(x,{type:"number",value:i,onBlur:()=>e("g",255),onChange:t("g",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...n&&{sx:{flex:1}}}),jsx(x,{type:"number",value:d,onBlur:()=>e("b",255),onChange:t("b",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...n&&{sx:{flex:1}}}),!n&&jsx(x,{type:"number",value:c,onBlur:()=>e("a",100),onChange:t("a",100),inputProps:{min:0,max:100,style:{textAlign:"center"}},variant:"outlined",sx:{"& .MuiOutlinedInput-root":{pr:1}},InputProps:{endAdornment:jsx(j,{position:"end",sx:{m:0},children:jsx(Y,{component:"span",display:"inline-block",fontSize:12,fontWeight:500,children:"%"})})},size:"small"})]})},Q=Ro;var vo=({value:o,onChange:s,disableAlpha:n=false})=>{let r=useMemo(()=>v$1.rgb(o.r,o.g,o.b,o.a).hex().replace("#",""),[o]),[m,a]=useState(r),i=Math.round(o.a*100);return useEffect(()=>{let t=v$1.rgb(o.r,o.g,o.b).hex().replace("#","");a(t);},[o.r,o.g,o.b]),jsxs(ro,{direction:"row",spacing:1,alignItems:"flex-start",children:[jsx(x,{value:m,onChange:t=>{let e=t.target.value.replace(/[^0-9a-fA-F]/g,"").toUpperCase();e.length>6&&(e=e.slice(0,6)),a(e);},onBlur:()=>{let t=m;if(t.length===3&&(t=t.split("").map(e=>e+e).join(""),a(t)),t.length===6)try{let e=v$1(`#${t}`).alpha(o.a);s({r:e.red(),g:e.green(),b:e.blue(),a:e.alpha()});}catch{a(r);}else a(r);},placeholder:"FFFFFF",sx:{flex:1.4,"& .MuiOutlinedInput-root":{pl:1}},InputProps:{startAdornment:jsx(j,{position:"start",sx:{m:0},children:jsx(Y,{component:"span",color:t=>alpha(t.palette.text.primary,.5),display:"inline-block",fontSize:12,fontWeight:500,children:"#"})})}}),!n&&jsx(x,{type:"number",value:i,onChange:t=>{let e=parseInt(t.target.value,10);isNaN(e)&&(e=0),e<0&&(e=0),e>100&&(e=100),s({...o,a:e/100});},inputProps:{min:0,max:100},sx:{flex:.8,"& .MuiOutlinedInput-root":{pr:1}},InputProps:{endAdornment:jsx(j,{position:"end",sx:{m:0},children:jsx(Y,{component:"span",color:"text.primary",display:"inline-block",fontSize:12,fontWeight:500,children:"%"})})}})]})},oo=vo;var Wo=({initialValue:o="#ffffff",onCancel:s,onConfirm:n,disableAlpha:r=false})=>{let[m,a]=useState("RGB"),[i,d]=useState(()=>{let{alpha:p,...y}=Ba(o).value;return {...y,a:p}}),{t:c}=useTranslation(),u=useCallback(()=>{let{alpha:p,...y}=Ba(o).value;d({...y,a:p}),s();},[o,s]),t=useCallback(()=>{let{a:p,...y}=i;n(Ca({...y,alpha:r?1:p}));},[i,n,r]),e=useCallback(p=>{d(r?{...p,a:1}:p);},[r]),l=useCallback(p=>{d({...p,a:p.a/100});},[]),f=useCallback(p=>{d({...p,a:p.a});},[]);return jsxs(D,{className:"color-picker__widget",children:[jsx(r?RgbColorPicker:RgbaColorPicker,{color:i,onChange:e}),jsxs(ro,{mt:2,spacing:1,direction:"row",children:[jsx(K,{scheme:m,setScheme:a}),m==="RGB"?jsx(Q,{value:{...i,a:Math.round(i.a*100)},onChange:l,disableAlpha:r}):jsx(oo,{value:{...i,a:i.a},onChange:f,disableAlpha:r})]}),jsx(v,{sx:{my:"12px"}}),jsxs(V,{className:"color-picker__widget-actions",children:[jsx(U,{className:"color-picker__widget-actions__cancel",onClick:u,children:c("cancel")}),jsx($,{className:"color-picker__widget-actions__confirm",onClick:t,children:c("okay")})]})]})},to=Wo;var no={hideReset:false,disableAlpha:false},Vo=({value:o="#ffffff",onChange:s,onReset:n,sx:r,options:m=no,disabled:a=false})=>{let i=yc(useId(),"color-picker"),[d,c]=useState(null),{disableAlpha:u=false,hideReset:t=false}={...no,...m},e=useRef(null),l=useCallback(()=>{a||c(e.current);},[a]),f=useCallback(()=>{a||c(null);},[a]),P=useCallback(p=>{s(u?p.substring(0,7):p),c(null);},[s,u]);return jsx(uo,{onClickAway:()=>c(null),children:jsxs(ro,{ref:e,id:i,"data-testid":"ColorPicker",bgcolor:"grey.400",borderRadius:"4px",p:"4px",pr:"12px",direction:"row",justifyContent:"space-between",spacing:1,alignItems:"center",className:"color-picker",sx:r,children:[jsxs(ro,{direction:"row",spacing:1,alignItems:"center",className:"color-picker__controls-wrapper",children:[jsx(B,{borderRadius:"5px",width:32,height:32,sx:{backgroundColor:o},className:"color-picker__viewer"}),jsxs(B,{className:"color-picker__actions-wrapper",children:[jsx(Y,{className:"color-picker__label",fontWeight:500,fontSize:9,color:"text.primary",textTransform:"uppercase",children:o}),jsx(X,{className:"color-picker__edit-btn",type:"button",onClick:l,disabled:a,children:"Edit"})]})]}),t?jsx("div",{}):jsx(G,{className:"color-picker__close-btn",type:"button",disabled:a,onClick:n,children:jsx(B,{component:"img",src:Eb,width:10,height:10})}),jsx(Popper,{anchorEl:d,open:!!d,placement:"top",children:jsx(to,{initialValue:o,onCancel:f,onConfirm:P,disableAlpha:u})})]})})},ao=Vo;var ot=ao;export{ot as a};
@@ -1 +1 @@
1
- import {a,d,b,c,j as j$1,e}from'./chunk-TIBMC5I4.js';import {yc}from'./chunk-EEIJA6B7.js';import {dc,ec}from'./chunk-YKKS24ES.js';import {memo,useId,useState}from'react';import ee from'@mui/material/ClickAwayListener';import te from'@mui/material/Popper';import {useTranslation}from'react-i18next';import {DateObject,Calendar}from'react-multi-date-picker';import i from'@mui/material/Box';import l from'@mui/material/Button';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var O=styled(l)(()=>({minWidth:"auto",padding:0,"& > img":{cursor:"pointer"}})),z=styled(i)(()=>({position:"relative"})),H=styled(i,{shouldForwardProp:t=>t!=="open"})(({open:t,theme:e})=>({display:t?"flex":"none",flexDirection:"column",background:e.palette.common.white,boxShadow:e.shadows[9],borderRadius:e.spacing(1),top:37,color:e.palette.text.primary,fontSize:"11px",margin:"8px 0",".rmdp-calendar":{padding:"8px 16px 16px"},".rmdp-rtl *":{fontFamily:"Tajawal"},".rmdp-rtl .sd":{paddingTop:"4px"},".rmdp-wrapper":{position:"relative",borderRadius:"8px",boxShadow:"none"},".rmdp-day span":{fontSize:"11px",fontWeight:500},".rmdp-day, .rmdp-week-day":{width:40,height:40,marginBottom:"2px",padding:"4px",fontSize:"11px",color:e.palette.grey[900]},".rmdp-day-picker":{padding:0},".rmdp-day.rmdp-today span":{backgroundColor:"transparent !important",color:e.palette.info.dark},".rmdp-day.rmdp-today.end span, .rmdp-day.rmdp-today.end span":{color:e.palette.common.white},".rmdp-range, .rmdp-day:not(.rmdp-disabled):not(.rmdp-day-hidden) span:hover":{background:e.palette.info.light,boxShadow:"none",color:e.palette.grey[900]},".rmdp-range-hover.start, .rmdp-range.start, .rmdp-range-hover.end, .rmdp-range.end, .rmdp-rtl .rmdp-range-hover.start, .rmdp-rtl .rmdp-range.start, .rmdp-rtl .rmdp-range-hover.end, .rmdp-rtl .rmdp-range.end":{borderRadius:"50%",background:e.palette.background.gradient.darkShadedBlue,color:e.palette.common.white},".rmdp-range.start:after":{content:'""',position:"absolute",background:e.palette.info.light,height:"100%",width:"50%",right:0,top:0,zIndex:-1},".rmdp-rtl .rmdp-range.start:after":{right:"unset",left:0},".rmdp-range.end:after":{content:'""',position:"absolute",background:e.palette.info.light,height:"100%",width:"50%",left:0,top:0,zIndex:-1},".rmdp-rtl .rmdp-range.end:after":{left:"unset",right:0},".rmdp-week-day":{color:e.palette.grey[700],marginBottom:"4px",fontSize:"11px",padding:"4px"},".rmdp-header-values":{color:e.palette.grey[900],fontSize:"12px",fontWeight:500,lineHeight:"20px",letterSpacing:"0.1px"},".rmdp-header-values span:nth-of-type(2)":{display:"none"},".rmdp-header":{padding:"4px 0",margin:0,fontSize:"12px"},".rmdp-top-class":{display:"block !important"},".rmdp-day.rmdp-selected span:not(.highlight)":{background:e.palette.info.dark},".rmdp-day.start.end":{overflow:"hidden"}})),j=styled(l,{shouldForwardProp:t=>t!=="open"})(({open:t,theme:e})=>({color:e.palette.text.primary,fontSize:"11px",fontWeight:500,padding:e.spacing(1),borderRadius:"4px",border:"1px solid",borderColor:e.palette.divider,background:e.palette.common.white,textTransform:"none",height:32,...t&&{border:"1px solid",borderColor:e.palette.info.dark,boxShadow:e.shadows[7]}})),A=styled(i)(({theme:t})=>({display:"flex",justifyContent:"flex-end",alignItems:"center",gap:8,padding:"16px",borderTop:`1px solid ${t.palette.divider}`})),E=styled(l)(({theme:t})=>({textTransform:"capitalize",padding:"8px 24px",width:75,height:32,fontSize:"11px",background:"transparent",color:t.palette.text.primary,border:"1px solid",borderColor:t.palette.divider,fontWeight:500,borderRadius:"4px","&:hover":{background:"transparent",color:t.palette.text.primary}})),Y=styled(l)(({theme:t})=>({textTransform:"capitalize",padding:"8px 24px",width:75,height:32,fontSize:"11px",borderRadius:"4px",fontWeight:700,background:t.palette.info.dark,"&:hover":{background:t.palette.info.dark}})),F=styled(i)(()=>({display:"flex",gap:"8px"}));var ne=["Su","Mo","Tu","We","Th","Fr","Sa"];function ae({isAr:t=false,value:e$1,setValue:y,enableTimePicker:p,placement:L,sx:R,...N}){let V=yc(useId(),"calender"),[w,k]=useState(null),[C,$]=useState(e$1?new DateObject(new Date(e$1.toLocaleString())):new DateObject(new Date)),[D,g]=useState(e$1?new DateObject(new Date(e$1.toLocaleString())):new DateObject(new Date)),q=e$1?.hour?a(e$1.hour):d(),G=e$1?.hour?b(e$1.hour):b(new Date().getHours()),[a$1,J]=useState({hour:q,minute:e$1?.minute??c(),period:G}),{t:B}=useTranslation(),u=!!w,K=r=>r==="right"?t?dc:ec:t?ec:dc,Q=r=>{k(r.currentTarget);},f=()=>{k(null);},U=()=>{let r=a$1.hour;p&&(r=e(a$1.hour,a$1.period||"AM"));let d=p?D.setHour(r).setMinute(a$1.minute):D;$(d),y&&y(d),f();},X=r=>{J(r);};return jsx(ee,{onClickAway:f,children:jsxs(z,{sx:{...R},id:V,"data-testid":"Calender",children:[jsx(j,{onClick:Q,open:u,className:"date-button",children:C.format("MMM D, YYYY")}),jsx(te,{open:u,anchorEl:w,placement:L,children:jsxs(H,{className:"calender-content",open:u,children:[jsx(Calendar,{numberOfMonths:1,format:"MMM DD YYYY",monthYearSeparator:" ",renderButton:(r,d)=>jsx(O,{onClick:d,children:jsx("img",{src:K(r),alt:"arrow"})}),onMonthChange:r=>{g(r);},onYearChange:r=>{g(r);},onChange:r=>{g(r);},weekDays:t?void 0:ne,minDate:new Date,value:C,...N}),jsxs(A,{sx:{...p&&{justifyContent:"space-between"}},children:[p&&jsx(j$1,{enableRealTimeChange:true,onChange:X,defaultTime:a$1}),jsxs(F,{children:[jsx(E,{variant:"contained",onClick:f,children:B("cancel")}),jsx(Y,{variant:"contained",onClick:U,children:B("okay")})]})]})]})})]})})}var I=memo(ae);var Te=I;export{Te as a};
1
+ import {a,d,b,c,j as j$1,e}from'./chunk-5HWIH67B.js';import {yc}from'./chunk-PLMJIRXJ.js';import {dc,ec}from'./chunk-YKKS24ES.js';import {memo,useId,useState}from'react';import ee from'@mui/material/ClickAwayListener';import te from'@mui/material/Popper';import {useTranslation}from'react-i18next';import {DateObject,Calendar}from'react-multi-date-picker';import i from'@mui/material/Box';import l from'@mui/material/Button';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var O=styled(l)(()=>({minWidth:"auto",padding:0,"& > img":{cursor:"pointer"}})),z=styled(i)(()=>({position:"relative"})),H=styled(i,{shouldForwardProp:t=>t!=="open"})(({open:t,theme:e})=>({display:t?"flex":"none",flexDirection:"column",background:e.palette.common.white,boxShadow:e.shadows[9],borderRadius:e.spacing(1),top:37,color:e.palette.text.primary,fontSize:"11px",margin:"8px 0",".rmdp-calendar":{padding:"8px 16px 16px"},".rmdp-rtl *":{fontFamily:"Tajawal"},".rmdp-rtl .sd":{paddingTop:"4px"},".rmdp-wrapper":{position:"relative",borderRadius:"8px",boxShadow:"none"},".rmdp-day span":{fontSize:"11px",fontWeight:500},".rmdp-day, .rmdp-week-day":{width:40,height:40,marginBottom:"2px",padding:"4px",fontSize:"11px",color:e.palette.grey[900]},".rmdp-day-picker":{padding:0},".rmdp-day.rmdp-today span":{backgroundColor:"transparent !important",color:e.palette.info.dark},".rmdp-day.rmdp-today.end span, .rmdp-day.rmdp-today.end span":{color:e.palette.common.white},".rmdp-range, .rmdp-day:not(.rmdp-disabled):not(.rmdp-day-hidden) span:hover":{background:e.palette.info.light,boxShadow:"none",color:e.palette.grey[900]},".rmdp-range-hover.start, .rmdp-range.start, .rmdp-range-hover.end, .rmdp-range.end, .rmdp-rtl .rmdp-range-hover.start, .rmdp-rtl .rmdp-range.start, .rmdp-rtl .rmdp-range-hover.end, .rmdp-rtl .rmdp-range.end":{borderRadius:"50%",background:e.palette.background.gradient.darkShadedBlue,color:e.palette.common.white},".rmdp-range.start:after":{content:'""',position:"absolute",background:e.palette.info.light,height:"100%",width:"50%",right:0,top:0,zIndex:-1},".rmdp-rtl .rmdp-range.start:after":{right:"unset",left:0},".rmdp-range.end:after":{content:'""',position:"absolute",background:e.palette.info.light,height:"100%",width:"50%",left:0,top:0,zIndex:-1},".rmdp-rtl .rmdp-range.end:after":{left:"unset",right:0},".rmdp-week-day":{color:e.palette.grey[700],marginBottom:"4px",fontSize:"11px",padding:"4px"},".rmdp-header-values":{color:e.palette.grey[900],fontSize:"12px",fontWeight:500,lineHeight:"20px",letterSpacing:"0.1px"},".rmdp-header-values span:nth-of-type(2)":{display:"none"},".rmdp-header":{padding:"4px 0",margin:0,fontSize:"12px"},".rmdp-top-class":{display:"block !important"},".rmdp-day.rmdp-selected span:not(.highlight)":{background:e.palette.info.dark},".rmdp-day.start.end":{overflow:"hidden"}})),j=styled(l,{shouldForwardProp:t=>t!=="open"})(({open:t,theme:e})=>({color:e.palette.text.primary,fontSize:"11px",fontWeight:500,padding:e.spacing(1),borderRadius:"4px",border:"1px solid",borderColor:e.palette.divider,background:e.palette.common.white,textTransform:"none",height:32,...t&&{border:"1px solid",borderColor:e.palette.info.dark,boxShadow:e.shadows[7]}})),A=styled(i)(({theme:t})=>({display:"flex",justifyContent:"flex-end",alignItems:"center",gap:8,padding:"16px",borderTop:`1px solid ${t.palette.divider}`})),E=styled(l)(({theme:t})=>({textTransform:"capitalize",padding:"8px 24px",width:75,height:32,fontSize:"11px",background:"transparent",color:t.palette.text.primary,border:"1px solid",borderColor:t.palette.divider,fontWeight:500,borderRadius:"4px","&:hover":{background:"transparent",color:t.palette.text.primary}})),Y=styled(l)(({theme:t})=>({textTransform:"capitalize",padding:"8px 24px",width:75,height:32,fontSize:"11px",borderRadius:"4px",fontWeight:700,background:t.palette.info.dark,"&:hover":{background:t.palette.info.dark}})),F=styled(i)(()=>({display:"flex",gap:"8px"}));var ne=["Su","Mo","Tu","We","Th","Fr","Sa"];function ae({isAr:t=false,value:e$1,setValue:y,enableTimePicker:p,placement:L,sx:R,...N}){let V=yc(useId(),"calender"),[w,k]=useState(null),[C,$]=useState(e$1?new DateObject(new Date(e$1.toLocaleString())):new DateObject(new Date)),[D,g]=useState(e$1?new DateObject(new Date(e$1.toLocaleString())):new DateObject(new Date)),q=e$1?.hour?a(e$1.hour):d(),G=e$1?.hour?b(e$1.hour):b(new Date().getHours()),[a$1,J]=useState({hour:q,minute:e$1?.minute??c(),period:G}),{t:B}=useTranslation(),u=!!w,K=r=>r==="right"?t?dc:ec:t?ec:dc,Q=r=>{k(r.currentTarget);},f=()=>{k(null);},U=()=>{let r=a$1.hour;p&&(r=e(a$1.hour,a$1.period||"AM"));let d=p?D.setHour(r).setMinute(a$1.minute):D;$(d),y&&y(d),f();},X=r=>{J(r);};return jsx(ee,{onClickAway:f,children:jsxs(z,{sx:{...R},id:V,"data-testid":"Calender",children:[jsx(j,{onClick:Q,open:u,className:"date-button",children:C.format("MMM D, YYYY")}),jsx(te,{open:u,anchorEl:w,placement:L,children:jsxs(H,{className:"calender-content",open:u,children:[jsx(Calendar,{numberOfMonths:1,format:"MMM DD YYYY",monthYearSeparator:" ",renderButton:(r,d)=>jsx(O,{onClick:d,children:jsx("img",{src:K(r),alt:"arrow"})}),onMonthChange:r=>{g(r);},onYearChange:r=>{g(r);},onChange:r=>{g(r);},weekDays:t?void 0:ne,minDate:new Date,value:C,...N}),jsxs(A,{sx:{...p&&{justifyContent:"space-between"}},children:[p&&jsx(j$1,{enableRealTimeChange:true,onChange:X,defaultTime:a$1}),jsxs(F,{children:[jsx(E,{variant:"contained",onClick:f,children:B("cancel")}),jsx(Y,{variant:"contained",onClick:U,children:B("okay")})]})]})]})})]})})}var I=memo(ae);var Te=I;export{Te as a};
@@ -1 +1 @@
1
- import {a as a$1}from'./chunk-OVRSF46B.js';import {a}from'./chunk-N63GXPYS.js';import {j,n}from'./chunk-CIKLIBPZ.js';import {Vb,yc}from'./chunk-EEIJA6B7.js';import {Dj,Ej,Kj,Oe}from'./chunk-YKKS24ES.js';import {forwardRef,useState,useImperativeHandle,useEffect,useMemo,memo,useId}from'react';import {Button}from'@mui/material';import p from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';import {useTranslation}from'react-i18next';import {useDropzone}from'react-dropzone';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var G=styled(p)(()=>({textAlign:"center",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"32px"})),u=styled(p)(()=>({paddingInline:"40px"})),d=styled(j,{shouldForwardProp:e=>e!=="isError"})(({theme:e,isError:i})=>({color:i?"#FF2000":e.v2.palette.base.black,fontSize:"18px",fontWeight:600,lineHeight:"20px",marginBottom:"8px"})),J=styled(p)(({theme:e})=>({color:e.palette.text.primary,fontSize:"12px",fontWeight:500,lineHeight:"20px",padding:"4px 12px",borderRadius:"4px",border:`1px solid ${e.palette.divider}`,background:e.palette.common.white,cursor:"pointer"})),g=styled(j)(({theme:e})=>({color:alpha(e.v2.palette.base.black,.7),fontSize:"12px",fontWeight:500,lineHeight:"20px"})),F=styled(p,{shouldForwardProp:e=>e!=="width"})(({theme:e,width:i})=>({width:i||431,minHeight:176,border:`1px dashed ${e.palette.secondary.light}`,borderRadius:"8px",padding:"24px 0",display:"flex",alignItems:"center",justifyContent:"center"})),h=styled(p)(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"24px",color:e.palette.text.primary,fontSize:"14px",lineHeight:"20px",cursor:"default"})),K=styled("span")(()=>({fontWeight:600,textDecorationLine:"underline",cursor:"pointer"})),T=styled(p)(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"8px",color:e.palette.text.primary})),z=styled(p)(({theme:e})=>({color:alpha(e.palette.text.primary,.7),fontSize:"12px",fontWeight:500,lineHeight:"20px"})),O=styled(Button)(({theme:e,disabled:i})=>({borderRadius:"4px",minWidth:"105px",background:i?alpha(e.palette.info.dark,.4):e.palette.info.dark,color:e.palette.common.white,padding:"4px 8px",fontSize:"9px",fontWeight:600,height:"32px",display:"flex",alignItems:"center",justifyContent:"center",textTransform:"none","&:hover":{background:e.palette.info.dark,opacity:.8},"&.Mui-disabled":{color:e.palette.common.white}})),Q=styled(p)(()=>({display:"flex",gap:"8px",justifyContent:"center",alignItems:"center",padding:"6px",boxShadow:"0px 4px 40px 0px rgba(0, 0, 0, 0.19)",borderRadius:"4px"}));var Y=forwardRef(({accept:e,footer:i,options:x,isCreateLoading:U,progress:oe,error:R,errorHint:te,subtitleComponent:S,isSuccess:P,onConfirm:re,isSendDisabled:ie,errorActionComponent:le,title:l,width:B,successFooter:pe,progressVariant:ae},ne)=>{let{t:a$2}=useTranslation(),[n$1,H]=useState([]),{getRootProps:de,getInputProps:se,open:f,acceptedFiles:v,isDragReject:j,fileRejections:s}=useDropzone(x);useImperativeHandle(ne,()=>({open:f}),[f]),useEffect(()=>{H(v);},[v]);let C=Vb(x?.maxSize||0,0).toUpperCase(),m=useMemo(()=>{let me=s.length&&s[0].errors.some(k=>k.code==="file-invalid-type"),ce=s.length&&s[0].errors.some(k=>k.code==="file-too-large");return j||me?a$2("invalidFileType"):ce?`File is larger than ${C}`:R},[j,R,s,C,a$2]),b=useMemo(()=>n$1.length?jsxs(T,{sx:{fontWeight:600},children:[jsx(p,{children:n$1[0].name}),jsx(z,{children:Vb(n$1[0].size)})]}):null,[n$1]);return P&&n$1.length&&!U?jsxs(Fragment,{children:[jsxs(u,{children:[typeof l=="string"?jsx(d,{children:l}):l??jsx(d,{children:"File uploaded"}),S]}),jsx(F,{width:B,children:jsxs(h,{children:[P&&jsx(p,{component:"img",src:Dj,width:56,height:56}),b]})}),pe??jsxs(Q,{children:[jsx(a,{onClick:()=>{H([]);},children:jsx(a$1,{src:Ej,alt:"delete",sx:{width:14,height:14}})}),jsx(O,{disabled:ie,onClick:()=>{re?.(n$1);},children:"Bulk Send"})]})]}):U&&n$1.length?jsxs(Fragment,{children:[jsxs(u,{children:[l&&typeof l!="string"?l:jsxs(Fragment,{children:[jsx(d,{children:l??a$2("uploading")}),jsx(g,{children:a$2("wait")})]}),S]}),jsx(F,{width:B,children:jsxs(h,{children:[U&&jsx(n,{size:56,value:oe,variant:ae??"determinate"}),b]})}),i]}):jsxs(Fragment,{children:[jsxs(u,{children:[m?jsx(d,{isError:true,children:m}):typeof l=="string"?jsx(d,{children:l}):l??jsx(d,{children:a$2("uploadBulkFile")}),S||!!m&&jsx(g,{children:"Supported formats: xls, xlxs"})]}),jsxs(F,{width:B,...de(),children:[jsx("input",{...se()}),jsxs(h,{"data-slot":"content",children:[jsx(p,{component:"img",src:m?Kj:Oe,width:56,height:56}),te,b,m?jsx(Fragment,{children:le||jsx(J,{onClick:f,children:a$2("uploadAgain")})}):jsxs(T,{children:[jsxs(p,{children:[jsx(K,{onClick:f,children:"Click to upload"})," or drag and drop"]}),jsxs(z,{children:["Maximum file size ",C]}),e&&jsx(g,{children:a$2("supportedFormats",{accept:e})})]})]})]}),i]})});Y.displayName="FileUploadBase";var Z=memo(Y);var L=forwardRef((e,i)=>{let x=yc(useId(),"file-upload");return jsx(G,{id:x,"data-testid":"FileUpload","data-slot":"file-upload-wrapper",children:jsx(Z,{...e,ref:i})})});L.displayName="FileUpload";var ee=memo(L);var Xe=ee;export{Xe as a};
1
+ import {a as a$1}from'./chunk-2DC5PMER.js';import {a}from'./chunk-PHQKSCFX.js';import {j,n}from'./chunk-OBBOIKJ2.js';import {Vb,yc}from'./chunk-PLMJIRXJ.js';import {Dj,Ej,Kj,Oe}from'./chunk-YKKS24ES.js';import {forwardRef,useState,useImperativeHandle,useEffect,useMemo,memo,useId}from'react';import {Button}from'@mui/material';import p from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';import {useTranslation}from'react-i18next';import {useDropzone}from'react-dropzone';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var G=styled(p)(()=>({textAlign:"center",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"32px"})),u=styled(p)(()=>({paddingInline:"40px"})),d=styled(j,{shouldForwardProp:e=>e!=="isError"})(({theme:e,isError:i})=>({color:i?"#FF2000":e.v2.palette.base.black,fontSize:"18px",fontWeight:600,lineHeight:"20px",marginBottom:"8px"})),J=styled(p)(({theme:e})=>({color:e.palette.text.primary,fontSize:"12px",fontWeight:500,lineHeight:"20px",padding:"4px 12px",borderRadius:"4px",border:`1px solid ${e.palette.divider}`,background:e.palette.common.white,cursor:"pointer"})),g=styled(j)(({theme:e})=>({color:alpha(e.v2.palette.base.black,.7),fontSize:"12px",fontWeight:500,lineHeight:"20px"})),F=styled(p,{shouldForwardProp:e=>e!=="width"})(({theme:e,width:i})=>({width:i||431,minHeight:176,border:`1px dashed ${e.palette.secondary.light}`,borderRadius:"8px",padding:"24px 0",display:"flex",alignItems:"center",justifyContent:"center"})),h=styled(p)(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"24px",color:e.palette.text.primary,fontSize:"14px",lineHeight:"20px",cursor:"default"})),K=styled("span")(()=>({fontWeight:600,textDecorationLine:"underline",cursor:"pointer"})),T=styled(p)(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"8px",color:e.palette.text.primary})),z=styled(p)(({theme:e})=>({color:alpha(e.palette.text.primary,.7),fontSize:"12px",fontWeight:500,lineHeight:"20px"})),O=styled(Button)(({theme:e,disabled:i})=>({borderRadius:"4px",minWidth:"105px",background:i?alpha(e.palette.info.dark,.4):e.palette.info.dark,color:e.palette.common.white,padding:"4px 8px",fontSize:"9px",fontWeight:600,height:"32px",display:"flex",alignItems:"center",justifyContent:"center",textTransform:"none","&:hover":{background:e.palette.info.dark,opacity:.8},"&.Mui-disabled":{color:e.palette.common.white}})),Q=styled(p)(()=>({display:"flex",gap:"8px",justifyContent:"center",alignItems:"center",padding:"6px",boxShadow:"0px 4px 40px 0px rgba(0, 0, 0, 0.19)",borderRadius:"4px"}));var Y=forwardRef(({accept:e,footer:i,options:x,isCreateLoading:U,progress:oe,error:R,errorHint:te,subtitleComponent:S,isSuccess:P,onConfirm:re,isSendDisabled:ie,errorActionComponent:le,title:l,width:B,successFooter:pe,progressVariant:ae},ne)=>{let{t:a$2}=useTranslation(),[n$1,H]=useState([]),{getRootProps:de,getInputProps:se,open:f,acceptedFiles:v,isDragReject:j,fileRejections:s}=useDropzone(x);useImperativeHandle(ne,()=>({open:f}),[f]),useEffect(()=>{H(v);},[v]);let C=Vb(x?.maxSize||0,0).toUpperCase(),m=useMemo(()=>{let me=s.length&&s[0].errors.some(k=>k.code==="file-invalid-type"),ce=s.length&&s[0].errors.some(k=>k.code==="file-too-large");return j||me?a$2("invalidFileType"):ce?`File is larger than ${C}`:R},[j,R,s,C,a$2]),b=useMemo(()=>n$1.length?jsxs(T,{sx:{fontWeight:600},children:[jsx(p,{children:n$1[0].name}),jsx(z,{children:Vb(n$1[0].size)})]}):null,[n$1]);return P&&n$1.length&&!U?jsxs(Fragment,{children:[jsxs(u,{children:[typeof l=="string"?jsx(d,{children:l}):l??jsx(d,{children:"File uploaded"}),S]}),jsx(F,{width:B,children:jsxs(h,{children:[P&&jsx(p,{component:"img",src:Dj,width:56,height:56}),b]})}),pe??jsxs(Q,{children:[jsx(a,{onClick:()=>{H([]);},children:jsx(a$1,{src:Ej,alt:"delete",sx:{width:14,height:14}})}),jsx(O,{disabled:ie,onClick:()=>{re?.(n$1);},children:"Bulk Send"})]})]}):U&&n$1.length?jsxs(Fragment,{children:[jsxs(u,{children:[l&&typeof l!="string"?l:jsxs(Fragment,{children:[jsx(d,{children:l??a$2("uploading")}),jsx(g,{children:a$2("wait")})]}),S]}),jsx(F,{width:B,children:jsxs(h,{children:[U&&jsx(n,{size:56,value:oe,variant:ae??"determinate"}),b]})}),i]}):jsxs(Fragment,{children:[jsxs(u,{children:[m?jsx(d,{isError:true,children:m}):typeof l=="string"?jsx(d,{children:l}):l??jsx(d,{children:a$2("uploadBulkFile")}),S||!!m&&jsx(g,{children:"Supported formats: xls, xlxs"})]}),jsxs(F,{width:B,...de(),children:[jsx("input",{...se()}),jsxs(h,{"data-slot":"content",children:[jsx(p,{component:"img",src:m?Kj:Oe,width:56,height:56}),te,b,m?jsx(Fragment,{children:le||jsx(J,{onClick:f,children:a$2("uploadAgain")})}):jsxs(T,{children:[jsxs(p,{children:[jsx(K,{onClick:f,children:"Click to upload"})," or drag and drop"]}),jsxs(z,{children:["Maximum file size ",C]}),e&&jsx(g,{children:a$2("supportedFormats",{accept:e})})]})]})]}),i]})});Y.displayName="FileUploadBase";var Z=memo(Y);var L=forwardRef((e,i)=>{let x=yc(useId(),"file-upload");return jsx(G,{id:x,"data-testid":"FileUpload","data-slot":"file-upload-wrapper",children:jsx(Z,{...e,ref:i})})});L.displayName="FileUpload";var ee=memo(L);var Xe=ee;export{Xe as a};
@@ -1 +1 @@
1
- import {yc}from'./chunk-EEIJA6B7.js';import {useId}from'react';import a from'@mui/material/Box';import {motion}from'framer-motion';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var e=styled(motion.div)(()=>({width:"100%",height:"100%",cursor:"pointer",".card-front > div, .card-back > div, .card-container":{width:"inherit",height:"inherit"},".card-container":{perspective:"1000px"},".card":{width:"100%",height:"100%",position:"relative",transformStyle:"preserve-3d"},".card-front, .card-back":{position:"absolute",backfaceVisibility:"hidden",width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},".card-back":{transform:"rotateY(180deg)"}}));function t({frontCard:d,backCard:n,isFlipped:p,isHovered:c}){let m=yc(useId(),"flipping-card");return jsx(e,{id:m,"data-testid":"FlippingCard",children:jsx(motion.div,{className:"card-container",children:jsxs(motion.div,{className:"card",animate:{rotateY:p?180:c?20:0},transition:{duration:.3},children:[jsx(motion.div,{className:"card-front",children:jsx(a,{children:d})}),jsx(motion.div,{className:"card-back",children:jsx(a,{children:n})})]})})})}var N=t;export{N as a};
1
+ import {yc}from'./chunk-PLMJIRXJ.js';import {useId}from'react';import a from'@mui/material/Box';import {motion}from'framer-motion';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var e=styled(motion.div)(()=>({width:"100%",height:"100%",cursor:"pointer",".card-front > div, .card-back > div, .card-container":{width:"inherit",height:"inherit"},".card-container":{perspective:"1000px"},".card":{width:"100%",height:"100%",position:"relative",transformStyle:"preserve-3d"},".card-front, .card-back":{position:"absolute",backfaceVisibility:"hidden",width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},".card-back":{transform:"rotateY(180deg)"}}));function t({frontCard:d,backCard:n,isFlipped:p,isHovered:c}){let m=yc(useId(),"flipping-card");return jsx(e,{id:m,"data-testid":"FlippingCard",children:jsx(motion.div,{className:"card-container",children:jsxs(motion.div,{className:"card",animate:{rotateY:p?180:c?20:0},transition:{duration:.3},children:[jsx(motion.div,{className:"card-front",children:jsx(a,{children:d})}),jsx(motion.div,{className:"card-back",children:jsx(a,{children:n})})]})})})}var N=t;export{N as a};
@@ -1,2 +1,2 @@
1
- import {yc}from'./chunk-EEIJA6B7.js';import {useId}from'react';import e from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var n=styled(e)(({theme:t})=>({fontSize:"10px",padding:"4px 8px 4px 4px",color:t.palette.common.white,borderRadius:"45px",fontWeight:500,background:"var(--Garident---Checkout, linear-gradient(254deg, #101010 0.51%, #343740 49.67%, #101010 100%))",boxShadow:"0px 14px 4px 0px rgba(0, 0, 0, 0.00), 0px 9px 4px 0px rgba(0, 0, 0, 0.01), 0px 5px 3px 0px rgba(0, 0, 0, 0.05), 0px 2px 2px 0px rgba(0, 0, 0, 0.09), 0px 1px 1px 0px rgba(0, 0, 0, 0.10)",display:"flex",gap:"6px",alignItems:"center",height:30})),i=styled(e)(()=>({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",top:"15px"})),a=styled(e)(({theme:t})=>({borderRadius:"13px",background:t.palette.common.white,boxShadow:"0px 14px 4px 0px rgba(0, 0, 0, 0.00), 0px 9px 4px 0px rgba(0, 0, 0, 0.01), 0px 5px 3px 0px rgba(0, 0, 0, 0.05), 0px 2px 2px 0px rgba(0, 0, 0, 0.09), 0px 1px 1px 0px rgba(0, 0, 0, 0.10)",width:22,height:22,display:"flex",alignItems:"center",justifyContent:"center"}));function o({title:t}){let g=yc(useId(),"no-internet");return jsx(i,{id:g,"data-testid":"NoInternet",children:jsxs(n,{children:[jsx(a,{children:jsxs("svg",{width:"15",height:"14",viewBox:"0 0 15 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("g",{"clip-path":"url(#clip0_4838_500791)",children:jsx("path",{d:"M12.6359 1.34444L12.6359 1.34444L1.84425 12.1361L1.84324 12.1371L1.84323 12.1371C1.80796 12.171 1.7798 12.2115 1.76041 12.2564C1.74101 12.3013 1.73076 12.3496 1.73026 12.3985C1.72977 12.4474 1.73903 12.4959 1.75751 12.5411C1.77599 12.5864 1.80332 12.6275 1.8379 12.6621C1.87247 12.6967 1.9136 12.724 1.95886 12.7425C2.00413 12.761 2.05263 12.7702 2.10153 12.7697C2.15042 12.7693 2.19872 12.759 2.2436 12.7396C2.28849 12.7202 2.32905 12.692 2.36291 12.6568L2.3639 12.6558L2.36391 12.6558L6.87107 8.1486L6.88649 8.13318L6.90794 8.12925C7.83177 7.95978 8.82148 8.22837 9.53582 8.94271C9.60683 9.01372 9.70218 9.05038 9.79508 9.05038C9.88808 9.05038 9.98396 9.01366 10.0549 8.94271L10.0553 8.94229C10.1993 8.80078 10.1999 8.5686 10.0549 8.42362C9.42924 7.79795 8.63373 7.44893 7.81425 7.36712L7.66723 7.35244L7.7717 7.24797L9.21295 5.80672L9.24408 5.77559L9.28562 5.79017C10.0624 6.06276 10.7767 6.50589 11.3758 7.10498C11.4471 7.17626 11.5402 7.21322 11.6357 7.21322C11.7275 7.21322 11.8209 7.17675 11.8957 7.10478C12.0374 6.95995 12.0372 6.72746 11.8952 6.58281C11.3154 6.00304 10.6422 5.55399 9.91133 5.24449L9.81569 5.20398L9.88914 5.13053L11.1806 3.83911L11.217 3.80262L11.2627 3.82668C11.9646 4.19662 12.6233 4.67474 13.2136 5.26497C13.2845 5.33592 13.3804 5.37265 13.4734 5.37265C13.569 5.37265 13.6615 5.33616 13.7326 5.26497C13.8776 5.11999 13.877 4.88724 13.7331 4.74574L13.7325 4.74522C13.1559 4.16612 12.5156 3.69094 11.8371 3.30814L11.7568 3.26285L11.822 3.19767L13.1556 1.8641L13.1562 1.86344C13.2093 1.81181 13.2454 1.74537 13.2601 1.67282C13.2747 1.60028 13.2671 1.525 13.2383 1.45685C13.2094 1.3887 13.1606 1.33084 13.0984 1.29086C13.0361 1.25088 12.9632 1.23062 12.8892 1.23275L12.6359 1.34444ZM12.6359 1.34444L12.6366 1.34377M12.6359 1.34444L12.6366 1.34377M12.6366 1.34377C12.7032 1.27535 12.7938 1.23554 12.8892 1.23275L12.6366 1.34377ZM1.15567 4.74574L1.1561 4.74532C2.82333 3.07809 4.99232 2.21114 7.18124 2.14706C8.13805 2.11905 9.09854 2.24422 10.0224 2.52326L9.42386 3.12232C6.7366 2.45348 3.77167 3.16849 1.67518 5.26497L1.67477 5.2654C1.53326 5.40934 1.30108 5.40996 1.1561 5.26497C1.01112 5.11999 1.01173 4.88724 1.15567 4.74574ZM2.99668 6.58304C4.18518 5.39454 5.76276 4.74246 7.44465 4.74246C7.56138 4.74246 7.67793 4.74531 7.7943 4.7519L7.05489 5.49131C5.71805 5.58262 4.47253 6.1454 3.51594 7.10481C3.37084 7.24718 3.13819 7.2465 2.99668 7.10498C2.85193 6.96023 2.85193 6.72779 2.99668 6.58304ZM6.72445 10.308C6.93012 10.1023 7.20906 9.98677 7.49991 9.98677C7.79077 9.98677 8.06971 10.1023 8.27537 10.308C8.48104 10.5136 8.59658 10.7926 8.59658 11.0834C8.59658 11.3743 8.48104 11.6532 8.27537 11.8589C8.06971 12.0646 7.79077 12.1801 7.49991 12.1801C7.20906 12.1801 6.93012 12.0646 6.72445 11.8589C6.51879 11.6532 6.40325 11.3743 6.40325 11.0834C6.40325 10.7926 6.51879 10.5136 6.72445 10.308Z",fill:"#20232B",stroke:"#20232B",strokeWidth:"0.14"})}),jsx("defs",{children:jsx("clipPath",{id:"clip0_4838_500791",children:jsx("rect",{width:"14",height:"14",fill:"white",transform:"translate(0.5)"})})})]})}),jsx(e,{children:t})]})})}var W=o;
1
+ import {yc}from'./chunk-PLMJIRXJ.js';import {useId}from'react';import e from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var n=styled(e)(({theme:t})=>({fontSize:"10px",padding:"4px 8px 4px 4px",color:t.palette.common.white,borderRadius:"45px",fontWeight:500,background:"var(--Garident---Checkout, linear-gradient(254deg, #101010 0.51%, #343740 49.67%, #101010 100%))",boxShadow:"0px 14px 4px 0px rgba(0, 0, 0, 0.00), 0px 9px 4px 0px rgba(0, 0, 0, 0.01), 0px 5px 3px 0px rgba(0, 0, 0, 0.05), 0px 2px 2px 0px rgba(0, 0, 0, 0.09), 0px 1px 1px 0px rgba(0, 0, 0, 0.10)",display:"flex",gap:"6px",alignItems:"center",height:30})),i=styled(e)(()=>({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",top:"15px"})),a=styled(e)(({theme:t})=>({borderRadius:"13px",background:t.palette.common.white,boxShadow:"0px 14px 4px 0px rgba(0, 0, 0, 0.00), 0px 9px 4px 0px rgba(0, 0, 0, 0.01), 0px 5px 3px 0px rgba(0, 0, 0, 0.05), 0px 2px 2px 0px rgba(0, 0, 0, 0.09), 0px 1px 1px 0px rgba(0, 0, 0, 0.10)",width:22,height:22,display:"flex",alignItems:"center",justifyContent:"center"}));function o({title:t}){let g=yc(useId(),"no-internet");return jsx(i,{id:g,"data-testid":"NoInternet",children:jsxs(n,{children:[jsx(a,{children:jsxs("svg",{width:"15",height:"14",viewBox:"0 0 15 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("g",{"clip-path":"url(#clip0_4838_500791)",children:jsx("path",{d:"M12.6359 1.34444L12.6359 1.34444L1.84425 12.1361L1.84324 12.1371L1.84323 12.1371C1.80796 12.171 1.7798 12.2115 1.76041 12.2564C1.74101 12.3013 1.73076 12.3496 1.73026 12.3985C1.72977 12.4474 1.73903 12.4959 1.75751 12.5411C1.77599 12.5864 1.80332 12.6275 1.8379 12.6621C1.87247 12.6967 1.9136 12.724 1.95886 12.7425C2.00413 12.761 2.05263 12.7702 2.10153 12.7697C2.15042 12.7693 2.19872 12.759 2.2436 12.7396C2.28849 12.7202 2.32905 12.692 2.36291 12.6568L2.3639 12.6558L2.36391 12.6558L6.87107 8.1486L6.88649 8.13318L6.90794 8.12925C7.83177 7.95978 8.82148 8.22837 9.53582 8.94271C9.60683 9.01372 9.70218 9.05038 9.79508 9.05038C9.88808 9.05038 9.98396 9.01366 10.0549 8.94271L10.0553 8.94229C10.1993 8.80078 10.1999 8.5686 10.0549 8.42362C9.42924 7.79795 8.63373 7.44893 7.81425 7.36712L7.66723 7.35244L7.7717 7.24797L9.21295 5.80672L9.24408 5.77559L9.28562 5.79017C10.0624 6.06276 10.7767 6.50589 11.3758 7.10498C11.4471 7.17626 11.5402 7.21322 11.6357 7.21322C11.7275 7.21322 11.8209 7.17675 11.8957 7.10478C12.0374 6.95995 12.0372 6.72746 11.8952 6.58281C11.3154 6.00304 10.6422 5.55399 9.91133 5.24449L9.81569 5.20398L9.88914 5.13053L11.1806 3.83911L11.217 3.80262L11.2627 3.82668C11.9646 4.19662 12.6233 4.67474 13.2136 5.26497C13.2845 5.33592 13.3804 5.37265 13.4734 5.37265C13.569 5.37265 13.6615 5.33616 13.7326 5.26497C13.8776 5.11999 13.877 4.88724 13.7331 4.74574L13.7325 4.74522C13.1559 4.16612 12.5156 3.69094 11.8371 3.30814L11.7568 3.26285L11.822 3.19767L13.1556 1.8641L13.1562 1.86344C13.2093 1.81181 13.2454 1.74537 13.2601 1.67282C13.2747 1.60028 13.2671 1.525 13.2383 1.45685C13.2094 1.3887 13.1606 1.33084 13.0984 1.29086C13.0361 1.25088 12.9632 1.23062 12.8892 1.23275L12.6359 1.34444ZM12.6359 1.34444L12.6366 1.34377M12.6359 1.34444L12.6366 1.34377M12.6366 1.34377C12.7032 1.27535 12.7938 1.23554 12.8892 1.23275L12.6366 1.34377ZM1.15567 4.74574L1.1561 4.74532C2.82333 3.07809 4.99232 2.21114 7.18124 2.14706C8.13805 2.11905 9.09854 2.24422 10.0224 2.52326L9.42386 3.12232C6.7366 2.45348 3.77167 3.16849 1.67518 5.26497L1.67477 5.2654C1.53326 5.40934 1.30108 5.40996 1.1561 5.26497C1.01112 5.11999 1.01173 4.88724 1.15567 4.74574ZM2.99668 6.58304C4.18518 5.39454 5.76276 4.74246 7.44465 4.74246C7.56138 4.74246 7.67793 4.74531 7.7943 4.7519L7.05489 5.49131C5.71805 5.58262 4.47253 6.1454 3.51594 7.10481C3.37084 7.24718 3.13819 7.2465 2.99668 7.10498C2.85193 6.96023 2.85193 6.72779 2.99668 6.58304ZM6.72445 10.308C6.93012 10.1023 7.20906 9.98677 7.49991 9.98677C7.79077 9.98677 8.06971 10.1023 8.27537 10.308C8.48104 10.5136 8.59658 10.7926 8.59658 11.0834C8.59658 11.3743 8.48104 11.6532 8.27537 11.8589C8.06971 12.0646 7.79077 12.1801 7.49991 12.1801C7.20906 12.1801 6.93012 12.0646 6.72445 11.8589C6.51879 11.6532 6.40325 11.3743 6.40325 11.0834C6.40325 10.7926 6.51879 10.5136 6.72445 10.308Z",fill:"#20232B",stroke:"#20232B",strokeWidth:"0.14"})}),jsx("defs",{children:jsx("clipPath",{id:"clip0_4838_500791",children:jsx("rect",{width:"14",height:"14",fill:"white",transform:"translate(0.5)"})})})]})}),jsx(e,{children:t})]})})}var W=o;
2
2
  export{W as a};