@tap-payments/os-micro-frontend-shared 0.3.36 → 0.3.37

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 (245) hide show
  1. package/build/_chunks/{chunk-5ARDDYXJ.js → chunk-24GIPYTV.js} +1 -1
  2. package/build/_chunks/chunk-25IWFELL.js +1 -0
  3. package/build/_chunks/{chunk-L3H7ON2F.js → chunk-264AVQZB.js} +1 -1
  4. package/build/_chunks/{chunk-I5KEW75Q.js → chunk-2IDI5FIT.js} +1 -1
  5. package/build/_chunks/{chunk-LVM3MTOA.js → chunk-2R3RHB6S.js} +1 -1
  6. package/build/_chunks/{chunk-EUJTQSJL.js → chunk-2SZM47F2.js} +1 -1
  7. package/build/_chunks/{chunk-J35OWNMC.js → chunk-37FU3HTL.js} +1 -1
  8. package/build/_chunks/{chunk-L5JCONCT.js → chunk-3MIQWQQL.js} +1 -1
  9. package/build/_chunks/{chunk-E6LKOOFL.js → chunk-3MZJFU75.js} +1 -1
  10. package/build/_chunks/{chunk-KSPGIGIC.js → chunk-3UW23XJL.js} +1 -1
  11. package/build/_chunks/{chunk-5LUJKHHC.js → chunk-425IBHKE.js} +1 -1
  12. package/build/_chunks/{chunk-HQI3NKYJ.js → chunk-4SY2RHF6.js} +1 -1
  13. package/build/_chunks/{chunk-KZBOCKP5.js → chunk-5IVJR7ID.js} +1 -1
  14. package/build/_chunks/chunk-5LSKIBCX.js +1 -0
  15. package/build/_chunks/{chunk-IG2EYCRZ.js → chunk-5MLLBPE3.js} +1 -1
  16. package/build/_chunks/{chunk-BPMC6UFW.js → chunk-5S3T3XNY.js} +1 -1
  17. package/build/_chunks/{chunk-GONBJ7T4.js → chunk-5Z2NA3V4.js} +1 -1
  18. package/build/_chunks/{chunk-WWQP6V2S.js → chunk-5ZTK2DTR.js} +1 -1
  19. package/build/_chunks/{chunk-AXVYPNDS.js → chunk-644HXTAE.js} +1 -1
  20. package/build/_chunks/{chunk-P2M3F4LT.js → chunk-65AWRJJE.js} +1 -1
  21. package/build/_chunks/{chunk-VSVZKK4J.js → chunk-6AJO36AF.js} +1 -1
  22. package/build/_chunks/{chunk-RQS3IG3X.js → chunk-6IBFFDYO.js} +1 -1
  23. package/build/_chunks/{chunk-K26V7ISU.js → chunk-7HIN4SP6.js} +1 -1
  24. package/build/_chunks/{chunk-A4HTULOP.js → chunk-7MJVA3JB.js} +1 -1
  25. package/build/_chunks/{chunk-6DR4DXYQ.js → chunk-7Z7U2OMA.js} +1 -1
  26. package/build/_chunks/{chunk-SFEYZ6UC.js → chunk-AKFLA3AI.js} +1 -1
  27. package/build/_chunks/{chunk-4GLLOAFY.js → chunk-ANJRT2B4.js} +1 -1
  28. package/build/_chunks/{chunk-ZI75N7BZ.js → chunk-ASJ6GAAA.js} +1 -1
  29. package/build/_chunks/{chunk-HE3FMLQY.js → chunk-ASRZLEZV.js} +1 -1
  30. package/build/_chunks/{chunk-ZCJKWR2O.js → chunk-B6GU33JP.js} +1 -1
  31. package/build/_chunks/{chunk-P7ECTYML.js → chunk-B7J5INEP.js} +1 -1
  32. package/build/_chunks/{chunk-JDWCL7GJ.js → chunk-BWJPQOMN.js} +1 -1
  33. package/build/_chunks/{chunk-ESJCK6HW.js → chunk-CILKCYEG.js} +1 -1
  34. package/build/_chunks/{chunk-ELKH5INT.js → chunk-CNPPHOFA.js} +1 -1
  35. package/build/_chunks/{chunk-I6PM7KFE.js → chunk-COBEFFDC.js} +1 -1
  36. package/build/_chunks/{chunk-PYS2U3OD.js → chunk-COPHDTAJ.js} +1 -1
  37. package/build/_chunks/{chunk-AC4KAKGY.js → chunk-CRGXVUQV.js} +1 -1
  38. package/build/_chunks/{chunk-DNNN35L5.js → chunk-CVUX77JW.js} +1 -1
  39. package/build/_chunks/{chunk-OUERY42D.js → chunk-CYUHMSLI.js} +1 -1
  40. package/build/_chunks/{chunk-4CO35TOY.js → chunk-CZIIDBGD.js} +1 -1
  41. package/build/_chunks/{chunk-LK32TVZ3.js → chunk-D3PKO4EA.js} +1 -1
  42. package/build/_chunks/{chunk-LUU7CTOO.js → chunk-DKQRANZG.js} +1 -1
  43. package/build/_chunks/{chunk-XLWWA6CJ.js → chunk-DSFHY45V.js} +1 -1
  44. package/build/_chunks/{chunk-5T3HOXFP.js → chunk-E3WHOVVW.js} +1 -1
  45. package/build/_chunks/{chunk-BDKEJBMX.js → chunk-E6IVKR44.js} +1 -1
  46. package/build/_chunks/{chunk-CFYVC5K6.js → chunk-EJCYMB26.js} +1 -1
  47. package/build/_chunks/{chunk-BW4IWQUI.js → chunk-F42NLFOM.js} +1 -1
  48. package/build/_chunks/{chunk-GVNRRGWG.js → chunk-FCN2PNOQ.js} +1 -1
  49. package/build/_chunks/{chunk-AJB47VOM.js → chunk-FX73HHSU.js} +1 -1
  50. package/build/_chunks/{chunk-2I5NAVTK.js → chunk-G2ULHE77.js} +1 -1
  51. package/build/_chunks/{chunk-PC45PNLX.js → chunk-GKOMALZH.js} +1 -1
  52. package/build/_chunks/{chunk-G2OWSFMR.js → chunk-H6A7LB3N.js} +1 -1
  53. package/build/_chunks/{chunk-ORXU3VCN.js → chunk-HZKRAADE.js} +1 -1
  54. package/build/_chunks/{chunk-5H7WMTMR.js → chunk-IQGGEFTS.js} +1 -1
  55. package/build/_chunks/{chunk-ZNSKASYS.js → chunk-IRN4UAJD.js} +1 -1
  56. package/build/_chunks/{chunk-UB7HUWAQ.js → chunk-JF6PWJZY.js} +1 -1
  57. package/build/_chunks/{chunk-BYJ2XLTW.js → chunk-JHBGSF4J.js} +1 -1
  58. package/build/_chunks/{chunk-BJ3Z2WFR.js → chunk-JIJNZQG6.js} +1 -1
  59. package/build/_chunks/{chunk-MFCHF5BK.js → chunk-JUKEYCTU.js} +1 -1
  60. package/build/_chunks/{chunk-PPEV33QB.js → chunk-KAQE76SE.js} +1 -1
  61. package/build/_chunks/{chunk-DQVP4KZV.js → chunk-KDBZ73Y5.js} +1 -1
  62. package/build/_chunks/{chunk-7LQ7FNTX.js → chunk-KFQ6O6W4.js} +1 -1
  63. package/build/_chunks/{chunk-SWILNQW4.js → chunk-KQVBQWAY.js} +1 -1
  64. package/build/_chunks/{chunk-6AYUI5GV.js → chunk-LDCV2JMD.js} +1 -1
  65. package/build/_chunks/{chunk-DRCLG5VT.js → chunk-LYFXQM4Y.js} +1 -1
  66. package/build/_chunks/{chunk-XBFQH3GZ.js → chunk-ND3CQPHU.js} +1 -1
  67. package/build/_chunks/{chunk-QFXOBSXW.js → chunk-O6HUXU74.js} +1 -1
  68. package/build/_chunks/{chunk-6X7LS7KK.js → chunk-ONAXBL6X.js} +1 -1
  69. package/build/_chunks/{chunk-HBEH35LA.js → chunk-OPT6Q26G.js} +1 -1
  70. package/build/_chunks/{chunk-U6FHSFDK.js → chunk-OU26R2ZH.js} +1 -1
  71. package/build/_chunks/{chunk-DU6IKIQE.js → chunk-OUZKELT6.js} +1 -1
  72. package/build/_chunks/{chunk-5JBBLGV3.js → chunk-P53QM5ZH.js} +1 -1
  73. package/build/_chunks/{chunk-2AVUNWTY.js → chunk-PGMSTAF5.js} +1 -1
  74. package/build/_chunks/{chunk-LWXV6NHK.js → chunk-PMDVZJAI.js} +1 -1
  75. package/build/_chunks/{chunk-PK3VKOBG.js → chunk-PRHUY2CD.js} +1 -1
  76. package/build/_chunks/{chunk-XJEXIR7N.js → chunk-PXRISNLH.js} +1 -1
  77. package/build/_chunks/{chunk-5FY5WEAA.js → chunk-QA56IEXS.js} +1 -1
  78. package/build/_chunks/{chunk-ZVG6L7OA.js → chunk-QBD3O77Y.js} +1 -1
  79. package/build/_chunks/{chunk-MOUYRKQ3.js → chunk-QGSBHZTO.js} +1 -1
  80. package/build/_chunks/{chunk-BK4QE2XY.js → chunk-QI5ONUIK.js} +1 -1
  81. package/build/_chunks/{chunk-IUCNIU4U.js → chunk-QL4R766B.js} +1 -1
  82. package/build/_chunks/{chunk-PHN2UNJA.js → chunk-QV6X6ZN6.js} +1 -1
  83. package/build/_chunks/{chunk-JDGHZNKY.js → chunk-RIJTT6QH.js} +1 -1
  84. package/build/_chunks/{chunk-WVGNLRZQ.js → chunk-RIKXHYPW.js} +1 -1
  85. package/build/_chunks/{chunk-WDGLJVOT.js → chunk-S36DJQ7J.js} +1 -1
  86. package/build/_chunks/{chunk-KRGJ5FIM.js → chunk-SJ6HXWDZ.js} +1 -1
  87. package/build/_chunks/{chunk-KKIMVGFE.js → chunk-TFSDMTHE.js} +1 -1
  88. package/build/_chunks/{chunk-B76YFNBT.js → chunk-TNRTGLOJ.js} +1 -1
  89. package/build/_chunks/{chunk-S3WB7BAM.js → chunk-TTMCRWE5.js} +1 -1
  90. package/build/_chunks/{chunk-IN4TI6C5.js → chunk-U4O4343E.js} +1 -1
  91. package/build/_chunks/{chunk-IQ2H33GE.js → chunk-UB3MA7UL.js} +1 -1
  92. package/build/_chunks/{chunk-27NBJWWB.js → chunk-UPH4OINU.js} +1 -1
  93. package/build/_chunks/{chunk-G4YDGHDJ.js → chunk-V5PNP75S.js} +1 -1
  94. package/build/_chunks/{chunk-HTHM56FJ.js → chunk-VSKVOLMX.js} +1 -1
  95. package/build/_chunks/{chunk-FCBDFBYS.js → chunk-VYZDFZAK.js} +1 -1
  96. package/build/_chunks/{chunk-4A4VJPND.js → chunk-WJLRJAUM.js} +1 -1
  97. package/build/_chunks/{chunk-6Q3JVULI.js → chunk-WKDLZKPO.js} +1 -1
  98. package/build/_chunks/{chunk-UK456O6R.js → chunk-WNBENFER.js} +1 -1
  99. package/build/_chunks/{chunk-B6Q43W42.js → chunk-WUS2EVHL.js} +1 -1
  100. package/build/_chunks/{chunk-4VFSZWB2.js → chunk-YDPDHWVC.js} +1 -1
  101. package/build/_chunks/{chunk-MN5KDIJ4.js → chunk-YDPQT7J7.js} +1 -1
  102. package/build/_chunks/{chunk-TZFVDVTZ.js → chunk-YTOCVVWT.js} +1 -1
  103. package/build/_chunks/{chunk-VW75KIKI.js → chunk-YZFKWXML.js} +1 -1
  104. package/build/_chunks/{chunk-6KXK4BO7.js → chunk-ZPST4MU4.js} +1 -1
  105. package/build/components/Accordion/index.js +1 -1
  106. package/build/components/AccountDropdown/index.js +1 -1
  107. package/build/components/ActionMenu/index.js +1 -1
  108. package/build/components/ActionsDropdownMenu/index.js +1 -1
  109. package/build/components/ActiveFilterChip/index.js +1 -1
  110. package/build/components/ActivityAreaChart/index.js +1 -1
  111. package/build/components/Amount/index.js +1 -1
  112. package/build/components/AmountConversionFilter/index.js +1 -1
  113. package/build/components/AmountInput/index.js +1 -1
  114. package/build/components/AmountSlider/index.js +1 -1
  115. package/build/components/AmountStatusChip/index.js +1 -1
  116. package/build/components/AnimatedSpinnerIcon/index.js +1 -1
  117. package/build/components/AppServices/index.js +1 -1
  118. package/build/components/AppServicesBar/index.js +1 -1
  119. package/build/components/AppWindowWrapper/index.js +1 -1
  120. package/build/components/AuthenticationTypeChip/index.js +1 -1
  121. package/build/components/Autocomplete/index.js +1 -1
  122. package/build/components/BetaBanner/index.js +1 -1
  123. package/build/components/BrandLogo/index.js +1 -1
  124. package/build/components/Button/index.js +1 -1
  125. package/build/components/Calender/index.js +1 -1
  126. package/build/components/CardEmptyState/index.js +1 -1
  127. package/build/components/Checkbox/index.js +1 -1
  128. package/build/components/Chip/index.js +1 -1
  129. package/build/components/ChipStack/index.js +1 -1
  130. package/build/components/CircularProgressWithLabel/index.js +1 -1
  131. package/build/components/Collapse/index.js +1 -1
  132. package/build/components/ColorPicker/index.js +1 -1
  133. package/build/components/ColumnViews/index.js +1 -1
  134. package/build/components/ConfirmDialog/index.js +1 -1
  135. package/build/components/CopyImage/index.js +1 -1
  136. package/build/components/CountBadge/index.js +1 -1
  137. package/build/components/CountryFilter/index.js +1 -1
  138. package/build/components/CountryFlag/index.js +1 -1
  139. package/build/components/CurrencyAmount/index.js +1 -1
  140. package/build/components/CurrencyFilter/index.js +1 -1
  141. package/build/components/CurrencySymbol/index.js +1 -1
  142. package/build/components/CustomBackdrop/index.js +1 -1
  143. package/build/components/Customer/index.js +1 -1
  144. package/build/components/DateFilter/index.js +1 -1
  145. package/build/components/DeviceIcon/index.js +1 -1
  146. package/build/components/Dialog/index.js +1 -1
  147. package/build/components/Discount/index.js +1 -1
  148. package/build/components/DisplayAmount/index.js +1 -1
  149. package/build/components/Dropdown2/index.js +1 -1
  150. package/build/components/DropdownButton/index.js +1 -1
  151. package/build/components/DropdownMenu/index.js +1 -1
  152. package/build/components/Error/index.js +1 -1
  153. package/build/components/ErrorToast/index.js +1 -1
  154. package/build/components/ExpandableSideBar/index.js +1 -1
  155. package/build/components/FieldFeedback/index.js +1 -1
  156. package/build/components/FileInputPreview/index.js +1 -1
  157. package/build/components/FilePreview/index.js +1 -1
  158. package/build/components/FileUpload/index.js +1 -1
  159. package/build/components/FileUploader/index.js +1 -1
  160. package/build/components/FilterDropdown/index.js +1 -1
  161. package/build/components/Filters/index.js +1 -1
  162. package/build/components/FlagDetails/index.js +1 -1
  163. package/build/components/FlippingCard/index.js +1 -1
  164. package/build/components/HeatMap/index.js +1 -1
  165. package/build/components/IOSSwitch/index.js +1 -1
  166. package/build/components/Icon/index.js +1 -1
  167. package/build/components/IconWithBadge/index.js +1 -1
  168. package/build/components/Input/index.js +1 -1
  169. package/build/components/InputBase/index.js +1 -1
  170. package/build/components/InputNumber/index.js +1 -1
  171. package/build/components/Inputs/index.js +1 -1
  172. package/build/components/JSONViewer/index.js +1 -1
  173. package/build/components/LanguageDropdown/index.js +1 -1
  174. package/build/components/LazyImage/index.js +1 -1
  175. package/build/components/LeftPeekRightExpandingChip/index.js +1 -1
  176. package/build/components/ListColumnFilter/index.js +1 -1
  177. package/build/components/ListHeader/index.js +1 -1
  178. package/build/components/ListLayout/index.js +1 -1
  179. package/build/components/Loader/index.js +1 -1
  180. package/build/components/MFWidgetLoader/index.js +1 -1
  181. package/build/components/MaskedText/index.js +1 -1
  182. package/build/components/Menu/index.js +1 -1
  183. package/build/components/MenuItem/index.js +1 -1
  184. package/build/components/MerchantCurrencyDropdown/index.js +1 -1
  185. package/build/components/MerchantLogo/index.js +1 -1
  186. package/build/components/MerchantsDropdown/index.js +1 -1
  187. package/build/components/MultiSelectDropdownButton/index.js +1 -1
  188. package/build/components/MultiSelectWithSearch/index.js +1 -1
  189. package/build/components/NestedDropdown/index.js +1 -1
  190. package/build/components/NoInternet/index.js +1 -1
  191. package/build/components/OpenFileInNewTab/index.js +1 -1
  192. package/build/components/PartnersFilter/index.js +1 -1
  193. package/build/components/PaymentSourceFilter/index.js +1 -1
  194. package/build/components/PhoneFilter/index.js +1 -1
  195. package/build/components/ProgressBar/index.js +1 -1
  196. package/build/components/ProgressRing/index.js +1 -1
  197. package/build/components/RFH/index.js +1 -1
  198. package/build/components/RadioButton/index.js +1 -1
  199. package/build/components/RadioGroup/index.js +1 -1
  200. package/build/components/RangeCalender/index.js +1 -1
  201. package/build/components/ReceiptsViewer/index.js +1 -1
  202. package/build/components/ReferenceTypeFilter/index.js +1 -1
  203. package/build/components/ResizableHeightInput/index.js +1 -1
  204. package/build/components/RightLeftExpandingCenterChip/index.js +1 -1
  205. package/build/components/SalesChannelFilter/index.js +1 -1
  206. package/build/components/ScrollLoader/index.js +1 -1
  207. package/build/components/SearchButton/index.js +1 -1
  208. package/build/components/SearchListInput/index.js +1 -1
  209. package/build/components/SelectDropdown/index.js +1 -1
  210. package/build/components/SelectWithSearch/index.js +1 -1
  211. package/build/components/SimpleDialog/index.js +1 -1
  212. package/build/components/Skeleton/index.js +1 -1
  213. package/build/components/Slider/index.js +1 -1
  214. package/build/components/StatusBar/index.js +1 -1
  215. package/build/components/StatusButton/index.js +1 -1
  216. package/build/components/StatusChip/index.js +1 -1
  217. package/build/components/StatusChipWithCopy/index.js +1 -1
  218. package/build/components/StatusFilter/index.js +1 -1
  219. package/build/components/StatusGroupChips/index.js +1 -1
  220. package/build/components/StatusIcons/index.js +1 -1
  221. package/build/components/StatusLabel/index.js +1 -1
  222. package/build/components/TableCells/index.js +1 -1
  223. package/build/components/TableReports/index.js +1 -1
  224. package/build/components/Timepicker/index.js +1 -1
  225. package/build/components/ToggleButtons/index.js +1 -1
  226. package/build/components/ToggleView/index.js +1 -1
  227. package/build/components/Toolbar/index.js +1 -1
  228. package/build/components/TooltipChip/index.js +1 -1
  229. package/build/components/TreeDropdown/index.js +1 -1
  230. package/build/components/VAT/index.js +1 -1
  231. package/build/components/VerificationIcon/index.js +1 -1
  232. package/build/components/ViewColumnRadioFilter/index.js +1 -1
  233. package/build/components/VirtualTables/index.js +1 -1
  234. package/build/components/Widget/index.js +1 -1
  235. package/build/components/WindowAppIcon/index.js +1 -1
  236. package/build/components/WindowBackdrop/index.js +1 -1
  237. package/build/components/WindowSideBar/index.js +1 -1
  238. package/build/components/_v2/index.js +1 -1
  239. package/build/components/index.js +1 -1
  240. package/build/hooks/index.js +1 -1
  241. package/build/index.js +1 -1
  242. package/build/utils/index.js +1 -1
  243. package/package.json +1 -1
  244. package/build/_chunks/chunk-OIVTFRJE.js +0 -1
  245. package/build/_chunks/chunk-PSRI6U2B.js +0 -1
@@ -1 +1 @@
1
- import {c}from'./chunk-2I5NAVTK.js';import {s}from'./chunk-WVGNLRZQ.js';import {memo,useState,useRef,useEffect}from'react';import {useTranslation}from'react-i18next';import S from'@mui/material/Box';import F from'@mui/material/Button';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var q=styled(S)(({theme:o})=>({background:o.palette.grey[700],width:27,height:14,display:"inline-flex",alignItems:"center",marginInlineStart:"4px",borderRadius:"10px",padding:"2px 6px",img:{cursor:"pointer"}})),K=styled(S)(()=>({padding:"8px 16px",display:"flex",gap:"8px",justifyContent:"center"})),L=styled(F)(({theme:o})=>({textTransform:"capitalize",minWidth:"auto",width:"100%",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}})),b=styled(F)(({theme:o})=>({textTransform:"capitalize",minWidth:"auto",width:"100%",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"}}));function N({onCloseDropdown:o,filter:i,styles:x,header:O,searchable:u}){let[E,V]=useState([]),{t:f}=useTranslation(),p=useRef([]),B=i?.options?.map(e=>e.value).join(",")??"";useEffect(()=>{let e=r=>{let n=i?.data?.[i.apiKey]??[];if(Array.isArray(n)&&n.length)return new Set(n).has(r)},s=r=>r.map(({placeholder:n,value:t,isSelected:a,icon:l,options:d})=>{let y;if(u){let c=p.current.find(C=>C.apiKey===t);y=c!==void 0?c.isSelected??false:(a||e(t)||d?.every(({value:C})=>e(C)))??false;}else y=(a||e(t)||d?.every(({value:c})=>e(c)))??false;return {...n&&{label:n},name:t,selected:y,...l&&{icon:l},...d?.length&&{menuItems:s(d)}}});i.options&&V(s(i.options));},[i?.data,B,u]);let h=()=>{p.current=[];},R=e=>{h(),o(e);},w=()=>{if(u){let e=new Set(i?.data?.[i.apiKey]??[]);p.current.forEach(({apiKey:s,options:r,isSelected:n})=>{r?r.forEach(({apiKey:t,isSelected:a})=>{a?e.add(t):e.delete(t);}):n?e.add(s):e.delete(s);}),i?.onConfirm?.({[i.apiKey]:[...e]});}else {let e=p.current.reduce((s,{options:r,apiKey:n,isSelected:t})=>{if(r){let a=r.filter(({isSelected:l})=>l);a.length&&s.push(...a.map(({apiKey:l})=>l));}else t&&s.push(n);return s},[]);p.current.length&&i?.onConfirm?.({[i.apiKey]:[...new Set(e)]});}h();},M=s(w,o),P=e=>{w(),o(e);},T=e=>{let s=n=>n.map(({name:t,selected:a,menuItems:l,label:d})=>({...d&&{placeholder:d},apiKey:t,isSelected:a,...l?.length&&{options:s(l)}})),r=s(e);if(u){let n=new Set(r.map(t=>t.apiKey));p.current=[...p.current.filter(t=>!n.has(t.apiKey)),...r];}else p.current=r;};return jsx(c,{"data-testid":"ColumnFilter_List",title:f("filterBy")||"Filter by",menuItems:E,style:x,sx:e=>({marginTop:"10px",textAlign:"left",boxShadow:e.shadows[3],".nested-menu-item":{height:41,zIndex:9999},...x}),updatedList:T,header:O,onKeyDown:M,footer:jsxs(K,{sx:{position:"sticky",bottom:0,backgroundColor:"white",zIndex:99999},children:[jsx(b,{onClick:R,children:f("cancel")},"nested-dropdown-cancel"),jsx(L,{onClick:P,children:f("okay")},"nested-dropdown-ok")]})})}var v=memo(N);var se=v;export{q as a,K as b,L as c,b as d,se as e};
1
+ import {c}from'./chunk-G2ULHE77.js';import {s}from'./chunk-RIKXHYPW.js';import {memo,useState,useRef,useEffect}from'react';import {useTranslation}from'react-i18next';import S from'@mui/material/Box';import F from'@mui/material/Button';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var q=styled(S)(({theme:o})=>({background:o.palette.grey[700],width:27,height:14,display:"inline-flex",alignItems:"center",marginInlineStart:"4px",borderRadius:"10px",padding:"2px 6px",img:{cursor:"pointer"}})),K=styled(S)(()=>({padding:"8px 16px",display:"flex",gap:"8px",justifyContent:"center"})),L=styled(F)(({theme:o})=>({textTransform:"capitalize",minWidth:"auto",width:"100%",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}})),b=styled(F)(({theme:o})=>({textTransform:"capitalize",minWidth:"auto",width:"100%",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"}}));function N({onCloseDropdown:o,filter:i,styles:x,header:O,searchable:u}){let[E,V]=useState([]),{t:f}=useTranslation(),p=useRef([]),B=i?.options?.map(e=>e.value).join(",")??"";useEffect(()=>{let e=r=>{let n=i?.data?.[i.apiKey]??[];if(Array.isArray(n)&&n.length)return new Set(n).has(r)},s=r=>r.map(({placeholder:n,value:t,isSelected:a,icon:l,options:d})=>{let y;if(u){let c=p.current.find(C=>C.apiKey===t);y=c!==void 0?c.isSelected??false:(a||e(t)||d?.every(({value:C})=>e(C)))??false;}else y=(a||e(t)||d?.every(({value:c})=>e(c)))??false;return {...n&&{label:n},name:t,selected:y,...l&&{icon:l},...d?.length&&{menuItems:s(d)}}});i.options&&V(s(i.options));},[i?.data,B,u]);let h=()=>{p.current=[];},R=e=>{h(),o(e);},w=()=>{if(u){let e=new Set(i?.data?.[i.apiKey]??[]);p.current.forEach(({apiKey:s,options:r,isSelected:n})=>{r?r.forEach(({apiKey:t,isSelected:a})=>{a?e.add(t):e.delete(t);}):n?e.add(s):e.delete(s);}),i?.onConfirm?.({[i.apiKey]:[...e]});}else {let e=p.current.reduce((s,{options:r,apiKey:n,isSelected:t})=>{if(r){let a=r.filter(({isSelected:l})=>l);a.length&&s.push(...a.map(({apiKey:l})=>l));}else t&&s.push(n);return s},[]);p.current.length&&i?.onConfirm?.({[i.apiKey]:[...new Set(e)]});}h();},M=s(w,o),P=e=>{w(),o(e);},T=e=>{let s=n=>n.map(({name:t,selected:a,menuItems:l,label:d})=>({...d&&{placeholder:d},apiKey:t,isSelected:a,...l?.length&&{options:s(l)}})),r=s(e);if(u){let n=new Set(r.map(t=>t.apiKey));p.current=[...p.current.filter(t=>!n.has(t.apiKey)),...r];}else p.current=r;};return jsx(c,{"data-testid":"ColumnFilter_List",title:f("filterBy")||"Filter by",menuItems:E,style:x,sx:e=>({marginTop:"10px",textAlign:"left",boxShadow:e.shadows[3],".nested-menu-item":{height:41,zIndex:9999},...x}),updatedList:T,header:O,onKeyDown:M,footer:jsxs(K,{sx:{position:"sticky",bottom:0,backgroundColor:"white",zIndex:99999},children:[jsx(b,{onClick:R,children:f("cancel")},"nested-dropdown-cancel"),jsx(L,{onClick:P,children:f("okay")},"nested-dropdown-ok")]})})}var v=memo(N);var se=v;export{q as a,K as b,L as c,b as d,se as e};
@@ -1 +1 @@
1
- import {a as a$1}from'./chunk-IWLYUUDJ.js';import {Jc}from'./chunk-OIVTFRJE.js';import {forwardRef,useId,useMemo,Children,useCallback,memo}from'react';import C from'@mui/material/Popper';import y from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var a=styled(y,{shouldForwardProp:o=>o!=="showShadow"})(({theme:o,showShadow:e})=>({borderRadius:o.spacing(.5),background:o.palette.background.default,width:"max-content",cursor:"pointer",boxShadow:o.shadows[11],display:"flex",flexDirection:"column",overflowY:"scroll",maxHeight:"432px","&:focus":{outline:"none"},".menu-item + .menu-item":{borderTop:`1px solid ${o.palette.divider}`},"&::after":{content:'""',width:"100%",height:"34px",position:"fixed",bottom:0,pointerEvents:"none",zIndex:999999,background:"linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #FFFFFF 100%)",transition:o.transitions.create("opacity",{duration:250}),...e?{opacity:1}:{opacity:0}}}));var R=forwardRef(({open:o,anchorEl:e,children:r,sx:c,placement:m,popperSx:u,dropdownProps:w,...f},h)=>{let x=Jc(useId(),"menu"),{onScrollHandler:t,showShadow:S}=a$1(),{onScroll:n,...P}=w||{},b=useMemo(()=>Children.count(r),[r])>12&&S,g=useCallback(p=>{t(p),n?.(p);},[t,n]);return jsx(C,{ref:h,id:x,"data-testid":"Menu",open:o,anchorEl:e,placement:m||"bottom-start",sx:u,...f,children:jsx(a,{showShadow:b,onScroll:g,className:"MuiPopper-dropdown",sx:c,...P,children:r})},"menu")}),l=memo(R);var K=l;export{K as a};
1
+ import {a as a$1}from'./chunk-IWLYUUDJ.js';import {Jc}from'./chunk-25IWFELL.js';import {forwardRef,useId,useMemo,Children,useCallback,memo}from'react';import C from'@mui/material/Popper';import y from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var a=styled(y,{shouldForwardProp:o=>o!=="showShadow"})(({theme:o,showShadow:e})=>({borderRadius:o.spacing(.5),background:o.palette.background.default,width:"max-content",cursor:"pointer",boxShadow:o.shadows[11],display:"flex",flexDirection:"column",overflowY:"scroll",maxHeight:"432px","&:focus":{outline:"none"},".menu-item + .menu-item":{borderTop:`1px solid ${o.palette.divider}`},"&::after":{content:'""',width:"100%",height:"34px",position:"fixed",bottom:0,pointerEvents:"none",zIndex:999999,background:"linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #FFFFFF 100%)",transition:o.transitions.create("opacity",{duration:250}),...e?{opacity:1}:{opacity:0}}}));var R=forwardRef(({open:o,anchorEl:e,children:r,sx:c,placement:m,popperSx:u,dropdownProps:w,...f},h)=>{let x=Jc(useId(),"menu"),{onScrollHandler:t,showShadow:S}=a$1(),{onScroll:n,...P}=w||{},b=useMemo(()=>Children.count(r),[r])>12&&S,g=useCallback(p=>{t(p),n?.(p);},[t,n]);return jsx(C,{ref:h,id:x,"data-testid":"Menu",open:o,anchorEl:e,placement:m||"bottom-start",sx:u,...f,children:jsx(a,{showShadow:b,onScroll:g,className:"MuiPopper-dropdown",sx:c,...P,children:r})},"menu")}),l=memo(R);var K=l;export{K as a};
@@ -1 +1 @@
1
- import {a as a$4}from'./chunk-4GLLOAFY.js';import {a as a$3}from'./chunk-5H7WMTMR.js';import {j,a as a$5}from'./chunk-L5JCONCT.js';import {a}from'./chunk-AC4KAKGY.js';import {a as a$2}from'./chunk-XLWWA6CJ.js';import {a as a$1}from'./chunk-4VFSZWB2.js';import {wc,Jc,y}from'./chunk-OIVTFRJE.js';import {Sc,Tc,Ni,Oi,Pi,bc,cc,Qi,jn,ac}from'./chunk-3JUTMTQV.js';import {memo,forwardRef,useState,useMemo,useRef,useId,useEffect,useCallback}from'react';import S from'@mui/material/Box';import Rt from'@mui/material/Collapse';import xt from'@mui/material/Popper';import Pt from'dayjs';import {useTranslation}from'react-i18next';import {Calendar,DateObject}from'react-multi-date-picker';import No from'@mui/material/ClickAwayListener';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';import he from'@mui/material/Button';import q from'react-date-object';import et from'react-date-object/calendars/arabic';import ot from'react-date-object/calendars/gregorian';import tt from'react-date-object/locales/arabic_ar';import rt from'react-date-object/locales/arabic_en';import nt from'react-date-object/locales/gregorian_ar';import it from'react-date-object/locales/gregorian_en';var Ue=styled(S)(({theme:e})=>({color:e.palette.grey[700],fontSize:"9px",fontWeight:500,marginBottom:"6px"})),Ne=styled(S,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:o})=>({borderRadius:"4px",border:`1px solid ${e.palette.divider}`,background:e.palette.common.white,height:32,padding:"8px",display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",...o&&{border:`1px solid ${e.palette.info.dark}`,background:e.palette.common.white,boxShadow:e.shadows[7]}})),Ke=styled(S)(({theme:e})=>({borderRadius:"8px",background:e.palette.common.white,boxShadow:"0px 8px 36px 0px rgba(0, 0, 0, 0.15)",textAlign:"center",color:e.palette.grey[900],fontSize:"12px",fontWeight:500,lineHeight:"20px",letterSpacing:"0.1px",padding:"16px",display:"flex",alignItems:"center",justifyContent:"center",gap:"12px",flexDirection:"column"})),_e=styled(S)(({theme:e})=>({width:71,padding:"4px 0",cursor:"pointer","&:hover, &.active":{borderRadius:"100px",background:e.palette.info.light}}));var Ze={day:"Day",month:"Month",quarter:"Quarter",year:"Year"};function _o({sx:e,groupBy:o,isCalenderOpen:a$1,onUpdate:t}){let[n,p]=useState(null),l=!!n&&a$1,{t:m}=useTranslation(),c=()=>{p(null);},u=d=>{p(d.currentTarget);},s=d=>{t?.(d),c();};return jsx(No,{onClickAway:c,children:jsxs(S,{sx:e,children:[jsx(Ue,{children:m("groupedBy")}),jsxs(Ne,{onClick:u,open:l,children:[jsx("span",{children:Ze[o]}),jsx(S,{component:"img",src:Tc,alt:"arrow",sx:{...l&&{transform:"rotate(180deg)"}}})]}),jsx(a,{open:l,anchorEl:n,children:jsx(Ke,{sx:{width:n?.clientWidth},children:Object.entries(Ze).map(([d,i])=>jsx(_e,{onClick:()=>{s(d);},className:o===d?"active":"",children:i},`${d}-groupedBy`))})})]})})}var Xe=memo(_o);var Ve=Xe;var eo=styled(S)(({theme:e})=>({border:"1px solid",borderColor:e.palette.divider,borderRadius:"50px",paddingInline:"6px 12px",color:e.palette.text.primary,fontSize:"11px",display:"flex",gap:"8px",alignItems:"center",justifyContent:"space-between",height:32,marginTop:"8px",img:{width:16,height:16},"& > div":{display:"flex",alignItems:"center",gap:"2px"}}));function le({isHijri:e,onCalendarModeSwitch:o}){let{t:a}=useTranslation(),t=()=>{o?.(e?"gregorian":"hijri");};return jsx(S,{children:jsxs(eo,{children:[jsxs(S,{children:[jsx("img",{src:ac,alt:"hijri"}),jsx("span",{children:a("hijri")})]}),jsx(a$4,{checked:e,onChange:t})]})})}var ro=le;var io=styled(he)(({theme:e})=>({cursor:"pointer",borderRadius:"50px",border:"1px solid",borderColor:e.palette.divider,background:e.palette.common.white,color:e.palette.text.primary,fontSize:"11px",fontWeight:e.typography.fontWeightRegular,paddingInline:"12px",height:32,width:"max-content",textTransform:"unset","&:hover":{boxShadow:e.shadows[7],border:"1px solid",borderColor:e.palette.info.dark}})),ao=styled(S)(()=>({display:"flex",flexDirection:"column",gap:"8px"}));var Z=({isHijri:e,isAr:o=false})=>e?o?tt:rt:o?nt:it,J=e=>e?et:ot,M=e=>e.setHour(0).setMinute(0).setSecond(0).setMillisecond(0),B=e=>e.setHour(23).setMinute(59).setSecond(59).setMillisecond(999),X=e=>{if(!(e?.[0]instanceof Date)||!(e?.[1]instanceof Date)){let[o,a]=y();return [new q(o),new q(a)]}return [new q(e?.[0]),new q(e?.[1])]};function ce({onChange:e,isHijri:o,isAr:a=false}){let t={locale:Z({isHijri:o,isAr:a}),calendar:J(o)},n=useMemo(()=>[{id:"today",value:[new DateObject(t),new DateObject(t)]},{id:"lastWeek",value:[new DateObject(t).subtract(6,"day"),new DateObject(t)]},{id:"lastMonth",value:[new DateObject(t).subtract(30,"day"),new DateObject(t)]},{id:new DateObject(t).subtract(1,"month").toFirstOfMonth().format("MMMM YYYY"),value:[new DateObject(t).subtract(1,"month").toFirstOfMonth(),new DateObject(t).subtract(1,"month").toLastOfMonth()]},{id:new DateObject(t).subtract(2,"month").toFirstOfMonth().format("MMMM YYYY"),value:[new DateObject(t).subtract(2,"month").toFirstOfMonth(),new DateObject(t).subtract(2,"month").toLastOfMonth()]},{id:new DateObject(t).subtract(3,"month").toFirstOfMonth().format("MMMM YYYY"),value:[new DateObject(t).subtract(3,"month").toFirstOfMonth(),new DateObject(t).subtract(3,"month").toLastOfMonth()]}],[o,a]),{t:p}=useTranslation();return jsx(S,{"data-testid":"RangeCalender_QuickFilters",children:jsx(ao,{children:n.map(l=>jsx(io,{onClick:m=>{m.preventDefault(),e(l.value);},children:p(l.id)},l.id))})})}var po=ce;var so=styled(he)(()=>({minWidth:"auto",padding:0,"& > img":{cursor:"pointer"}}));var ut=["Su","Mo","Tu","We","Th","Fr","Sa"];function ft({isAr:e=false,isHijri:o,values:a,onChange:t,numberOfMonths:n=2,...p},l){let m=c=>c==="right"?e?bc:cc:e?cc:bc;return jsx(Calendar,{ref:l,numberOfMonths:n,value:a,onChange:t,calendar:J(o),locale:Z({isHijri:o,isAr:e}),range:true,format:"MMM DD",monthYearSeparator:" ",renderButton:(c,u)=>jsx(so,{onClick:u,children:jsx("img",{src:m(c),alt:"arrow"})}),weekDays:e?void 0:ut,maxDate:new Date,...p})}var lo=forwardRef(ft);var mo=lo;var co=styled(S)(()=>({'[class$="-IndicatorsContainer2"]':{display:"none"},"#react-select-2-listbox":{width:300}})),V=styled(S)(({theme:e})=>({borderRadius:e.spacing(.5),border:`1px solid ${e.palette.divider}`,background:e.palette.common.white,boxShadow:e.shadows[10],minWidth:200,width:"max-content",overflow:"auto"})),uo=styled(S,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:o})=>({width:156,fontSize:"11px",color:e.palette.text.primary,border:"1px solid",borderColor:e.palette.divider,minHeight:32,borderRadius:"4px",padding:e.spacing(1),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",cursor:"pointer",display:"flex",alignItems:"center",gap:e.spacing(1),fontWeight:500,...o&&{borderRadius:"4px",boxShadow:e.shadows[7],border:"1px solid",borderColor:e.palette.info.dark,background:e.palette.common.white},span:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}})),L=styled(S)(({theme:e})=>({padding:e.spacing(1),color:e.palette.text.primary,fontSize:"11px",display:"flex",alignItems:"center",gap:e.spacing(1),height:33,cursor:"pointer","&:hover":{boxShadow:"0px 0px 16px 0px #00000021"},"&+&":{borderTop:"1px solid",borderColor:e.palette.divider},"&.active span":{fontWeight:500},span:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}})),A=styled(S)(()=>({width:12,height:12})),W=styled(S)(({theme:e})=>({fontSize:"11px",color:e.palette.text.secondary,lineHeight:"15.03px","&.selected":{color:e.palette.info.dark}}));function ge({selectedTimezone:e,onChange:o,timezoneCountriesCodes:a,defaultCountryTimezone:t}){let[n,p]=useState(null),l=i=>{n||p(i.currentTarget);},m=()=>{n&&p(null);},c=(i,D)=>{i.stopPropagation(),o(D);},u=useMemo(()=>a?.map(i=>wc(i)),[a]),s=useMemo(()=>u?.some(i=>e?.timezone===i?.timezone),[u,e]),d=useMemo(()=>e&&s?e:t,[e,t,s]);return jsxs(L,{onMouseEnter:l,onMouseLeave:m,onClick:()=>{e&&o(d);},children:[s?jsx("img",{src:Qi,alt:"icon"}):jsx(A,{}),jsx("img",{src:Oi,alt:"entity-timezone"}),jsx(a$1,{countryCode:d?.countryCode}),jsx(W,{className:s?"selected":"",children:s?e?.label:t?.label}),jsx(xt,{open:!!n,anchorEl:n,placement:"right-start",sx:{zIndex:3},disablePortal:true,children:jsx(V,{sx:{maxHeight:300},children:u?.map((i,D)=>{let j=i?.timezone===e?.timezone;return jsxs(L,{onClick:te=>{c(te,i);},sx:{gap:"4px"},children:[j?jsx("img",{src:Qi,alt:"icon"}):jsx(A,{}),jsx(a$1,{countryCode:i?.countryCode}),jsx(W,{className:j?"selected":"",children:i?.label})]},`timezone-item-${D}`)})})})]})}function xe({onChange:e,selectedTimezone:o,browserTimezone:a}){let t=useMemo(()=>jn.find(({timezone:l})=>l===a),[a]),n=()=>{t&&e(t);},p=t?.timezone===o?.timezone;return jsxs(L,{onClick:n,children:[p?jsx("img",{src:Qi,alt:"icon"}):jsx(A,{}),jsx("img",{src:Ni,alt:"user-timezone"}),jsx(a$1,{countryCode:t?.countryCode}),jsx(W,{className:p?"selected":"",children:t?.label})]})}function zt({onChange:e,selectedTimezone:o,browserTimezone:a,defaultCountryTimezone:t,timezoneCountriesCodes:n}){let[p,l]=useState(null),m=!!p,c=()=>{l(null);},u=i=>{e(i),c();},s=i=>{l(i.currentTarget);},d=useMemo(()=>a===o?.timezone?Ni:o?.timezone===t.timezone?Oi:Pi,[a,t.timezone,o?.timezone]);return jsx(No,{onClickAway:c,children:jsxs(co,{"data-testid":"CustomTimezone",children:[jsxs(uo,{open:m,onClick:s,children:[jsx("img",{src:d,alt:"timezone-icon"}),jsx(a$1,{countryCode:o?.countryCode}),jsx("span",{children:o?.label})]}),jsx(xt,{open:m,anchorEl:p,placement:"top-start",sx:{zIndex:1400},children:jsxs(V,{"data-testid":"CustomTimezone_dropdown",children:[jsx(ge,{onChange:u,selectedTimezone:o,defaultCountryTimezone:t,timezoneCountriesCodes:n}),jsx(xe,{onChange:u,selectedTimezone:o,browserTimezone:a})]})})]})})}var go=memo(zt);var xo=go;var bo=styled(S)(({theme:e})=>({display:"flex",marginTop:"8px",background:e.palette.common.white,boxShadow:e.shadows[9],borderRadius:e.spacing(1),color:e.palette.text.primary,fontSize:"11px",".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"},".rmdp-day.rmdp-disabled":{color:"#ccc",cursor:"not-allowed"}})),ho=styled(he)(({theme:e})=>({textTransform:"capitalize",padding:"8px 24px",width:75,height:32,fontSize:"11px",background:"transparent",color:e.palette.text.primary,border:"1px solid",borderColor:e.palette.divider,fontWeight:500,borderRadius:"4px","&:hover":{background:"transparent",color:e.palette.text.primary}})),yo=styled(he)(({theme:e})=>({textTransform:"capitalize",padding:"8px 24px",width:75,height:32,fontSize:"11px",borderRadius:"4px",fontWeight:700,background:e.palette.info.dark,"&:hover":{background:e.palette.info.dark}})),wo=styled(S)(()=>({display:"flex",gap:8})),Co=styled(he,{shouldForwardProp:e=>e!=="open"})(({open:e,theme:o})=>({color:o.palette.text.primary,fontSize:"11px",fontWeight:500,padding:o.spacing(1),borderRadius:"4px",border:"1px solid",borderColor:o.palette.divider,background:o.palette.common.white,textTransform:"none",height:32,...e&&{border:"1px solid",borderColor:o.palette.info.dark,boxShadow:o.shadows[7]}})),To=styled(S)(({theme:e})=>({background:e.palette.common.white,display:"flex",justifyContent:"space-between",alignItems:"center",gap:10,padding:"16px",borderTop:"1px solid",borderColor:e.palette.divider,borderBottomRightRadius:"8px"})),ko=styled(S)(({theme:e})=>({padding:16,paddingInlineEnd:"23px",borderRight:"1px solid",borderColor:e.palette.divider,background:e.palette.common.white,width:"max-content",borderTopLeftRadius:"8px",borderBottomLeftRadius:"8px",display:"flex",flexDirection:"column",gap:10,justifyContent:"space-between"})),zo=styled(S)(()=>({display:"flex",alignItems:"center",gap:"10px"})),So=styled(S)(()=>({position:"relative"})),vo=styled(S)(()=>({display:"flex",flexDirection:"column",gap:"24px"}));var Do=styled(S,{shouldForwardProp:e=>e!=="isAllDay"})(({theme:e,isAllDay:o})=>({display:"flex",alignItems:"center",gap:e.spacing(1),position:"relative",paddingInline:"5px",".label":{width:"max-content"},...!o&&{paddingRight:e.spacing(1),"&:after":{content:'""',position:"absolute",width:"1px",background:e.palette.divider,right:0,height:17}}})),Mo=styled(S)(()=>({width:235})),Bo=styled(S)(({theme:e})=>({display:"flex",gap:"4px",".rmdp-input":{width:"64px",borderRadius:"19px",border:"1px solid",borderColor:e.palette.divider,color:e.palette.text.primary,fontSize:"11px",fontWeight:500,background:"transparent",cursor:"pointer"},".rmdp-input:focus":{boxShadow:e.shadows[7],border:`1px solid ${e.palette.info.dark}`,borderRadius:"19px"},".rmdp-time-picker":{boxShadow:e.shadows[5],borderRadius:e.spacing(1),padding:e.spacing(2),minWidth:"auto !important",div:{marginTop:0,display:"block"},"> div":{width:32,height:64},".rmdp-arrow":{borderColor:`${e.palette.background.transparent[1]} !important`},".rmdp-arrow-container":{justifyContent:"center","&:hover":{backgroundColor:"transparent",boxShadow:"unset"}},input:{borderRadius:"4px",border:`1px solid ${e.palette.divider}`,padding:0,width:32,height:32,fontSize:"11px",color:e.palette.text.primary,fontWeight:500,"&:focus, &:focus-visible":{border:`1px solid ${e.palette.info.dark}`,outline:"unset"}},".dvdr":{margin:"7px 4px 0"},".rmdp-am, .rmdp-pm":{margin:0,width:32,height:32,flex:"auto",justifyContent:"center",fontSize:"11px",color:e.palette.text.primary,fontWeight:500,display:"flex",cursor:"default"},"> div:last-child":{marginInlineStart:"4px",display:"block !important"},".rmdp-down, .rmdp-up":{position:"relative",i:{display:"none"},"&:before":{content:'""',position:"absolute",top:"5px",width:"10px",height:"10px",backgroundImage:`url(${Sc})`}},".rmdp-down:before":{transform:"rotate(180deg)"}},".rmdp-container":{position:"relative","> div":{top:"unset !important",bottom:"28px",transform:"unset !important"}}})),Eo=styled(S)(({theme:e})=>({display:"flex",gap:"8px",alignItems:"center",borderRadius:"50px",border:"1px solid",borderColor:e.palette.divider,paddingInline:"5px",width:"fit-content",height:32}));function Dt({values:e,setValues:o}){let{t:a}=useTranslation(),t=new DateObject(e[0]),n=new DateObject(e[1]),[p,l]=useState(t.dayOfYear===n.dayOfYear&&t.hour===0&&t.minute===0&&n.hour===23&&n.minute===59),m=({period:s,hour:d})=>s==="PM"&&d!==12?d+12:s==="AM"&&d===12?0:d,c=({hour:s,minute:d,period:i})=>{o([t.setHour(m({hour:s,period:i})).setMinute(d).setSecond(0),n]);},u=({hour:s,minute:d,period:i})=>{o([t,n.setHour(m({hour:s,period:i})).setMinute(d).setSecond(59)]);};return jsx(Mo,{children:jsxs(Eo,{children:[jsxs(Do,{isAllDay:p,children:[jsx("span",{className:"label",children:a("allDay")}),jsx(a$4,{checked:p,onChange:s=>{l(!p),s.target.checked?o([M(e[0]),B(e[1])]):o(e);}})]}),!p&&jsxs(Bo,{children:[jsx(j,{defaultTime:{hour:a$5(t.hour),minute:t.minute,period:t.hour>=12?"PM":"AM"},size:"small",onChange:c,enableRealTimeChange:true},`${e[0]?.toString()}-start`),jsx(j,{defaultTime:{hour:a$5(n.hour),minute:n.minute,period:n.hour>=12?"PM":"AM"},size:"small",onChange:u,enableRealTimeChange:true},`${e[1]?.toString()}-end`)]})]})})}var Ro=Dt;var Io=Ro;function At({defaultDate:e,onDateChange:o,mode:a="gregorian",onCalendarModeSwitch:t,numberOfMonths:n,noTimezone:p,noQuickFilter:l,maxDateRange:m,onCalendarGroupChange:c,groupBy:u,timezone:s,onChangeTimezone:d,browserTimezone:i,renderCalendarButton:D,mainSx:j,popperProps:te,rangeDatePickerProps:Ao,defaultCountryTimezone:Ce,timezoneCountriesCodes:Te}){let[w,ke]=useState(X(e)),[x,C]=useState(w),[ze,Se]=useState(s??null),[ve,Wo]=useState(u||"day"),[De,Me]=useState(null),y=!!De,[Be,Ee]=useState(false),{t:re}=useTranslation(),I=useRef(null),Fo=Jc(useId(),"range-calender"),ne=a==="hijri",Y=()=>{Me(null);},Oe=r=>{Me(r.currentTarget);};useEffect(()=>{if(!y){if(n===1)return;C(X(e));}},[y]),useEffect(()=>{if(e){let r=X(e);ke(r),C(r),I.current&&I.current.set("date",r[0]);}},[e]),useEffect(()=>{Se(s??null);},[s,y]);let Re=()=>{ke(x),Y();let r;x[0].dayOfYear===x[1].dayOfYear?r=[x[0],x[1]]:r=[M(x[0]),B(x[1])],o([r[0].toDate(),r[1].toDate()]),c?.(ve||"day"),d?.(ze);},Ho=useCallback(()=>{let r=w[0].format("MMM D"),G=w[1]?w[1].format("MMM D"):w[0].format("MMM D");return r===G&&!p?r:`${r} - ${G}`},[w,p]),jo=r=>{if(r.length<2||!m){C(r);return}let G=M(r[0]).toDate(),$o=B(r[1]).toDate(),Ie=Pt($o).diff(G,"day");if(Ie<=m){C(r);return}Ee(true),C([r[0],r[1].subtract(Ie-m,"d")]),setTimeout(()=>{Ee(false);},3e3);},Yo=r=>{C([M(r[0]),B(r[1])]),I.current&&I.current.set("date",r[0]);},Go=r=>{r.key==="Enter"&&x[1]&&!Be?(r.stopPropagation(),Re()):r.key==="Escape"&&(r.stopPropagation(),Y());};return jsxs(So,{id:Fo,"data-testid":"RangeCalender",sx:j,children:[D?D(y,Oe):jsx(Co,{onClick:Oe,open:y,children:(w[0]||w[1])&&Ho()}),y&&jsx(a$2,{onClick:r=>{r.stopPropagation(),Y();}}),jsx(xt,{open:y,anchorEl:De,placement:"bottom-end",...te,children:jsxs(bo,{onKeyDown:Go,children:[!l&&jsxs(ko,{children:[jsx(po,{onChange:Yo,isHijri:ne}),jsxs(vo,{children:[u&&jsx(Ve,{groupBy:ve,isCalenderOpen:y,onUpdate:r=>{Wo(r);}}),jsx(ro,{isHijri:ne,onCalendarModeSwitch:t})]})]}),jsxs(S,{sx:{display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[jsx(mo,{values:x,onChange:jo,isHijri:ne,ref:I,numberOfMonths:n,...Ao}),jsx(Rt,{in:Be&&!!m,children:jsx(a$3,{error:re("dateRangeError",{number:m}),sx:{marginInline:"16px",marginBottom:"16px"}})}),jsxs(To,{sx:{borderBottomLeftRadius:"8px"},children:[!p&&Ce&&i&&Te?jsx(zo,{children:jsx(xo,{onChange:Se,selectedTimezone:ze,browserTimezone:i,defaultCountryTimezone:Ce,timezoneCountriesCodes:Te},String(y))}):jsx("div",{}),new DateObject(x[0]).dayOfYear===new DateObject(x[1]).dayOfYear&&jsx(Io,{values:x,setValues:C}),jsxs(wo,{children:[jsx(ho,{variant:"contained",onClick:Y,children:re("cancel")}),jsx(yo,{variant:"contained",onClick:Re,disabled:!x[1],children:re("okay")})]})]})]})]})})]})}var Lo=At;var xi=Lo;export{xi as a};
1
+ import {a as a$4}from'./chunk-ANJRT2B4.js';import {a as a$3}from'./chunk-IQGGEFTS.js';import {j,a as a$5}from'./chunk-3MIQWQQL.js';import {a}from'./chunk-CRGXVUQV.js';import {a as a$1}from'./chunk-YDPDHWVC.js';import {a as a$2}from'./chunk-DSFHY45V.js';import {wc,Jc,y}from'./chunk-25IWFELL.js';import {Sc,Tc,Ni,Oi,Pi,bc,cc,Qi,jn,ac}from'./chunk-3JUTMTQV.js';import {memo,forwardRef,useState,useMemo,useRef,useId,useEffect,useCallback}from'react';import S from'@mui/material/Box';import Rt from'@mui/material/Collapse';import xt from'@mui/material/Popper';import Pt from'dayjs';import {useTranslation}from'react-i18next';import {Calendar,DateObject}from'react-multi-date-picker';import No from'@mui/material/ClickAwayListener';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';import he from'@mui/material/Button';import q from'react-date-object';import et from'react-date-object/calendars/arabic';import ot from'react-date-object/calendars/gregorian';import tt from'react-date-object/locales/arabic_ar';import rt from'react-date-object/locales/arabic_en';import nt from'react-date-object/locales/gregorian_ar';import it from'react-date-object/locales/gregorian_en';var Ue=styled(S)(({theme:e})=>({color:e.palette.grey[700],fontSize:"9px",fontWeight:500,marginBottom:"6px"})),Ne=styled(S,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:o})=>({borderRadius:"4px",border:`1px solid ${e.palette.divider}`,background:e.palette.common.white,height:32,padding:"8px",display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",...o&&{border:`1px solid ${e.palette.info.dark}`,background:e.palette.common.white,boxShadow:e.shadows[7]}})),Ke=styled(S)(({theme:e})=>({borderRadius:"8px",background:e.palette.common.white,boxShadow:"0px 8px 36px 0px rgba(0, 0, 0, 0.15)",textAlign:"center",color:e.palette.grey[900],fontSize:"12px",fontWeight:500,lineHeight:"20px",letterSpacing:"0.1px",padding:"16px",display:"flex",alignItems:"center",justifyContent:"center",gap:"12px",flexDirection:"column"})),_e=styled(S)(({theme:e})=>({width:71,padding:"4px 0",cursor:"pointer","&:hover, &.active":{borderRadius:"100px",background:e.palette.info.light}}));var Ze={day:"Day",month:"Month",quarter:"Quarter",year:"Year"};function _o({sx:e,groupBy:o,isCalenderOpen:a$1,onUpdate:t}){let[n,p]=useState(null),l=!!n&&a$1,{t:m}=useTranslation(),c=()=>{p(null);},u=d=>{p(d.currentTarget);},s=d=>{t?.(d),c();};return jsx(No,{onClickAway:c,children:jsxs(S,{sx:e,children:[jsx(Ue,{children:m("groupedBy")}),jsxs(Ne,{onClick:u,open:l,children:[jsx("span",{children:Ze[o]}),jsx(S,{component:"img",src:Tc,alt:"arrow",sx:{...l&&{transform:"rotate(180deg)"}}})]}),jsx(a,{open:l,anchorEl:n,children:jsx(Ke,{sx:{width:n?.clientWidth},children:Object.entries(Ze).map(([d,i])=>jsx(_e,{onClick:()=>{s(d);},className:o===d?"active":"",children:i},`${d}-groupedBy`))})})]})})}var Xe=memo(_o);var Ve=Xe;var eo=styled(S)(({theme:e})=>({border:"1px solid",borderColor:e.palette.divider,borderRadius:"50px",paddingInline:"6px 12px",color:e.palette.text.primary,fontSize:"11px",display:"flex",gap:"8px",alignItems:"center",justifyContent:"space-between",height:32,marginTop:"8px",img:{width:16,height:16},"& > div":{display:"flex",alignItems:"center",gap:"2px"}}));function le({isHijri:e,onCalendarModeSwitch:o}){let{t:a}=useTranslation(),t=()=>{o?.(e?"gregorian":"hijri");};return jsx(S,{children:jsxs(eo,{children:[jsxs(S,{children:[jsx("img",{src:ac,alt:"hijri"}),jsx("span",{children:a("hijri")})]}),jsx(a$4,{checked:e,onChange:t})]})})}var ro=le;var io=styled(he)(({theme:e})=>({cursor:"pointer",borderRadius:"50px",border:"1px solid",borderColor:e.palette.divider,background:e.palette.common.white,color:e.palette.text.primary,fontSize:"11px",fontWeight:e.typography.fontWeightRegular,paddingInline:"12px",height:32,width:"max-content",textTransform:"unset","&:hover":{boxShadow:e.shadows[7],border:"1px solid",borderColor:e.palette.info.dark}})),ao=styled(S)(()=>({display:"flex",flexDirection:"column",gap:"8px"}));var Z=({isHijri:e,isAr:o=false})=>e?o?tt:rt:o?nt:it,J=e=>e?et:ot,M=e=>e.setHour(0).setMinute(0).setSecond(0).setMillisecond(0),B=e=>e.setHour(23).setMinute(59).setSecond(59).setMillisecond(999),X=e=>{if(!(e?.[0]instanceof Date)||!(e?.[1]instanceof Date)){let[o,a]=y();return [new q(o),new q(a)]}return [new q(e?.[0]),new q(e?.[1])]};function ce({onChange:e,isHijri:o,isAr:a=false}){let t={locale:Z({isHijri:o,isAr:a}),calendar:J(o)},n=useMemo(()=>[{id:"today",value:[new DateObject(t),new DateObject(t)]},{id:"lastWeek",value:[new DateObject(t).subtract(6,"day"),new DateObject(t)]},{id:"lastMonth",value:[new DateObject(t).subtract(30,"day"),new DateObject(t)]},{id:new DateObject(t).subtract(1,"month").toFirstOfMonth().format("MMMM YYYY"),value:[new DateObject(t).subtract(1,"month").toFirstOfMonth(),new DateObject(t).subtract(1,"month").toLastOfMonth()]},{id:new DateObject(t).subtract(2,"month").toFirstOfMonth().format("MMMM YYYY"),value:[new DateObject(t).subtract(2,"month").toFirstOfMonth(),new DateObject(t).subtract(2,"month").toLastOfMonth()]},{id:new DateObject(t).subtract(3,"month").toFirstOfMonth().format("MMMM YYYY"),value:[new DateObject(t).subtract(3,"month").toFirstOfMonth(),new DateObject(t).subtract(3,"month").toLastOfMonth()]}],[o,a]),{t:p}=useTranslation();return jsx(S,{"data-testid":"RangeCalender_QuickFilters",children:jsx(ao,{children:n.map(l=>jsx(io,{onClick:m=>{m.preventDefault(),e(l.value);},children:p(l.id)},l.id))})})}var po=ce;var so=styled(he)(()=>({minWidth:"auto",padding:0,"& > img":{cursor:"pointer"}}));var ut=["Su","Mo","Tu","We","Th","Fr","Sa"];function ft({isAr:e=false,isHijri:o,values:a,onChange:t,numberOfMonths:n=2,...p},l){let m=c=>c==="right"?e?bc:cc:e?cc:bc;return jsx(Calendar,{ref:l,numberOfMonths:n,value:a,onChange:t,calendar:J(o),locale:Z({isHijri:o,isAr:e}),range:true,format:"MMM DD",monthYearSeparator:" ",renderButton:(c,u)=>jsx(so,{onClick:u,children:jsx("img",{src:m(c),alt:"arrow"})}),weekDays:e?void 0:ut,maxDate:new Date,...p})}var lo=forwardRef(ft);var mo=lo;var co=styled(S)(()=>({'[class$="-IndicatorsContainer2"]':{display:"none"},"#react-select-2-listbox":{width:300}})),V=styled(S)(({theme:e})=>({borderRadius:e.spacing(.5),border:`1px solid ${e.palette.divider}`,background:e.palette.common.white,boxShadow:e.shadows[10],minWidth:200,width:"max-content",overflow:"auto"})),uo=styled(S,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:o})=>({width:156,fontSize:"11px",color:e.palette.text.primary,border:"1px solid",borderColor:e.palette.divider,minHeight:32,borderRadius:"4px",padding:e.spacing(1),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",cursor:"pointer",display:"flex",alignItems:"center",gap:e.spacing(1),fontWeight:500,...o&&{borderRadius:"4px",boxShadow:e.shadows[7],border:"1px solid",borderColor:e.palette.info.dark,background:e.palette.common.white},span:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}})),L=styled(S)(({theme:e})=>({padding:e.spacing(1),color:e.palette.text.primary,fontSize:"11px",display:"flex",alignItems:"center",gap:e.spacing(1),height:33,cursor:"pointer","&:hover":{boxShadow:"0px 0px 16px 0px #00000021"},"&+&":{borderTop:"1px solid",borderColor:e.palette.divider},"&.active span":{fontWeight:500},span:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}})),A=styled(S)(()=>({width:12,height:12})),W=styled(S)(({theme:e})=>({fontSize:"11px",color:e.palette.text.secondary,lineHeight:"15.03px","&.selected":{color:e.palette.info.dark}}));function ge({selectedTimezone:e,onChange:o,timezoneCountriesCodes:a,defaultCountryTimezone:t}){let[n,p]=useState(null),l=i=>{n||p(i.currentTarget);},m=()=>{n&&p(null);},c=(i,D)=>{i.stopPropagation(),o(D);},u=useMemo(()=>a?.map(i=>wc(i)),[a]),s=useMemo(()=>u?.some(i=>e?.timezone===i?.timezone),[u,e]),d=useMemo(()=>e&&s?e:t,[e,t,s]);return jsxs(L,{onMouseEnter:l,onMouseLeave:m,onClick:()=>{e&&o(d);},children:[s?jsx("img",{src:Qi,alt:"icon"}):jsx(A,{}),jsx("img",{src:Oi,alt:"entity-timezone"}),jsx(a$1,{countryCode:d?.countryCode}),jsx(W,{className:s?"selected":"",children:s?e?.label:t?.label}),jsx(xt,{open:!!n,anchorEl:n,placement:"right-start",sx:{zIndex:3},disablePortal:true,children:jsx(V,{sx:{maxHeight:300},children:u?.map((i,D)=>{let j=i?.timezone===e?.timezone;return jsxs(L,{onClick:te=>{c(te,i);},sx:{gap:"4px"},children:[j?jsx("img",{src:Qi,alt:"icon"}):jsx(A,{}),jsx(a$1,{countryCode:i?.countryCode}),jsx(W,{className:j?"selected":"",children:i?.label})]},`timezone-item-${D}`)})})})]})}function xe({onChange:e,selectedTimezone:o,browserTimezone:a}){let t=useMemo(()=>jn.find(({timezone:l})=>l===a),[a]),n=()=>{t&&e(t);},p=t?.timezone===o?.timezone;return jsxs(L,{onClick:n,children:[p?jsx("img",{src:Qi,alt:"icon"}):jsx(A,{}),jsx("img",{src:Ni,alt:"user-timezone"}),jsx(a$1,{countryCode:t?.countryCode}),jsx(W,{className:p?"selected":"",children:t?.label})]})}function zt({onChange:e,selectedTimezone:o,browserTimezone:a,defaultCountryTimezone:t,timezoneCountriesCodes:n}){let[p,l]=useState(null),m=!!p,c=()=>{l(null);},u=i=>{e(i),c();},s=i=>{l(i.currentTarget);},d=useMemo(()=>a===o?.timezone?Ni:o?.timezone===t.timezone?Oi:Pi,[a,t.timezone,o?.timezone]);return jsx(No,{onClickAway:c,children:jsxs(co,{"data-testid":"CustomTimezone",children:[jsxs(uo,{open:m,onClick:s,children:[jsx("img",{src:d,alt:"timezone-icon"}),jsx(a$1,{countryCode:o?.countryCode}),jsx("span",{children:o?.label})]}),jsx(xt,{open:m,anchorEl:p,placement:"top-start",sx:{zIndex:1400},children:jsxs(V,{"data-testid":"CustomTimezone_dropdown",children:[jsx(ge,{onChange:u,selectedTimezone:o,defaultCountryTimezone:t,timezoneCountriesCodes:n}),jsx(xe,{onChange:u,selectedTimezone:o,browserTimezone:a})]})})]})})}var go=memo(zt);var xo=go;var bo=styled(S)(({theme:e})=>({display:"flex",marginTop:"8px",background:e.palette.common.white,boxShadow:e.shadows[9],borderRadius:e.spacing(1),color:e.palette.text.primary,fontSize:"11px",".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"},".rmdp-day.rmdp-disabled":{color:"#ccc",cursor:"not-allowed"}})),ho=styled(he)(({theme:e})=>({textTransform:"capitalize",padding:"8px 24px",width:75,height:32,fontSize:"11px",background:"transparent",color:e.palette.text.primary,border:"1px solid",borderColor:e.palette.divider,fontWeight:500,borderRadius:"4px","&:hover":{background:"transparent",color:e.palette.text.primary}})),yo=styled(he)(({theme:e})=>({textTransform:"capitalize",padding:"8px 24px",width:75,height:32,fontSize:"11px",borderRadius:"4px",fontWeight:700,background:e.palette.info.dark,"&:hover":{background:e.palette.info.dark}})),wo=styled(S)(()=>({display:"flex",gap:8})),Co=styled(he,{shouldForwardProp:e=>e!=="open"})(({open:e,theme:o})=>({color:o.palette.text.primary,fontSize:"11px",fontWeight:500,padding:o.spacing(1),borderRadius:"4px",border:"1px solid",borderColor:o.palette.divider,background:o.palette.common.white,textTransform:"none",height:32,...e&&{border:"1px solid",borderColor:o.palette.info.dark,boxShadow:o.shadows[7]}})),To=styled(S)(({theme:e})=>({background:e.palette.common.white,display:"flex",justifyContent:"space-between",alignItems:"center",gap:10,padding:"16px",borderTop:"1px solid",borderColor:e.palette.divider,borderBottomRightRadius:"8px"})),ko=styled(S)(({theme:e})=>({padding:16,paddingInlineEnd:"23px",borderRight:"1px solid",borderColor:e.palette.divider,background:e.palette.common.white,width:"max-content",borderTopLeftRadius:"8px",borderBottomLeftRadius:"8px",display:"flex",flexDirection:"column",gap:10,justifyContent:"space-between"})),zo=styled(S)(()=>({display:"flex",alignItems:"center",gap:"10px"})),So=styled(S)(()=>({position:"relative"})),vo=styled(S)(()=>({display:"flex",flexDirection:"column",gap:"24px"}));var Do=styled(S,{shouldForwardProp:e=>e!=="isAllDay"})(({theme:e,isAllDay:o})=>({display:"flex",alignItems:"center",gap:e.spacing(1),position:"relative",paddingInline:"5px",".label":{width:"max-content"},...!o&&{paddingRight:e.spacing(1),"&:after":{content:'""',position:"absolute",width:"1px",background:e.palette.divider,right:0,height:17}}})),Mo=styled(S)(()=>({width:235})),Bo=styled(S)(({theme:e})=>({display:"flex",gap:"4px",".rmdp-input":{width:"64px",borderRadius:"19px",border:"1px solid",borderColor:e.palette.divider,color:e.palette.text.primary,fontSize:"11px",fontWeight:500,background:"transparent",cursor:"pointer"},".rmdp-input:focus":{boxShadow:e.shadows[7],border:`1px solid ${e.palette.info.dark}`,borderRadius:"19px"},".rmdp-time-picker":{boxShadow:e.shadows[5],borderRadius:e.spacing(1),padding:e.spacing(2),minWidth:"auto !important",div:{marginTop:0,display:"block"},"> div":{width:32,height:64},".rmdp-arrow":{borderColor:`${e.palette.background.transparent[1]} !important`},".rmdp-arrow-container":{justifyContent:"center","&:hover":{backgroundColor:"transparent",boxShadow:"unset"}},input:{borderRadius:"4px",border:`1px solid ${e.palette.divider}`,padding:0,width:32,height:32,fontSize:"11px",color:e.palette.text.primary,fontWeight:500,"&:focus, &:focus-visible":{border:`1px solid ${e.palette.info.dark}`,outline:"unset"}},".dvdr":{margin:"7px 4px 0"},".rmdp-am, .rmdp-pm":{margin:0,width:32,height:32,flex:"auto",justifyContent:"center",fontSize:"11px",color:e.palette.text.primary,fontWeight:500,display:"flex",cursor:"default"},"> div:last-child":{marginInlineStart:"4px",display:"block !important"},".rmdp-down, .rmdp-up":{position:"relative",i:{display:"none"},"&:before":{content:'""',position:"absolute",top:"5px",width:"10px",height:"10px",backgroundImage:`url(${Sc})`}},".rmdp-down:before":{transform:"rotate(180deg)"}},".rmdp-container":{position:"relative","> div":{top:"unset !important",bottom:"28px",transform:"unset !important"}}})),Eo=styled(S)(({theme:e})=>({display:"flex",gap:"8px",alignItems:"center",borderRadius:"50px",border:"1px solid",borderColor:e.palette.divider,paddingInline:"5px",width:"fit-content",height:32}));function Dt({values:e,setValues:o}){let{t:a}=useTranslation(),t=new DateObject(e[0]),n=new DateObject(e[1]),[p,l]=useState(t.dayOfYear===n.dayOfYear&&t.hour===0&&t.minute===0&&n.hour===23&&n.minute===59),m=({period:s,hour:d})=>s==="PM"&&d!==12?d+12:s==="AM"&&d===12?0:d,c=({hour:s,minute:d,period:i})=>{o([t.setHour(m({hour:s,period:i})).setMinute(d).setSecond(0),n]);},u=({hour:s,minute:d,period:i})=>{o([t,n.setHour(m({hour:s,period:i})).setMinute(d).setSecond(59)]);};return jsx(Mo,{children:jsxs(Eo,{children:[jsxs(Do,{isAllDay:p,children:[jsx("span",{className:"label",children:a("allDay")}),jsx(a$4,{checked:p,onChange:s=>{l(!p),s.target.checked?o([M(e[0]),B(e[1])]):o(e);}})]}),!p&&jsxs(Bo,{children:[jsx(j,{defaultTime:{hour:a$5(t.hour),minute:t.minute,period:t.hour>=12?"PM":"AM"},size:"small",onChange:c,enableRealTimeChange:true},`${e[0]?.toString()}-start`),jsx(j,{defaultTime:{hour:a$5(n.hour),minute:n.minute,period:n.hour>=12?"PM":"AM"},size:"small",onChange:u,enableRealTimeChange:true},`${e[1]?.toString()}-end`)]})]})})}var Ro=Dt;var Io=Ro;function At({defaultDate:e,onDateChange:o,mode:a="gregorian",onCalendarModeSwitch:t,numberOfMonths:n,noTimezone:p,noQuickFilter:l,maxDateRange:m,onCalendarGroupChange:c,groupBy:u,timezone:s,onChangeTimezone:d,browserTimezone:i,renderCalendarButton:D,mainSx:j,popperProps:te,rangeDatePickerProps:Ao,defaultCountryTimezone:Ce,timezoneCountriesCodes:Te}){let[w,ke]=useState(X(e)),[x,C]=useState(w),[ze,Se]=useState(s??null),[ve,Wo]=useState(u||"day"),[De,Me]=useState(null),y=!!De,[Be,Ee]=useState(false),{t:re}=useTranslation(),I=useRef(null),Fo=Jc(useId(),"range-calender"),ne=a==="hijri",Y=()=>{Me(null);},Oe=r=>{Me(r.currentTarget);};useEffect(()=>{if(!y){if(n===1)return;C(X(e));}},[y]),useEffect(()=>{if(e){let r=X(e);ke(r),C(r),I.current&&I.current.set("date",r[0]);}},[e]),useEffect(()=>{Se(s??null);},[s,y]);let Re=()=>{ke(x),Y();let r;x[0].dayOfYear===x[1].dayOfYear?r=[x[0],x[1]]:r=[M(x[0]),B(x[1])],o([r[0].toDate(),r[1].toDate()]),c?.(ve||"day"),d?.(ze);},Ho=useCallback(()=>{let r=w[0].format("MMM D"),G=w[1]?w[1].format("MMM D"):w[0].format("MMM D");return r===G&&!p?r:`${r} - ${G}`},[w,p]),jo=r=>{if(r.length<2||!m){C(r);return}let G=M(r[0]).toDate(),$o=B(r[1]).toDate(),Ie=Pt($o).diff(G,"day");if(Ie<=m){C(r);return}Ee(true),C([r[0],r[1].subtract(Ie-m,"d")]),setTimeout(()=>{Ee(false);},3e3);},Yo=r=>{C([M(r[0]),B(r[1])]),I.current&&I.current.set("date",r[0]);},Go=r=>{r.key==="Enter"&&x[1]&&!Be?(r.stopPropagation(),Re()):r.key==="Escape"&&(r.stopPropagation(),Y());};return jsxs(So,{id:Fo,"data-testid":"RangeCalender",sx:j,children:[D?D(y,Oe):jsx(Co,{onClick:Oe,open:y,children:(w[0]||w[1])&&Ho()}),y&&jsx(a$2,{onClick:r=>{r.stopPropagation(),Y();}}),jsx(xt,{open:y,anchorEl:De,placement:"bottom-end",...te,children:jsxs(bo,{onKeyDown:Go,children:[!l&&jsxs(ko,{children:[jsx(po,{onChange:Yo,isHijri:ne}),jsxs(vo,{children:[u&&jsx(Ve,{groupBy:ve,isCalenderOpen:y,onUpdate:r=>{Wo(r);}}),jsx(ro,{isHijri:ne,onCalendarModeSwitch:t})]})]}),jsxs(S,{sx:{display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[jsx(mo,{values:x,onChange:jo,isHijri:ne,ref:I,numberOfMonths:n,...Ao}),jsx(Rt,{in:Be&&!!m,children:jsx(a$3,{error:re("dateRangeError",{number:m}),sx:{marginInline:"16px",marginBottom:"16px"}})}),jsxs(To,{sx:{borderBottomLeftRadius:"8px"},children:[!p&&Ce&&i&&Te?jsx(zo,{children:jsx(xo,{onChange:Se,selectedTimezone:ze,browserTimezone:i,defaultCountryTimezone:Ce,timezoneCountriesCodes:Te},String(y))}):jsx("div",{}),new DateObject(x[0]).dayOfYear===new DateObject(x[1]).dayOfYear&&jsx(Io,{values:x,setValues:C}),jsxs(wo,{children:[jsx(ho,{variant:"contained",onClick:Y,children:re("cancel")}),jsx(yo,{variant:"contained",onClick:Re,disabled:!x[1],children:re("okay")})]})]})]})]})})]})}var Lo=At;var xi=Lo;export{xi as a};
@@ -1 +1 @@
1
- import {a}from'./chunk-XLWWA6CJ.js';import {Jc,lc}from'./chunk-OIVTFRJE.js';import {uh,rj,ha,fd,Mi,E,ek,C,tb}from'./chunk-3JUTMTQV.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:ek,flag:E,viewReceipt:Mi,viewApi:fd,capture:ha,void:rj,clipboard:uh};var X=({anchorEl:n,onClose:s,actions:h=[],linkedActions:M=[]})=>{let v=Jc(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:tb,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=lc(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:tb,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-DSFHY45V.js';import {Jc,lc}from'./chunk-25IWFELL.js';import {uh,rj,ha,fd,Mi,E,ek,C,tb}from'./chunk-3JUTMTQV.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:ek,flag:E,viewReceipt:Mi,viewApi:fd,capture:ha,void:rj,clipboard:uh};var X=({anchorEl:n,onClose:s,actions:h=[],linkedActions:M=[]})=>{let v=Jc(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:tb,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=lc(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:tb,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 {e as e$1,a as a$5,b as b$2,d,c as c$2}from'./chunk-PYS2U3OD.js';import {a as a$2}from'./chunk-HBEH35LA.js';import {a as a$3,b as b$1,c as c$1}from'./chunk-TZFVDVTZ.js';import {a as a$8}from'./chunk-PSRI6U2B.js';import {a as a$7}from'./chunk-AC4KAKGY.js';import {a as a$9}from'./chunk-GNY2VGGW.js';import {a as a$6}from'./chunk-XLWWA6CJ.js';import {a as a$4}from'./chunk-HQI3NKYJ.js';import {c,s}from'./chunk-WVGNLRZQ.js';import {a as a$1,i,e,$a,bc,yb,sc,tc,uc,_b,ac,$b,Cc,ab,hb,wa as wa$1,p,va as va$1}from'./chunk-OIVTFRJE.js';import {eh,kh,Vi,mh,Pa as Pa$1,Ba,Ca,Da,Jg,Pm,Tg,Sg,nh,A as A$1,F}from'./chunk-3JUTMTQV.js';import {a,b}from'./chunk-YRT7GXGY.js';import ze,{memo,createContext,useContext,useRef,useCallback,useEffect,useMemo,useState,createElement,Fragment as Fragment$1}from'react';import {styled,alpha,useTheme}from'@mui/material/styles';import jl from'memoize-one';import Gl from'react-virtualized-auto-sizer';import Kl from'react-window-infinite-loader';import Ce from'@mui/material/Box';import ia from'@mui/material/Popper';import Qi from'@mui/material/Collapse';import {useTranslation}from'react-i18next';import Gi from'@mui/material/Button';import {jsxs,Fragment,jsx}from'react/jsx-runtime';import {TableCell,Button,styled as styled$1,Box}from'@mui/material';import La from'@mui/material/TableRow';import {motion}from'framer-motion';import {VariableSizeList,areEqual}from'react-window';import Fa from'@mui/material/TableHead';import Ja from'@mui/material/Skeleton';import Qa from'@mui/material/TableCell';import {createPortal}from'react-dom';var Nr=a((Yd,Or)=>{var $i=a$1();function Ui(e,t){return $i(t,function(o){return e[o]})}Or.exports=Ui;});var Ur=a((Jd,$r)=>{var Xi=Nr(),qi=i();function ji(e){return e==null?[]:Xi(e,qi(e))}$r.exports=ji;});var Pt=a((fu,wn)=>{var ja=e(),Ga=0;function Ka(e){var t=++Ga;return ja(e)+t}wn.exports=Ka;});var en=b(Ur(),1);var Xr=e=>({backgroundColor:e.palette.common.white,borderRadius:"4px",filter:"drop-shadow(0px 8px 30px rgba(0, 0, 0, 0.16))",width:"188px",marginTop:"10px",boxShadow:e.shadows[3]}),qr=styled(Ce)(({theme:e})=>({color:e.palette.grey[700],fontSize:"11px",fontWeight:500,padding:"8px 16px",textAlign:"left",borderBottom:`1px solid ${e.palette.divider}`})),jr=styled(a$2)(({theme:e})=>({border:`1px solid ${e.palette.divider}`,".icon":{width:14}})),Gr=styled(Ce)(()=>({padding:"8px 16px","> div + div":{marginTop:"8px"}})),Kr=styled(Gi)(({theme:e})=>({color:e.palette.info.dark,fontSize:"11px",textTransform:"capitalize",padding:"4px 9px",minWidth:"auto","&:hover":{background:"transparent"}})),Yr=styled(Ce)(({theme:e})=>({padding:"0 16px 8px",textAlign:"left",borderBottom:`1px solid ${e.palette.divider}`}));function ta({onCloseDropdown:e,filter:{options:t=[],onConfirm:o,data:r,isOnlyOneFilter:n,onClearFilterFields:a,wrapperSx:l,sx:s$1}}){let[i,p]=useState({});useEffect(()=>{p((t||[]).reduce((T,{apiKey:g})=>({...T,[g]:r?.[g]??""}),{}));},[]);let{t:d$1}=useTranslation(),u=()=>{o?.(i);},c=s(u,e),y=T=>{u(),e(T);},m=T=>{e(T);},b=()=>{a?.(),p(t.reduce((T,{apiKey:g})=>({...T,[g]:""}),{}));},f=T=>i[T]!==void 0&&i[T].length>0,x=T=>i[T]!==void 0&&i[T].length?i[T]:"",h=T=>{f(T)&&p({...i,[T]:""});},S=useMemo(()=>(0, en.default)(i).some(T=>!!T),[i]),w=useCallback(T=>t.find(g=>g.apiKey===T),[t]),E=useCallback((T,g)=>{let R=i?.[T]!==void 0&&i?.[T]!==""&&i?.[T]!==null,k=Object.entries(i).some(([C,v])=>!!v&&(w(C)?.filterGroup!==g||!g));return n&&!R&&k},[t,i,n]);return jsxs(Ce,{component:"article","data-testid":"ColumnFilterInputs",sx:T=>({...Xr(T),...Object.assign({},...[s$1].flat().filter(g=>g&&typeof g=="object"))}),onKeyDown:c,children:[jsx(qr,{component:"header","data-testid":"ColumnFilterInputs_title",children:d$1("filterBy")}),jsx(Gr,{"data-testid":"ColumnFilterInputs_inputs",component:"main",sx:l,children:t.map(({placeholder:T,apiKey:g,isDisabled:R,filterGroup:k,render:C})=>jsx(Fragment$1,{children:C?C():jsx(jr,{className:"input","data-testid":"ColumnFilterInputs_InputStyled",name:g,placeholder:T,onChange:v=>{p({...i,[g]:v.target.value});},disabled:R||E(g,k),value:x(g),inputProps:{autoComplete:"off","data-testid":"ColumnFilterInputs_input"},endAdornment:jsx(Ce,{component:"img","data-testid":"ColumnFilterInputs_icon","data-icon":f(g)?"close":"search",src:f(g)?nh:A$1,alt:"search",className:"icon",sx:{cursor:f(g)?"pointer":"default"},onClick:()=>{h(g);}})})},g))}),jsx(Qi,{in:S,component:"section","data-testid":"ColumnFilterInputs_Collapse",sx:{borderTop:"0"},children:jsx(Yr,{"data-testid":"ColumnFilterInputs_ClearWrapper",children:jsx(Kr,{type:"button",onClick:b,"data-testid":"ColumnFilterInputs_ClearButton",children:d$1("clear")})})}),jsxs(b$2,{component:"footer","data-testid":"ColumnFilterInputs_footer",children:[jsx(d,{type:"button",onClick:m,"data-testid":"ColumnFilterInputs_CancelButton",children:d$1("cancel")}),jsx(c$2,{type:"button",onClick:y,"data-testid":"ColumnFilterInputs_OkayButton",children:d$1("okay")})]})]})}var tn=ta;var gt=tn;function aa(e){let{anchorEl:t,setAnchorEl:o,onClose:r,isFilterApplied:n,disabled:a}=e,l=u=>{u.stopPropagation(),o(null),r?.(u);},s=useRef(null),i=!!t;useEffect(()=>{i&&requestAnimationFrame(()=>s.current?.focus());},[i]);let p=useMemo(()=>e.type==="list"?[e.apiKey]:(e?.options||[])?.map(({apiKey:u})=>u),[e]),d=useMemo(()=>{if(e.type==="list")return jsx(e$1,{onCloseDropdown:l,filter:e});if(e.type==="inputs")return jsx(gt,{onCloseDropdown:l,filter:e});if(e.type==="custom"){let u={anchorEl:t,setAnchorEl:o,onCloseDropdown:l};return e.render(u)}return null},[i,e,l]);return jsxs(Fragment,{children:[n?jsxs(a$5,{children:[jsx(Ce,{component:"img","data-testid":"ColumnFilter_whiteFilterIcon",src:mh,alt:"filter-icon",sx:{marginInlineEnd:"2px",height:6}}),jsx(Ce,{component:"img","data-testid":"ColumnFilter_closeIcon",src:Pa$1,alt:"close-icon",onClick:u=>{u.stopPropagation(),o(null),e.onClear(p);}})]}):jsx(Ce,{component:"img","data-testid":"ColumnFilter_columnIcon",src:Ba,alt:"column-icon",sx:{marginTop:"2px",userSelect:"none",opacity:a?.5:1}}),i&&jsx(a$6,{onClick:l}),jsx(ia,{open:i,anchorEl:t,placement:"bottom-start",children:jsx("div",{ref:s,tabIndex:-1,style:{outline:"none"},children:d})})]})}var nn=memo(aa);var Ge=nn;var to=styled("img")(()=>({width:"13.3px",height:"13.3px"})),ln=styled("img")(()=>({width:"8px",height:"6.4px",cursor:"pointer"}));function pa({onColumnSort:e,columnsSorting:t,columnId:o,onClick:r}){let[n,a]=useState(null),l=!!n,s=d=>{d.stopPropagation(),a(d.currentTarget),r?.(d);},i=d=>{d.stopPropagation(),a(null),r?.(d);},p=(d,u,c)=>{d&&(e?.({[d]:u}),i(c));};return jsxs(Fragment,{children:[jsx(ln,{onClick:s,src:Ba,alt:"column-icon","data-id":o,sx:{userSelect:"none",marginTop:"2px"}}),l&&jsx(a$6,{onClick:i}),jsxs(a$7,{anchorEl:n,open:l,children:[jsxs(a$8,{isSelected:t?.[n?.dataset.id||""]==="asc",onClick:d=>{p(n?.dataset.id,"asc",d);},sx:d=>({...t?.[n?.dataset.id||""]==="asc"&&{boxShadow:d.shadows[10]}}),children:[jsx(to,{src:Ca,alt:"sort-icon"}),jsx(a$9,{sx:{fontSize:"0.6875rem"},children:"Sort A-Z"})]}),jsxs(a$8,{isSelected:t?.[n?.dataset.id||""]==="desc",onClick:d=>{p(n?.dataset.id,"desc",d);},sx:d=>({...t?.[n?.dataset.id||""]==="desc"&&{boxShadow:d.shadows[10]}}),children:[jsx(to,{src:Da,alt:"sort-icon"}),jsx(a$9,{sx:{fontSize:"0.6875rem"},children:"Sort Z-A"})]})]})]})}var sn=memo(pa);var Ct=sn;var pn=ze.forwardRef(({children:e,...t},o)=>jsxs(Fragment,{children:[jsx(Ce,{"data-testid":"VirtualScrollInner",className:"VirtualScrollInner",style:{position:"sticky",top:0},children:e}),jsx("div",{ref:o,...t})]}));pn.displayName="VirtualScrollInner";var oo=pn;var St=createContext(null);var ro=({children:e,value:t})=>jsx(St.Provider,{value:t,children:e});var mn=ze.forwardRef(({onScroll:e,children:t,...o},r)=>{let n=useContext(St);return jsx("div",{className:"VirtualScrollOuter",onScroll:n,ref:r,...o,children:t})});mn.displayName="VirtualScrollOuter";var no=mn;function wa({setBackdropVisibility:e,clearBackdropVisibilityTimeout:t}){let o=useRef(void 0);return useEffect(()=>()=>{clearTimeout(o.current);},[]),{handleBackDropVisibility:()=>{e(true);},clearBackdropVisibility:()=>{o.current=setTimeout(()=>{e(false);},t||2e3);},clearTimer:()=>{clearTimeout(o.current);}}}var un=wa;var Pa=ze.forwardRef(({itemData:e,children:t,setBackdropVisibility:o,scrollToIndex:r,listRef:n,onScroll:a,clearBackdropVisibilityTimeout:l,...s},i)=>{let{handleBackDropVisibility:p,clearBackdropVisibility:d,clearTimer:u}=un({setBackdropVisibility:o,clearBackdropVisibilityTimeout:l}),c=useRef(0),y=useRef(void 0),m=useRef(false),b=useRef(null),f=i||n||b,x=useCallback(()=>(u(),y.current!==void 0&&f.current?(m.current=false,c.current=y.current,y.current=void 0,p(),f.current?.scrollTo?.(c.current),true):(d(),false)),[d,u,p,f]),h=ze.useCallback(E=>{y.current=E.currentTarget.scrollTop,m.current||(m.current=true,x());},[x]);useEffect(()=>{(r||0)>=0&&!Number.isNaN(r)&&r!==void 0&&f.current?.scrollTo&&f.current?.scrollToItem(r,"center");},[r,f]);let S=ze.useMemo(()=>({...e,renderedScrollTopRef:c}),[e]),w=ze.useCallback(E=>{a?.(E),m.current=x();},[x,a]);return jsx(ro,{value:h,children:jsx(VariableSizeList,{ref:f,"data-testid":"VirtualScrollList",itemData:S,outerElementType:no,innerElementType:oo,...s,onScroll:w,children:t})})}),io=Pa;var A=styled(Ce,{shouldForwardProp:e=>!["showNoDataView","compact","fixedHeight"].includes(e)})(({showNoDataView:e,compact:t,fixedHeight:o})=>({display:"flex",flexDirection:"column",height:o?`${o}px`:t?"auto":"100%",width:"100%",minWidth:e?"unset":"fit-content",overflow:"hidden",overflowX:e?"hidden":"auto",margin:"0px",...t&&{flex:"0 0 auto"}})),ce=styled(Ce,{shouldForwardProp:e=>e!=="hidePadding"})(({theme:e,hidePadding:t})=>({flex:"1 1 auto",backgroundColor:e.palette.grey[300],paddingBottom:t?0:a$3})),De=styled(Ce)(({theme:e})=>({backgroundColor:e.palette.background.default})),Se=styled(TableCell,{shouldForwardProp:e=>!["isLast","isFirst","isSheetView","isSelected"].includes(e)})(({theme:e,isLast:t,isFirst:o,isSheetView:r})=>({paddingBlock:"0",paddingInline:"0.3875rem !important",paddingLeft:o?"0 !important":"0.3875rem !important",paddingRight:t?"0 !important":"0.3875rem !important",color:r?e.palette.text.primary:e.palette.grey[700],fontSize:r?e.typography.subtitle1.fontSize:e.typography.caption.fontSize,height:"100%",fontWeight:r?400:e.typography.fontWeightRegular,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",display:"flex",alignItems:"center",cursor:"pointer",...r&&{borderRight:t?"1px solid transparent":`1px solid ${e.palette.divider}`,paddingInline:"8px !important",paddingLeft:"8px !important",paddingRight:"8px !important",position:"relative",borderTop:"1px solid transparent",borderLeft:"1px solid transparent",overflow:"hidden !important","&:before":{content:'""',borderRight:t?"none":"1px solid transparent",position:"absolute",top:0,right:0,left:0,bottom:0,pointerEvents:"none"}}})),wt=styled("button")(({theme:e})=>({zIndex:1,display:"flex",gap:e.spacing(.5),alignItems:"center",overflow:"hidden",maxWidth:"100%",textOverflow:"ellipsis",whiteSpace:"nowrap",backgroundColor:"transparent",border:"none",cursor:"pointer",padding:0,margin:0,color:"inherit",fontSize:"inherit",fontWeight:"inherit",boxSizing:"border-box",":disabled":{cursor:"not-allowed"}})),He=styled(io,{shouldForwardProp:e=>!["areTotalRowsNotFillingHeight","isSheetView"].includes(e)})(({theme:e,areTotalRowsNotFillingHeight:t,isSheetView:o})=>({backgroundColor:t?"transparent":"#F6F8FACC",...o&&{backgroundColor:e.palette.common.white}})),Rt=styled(La,{shouldForwardProp:e=>!["showShadowHighlight","showLoadedStyle","isSheetView","isSelected","isChecked","adjacentBelow","adjacentAbove"].includes(e)})(({theme:e,showShadowHighlight:t,showLoadedStyle:o,isSheetView:r,isChecked:n,adjacentBelow:a,adjacentAbove:l})=>({display:"flex",borderBottom:`1px solid ${e?.palette.divider}`,position:"relative",height:"100%",width:"100%",...!r&&{paddingInline:"32px",...a&&{borderBottom:"none",clipPath:"inset(-20px -20px 0px -20px)","&::before":{content:'""',position:"absolute",bottom:0,left:"32px",right:"32px",height:"1px",backgroundColor:e.palette.divider,zIndex:1}},...l&&{clipPath:"inset(0px -20px -20px -20px)"},...a&&l&&{clipPath:"inset(0px -20px 0px -20px)"},"&:hover":{boxShadow:e.shadows[12],zIndex:1,".MuiCheckbox-root":{visibility:"visible"},".payment-sources-container":{backgroundColor:e?.palette.common.white},".geography-box":{visibility:"visible"},".payout-status":{visibility:"visible !important"},"&:hover:after":{opacity:1}},"&::after":{content:"''",opacity:0,minHeight:"100%",background:e.palette.info.dark,width:"3px",position:"absolute",left:0},...n&&{boxShadow:e.shadows[12],zIndex:1,"&:after":{opacity:1},".MuiCheckbox-root":{visibility:"visible"}},...o&&{backgroundColor:`${e.palette.info.dark}08 !important`},...t&&{boxShadow:e.shadows[12],zIndex:1,"&::after":{content:"''",opacity:1,minHeight:"100%",background:e.palette.info.dark,width:"3px",position:"absolute",left:0}}}})),te=styled(Ce,{shouldForwardProp:e=>e!=="showNoDataView"&&e!=="scrollable"})(({theme:e,showNoDataView:t,scrollable:o})=>({position:"relative",backgroundColor:e.palette.background.default,height:"100%",overflowX:t?"hidden":"auto",display:"flex",flexDirection:"column","&:hover":{scrollbarWidth:o?"auto":"none"},"&::-webkit-scrollbar":{display:"block",height:"13px"},"&::-webkit-scrollbar-track":{background:"white",border:"1px solid #F2F2F2"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#DADCDF",borderRadius:"32px",border:"3px solid transparent",backgroundClip:"content-box",minHeight:"20px"}})),ao=styled(motion.img)(()=>({width:"24px",height:"24px",position:"relative",zIndex:2})),It=styled(Ce)(()=>({position:"relative",display:"flex",flexDirection:"column",height:"100%"})),fn=styled(Ce)(()=>({position:"relative",display:"flex",flexDirection:"column",height:"100%",paddingInline:"28px",borderRadius:"8px",marginBottom:"16px !important",overflowY:"hidden"})),bn=styled(Ce,{shouldForwardProp:e=>e!=="showNoDataView"})(({showNoDataView:e})=>({position:"relative",height:"100%",overflowX:e?"hidden":"auto",paddingBottom:0,display:"flex",flexDirection:"column"})),Et=styled(a$4,{shouldForwardProp:e=>!["isRow"].includes(e)})(({isRow:e})=>({position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",padding:0,...e&&{visibility:"hidden"}}));var va=e=>{let{filter:t,totalCount:o,isFilterEnabled:r}=e,n=useMemo(()=>t?.options?.reduce((i,{apiKey:p})=>({...i,[p]:t?.data?.[p]}),{})||{},[t]),a=useMemo(()=>{let i=t,p=i?.data?.[i.apiKey];return Array.isArray(p)?p:[]},[t]),l=useMemo(()=>Object.values(n||{}).some(i=>typeof i=="string"||Array.isArray(i)?i.length>0:i!=null)||a.length>0,[n,a]);return {isFilterApplied:l,filterDisabled:!l&&o===0&&!r}},Ke=va;function hn({column:{header:e,id:t,align:o,headerStyle:r,sortable:n,filter:a,width:l,order:s},isFirst:i,isLast:p,isSheetView:d,onColumnSort:u,columnsSorting:c,totalCount:y,isFilterEnabled:m}){let[b,f]=useState(null),x=useRef(null),{isFilterApplied:h,filterDisabled:S}=Ke({filter:a,totalCount:y,isFilterEnabled:m});return jsx(Se,{"data-id":t,component:"div","data-testid":"VirtualTable_TableHeader_StyledCell","data-column-id":t,"data-column-width":l,"data-column-width-used":l,"data-column-align":o,"data-column-order":s,"data-column-header":typeof e=="string"?e:"component","data-column-sortable":!!n,"data-column-filterable":!!a,isFirst:i,isLast:p,ref:x,sx:E=>({paddingInline:"0.6875rem",paddingLeft:i?"0":"0.6875rem",paddingRight:p?"0":"0.6875rem",display:"flex",gap:E.spacing(.5),alignItems:"center",justifyContent:uc[o??"left"],width:l,textAlign:o,overflow:"unset",fontWeight:600,...S&&{cursor:"not-allowed"},...r}),isSheetView:d,children:jsxs(wt,{disabled:S,onClick:()=>{f(x.current);},children:[typeof e=="function"?e():jsx(Ce,{"data-testid":"TableHeader_columns_header",sx:{maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e&&jsx("span",{style:{textOverflow:"ellipsis",width:"80%",overflow:"hidden"},"data-testid":"VirtualTable_TableHeader_StyledCell_header_text",children:e})}),a&&jsx(Ge,{...a,anchorEl:b,setAnchorEl:f,isFilterApplied:h,disabled:S}),n&&jsx(Ct,{onColumnSort:u,columnsSorting:c,columnId:t})]})})}var so=hn;var xn=styled(Fa,{shouldForwardProp:e=>e!=="showBackDrop"})(({showBackDrop:e,theme:t})=>({flex:"0 0 auto",boxShadow:e?t.shadows[23]:"none",backgroundColor:t.palette.background.default,zIndex:1,width:"100%",minWidth:"auto",overflowX:"auto"})),Cn=styled(La,{shouldForwardProp:e=>e!=="isSheetView"})(({theme:e,isSheetView:t})=>({display:"flex",justifyContent:"flex-start",width:"100%",minWidth:"fit-content",position:"relative",paddingInline:"32px",paddingBlock:"16px",...t&&{height:"28px",borderBottom:`1px solid ${e.palette.divider}`,backgroundColor:e.palette.primary.light,paddingInline:0,paddingBlock:0}}));function Aa({columns:e,headerProps:t,showBackDrop:o,onColumnSort:r,columnsSorting:n,isSheetView:a,totalCount:l,isFilterEnabled:s,selection:i,selectableCount:p=0,getSelectableKeys:d}){let u=i&&i.ids.length>0,c=i&&p>0&&i.ids.length===p,y=useCallback(()=>{i&&i.setIds(c?[]:d?.()??[]);},[i,c,d]);return jsx(xn,{component:"nav","data-testid":"VirtualTable_TableHeader_StyledHeader",showBackDrop:o,...t,children:jsxs(Cn,{component:"section","data-testid":"VirtualTable_TableHeader_StyledMUITableRow",isSheetView:a,children:[u&&jsx(Et,{size:"small",checked:c,indeterminate:u&&!c,onChange:y,onClick:m=>m.stopPropagation()}),e.map((m,b)=>jsx(so,{column:m,isFirst:m.id===e[0].id,isLast:m.id===e[e.length-1].id,onColumnSort:r,columnsSorting:n,isSheetView:a,totalCount:l,isFilterEnabled:s},`${m.id}-${b}`))]})})}var Sn=memo(Aa);var mo=Sn;var Xa=styled(Ce,{shouldForwardProp:e=>e!=="sandboxMode"&&e!=="height"})(({theme:e,sandboxMode:t})=>({display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flex:1,position:"sticky",left:0,background:t?e.palette.common.lightOrange:e.palette.grey[300],backdropFilter:"blur(32px)",margin:0,minHeight:"55px"})),uo=styled("p")(({theme:e})=>({fontSize:"0.75rem",fontWeight:600,color:alpha(e.palette.common.black,.2)}));function qa({height:e,sandboxMode:t,...o}){let{t:r}=useTranslation();return jsx(Xa,{component:"section","data-testid":"TableLastItem",...o,height:e,sandboxMode:t,children:jsx(uo,{children:r("allRecordsHaveBeenSuccessfullyLoaded")})})}var co=qa;var In=b(Pt(),1);var ol=styled(Ja)(({theme:e})=>({backgroundColor:e.palette.grey[100],borderRadius:"64px",minWidth:"20px"}));function rl({columns:e,style:t,index:o,animationType:r}){return jsx(La,{sx:{...t,display:"flex",borderBottom:"1px solid #e3e8ee","&:hover":{backgroundColor:"transparent !important"}},component:"div",hover:true,children:e.map((n,a)=>jsx(Qa,{sx:{width:n.width||`${100/e.length}%`||"20%",paddingInline:"0.6875rem"},component:"div",children:jsx(ol,{variant:"rectangular",animation:r})},`${n.id}-${a}`))},o)}var bo=memo(rl,areEqual);var al=styled("section")(({isLoaded:e=false})=>({overflow:"hidden",paddingInline:"32px",backgroundColor:e?"rgba(255, 255, 255, 0.60)":"none",filter:e?"blur(8px)":"none",marginTop:e?"1rem":"0.2rem"}));function ll({columns:e,isLoaded:t=false,animationType:o,isLoading:r=false,rowsCount:n}){let a=n||$a(t,r);return a=a>0?a:5,jsx(al,{isLoaded:t,"data-testid":"TableLoading",children:[...Array(a)].map(()=>jsx(bo,{columns:e,animationType:o},`i-${(0, In.default)("TableLoadingRow_")}`))})}var ho=memo(ll);var Vn=styled(Ce,{shouldForwardProp:e=>e!=="sandboxMode"})(({theme:e,sandboxMode:t})=>({display:"flex",flexDirection:"column",height:"100%",width:"100%",justifyContent:"center",alignItems:"center",textAlign:"center",background:t?e.palette.common.lightOrange:e.palette.grey[300],backdropFilter:"blur(32px)",gap:"0.5rem"})),Ln=styled(Ce,{shouldForwardProp:e=>e!=="shouldMinimizeWidth"})(({shouldMinimizeWidth:e})=>({width:e?"9rem":"15rem",display:"flex",flexDirection:"column",alignItems:"center"})),kn=styled("h1")(({theme:e})=>({fontWeight:600,fontSize:"1.125rem",color:e.palette.text?.primary,padding:0,margin:0})),vn=styled("p")(({theme:e})=>({fontWeight:400,fontSize:"0.75rem",color:e.palette.text?.primary,opacity:.5,padding:0,marginTop:3,textAlign:"center"})),Wn=styled("img")(()=>({width:"2rem",height:"2rem"})),Mn=styled(Button)(({theme:e})=>({padding:" 0.625rem 1rem",display:"flex",justifyContent:"center",alignItems:"center",gap:"0.5rem",backgroundColor:alpha(e.palette.info.dark,.1),borderRadius:"0.25rem",color:e.palette.info.dark,"&:hover":{backgroundColor:alpha(e.palette.info.dark,.1),color:e.palette.info.dark},width:"6rem",height:"1.8rem",marginTop:"1.5rem"})),Dn=styled("p")(({theme:e})=>({color:e.palette.info.dark,fontSize:"0.8rem",fontWeight:600,textTransform:"none"}));function pl({triggerDataRefetch:e,heading:t,message:o,shouldMinimizeWidth:r,sandboxMode:n,hideIcon:a,hideTryAgain:l,...s}){let{t:i}=useTranslation();return jsx(Vn,{sandboxMode:n,...s,children:jsxs(Ln,{shouldMinimizeWidth:r,children:[!a&&jsx(Wn,{src:F,alt:"info icon"}),jsx(kn,{children:i(t)}),jsx(vn,{children:i(o)}),!l&&jsx(Mn,{variant:"contained",onClick:()=>{e();},children:jsx(Dn,{children:i("tryAgain")})})]})})}var oe=pl;var Vt=oe;var Hn=styled$1("h1")(({theme:e})=>({fontWeight:600,fontSize:"1rem",color:e.palette.text?.primary,padding:0,margin:0})),Fn=styled$1("p")(({theme:e})=>({fontWeight:400,fontSize:"0.75rem",color:e.palette.text?.primary,padding:0,marginTop:3,opacity:.5})),Bn=styled$1(Ce,{shouldForwardProp:e=>e!=="sandboxMode"})(({theme:e,sandboxMode:t})=>({display:"flex",flexDirection:"column",height:"100%",width:"100%",justifyContent:"center",alignItems:"center",textAlign:"center",background:t?e.palette.common.lightOrange:e.palette.grey[300],backdropFilter:"blur(32px)",gap:"0.5rem"})),go=styled$1("img")(()=>({width:"2rem",height:"2rem"}));function zn({sandboxMode:e,heading:t,message:o,...r}){let{t:n}=useTranslation();return jsxs(Bn,{component:"section","data-testid":"EmptyList",sandboxMode:e,...r,children:[jsx(go,{src:Jg,alt:"empty container"}),jsx(Hn,{children:n(t)}),jsx(Fn,{children:n(o)})]})}zn.displayName="EmptyList";var kt=memo(zn);var _n=kt;var gl=e=>{let{isTimeoutError:t,tableError:o,triggerDataRefetch:r,sandboxMode:n,tableEmpty:a,error:l}=e;if(t)return jsx(Vt,{"data-testid":"VirtualTable_ErrorList_timeoutError",shouldMinimizeWidth:true,heading:"timeOut",message:"yourRequestOutPleaseTryAgain",triggerDataRefetch:r,sandboxMode:n});let s=l;if(o){let{formatted:i,message:p,code:d}=bc({error:s,fallbackMessage:"connectionErrorMsg"}),u=yb()&&d===Pm;return jsx(Vt,{"data-testid":"VirtualTable_ErrorList_tableError",heading:"somethingWentWrong",message:u?p:i,triggerDataRefetch:r,sandboxMode:n,hideIcon:u,hideTryAgain:u})}if(a){let{formatted:i}=bc({error:s,fallbackMessage:"tryAdjustingTheDateOrFilters"});return jsx(_n,{sandboxMode:n,heading:"nothingFound",message:i})}return jsx(Vt,{"data-testid":"VirtualTable_ErrorList_tableError",heading:"somethingWentWrong",message:"connectionErrorMsg",triggerDataRefetch:r,sandboxMode:n})},Co=memo(gl);function An({error:e,tableEmpty:t,isTimeoutError:o,tableError:r,tableLoading:n,orderedColumns:a,triggerDataRefetch:l,footerProps:s}){return n?jsx(De,{"data-testid":"VirtualTable_SolidBackground",children:jsx(ho,{"data-testid":"VirtualTable_TableLoading",columns:a,isLoading:true})}):jsx(Co,{isTimeoutError:o,tableEmpty:t,tableError:r,sandboxMode:s?.sandboxMode,error:e,triggerDataRefetch:l})}An.displayName="TableNoData";var Je=memo(An);function yo(){return jsx(motion.div,{initial:{width:0},animate:{width:"fit-content",transition:{duration:.5}},exit:{width:0},style:{paddingInline:"11px",paddingBlock:"5px",boxShadow:"0px 0px 1px 0px rgba(0, 0, 0, 0.10), 0px 1px 1px 0px rgba(0, 0, 0, 0.09), 0px 2px 1px 0px rgba(0, 0, 0, 0.05), 0px 4px 2px 0px rgba(0, 0, 0, 0.01), 0px 7px 2px 0px rgba(0, 0, 0, 0.00)",borderRadius:"24px",overflow:"hidden",display:"inline-block",whiteSpace:"nowrap"},children:jsxs(motion.span,{style:{color:"#8F9195",fontSize:"12px",fontWeight:600,display:"flex",alignItems:"center",justifyContent:"center",gap:"10px"},children:[jsx(motion.span,{children:"!"}),jsx(motion.span,{children:"Error while loading"})]})})}function Rl({row:e,columns:t,index:o,rowProps:r,isSheetView:n,selectedCell:a=null,selectedColumn:l=null,selectedRow:s=null,selectedChip:i=null,onCellClick:p,isLastRow:d=false,onChipClick:u,selection:c,hasAdjacentCheckedAbove:y,hasAdjacentCheckedBelow:m}){let b=c?e[c.selector]:void 0,f=c&&c.ids.includes(b),x=c?.isDisabled?.(e),h=ze.useCallback(()=>{!c||x||c.setIds(f?c.ids.filter(g=>g!==b):[...c.ids,b]);},[c?.setIds,c?.ids,f,x,b]),S=ze.useCallback((g,R)=>(k,C)=>{u?.(o,g,k,C,R);},[u,o]),w=ze.useCallback((g,R,k)=>{let{render:C,format:v,selector:I}=g;if(!g?.id||!e)return null;let V=I?I({row:e,index:o,value:e[g?.id]}):e[g?.id],L=v?v({value:V,row:e,index:o}):V;return C?C({row:e,column:g,index:o,value:e[g?.id],selectionProps:{onClick:S(k,g.pinned),rowIndex:R,colIndex:k,selectedId:i}}):jsx(Fragment,{children:L})},[e,o,i,S]),E=a!==null||l!==null||s!==null,P=ze.useCallback((g,R)=>k=>{p?.(o,g,k,R);},[p,o]),T=useMemo(()=>{let g=t[0]?.id,R=t[t.length-1]?.id,k=s===o;return jsx(Fragment,{children:t.map((C,v)=>{if(!C?.id)return null;let I=`${C.pinned??"default"}-${o}-${v}`,V=`${C.pinned??"default"}-${v}`,L=E&&a===I,M=E&&l===V,H=sc({isSelected:E&&(L||M||k),isCellSelected:L,isColumnSelected:M,isRowSelected:k,isLastRow:d}),N=C.id===g,G=C.id===R,W=C.pinned?N:N&&C.pinned!=="start",_=C.pinned?G:G&&C.pinned!=="end",U=k&&E?tc({effectiveFirst:W,isPinnedStart:C.pinned==="start",isPinnedEnd:C.pinned==="end"}):{},B=C.pinned==="start"&&W;return jsx(Se,{component:"div","data-testid":"TableRow_TableCell","data-column-id":C.id,"data-column-width":C.width,"data-column-width-used":C.width,"data-column-align":C.align,"data-column-order":C.order,"data-column-header":typeof C.header=="string"?C.header:"component","data-column-sortable":!!C.sortable,"data-column-filterable":!!C.filter,isFirst:W,isLast:_,onClick:P(v,C.pinned),sx:{width:C.width,minWidth:C.width,textAlign:C.align,justifyContent:uc[B?"center":C.align??"left"],cursor:p?"pointer":"default",...H,...U,...C.cellStyle},isSheetView:n,isSelected:L,children:n?jsx(Box,{sx:{position:"relative",zIndex:1,width:"100%"},children:w(C,o,v)}):jsx(Fragment,{children:w(C,o,v)})},`${C.id}-${v}`)})})},[t,e,o,a,l,s,E,p,d,i,n,w,P]);return createElement(Rt,{"data-testid":"TableRow",onClick:r?.onRowClick,showShadowHighlight:r?.showShadowHighlight,showLoadedStyle:r?.showLoadedStyle,component:"article",...r,key:o,isSheetView:n,isChecked:f,adjacentAbove:y,adjacentBelow:m},c&&jsx(Et,{isRow:true,size:"small",checked:f,onChange:h,disabled:x}),T)}var Ro=memo(Rl,areEqual);var Ml=styled(Ja)(()=>({backgroundColor:"#F4F4F4",borderRadius:"64px",width:"100%",minWidth:"20px"}));function Dl({columns:e,style:t,index:o,animationType:r,rowIndex:n=0,useTableBackground:a=false}){let l=useTheme();return jsx(La,{sx:{...t,display:"flex",borderBottom:"1px solid #F2F2F2",minHeight:"28px",height:"28px",alignItems:"center",backgroundColor:a?l.palette.background.default:"transparent","&:hover":{backgroundColor:"transparent !important"}},component:"div",hover:true,children:e.map((s,i)=>{let p=i===e.length-1,d=i===0,u=s.pinned==="start",c=d&&u;return jsx(Qa,{sx:{width:s.width||`${100/e.length}%`||"20%",paddingBlock:"0",paddingInline:"8px !important",paddingLeft:"8px !important",paddingRight:"8px !important",borderRight:p?"none":"1px solid #F2F2F2",borderLeft:d?"1px solid #F2F2F2":"none",height:"100%",display:"flex",alignItems:"center",boxSizing:"border-box",whiteSpace:"nowrap",overflow:"hidden"},component:"div",children:c&&s.render?s.render({index:n,row:{},column:s,value:n+1}):jsx(Ml,{variant:"rectangular",animation:r,height:16})},`${s.id}-${i}`)})},o)}var Ze=memo(Dl,areEqual);var Bl=ze.memo(({isLoadingRow:e,isSheetView:t,columns:o,currentRowCount:r})=>{let{t:n}=useTranslation();return e?t&&o?.length?jsx(Fragment,{children:Array.from({length:3},(a,l)=>jsx(Ze,{columns:o,animationType:"wave",rowIndex:(r||0)+l,useTableBackground:true},`loading-row-${l}`))}):jsxs(Box,{"data-testid":"ListItemWrapper_lastRowContent_isLoadingRow",sx:{height:t?"100%":"24px",width:"24px",borderRadius:"50%",background:"transparent",position:"relative",display:"flex",justifyContent:"center",alignItems:"center"},children:[jsx(ao,{sx:{position:"absolute"},src:eh}),jsx(ao,{sx:{position:"absolute",padding:"3px"},src:kh,alt:"tableLoadingSpinnerIcon",className:"spinner-loader",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}})]}):jsx(uo,{"data-testid":"ListItemWrapper_lastRowContent",children:n("allRecordsHaveBeenSuccessfullyLoaded")})}),zl=(e,t)=>o=>{o?.stopPropagation?.(),t?.(e);},_l=styled("div",{shouldForwardProp:e=>e!=="showShadowHighlight"&&e!=="isSheetView"})(({theme:e,isSheetView:t})=>({height:t?28:"100%",backgroundColor:e.palette.background.default}));function Al({index:e,style:t,data:{renderedScrollTopRef:o,rows:r,rowProps:n,columns:a,isLoading:l,scrollToIndex:s,newLoadedRowsEndIndex:i,isError:p,areAllRowsLoaded:d,isSheetView:u,isPinned:c=false,isLoadMoreLoading:y=false,...m}}){let b=r.length-1,{hasAdjacentCheckedAbove:f,hasAdjacentCheckedBelow:x}=ze.useMemo(()=>{let R=m.selection;if(!R)return {hasAdjacentCheckedAbove:false,hasAdjacentCheckedBelow:false};let k=r[e]?.[R.selector];if(!R.ids.includes(k))return {hasAdjacentCheckedAbove:false,hasAdjacentCheckedBelow:false};let v=e>0?r[e-1]?.[R.selector]:void 0,I=e<b?r[e+1]?.[R.selector]:void 0;return {hasAdjacentCheckedAbove:v!==void 0&&R.ids.includes(v),hasAdjacentCheckedBelow:I!==void 0&&R.ids.includes(I)}},[m.selection?.ids,m.selection?.selector,r,e,b]),h=r[e],S=l&&e===b+1,w=e<=i,E=ze.useCallback(()=>zl(h,n?.onRowClick),[h,n?.onRowClick]),P=ze.useMemo(()=>({showShadowHighlight:s===e,showLoadedStyle:w,...n,onClick:E}),[s,e,w,n,E]),T=ze.useCallback(R=>jsx(Box,{sx:{minHeight:28,height:"100%",width:"100%"},children:p?jsx(yo,{}):R}),[p]),g=ze.useMemo(()=>{let R=jsx(Bl,{isSheetView:u,isLoadingRow:S,columns:a,currentRowCount:r.length}),k=S||d&&e===b+1;return c&&k?u&&S&&a&&a.length>0?T(R):jsx(Box,{sx:{...u?{minHeight:28,height:"100%"}:{height:57},backgroundColor:"#F6F8FACC"}}):k?u&&S&&a&&a.length>0?T(R):jsx(Box,{sx:{...u?{minHeight:28,height:"100%"}:{height:57},display:"flex",justifyContent:"center",alignItems:"center"},children:jsx(Box,{sx:{backgroundColor:"#F6F8FACC",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},children:p?jsx(yo,{}):R})}):jsx(Ro,{index:e,row:h,columns:a,rowProps:P,isSheetView:u,isLastRow:e===r.length-1,isFirstRow:e===0,isLoading:l,isLoadMoreLoading:y,hasAdjacentCheckedAbove:f,hasAdjacentCheckedBelow:x,...m},`row-${e}`)},[m,e,h,a,P,u,S,p,d,b,c,r.length,T,y]);return jsx("div",{"data-testid":"ListItemWrapper",style:{...t,top:Number(t.top)-(o?.current??0),willChange:"top"},children:jsx(_l,{"data-testid":"ListItemWrapper_StyledItemWrapper",isSheetView:u,children:g})})}var Dt=Al;var Yl=jl((e,t,o,r,n,a,l,s,i,p,d)=>({columns:e,isLoading:t,rows:o,rowProps:r,scrollToIndex:n,totalCount:l,lastItemIndex:a,isError:s,areAllRowsLoaded:i,isSheetView:p,selection:d}));function Jl({columns:e,rows:t,threshold:o=200,showHeader:r,headerProps:n,rowProps:a,footerProps:l,isLoading:s,error:i,columnsSorting:p,onColumnSort:d,loadMoreItems:u,isFetchingNextPage:c$1,triggerDataRefetch:y,scrollToIndex:m,areAllRowsLoaded:b=false,tableBodyStyles:f,tableMode:x,tableTitle:h,onStartDrag:S,isSheetView:w=false,isMinimized:E,footerComponent:P,customNoDataComponent:T,defaultSkeleton:g=false,selection:R,isFilterEnabled:k}){let C=useTheme(),v=z=>{S?.(z);},I=c({value:c$1,delay:1e3}),[V,L]=useState(false),[M,D]=useState("INITIAL_KEY");useEffect(()=>{let z=`${l?.maximized}-${E}`,J=requestAnimationFrame(()=>D(z));return ()=>cancelAnimationFrame(J)},[l?.maximized,E]);let H=_b(i),N=s??true,G=!s&&t.length===0&&H&&!ac(i),W=!s&&t.length===0,_=$b(i),U=t.length-1,B=useMemo(()=>Cc(e,s??false,g),[e,s,g]),F=useMemo(()=>B.filter(z=>!z.hidden),[B]),ne=useMemo(()=>F.sort((z,J)=>(z?.order??1e6)-(J?.order??1e6)),[F]),Ne=useMemo(()=>R?R.isDisabled?t.filter(z=>!R.isDisabled(z)).length:t.length:0,[t,R?.isDisabled]),$t=useCallback(()=>R?(R.isDisabled?t.filter(J=>!R.isDisabled(J)):t).map(J=>J[R.selector]):[],[t,R?.isDisabled,R?.selector]),K=ab(t.length)&&!N,ie=I||b&&!K?t.length+1:t.length,$e=Yl(ne,I,t,a,m,U,l?.totalCount??0,H,b&&!K,w,R),ae=w?28:57,he=useRef(null);useEffect(()=>{he.current&&typeof he.current.resetAfterIndex=="function"&&he.current.resetAfterIndex(0,true);},[w,ae]);let Ut=useMemo(()=>{let z=ge=>{L(ge);};return jsx(Kl,{"data-testid":"VirtualTable_InfiniteLoader",isItemLoaded:ge=>ge!==U,itemCount:ie,loadMoreItems:async()=>{b||await u?.();},threshold:o,children:({onItemsRendered:ge,ref:Xt})=>jsx(Gl,{ref:Xt,"data-testid":"VirtualTable_AutoSizer",children:({height:nt,width:it})=>jsx(He,{"data-testid":"VirtualTable_VirtualList",useIsScrolling:true,className:"list",itemData:$e,height:K?ie*ae:nt||0,width:it||0,itemCount:ie,itemSize:()=>ae,onItemsRendered:ge,setBackdropVisibility:z,areTotalRowsNotFillingHeight:K,scrollToIndex:m,overscanCount:5,isSheetView:w,listRef:he,style:{paddingBottom:"13px"},children:Dt})},M)})},[U,u,o,b,K,ie,ae,w,$e,m,M]),X=N||G||W||_;return jsxs(Fragment,{children:[jsx(It,{children:jsxs(te,{as:"main",id:"table-box-container","aria-labelledby":"table-box-container","data-testid":"VirtualTable_StyledTableBox","data-title":h,"data-direction":C.direction,"data-are-all-rows-loaded":!!b,"data-is-fetching-next-page":!!c$1,"data-scroll-to-index":m,"data-is-loading":!!s,"data-is-error":!!H,"data-is-error-timeout":!!_,"data-table-mode":x,height:"100%",dir:C.direction,showNoDataView:X,scrollable:true,children:[jsxs(A,{"data-testid":"VirtualTable_TableWrapper",showNoDataView:X,compact:!X&&K,sx:{...f},children:[r&&jsx(mo,{"data-testid":"VirtualTable_TableHeader",columnsSorting:p,onColumnSort:d,columns:ne,headerProps:n,showBackDrop:V,isSheetView:w,totalCount:l?.totalCount??0,selection:R,selectableCount:Ne,getSelectableKeys:$t,isFilterEnabled:k}),X?T||jsx(Je,{error:i,tableEmpty:W,isTimeoutError:_,tableError:G,tableLoading:N,orderedColumns:ne,triggerDataRefetch:y,footerProps:l}):jsx(A,{"data-testid":"VirtualTable_TableWrapper",fixedHeight:K?ie*ae:void 0,sx:{width:"100%",minWidth:"fit-content"},children:jsx(ce,{"data-testid":"VirtualTable_StyledBox",hidePadding:true,className:"list-wrapper",children:Ut})})]}),!X&&K&&!c$1&&jsx(co,{height:(ie+1)*ae,sandboxMode:l?.sandboxMode,"data-testid":"VirtualTable_TableLastItem"})]})}),l&&jsx(b$1,{"data-testid":"VirtualTable_TableFooter",showSeparator:true,showBackDrop:V,onPointerDown:v,selectedCount:R?.ids.length,...l}),P]})}var Zl=memo(Jl);var Xn=b(Pt(),1);function ns({style:e,index:t,cardLoadingComponent:o}){return jsx(La,{sx:{...e,display:"flex",padding:0,"&:hover":{backgroundColor:"transparent !important"}},component:"div",children:jsx(Qa,{sx:{padding:0,flex:1},component:"div",children:o})},t)}var Po=memo(ns,areEqual);var ls=styled("section")(({isLoaded:e=false})=>({overflow:"hidden",paddingInline:"32px",backgroundColor:e?"rgba(255, 255, 255, 0.60)":"none",filter:e?"blur(8px)":"none",marginTop:e?"1rem":"0.2rem"}));function ss({isLoaded:e=false,isLoading:t=false,rowsCount:o,cardLoadingComponent:r}){let n=o||$a(e,t);return n=n>0?n:5,jsx(ls,{isLoaded:e,"data-testid":"TableLoadingWithCard",children:[...Array(n)].map(()=>jsx(Po,{cardLoadingComponent:r},`i-${(0, Xn.default)("TableLoadingRow_")}`))})}var Vo=memo(ss);function qn({error:e,tableEmpty:t,isTimeoutError:o,tableError:r,tableLoading:n,triggerDataRefetch:a,footerProps:l,cardLoadingComponent:s,noDataComponent:i}){let p;if(n)p=jsx(De,{"data-testid":"VirtualTable_SolidBackground",children:jsx(Vo,{"data-testid":"VirtualTable_TableLoading",isLoading:true,cardLoadingComponent:s})});else if(o)p=jsx(oe,{"data-testid":"VirtualTable_ErrorList_timeoutError",shouldMinimizeWidth:true,heading:"timeOut",message:"yourRequestOutPleaseTryAgain",triggerDataRefetch:a,sandboxMode:l?.sandboxMode});else if(r){let d=e,{formatted:u}=bc({error:d,fallbackMessage:"connectionErrorMsg"});p=jsx(oe,{"data-testid":"VirtualTable_ErrorList_tableError",heading:"somethingWentWrong",message:u,triggerDataRefetch:a,sandboxMode:l?.sandboxMode});}else t?p=i:p=jsx(oe,{"data-testid":"VirtualTable_ErrorList_tableError",heading:"somethingWentWrong",message:"connectionErrorMsg",triggerDataRefetch:a,sandboxMode:l?.sandboxMode});return p}qn.displayName="TableNoDataWithCard";var Lo=memo(qn);function us({row:e,index:t,rowProps:o,renderCardComponent:r}){return createElement(Rt,{"data-testid":"TableRow",onClick:o?.onRowClick,showShadowHighlight:o?.showShadowHighlight,showLoadedStyle:o?.showLoadedStyle,component:"article",...o,key:t},r&&jsx(r,{...e}))}var ko=memo(us,areEqual);var hs=(e,t)=>o=>{o?.stopPropagation?.(),t?.(e);},gs=styled("div",{shouldForwardProp:e=>e!=="showShadowHighlight"})(({theme:e})=>({backgroundColor:e.palette.background.default,height:"100%"}));function xs({index:e,style:t,data:{renderedScrollTopRef:o,rows:r,rowProps:n,isLoading:a,scrollToIndex:l,newLoadedRowsEndIndex:s,areAllRowsLoaded:i,renderCardComponent:p}}){let d=r.length-1,u=r[e],c=a&&e===d+1,y=e<=s,m=ze.useCallback(hs(u,n?.onRowClick),[u,n?.onRowClick]),b=ze.useMemo(()=>({showShadowHighlight:l===e,showLoadedStyle:y,...n,onClick:m}),[l,e,y,n,m,c,i,d]),f=ze.useMemo(()=>jsx(ko,{index:e,row:u,renderCardComponent:p,rowProps:b},`row-${e}`),[e,u,b]);return jsx("div",{"data-testid":"ListCardWrapper",style:{...t,top:Number(t.top)-o.current,willChange:"top"},children:jsx(gs,{"data-testid":"ListCardWrapper_StyledItemWrapper",children:f})})}var Mo=xs;var Ps=jl((e,t,o,r,n,a,l,s,i)=>({isLoading:e,rows:t,rowProps:o,scrollToIndex:r,totalCount:a,lastItemIndex:n,isError:l,areAllRowsLoaded:s,renderCardComponent:i}));function Vs({rows:e,threshold:t=200,rowProps:o,footerProps:r,rowHeight:n=57,isLoading:a,error:l,tableHeader:s,loadMoreItems:i,isFetchingNextPage:p,triggerDataRefetch:d,scrollToIndex:u,areAllRowsLoaded:c$2=false,tableBodyStyles:y,tableMode:m,tableTitle:b,renderCardComponent:f,cardLoadingComponent:x,tableHeight:h,tableHeaderHeight:S,noDataComponent:w,onStartDrag:E}){let P=useTheme(),T=_=>{E?.(_);},g=c({value:p,delay:1e3}),[R,k]=useState(false),C=_b(l),v=a??true,I=!a&&e.length===0&&C&&!ac(l),V=!a&&e.length===0,L=$b(l),M=e.length-1,D=ab(e.length)&&!v,H=g||c$2&&!D?e.length+1:e.length,N=Ps(g,e,o,u,M,r?.totalCount??0,C,c$2&&!D,f),G=useMemo(()=>{let _=B=>{k(B);};return jsx(Kl,{"data-testid":"VirtualTable_InfiniteLoader",isItemLoaded:B=>B!==M,itemCount:H,loadMoreItems:async()=>{c$2||await i?.();},threshold:t,children:({onItemsRendered:B,ref:F})=>jsx(Ce,{sx:{height:`${h-(S??0)}px`},id:"auto-sizer-wrapper",children:jsx(Gl,{ref:F,"data-testid":"VirtualTable_AutoSizer",children:({height:ne,width:Ne})=>jsx(He,{"data-testid":"VirtualTable_VirtualList",useIsScrolling:true,className:"list",itemData:N,height:ne||0,width:Ne||0,itemCount:H,itemSize:()=>n,onItemsRendered:B,setBackdropVisibility:_,areTotalRowsNotFillingHeight:D,scrollToIndex:u,overscanCount:5,children:Mo})})})})},[l,a,M,i,n,e,o,I,v,t,g,c$2,D,H]),W=v||I||V||L;return jsxs(Fragment,{children:[jsx(It,{children:jsx(bn,{as:"main",id:"table-box-container","aria-labelledby":"table-box-container","data-testid":"VirtualTable_StyledTableBox","data-title":b,"data-direction":P.direction,"data-are-all-rows-loaded":!!c$2,"data-is-fetching-next-page":!!p,"data-scroll-to-index":u,"data-is-loading":!!a,"data-is-error":!!C,"data-is-error-timeout":!!L,"data-table-mode":m,dir:P.direction,showNoDataView:W,sx:{height:`${h}px !important`},children:jsxs(A,{"data-testid":"VirtualTable_TableWrapper",showNoDataView:W,sx:{...y},children:[s,W?jsx(Lo,{error:l,tableEmpty:V,isTimeoutError:L,tableError:I,tableLoading:v,triggerDataRefetch:d,footerProps:r,cardLoadingComponent:x,noDataComponent:w}):G]})})}),jsx(c$1,{"data-testid":"VirtualTable_TableFooter",showSeparator:true,showBackDrop:R,onPointerDown:T,sx:{marginTop:"-37px"},...r})]})}var Ls=memo(Vs);var Bb=styled("img")(()=>({width:"13.3px",height:"13.3px"})),zb=styled("img")(()=>({width:"8px",height:"6.4px",cursor:"pointer",marginTop:"2px"})),Gn=styled("span")(({theme:e})=>({color:e.palette.text.primary,textOverflow:"ellipsis",width:"80%",overflow:"hidden",fontSize:"12px",fontWeight:600})),Kn=styled("div")(()=>({width:"16px",height:"auto",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"2px",padding:"2px",transition:"all 0.2s ease"})),Yn=styled(Fa,{shouldForwardProp:e=>e!=="showBackDrop"})(({showBackDrop:e,theme:t})=>({flex:"0 0 auto",boxShadow:e?t.shadows[23]:"none",backgroundColor:t.palette.background.default,zIndex:1,width:"100%",minWidth:"auto",overflowX:"auto"})),Jn=styled(La)(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",width:"100%",minWidth:"fit-content",height:"28px",backgroundColor:e.palette.primary.light})),Do=styled("div")({display:"flex",width:"100%",height:"100%",overflow:"hidden",borderRadius:"12px"}),Zn=styled("div")(({theme:e})=>({width:"auto",zIndex:10,flex:"0 0 auto",minWidth:0,display:"flex",flexDirection:"column",position:"relative",backgroundColor:e.palette.primary.light,borderTop:"1px solid #F2F2F2",borderBottom:"1px solid #F2F2F2",overflow:"hidden"})),Qn=styled(Zn)({boxShadow:"4px 0px 24px 0px #00000014",borderLeft:"1px solid #F2F2F2",borderRight:"none",borderTopLeftRadius:"12px",borderBottomLeftRadius:"12px"}),ei=styled(Zn)({boxShadow:"-4px 0px 24px 0px #00000014",borderRight:"1px solid #F2F2F2",borderLeft:"none",borderTopRightRadius:"12px",borderBottomRightRadius:"12px"}),Ht=styled("div",{shouldForwardProp:e=>e!=="hasPinnedStart"&&e!=="hasPinnedEnd"})(({hasPinnedStart:e,hasPinnedEnd:t})=>({flex:"1 1 auto",minWidth:0,display:"flex",flexDirection:"column",borderTop:"1px solid #F2F2F2",borderBottom:"1px solid #F2F2F2",borderLeft:e?"none":"1px solid #F2F2F2",borderRight:t?"none":"1px solid #F2F2F2",position:"relative",scrollbarWidth:"auto",overflow:"hidden",borderTopLeftRadius:e?"0":"12px",borderBottomLeftRadius:e?"0":"12px",borderTopRightRadius:t?"0":"12px",borderBottomRightRadius:t?"0":"12px"})),_e=styled("div")({flexShrink:0,height:"auto",overflow:"auto"});var Ho=(e,t,o)=>{let[r,n]=useState(()=>{let m=t?e.filter(f=>f.pinned==="start").map(f=>f.id):[],b=e.filter(f=>f.isDefaultPinned&&f.pinned!=="end").map(f=>f.id);return Array.from(new Set([...b,...m]))}),[a,l]=useState(()=>{let m=e.filter(h=>h.isDefaultPinned&&h.pinned==="end").map(h=>h.id);if(!t)return m;let b=e.filter(h=>h.pinned==="end").map(h=>h.id),f=e.filter(h=>!h.hidden),x=f[f.length-1];return b.length===0&&x&&!x.pinned&&!x.isDefaultPinned?[x.id]:b}),s=useCallback((m,b="start")=>{if(!t)return;let f=[...r],x=[...a];b==="unpin"?(f=f.filter(S=>S!==m),x=x.filter(S=>S!==m)):b==="start"?(f=[...f.filter(S=>S!==m),m],x=x.filter(S=>S!==m)):b==="end"&&(x=[...x.filter(S=>S!==m),m],f=f.filter(S=>S!==m)),n(f),l(x);let h=f.includes(m)||x.includes(m);o?.(m,h);},[r,a,o,t]),i=useMemo(()=>e.filter(m=>!m.hidden),[e]),{pinnedStartColumnsData:p,pinnedEndColumnsData:d,unpinnedColumnsData:u}=useMemo(()=>{let m=i.filter(w=>r.includes(w.id)),b=i.filter(w=>a.includes(w.id)),f=i.filter(w=>!r.includes(w.id)&&!a.includes(w.id)),x=m.sort((w,E)=>(w?.order??1e6)-(E?.order??1e6)),h=b.sort((w,E)=>(w?.order??1e6)-(E?.order??1e6)),S=f.sort((w,E)=>(w?.order??1e6)-(E?.order??1e6));return {pinnedStartColumnsData:x,pinnedEndColumnsData:h,unpinnedColumnsData:S}},[i,r,a]),c=useMemo(()=>[...p,...u,...d],[p,u,d]),y=useMemo(()=>{let m=c[c.length-1];return m?m.id:null},[c]);return {pinnedStartColumns:r,pinnedEndColumns:a,handleColumnPin:s,pinnedStartColumnsData:p,pinnedEndColumnsData:d,unpinnedColumnsData:u,orderedColumns:c,lastColumnId:y}};var Fo=()=>{let e=useRef(null),t=useRef(null),o=useRef(null),r=useRef(false),n=useCallback(({scrollOffset:a},l)=>{r.current||(r.current=true,l!=="start"&&e.current&&e.current.scrollTo(a),l!=="end"&&o.current&&o.current.scrollTo(a),l!=="scrollable"&&t.current&&t.current.scrollTo(a),requestAnimationFrame(()=>{r.current=false;}));},[]);return {pinnedStartVirtualListRef:e,scrollableVirtualListRef:t,pinnedEndVirtualListRef:o,handleScroll:n}};var Bo=()=>{let[e,t]=useState(null),[o,r]=useState(null),[n,a]=useState(null),[l,s]=useState(null),[i,p]=useState(false),d=useCallback((m,b,f,x,h)=>{f.stopPropagation();let S=`${h??"default"}-${m}-${b}-${x}`,w=`${h??"default"}-${m}-${b}`;if(n===S){a(null),t(null);return}a(S),t(w),s(null);},[n,a,t,s]),u=useCallback((m,b,f,x)=>{if(f.stopPropagation(),x==="start"&&b===0){s(S=>S===m?null:m),t(null),r(null),a(null);return}let h=`${x??"default"}-${m}-${b}`;t(S=>S===h?null:h),r(null),a(null),s(null);},[l]),c=useCallback((m,b,f)=>{b.stopPropagation();let x=`${f??"default"}-${m}`;r(h=>h===x?null:x),t(null),a(null),s(null);},[]),y=useCallback(()=>{t(null),r(null),a(null),s(null);},[]);return {selectedCell:e,selectedColumn:o,selectedRow:l,showBackDrop:i,selectedChip:n,setShowBackdrop:p,handleChipClick:d,handleCellClick:u,handleColumnClick:c,resetSelection:y}};var Hs=e=>e!==null&&"isAxiosError"in e&&e.isAxiosError===true,zo=({rows:e,isLoading:t,error:o,isFetchingNextPage:r,areAllRowsLoaded:n})=>{let a=c({value:r,delay:1e3}),l=useMemo(()=>{let i=_b(o||null),p=t??true,d=o&&Hs(o)?o:null,u=!t&&e.length===0&&i&&!ac(d),c=!t&&e.length===0,y=$b(d);return {isError:i,tableLoading:p,tableError:u,tableEmpty:c,hasTimeoutError:y,showNoDataView:p||u||c||y}},[e.length,t,o]),s=useMemo(()=>{let i=e.length-1,p=ab(e.length)&&!l.tableLoading,d=(a??false)||n?e.length+1:e.length;return {lastItemIndex:i,areTotalRowsNotFillingHeight:p,itemsCount:d}},[e.length,l.tableLoading,a,n]);return {...l,...s,isDelayedFetchingNextPage:a??false}};var Bs=jl((e,t,o,r,n,a,l,s,i,p,d,u,c,y,m,b,f,x)=>({columns:e,isLoading:t,rows:o,rowProps:r,scrollToIndex:n,totalCount:l,lastItemIndex:a,isError:s,areAllRowsLoaded:i,limit:l,newLoadedRowsEndIndex:a,isSheetView:true,isPinned:p,selectedCell:d,selectedColumn:u,selectedRow:c,selectedChip:y,onCellClick:m,onChipClick:b,containerHeight:f,rowHeight:x})),_o=({rowHeight:e,areAllRowsLoaded:t,rows:o,isDelayedFetchingNextPage:r,rowProps:n,scrollToIndex:a,footerProps:l,isError:s,selectedCell:i,selectedColumn:p,selectedRow:d,selectedChip:u,handleCellClick:c,handleChipClick:y})=>{let m=useCallback((h,S)=>{if(t&&h===o.length){let E=o.length*e,P=S-E,T=e*2;return Math.max(P,T)}return e},[t,o.length,e]),b=useMemo(()=>[r,o,n,a,o.length-1,l?.totalCount??0,s,t],[r,o,n,a,l?.totalCount,s,t]),f=useMemo(()=>[i,p,d,u,c,y],[i,p,d,u,c,y]),x=useCallback((h,S,w)=>Bs(h,...b,S,...f,w,e),[b,f,e]);return {getItemSize:m,getItemDataForContainer:x}};var zs=(e,t)=>{let o=useMemo(()=>e.reduce((n,a)=>{let l=typeof a.width=="string"?parseInt(a.width):a.width||100;return n+l},.2),[e]),r=useMemo(()=>t.reduce((n,a)=>{let l=typeof a.width=="string"?parseInt(a.width):a.width||100;return n+l},.2),[t]);return {pinnedStartColumnsWidth:o,pinnedEndColumnsWidth:r}};var Ao=({tableContainerRef:e,showHeader:t,isResizing:o})=>{let[r,n]=useState({top:0,height:0});return useEffect(()=>{let a=()=>{if(e.current){let l=e.current.getBoundingClientRect(),s=t?28:0;n({top:l.top+s,height:l.height-s});}};if(a(),o){let l=()=>a();return window.addEventListener("resize",l),()=>window.removeEventListener("resize",l)}},[o,t,e]),r};var ai=styled("div",{shouldForwardProp:e=>e!=="isResizing"&&e!=="isLast"})(({isLast:e})=>({position:"absolute",top:0,right:e?-10:-11,width:20,height:"100%",backgroundColor:"transparent",zIndex:100001,display:"flex",alignItems:"center",justifyContent:"center"})),li=styled("div",{shouldForwardProp:e=>e!=="isVisible"&&e!=="x"&&e!=="height"&&e!=="top"})(({isVisible:e,x:t,height:o,top:r})=>({position:"fixed",left:t,top:r,width:1,height:`calc(${o}px - 14px)`,backgroundColor:"#1F88D0",zIndex:9999,pointerEvents:"none",opacity:e?1:0,transition:"opacity 0.1s ease","&::before":{content:'""',position:"absolute",left:-1,top:0,width:1,height:"100%"}})),_t=styled("div",{shouldForwardProp:e=>e!=="isVisible"&&e!=="x"&&e!=="y"&&e!=="offsetX"})(({isVisible:e,x:t,y:o,offsetX:r=0})=>({position:"fixed",left:t+r-8,top:o,width:20,height:16,backgroundImage:`url(${Vi})`,backgroundSize:"contain",backgroundRepeat:"no-repeat",backgroundPosition:"center",zIndex:1e5,pointerEvents:"none",display:e?"block":"none",transform:"translate(-50%, -50%)"}));function Us({columnId:e,onStartResize:t,isResizing:o,isLast:r=false}){let[n,a]=useState(false),[l,s]=useState({x:0,y:0}),i=useRef(null),p=useCallback(()=>{let m=i.current?.getBoundingClientRect();m&&s({x:m.right,y:m.top+m.height/2});},[]),d=useCallback(()=>{o||(a(true),p());},[o,p]),u=useCallback(()=>{!o&&n&&p();},[o,n,p]),c=useCallback(()=>{a(false);},[]);return jsxs(Fragment,{children:[jsx(ai,{ref:i,isResizing:o,isLast:r,onMouseDown:m=>{m.stopPropagation(),m.preventDefault(),a(false),t(m,e);},onMouseEnter:d,onMouseMove:u,onMouseLeave:c,"data-testid":`column-resize-handle-${e}`}),createPortal(jsx(_t,{isVisible:n&&!o,x:l.x,y:l.y,offsetX:-2}),document.body)]})}var No=memo(Us);function Ks({isVisible:e,indicatorX:t,indicatorHeight:o,indicatorTop:r,iconX:n,iconY:a}){return e?createPortal(jsxs(Fragment,{children:[jsx(li,{isVisible:e,x:t,height:o,top:r,"data-testid":"column-resize-indicator"}),jsx(_t,{isVisible:e,x:n,y:a,offsetX:8,"data-testid":"floating-resize-icon"})]}),document.body):null}var $o=memo(Ks);var Zs=e=>{if(!e||typeof e!="object")return false;let t=e;return "width"in t&&p(t.width)},Qs=e=>!e||typeof e!="object"?false:Object.values(e).every(Zs),ed=e=>!e||typeof e!="object"?false:Object.values(e).every(Qs),mi=e=>!e||typeof e!="object"?false:Object.values(e).every(ed),ui=()=>{try{let e=wa$1();if(!e)return {};let t=e;return mi(t)?t:(console.warn("Invalid column settings in localStorage"),{})}catch(e){return console.warn("Failed to get sheetview columns:",e),{}}},td=e=>{if(!mi(e))return console.warn("Invalid data structure for sheetview columns"),false;try{return va$1(e),!0}catch(t){return console.warn("Failed to save sheetview columns:",t),false}},ci=(e,t,o,r)=>{if(!hb(e)||!hb(t)||!hb(o))return r;try{return ui()[e]?.[t]?.[o]?.width??r}catch(n){return console.warn("Failed to get column width:",n),r}},fi=(e,t,o,r)=>{if(!hb(e)||!hb(t)||!hb(o)||!p(r))return console.warn("Invalid parameters for setColumnWidth"),false;try{let n=ui();return n[e]||(n[e]={}),n[e][t]||(n[e][t]={}),n[e][t][o]?n[e][t][o].width=r:n[e][t][o]={width:r},td(n)}catch(n){return console.warn("Failed to set column width:",n),false}};var ye={MIN_WIDTH:25,MAX_WIDTH:1500,DEFAULT_WIDTH:100};var bi=e=>{if(typeof e=="string"){let t=parseInt(e,10);return isNaN(t)?ye.DEFAULT_WIDTH:t}return e||ye.DEFAULT_WIDTH},Uo=e=>Math.max(ye.MIN_WIDTH,Math.min(ye.MAX_WIDTH,e)),j=e=>{let t=String(e.id);return e.tableViewId?`${t}_${e.tableViewId}`:t},Xo=(e,t)=>e.map(o=>{let r=j(o);return {...o,width:t[r]||o.width}}),hi=(e,t)=>{e.current&&(document.removeEventListener("mousemove",e.current),e.current=void 0),t.current&&(document.removeEventListener("mouseup",t.current),t.current=void 0),document.body.style.cursor="",document.body.style.userSelect="";},od=(e,t,o,r,n,a,l,s,i)=>p=>{try{let d=i.current-o,u=Uo(t+d);l(c=>({...c,columnWidths:{...c.columnWidths,[e]:u},isResizing:!1,resizingColumn:null,resizeIndicatorX:0})),r&&n&&(fi(r,n,String(e),u)||console.warn(`Failed to persist column width for ${e}`)),a?.(e,u),p.stopPropagation(),p.preventDefault(),s();}catch(d){console.error("Error in mouse up handler:",d),s();}},gi=(e,t,o,r,n,a,l,s,i)=>p=>{try{let d=p.clientX;if(r?.current){let c=r.current.getBoundingClientRect(),y=c.left,m=c.right;a==="start"&&n===1&&(m=m-38),d=Math.max(y,Math.min(m,p.clientX));}l&&(l.current=d);let u=d;if(s&&i){let c=s.current-i.current+ye.MIN_WIDTH;d<c&&(u=c);}e(c=>({...c,resizeIndicatorX:u})),t({x:u,y:o.current});}catch(d){console.error("Error in mouse move handler:",d);}},xi=(e,t)=>e[t]||ye.DEFAULT_WIDTH,Ci=(e,t,o,r,n,a,l)=>(s,i,p)=>d=>{od(s,i,p,e,t,o,r,n,l)(d),setTimeout(()=>{a.current=false;},0);};var qo=({columns:e,onColumnResize:t,handleColumnClick:o,windowId:r,serviceCode:n,tableContainerRef:a})=>{let l=useMemo(()=>e.reduce((I,V)=>{let L=j(V),M=bi(V.width),D=M;if(r&&n)try{D=ci(r,n,L,M)??M;}catch(H){console.warn(`Failed to load stored width for column ${L}:`,H),D=M;}return I[L]=Uo(D),I},{}),[r,n]),[{columnWidths:s,isResizing:i,resizingColumn:p,resizeIndicatorX:d},u]=useState(()=>({columnWidths:l,isResizing:false,resizingColumn:null,startX:0,startWidth:0,resizeIndicatorX:0})),[c,y]=useState({x:0,y:0}),m=useRef(false),b=useRef(0),f=useRef(0),x=useRef(0),h=useRef(0),S=useRef(),w=useRef();useEffect(()=>{u(I=>{let V=new Set(Object.keys(I.columnWidths)),L=new Set(Object.keys(l));return V.size!==L.size?{...I,columnWidths:l}:Array.from(L).some(D=>!V.has(D)||I.columnWidths[D]!==l[D])?{...I,columnWidths:l}:I});},[]);let E=useCallback(I=>xi(s,I),[s]),P=useCallback(()=>{hi(S,w);},[]),T=useCallback((I,V,L)=>Ci(r,n,t,u,P,m,f)(I,V,L),[r,n,t,P]),g=useCallback((I,V)=>gi(u,y,b,a,I,V,f,x,h),[a]),R=useCallback((I,V)=>{I.preventDefault(),I.stopPropagation();try{let L=E(V),M=I.clientX,D=e.find(F=>j(F)===V),H=D?e.filter(F=>F.pinned===D.pinned).findIndex(F=>j(F)===V):void 0,N=D?.pinned,W=I.currentTarget.closest('[data-testid="SheetViewVirtualTable_TableHeader_StyledCell"]'),_=I.clientY;if(W){let F=W.getBoundingClientRect();_=F.top+F.height/2;}u(F=>({...F,isResizing:!0,resizingColumn:V,startX:M,startWidth:L,resizeIndicatorX:M,resizingColumnIndex:H,resizingColumnPinned:N})),b.current=_,f.current=M,x.current=M,h.current=L,y({x:M,y:_}),m.current=!0;let U=g(H,N),B=T(V,L,M);S.current=U,w.current=B,document.addEventListener("mousemove",U),document.addEventListener("mouseup",B),document.body.style.cursor="none",document.body.style.userSelect="none";}catch(L){console.error("Error starting resize:",L),P();}},[E,g,T,P,e]),k=useCallback(()=>{try{u(I=>({...I,isResizing:!1,resizingColumn:null,resizeIndicatorX:0})),m.current=!1,P();}catch(I){console.error("Error stopping resize:",I),P();}},[P]),C=useCallback(()=>m.current,[]),v=useCallback((I,V,L)=>{C()||o(I,V,L);},[o,C]);return useEffect(()=>P,[P]),{columnWidths:s,isResizing:i,resizingColumn:p,resizeIndicatorX:d,cursorPosition:c,getColumnWidth:E,startResize:R,stopResize:k,isCurrentlyResizing:C,handleColumnClick:v}};var jo=({pinnedStartColumnsData:e,pinnedEndColumnsData:t,columnWidths:o})=>{let r=useMemo(()=>e.reduce((s,i)=>{let p=j(i),d=o[p]||parseInt(String(i.width))||150;return s+d},.2),[e,o]),n=useMemo(()=>t.reduce((s,i)=>{let p=j(i),d=o[p]||parseInt(String(i.width))||150;return s+d},.2),[t,o]),a=useMemo(()=>e.map(s=>{let i=j(s);return {...s,width:o[i]||s.width}}),[e,o]),l=useMemo(()=>t.map(s=>{let i=j(s);return {...s,width:o[i]||s.width}}),[t,o]);return {pinnedStartColumnsWidth:r,pinnedEndColumnsWidth:n,pinnedStartColumnsDataWithWidths:a,pinnedEndColumnsDataWithWidths:l}};var wi=b(Pt(),1);var sd=styled("section")(({isLoaded:e=false,isPinned:t=false})=>({overflow:"hidden",paddingInline:e&&!t?"32px":"0px",backgroundColor:e&&!t?"rgba(255, 255, 255, 0.60)":"none",filter:e&&!t?"blur(8px)":"none",marginTop:e&&!t?"1rem":"0",height:"100%",maxHeight:"100%"}));function dd({columns:e,isLoaded:t=false,animationType:o,isLoading:r=false,rowsCount:n=13,isPinned:a=false}){let[l,s]=useState(()=>n||Math.min($a(t,r),15));return useEffect(()=>{if(n){s(n);return}let i=()=>{let u=document.querySelector('[data-testid="SheetViewTableLoading"]');if(!u)return Math.min($a(t,r),25);let c=u.parentElement?.clientHeight||0,y=28,b=c-40;if(b<=0)return Math.min($a(t,r),25);let f=Math.floor(b/y);return Math.max(3,Math.min(f+2,25))},p=i();s(p);let d=()=>{let u=i();s(u);};return window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)},[t,r,n]),jsx(sd,{isLoaded:t,isPinned:a,"data-testid":"SheetViewTableLoading",children:[...Array(l)].map((i,p)=>jsx(Ze,{columns:e,animationType:o,rowIndex:p,useTableBackground:!a},`i-${(0, wi.default)("SheetViewTableLoadingRow_")}`))})}var le=memo(dd);function Ri({error:e,tableEmpty:t,isTimeoutError:o,tableError:r,tableLoading:n,orderedColumns:a,triggerDataRefetch:l,footerProps:s}){let i;if(n)i=jsx(De,{"data-testid":"SheetViewVirtualTable_SolidBackground",children:jsx(le,{"data-testid":"SheetViewVirtualTable_TableLoading",columns:a,isLoading:true,isPinned:false})});else if(o)i=jsx(oe,{"data-testid":"SheetViewVirtualTable_ErrorList_timeoutError",shouldMinimizeWidth:true,heading:"timeOut",message:"yourRequestOutPleaseTryAgain",triggerDataRefetch:l,sandboxMode:s?.sandboxMode});else if(r){let p=e,{formatted:d}=bc({error:p,fallbackMessage:"connectionErrorMsg"});i=jsx(oe,{"data-testid":"SheetViewVirtualTable_ErrorList_tableError",heading:"somethingWentWrong",message:d,triggerDataRefetch:l,sandboxMode:s?.sandboxMode});}else if(t){let p=e,{formatted:d}=bc({error:p,fallbackMessage:"tryAdjustingTheDateOrFilters"});i=jsx(kt,{sandboxMode:s?.sandboxMode,heading:"nothingFound",message:d});}else i=jsx(oe,{"data-testid":"SheetViewVirtualTable_ErrorList_tableError",heading:"somethingWentWrong",message:"connectionErrorMsg",triggerDataRefetch:l,sandboxMode:s?.sandboxMode});return i}Ri.displayName="SheetViewTableNoData";var md=memo(Ri);function xd({column:{header:e,id:t,tableViewId:o,align:r,headerStyle:n,sortable:a,filter:l,pinnable:s,width:i,order:p,pinned:d},colIndex:u,isFirst:c,isLast:y,isSelected:m,isDefaultPinned:b,onColumnSort:f,columnsSorting:x,onColumnPin:h,isPinnable:S,lastColumnId:w,onColumnClick:E,pinnedColumns:P,onStartResize:T,isResizing:g=false,resizingColumn:R=null}){let k=j({id:t,tableViewId:o}),[C,v]=useState(null),I=useRef(null),{isFilterApplied:V}=Ke({filter:l}),L=useCallback(W=>P?.includes(W),[P]),M=useMemo(()=>L(t),[t,L]),D=W=>{L(W)?h?.(W,"unpin"):W===w?h?.(W,"end"):h?.(W,"start");},H=()=>{v(I.current);};return jsxs(Se,{"data-id":t,component:"div","data-testid":"SheetViewVirtualTable_TableHeader_StyledCell","data-column-id":t,"data-column-width":i,"data-column-width-used":i,"data-column-align":r,"data-column-order":p,"data-column-header":typeof e=="string"?e:"component","data-column-sortable":!!a,"data-column-filterable":!!l,"data-column-pinned":M,isFirst:c,isLast:y,isSheetView:true,ref:I,onClick:W=>{W.target===W.currentTarget&&E?.(u,W,d);},sx:W=>({display:"flex",gap:W.spacing(.5),alignItems:"center",justifyContent:r==="right"?"flex-end":"flex-start",width:i,textAlign:r,overflow:"visible !important",cursor:"pointer",boxSizing:"border-box",border:"0.5px solid transparent",borderColor:m?"#1F88D0":"#F2F2F2",borderBottom:m?"0.5px solid transparent":"0.5px solid #F2F2F2",backgroundColor:m?"#F2F2F2":"#FCFCFC",minHeight:"28px",position:"relative","&:before":{content:'""',borderBottom:"none",position:"absolute",top:0,right:0,left:0,bottom:0},...n}),children:[jsxs(wt,{onClick:W=>{W.stopPropagation(),H();},children:[typeof e=="function"?e():jsx(Ce,{"data-testid":"SheetViewTableHeader_columns_header",sx:{maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e&&jsx(Gn,{"data-testid":"SheetViewVirtualTable_TableHeader_StyledCell_header_text",children:e})}),l&&jsx(Ge,{...l,anchorEl:C,setAnchorEl:v,isFilterApplied:V}),a&&jsx(Ct,{columnId:t,onColumnSort:f,columnsSorting:x,onClick:W=>{E?.(u,W,d);}}),S&&s&&!b&&!y&&jsx(Kn,{onClick:W=>{W.stopPropagation(),D(t);},title:M?"Unpin column":"Pin column",children:jsx("img",{src:M?Tg:Sg,alt:"pin-icon"})})]}),T&&d!=="end"&&jsx(No,{columnId:k,onStartResize:T,isResizing:g,isLast:y})]})}var Ei=memo(xd);function Sd({columns:e,headerProps:t,showBackDrop:o,onColumnSort:r,columnsSorting:n,pinnedColumns:a=[],onColumnPin:l,isPinnable:s=false,lastColumnId:i,selectedColumn:p=null,onColumnClick:d,onStartResize:u,isResizing:c=false,resizingColumn:y=null}){return jsx(Yn,{component:"nav","data-testid":"SheetViewVirtualTable_TableHeader_StyledHeader",showBackDrop:o,...t,children:jsx(Jn,{component:"section","data-testid":"SheetViewVirtualTable_TableHeader_StyledMUITableRow",children:e.map((m,b)=>{let f=`${m.pinned??"default"}-${b}`;return jsx(Ei,{column:m,colIndex:b,isFirst:m.id===e[0].id,isLast:m.id===e[e.length-1].id,isDefaultPinned:!!m.isDefaultPinned,isSelected:p===f,onColumnSort:r,columnsSorting:n,pinnedColumns:a,onColumnPin:l,isPinnable:s,lastColumnId:i,onColumnClick:d,onStartResize:u,isResizing:c,resizingColumn:y},`${m.id}-${b}`)})})})}var se=memo(Sd);function Rd({columnsData:e,itemCount:t,lastItemIndex:o,areAllRowsLoaded:r,loadMoreItems:n,threshold:a,getItemSize:l,getItemData:s,isPinned:i,fixedWidth:p,scrollToIndex:d,areTotalRowsNotFillingHeight:u,clearBackdropVisibilityTimeout:c,onScroll:y,setBackdropVisibility:m,listRef:b,overscanCount:f=40}){return jsx(Kl,{isItemLoaded:h=>h!==o,itemCount:t,loadMoreItems:async()=>{r||await n?.();},threshold:a,children:({onItemsRendered:h,ref:S})=>jsx(Gl,{ref:S,children:({height:w,width:E})=>{let P=g=>l(g,w),T=s(e,i,w);return jsx(He,{listRef:b,height:w,width:p||E,itemCount:t,itemSize:P,itemData:T,onItemsRendered:h,overscanCount:f,setBackdropVisibility:m,scrollToIndex:d,areTotalRowsNotFillingHeight:u,useIsScrolling:true,onScroll:y,clearBackdropVisibilityTimeout:c,style:{overflowX:i?"hidden":"auto",paddingBottom:i?"25px":"13px",backgroundColor:i?"transparent":"#F6F8FACC"},children:Dt})}})})}var Yo=memo(Rd);function Pd({position:e,columnsData:t,columnsWidth:o,pinnedColumnsList:r,showHeader:n,columnsSorting:a,onColumnSort:l,headerProps:s,showBackDrop:i,onColumnPin:p,isPinnable:d,lastColumnId:u,selectedColumn:c,onColumnClick:y,hasPinnedStart:m,hasPinnedEnd:b,tableTitle:f,areAllRowsLoaded:x,isFetchingNextPage:h,scrollToIndex:S,isLoading:w,isError:E,hasTimeoutError:P,tableMode:T,showNoDataView:g,tableLoading:R,createVirtualTableContainer:k,onStartResize:C,isResizing:v,resizingColumn:I}){let V=useTheme();if(t.length===0)return null;let L=e==="start"?Qn:ei,M=e==="start"?"pinnedStart":"pinnedEnd";return jsx(L,{children:jsxs(te,{as:"main",id:"sheet-table-box-container","aria-labelledby":"sheet-table-box-container","data-testid":"SheetViewVirtualTable_StyledTableBox","data-title":f,"data-direction":V.direction,"data-are-all-rows-loaded":!!x,"data-is-fetching-next-page":!!h,"data-scroll-to-index":S,"data-is-loading":!!w,"data-is-error":!!E,"data-is-error-timeout":!!P,"data-table-mode":T,height:"100%",dir:V.direction,showNoDataView:g,children:[n&&jsx(se,{"data-testid":"SheetViewVirtualTable_PinnedTableHeader",columnsSorting:a,onColumnSort:l,columns:t,headerProps:s,showBackDrop:i,pinnedColumns:r,onColumnPin:p,isPinnable:d,lastColumnId:u,selectedColumn:c,onColumnClick:y,tablePosition:e==="start"?"pinnedStart":"pinnedEnd",hasPinnedStart:m,hasPinnedEnd:b,onStartResize:C,isResizing:v,resizingColumn:I}),jsx(A,{"data-testid":"VirtualTable_TableWrapper",sx:{width:"100%",minWidth:"fit-content",overflowX:"hidden"},children:jsx(ce,{"data-testid":"SheetViewVirtualTable_PinnedStyledBox",hidePadding:true,className:"list-wrapper",sx:{height:"100%",maxHeight:"100%",overflow:"hidden"},children:R?jsx(le,{"data-testid":`SheetViewVirtualTable_PinnedTableLoading_${e}`,columns:t,isLoading:true,isPinned:true}):k(t,M,true,o)})})]})})}var Oe=memo(Pd);function vd({hasPinnedStart:e,hasPinnedEnd:t,unpinnedColumnsData:o,showHeader:r,columnsSorting:n,onColumnSort:a,headerProps:l,showBackDrop:s,pinnedStartColumns:i,pinnedEndColumns:p,onColumnPin:d,isPinnable:u,lastColumnId:c,selectedColumn:y,onColumnClick:m,tableTitle:b,areAllRowsLoaded:f,isFetchingNextPage:x,scrollToIndex:h,isLoading:S,isError:w,hasTimeoutError:E,tableMode:P,showNoDataView:T,tableBodyStyles:g,tableLoading:R,createVirtualTableContainer:k,onStartResize:C,isResizing:v,resizingColumn:I}){let V=useTheme();return jsx(Ht,{hasPinnedStart:e,hasPinnedEnd:t,children:jsx(te,{as:"main",id:"sheet-table-box-container","aria-labelledby":"sheet-table-box-container","data-testid":"SheetViewVirtualTable_StyledTableBox","data-title":b,"data-direction":V.direction,"data-are-all-rows-loaded":!!f,"data-is-fetching-next-page":!!x,"data-scroll-to-index":h,"data-is-loading":!!S,"data-is-error":!!w,"data-is-error-timeout":!!E,"data-table-mode":P,height:"100%",dir:V.direction,showNoDataView:T,scrollable:true,children:jsxs(A,{"data-testid":"SheetViewVirtualTable_TableWrapper",showNoDataView:T,sx:{...g,display:"flex",flexDirection:"column",height:"100%"},children:[r&&jsx(_e,{children:jsx(se,{"data-testid":"SheetViewVirtualTable_UnpinnedTableHeader",columnsSorting:n,onColumnSort:a,columns:o,headerProps:l,showBackDrop:s,pinnedColumns:[...i,...p],onColumnPin:d,isPinnable:u,lastColumnId:c,selectedColumn:y,onColumnClick:m,tablePosition:"scrollable",hasPinnedStart:e,hasPinnedEnd:t,onStartResize:C,isResizing:v,resizingColumn:I})}),jsx(A,{"data-testid":"VirtualTable_TableWrapper",sx:{width:"100%",minWidth:"fit-content"},children:jsx(ce,{"data-testid":"SheetViewVirtualTable_ScrollableStyledBox",hidePadding:true,className:"list-wrapper",sx:{height:"100%",maxHeight:"100%",overflow:"hidden"},children:R?jsx(le,{"data-testid":"SheetViewVirtualTable_TableLoading",columns:o,isLoading:true,isPinned:false}):k(o,"scrollable",false)})})]})})})}var Jo=memo(vd);function Hd({hasPinnedStart:e,hasPinnedEnd:t,unpinnedColumnsData:o,showHeader:r,columnsSorting:n,onColumnSort:a,headerProps:l,showBackDrop:s,pinnedStartColumns:i,pinnedEndColumns:p,onColumnPin:d,isPinnable:u,lastColumnId:c,selectedColumn:y,onColumnClick:m,tableTitle:b,areAllRowsLoaded:f,isFetchingNextPage:x,scrollToIndex:h,isLoading:S,isError:w,hasTimeoutError:E,tableMode:P,showNoDataView:T,tableBodyStyles:g}){let R=useTheme();return jsx(Ht,{hasPinnedStart:e,hasPinnedEnd:t,children:jsx(te,{as:"main",id:"sheet-table-box-container","aria-labelledby":"sheet-table-box-container","data-testid":"SheetViewVirtualTable_StyledTableBox_Loading","data-title":b,"data-direction":R.direction,"data-are-all-rows-loaded":!!f,"data-is-fetching-next-page":!!x,"data-scroll-to-index":h,"data-is-loading":!!S,"data-is-error":!!w,"data-is-error-timeout":!!E,"data-table-mode":P,height:"100%",dir:R.direction,showNoDataView:T,scrollable:true,children:jsxs(A,{"data-testid":"SheetViewVirtualTable_LoadingTableWrapper",showNoDataView:T,sx:{...g,display:"flex",flexDirection:"column",height:"100%"},children:[r&&jsx(_e,{children:jsx(se,{"data-testid":"SheetViewVirtualTable_LoadingTableHeader",columnsSorting:n,onColumnSort:a,columns:o,headerProps:l,showBackDrop:s,pinnedColumns:[...i,...p],onColumnPin:d,isPinnable:u,lastColumnId:c,selectedColumn:y,onColumnClick:m,tablePosition:"scrollable",hasPinnedStart:e,hasPinnedEnd:t})}),jsx(A,{"data-testid":"VirtualTable_LoadingTableWrapper",sx:{width:"100%",minWidth:"fit-content"},children:jsx(ce,{"data-testid":"SheetViewVirtualTable_LoadingStyledBox",hidePadding:true,className:"list-wrapper",sx:{height:"100%",maxHeight:"100%",display:"flex",flexDirection:"column",overflow:"hidden"},children:jsx(le,{"data-testid":"SheetViewVirtualTable_TableLoading",columns:o,isLoading:true,isPinned:false})})})]})})})}var Zo=memo(Hd);function _d({tableLoading:e,tableError:t,tableEmpty:o,hasTimeoutError:r,orderedColumns:n,showHeader:a,columnsSorting:l,onColumnSort:s,headerProps:i,showBackDrop:p,onColumnPin:d,lastColumnId:u,selectedColumn:c,onColumnClick:y,tableTitle:m,areAllRowsLoaded:b,isFetchingNextPage:f,scrollToIndex:x,isLoading:h,isError:S,tableMode:w,tableBodyStyles:E,error:P,triggerDataRefetch:T,footerProps:g,customNoDataComponent:R}){let k=useTheme(),C=e||t||o||r;return jsx(te,{as:"main",id:"sheet-table-box-container","aria-labelledby":"sheet-table-box-container","data-testid":"SheetViewVirtualTable_StyledTableBox","data-title":m,"data-direction":k.direction,"data-are-all-rows-loaded":!!b,"data-is-fetching-next-page":!!f,"data-scroll-to-index":x,"data-is-loading":!!h,"data-is-error":!!S,"data-is-error-timeout":!!r,"data-table-mode":w,height:"100%",dir:k.direction,showNoDataView:C,children:jsxs(A,{"data-testid":"SheetViewVirtualTable_TableWrapper",showNoDataView:C,sx:E,children:[a&&jsx(_e,{children:jsx(se,{"data-testid":"SheetViewVirtualTable_LoadingTableHeader",columnsSorting:l,onColumnSort:s,columns:n,headerProps:i,showBackDrop:p,pinnedColumns:[],onColumnPin:d,isPinnable:false,lastColumnId:u,selectedColumn:c,onColumnClick:y})}),R||jsx(Je,{error:P||null,tableEmpty:o,isTimeoutError:r,tableError:t,tableLoading:e,orderedColumns:n,triggerDataRefetch:T||(()=>Promise.resolve()),footerProps:g})]})})}var Qo=memo(_d);function Ud({columns:e,rows:t,threshold:o=20,showHeader:r,headerProps:n,rowProps:a,footerProps:l,rowHeight:s=28,isLoading:i,error:p,columnsSorting:d,onColumnSort:u,loadMoreItems:c,isFetchingNextPage:y,triggerDataRefetch:m,scrollToIndex:b,areAllRowsLoaded:f=false,tableBodyStyles:x,tableTitle:h,onStartDrag:S,onColumnPin:w,clearBackdropVisibilityTimeout:E=100,isPinnable:P=false,tableMode:T,overscanCount:g,windowId:R,serviceCode:k,customNoDataComponent:C,defaultSkeleton:v=true}){let I=useMemo(()=>Cc(e,i??false,v),[e,i,v]),{selectedCell:V,selectedColumn:L,selectedRow:M,showBackDrop:D,setShowBackdrop:H,handleCellClick:N,handleColumnClick:G,handleChipClick:W,selectedChip:_}=Bo(),U=useRef(null),B=useRef(null),{isError:F,tableLoading:ne,tableError:Ne,tableEmpty:$t,hasTimeoutError:K,showNoDataView:ie,lastItemIndex:$e,areTotalRowsNotFillingHeight:ae,itemsCount:he,isDelayedFetchingNextPage:Ut}=zo({rows:t,isLoading:i,error:p,isFetchingNextPage:y,areAllRowsLoaded:f}),{pinnedStartColumns:X,pinnedEndColumns:z,handleColumnPin:J,pinnedStartColumnsData:ge,pinnedEndColumnsData:Xt,unpinnedColumnsData:nt,orderedColumns:it,lastColumnId:Vi}=Ho(I,P,w),{pinnedStartVirtualListRef:at,scrollableVirtualListRef:lt,pinnedEndVirtualListRef:st,handleScroll:or}=Fo();useEffect(()=>{at.current?.resetAfterIndex(0),lt.current?.resetAfterIndex(0),st.current?.resetAfterIndex(0);},[t.length,at,lt,st]);let{columnWidths:Ue,isResizing:qt,resizingColumn:Li,resizeIndicatorX:ki,cursorPosition:rr,startResize:vi,handleColumnClick:Wi}=qo({columns:I,handleColumnClick:G,windowId:R,serviceCode:k,tableContainerRef:B}),nr=Ao({tableContainerRef:U,showHeader:r??false,isResizing:qt}),{pinnedStartColumnsWidth:ir,pinnedEndColumnsWidth:ar,pinnedStartColumnsDataWithWidths:Z,pinnedEndColumnsDataWithWidths:Q}=jo({pinnedStartColumnsData:ge,pinnedEndColumnsData:Xt,columnWidths:Ue}),lr=useMemo(()=>Xo(nt,Ue),[nt,Ue]),Mi=useMemo(()=>Xo(it,Ue),[it,Ue]),{getItemSize:sr,getItemDataForContainer:dr}=_o({rowHeight:s,areAllRowsLoaded:f,rows:t,isDelayedFetchingNextPage:Ut,rowProps:a,scrollToIndex:b,footerProps:l,isError:F,selectedCell:V,selectedColumn:L,selectedRow:M,selectedChip:_,handleCellClick:N,handleChipClick:W}),Di=jt=>{S?.(jt);},Xe=useCallback((jt,dt,Hi=false,Fi)=>jsx(Yo,{columnsData:jt,itemCount:he,lastItemIndex:$e,areAllRowsLoaded:f,loadMoreItems:c,threshold:o,getItemSize:sr,getItemData:dr,isPinned:Hi,fixedWidth:Fi,scrollToIndex:b,areTotalRowsNotFillingHeight:ae,clearBackdropVisibilityTimeout:E,onScroll:Bi=>{or(Bi,dt==="pinnedStart"?"start":dt==="pinnedEnd"?"end":"scrollable");},setBackdropVisibility:H,listRef:dt==="pinnedStart"?at:dt==="pinnedEnd"?st:lt,overscanCount:g}),[he,$e,f,c,o,sr,dr,b,ae,E,or,H,at,st,lt,g]),pr={showHeader:r,columnsSorting:d,onColumnSort:u,headerProps:n,showBackDrop:D,onColumnPin:J,isPinnable:P,lastColumnId:Vi,selectedColumn:L,onColumnClick:Wi,tableTitle:h,areAllRowsLoaded:f,isFetchingNextPage:y,scrollToIndex:b,isLoading:i,isError:F,tableMode:T,showNoDataView:ie,tableBodyStyles:x,onStartResize:vi,isResizing:qt,resizingColumn:Li},Pe={...pr,hasTimeoutError:K,tableLoading:ne};return jsxs(Fragment,{children:[jsx(fn,{ref:U,children:ie?ne?jsxs(Do,{ref:B,children:[Z.length>0&&jsx(Oe,{position:"start",columnsData:Z,columnsWidth:ir,pinnedColumnsList:X,hasPinnedStart:Z.length>0,hasPinnedEnd:Q.length>0,createVirtualTableContainer:Xe,...Pe}),jsx(Zo,{hasPinnedStart:Z.length>0,hasPinnedEnd:Q.length>0,unpinnedColumnsData:lr,pinnedStartColumns:X,pinnedEndColumns:z,...Pe}),Q.length>0&&jsx(Oe,{position:"end",columnsData:Q,columnsWidth:ar,pinnedColumnsList:[...X,...z],hasPinnedStart:Z.length>0,hasPinnedEnd:Q.length>0,createVirtualTableContainer:Xe,...Pe})]}):jsx(Qo,{tableLoading:ne,tableError:Ne,tableEmpty:$t,hasTimeoutError:K,orderedColumns:Mi,error:p,triggerDataRefetch:m,footerProps:l,customNoDataComponent:C,...pr}):jsxs(Do,{ref:B,children:[Z.length>0&&jsx(Oe,{position:"start",columnsData:Z,columnsWidth:ir,pinnedColumnsList:X,hasPinnedStart:Z.length>0,hasPinnedEnd:Q.length>0,createVirtualTableContainer:Xe,...Pe}),jsx(Jo,{hasPinnedStart:Z.length>0,hasPinnedEnd:Q.length>0,unpinnedColumnsData:lr,pinnedStartColumns:X,pinnedEndColumns:z,createVirtualTableContainer:Xe,...Pe}),Q.length>0&&jsx(Oe,{position:"end",columnsData:Q,columnsWidth:ar,pinnedColumnsList:[...X,...z],hasPinnedStart:Z.length>0,hasPinnedEnd:Q.length>0,createVirtualTableContainer:Xe,...Pe})]})}),jsx(b$1,{"data-testid":"SheetViewVirtualTable_TableFooter",showSeparator:true,showBackDrop:D,onPointerDown:Di,...l}),jsx($o,{isVisible:qt,indicatorX:ki,indicatorHeight:nr.height,indicatorTop:nr.top,iconX:rr.x,iconY:rr.y})]})}var Xd=memo(Ud);export{Xd as $,Mo as A,Ls as B,Bb as C,zb as D,Gn as E,Kn as F,Yn as G,Jn as H,Do as I,Qn as J,ei as K,Ht as L,_e as M,Ho as N,Fo as O,Bo as P,zo as Q,_o as R,zs as S,Ao as T,le as U,md as V,se as W,Oe as X,Jo as Y,Zo as Z,Qo as _,Ur as a,Xr as b,gt as c,Ge as d,oo as e,no as f,io as g,Se as h,Ke as i,mo as j,co as k,bo as l,ho as m,go as n,Co as o,Je as p,yo as q,Ro as r,Ze as s,Bl as t,_l as u,Zl as v,Po as w,Vo as x,Lo as y,ko as z};
1
+ import {e as e$1,a as a$5,b as b$2,d,c as c$2}from'./chunk-COPHDTAJ.js';import {a as a$2}from'./chunk-OPT6Q26G.js';import {a as a$3,b as b$1,c as c$1}from'./chunk-YTOCVVWT.js';import {a as a$8}from'./chunk-5LSKIBCX.js';import {a as a$7}from'./chunk-CRGXVUQV.js';import {a as a$9}from'./chunk-GNY2VGGW.js';import {a as a$4}from'./chunk-4SY2RHF6.js';import {a as a$6}from'./chunk-DSFHY45V.js';import {c,s}from'./chunk-RIKXHYPW.js';import {a as a$1,i,e,$a,bc,yb,sc,tc,uc,_b,ac,$b,Cc,ab,hb,wa as wa$1,p,va as va$1}from'./chunk-25IWFELL.js';import {eh,kh,Vi,mh,Pa as Pa$1,Ba,Ca,Da,Jg,Pm,Tg,Sg,nh,A as A$1,F}from'./chunk-3JUTMTQV.js';import {a,b}from'./chunk-YRT7GXGY.js';import ze,{memo,createContext,useContext,useRef,useCallback,useEffect,useMemo,useState,createElement,Fragment as Fragment$1}from'react';import {styled,alpha,useTheme}from'@mui/material/styles';import jl from'memoize-one';import Gl from'react-virtualized-auto-sizer';import Kl from'react-window-infinite-loader';import Ce from'@mui/material/Box';import ia from'@mui/material/Popper';import Qi from'@mui/material/Collapse';import {useTranslation}from'react-i18next';import Gi from'@mui/material/Button';import {jsxs,Fragment,jsx}from'react/jsx-runtime';import {TableCell,Button,styled as styled$1,Box}from'@mui/material';import La from'@mui/material/TableRow';import {motion}from'framer-motion';import {VariableSizeList,areEqual}from'react-window';import Fa from'@mui/material/TableHead';import Ja from'@mui/material/Skeleton';import Qa from'@mui/material/TableCell';import {createPortal}from'react-dom';var Nr=a((Yd,Or)=>{var $i=a$1();function Ui(e,t){return $i(t,function(o){return e[o]})}Or.exports=Ui;});var Ur=a((Jd,$r)=>{var Xi=Nr(),qi=i();function ji(e){return e==null?[]:Xi(e,qi(e))}$r.exports=ji;});var Pt=a((fu,wn)=>{var ja=e(),Ga=0;function Ka(e){var t=++Ga;return ja(e)+t}wn.exports=Ka;});var en=b(Ur(),1);var Xr=e=>({backgroundColor:e.palette.common.white,borderRadius:"4px",filter:"drop-shadow(0px 8px 30px rgba(0, 0, 0, 0.16))",width:"188px",marginTop:"10px",boxShadow:e.shadows[3]}),qr=styled(Ce)(({theme:e})=>({color:e.palette.grey[700],fontSize:"11px",fontWeight:500,padding:"8px 16px",textAlign:"left",borderBottom:`1px solid ${e.palette.divider}`})),jr=styled(a$2)(({theme:e})=>({border:`1px solid ${e.palette.divider}`,".icon":{width:14}})),Gr=styled(Ce)(()=>({padding:"8px 16px","> div + div":{marginTop:"8px"}})),Kr=styled(Gi)(({theme:e})=>({color:e.palette.info.dark,fontSize:"11px",textTransform:"capitalize",padding:"4px 9px",minWidth:"auto","&:hover":{background:"transparent"}})),Yr=styled(Ce)(({theme:e})=>({padding:"0 16px 8px",textAlign:"left",borderBottom:`1px solid ${e.palette.divider}`}));function ta({onCloseDropdown:e,filter:{options:t=[],onConfirm:o,data:r,isOnlyOneFilter:n,onClearFilterFields:a,wrapperSx:l,sx:s$1}}){let[i,p]=useState({});useEffect(()=>{p((t||[]).reduce((T,{apiKey:g})=>({...T,[g]:r?.[g]??""}),{}));},[]);let{t:d$1}=useTranslation(),u=()=>{o?.(i);},c=s(u,e),y=T=>{u(),e(T);},m=T=>{e(T);},b=()=>{a?.(),p(t.reduce((T,{apiKey:g})=>({...T,[g]:""}),{}));},f=T=>i[T]!==void 0&&i[T].length>0,x=T=>i[T]!==void 0&&i[T].length?i[T]:"",h=T=>{f(T)&&p({...i,[T]:""});},S=useMemo(()=>(0, en.default)(i).some(T=>!!T),[i]),w=useCallback(T=>t.find(g=>g.apiKey===T),[t]),E=useCallback((T,g)=>{let R=i?.[T]!==void 0&&i?.[T]!==""&&i?.[T]!==null,k=Object.entries(i).some(([C,v])=>!!v&&(w(C)?.filterGroup!==g||!g));return n&&!R&&k},[t,i,n]);return jsxs(Ce,{component:"article","data-testid":"ColumnFilterInputs",sx:T=>({...Xr(T),...Object.assign({},...[s$1].flat().filter(g=>g&&typeof g=="object"))}),onKeyDown:c,children:[jsx(qr,{component:"header","data-testid":"ColumnFilterInputs_title",children:d$1("filterBy")}),jsx(Gr,{"data-testid":"ColumnFilterInputs_inputs",component:"main",sx:l,children:t.map(({placeholder:T,apiKey:g,isDisabled:R,filterGroup:k,render:C})=>jsx(Fragment$1,{children:C?C():jsx(jr,{className:"input","data-testid":"ColumnFilterInputs_InputStyled",name:g,placeholder:T,onChange:v=>{p({...i,[g]:v.target.value});},disabled:R||E(g,k),value:x(g),inputProps:{autoComplete:"off","data-testid":"ColumnFilterInputs_input"},endAdornment:jsx(Ce,{component:"img","data-testid":"ColumnFilterInputs_icon","data-icon":f(g)?"close":"search",src:f(g)?nh:A$1,alt:"search",className:"icon",sx:{cursor:f(g)?"pointer":"default"},onClick:()=>{h(g);}})})},g))}),jsx(Qi,{in:S,component:"section","data-testid":"ColumnFilterInputs_Collapse",sx:{borderTop:"0"},children:jsx(Yr,{"data-testid":"ColumnFilterInputs_ClearWrapper",children:jsx(Kr,{type:"button",onClick:b,"data-testid":"ColumnFilterInputs_ClearButton",children:d$1("clear")})})}),jsxs(b$2,{component:"footer","data-testid":"ColumnFilterInputs_footer",children:[jsx(d,{type:"button",onClick:m,"data-testid":"ColumnFilterInputs_CancelButton",children:d$1("cancel")}),jsx(c$2,{type:"button",onClick:y,"data-testid":"ColumnFilterInputs_OkayButton",children:d$1("okay")})]})]})}var tn=ta;var gt=tn;function aa(e){let{anchorEl:t,setAnchorEl:o,onClose:r,isFilterApplied:n,disabled:a}=e,l=u=>{u.stopPropagation(),o(null),r?.(u);},s=useRef(null),i=!!t;useEffect(()=>{i&&requestAnimationFrame(()=>s.current?.focus());},[i]);let p=useMemo(()=>e.type==="list"?[e.apiKey]:(e?.options||[])?.map(({apiKey:u})=>u),[e]),d=useMemo(()=>{if(e.type==="list")return jsx(e$1,{onCloseDropdown:l,filter:e});if(e.type==="inputs")return jsx(gt,{onCloseDropdown:l,filter:e});if(e.type==="custom"){let u={anchorEl:t,setAnchorEl:o,onCloseDropdown:l};return e.render(u)}return null},[i,e,l]);return jsxs(Fragment,{children:[n?jsxs(a$5,{children:[jsx(Ce,{component:"img","data-testid":"ColumnFilter_whiteFilterIcon",src:mh,alt:"filter-icon",sx:{marginInlineEnd:"2px",height:6}}),jsx(Ce,{component:"img","data-testid":"ColumnFilter_closeIcon",src:Pa$1,alt:"close-icon",onClick:u=>{u.stopPropagation(),o(null),e.onClear(p);}})]}):jsx(Ce,{component:"img","data-testid":"ColumnFilter_columnIcon",src:Ba,alt:"column-icon",sx:{marginTop:"2px",userSelect:"none",opacity:a?.5:1}}),i&&jsx(a$6,{onClick:l}),jsx(ia,{open:i,anchorEl:t,placement:"bottom-start",children:jsx("div",{ref:s,tabIndex:-1,style:{outline:"none"},children:d})})]})}var nn=memo(aa);var Ge=nn;var to=styled("img")(()=>({width:"13.3px",height:"13.3px"})),ln=styled("img")(()=>({width:"8px",height:"6.4px",cursor:"pointer"}));function pa({onColumnSort:e,columnsSorting:t,columnId:o,onClick:r}){let[n,a]=useState(null),l=!!n,s=d=>{d.stopPropagation(),a(d.currentTarget),r?.(d);},i=d=>{d.stopPropagation(),a(null),r?.(d);},p=(d,u,c)=>{d&&(e?.({[d]:u}),i(c));};return jsxs(Fragment,{children:[jsx(ln,{onClick:s,src:Ba,alt:"column-icon","data-id":o,sx:{userSelect:"none",marginTop:"2px"}}),l&&jsx(a$6,{onClick:i}),jsxs(a$7,{anchorEl:n,open:l,children:[jsxs(a$8,{isSelected:t?.[n?.dataset.id||""]==="asc",onClick:d=>{p(n?.dataset.id,"asc",d);},sx:d=>({...t?.[n?.dataset.id||""]==="asc"&&{boxShadow:d.shadows[10]}}),children:[jsx(to,{src:Ca,alt:"sort-icon"}),jsx(a$9,{sx:{fontSize:"0.6875rem"},children:"Sort A-Z"})]}),jsxs(a$8,{isSelected:t?.[n?.dataset.id||""]==="desc",onClick:d=>{p(n?.dataset.id,"desc",d);},sx:d=>({...t?.[n?.dataset.id||""]==="desc"&&{boxShadow:d.shadows[10]}}),children:[jsx(to,{src:Da,alt:"sort-icon"}),jsx(a$9,{sx:{fontSize:"0.6875rem"},children:"Sort Z-A"})]})]})]})}var sn=memo(pa);var Ct=sn;var pn=ze.forwardRef(({children:e,...t},o)=>jsxs(Fragment,{children:[jsx(Ce,{"data-testid":"VirtualScrollInner",className:"VirtualScrollInner",style:{position:"sticky",top:0},children:e}),jsx("div",{ref:o,...t})]}));pn.displayName="VirtualScrollInner";var oo=pn;var St=createContext(null);var ro=({children:e,value:t})=>jsx(St.Provider,{value:t,children:e});var mn=ze.forwardRef(({onScroll:e,children:t,...o},r)=>{let n=useContext(St);return jsx("div",{className:"VirtualScrollOuter",onScroll:n,ref:r,...o,children:t})});mn.displayName="VirtualScrollOuter";var no=mn;function wa({setBackdropVisibility:e,clearBackdropVisibilityTimeout:t}){let o=useRef(void 0);return useEffect(()=>()=>{clearTimeout(o.current);},[]),{handleBackDropVisibility:()=>{e(true);},clearBackdropVisibility:()=>{o.current=setTimeout(()=>{e(false);},t||2e3);},clearTimer:()=>{clearTimeout(o.current);}}}var un=wa;var Pa=ze.forwardRef(({itemData:e,children:t,setBackdropVisibility:o,scrollToIndex:r,listRef:n,onScroll:a,clearBackdropVisibilityTimeout:l,...s},i)=>{let{handleBackDropVisibility:p,clearBackdropVisibility:d,clearTimer:u}=un({setBackdropVisibility:o,clearBackdropVisibilityTimeout:l}),c=useRef(0),y=useRef(void 0),m=useRef(false),b=useRef(null),f=i||n||b,x=useCallback(()=>(u(),y.current!==void 0&&f.current?(m.current=false,c.current=y.current,y.current=void 0,p(),f.current?.scrollTo?.(c.current),true):(d(),false)),[d,u,p,f]),h=ze.useCallback(E=>{y.current=E.currentTarget.scrollTop,m.current||(m.current=true,x());},[x]);useEffect(()=>{(r||0)>=0&&!Number.isNaN(r)&&r!==void 0&&f.current?.scrollTo&&f.current?.scrollToItem(r,"center");},[r,f]);let S=ze.useMemo(()=>({...e,renderedScrollTopRef:c}),[e]),w=ze.useCallback(E=>{a?.(E),m.current=x();},[x,a]);return jsx(ro,{value:h,children:jsx(VariableSizeList,{ref:f,"data-testid":"VirtualScrollList",itemData:S,outerElementType:no,innerElementType:oo,...s,onScroll:w,children:t})})}),io=Pa;var A=styled(Ce,{shouldForwardProp:e=>!["showNoDataView","compact","fixedHeight"].includes(e)})(({showNoDataView:e,compact:t,fixedHeight:o})=>({display:"flex",flexDirection:"column",height:o?`${o}px`:t?"auto":"100%",width:"100%",minWidth:e?"unset":"fit-content",overflow:"hidden",overflowX:e?"hidden":"auto",margin:"0px",...t&&{flex:"0 0 auto"}})),ce=styled(Ce,{shouldForwardProp:e=>e!=="hidePadding"})(({theme:e,hidePadding:t})=>({flex:"1 1 auto",backgroundColor:e.palette.grey[300],paddingBottom:t?0:a$3})),De=styled(Ce)(({theme:e})=>({backgroundColor:e.palette.background.default})),Se=styled(TableCell,{shouldForwardProp:e=>!["isLast","isFirst","isSheetView","isSelected"].includes(e)})(({theme:e,isLast:t,isFirst:o,isSheetView:r})=>({paddingBlock:"0",paddingInline:"0.3875rem !important",paddingLeft:o?"0 !important":"0.3875rem !important",paddingRight:t?"0 !important":"0.3875rem !important",color:r?e.palette.text.primary:e.palette.grey[700],fontSize:r?e.typography.subtitle1.fontSize:e.typography.caption.fontSize,height:"100%",fontWeight:r?400:e.typography.fontWeightRegular,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",display:"flex",alignItems:"center",cursor:"pointer",...r&&{borderRight:t?"1px solid transparent":`1px solid ${e.palette.divider}`,paddingInline:"8px !important",paddingLeft:"8px !important",paddingRight:"8px !important",position:"relative",borderTop:"1px solid transparent",borderLeft:"1px solid transparent",overflow:"hidden !important","&:before":{content:'""',borderRight:t?"none":"1px solid transparent",position:"absolute",top:0,right:0,left:0,bottom:0,pointerEvents:"none"}}})),wt=styled("button")(({theme:e})=>({zIndex:1,display:"flex",gap:e.spacing(.5),alignItems:"center",overflow:"hidden",maxWidth:"100%",textOverflow:"ellipsis",whiteSpace:"nowrap",backgroundColor:"transparent",border:"none",cursor:"pointer",padding:0,margin:0,color:"inherit",fontSize:"inherit",fontWeight:"inherit",boxSizing:"border-box",":disabled":{cursor:"not-allowed"}})),He=styled(io,{shouldForwardProp:e=>!["areTotalRowsNotFillingHeight","isSheetView"].includes(e)})(({theme:e,areTotalRowsNotFillingHeight:t,isSheetView:o})=>({backgroundColor:t?"transparent":"#F6F8FACC",...o&&{backgroundColor:e.palette.common.white}})),Rt=styled(La,{shouldForwardProp:e=>!["showShadowHighlight","showLoadedStyle","isSheetView","isSelected","isChecked","adjacentBelow","adjacentAbove"].includes(e)})(({theme:e,showShadowHighlight:t,showLoadedStyle:o,isSheetView:r,isChecked:n,adjacentBelow:a,adjacentAbove:l})=>({display:"flex",borderBottom:`1px solid ${e?.palette.divider}`,position:"relative",height:"100%",width:"100%",...!r&&{paddingInline:"32px",...a&&{borderBottom:"none",clipPath:"inset(-20px -20px 0px -20px)","&::before":{content:'""',position:"absolute",bottom:0,left:"32px",right:"32px",height:"1px",backgroundColor:e.palette.divider,zIndex:1}},...l&&{clipPath:"inset(0px -20px -20px -20px)"},...a&&l&&{clipPath:"inset(0px -20px 0px -20px)"},"&:hover":{boxShadow:e.shadows[12],zIndex:1,".MuiCheckbox-root":{visibility:"visible"},".payment-sources-container":{backgroundColor:e?.palette.common.white},".geography-box":{visibility:"visible"},".payout-status":{visibility:"visible !important"},"&:hover:after":{opacity:1}},"&::after":{content:"''",opacity:0,minHeight:"100%",background:e.palette.info.dark,width:"3px",position:"absolute",left:0},...n&&{boxShadow:e.shadows[12],zIndex:1,"&:after":{opacity:1},".MuiCheckbox-root":{visibility:"visible"}},...o&&{backgroundColor:`${e.palette.info.dark}08 !important`},...t&&{boxShadow:e.shadows[12],zIndex:1,"&::after":{content:"''",opacity:1,minHeight:"100%",background:e.palette.info.dark,width:"3px",position:"absolute",left:0}}}})),te=styled(Ce,{shouldForwardProp:e=>e!=="showNoDataView"&&e!=="scrollable"})(({theme:e,showNoDataView:t,scrollable:o})=>({position:"relative",backgroundColor:e.palette.background.default,height:"100%",overflowX:t?"hidden":"auto",display:"flex",flexDirection:"column","&:hover":{scrollbarWidth:o?"auto":"none"},"&::-webkit-scrollbar":{display:"block",height:"13px"},"&::-webkit-scrollbar-track":{background:"white",border:"1px solid #F2F2F2"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#DADCDF",borderRadius:"32px",border:"3px solid transparent",backgroundClip:"content-box",minHeight:"20px"}})),ao=styled(motion.img)(()=>({width:"24px",height:"24px",position:"relative",zIndex:2})),It=styled(Ce)(()=>({position:"relative",display:"flex",flexDirection:"column",height:"100%"})),fn=styled(Ce)(()=>({position:"relative",display:"flex",flexDirection:"column",height:"100%",paddingInline:"28px",borderRadius:"8px",marginBottom:"16px !important",overflowY:"hidden"})),bn=styled(Ce,{shouldForwardProp:e=>e!=="showNoDataView"})(({showNoDataView:e})=>({position:"relative",height:"100%",overflowX:e?"hidden":"auto",paddingBottom:0,display:"flex",flexDirection:"column"})),Et=styled(a$4,{shouldForwardProp:e=>!["isRow"].includes(e)})(({isRow:e})=>({position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",padding:0,...e&&{visibility:"hidden"}}));var va=e=>{let{filter:t,totalCount:o,isFilterEnabled:r}=e,n=useMemo(()=>t?.options?.reduce((i,{apiKey:p})=>({...i,[p]:t?.data?.[p]}),{})||{},[t]),a=useMemo(()=>{let i=t,p=i?.data?.[i.apiKey];return Array.isArray(p)?p:[]},[t]),l=useMemo(()=>Object.values(n||{}).some(i=>typeof i=="string"||Array.isArray(i)?i.length>0:i!=null)||a.length>0,[n,a]);return {isFilterApplied:l,filterDisabled:!l&&o===0&&!r}},Ke=va;function hn({column:{header:e,id:t,align:o,headerStyle:r,sortable:n,filter:a,width:l,order:s},isFirst:i,isLast:p,isSheetView:d,onColumnSort:u,columnsSorting:c,totalCount:y,isFilterEnabled:m}){let[b,f]=useState(null),x=useRef(null),{isFilterApplied:h,filterDisabled:S}=Ke({filter:a,totalCount:y,isFilterEnabled:m});return jsx(Se,{"data-id":t,component:"div","data-testid":"VirtualTable_TableHeader_StyledCell","data-column-id":t,"data-column-width":l,"data-column-width-used":l,"data-column-align":o,"data-column-order":s,"data-column-header":typeof e=="string"?e:"component","data-column-sortable":!!n,"data-column-filterable":!!a,isFirst:i,isLast:p,ref:x,sx:E=>({paddingInline:"0.6875rem",paddingLeft:i?"0":"0.6875rem",paddingRight:p?"0":"0.6875rem",display:"flex",gap:E.spacing(.5),alignItems:"center",justifyContent:uc[o??"left"],width:l,textAlign:o,overflow:"unset",fontWeight:600,...S&&{cursor:"not-allowed"},...r}),isSheetView:d,children:jsxs(wt,{disabled:S,onClick:()=>{f(x.current);},children:[typeof e=="function"?e():jsx(Ce,{"data-testid":"TableHeader_columns_header",sx:{maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e&&jsx("span",{style:{textOverflow:"ellipsis",width:"80%",overflow:"hidden"},"data-testid":"VirtualTable_TableHeader_StyledCell_header_text",children:e})}),a&&jsx(Ge,{...a,anchorEl:b,setAnchorEl:f,isFilterApplied:h,disabled:S}),n&&jsx(Ct,{onColumnSort:u,columnsSorting:c,columnId:t})]})})}var so=hn;var xn=styled(Fa,{shouldForwardProp:e=>e!=="showBackDrop"})(({showBackDrop:e,theme:t})=>({flex:"0 0 auto",boxShadow:e?t.shadows[23]:"none",backgroundColor:t.palette.background.default,zIndex:1,width:"100%",minWidth:"auto",overflowX:"auto"})),Cn=styled(La,{shouldForwardProp:e=>e!=="isSheetView"})(({theme:e,isSheetView:t})=>({display:"flex",justifyContent:"flex-start",width:"100%",minWidth:"fit-content",position:"relative",paddingInline:"32px",paddingBlock:"16px",...t&&{height:"28px",borderBottom:`1px solid ${e.palette.divider}`,backgroundColor:e.palette.primary.light,paddingInline:0,paddingBlock:0}}));function Aa({columns:e,headerProps:t,showBackDrop:o,onColumnSort:r,columnsSorting:n,isSheetView:a,totalCount:l,isFilterEnabled:s,selection:i,selectableCount:p=0,getSelectableKeys:d}){let u=i&&i.ids.length>0,c=i&&p>0&&i.ids.length===p,y=useCallback(()=>{i&&i.setIds(c?[]:d?.()??[]);},[i,c,d]);return jsx(xn,{component:"nav","data-testid":"VirtualTable_TableHeader_StyledHeader",showBackDrop:o,...t,children:jsxs(Cn,{component:"section","data-testid":"VirtualTable_TableHeader_StyledMUITableRow",isSheetView:a,children:[u&&jsx(Et,{size:"small",checked:c,indeterminate:u&&!c,onChange:y,onClick:m=>m.stopPropagation()}),e.map((m,b)=>jsx(so,{column:m,isFirst:m.id===e[0].id,isLast:m.id===e[e.length-1].id,onColumnSort:r,columnsSorting:n,isSheetView:a,totalCount:l,isFilterEnabled:s},`${m.id}-${b}`))]})})}var Sn=memo(Aa);var mo=Sn;var Xa=styled(Ce,{shouldForwardProp:e=>e!=="sandboxMode"&&e!=="height"})(({theme:e,sandboxMode:t})=>({display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flex:1,position:"sticky",left:0,background:t?e.palette.common.lightOrange:e.palette.grey[300],backdropFilter:"blur(32px)",margin:0,minHeight:"55px"})),uo=styled("p")(({theme:e})=>({fontSize:"0.75rem",fontWeight:600,color:alpha(e.palette.common.black,.2)}));function qa({height:e,sandboxMode:t,...o}){let{t:r}=useTranslation();return jsx(Xa,{component:"section","data-testid":"TableLastItem",...o,height:e,sandboxMode:t,children:jsx(uo,{children:r("allRecordsHaveBeenSuccessfullyLoaded")})})}var co=qa;var In=b(Pt(),1);var ol=styled(Ja)(({theme:e})=>({backgroundColor:e.palette.grey[100],borderRadius:"64px",minWidth:"20px"}));function rl({columns:e,style:t,index:o,animationType:r}){return jsx(La,{sx:{...t,display:"flex",borderBottom:"1px solid #e3e8ee","&:hover":{backgroundColor:"transparent !important"}},component:"div",hover:true,children:e.map((n,a)=>jsx(Qa,{sx:{width:n.width||`${100/e.length}%`||"20%",paddingInline:"0.6875rem"},component:"div",children:jsx(ol,{variant:"rectangular",animation:r})},`${n.id}-${a}`))},o)}var bo=memo(rl,areEqual);var al=styled("section")(({isLoaded:e=false})=>({overflow:"hidden",paddingInline:"32px",backgroundColor:e?"rgba(255, 255, 255, 0.60)":"none",filter:e?"blur(8px)":"none",marginTop:e?"1rem":"0.2rem"}));function ll({columns:e,isLoaded:t=false,animationType:o,isLoading:r=false,rowsCount:n}){let a=n||$a(t,r);return a=a>0?a:5,jsx(al,{isLoaded:t,"data-testid":"TableLoading",children:[...Array(a)].map(()=>jsx(bo,{columns:e,animationType:o},`i-${(0, In.default)("TableLoadingRow_")}`))})}var ho=memo(ll);var Vn=styled(Ce,{shouldForwardProp:e=>e!=="sandboxMode"})(({theme:e,sandboxMode:t})=>({display:"flex",flexDirection:"column",height:"100%",width:"100%",justifyContent:"center",alignItems:"center",textAlign:"center",background:t?e.palette.common.lightOrange:e.palette.grey[300],backdropFilter:"blur(32px)",gap:"0.5rem"})),Ln=styled(Ce,{shouldForwardProp:e=>e!=="shouldMinimizeWidth"})(({shouldMinimizeWidth:e})=>({width:e?"9rem":"15rem",display:"flex",flexDirection:"column",alignItems:"center"})),kn=styled("h1")(({theme:e})=>({fontWeight:600,fontSize:"1.125rem",color:e.palette.text?.primary,padding:0,margin:0})),vn=styled("p")(({theme:e})=>({fontWeight:400,fontSize:"0.75rem",color:e.palette.text?.primary,opacity:.5,padding:0,marginTop:3,textAlign:"center"})),Wn=styled("img")(()=>({width:"2rem",height:"2rem"})),Mn=styled(Button)(({theme:e})=>({padding:" 0.625rem 1rem",display:"flex",justifyContent:"center",alignItems:"center",gap:"0.5rem",backgroundColor:alpha(e.palette.info.dark,.1),borderRadius:"0.25rem",color:e.palette.info.dark,"&:hover":{backgroundColor:alpha(e.palette.info.dark,.1),color:e.palette.info.dark},width:"6rem",height:"1.8rem",marginTop:"1.5rem"})),Dn=styled("p")(({theme:e})=>({color:e.palette.info.dark,fontSize:"0.8rem",fontWeight:600,textTransform:"none"}));function pl({triggerDataRefetch:e,heading:t,message:o,shouldMinimizeWidth:r,sandboxMode:n,hideIcon:a,hideTryAgain:l,...s}){let{t:i}=useTranslation();return jsx(Vn,{sandboxMode:n,...s,children:jsxs(Ln,{shouldMinimizeWidth:r,children:[!a&&jsx(Wn,{src:F,alt:"info icon"}),jsx(kn,{children:i(t)}),jsx(vn,{children:i(o)}),!l&&jsx(Mn,{variant:"contained",onClick:()=>{e();},children:jsx(Dn,{children:i("tryAgain")})})]})})}var oe=pl;var Vt=oe;var Hn=styled$1("h1")(({theme:e})=>({fontWeight:600,fontSize:"1rem",color:e.palette.text?.primary,padding:0,margin:0})),Fn=styled$1("p")(({theme:e})=>({fontWeight:400,fontSize:"0.75rem",color:e.palette.text?.primary,padding:0,marginTop:3,opacity:.5})),Bn=styled$1(Ce,{shouldForwardProp:e=>e!=="sandboxMode"})(({theme:e,sandboxMode:t})=>({display:"flex",flexDirection:"column",height:"100%",width:"100%",justifyContent:"center",alignItems:"center",textAlign:"center",background:t?e.palette.common.lightOrange:e.palette.grey[300],backdropFilter:"blur(32px)",gap:"0.5rem"})),go=styled$1("img")(()=>({width:"2rem",height:"2rem"}));function zn({sandboxMode:e,heading:t,message:o,...r}){let{t:n}=useTranslation();return jsxs(Bn,{component:"section","data-testid":"EmptyList",sandboxMode:e,...r,children:[jsx(go,{src:Jg,alt:"empty container"}),jsx(Hn,{children:n(t)}),jsx(Fn,{children:n(o)})]})}zn.displayName="EmptyList";var kt=memo(zn);var _n=kt;var gl=e=>{let{isTimeoutError:t,tableError:o,triggerDataRefetch:r,sandboxMode:n,tableEmpty:a,error:l}=e;if(t)return jsx(Vt,{"data-testid":"VirtualTable_ErrorList_timeoutError",shouldMinimizeWidth:true,heading:"timeOut",message:"yourRequestOutPleaseTryAgain",triggerDataRefetch:r,sandboxMode:n});let s=l;if(o){let{formatted:i,message:p,code:d}=bc({error:s,fallbackMessage:"connectionErrorMsg"}),u=yb()&&d===Pm;return jsx(Vt,{"data-testid":"VirtualTable_ErrorList_tableError",heading:"somethingWentWrong",message:u?p:i,triggerDataRefetch:r,sandboxMode:n,hideIcon:u,hideTryAgain:u})}if(a){let{formatted:i}=bc({error:s,fallbackMessage:"tryAdjustingTheDateOrFilters"});return jsx(_n,{sandboxMode:n,heading:"nothingFound",message:i})}return jsx(Vt,{"data-testid":"VirtualTable_ErrorList_tableError",heading:"somethingWentWrong",message:"connectionErrorMsg",triggerDataRefetch:r,sandboxMode:n})},Co=memo(gl);function An({error:e,tableEmpty:t,isTimeoutError:o,tableError:r,tableLoading:n,orderedColumns:a,triggerDataRefetch:l,footerProps:s}){return n?jsx(De,{"data-testid":"VirtualTable_SolidBackground",children:jsx(ho,{"data-testid":"VirtualTable_TableLoading",columns:a,isLoading:true})}):jsx(Co,{isTimeoutError:o,tableEmpty:t,tableError:r,sandboxMode:s?.sandboxMode,error:e,triggerDataRefetch:l})}An.displayName="TableNoData";var Je=memo(An);function yo(){return jsx(motion.div,{initial:{width:0},animate:{width:"fit-content",transition:{duration:.5}},exit:{width:0},style:{paddingInline:"11px",paddingBlock:"5px",boxShadow:"0px 0px 1px 0px rgba(0, 0, 0, 0.10), 0px 1px 1px 0px rgba(0, 0, 0, 0.09), 0px 2px 1px 0px rgba(0, 0, 0, 0.05), 0px 4px 2px 0px rgba(0, 0, 0, 0.01), 0px 7px 2px 0px rgba(0, 0, 0, 0.00)",borderRadius:"24px",overflow:"hidden",display:"inline-block",whiteSpace:"nowrap"},children:jsxs(motion.span,{style:{color:"#8F9195",fontSize:"12px",fontWeight:600,display:"flex",alignItems:"center",justifyContent:"center",gap:"10px"},children:[jsx(motion.span,{children:"!"}),jsx(motion.span,{children:"Error while loading"})]})})}function Rl({row:e,columns:t,index:o,rowProps:r,isSheetView:n,selectedCell:a=null,selectedColumn:l=null,selectedRow:s=null,selectedChip:i=null,onCellClick:p,isLastRow:d=false,onChipClick:u,selection:c,hasAdjacentCheckedAbove:y,hasAdjacentCheckedBelow:m}){let b=c?e[c.selector]:void 0,f=c&&c.ids.includes(b),x=c?.isDisabled?.(e),h=ze.useCallback(()=>{!c||x||c.setIds(f?c.ids.filter(g=>g!==b):[...c.ids,b]);},[c?.setIds,c?.ids,f,x,b]),S=ze.useCallback((g,R)=>(k,C)=>{u?.(o,g,k,C,R);},[u,o]),w=ze.useCallback((g,R,k)=>{let{render:C,format:v,selector:I}=g;if(!g?.id||!e)return null;let V=I?I({row:e,index:o,value:e[g?.id]}):e[g?.id],L=v?v({value:V,row:e,index:o}):V;return C?C({row:e,column:g,index:o,value:e[g?.id],selectionProps:{onClick:S(k,g.pinned),rowIndex:R,colIndex:k,selectedId:i}}):jsx(Fragment,{children:L})},[e,o,i,S]),E=a!==null||l!==null||s!==null,P=ze.useCallback((g,R)=>k=>{p?.(o,g,k,R);},[p,o]),T=useMemo(()=>{let g=t[0]?.id,R=t[t.length-1]?.id,k=s===o;return jsx(Fragment,{children:t.map((C,v)=>{if(!C?.id)return null;let I=`${C.pinned??"default"}-${o}-${v}`,V=`${C.pinned??"default"}-${v}`,L=E&&a===I,M=E&&l===V,H=sc({isSelected:E&&(L||M||k),isCellSelected:L,isColumnSelected:M,isRowSelected:k,isLastRow:d}),N=C.id===g,G=C.id===R,W=C.pinned?N:N&&C.pinned!=="start",_=C.pinned?G:G&&C.pinned!=="end",U=k&&E?tc({effectiveFirst:W,isPinnedStart:C.pinned==="start",isPinnedEnd:C.pinned==="end"}):{},B=C.pinned==="start"&&W;return jsx(Se,{component:"div","data-testid":"TableRow_TableCell","data-column-id":C.id,"data-column-width":C.width,"data-column-width-used":C.width,"data-column-align":C.align,"data-column-order":C.order,"data-column-header":typeof C.header=="string"?C.header:"component","data-column-sortable":!!C.sortable,"data-column-filterable":!!C.filter,isFirst:W,isLast:_,onClick:P(v,C.pinned),sx:{width:C.width,minWidth:C.width,textAlign:C.align,justifyContent:uc[B?"center":C.align??"left"],cursor:p?"pointer":"default",...H,...U,...C.cellStyle},isSheetView:n,isSelected:L,children:n?jsx(Box,{sx:{position:"relative",zIndex:1,width:"100%"},children:w(C,o,v)}):jsx(Fragment,{children:w(C,o,v)})},`${C.id}-${v}`)})})},[t,e,o,a,l,s,E,p,d,i,n,w,P]);return createElement(Rt,{"data-testid":"TableRow",onClick:r?.onRowClick,showShadowHighlight:r?.showShadowHighlight,showLoadedStyle:r?.showLoadedStyle,component:"article",...r,key:o,isSheetView:n,isChecked:f,adjacentAbove:y,adjacentBelow:m},c&&jsx(Et,{isRow:true,size:"small",checked:f,onChange:h,disabled:x}),T)}var Ro=memo(Rl,areEqual);var Ml=styled(Ja)(()=>({backgroundColor:"#F4F4F4",borderRadius:"64px",width:"100%",minWidth:"20px"}));function Dl({columns:e,style:t,index:o,animationType:r,rowIndex:n=0,useTableBackground:a=false}){let l=useTheme();return jsx(La,{sx:{...t,display:"flex",borderBottom:"1px solid #F2F2F2",minHeight:"28px",height:"28px",alignItems:"center",backgroundColor:a?l.palette.background.default:"transparent","&:hover":{backgroundColor:"transparent !important"}},component:"div",hover:true,children:e.map((s,i)=>{let p=i===e.length-1,d=i===0,u=s.pinned==="start",c=d&&u;return jsx(Qa,{sx:{width:s.width||`${100/e.length}%`||"20%",paddingBlock:"0",paddingInline:"8px !important",paddingLeft:"8px !important",paddingRight:"8px !important",borderRight:p?"none":"1px solid #F2F2F2",borderLeft:d?"1px solid #F2F2F2":"none",height:"100%",display:"flex",alignItems:"center",boxSizing:"border-box",whiteSpace:"nowrap",overflow:"hidden"},component:"div",children:c&&s.render?s.render({index:n,row:{},column:s,value:n+1}):jsx(Ml,{variant:"rectangular",animation:r,height:16})},`${s.id}-${i}`)})},o)}var Ze=memo(Dl,areEqual);var Bl=ze.memo(({isLoadingRow:e,isSheetView:t,columns:o,currentRowCount:r})=>{let{t:n}=useTranslation();return e?t&&o?.length?jsx(Fragment,{children:Array.from({length:3},(a,l)=>jsx(Ze,{columns:o,animationType:"wave",rowIndex:(r||0)+l,useTableBackground:true},`loading-row-${l}`))}):jsxs(Box,{"data-testid":"ListItemWrapper_lastRowContent_isLoadingRow",sx:{height:t?"100%":"24px",width:"24px",borderRadius:"50%",background:"transparent",position:"relative",display:"flex",justifyContent:"center",alignItems:"center"},children:[jsx(ao,{sx:{position:"absolute"},src:eh}),jsx(ao,{sx:{position:"absolute",padding:"3px"},src:kh,alt:"tableLoadingSpinnerIcon",className:"spinner-loader",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}})]}):jsx(uo,{"data-testid":"ListItemWrapper_lastRowContent",children:n("allRecordsHaveBeenSuccessfullyLoaded")})}),zl=(e,t)=>o=>{o?.stopPropagation?.(),t?.(e);},_l=styled("div",{shouldForwardProp:e=>e!=="showShadowHighlight"&&e!=="isSheetView"})(({theme:e,isSheetView:t})=>({height:t?28:"100%",backgroundColor:e.palette.background.default}));function Al({index:e,style:t,data:{renderedScrollTopRef:o,rows:r,rowProps:n,columns:a,isLoading:l,scrollToIndex:s,newLoadedRowsEndIndex:i,isError:p,areAllRowsLoaded:d,isSheetView:u,isPinned:c=false,isLoadMoreLoading:y=false,...m}}){let b=r.length-1,{hasAdjacentCheckedAbove:f,hasAdjacentCheckedBelow:x}=ze.useMemo(()=>{let R=m.selection;if(!R)return {hasAdjacentCheckedAbove:false,hasAdjacentCheckedBelow:false};let k=r[e]?.[R.selector];if(!R.ids.includes(k))return {hasAdjacentCheckedAbove:false,hasAdjacentCheckedBelow:false};let v=e>0?r[e-1]?.[R.selector]:void 0,I=e<b?r[e+1]?.[R.selector]:void 0;return {hasAdjacentCheckedAbove:v!==void 0&&R.ids.includes(v),hasAdjacentCheckedBelow:I!==void 0&&R.ids.includes(I)}},[m.selection?.ids,m.selection?.selector,r,e,b]),h=r[e],S=l&&e===b+1,w=e<=i,E=ze.useCallback(()=>zl(h,n?.onRowClick),[h,n?.onRowClick]),P=ze.useMemo(()=>({showShadowHighlight:s===e,showLoadedStyle:w,...n,onClick:E}),[s,e,w,n,E]),T=ze.useCallback(R=>jsx(Box,{sx:{minHeight:28,height:"100%",width:"100%"},children:p?jsx(yo,{}):R}),[p]),g=ze.useMemo(()=>{let R=jsx(Bl,{isSheetView:u,isLoadingRow:S,columns:a,currentRowCount:r.length}),k=S||d&&e===b+1;return c&&k?u&&S&&a&&a.length>0?T(R):jsx(Box,{sx:{...u?{minHeight:28,height:"100%"}:{height:57},backgroundColor:"#F6F8FACC"}}):k?u&&S&&a&&a.length>0?T(R):jsx(Box,{sx:{...u?{minHeight:28,height:"100%"}:{height:57},display:"flex",justifyContent:"center",alignItems:"center"},children:jsx(Box,{sx:{backgroundColor:"#F6F8FACC",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},children:p?jsx(yo,{}):R})}):jsx(Ro,{index:e,row:h,columns:a,rowProps:P,isSheetView:u,isLastRow:e===r.length-1,isFirstRow:e===0,isLoading:l,isLoadMoreLoading:y,hasAdjacentCheckedAbove:f,hasAdjacentCheckedBelow:x,...m},`row-${e}`)},[m,e,h,a,P,u,S,p,d,b,c,r.length,T,y]);return jsx("div",{"data-testid":"ListItemWrapper",style:{...t,top:Number(t.top)-(o?.current??0),willChange:"top"},children:jsx(_l,{"data-testid":"ListItemWrapper_StyledItemWrapper",isSheetView:u,children:g})})}var Dt=Al;var Yl=jl((e,t,o,r,n,a,l,s,i,p,d)=>({columns:e,isLoading:t,rows:o,rowProps:r,scrollToIndex:n,totalCount:l,lastItemIndex:a,isError:s,areAllRowsLoaded:i,isSheetView:p,selection:d}));function Jl({columns:e,rows:t,threshold:o=200,showHeader:r,headerProps:n,rowProps:a,footerProps:l,isLoading:s,error:i,columnsSorting:p,onColumnSort:d,loadMoreItems:u,isFetchingNextPage:c$1,triggerDataRefetch:y,scrollToIndex:m,areAllRowsLoaded:b=false,tableBodyStyles:f,tableMode:x,tableTitle:h,onStartDrag:S,isSheetView:w=false,isMinimized:E,footerComponent:P,customNoDataComponent:T,defaultSkeleton:g=false,selection:R,isFilterEnabled:k}){let C=useTheme(),v=z=>{S?.(z);},I=c({value:c$1,delay:1e3}),[V,L]=useState(false),[M,D]=useState("INITIAL_KEY");useEffect(()=>{let z=`${l?.maximized}-${E}`,J=requestAnimationFrame(()=>D(z));return ()=>cancelAnimationFrame(J)},[l?.maximized,E]);let H=_b(i),N=s??true,G=!s&&t.length===0&&H&&!ac(i),W=!s&&t.length===0,_=$b(i),U=t.length-1,B=useMemo(()=>Cc(e,s??false,g),[e,s,g]),F=useMemo(()=>B.filter(z=>!z.hidden),[B]),ne=useMemo(()=>F.sort((z,J)=>(z?.order??1e6)-(J?.order??1e6)),[F]),Ne=useMemo(()=>R?R.isDisabled?t.filter(z=>!R.isDisabled(z)).length:t.length:0,[t,R?.isDisabled]),$t=useCallback(()=>R?(R.isDisabled?t.filter(J=>!R.isDisabled(J)):t).map(J=>J[R.selector]):[],[t,R?.isDisabled,R?.selector]),K=ab(t.length)&&!N,ie=I||b&&!K?t.length+1:t.length,$e=Yl(ne,I,t,a,m,U,l?.totalCount??0,H,b&&!K,w,R),ae=w?28:57,he=useRef(null);useEffect(()=>{he.current&&typeof he.current.resetAfterIndex=="function"&&he.current.resetAfterIndex(0,true);},[w,ae]);let Ut=useMemo(()=>{let z=ge=>{L(ge);};return jsx(Kl,{"data-testid":"VirtualTable_InfiniteLoader",isItemLoaded:ge=>ge!==U,itemCount:ie,loadMoreItems:async()=>{b||await u?.();},threshold:o,children:({onItemsRendered:ge,ref:Xt})=>jsx(Gl,{ref:Xt,"data-testid":"VirtualTable_AutoSizer",children:({height:nt,width:it})=>jsx(He,{"data-testid":"VirtualTable_VirtualList",useIsScrolling:true,className:"list",itemData:$e,height:K?ie*ae:nt||0,width:it||0,itemCount:ie,itemSize:()=>ae,onItemsRendered:ge,setBackdropVisibility:z,areTotalRowsNotFillingHeight:K,scrollToIndex:m,overscanCount:5,isSheetView:w,listRef:he,style:{paddingBottom:"13px"},children:Dt})},M)})},[U,u,o,b,K,ie,ae,w,$e,m,M]),X=N||G||W||_;return jsxs(Fragment,{children:[jsx(It,{children:jsxs(te,{as:"main",id:"table-box-container","aria-labelledby":"table-box-container","data-testid":"VirtualTable_StyledTableBox","data-title":h,"data-direction":C.direction,"data-are-all-rows-loaded":!!b,"data-is-fetching-next-page":!!c$1,"data-scroll-to-index":m,"data-is-loading":!!s,"data-is-error":!!H,"data-is-error-timeout":!!_,"data-table-mode":x,height:"100%",dir:C.direction,showNoDataView:X,scrollable:true,children:[jsxs(A,{"data-testid":"VirtualTable_TableWrapper",showNoDataView:X,compact:!X&&K,sx:{...f},children:[r&&jsx(mo,{"data-testid":"VirtualTable_TableHeader",columnsSorting:p,onColumnSort:d,columns:ne,headerProps:n,showBackDrop:V,isSheetView:w,totalCount:l?.totalCount??0,selection:R,selectableCount:Ne,getSelectableKeys:$t,isFilterEnabled:k}),X?T||jsx(Je,{error:i,tableEmpty:W,isTimeoutError:_,tableError:G,tableLoading:N,orderedColumns:ne,triggerDataRefetch:y,footerProps:l}):jsx(A,{"data-testid":"VirtualTable_TableWrapper",fixedHeight:K?ie*ae:void 0,sx:{width:"100%",minWidth:"fit-content"},children:jsx(ce,{"data-testid":"VirtualTable_StyledBox",hidePadding:true,className:"list-wrapper",children:Ut})})]}),!X&&K&&!c$1&&jsx(co,{height:(ie+1)*ae,sandboxMode:l?.sandboxMode,"data-testid":"VirtualTable_TableLastItem"})]})}),l&&jsx(b$1,{"data-testid":"VirtualTable_TableFooter",showSeparator:true,showBackDrop:V,onPointerDown:v,selectedCount:R?.ids.length,...l}),P]})}var Zl=memo(Jl);var Xn=b(Pt(),1);function ns({style:e,index:t,cardLoadingComponent:o}){return jsx(La,{sx:{...e,display:"flex",padding:0,"&:hover":{backgroundColor:"transparent !important"}},component:"div",children:jsx(Qa,{sx:{padding:0,flex:1},component:"div",children:o})},t)}var Po=memo(ns,areEqual);var ls=styled("section")(({isLoaded:e=false})=>({overflow:"hidden",paddingInline:"32px",backgroundColor:e?"rgba(255, 255, 255, 0.60)":"none",filter:e?"blur(8px)":"none",marginTop:e?"1rem":"0.2rem"}));function ss({isLoaded:e=false,isLoading:t=false,rowsCount:o,cardLoadingComponent:r}){let n=o||$a(e,t);return n=n>0?n:5,jsx(ls,{isLoaded:e,"data-testid":"TableLoadingWithCard",children:[...Array(n)].map(()=>jsx(Po,{cardLoadingComponent:r},`i-${(0, Xn.default)("TableLoadingRow_")}`))})}var Vo=memo(ss);function qn({error:e,tableEmpty:t,isTimeoutError:o,tableError:r,tableLoading:n,triggerDataRefetch:a,footerProps:l,cardLoadingComponent:s,noDataComponent:i}){let p;if(n)p=jsx(De,{"data-testid":"VirtualTable_SolidBackground",children:jsx(Vo,{"data-testid":"VirtualTable_TableLoading",isLoading:true,cardLoadingComponent:s})});else if(o)p=jsx(oe,{"data-testid":"VirtualTable_ErrorList_timeoutError",shouldMinimizeWidth:true,heading:"timeOut",message:"yourRequestOutPleaseTryAgain",triggerDataRefetch:a,sandboxMode:l?.sandboxMode});else if(r){let d=e,{formatted:u}=bc({error:d,fallbackMessage:"connectionErrorMsg"});p=jsx(oe,{"data-testid":"VirtualTable_ErrorList_tableError",heading:"somethingWentWrong",message:u,triggerDataRefetch:a,sandboxMode:l?.sandboxMode});}else t?p=i:p=jsx(oe,{"data-testid":"VirtualTable_ErrorList_tableError",heading:"somethingWentWrong",message:"connectionErrorMsg",triggerDataRefetch:a,sandboxMode:l?.sandboxMode});return p}qn.displayName="TableNoDataWithCard";var Lo=memo(qn);function us({row:e,index:t,rowProps:o,renderCardComponent:r}){return createElement(Rt,{"data-testid":"TableRow",onClick:o?.onRowClick,showShadowHighlight:o?.showShadowHighlight,showLoadedStyle:o?.showLoadedStyle,component:"article",...o,key:t},r&&jsx(r,{...e}))}var ko=memo(us,areEqual);var hs=(e,t)=>o=>{o?.stopPropagation?.(),t?.(e);},gs=styled("div",{shouldForwardProp:e=>e!=="showShadowHighlight"})(({theme:e})=>({backgroundColor:e.palette.background.default,height:"100%"}));function xs({index:e,style:t,data:{renderedScrollTopRef:o,rows:r,rowProps:n,isLoading:a,scrollToIndex:l,newLoadedRowsEndIndex:s,areAllRowsLoaded:i,renderCardComponent:p}}){let d=r.length-1,u=r[e],c=a&&e===d+1,y=e<=s,m=ze.useCallback(hs(u,n?.onRowClick),[u,n?.onRowClick]),b=ze.useMemo(()=>({showShadowHighlight:l===e,showLoadedStyle:y,...n,onClick:m}),[l,e,y,n,m,c,i,d]),f=ze.useMemo(()=>jsx(ko,{index:e,row:u,renderCardComponent:p,rowProps:b},`row-${e}`),[e,u,b]);return jsx("div",{"data-testid":"ListCardWrapper",style:{...t,top:Number(t.top)-o.current,willChange:"top"},children:jsx(gs,{"data-testid":"ListCardWrapper_StyledItemWrapper",children:f})})}var Mo=xs;var Ps=jl((e,t,o,r,n,a,l,s,i)=>({isLoading:e,rows:t,rowProps:o,scrollToIndex:r,totalCount:a,lastItemIndex:n,isError:l,areAllRowsLoaded:s,renderCardComponent:i}));function Vs({rows:e,threshold:t=200,rowProps:o,footerProps:r,rowHeight:n=57,isLoading:a,error:l,tableHeader:s,loadMoreItems:i,isFetchingNextPage:p,triggerDataRefetch:d,scrollToIndex:u,areAllRowsLoaded:c$2=false,tableBodyStyles:y,tableMode:m,tableTitle:b,renderCardComponent:f,cardLoadingComponent:x,tableHeight:h,tableHeaderHeight:S,noDataComponent:w,onStartDrag:E}){let P=useTheme(),T=_=>{E?.(_);},g=c({value:p,delay:1e3}),[R,k]=useState(false),C=_b(l),v=a??true,I=!a&&e.length===0&&C&&!ac(l),V=!a&&e.length===0,L=$b(l),M=e.length-1,D=ab(e.length)&&!v,H=g||c$2&&!D?e.length+1:e.length,N=Ps(g,e,o,u,M,r?.totalCount??0,C,c$2&&!D,f),G=useMemo(()=>{let _=B=>{k(B);};return jsx(Kl,{"data-testid":"VirtualTable_InfiniteLoader",isItemLoaded:B=>B!==M,itemCount:H,loadMoreItems:async()=>{c$2||await i?.();},threshold:t,children:({onItemsRendered:B,ref:F})=>jsx(Ce,{sx:{height:`${h-(S??0)}px`},id:"auto-sizer-wrapper",children:jsx(Gl,{ref:F,"data-testid":"VirtualTable_AutoSizer",children:({height:ne,width:Ne})=>jsx(He,{"data-testid":"VirtualTable_VirtualList",useIsScrolling:true,className:"list",itemData:N,height:ne||0,width:Ne||0,itemCount:H,itemSize:()=>n,onItemsRendered:B,setBackdropVisibility:_,areTotalRowsNotFillingHeight:D,scrollToIndex:u,overscanCount:5,children:Mo})})})})},[l,a,M,i,n,e,o,I,v,t,g,c$2,D,H]),W=v||I||V||L;return jsxs(Fragment,{children:[jsx(It,{children:jsx(bn,{as:"main",id:"table-box-container","aria-labelledby":"table-box-container","data-testid":"VirtualTable_StyledTableBox","data-title":b,"data-direction":P.direction,"data-are-all-rows-loaded":!!c$2,"data-is-fetching-next-page":!!p,"data-scroll-to-index":u,"data-is-loading":!!a,"data-is-error":!!C,"data-is-error-timeout":!!L,"data-table-mode":m,dir:P.direction,showNoDataView:W,sx:{height:`${h}px !important`},children:jsxs(A,{"data-testid":"VirtualTable_TableWrapper",showNoDataView:W,sx:{...y},children:[s,W?jsx(Lo,{error:l,tableEmpty:V,isTimeoutError:L,tableError:I,tableLoading:v,triggerDataRefetch:d,footerProps:r,cardLoadingComponent:x,noDataComponent:w}):G]})})}),jsx(c$1,{"data-testid":"VirtualTable_TableFooter",showSeparator:true,showBackDrop:R,onPointerDown:T,sx:{marginTop:"-37px"},...r})]})}var Ls=memo(Vs);var Bb=styled("img")(()=>({width:"13.3px",height:"13.3px"})),zb=styled("img")(()=>({width:"8px",height:"6.4px",cursor:"pointer",marginTop:"2px"})),Gn=styled("span")(({theme:e})=>({color:e.palette.text.primary,textOverflow:"ellipsis",width:"80%",overflow:"hidden",fontSize:"12px",fontWeight:600})),Kn=styled("div")(()=>({width:"16px",height:"auto",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"2px",padding:"2px",transition:"all 0.2s ease"})),Yn=styled(Fa,{shouldForwardProp:e=>e!=="showBackDrop"})(({showBackDrop:e,theme:t})=>({flex:"0 0 auto",boxShadow:e?t.shadows[23]:"none",backgroundColor:t.palette.background.default,zIndex:1,width:"100%",minWidth:"auto",overflowX:"auto"})),Jn=styled(La)(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",width:"100%",minWidth:"fit-content",height:"28px",backgroundColor:e.palette.primary.light})),Do=styled("div")({display:"flex",width:"100%",height:"100%",overflow:"hidden",borderRadius:"12px"}),Zn=styled("div")(({theme:e})=>({width:"auto",zIndex:10,flex:"0 0 auto",minWidth:0,display:"flex",flexDirection:"column",position:"relative",backgroundColor:e.palette.primary.light,borderTop:"1px solid #F2F2F2",borderBottom:"1px solid #F2F2F2",overflow:"hidden"})),Qn=styled(Zn)({boxShadow:"4px 0px 24px 0px #00000014",borderLeft:"1px solid #F2F2F2",borderRight:"none",borderTopLeftRadius:"12px",borderBottomLeftRadius:"12px"}),ei=styled(Zn)({boxShadow:"-4px 0px 24px 0px #00000014",borderRight:"1px solid #F2F2F2",borderLeft:"none",borderTopRightRadius:"12px",borderBottomRightRadius:"12px"}),Ht=styled("div",{shouldForwardProp:e=>e!=="hasPinnedStart"&&e!=="hasPinnedEnd"})(({hasPinnedStart:e,hasPinnedEnd:t})=>({flex:"1 1 auto",minWidth:0,display:"flex",flexDirection:"column",borderTop:"1px solid #F2F2F2",borderBottom:"1px solid #F2F2F2",borderLeft:e?"none":"1px solid #F2F2F2",borderRight:t?"none":"1px solid #F2F2F2",position:"relative",scrollbarWidth:"auto",overflow:"hidden",borderTopLeftRadius:e?"0":"12px",borderBottomLeftRadius:e?"0":"12px",borderTopRightRadius:t?"0":"12px",borderBottomRightRadius:t?"0":"12px"})),_e=styled("div")({flexShrink:0,height:"auto",overflow:"auto"});var Ho=(e,t,o)=>{let[r,n]=useState(()=>{let m=t?e.filter(f=>f.pinned==="start").map(f=>f.id):[],b=e.filter(f=>f.isDefaultPinned&&f.pinned!=="end").map(f=>f.id);return Array.from(new Set([...b,...m]))}),[a,l]=useState(()=>{let m=e.filter(h=>h.isDefaultPinned&&h.pinned==="end").map(h=>h.id);if(!t)return m;let b=e.filter(h=>h.pinned==="end").map(h=>h.id),f=e.filter(h=>!h.hidden),x=f[f.length-1];return b.length===0&&x&&!x.pinned&&!x.isDefaultPinned?[x.id]:b}),s=useCallback((m,b="start")=>{if(!t)return;let f=[...r],x=[...a];b==="unpin"?(f=f.filter(S=>S!==m),x=x.filter(S=>S!==m)):b==="start"?(f=[...f.filter(S=>S!==m),m],x=x.filter(S=>S!==m)):b==="end"&&(x=[...x.filter(S=>S!==m),m],f=f.filter(S=>S!==m)),n(f),l(x);let h=f.includes(m)||x.includes(m);o?.(m,h);},[r,a,o,t]),i=useMemo(()=>e.filter(m=>!m.hidden),[e]),{pinnedStartColumnsData:p,pinnedEndColumnsData:d,unpinnedColumnsData:u}=useMemo(()=>{let m=i.filter(w=>r.includes(w.id)),b=i.filter(w=>a.includes(w.id)),f=i.filter(w=>!r.includes(w.id)&&!a.includes(w.id)),x=m.sort((w,E)=>(w?.order??1e6)-(E?.order??1e6)),h=b.sort((w,E)=>(w?.order??1e6)-(E?.order??1e6)),S=f.sort((w,E)=>(w?.order??1e6)-(E?.order??1e6));return {pinnedStartColumnsData:x,pinnedEndColumnsData:h,unpinnedColumnsData:S}},[i,r,a]),c=useMemo(()=>[...p,...u,...d],[p,u,d]),y=useMemo(()=>{let m=c[c.length-1];return m?m.id:null},[c]);return {pinnedStartColumns:r,pinnedEndColumns:a,handleColumnPin:s,pinnedStartColumnsData:p,pinnedEndColumnsData:d,unpinnedColumnsData:u,orderedColumns:c,lastColumnId:y}};var Fo=()=>{let e=useRef(null),t=useRef(null),o=useRef(null),r=useRef(false),n=useCallback(({scrollOffset:a},l)=>{r.current||(r.current=true,l!=="start"&&e.current&&e.current.scrollTo(a),l!=="end"&&o.current&&o.current.scrollTo(a),l!=="scrollable"&&t.current&&t.current.scrollTo(a),requestAnimationFrame(()=>{r.current=false;}));},[]);return {pinnedStartVirtualListRef:e,scrollableVirtualListRef:t,pinnedEndVirtualListRef:o,handleScroll:n}};var Bo=()=>{let[e,t]=useState(null),[o,r]=useState(null),[n,a]=useState(null),[l,s]=useState(null),[i,p]=useState(false),d=useCallback((m,b,f,x,h)=>{f.stopPropagation();let S=`${h??"default"}-${m}-${b}-${x}`,w=`${h??"default"}-${m}-${b}`;if(n===S){a(null),t(null);return}a(S),t(w),s(null);},[n,a,t,s]),u=useCallback((m,b,f,x)=>{if(f.stopPropagation(),x==="start"&&b===0){s(S=>S===m?null:m),t(null),r(null),a(null);return}let h=`${x??"default"}-${m}-${b}`;t(S=>S===h?null:h),r(null),a(null),s(null);},[l]),c=useCallback((m,b,f)=>{b.stopPropagation();let x=`${f??"default"}-${m}`;r(h=>h===x?null:x),t(null),a(null),s(null);},[]),y=useCallback(()=>{t(null),r(null),a(null),s(null);},[]);return {selectedCell:e,selectedColumn:o,selectedRow:l,showBackDrop:i,selectedChip:n,setShowBackdrop:p,handleChipClick:d,handleCellClick:u,handleColumnClick:c,resetSelection:y}};var Hs=e=>e!==null&&"isAxiosError"in e&&e.isAxiosError===true,zo=({rows:e,isLoading:t,error:o,isFetchingNextPage:r,areAllRowsLoaded:n})=>{let a=c({value:r,delay:1e3}),l=useMemo(()=>{let i=_b(o||null),p=t??true,d=o&&Hs(o)?o:null,u=!t&&e.length===0&&i&&!ac(d),c=!t&&e.length===0,y=$b(d);return {isError:i,tableLoading:p,tableError:u,tableEmpty:c,hasTimeoutError:y,showNoDataView:p||u||c||y}},[e.length,t,o]),s=useMemo(()=>{let i=e.length-1,p=ab(e.length)&&!l.tableLoading,d=(a??false)||n?e.length+1:e.length;return {lastItemIndex:i,areTotalRowsNotFillingHeight:p,itemsCount:d}},[e.length,l.tableLoading,a,n]);return {...l,...s,isDelayedFetchingNextPage:a??false}};var Bs=jl((e,t,o,r,n,a,l,s,i,p,d,u,c,y,m,b,f,x)=>({columns:e,isLoading:t,rows:o,rowProps:r,scrollToIndex:n,totalCount:l,lastItemIndex:a,isError:s,areAllRowsLoaded:i,limit:l,newLoadedRowsEndIndex:a,isSheetView:true,isPinned:p,selectedCell:d,selectedColumn:u,selectedRow:c,selectedChip:y,onCellClick:m,onChipClick:b,containerHeight:f,rowHeight:x})),_o=({rowHeight:e,areAllRowsLoaded:t,rows:o,isDelayedFetchingNextPage:r,rowProps:n,scrollToIndex:a,footerProps:l,isError:s,selectedCell:i,selectedColumn:p,selectedRow:d,selectedChip:u,handleCellClick:c,handleChipClick:y})=>{let m=useCallback((h,S)=>{if(t&&h===o.length){let E=o.length*e,P=S-E,T=e*2;return Math.max(P,T)}return e},[t,o.length,e]),b=useMemo(()=>[r,o,n,a,o.length-1,l?.totalCount??0,s,t],[r,o,n,a,l?.totalCount,s,t]),f=useMemo(()=>[i,p,d,u,c,y],[i,p,d,u,c,y]),x=useCallback((h,S,w)=>Bs(h,...b,S,...f,w,e),[b,f,e]);return {getItemSize:m,getItemDataForContainer:x}};var zs=(e,t)=>{let o=useMemo(()=>e.reduce((n,a)=>{let l=typeof a.width=="string"?parseInt(a.width):a.width||100;return n+l},.2),[e]),r=useMemo(()=>t.reduce((n,a)=>{let l=typeof a.width=="string"?parseInt(a.width):a.width||100;return n+l},.2),[t]);return {pinnedStartColumnsWidth:o,pinnedEndColumnsWidth:r}};var Ao=({tableContainerRef:e,showHeader:t,isResizing:o})=>{let[r,n]=useState({top:0,height:0});return useEffect(()=>{let a=()=>{if(e.current){let l=e.current.getBoundingClientRect(),s=t?28:0;n({top:l.top+s,height:l.height-s});}};if(a(),o){let l=()=>a();return window.addEventListener("resize",l),()=>window.removeEventListener("resize",l)}},[o,t,e]),r};var ai=styled("div",{shouldForwardProp:e=>e!=="isResizing"&&e!=="isLast"})(({isLast:e})=>({position:"absolute",top:0,right:e?-10:-11,width:20,height:"100%",backgroundColor:"transparent",zIndex:100001,display:"flex",alignItems:"center",justifyContent:"center"})),li=styled("div",{shouldForwardProp:e=>e!=="isVisible"&&e!=="x"&&e!=="height"&&e!=="top"})(({isVisible:e,x:t,height:o,top:r})=>({position:"fixed",left:t,top:r,width:1,height:`calc(${o}px - 14px)`,backgroundColor:"#1F88D0",zIndex:9999,pointerEvents:"none",opacity:e?1:0,transition:"opacity 0.1s ease","&::before":{content:'""',position:"absolute",left:-1,top:0,width:1,height:"100%"}})),_t=styled("div",{shouldForwardProp:e=>e!=="isVisible"&&e!=="x"&&e!=="y"&&e!=="offsetX"})(({isVisible:e,x:t,y:o,offsetX:r=0})=>({position:"fixed",left:t+r-8,top:o,width:20,height:16,backgroundImage:`url(${Vi})`,backgroundSize:"contain",backgroundRepeat:"no-repeat",backgroundPosition:"center",zIndex:1e5,pointerEvents:"none",display:e?"block":"none",transform:"translate(-50%, -50%)"}));function Us({columnId:e,onStartResize:t,isResizing:o,isLast:r=false}){let[n,a]=useState(false),[l,s]=useState({x:0,y:0}),i=useRef(null),p=useCallback(()=>{let m=i.current?.getBoundingClientRect();m&&s({x:m.right,y:m.top+m.height/2});},[]),d=useCallback(()=>{o||(a(true),p());},[o,p]),u=useCallback(()=>{!o&&n&&p();},[o,n,p]),c=useCallback(()=>{a(false);},[]);return jsxs(Fragment,{children:[jsx(ai,{ref:i,isResizing:o,isLast:r,onMouseDown:m=>{m.stopPropagation(),m.preventDefault(),a(false),t(m,e);},onMouseEnter:d,onMouseMove:u,onMouseLeave:c,"data-testid":`column-resize-handle-${e}`}),createPortal(jsx(_t,{isVisible:n&&!o,x:l.x,y:l.y,offsetX:-2}),document.body)]})}var No=memo(Us);function Ks({isVisible:e,indicatorX:t,indicatorHeight:o,indicatorTop:r,iconX:n,iconY:a}){return e?createPortal(jsxs(Fragment,{children:[jsx(li,{isVisible:e,x:t,height:o,top:r,"data-testid":"column-resize-indicator"}),jsx(_t,{isVisible:e,x:n,y:a,offsetX:8,"data-testid":"floating-resize-icon"})]}),document.body):null}var $o=memo(Ks);var Zs=e=>{if(!e||typeof e!="object")return false;let t=e;return "width"in t&&p(t.width)},Qs=e=>!e||typeof e!="object"?false:Object.values(e).every(Zs),ed=e=>!e||typeof e!="object"?false:Object.values(e).every(Qs),mi=e=>!e||typeof e!="object"?false:Object.values(e).every(ed),ui=()=>{try{let e=wa$1();if(!e)return {};let t=e;return mi(t)?t:(console.warn("Invalid column settings in localStorage"),{})}catch(e){return console.warn("Failed to get sheetview columns:",e),{}}},td=e=>{if(!mi(e))return console.warn("Invalid data structure for sheetview columns"),false;try{return va$1(e),!0}catch(t){return console.warn("Failed to save sheetview columns:",t),false}},ci=(e,t,o,r)=>{if(!hb(e)||!hb(t)||!hb(o))return r;try{return ui()[e]?.[t]?.[o]?.width??r}catch(n){return console.warn("Failed to get column width:",n),r}},fi=(e,t,o,r)=>{if(!hb(e)||!hb(t)||!hb(o)||!p(r))return console.warn("Invalid parameters for setColumnWidth"),false;try{let n=ui();return n[e]||(n[e]={}),n[e][t]||(n[e][t]={}),n[e][t][o]?n[e][t][o].width=r:n[e][t][o]={width:r},td(n)}catch(n){return console.warn("Failed to set column width:",n),false}};var ye={MIN_WIDTH:25,MAX_WIDTH:1500,DEFAULT_WIDTH:100};var bi=e=>{if(typeof e=="string"){let t=parseInt(e,10);return isNaN(t)?ye.DEFAULT_WIDTH:t}return e||ye.DEFAULT_WIDTH},Uo=e=>Math.max(ye.MIN_WIDTH,Math.min(ye.MAX_WIDTH,e)),j=e=>{let t=String(e.id);return e.tableViewId?`${t}_${e.tableViewId}`:t},Xo=(e,t)=>e.map(o=>{let r=j(o);return {...o,width:t[r]||o.width}}),hi=(e,t)=>{e.current&&(document.removeEventListener("mousemove",e.current),e.current=void 0),t.current&&(document.removeEventListener("mouseup",t.current),t.current=void 0),document.body.style.cursor="",document.body.style.userSelect="";},od=(e,t,o,r,n,a,l,s,i)=>p=>{try{let d=i.current-o,u=Uo(t+d);l(c=>({...c,columnWidths:{...c.columnWidths,[e]:u},isResizing:!1,resizingColumn:null,resizeIndicatorX:0})),r&&n&&(fi(r,n,String(e),u)||console.warn(`Failed to persist column width for ${e}`)),a?.(e,u),p.stopPropagation(),p.preventDefault(),s();}catch(d){console.error("Error in mouse up handler:",d),s();}},gi=(e,t,o,r,n,a,l,s,i)=>p=>{try{let d=p.clientX;if(r?.current){let c=r.current.getBoundingClientRect(),y=c.left,m=c.right;a==="start"&&n===1&&(m=m-38),d=Math.max(y,Math.min(m,p.clientX));}l&&(l.current=d);let u=d;if(s&&i){let c=s.current-i.current+ye.MIN_WIDTH;d<c&&(u=c);}e(c=>({...c,resizeIndicatorX:u})),t({x:u,y:o.current});}catch(d){console.error("Error in mouse move handler:",d);}},xi=(e,t)=>e[t]||ye.DEFAULT_WIDTH,Ci=(e,t,o,r,n,a,l)=>(s,i,p)=>d=>{od(s,i,p,e,t,o,r,n,l)(d),setTimeout(()=>{a.current=false;},0);};var qo=({columns:e,onColumnResize:t,handleColumnClick:o,windowId:r,serviceCode:n,tableContainerRef:a})=>{let l=useMemo(()=>e.reduce((I,V)=>{let L=j(V),M=bi(V.width),D=M;if(r&&n)try{D=ci(r,n,L,M)??M;}catch(H){console.warn(`Failed to load stored width for column ${L}:`,H),D=M;}return I[L]=Uo(D),I},{}),[r,n]),[{columnWidths:s,isResizing:i,resizingColumn:p,resizeIndicatorX:d},u]=useState(()=>({columnWidths:l,isResizing:false,resizingColumn:null,startX:0,startWidth:0,resizeIndicatorX:0})),[c,y]=useState({x:0,y:0}),m=useRef(false),b=useRef(0),f=useRef(0),x=useRef(0),h=useRef(0),S=useRef(),w=useRef();useEffect(()=>{u(I=>{let V=new Set(Object.keys(I.columnWidths)),L=new Set(Object.keys(l));return V.size!==L.size?{...I,columnWidths:l}:Array.from(L).some(D=>!V.has(D)||I.columnWidths[D]!==l[D])?{...I,columnWidths:l}:I});},[]);let E=useCallback(I=>xi(s,I),[s]),P=useCallback(()=>{hi(S,w);},[]),T=useCallback((I,V,L)=>Ci(r,n,t,u,P,m,f)(I,V,L),[r,n,t,P]),g=useCallback((I,V)=>gi(u,y,b,a,I,V,f,x,h),[a]),R=useCallback((I,V)=>{I.preventDefault(),I.stopPropagation();try{let L=E(V),M=I.clientX,D=e.find(F=>j(F)===V),H=D?e.filter(F=>F.pinned===D.pinned).findIndex(F=>j(F)===V):void 0,N=D?.pinned,W=I.currentTarget.closest('[data-testid="SheetViewVirtualTable_TableHeader_StyledCell"]'),_=I.clientY;if(W){let F=W.getBoundingClientRect();_=F.top+F.height/2;}u(F=>({...F,isResizing:!0,resizingColumn:V,startX:M,startWidth:L,resizeIndicatorX:M,resizingColumnIndex:H,resizingColumnPinned:N})),b.current=_,f.current=M,x.current=M,h.current=L,y({x:M,y:_}),m.current=!0;let U=g(H,N),B=T(V,L,M);S.current=U,w.current=B,document.addEventListener("mousemove",U),document.addEventListener("mouseup",B),document.body.style.cursor="none",document.body.style.userSelect="none";}catch(L){console.error("Error starting resize:",L),P();}},[E,g,T,P,e]),k=useCallback(()=>{try{u(I=>({...I,isResizing:!1,resizingColumn:null,resizeIndicatorX:0})),m.current=!1,P();}catch(I){console.error("Error stopping resize:",I),P();}},[P]),C=useCallback(()=>m.current,[]),v=useCallback((I,V,L)=>{C()||o(I,V,L);},[o,C]);return useEffect(()=>P,[P]),{columnWidths:s,isResizing:i,resizingColumn:p,resizeIndicatorX:d,cursorPosition:c,getColumnWidth:E,startResize:R,stopResize:k,isCurrentlyResizing:C,handleColumnClick:v}};var jo=({pinnedStartColumnsData:e,pinnedEndColumnsData:t,columnWidths:o})=>{let r=useMemo(()=>e.reduce((s,i)=>{let p=j(i),d=o[p]||parseInt(String(i.width))||150;return s+d},.2),[e,o]),n=useMemo(()=>t.reduce((s,i)=>{let p=j(i),d=o[p]||parseInt(String(i.width))||150;return s+d},.2),[t,o]),a=useMemo(()=>e.map(s=>{let i=j(s);return {...s,width:o[i]||s.width}}),[e,o]),l=useMemo(()=>t.map(s=>{let i=j(s);return {...s,width:o[i]||s.width}}),[t,o]);return {pinnedStartColumnsWidth:r,pinnedEndColumnsWidth:n,pinnedStartColumnsDataWithWidths:a,pinnedEndColumnsDataWithWidths:l}};var wi=b(Pt(),1);var sd=styled("section")(({isLoaded:e=false,isPinned:t=false})=>({overflow:"hidden",paddingInline:e&&!t?"32px":"0px",backgroundColor:e&&!t?"rgba(255, 255, 255, 0.60)":"none",filter:e&&!t?"blur(8px)":"none",marginTop:e&&!t?"1rem":"0",height:"100%",maxHeight:"100%"}));function dd({columns:e,isLoaded:t=false,animationType:o,isLoading:r=false,rowsCount:n=13,isPinned:a=false}){let[l,s]=useState(()=>n||Math.min($a(t,r),15));return useEffect(()=>{if(n){s(n);return}let i=()=>{let u=document.querySelector('[data-testid="SheetViewTableLoading"]');if(!u)return Math.min($a(t,r),25);let c=u.parentElement?.clientHeight||0,y=28,b=c-40;if(b<=0)return Math.min($a(t,r),25);let f=Math.floor(b/y);return Math.max(3,Math.min(f+2,25))},p=i();s(p);let d=()=>{let u=i();s(u);};return window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)},[t,r,n]),jsx(sd,{isLoaded:t,isPinned:a,"data-testid":"SheetViewTableLoading",children:[...Array(l)].map((i,p)=>jsx(Ze,{columns:e,animationType:o,rowIndex:p,useTableBackground:!a},`i-${(0, wi.default)("SheetViewTableLoadingRow_")}`))})}var le=memo(dd);function Ri({error:e,tableEmpty:t,isTimeoutError:o,tableError:r,tableLoading:n,orderedColumns:a,triggerDataRefetch:l,footerProps:s}){let i;if(n)i=jsx(De,{"data-testid":"SheetViewVirtualTable_SolidBackground",children:jsx(le,{"data-testid":"SheetViewVirtualTable_TableLoading",columns:a,isLoading:true,isPinned:false})});else if(o)i=jsx(oe,{"data-testid":"SheetViewVirtualTable_ErrorList_timeoutError",shouldMinimizeWidth:true,heading:"timeOut",message:"yourRequestOutPleaseTryAgain",triggerDataRefetch:l,sandboxMode:s?.sandboxMode});else if(r){let p=e,{formatted:d}=bc({error:p,fallbackMessage:"connectionErrorMsg"});i=jsx(oe,{"data-testid":"SheetViewVirtualTable_ErrorList_tableError",heading:"somethingWentWrong",message:d,triggerDataRefetch:l,sandboxMode:s?.sandboxMode});}else if(t){let p=e,{formatted:d}=bc({error:p,fallbackMessage:"tryAdjustingTheDateOrFilters"});i=jsx(kt,{sandboxMode:s?.sandboxMode,heading:"nothingFound",message:d});}else i=jsx(oe,{"data-testid":"SheetViewVirtualTable_ErrorList_tableError",heading:"somethingWentWrong",message:"connectionErrorMsg",triggerDataRefetch:l,sandboxMode:s?.sandboxMode});return i}Ri.displayName="SheetViewTableNoData";var md=memo(Ri);function xd({column:{header:e,id:t,tableViewId:o,align:r,headerStyle:n,sortable:a,filter:l,pinnable:s,width:i,order:p,pinned:d},colIndex:u,isFirst:c,isLast:y,isSelected:m,isDefaultPinned:b,onColumnSort:f,columnsSorting:x,onColumnPin:h,isPinnable:S,lastColumnId:w,onColumnClick:E,pinnedColumns:P,onStartResize:T,isResizing:g=false,resizingColumn:R=null}){let k=j({id:t,tableViewId:o}),[C,v]=useState(null),I=useRef(null),{isFilterApplied:V}=Ke({filter:l}),L=useCallback(W=>P?.includes(W),[P]),M=useMemo(()=>L(t),[t,L]),D=W=>{L(W)?h?.(W,"unpin"):W===w?h?.(W,"end"):h?.(W,"start");},H=()=>{v(I.current);};return jsxs(Se,{"data-id":t,component:"div","data-testid":"SheetViewVirtualTable_TableHeader_StyledCell","data-column-id":t,"data-column-width":i,"data-column-width-used":i,"data-column-align":r,"data-column-order":p,"data-column-header":typeof e=="string"?e:"component","data-column-sortable":!!a,"data-column-filterable":!!l,"data-column-pinned":M,isFirst:c,isLast:y,isSheetView:true,ref:I,onClick:W=>{W.target===W.currentTarget&&E?.(u,W,d);},sx:W=>({display:"flex",gap:W.spacing(.5),alignItems:"center",justifyContent:r==="right"?"flex-end":"flex-start",width:i,textAlign:r,overflow:"visible !important",cursor:"pointer",boxSizing:"border-box",border:"0.5px solid transparent",borderColor:m?"#1F88D0":"#F2F2F2",borderBottom:m?"0.5px solid transparent":"0.5px solid #F2F2F2",backgroundColor:m?"#F2F2F2":"#FCFCFC",minHeight:"28px",position:"relative","&:before":{content:'""',borderBottom:"none",position:"absolute",top:0,right:0,left:0,bottom:0},...n}),children:[jsxs(wt,{onClick:W=>{W.stopPropagation(),H();},children:[typeof e=="function"?e():jsx(Ce,{"data-testid":"SheetViewTableHeader_columns_header",sx:{maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e&&jsx(Gn,{"data-testid":"SheetViewVirtualTable_TableHeader_StyledCell_header_text",children:e})}),l&&jsx(Ge,{...l,anchorEl:C,setAnchorEl:v,isFilterApplied:V}),a&&jsx(Ct,{columnId:t,onColumnSort:f,columnsSorting:x,onClick:W=>{E?.(u,W,d);}}),S&&s&&!b&&!y&&jsx(Kn,{onClick:W=>{W.stopPropagation(),D(t);},title:M?"Unpin column":"Pin column",children:jsx("img",{src:M?Tg:Sg,alt:"pin-icon"})})]}),T&&d!=="end"&&jsx(No,{columnId:k,onStartResize:T,isResizing:g,isLast:y})]})}var Ei=memo(xd);function Sd({columns:e,headerProps:t,showBackDrop:o,onColumnSort:r,columnsSorting:n,pinnedColumns:a=[],onColumnPin:l,isPinnable:s=false,lastColumnId:i,selectedColumn:p=null,onColumnClick:d,onStartResize:u,isResizing:c=false,resizingColumn:y=null}){return jsx(Yn,{component:"nav","data-testid":"SheetViewVirtualTable_TableHeader_StyledHeader",showBackDrop:o,...t,children:jsx(Jn,{component:"section","data-testid":"SheetViewVirtualTable_TableHeader_StyledMUITableRow",children:e.map((m,b)=>{let f=`${m.pinned??"default"}-${b}`;return jsx(Ei,{column:m,colIndex:b,isFirst:m.id===e[0].id,isLast:m.id===e[e.length-1].id,isDefaultPinned:!!m.isDefaultPinned,isSelected:p===f,onColumnSort:r,columnsSorting:n,pinnedColumns:a,onColumnPin:l,isPinnable:s,lastColumnId:i,onColumnClick:d,onStartResize:u,isResizing:c,resizingColumn:y},`${m.id}-${b}`)})})})}var se=memo(Sd);function Rd({columnsData:e,itemCount:t,lastItemIndex:o,areAllRowsLoaded:r,loadMoreItems:n,threshold:a,getItemSize:l,getItemData:s,isPinned:i,fixedWidth:p,scrollToIndex:d,areTotalRowsNotFillingHeight:u,clearBackdropVisibilityTimeout:c,onScroll:y,setBackdropVisibility:m,listRef:b,overscanCount:f=40}){return jsx(Kl,{isItemLoaded:h=>h!==o,itemCount:t,loadMoreItems:async()=>{r||await n?.();},threshold:a,children:({onItemsRendered:h,ref:S})=>jsx(Gl,{ref:S,children:({height:w,width:E})=>{let P=g=>l(g,w),T=s(e,i,w);return jsx(He,{listRef:b,height:w,width:p||E,itemCount:t,itemSize:P,itemData:T,onItemsRendered:h,overscanCount:f,setBackdropVisibility:m,scrollToIndex:d,areTotalRowsNotFillingHeight:u,useIsScrolling:true,onScroll:y,clearBackdropVisibilityTimeout:c,style:{overflowX:i?"hidden":"auto",paddingBottom:i?"25px":"13px",backgroundColor:i?"transparent":"#F6F8FACC"},children:Dt})}})})}var Yo=memo(Rd);function Pd({position:e,columnsData:t,columnsWidth:o,pinnedColumnsList:r,showHeader:n,columnsSorting:a,onColumnSort:l,headerProps:s,showBackDrop:i,onColumnPin:p,isPinnable:d,lastColumnId:u,selectedColumn:c,onColumnClick:y,hasPinnedStart:m,hasPinnedEnd:b,tableTitle:f,areAllRowsLoaded:x,isFetchingNextPage:h,scrollToIndex:S,isLoading:w,isError:E,hasTimeoutError:P,tableMode:T,showNoDataView:g,tableLoading:R,createVirtualTableContainer:k,onStartResize:C,isResizing:v,resizingColumn:I}){let V=useTheme();if(t.length===0)return null;let L=e==="start"?Qn:ei,M=e==="start"?"pinnedStart":"pinnedEnd";return jsx(L,{children:jsxs(te,{as:"main",id:"sheet-table-box-container","aria-labelledby":"sheet-table-box-container","data-testid":"SheetViewVirtualTable_StyledTableBox","data-title":f,"data-direction":V.direction,"data-are-all-rows-loaded":!!x,"data-is-fetching-next-page":!!h,"data-scroll-to-index":S,"data-is-loading":!!w,"data-is-error":!!E,"data-is-error-timeout":!!P,"data-table-mode":T,height:"100%",dir:V.direction,showNoDataView:g,children:[n&&jsx(se,{"data-testid":"SheetViewVirtualTable_PinnedTableHeader",columnsSorting:a,onColumnSort:l,columns:t,headerProps:s,showBackDrop:i,pinnedColumns:r,onColumnPin:p,isPinnable:d,lastColumnId:u,selectedColumn:c,onColumnClick:y,tablePosition:e==="start"?"pinnedStart":"pinnedEnd",hasPinnedStart:m,hasPinnedEnd:b,onStartResize:C,isResizing:v,resizingColumn:I}),jsx(A,{"data-testid":"VirtualTable_TableWrapper",sx:{width:"100%",minWidth:"fit-content",overflowX:"hidden"},children:jsx(ce,{"data-testid":"SheetViewVirtualTable_PinnedStyledBox",hidePadding:true,className:"list-wrapper",sx:{height:"100%",maxHeight:"100%",overflow:"hidden"},children:R?jsx(le,{"data-testid":`SheetViewVirtualTable_PinnedTableLoading_${e}`,columns:t,isLoading:true,isPinned:true}):k(t,M,true,o)})})]})})}var Oe=memo(Pd);function vd({hasPinnedStart:e,hasPinnedEnd:t,unpinnedColumnsData:o,showHeader:r,columnsSorting:n,onColumnSort:a,headerProps:l,showBackDrop:s,pinnedStartColumns:i,pinnedEndColumns:p,onColumnPin:d,isPinnable:u,lastColumnId:c,selectedColumn:y,onColumnClick:m,tableTitle:b,areAllRowsLoaded:f,isFetchingNextPage:x,scrollToIndex:h,isLoading:S,isError:w,hasTimeoutError:E,tableMode:P,showNoDataView:T,tableBodyStyles:g,tableLoading:R,createVirtualTableContainer:k,onStartResize:C,isResizing:v,resizingColumn:I}){let V=useTheme();return jsx(Ht,{hasPinnedStart:e,hasPinnedEnd:t,children:jsx(te,{as:"main",id:"sheet-table-box-container","aria-labelledby":"sheet-table-box-container","data-testid":"SheetViewVirtualTable_StyledTableBox","data-title":b,"data-direction":V.direction,"data-are-all-rows-loaded":!!f,"data-is-fetching-next-page":!!x,"data-scroll-to-index":h,"data-is-loading":!!S,"data-is-error":!!w,"data-is-error-timeout":!!E,"data-table-mode":P,height:"100%",dir:V.direction,showNoDataView:T,scrollable:true,children:jsxs(A,{"data-testid":"SheetViewVirtualTable_TableWrapper",showNoDataView:T,sx:{...g,display:"flex",flexDirection:"column",height:"100%"},children:[r&&jsx(_e,{children:jsx(se,{"data-testid":"SheetViewVirtualTable_UnpinnedTableHeader",columnsSorting:n,onColumnSort:a,columns:o,headerProps:l,showBackDrop:s,pinnedColumns:[...i,...p],onColumnPin:d,isPinnable:u,lastColumnId:c,selectedColumn:y,onColumnClick:m,tablePosition:"scrollable",hasPinnedStart:e,hasPinnedEnd:t,onStartResize:C,isResizing:v,resizingColumn:I})}),jsx(A,{"data-testid":"VirtualTable_TableWrapper",sx:{width:"100%",minWidth:"fit-content"},children:jsx(ce,{"data-testid":"SheetViewVirtualTable_ScrollableStyledBox",hidePadding:true,className:"list-wrapper",sx:{height:"100%",maxHeight:"100%",overflow:"hidden"},children:R?jsx(le,{"data-testid":"SheetViewVirtualTable_TableLoading",columns:o,isLoading:true,isPinned:false}):k(o,"scrollable",false)})})]})})})}var Jo=memo(vd);function Hd({hasPinnedStart:e,hasPinnedEnd:t,unpinnedColumnsData:o,showHeader:r,columnsSorting:n,onColumnSort:a,headerProps:l,showBackDrop:s,pinnedStartColumns:i,pinnedEndColumns:p,onColumnPin:d,isPinnable:u,lastColumnId:c,selectedColumn:y,onColumnClick:m,tableTitle:b,areAllRowsLoaded:f,isFetchingNextPage:x,scrollToIndex:h,isLoading:S,isError:w,hasTimeoutError:E,tableMode:P,showNoDataView:T,tableBodyStyles:g}){let R=useTheme();return jsx(Ht,{hasPinnedStart:e,hasPinnedEnd:t,children:jsx(te,{as:"main",id:"sheet-table-box-container","aria-labelledby":"sheet-table-box-container","data-testid":"SheetViewVirtualTable_StyledTableBox_Loading","data-title":b,"data-direction":R.direction,"data-are-all-rows-loaded":!!f,"data-is-fetching-next-page":!!x,"data-scroll-to-index":h,"data-is-loading":!!S,"data-is-error":!!w,"data-is-error-timeout":!!E,"data-table-mode":P,height:"100%",dir:R.direction,showNoDataView:T,scrollable:true,children:jsxs(A,{"data-testid":"SheetViewVirtualTable_LoadingTableWrapper",showNoDataView:T,sx:{...g,display:"flex",flexDirection:"column",height:"100%"},children:[r&&jsx(_e,{children:jsx(se,{"data-testid":"SheetViewVirtualTable_LoadingTableHeader",columnsSorting:n,onColumnSort:a,columns:o,headerProps:l,showBackDrop:s,pinnedColumns:[...i,...p],onColumnPin:d,isPinnable:u,lastColumnId:c,selectedColumn:y,onColumnClick:m,tablePosition:"scrollable",hasPinnedStart:e,hasPinnedEnd:t})}),jsx(A,{"data-testid":"VirtualTable_LoadingTableWrapper",sx:{width:"100%",minWidth:"fit-content"},children:jsx(ce,{"data-testid":"SheetViewVirtualTable_LoadingStyledBox",hidePadding:true,className:"list-wrapper",sx:{height:"100%",maxHeight:"100%",display:"flex",flexDirection:"column",overflow:"hidden"},children:jsx(le,{"data-testid":"SheetViewVirtualTable_TableLoading",columns:o,isLoading:true,isPinned:false})})})]})})})}var Zo=memo(Hd);function _d({tableLoading:e,tableError:t,tableEmpty:o,hasTimeoutError:r,orderedColumns:n,showHeader:a,columnsSorting:l,onColumnSort:s,headerProps:i,showBackDrop:p,onColumnPin:d,lastColumnId:u,selectedColumn:c,onColumnClick:y,tableTitle:m,areAllRowsLoaded:b,isFetchingNextPage:f,scrollToIndex:x,isLoading:h,isError:S,tableMode:w,tableBodyStyles:E,error:P,triggerDataRefetch:T,footerProps:g,customNoDataComponent:R}){let k=useTheme(),C=e||t||o||r;return jsx(te,{as:"main",id:"sheet-table-box-container","aria-labelledby":"sheet-table-box-container","data-testid":"SheetViewVirtualTable_StyledTableBox","data-title":m,"data-direction":k.direction,"data-are-all-rows-loaded":!!b,"data-is-fetching-next-page":!!f,"data-scroll-to-index":x,"data-is-loading":!!h,"data-is-error":!!S,"data-is-error-timeout":!!r,"data-table-mode":w,height:"100%",dir:k.direction,showNoDataView:C,children:jsxs(A,{"data-testid":"SheetViewVirtualTable_TableWrapper",showNoDataView:C,sx:E,children:[a&&jsx(_e,{children:jsx(se,{"data-testid":"SheetViewVirtualTable_LoadingTableHeader",columnsSorting:l,onColumnSort:s,columns:n,headerProps:i,showBackDrop:p,pinnedColumns:[],onColumnPin:d,isPinnable:false,lastColumnId:u,selectedColumn:c,onColumnClick:y})}),R||jsx(Je,{error:P||null,tableEmpty:o,isTimeoutError:r,tableError:t,tableLoading:e,orderedColumns:n,triggerDataRefetch:T||(()=>Promise.resolve()),footerProps:g})]})})}var Qo=memo(_d);function Ud({columns:e,rows:t,threshold:o=20,showHeader:r,headerProps:n,rowProps:a,footerProps:l,rowHeight:s=28,isLoading:i,error:p,columnsSorting:d,onColumnSort:u,loadMoreItems:c,isFetchingNextPage:y,triggerDataRefetch:m,scrollToIndex:b,areAllRowsLoaded:f=false,tableBodyStyles:x,tableTitle:h,onStartDrag:S,onColumnPin:w,clearBackdropVisibilityTimeout:E=100,isPinnable:P=false,tableMode:T,overscanCount:g,windowId:R,serviceCode:k,customNoDataComponent:C,defaultSkeleton:v=true}){let I=useMemo(()=>Cc(e,i??false,v),[e,i,v]),{selectedCell:V,selectedColumn:L,selectedRow:M,showBackDrop:D,setShowBackdrop:H,handleCellClick:N,handleColumnClick:G,handleChipClick:W,selectedChip:_}=Bo(),U=useRef(null),B=useRef(null),{isError:F,tableLoading:ne,tableError:Ne,tableEmpty:$t,hasTimeoutError:K,showNoDataView:ie,lastItemIndex:$e,areTotalRowsNotFillingHeight:ae,itemsCount:he,isDelayedFetchingNextPage:Ut}=zo({rows:t,isLoading:i,error:p,isFetchingNextPage:y,areAllRowsLoaded:f}),{pinnedStartColumns:X,pinnedEndColumns:z,handleColumnPin:J,pinnedStartColumnsData:ge,pinnedEndColumnsData:Xt,unpinnedColumnsData:nt,orderedColumns:it,lastColumnId:Vi}=Ho(I,P,w),{pinnedStartVirtualListRef:at,scrollableVirtualListRef:lt,pinnedEndVirtualListRef:st,handleScroll:or}=Fo();useEffect(()=>{at.current?.resetAfterIndex(0),lt.current?.resetAfterIndex(0),st.current?.resetAfterIndex(0);},[t.length,at,lt,st]);let{columnWidths:Ue,isResizing:qt,resizingColumn:Li,resizeIndicatorX:ki,cursorPosition:rr,startResize:vi,handleColumnClick:Wi}=qo({columns:I,handleColumnClick:G,windowId:R,serviceCode:k,tableContainerRef:B}),nr=Ao({tableContainerRef:U,showHeader:r??false,isResizing:qt}),{pinnedStartColumnsWidth:ir,pinnedEndColumnsWidth:ar,pinnedStartColumnsDataWithWidths:Z,pinnedEndColumnsDataWithWidths:Q}=jo({pinnedStartColumnsData:ge,pinnedEndColumnsData:Xt,columnWidths:Ue}),lr=useMemo(()=>Xo(nt,Ue),[nt,Ue]),Mi=useMemo(()=>Xo(it,Ue),[it,Ue]),{getItemSize:sr,getItemDataForContainer:dr}=_o({rowHeight:s,areAllRowsLoaded:f,rows:t,isDelayedFetchingNextPage:Ut,rowProps:a,scrollToIndex:b,footerProps:l,isError:F,selectedCell:V,selectedColumn:L,selectedRow:M,selectedChip:_,handleCellClick:N,handleChipClick:W}),Di=jt=>{S?.(jt);},Xe=useCallback((jt,dt,Hi=false,Fi)=>jsx(Yo,{columnsData:jt,itemCount:he,lastItemIndex:$e,areAllRowsLoaded:f,loadMoreItems:c,threshold:o,getItemSize:sr,getItemData:dr,isPinned:Hi,fixedWidth:Fi,scrollToIndex:b,areTotalRowsNotFillingHeight:ae,clearBackdropVisibilityTimeout:E,onScroll:Bi=>{or(Bi,dt==="pinnedStart"?"start":dt==="pinnedEnd"?"end":"scrollable");},setBackdropVisibility:H,listRef:dt==="pinnedStart"?at:dt==="pinnedEnd"?st:lt,overscanCount:g}),[he,$e,f,c,o,sr,dr,b,ae,E,or,H,at,st,lt,g]),pr={showHeader:r,columnsSorting:d,onColumnSort:u,headerProps:n,showBackDrop:D,onColumnPin:J,isPinnable:P,lastColumnId:Vi,selectedColumn:L,onColumnClick:Wi,tableTitle:h,areAllRowsLoaded:f,isFetchingNextPage:y,scrollToIndex:b,isLoading:i,isError:F,tableMode:T,showNoDataView:ie,tableBodyStyles:x,onStartResize:vi,isResizing:qt,resizingColumn:Li},Pe={...pr,hasTimeoutError:K,tableLoading:ne};return jsxs(Fragment,{children:[jsx(fn,{ref:U,children:ie?ne?jsxs(Do,{ref:B,children:[Z.length>0&&jsx(Oe,{position:"start",columnsData:Z,columnsWidth:ir,pinnedColumnsList:X,hasPinnedStart:Z.length>0,hasPinnedEnd:Q.length>0,createVirtualTableContainer:Xe,...Pe}),jsx(Zo,{hasPinnedStart:Z.length>0,hasPinnedEnd:Q.length>0,unpinnedColumnsData:lr,pinnedStartColumns:X,pinnedEndColumns:z,...Pe}),Q.length>0&&jsx(Oe,{position:"end",columnsData:Q,columnsWidth:ar,pinnedColumnsList:[...X,...z],hasPinnedStart:Z.length>0,hasPinnedEnd:Q.length>0,createVirtualTableContainer:Xe,...Pe})]}):jsx(Qo,{tableLoading:ne,tableError:Ne,tableEmpty:$t,hasTimeoutError:K,orderedColumns:Mi,error:p,triggerDataRefetch:m,footerProps:l,customNoDataComponent:C,...pr}):jsxs(Do,{ref:B,children:[Z.length>0&&jsx(Oe,{position:"start",columnsData:Z,columnsWidth:ir,pinnedColumnsList:X,hasPinnedStart:Z.length>0,hasPinnedEnd:Q.length>0,createVirtualTableContainer:Xe,...Pe}),jsx(Jo,{hasPinnedStart:Z.length>0,hasPinnedEnd:Q.length>0,unpinnedColumnsData:lr,pinnedStartColumns:X,pinnedEndColumns:z,createVirtualTableContainer:Xe,...Pe}),Q.length>0&&jsx(Oe,{position:"end",columnsData:Q,columnsWidth:ar,pinnedColumnsList:[...X,...z],hasPinnedStart:Z.length>0,hasPinnedEnd:Q.length>0,createVirtualTableContainer:Xe,...Pe})]})}),jsx(b$1,{"data-testid":"SheetViewVirtualTable_TableFooter",showSeparator:true,showBackDrop:D,onPointerDown:Di,...l}),jsx($o,{isVisible:qt,indicatorX:ki,indicatorHeight:nr.height,indicatorTop:nr.top,iconX:rr.x,iconY:rr.y})]})}var Xd=memo(Ud);export{Xd as $,Mo as A,Ls as B,Bb as C,zb as D,Gn as E,Kn as F,Yn as G,Jn as H,Do as I,Qn as J,ei as K,Ht as L,_e as M,Ho as N,Fo as O,Bo as P,zo as Q,_o as R,zs as S,Ao as T,le as U,md as V,se as W,Oe as X,Jo as Y,Zo as Z,Qo as _,Ur as a,Xr as b,gt as c,Ge as d,oo as e,no as f,io as g,Se as h,Ke as i,mo as j,co as k,bo as l,ho as m,go as n,Co as o,Je as p,yo as q,Ro as r,Ze as s,Bl as t,_l as u,Zl as v,Po as w,Vo as x,Lo as y,ko as z};
@@ -1 +1 @@
1
- import {a as a$1}from'./chunk-PSRI6U2B.js';import {a}from'./chunk-AC4KAKGY.js';import {a as a$2}from'./chunk-XLWWA6CJ.js';import {Jc}from'./chunk-OIVTFRJE.js';import {Ab}from'./chunk-3JUTMTQV.js';import {Box}from'@mui/material';import r from'@mui/material/Box';import {styled}from'@mui/material/styles';import {useId,useState}from'react';import {jsxs,jsx}from'react/jsx-runtime';var h=styled(r,{shouldForwardProp:o=>o!=="open"})(({theme:o,open:a})=>({minWidth:105,height:32,cursor:"pointer",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"1px",border:`1px solid ${o.palette.divider}`,borderRadius:"4px",padding:"7px 8px",paddingRight:"4px",...a&&{boxShadow:o.shadows[7],borderColor:o.palette.info.dark}})),w=styled(r)(()=>({display:"flex",flexDirection:"column",gap:"1px"})),b=styled(r)(()=>({fontWeight:600,fontSize:"8px",color:"#8D8D94"})),v=styled(r)(({theme:o})=>({fontWeight:500,fontSize:"11px",lineHeight:1.1,color:o.palette.text.primary}));function i({defaultValue:o,label:a$3,onChange:D,options:l}){let M=Jc(useId(),"dropdown2"),[d,s]=useState(null),[y,E]=useState(o),t=!!d,W=e=>{t||s(e.currentTarget);},m=()=>{t&&s(null);},k=e=>{E(e),D?.(e),m();};return jsxs(h,{onClick:W,open:t,id:M,"data-testid":"Dropdown2",children:[jsxs(w,{children:[jsx(b,{children:a$3}),jsx(v,{children:y})]}),jsx(Box,{component:"img",src:Ab,alt:"down arrow",sx:{width:15,...t&&{transform:"rotate(180deg)"}}}),jsx(a,{open:t,anchorEl:d,sx:{minWidth:105,marginTop:"8px",marginBottom:"8px"},placement:"top",children:l.map((e,B)=>jsx(a$1,{onClick:()=>{k(e.value);},sx:T=>({...B!==l.length-1&&{borderBottom:`1px solid ${T.palette.divider}`}}),children:e.label},e.value))}),t&&jsx(a$2,{onClick:m})]})}var Q=i;export{Q as a};
1
+ import {a as a$1}from'./chunk-5LSKIBCX.js';import {a}from'./chunk-CRGXVUQV.js';import {a as a$2}from'./chunk-DSFHY45V.js';import {Jc}from'./chunk-25IWFELL.js';import {Ab}from'./chunk-3JUTMTQV.js';import {Box}from'@mui/material';import r from'@mui/material/Box';import {styled}from'@mui/material/styles';import {useId,useState}from'react';import {jsxs,jsx}from'react/jsx-runtime';var h=styled(r,{shouldForwardProp:o=>o!=="open"})(({theme:o,open:a})=>({minWidth:105,height:32,cursor:"pointer",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"1px",border:`1px solid ${o.palette.divider}`,borderRadius:"4px",padding:"7px 8px",paddingRight:"4px",...a&&{boxShadow:o.shadows[7],borderColor:o.palette.info.dark}})),w=styled(r)(()=>({display:"flex",flexDirection:"column",gap:"1px"})),b=styled(r)(()=>({fontWeight:600,fontSize:"8px",color:"#8D8D94"})),v=styled(r)(({theme:o})=>({fontWeight:500,fontSize:"11px",lineHeight:1.1,color:o.palette.text.primary}));function i({defaultValue:o,label:a$3,onChange:D,options:l}){let M=Jc(useId(),"dropdown2"),[d,s]=useState(null),[y,E]=useState(o),t=!!d,W=e=>{t||s(e.currentTarget);},m=()=>{t&&s(null);},k=e=>{E(e),D?.(e),m();};return jsxs(h,{onClick:W,open:t,id:M,"data-testid":"Dropdown2",children:[jsxs(w,{children:[jsx(b,{children:a$3}),jsx(v,{children:y})]}),jsx(Box,{component:"img",src:Ab,alt:"down arrow",sx:{width:15,...t&&{transform:"rotate(180deg)"}}}),jsx(a,{open:t,anchorEl:d,sx:{minWidth:105,marginTop:"8px",marginBottom:"8px"},placement:"top",children:l.map((e,B)=>jsx(a$1,{onClick:()=>{k(e.value);},sx:T=>({...B!==l.length-1&&{borderBottom:`1px solid ${T.palette.divider}`}}),children:e.label},e.value))}),t&&jsx(a$2,{onClick:m})]})}var Q=i;export{Q as a};