@tap-payments/os-micro-frontend-shared 0.3.256 → 0.3.257

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 (188) hide show
  1. package/build/_chunks/{chunk-J3CPRU2X.js → chunk-2FZQAWTT.js} +1 -1
  2. package/build/_chunks/{chunk-OQA73I3Z.js → chunk-2QYAHYYH.js} +1 -1
  3. package/build/_chunks/{chunk-6Q5NWGGT.js → chunk-3ARGSIW6.js} +1 -1
  4. package/build/_chunks/{chunk-F7TSJOX6.js → chunk-53FTAIGE.js} +1 -1
  5. package/build/_chunks/{chunk-4FOFVTQ2.js → chunk-5CIBM232.js} +1 -1
  6. package/build/_chunks/{chunk-IO5DNKRE.js → chunk-667MADJD.js} +1 -1
  7. package/build/_chunks/{chunk-2J4W2CAI.js → chunk-6AISJMRA.js} +1 -1
  8. package/build/_chunks/{chunk-DN3GVPG7.js → chunk-6JO37S7T.js} +1 -1
  9. package/build/_chunks/{chunk-ECXZJHTU.js → chunk-6PNJ5QPQ.js} +1 -1
  10. package/build/_chunks/{chunk-SPZGODAQ.js → chunk-6QJCOTT4.js} +1 -1
  11. package/build/_chunks/{chunk-PIO2RM2Z.js → chunk-7EBCOZWQ.js} +1 -1
  12. package/build/_chunks/chunk-AGUMSHB4.js +1 -0
  13. package/build/_chunks/{chunk-5VSOWOX2.js → chunk-BLPTYUL5.js} +1 -1
  14. package/build/_chunks/{chunk-CAZWVRDN.js → chunk-BNHPA7NL.js} +1 -1
  15. package/build/_chunks/{chunk-BDL56M7A.js → chunk-BVZCPC4B.js} +1 -1
  16. package/build/_chunks/chunk-C2QLJW5U.js +1 -0
  17. package/build/_chunks/{chunk-LLOK2FPM.js → chunk-CUGWXBZN.js} +1 -1
  18. package/build/_chunks/{chunk-LBQWWXKH.js → chunk-DJB73WJX.js} +1 -1
  19. package/build/_chunks/{chunk-Y2HHEHH2.js → chunk-E7OZE7FK.js} +2 -2
  20. package/build/_chunks/{chunk-JLL4EOYJ.js → chunk-ECCMCTOM.js} +1 -1
  21. package/build/_chunks/{chunk-IUN4DEUF.js → chunk-EOEZUZCE.js} +1 -1
  22. package/build/_chunks/{chunk-4Y2COEZC.js → chunk-FEZOSRP2.js} +1 -1
  23. package/build/_chunks/{chunk-3GA46JLW.js → chunk-FXLC7QM6.js} +1 -1
  24. package/build/_chunks/{chunk-DRBZWQC7.js → chunk-G7FUKYC4.js} +1 -1
  25. package/build/_chunks/{chunk-YAO5SBRE.js → chunk-GRNUANVM.js} +1 -1
  26. package/build/_chunks/chunk-GUU2BANS.js +1 -0
  27. package/build/_chunks/{chunk-5RPLYU74.js → chunk-HP4Q6HNE.js} +1 -1
  28. package/build/_chunks/chunk-IDPTEI5C.js +1 -0
  29. package/build/_chunks/chunk-IRIZPPXM.js +1 -0
  30. package/build/_chunks/{chunk-6PLO2VOU.js → chunk-J2SOCIJU.js} +1 -1
  31. package/build/_chunks/{chunk-CWNDTPM5.js → chunk-J7KCH7KM.js} +1 -1
  32. package/build/_chunks/{chunk-6WVAYA6W.js → chunk-JTJY7Z3M.js} +1 -1
  33. package/build/_chunks/{chunk-J2QN5EF5.js → chunk-KGG6V7HL.js} +1 -1
  34. package/build/_chunks/{chunk-Q7C7A5RK.js → chunk-KP2UMMK5.js} +1 -1
  35. package/build/_chunks/{chunk-FGZVDVG2.js → chunk-LHPUWQK3.js} +1 -1
  36. package/build/_chunks/{chunk-7UHNYLD7.js → chunk-LPVUMEPP.js} +1 -1
  37. package/build/_chunks/{chunk-HKFOCHKQ.js → chunk-LSJ4DU5A.js} +1 -1
  38. package/build/_chunks/{chunk-JNIXJXK3.js → chunk-M6YVU7V3.js} +1 -1
  39. package/build/_chunks/chunk-MYT3NC5B.js +2 -0
  40. package/build/_chunks/{chunk-C4ZTNHLR.js → chunk-MZ4CDPE6.js} +1 -1
  41. package/build/_chunks/{chunk-DFH5QS2C.js → chunk-N4CCG67Z.js} +1 -1
  42. package/build/_chunks/{chunk-MVWBQNBX.js → chunk-N63SPB7J.js} +1 -1
  43. package/build/_chunks/{chunk-PGG4PIRO.js → chunk-NU6TMNMX.js} +1 -1
  44. package/build/_chunks/{chunk-ETTNSCF2.js → chunk-NUJYDXCY.js} +1 -1
  45. package/build/_chunks/{chunk-SKJZPJBN.js → chunk-OGUM23ZV.js} +1 -1
  46. package/build/_chunks/{chunk-UZIT72EG.js → chunk-OTAHIU6Z.js} +1 -1
  47. package/build/_chunks/{chunk-MAPBEJDO.js → chunk-PCY4RMGU.js} +1 -1
  48. package/build/_chunks/{chunk-JO7EW2A3.js → chunk-PGMH7MPJ.js} +1 -1
  49. package/build/_chunks/{chunk-X26MSUES.js → chunk-Q2XPHAIX.js} +1 -1
  50. package/build/_chunks/{chunk-XKMKTJWE.js → chunk-QCVRHMCL.js} +1 -1
  51. package/build/_chunks/{chunk-NVNFBBM3.js → chunk-QLBJFLHC.js} +1 -1
  52. package/build/_chunks/{chunk-YLVW27RP.js → chunk-QX5RXH7X.js} +1 -1
  53. package/build/_chunks/chunk-RNBTIRD7.js +2 -0
  54. package/build/_chunks/{chunk-2QA5MXMV.js → chunk-SFQF3NEZ.js} +1 -1
  55. package/build/_chunks/chunk-SJ2G6MNZ.js +1 -0
  56. package/build/_chunks/{chunk-OGARNN6I.js → chunk-SQ6X7XQI.js} +1 -1
  57. package/build/_chunks/{chunk-AO5K32SU.js → chunk-TP36G4JZ.js} +1 -1
  58. package/build/_chunks/{chunk-PEV5GRRD.js → chunk-TSI47ZRD.js} +1 -1
  59. package/build/_chunks/{chunk-G5OEG7OX.js → chunk-TXVDWYET.js} +1 -1
  60. package/build/_chunks/chunk-TZEK6NIP.js +1 -0
  61. package/build/_chunks/{chunk-IXZBLV5N.js → chunk-U7BM5XPI.js} +1 -1
  62. package/build/_chunks/{chunk-6SBWV2KY.js → chunk-UDF64CIJ.js} +1 -1
  63. package/build/_chunks/{chunk-LNEWGSQE.js → chunk-UQ5SHYQN.js} +1 -1
  64. package/build/_chunks/{chunk-IULAG2J7.js → chunk-URDUQGSO.js} +1 -1
  65. package/build/_chunks/{chunk-CK64PBMR.js → chunk-USHKRLP3.js} +1 -1
  66. package/build/_chunks/{chunk-ACIQTR6D.js → chunk-VTM5XAA4.js} +1 -1
  67. package/build/_chunks/{chunk-IZLK35VJ.js → chunk-W6GD4H3R.js} +2 -2
  68. package/build/_chunks/{chunk-RRBFJGS6.js → chunk-WX3CZG6V.js} +1 -1
  69. package/build/_chunks/{chunk-JC7NZ5DQ.js → chunk-YQKWAH6Y.js} +1 -1
  70. package/build/_chunks/{chunk-2FRVCEJY.js → chunk-YXRP3YVA.js} +1 -1
  71. package/build/_chunks/{chunk-IQUQQVHU.js → chunk-ZDRR6O4Q.js} +1 -1
  72. package/build/_chunks/chunk-ZTZOHMJ3.js +1 -0
  73. package/build/components/ActionsDropdownMenu/index.js +1 -1
  74. package/build/components/Alert/index.js +1 -1
  75. package/build/components/AnimatedSpinnerIcon/index.js +1 -1
  76. package/build/components/AppServices/index.js +1 -1
  77. package/build/components/AppServicesBar/index.js +1 -1
  78. package/build/components/AppWindowWrapper/AppWindow/AppWindow.d.ts +1 -2
  79. package/build/components/AppWindowWrapper/AppWindow/nestingContext.d.ts +3 -0
  80. package/build/components/AppWindowWrapper/AppWindowWrapper.d.ts +1 -1
  81. package/build/components/AppWindowWrapper/index.js +1 -1
  82. package/build/components/AppWindowWrapper/type.d.ts +6 -0
  83. package/build/components/AreaChart/index.js +1 -1
  84. package/build/components/Autocomplete/index.js +1 -1
  85. package/build/components/AvatarStack/index.js +1 -1
  86. package/build/components/Calender/index.js +1 -1
  87. package/build/components/Card/index.js +1 -1
  88. package/build/components/ColorPicker/index.js +1 -1
  89. package/build/components/ColumnViews/index.js +1 -1
  90. package/build/components/ConfirmDialog/index.js +1 -1
  91. package/build/components/CountryFilter/index.js +1 -1
  92. package/build/components/CountryFlag/index.js +1 -1
  93. package/build/components/CurrenciesMenu/index.js +1 -1
  94. package/build/components/CurrencyAmount/index.js +1 -1
  95. package/build/components/CurrencyAmountInput/index.js +1 -1
  96. package/build/components/CurrencySymbol/index.js +1 -1
  97. package/build/components/DateFilter/index.js +1 -1
  98. package/build/components/DeviceIcon/index.js +1 -1
  99. package/build/components/DropdownMenu/index.js +1 -1
  100. package/build/components/EmptyState/index.js +1 -1
  101. package/build/components/ErrorToast/index.js +1 -1
  102. package/build/components/FileDropbox/index.js +1 -1
  103. package/build/components/FilePreview/index.js +1 -1
  104. package/build/components/FileUploader/index.js +1 -1
  105. package/build/components/FilterChip/index.js +1 -1
  106. package/build/components/FilterDropdown/index.js +1 -1
  107. package/build/components/Filters/index.js +1 -1
  108. package/build/components/FlippingCard/index.js +1 -1
  109. package/build/components/FormSelect/index.js +1 -1
  110. package/build/components/GroupedSelect/index.js +1 -1
  111. package/build/components/HeatMap/index.js +1 -1
  112. package/build/components/InputBase/index.js +1 -1
  113. package/build/components/Inputs/index.js +1 -1
  114. package/build/components/JSONViewer/index.js +1 -1
  115. package/build/components/LeftPeekRightExpandingChip/index.js +1 -1
  116. package/build/components/ListColumnFilter/index.js +1 -1
  117. package/build/components/ListHeader/index.js +1 -1
  118. package/build/components/ListHeader/types.d.ts +2 -0
  119. package/build/components/ListLayout/index.js +1 -1
  120. package/build/components/Loader/index.js +1 -1
  121. package/build/components/Logo/index.js +1 -1
  122. package/build/components/MFWidgetLoader/index.js +1 -1
  123. package/build/components/MaskedText/index.js +1 -1
  124. package/build/components/MultiSelect/index.js +1 -1
  125. package/build/components/NestedDropdown/index.js +1 -1
  126. package/build/components/NestedMultiSelect/index.js +1 -1
  127. package/build/components/PaymentSourceFilter/index.js +1 -1
  128. package/build/components/PhoneFilter/index.js +1 -1
  129. package/build/components/PhoneInput/index.js +1 -1
  130. package/build/components/ProgressRing/index.js +1 -1
  131. package/build/components/RadioGroup/RadioGroup.d.ts +2 -6
  132. package/build/components/RadioGroup/RadioItem.d.ts +4 -0
  133. package/build/components/RadioGroup/constants.d.ts +66 -0
  134. package/build/components/RadioGroup/index.d.ts +3 -2
  135. package/build/components/RadioGroup/index.js +1 -1
  136. package/build/components/RadioGroup/style.d.ts +18 -4
  137. package/build/components/RadioGroup/type.d.ts +56 -19
  138. package/build/components/RangeCalender/index.js +1 -1
  139. package/build/components/RatingCount/index.js +1 -1
  140. package/build/components/ReferenceTypeFilter/index.js +1 -1
  141. package/build/components/RightLeftExpandingCenterChip/index.js +1 -1
  142. package/build/components/SearchButton/SearchButton.d.ts +2 -7
  143. package/build/components/SearchButton/constants.d.ts +37 -0
  144. package/build/components/SearchButton/icons.d.ts +3 -0
  145. package/build/components/SearchButton/index.d.ts +3 -2
  146. package/build/components/SearchButton/index.js +1 -1
  147. package/build/components/SearchButton/{styles.d.ts → style.d.ts} +173 -173
  148. package/build/components/SearchButton/type.d.ts +28 -0
  149. package/build/components/SearchInput/index.js +1 -1
  150. package/build/components/SheetViewChip/index.js +1 -1
  151. package/build/components/Sidebar/index.js +1 -1
  152. package/build/components/StatusBar/index.js +1 -1
  153. package/build/components/StatusButton/index.js +1 -1
  154. package/build/components/StatusFilter/index.js +1 -1
  155. package/build/components/StatusIcons/index.js +1 -1
  156. package/build/components/StatusLabel/index.js +1 -1
  157. package/build/components/TableCells/index.js +1 -1
  158. package/build/components/TableReports/index.js +1 -1
  159. package/build/components/TextInput/index.js +1 -1
  160. package/build/components/Timepicker/index.js +1 -1
  161. package/build/components/ToggleView/index.js +1 -1
  162. package/build/components/Toolbar/index.js +1 -1
  163. package/build/components/ToolbarIcon/index.js +1 -1
  164. package/build/components/TreeDropdown/index.js +1 -1
  165. package/build/components/VerificationIcon/index.js +1 -1
  166. package/build/components/ViewColumnRadioFilter/index.js +1 -1
  167. package/build/components/VirtualTables/index.js +1 -1
  168. package/build/components/Widget/index.js +1 -1
  169. package/build/components/index.d.ts +2 -2
  170. package/build/components/index.js +1 -1
  171. package/build/components/primitives/index.js +1 -1
  172. package/build/constants/assets.d.ts +3 -0
  173. package/build/constants/index.js +1 -1
  174. package/build/datetime/components/index.js +1 -1
  175. package/build/hooks/index.js +1 -1
  176. package/build/index.js +1 -1
  177. package/build/utils/index.js +1 -1
  178. package/package.json +2 -2
  179. package/build/_chunks/chunk-24X3BEJR.js +0 -1
  180. package/build/_chunks/chunk-2GSUGMI7.js +0 -2
  181. package/build/_chunks/chunk-7GJMLJ2X.js +0 -1
  182. package/build/_chunks/chunk-CZWXKHO7.js +0 -1
  183. package/build/_chunks/chunk-DRWSBTEH.js +0 -1
  184. package/build/_chunks/chunk-M6JX6YSB.js +0 -1
  185. package/build/_chunks/chunk-REMAOTWV.js +0 -2
  186. package/build/_chunks/chunk-UFOU3EJK.js +0 -1
  187. package/build/_chunks/chunk-UOERDOEI.js +0 -1
  188. package/build/_chunks/chunk-VTFUWYYT.js +0 -1
@@ -1,4 +1,4 @@
1
- import {f}from'./chunk-4Y2COEZC.js';import e from'@mui/material/Box';import l from'@mui/material/Button';import d from'@mui/material/Input';import n from'@mui/material/ListSubheader';import r from'@mui/material/MenuItem';import {keyframes,styled}from'@mui/material/styles';var c=keyframes`
1
+ import {f}from'./chunk-FEZOSRP2.js';import e from'@mui/material/Box';import l from'@mui/material/Button';import d from'@mui/material/Input';import n from'@mui/material/ListSubheader';import r from'@mui/material/MenuItem';import {keyframes,styled}from'@mui/material/styles';var c=keyframes`
2
2
  0% {
3
3
  transform: rotate(-90deg);
4
4
  }
@@ -1 +1 @@
1
- import {Bc}from'./chunk-CZWXKHO7.js';import {memo,useId}from'react';import a from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var o=styled(a)(()=>({flex:1,position:"relative",display:"flex",flexDirection:"column",height:"100%"}));function e({children:p,...r}){let s=Bc(useId(),"list-layout");return jsx(o,{id:s,component:"article","data-testid":"ListLayout",...r,children:p})}e.displayName="ListLayout";var i=memo(e);var C=i;export{C as a};
1
+ import {Bc}from'./chunk-ZTZOHMJ3.js';import {memo,useId}from'react';import a from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var o=styled(a)(()=>({flex:1,position:"relative",display:"flex",flexDirection:"column",height:"100%"}));function e({children:p,...r}){let s=Bc(useId(),"list-layout");return jsx(o,{id:s,component:"article","data-testid":"ListLayout",...r,children:p})}e.displayName="ListLayout";var i=memo(e);var C=i;export{C as a};
@@ -1 +1 @@
1
- import {Bc}from'./chunk-CZWXKHO7.js';import {memo,useId}from'react';import {styled,CircularProgress}from'@mui/material';import {jsx}from'react/jsx-runtime';var o=styled(CircularProgress)(()=>({width:"24px !important",height:"24px !important",padding:"5px",".MuiCircularProgress-root":{width:"14px !important",height:"14px !important",display:"flex"},".MuiCircularProgress-circle":{strokeWidth:"1.017px",stroke:"rgba(0, 0, 0, 0.62)"}}));function t(i){let p=Bc(useId(),"loader");return jsx(o,{id:p,"data-testid":"Loader",...i})}t.displayName="Loader";var e=memo(t);var P=e;export{P as a};
1
+ import {Bc}from'./chunk-ZTZOHMJ3.js';import {memo,useId}from'react';import {styled,CircularProgress}from'@mui/material';import {jsx}from'react/jsx-runtime';var o=styled(CircularProgress)(()=>({width:"24px !important",height:"24px !important",padding:"5px",".MuiCircularProgress-root":{width:"14px !important",height:"14px !important",display:"flex"},".MuiCircularProgress-circle":{strokeWidth:"1.017px",stroke:"rgba(0, 0, 0, 0.62)"}}));function t(i){let p=Bc(useId(),"loader");return jsx(o,{id:p,"data-testid":"Loader",...i})}t.displayName="Loader";var e=memo(t);var P=e;export{P as a};
@@ -1 +1 @@
1
- import {Bc}from'./chunk-CZWXKHO7.js';import {pi,qi}from'./chunk-2GSUGMI7.js';import {styled,Box}from'@mui/material';import I,{useId,useMemo}from'react';import {jsx,jsxs}from'react/jsx-runtime';var c=styled(Box)(({theme:e})=>({height:"32px",borderRadius:"4px",backgroundColor:e.palette.action.hover,padding:"2px",display:"flex",alignItems:"center",position:"relative",cursor:"pointer",zIndex:1})),u=styled(Box,{shouldForwardProp:e=>e!=="isActive"})(({isActive:e})=>({flex:1,display:"flex",justifyContent:"center",alignItems:"center",position:"relative",zIndex:2,opacity:e?1:.5})),x=styled(Box,{shouldForwardProp:e=>e!=="activeIndex"})(({theme:e,activeIndex:o})=>({position:"absolute",top:2,left:o*30+2,transition:"all 0.25s ease-in-out",width:"28px",height:"28px",backgroundColor:e.palette.common.white,borderRadius:"2px",boxShadow:"0px 0px 4px 0px rgba(0, 0, 0, 0.20)"}));var m=(t=>(t.LIST="LIST",t.CARDS="CARDS",t.MAP="MAP",t))(m||{});var y=e=>{let o=I.Children.count(e.children)-1;return jsx(c,{...e,sx:{width:o*30+2}})},w=y;var T=[{icon:jsx("img",{src:pi,alt:"card"}),value:"CARDS"},{icon:jsx("img",{src:qi,alt:"LIST"}),value:"LIST"}],S=e=>{let{currentView:o,onToggleClick:s,getOverrideViews:t}=e,v=Bc(useId(),"toggle-view"),l=useMemo(()=>t?t(T):T,[t]),h=useMemo(()=>l.findIndex(r=>r.value===o),[l,o]);return s?jsxs(w,{id:v,"data-testid":"ToggleView",children:[l.map(r=>jsx(u,{onClick:()=>s(r.value),sx:{height:"11.6px",width:"11.6px"},isActive:o===r.value,children:r.icon},r.value)),jsx(x,{activeIndex:h})]}):null},f=S;var $=f;export{m as a,$ as b};
1
+ import {Bc}from'./chunk-ZTZOHMJ3.js';import {qi,ri}from'./chunk-RNBTIRD7.js';import {styled,Box}from'@mui/material';import I,{useId,useMemo}from'react';import {jsx,jsxs}from'react/jsx-runtime';var c=styled(Box)(({theme:e})=>({height:"32px",borderRadius:"4px",backgroundColor:e.palette.action.hover,padding:"2px",display:"flex",alignItems:"center",position:"relative",cursor:"pointer",zIndex:1})),u=styled(Box,{shouldForwardProp:e=>e!=="isActive"})(({isActive:e})=>({flex:1,display:"flex",justifyContent:"center",alignItems:"center",position:"relative",zIndex:2,opacity:e?1:.5})),x=styled(Box,{shouldForwardProp:e=>e!=="activeIndex"})(({theme:e,activeIndex:o})=>({position:"absolute",top:2,left:o*30+2,transition:"all 0.25s ease-in-out",width:"28px",height:"28px",backgroundColor:e.palette.common.white,borderRadius:"2px",boxShadow:"0px 0px 4px 0px rgba(0, 0, 0, 0.20)"}));var m=(t=>(t.LIST="LIST",t.CARDS="CARDS",t.MAP="MAP",t))(m||{});var y=e=>{let o=I.Children.count(e.children)-1;return jsx(c,{...e,sx:{width:o*30+2}})},w=y;var T=[{icon:jsx("img",{src:qi,alt:"card"}),value:"CARDS"},{icon:jsx("img",{src:ri,alt:"LIST"}),value:"LIST"}],S=e=>{let{currentView:o,onToggleClick:s,getOverrideViews:t}=e,v=Bc(useId(),"toggle-view"),l=useMemo(()=>t?t(T):T,[t]),h=useMemo(()=>l.findIndex(r=>r.value===o),[l,o]);return s?jsxs(w,{id:v,"data-testid":"ToggleView",children:[l.map(r=>jsx(u,{onClick:()=>s(r.value),sx:{height:"11.6px",width:"11.6px"},isActive:o===r.value,children:r.icon},r.value)),jsx(x,{activeIndex:h})]}):null},f=S;var $=f;export{m as a,$ as b};
@@ -1 +1 @@
1
- import {j}from'./chunk-4Y2COEZC.js';import {Ud,Qi,Ri,Si,Ti,Ui}from'./chunk-2GSUGMI7.js';import {memo}from'react';import i from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var x=styled(i)(({theme:o})=>({display:"flex",gap:o.spacing(1),insetInlineStart:o.spacing(1.25),zIndex:1}));styled(i)(({theme:o})=>({width:12,height:12,borderRadius:"50%",cursor:"pointer",backgroundColor:`${o.palette.grey[200]}14`,display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s ease-in-out",img:{opacity:"0",transition:"all 0.2s ease-in-out"},"&:active":{backgroundColor:`${o.palette.grey[200]} !important`}}));var b=styled(i)(({theme:o})=>({display:"flex",height:"2rem",justifyContent:"space-between",alignItems:"center",width:"100%",paddingLeft:o.spacing(1.25),paddingRight:o.spacing(1.25),"& > *":{flex:"1 1 0px;"}})),y=styled("div",{shouldForwardProp:o=>o!=="sandboxMode"&&o!=="maximized"&&o!=="isDragging"})(({maximized:o,isDragging:t})=>({...!o&&{borderTopRightRadius:12,borderTopLeftRadius:12},...t&&{cursor:"move"},margin:0})),$=styled(i,{shouldForwardProp:o=>o!=="maximized"&&o!=="isDragging"})(({isDragging:o})=>({...o&&{cursor:"move"},position:"relative",zIndex:1,margin:0})),f=styled(i,{shouldForwardProp:o=>o!=="maximized"&&o!=="isHovered"})(({theme:o,maximized:t})=>({height:32,position:"relative",display:"flex",width:"100%",justifyContent:"center",transition:"all 0.5s ease-in-out",borderTopLeftRadius:"12px",borderTopRightRadius:"12px",...t&&{display:"block !important",position:"fixed",right:0,left:0,zIndex:999,background:"transparent",".toolbar-wrapper":{display:"flex",justifyContent:"space-between",gap:10,alignItems:"center",position:"absolute",right:0,left:0,height:"2rem",".action-box":{visibility:"hidden"}},"&:hover":{".toolbar-wrapper":{top:0},".action-box":{visibility:"visible"}}},":hover":{".header-icon":{backgroundColor:`${o.palette.grey[200]}40`},".header-icon img":{opacity:1}}})),W=styled(y)(()=>({position:"sticky",top:0,left:0,right:0,zIndex:1e3,background:"#eaeaea",backdropFilter:"blur(32px)"})),u=styled(j)(({theme:o})=>({fontSize:"10px",color:"rgba(32, 35, 43, 0.5)",opacity:.7,textAlign:"left",fontWeight:o.v2.typography.fontWeightBold,lineHeight:"14px",userSelect:"none",paddingLeft:"0.175rem",textTransform:"capitalize"})),h=styled("div")(()=>({display:"flex",justifyContent:"center",alignItems:"center",position:"relative",textAlign:"center"})),I=styled("img")(()=>({width:14,height:14,verticalAlign:"center"}));var w=new Map([["json",Ud],["brand",Qi],["entity",Ri],["bank",Si],["individual",Ti],["password",Ui]]);function C({title:o,icon:t}){let a=w.get(t||"")??(w.get(o?.toLowerCase())||t);return jsxs(h,{className:"action-box","data-testid":"ToolbarAppIcon",children:[a&&jsx(I,{src:a,alt:"icon"}),jsx(u,{className:"title",children:o})]})}var S=C;function L({onMouseEnter:o,onMouseLeave:t,isMaximized:a,isHovered:z,rightActions:k,leftActions:n,title:A,icon:B,...H}){return jsx(f,{onMouseEnter:o,onMouseLeave:t,maximized:a,id:"toolbar","data-testid":"Toolbar",isHovered:z,...H,children:jsxs(b,{className:"toolbar-wrapper",children:[n?jsx(x,{className:"action-box",children:n}):jsx("div",{}),jsx(S,{title:A,icon:B}),k||jsx("div",{})]})})}var T=memo(L);var Z=T;export{y as a,$ as b,W as c,Z as d};
1
+ import {j}from'./chunk-FEZOSRP2.js';import {Vd,Ri,Si,Ti,Ui,Vi}from'./chunk-RNBTIRD7.js';import {memo}from'react';import i from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var x=styled(i)(({theme:o})=>({display:"flex",gap:o.spacing(1),insetInlineStart:o.spacing(1.25),zIndex:1}));styled(i)(({theme:o})=>({width:12,height:12,borderRadius:"50%",cursor:"pointer",backgroundColor:`${o.palette.grey[200]}14`,display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s ease-in-out",img:{opacity:"0",transition:"all 0.2s ease-in-out"},"&:active":{backgroundColor:`${o.palette.grey[200]} !important`}}));var b=styled(i)(({theme:o})=>({display:"flex",height:"2rem",justifyContent:"space-between",alignItems:"center",width:"100%",paddingLeft:o.spacing(1.25),paddingRight:o.spacing(1.25),"& > *":{flex:"1 1 0px;"}})),y=styled("div",{shouldForwardProp:o=>o!=="sandboxMode"&&o!=="maximized"&&o!=="isDragging"})(({maximized:o,isDragging:t})=>({...!o&&{borderTopRightRadius:12,borderTopLeftRadius:12},...t&&{cursor:"move"},margin:0})),$=styled(i,{shouldForwardProp:o=>o!=="maximized"&&o!=="isDragging"})(({isDragging:o})=>({...o&&{cursor:"move"},position:"relative",zIndex:1,margin:0})),f=styled(i,{shouldForwardProp:o=>o!=="maximized"&&o!=="isHovered"})(({theme:o,maximized:t})=>({height:32,position:"relative",display:"flex",width:"100%",justifyContent:"center",transition:"all 0.5s ease-in-out",borderTopLeftRadius:"12px",borderTopRightRadius:"12px",...t&&{display:"block !important",position:"fixed",right:0,left:0,zIndex:999,background:"transparent",".toolbar-wrapper":{display:"flex",justifyContent:"space-between",gap:10,alignItems:"center",position:"absolute",right:0,left:0,height:"2rem",".action-box":{visibility:"hidden"}},"&:hover":{".toolbar-wrapper":{top:0},".action-box":{visibility:"visible"}}},":hover":{".header-icon":{backgroundColor:`${o.palette.grey[200]}40`},".header-icon img":{opacity:1}}})),W=styled(y)(()=>({position:"sticky",top:0,left:0,right:0,zIndex:1e3,background:"#eaeaea",backdropFilter:"blur(32px)"})),u=styled(j)(({theme:o})=>({fontSize:"10px",color:"rgba(32, 35, 43, 0.5)",opacity:.7,textAlign:"left",fontWeight:o.v2.typography.fontWeightBold,lineHeight:"14px",userSelect:"none",paddingLeft:"0.175rem",textTransform:"capitalize"})),h=styled("div")(()=>({display:"flex",justifyContent:"center",alignItems:"center",position:"relative",textAlign:"center"})),I=styled("img")(()=>({width:14,height:14,verticalAlign:"center"}));var w=new Map([["json",Vd],["brand",Ri],["entity",Si],["bank",Ti],["individual",Ui],["password",Vi]]);function C({title:o,icon:t}){let a=w.get(t||"")??(w.get(o?.toLowerCase())||t);return jsxs(h,{className:"action-box","data-testid":"ToolbarAppIcon",children:[a&&jsx(I,{src:a,alt:"icon"}),jsx(u,{className:"title",children:o})]})}var S=C;function L({onMouseEnter:o,onMouseLeave:t,isMaximized:a,isHovered:z,rightActions:k,leftActions:n,title:A,icon:B,...H}){return jsx(f,{onMouseEnter:o,onMouseLeave:t,maximized:a,id:"toolbar","data-testid":"Toolbar",isHovered:z,...H,children:jsxs(b,{className:"toolbar-wrapper",children:[n?jsx(x,{className:"action-box",children:n}):jsx("div",{}),jsx(S,{title:A,icon:B}),k||jsx("div",{})]})})}var T=memo(L);var Z=T;export{y as a,$ as b,W as c,Z as d};
@@ -1 +1 @@
1
- import {Bc}from'./chunk-CZWXKHO7.js';import {useId}from'react';import {Box,FormControl,InputLabel,Select,MenuItem}from'@mui/material';import {useFormContext,Controller}from'react-hook-form';import {jsx,jsxs}from'react/jsx-runtime';function i(l){let m=Bc(useId(),"inputs-select"),{control:d}=useFormContext();return jsx(Controller,{name:l.name,control:d,render:({field:a,fieldState:{error:o}})=>jsxs(Box,{id:m,"data-testid":"InputsSelect",sx:{display:"flex",alignItems:"stretch",height:"100%",flexDirection:"column",flex:1},children:[jsxs(FormControl,{variant:"filled",sx:{minWidth:52,height:"40px !important",maxHeight:"40px !important",width:"100%","& .MuiFormLabel-asterisk":{color:"red"},"& .MuiFormLabel-root":{fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%",transform:"translate(8px, 15px) scale(1)"},".MuiFormLabel-root.MuiFormLabel-filled":{transform:"translate(8px, 8px) scale(0.75) "},".MuiFormLabel-root.Mui-focused":{transform:"translate(8px, 8px) scale(0.75)",fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%"}},required:l.required,children:[jsx(InputLabel,{id:"demo-simple-select-filled-label",sx:{fontSize:"11px",color:"#8D8D94 !important"},children:l.label}),jsx(Select,{inputProps:{sx:{backgroundColor:"#F9F9F9 !important",borderRadius:"4px",fontSize:"11px"}},...a,value:a.value??"",error:!!o,disableUnderline:true,required:true,labelId:"demo-simple-select-filled-label",id:"demo-simple-select-filled",sx:{width:"100%",height:"40px !important",maxHeight:"40px !important",borderRadius:"4px",overflow:"hidden",".MuiSelect-select":{padding:"0px 8px !important",height:"40px !important",maxHeight:"40px !important",display:"flex",alignItems:"flex-end !important"},".MuiSelect-filled":{padding:"0px 8px !important"},...o&&{border:"1px solid #FF3D00"}},children:(l.options||[]).map((e,s)=>jsx(MenuItem,{value:e.value??"",sx:{fontSize:"12px"},children:e.label},`${s}-${e.value??""}`))})]}),o?.message&&jsx(Box,{component:"small",sx:e=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"}),children:o.message})]})})}var h=i;export{h as a};
1
+ import {Bc}from'./chunk-ZTZOHMJ3.js';import {useId}from'react';import {Box,FormControl,InputLabel,Select,MenuItem}from'@mui/material';import {useFormContext,Controller}from'react-hook-form';import {jsx,jsxs}from'react/jsx-runtime';function i(l){let m=Bc(useId(),"inputs-select"),{control:d}=useFormContext();return jsx(Controller,{name:l.name,control:d,render:({field:a,fieldState:{error:o}})=>jsxs(Box,{id:m,"data-testid":"InputsSelect",sx:{display:"flex",alignItems:"stretch",height:"100%",flexDirection:"column",flex:1},children:[jsxs(FormControl,{variant:"filled",sx:{minWidth:52,height:"40px !important",maxHeight:"40px !important",width:"100%","& .MuiFormLabel-asterisk":{color:"red"},"& .MuiFormLabel-root":{fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%",transform:"translate(8px, 15px) scale(1)"},".MuiFormLabel-root.MuiFormLabel-filled":{transform:"translate(8px, 8px) scale(0.75) "},".MuiFormLabel-root.Mui-focused":{transform:"translate(8px, 8px) scale(0.75)",fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%"}},required:l.required,children:[jsx(InputLabel,{id:"demo-simple-select-filled-label",sx:{fontSize:"11px",color:"#8D8D94 !important"},children:l.label}),jsx(Select,{inputProps:{sx:{backgroundColor:"#F9F9F9 !important",borderRadius:"4px",fontSize:"11px"}},...a,value:a.value??"",error:!!o,disableUnderline:true,required:true,labelId:"demo-simple-select-filled-label",id:"demo-simple-select-filled",sx:{width:"100%",height:"40px !important",maxHeight:"40px !important",borderRadius:"4px",overflow:"hidden",".MuiSelect-select":{padding:"0px 8px !important",height:"40px !important",maxHeight:"40px !important",display:"flex",alignItems:"flex-end !important"},".MuiSelect-filled":{padding:"0px 8px !important"},...o&&{border:"1px solid #FF3D00"}},children:(l.options||[]).map((e,s)=>jsx(MenuItem,{value:e.value??"",sx:{fontSize:"12px"},children:e.label},`${s}-${e.value??""}`))})]}),o?.message&&jsx(Box,{component:"small",sx:e=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"}),children:o.message})]})})}var h=i;export{h as a};
@@ -1 +1 @@
1
- import {b,j as j$1,V,U,n,R,d as d$1}from'./chunk-4Y2COEZC.js';import {nc}from'./chunk-CZWXKHO7.js';import {Oj,m}from'./chunk-2GSUGMI7.js';import {memo,forwardRef,useState,useMemo,useCallback}from'react';import Fe from'@mui/material/ClickAwayListener';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import Pe from'@mui/material/SvgIcon';import d from'@mui/material/Box';import {styled}from'@mui/material/styles';var c="os-shared-CurrenciesMenu",r={root:`${c}-root`,trigger:`${c}-trigger`,triggerInfo:`${c}-triggerInfo`,triggerLabel:`${c}-triggerLabel`,triggerArrow:`${c}-triggerArrow`,static:`${c}-static`,flag:`${c}-flag`,category:`${c}-category`,categoryLabel:`${c}-categoryLabel`,option:`${c}-option`,optionLabel:`${c}-optionLabel`};function $e({currency:e,className:o,sx:t}){let i=u=>{u.currentTarget.src!==Oj&&(u.currentTarget.src=Oj);};return jsx(d$1,{src:e?m(e):Oj,alt:e||"flag",onError:i,className:nc(r.flag,o),sx:t??{width:14,height:14}})}var C=memo($e);var j=e=>jsx(Pe,{viewBox:"0 0 8 5",sx:{width:8,height:5},...e,children:jsx("path",{d:"M7.30267 0.117188C7.38054 0.115307 7.45644 0.138248 7.52045 0.182617C7.58449 0.227088 7.63367 0.290458 7.66205 0.363281C7.6904 0.436073 7.69755 0.516047 7.68256 0.592773C7.66771 0.668745 7.63063 0.738375 7.57709 0.793945L4.17279 4.43164C4.10249 4.50662 4.00517 4.55078 3.90228 4.55078C3.79958 4.55064 3.70294 4.5065 3.63275 4.43164L0.227478 0.794922L0.228455 0.793945C0.175738 0.738766 0.139787 0.669812 0.124939 0.594727C0.110049 0.519097 0.116214 0.440194 0.143494 0.368164C0.170896 0.296002 0.218691 0.232474 0.281189 0.1875C0.343697 0.14262 0.418101 0.11821 0.495056 0.118164C0.54684 0.118166 0.598245 0.12907 0.645447 0.150391C0.691771 0.171346 0.733033 0.201824 0.767517 0.239258L3.90228 3.58691L7.03705 0.239258C7.10541 0.164191 7.20102 0.119752 7.30267 0.117188Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.233333"})});function Se({currency:e,selected:o,renderOption:t}){return t?jsx(Fragment,{children:t(e,{selected:o})}):jsxs(Fragment,{children:[jsx(C,{currency:e}),jsx(j$1,{sx:{fontSize:11},className:r.optionLabel,children:e})]})}var re=memo(Se);var y=styled(d)(()=>({display:"inline-block"})),S=styled(b,{shouldForwardProp:e=>e!=="$open"})(({theme:e,$open:o=false})=>{let{base:t,border:i,brand:u}=e.v2.palette;return {display:"flex",alignItems:"center",justifyContent:"space-between",height:32,border:`1px solid ${i.default}`,borderRadius:e.v2.radius(4),backgroundColor:t.white,minWidth:74,padding:e.v2.spacing(8),color:t.black,...Re(o,u[500]),"&.Mui-disabled":{opacity:.7,border:`1px solid ${i.default}`,backgroundColor:t.white,color:t.black}}});function Re(e,o){return e?{borderColor:o}:{}}var O=styled(d)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.v2.spacing(4),minWidth:0})),M=styled(j$1)(()=>({fontSize:"11px",fontWeight:500,lineHeight:1.1})),F=styled(d,{shouldForwardProp:e=>e!=="$open"})(({$open:e=false})=>({display:"flex",alignItems:"center",flexShrink:0,transition:"transform 200ms cubic-bezier(0.4, 0, 0.2, 1)",...e&&{transform:"rotate(180deg)"}})),te=styled(d)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.v2.spacing(4),minWidth:0,padding:e.v2.spacing(8)})),oe=styled(d)(({theme:e})=>({borderBottom:`1px solid ${e.v2.palette.border.default}`,paddingBottom:e.v2.spacing(8),"&:last-child":{borderBottom:"none",paddingBottom:0}})),ne=styled(j$1)(({theme:e})=>({color:e.v2.palette.grey[500],fontSize:"10px",fontWeight:500,lineHeight:"100%",padding:e.v2.spacing(8)})),se=styled(V)({gap:"4px",borderTop:"none !important",height:24,[`& .${U.indicator}`]:{fontSize:11},"&:hover":{boxShadow:"7px 0px 8px 0px #F2F2F2"}});function Ae({currency:e,selected:o,onSelect:t,renderOption:i}){return jsx(se,{isSelected:o,startAdornment:null,onClick:()=>t(e),className:nc(r.option),children:jsx(re,{currency:e,selected:o,renderOption:i})})}var ae=memo(Ae);function z(e){if(!e)return "";for(let o of e){if(typeof o=="string")return o;let t=o.items??[];if(t.length>0)return t[0]}return ""}function le(e){if(!e||e.length===0)return [];let o=[],t=[],i=0,u=()=>{t.length>0&&(o.push({key:`flat-${i++}`,items:t}),t=[]);};for(let m of e)if(typeof m=="string")t.push(m);else {u();let l=m.items??[];if(l.length===0)continue;o.push({key:`group-${i++}`,label:m.label,items:l});}return u(),o}function ce(e){if(!e)return 0;let o=0;for(let t of e)typeof t=="string"?o+=1:o+=t.items?.length??0;return o}var pe=forwardRef(({value:e,defaultValue:o,onChange:t,options:i,isLoading:u=false,disabled:m=false,id:l,className:b,sx:x,menuPlacement:me,menuProps:ge,placeholder:h="",triggerIcon:D,renderOption:fe,renderSelected:N,...I},L)=>{let[G,V]=useState(null),[Ce,de]=useState(()=>o??z(i)),B=e!==void 0,v=B?e:Ce,$=!!G,ye=useMemo(()=>le(i),[i]),Z=useMemo(()=>ce(i),[i]),Me=useCallback(a=>{m||V(a.currentTarget);},[m]),A=useCallback(()=>{V(null);},[]),be=useCallback(a=>{B||de(a),t?.(a),A();},[B,t,A]),w=D===void 0?jsx(j,{}):D,{placement:xe,sx:P,...he}=ge??{},Ne=xe??me,Ie=useMemo(()=>[{margin:"8px 0",minWidth:74},...Array.isArray(P)?P:[P]],[P]);if(u)return jsx(y,{ref:L,id:l,"data-testid":l??"CurrenciesMenu",className:nc(r.root,b),sx:x,...I,children:jsxs(S,{variant:"secondary",disabled:true,className:nc(r.trigger),children:[jsx(O,{className:nc(r.triggerInfo),children:jsx(M,{className:nc(r.triggerLabel),children:h})}),jsx(n,{size:12})]})});if(Z===0)return jsx(y,{ref:L,id:l,"data-testid":l??"CurrenciesMenu",className:nc(r.root,b),sx:x,...I,children:jsxs(S,{variant:"secondary",disabled:true,className:nc(r.trigger),children:[jsx(O,{className:nc(r.triggerInfo),children:jsx(M,{className:nc(r.triggerLabel),children:h})}),w?jsx(F,{$open:false,className:nc(r.triggerArrow),children:w}):null]})});if(Z===1){let a=z(i);return jsx(y,{ref:L,id:l,"data-testid":l??"CurrenciesMenu",className:nc(r.root,b),sx:x,...I,children:jsx(te,{className:nc(r.static),children:N?jsx(Fragment,{children:N(a)}):jsxs(Fragment,{children:[jsx(C,{currency:a}),jsx(M,{className:nc(r.triggerLabel),children:a||h})]})})})}return jsx(Fe,{onClickAway:A,children:jsxs(y,{ref:L,id:l,"data-testid":l??"CurrenciesMenu",className:nc(r.root,b),sx:x,...I,children:[jsxs(S,{variant:"secondary",$open:$,disabled:m,onClick:Me,"aria-haspopup":"listbox","aria-expanded":$,className:nc(r.trigger),children:[jsx(O,{className:nc(r.triggerInfo),children:N?jsx(Fragment,{children:N(v)}):jsxs(Fragment,{children:[jsx(C,{currency:v}),jsx(M,{className:nc(r.triggerLabel),children:v||h})]})}),w?jsx(F,{$open:$,className:nc(r.triggerArrow),children:w}):null]}),jsx(R,{open:$,anchorEl:G,placement:Ne,sx:Ie,...he,children:ye.map(a=>jsxs(oe,{className:nc(r.category),children:[a.label?jsx(ne,{className:nc(r.categoryLabel),children:a.label}):null,a.items.map((T,Le)=>jsx(ae,{currency:T,selected:T===v,onSelect:be,renderOption:fe},`${a.key}:${T}-${Le}`))]},a.key))})]})})});pe.displayName="CurrenciesMenu";var ze=memo(pe);export{r as a,ze as b};
1
+ import {b,j as j$1,V,U,n,R,d as d$1}from'./chunk-FEZOSRP2.js';import {nc}from'./chunk-ZTZOHMJ3.js';import {Pj,m}from'./chunk-RNBTIRD7.js';import {memo,forwardRef,useState,useMemo,useCallback}from'react';import Fe from'@mui/material/ClickAwayListener';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import Pe from'@mui/material/SvgIcon';import d from'@mui/material/Box';import {styled}from'@mui/material/styles';var c="os-shared-CurrenciesMenu",r={root:`${c}-root`,trigger:`${c}-trigger`,triggerInfo:`${c}-triggerInfo`,triggerLabel:`${c}-triggerLabel`,triggerArrow:`${c}-triggerArrow`,static:`${c}-static`,flag:`${c}-flag`,category:`${c}-category`,categoryLabel:`${c}-categoryLabel`,option:`${c}-option`,optionLabel:`${c}-optionLabel`};function $e({currency:e,className:o,sx:t}){let i=u=>{u.currentTarget.src!==Pj&&(u.currentTarget.src=Pj);};return jsx(d$1,{src:e?m(e):Pj,alt:e||"flag",onError:i,className:nc(r.flag,o),sx:t??{width:14,height:14}})}var C=memo($e);var j=e=>jsx(Pe,{viewBox:"0 0 8 5",sx:{width:8,height:5},...e,children:jsx("path",{d:"M7.30267 0.117188C7.38054 0.115307 7.45644 0.138248 7.52045 0.182617C7.58449 0.227088 7.63367 0.290458 7.66205 0.363281C7.6904 0.436073 7.69755 0.516047 7.68256 0.592773C7.66771 0.668745 7.63063 0.738375 7.57709 0.793945L4.17279 4.43164C4.10249 4.50662 4.00517 4.55078 3.90228 4.55078C3.79958 4.55064 3.70294 4.5065 3.63275 4.43164L0.227478 0.794922L0.228455 0.793945C0.175738 0.738766 0.139787 0.669812 0.124939 0.594727C0.110049 0.519097 0.116214 0.440194 0.143494 0.368164C0.170896 0.296002 0.218691 0.232474 0.281189 0.1875C0.343697 0.14262 0.418101 0.11821 0.495056 0.118164C0.54684 0.118166 0.598245 0.12907 0.645447 0.150391C0.691771 0.171346 0.733033 0.201824 0.767517 0.239258L3.90228 3.58691L7.03705 0.239258C7.10541 0.164191 7.20102 0.119752 7.30267 0.117188Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.233333"})});function Se({currency:e,selected:o,renderOption:t}){return t?jsx(Fragment,{children:t(e,{selected:o})}):jsxs(Fragment,{children:[jsx(C,{currency:e}),jsx(j$1,{sx:{fontSize:11},className:r.optionLabel,children:e})]})}var re=memo(Se);var y=styled(d)(()=>({display:"inline-block"})),S=styled(b,{shouldForwardProp:e=>e!=="$open"})(({theme:e,$open:o=false})=>{let{base:t,border:i,brand:u}=e.v2.palette;return {display:"flex",alignItems:"center",justifyContent:"space-between",height:32,border:`1px solid ${i.default}`,borderRadius:e.v2.radius(4),backgroundColor:t.white,minWidth:74,padding:e.v2.spacing(8),color:t.black,...Re(o,u[500]),"&.Mui-disabled":{opacity:.7,border:`1px solid ${i.default}`,backgroundColor:t.white,color:t.black}}});function Re(e,o){return e?{borderColor:o}:{}}var O=styled(d)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.v2.spacing(4),minWidth:0})),M=styled(j$1)(()=>({fontSize:"11px",fontWeight:500,lineHeight:1.1})),F=styled(d,{shouldForwardProp:e=>e!=="$open"})(({$open:e=false})=>({display:"flex",alignItems:"center",flexShrink:0,transition:"transform 200ms cubic-bezier(0.4, 0, 0.2, 1)",...e&&{transform:"rotate(180deg)"}})),te=styled(d)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.v2.spacing(4),minWidth:0,padding:e.v2.spacing(8)})),oe=styled(d)(({theme:e})=>({borderBottom:`1px solid ${e.v2.palette.border.default}`,paddingBottom:e.v2.spacing(8),"&:last-child":{borderBottom:"none",paddingBottom:0}})),ne=styled(j$1)(({theme:e})=>({color:e.v2.palette.grey[500],fontSize:"10px",fontWeight:500,lineHeight:"100%",padding:e.v2.spacing(8)})),se=styled(V)({gap:"4px",borderTop:"none !important",height:24,[`& .${U.indicator}`]:{fontSize:11},"&:hover":{boxShadow:"7px 0px 8px 0px #F2F2F2"}});function Ae({currency:e,selected:o,onSelect:t,renderOption:i}){return jsx(se,{isSelected:o,startAdornment:null,onClick:()=>t(e),className:nc(r.option),children:jsx(re,{currency:e,selected:o,renderOption:i})})}var ae=memo(Ae);function z(e){if(!e)return "";for(let o of e){if(typeof o=="string")return o;let t=o.items??[];if(t.length>0)return t[0]}return ""}function le(e){if(!e||e.length===0)return [];let o=[],t=[],i=0,u=()=>{t.length>0&&(o.push({key:`flat-${i++}`,items:t}),t=[]);};for(let m of e)if(typeof m=="string")t.push(m);else {u();let l=m.items??[];if(l.length===0)continue;o.push({key:`group-${i++}`,label:m.label,items:l});}return u(),o}function ce(e){if(!e)return 0;let o=0;for(let t of e)typeof t=="string"?o+=1:o+=t.items?.length??0;return o}var pe=forwardRef(({value:e,defaultValue:o,onChange:t,options:i,isLoading:u=false,disabled:m=false,id:l,className:b,sx:x,menuPlacement:me,menuProps:ge,placeholder:h="",triggerIcon:D,renderOption:fe,renderSelected:N,...I},L)=>{let[G,V]=useState(null),[Ce,de]=useState(()=>o??z(i)),B=e!==void 0,v=B?e:Ce,$=!!G,ye=useMemo(()=>le(i),[i]),Z=useMemo(()=>ce(i),[i]),Me=useCallback(a=>{m||V(a.currentTarget);},[m]),A=useCallback(()=>{V(null);},[]),be=useCallback(a=>{B||de(a),t?.(a),A();},[B,t,A]),w=D===void 0?jsx(j,{}):D,{placement:xe,sx:P,...he}=ge??{},Ne=xe??me,Ie=useMemo(()=>[{margin:"8px 0",minWidth:74},...Array.isArray(P)?P:[P]],[P]);if(u)return jsx(y,{ref:L,id:l,"data-testid":l??"CurrenciesMenu",className:nc(r.root,b),sx:x,...I,children:jsxs(S,{variant:"secondary",disabled:true,className:nc(r.trigger),children:[jsx(O,{className:nc(r.triggerInfo),children:jsx(M,{className:nc(r.triggerLabel),children:h})}),jsx(n,{size:12})]})});if(Z===0)return jsx(y,{ref:L,id:l,"data-testid":l??"CurrenciesMenu",className:nc(r.root,b),sx:x,...I,children:jsxs(S,{variant:"secondary",disabled:true,className:nc(r.trigger),children:[jsx(O,{className:nc(r.triggerInfo),children:jsx(M,{className:nc(r.triggerLabel),children:h})}),w?jsx(F,{$open:false,className:nc(r.triggerArrow),children:w}):null]})});if(Z===1){let a=z(i);return jsx(y,{ref:L,id:l,"data-testid":l??"CurrenciesMenu",className:nc(r.root,b),sx:x,...I,children:jsx(te,{className:nc(r.static),children:N?jsx(Fragment,{children:N(a)}):jsxs(Fragment,{children:[jsx(C,{currency:a}),jsx(M,{className:nc(r.triggerLabel),children:a||h})]})})})}return jsx(Fe,{onClickAway:A,children:jsxs(y,{ref:L,id:l,"data-testid":l??"CurrenciesMenu",className:nc(r.root,b),sx:x,...I,children:[jsxs(S,{variant:"secondary",$open:$,disabled:m,onClick:Me,"aria-haspopup":"listbox","aria-expanded":$,className:nc(r.trigger),children:[jsx(O,{className:nc(r.triggerInfo),children:N?jsx(Fragment,{children:N(v)}):jsxs(Fragment,{children:[jsx(C,{currency:v}),jsx(M,{className:nc(r.triggerLabel),children:v||h})]})}),w?jsx(F,{$open:$,className:nc(r.triggerArrow),children:w}):null]}),jsx(R,{open:$,anchorEl:G,placement:Ne,sx:Ie,...he,children:ye.map(a=>jsxs(oe,{className:nc(r.category),children:[a.label?jsx(ne,{className:nc(r.categoryLabel),children:a.label}):null,a.items.map((T,Le)=>jsx(ae,{currency:T,selected:T===v,onSelect:be,renderOption:fe},`${a.key}:${T}-${Le}`))]},a.key))})]})})});pe.displayName="CurrenciesMenu";var ze=memo(pe);export{r as a,ze as b};
@@ -1 +1 @@
1
- import {v}from'./chunk-4Y2COEZC.js';import {Bc,Ba,Ca}from'./chunk-CZWXKHO7.js';import {Fb,Wc}from'./chunk-2GSUGMI7.js';import mo,{useId,useState,useRef,useCallback,useEffect,useMemo}from'react';import B from'@mui/material/Box';import uo from'@mui/material/ClickAwayListener';import ro from'@mui/material/Stack';import Y from'@mui/material/Typography';import {styled,alpha}from'@mui/material/styles';import O from'@mui/material/Button';import lo from'@mui/material/TextField';import po from'@mui/material/MenuList';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {useTranslation}from'react-i18next';import {RgbColorPicker,RgbaColorPicker}from'react-colorful';import fo from'@mui/material/Popper';import J from'@mui/material/MenuItem';import j from'@mui/material/InputAdornment';import v$1 from'color';import {Popper}from'@mui/material';var G=styled("button")({background:"transparent",border:"none",padding:0,margin:0,cursor:"pointer",width:10,height:10,display:"flex",justifyContent:"center",alignItems:"center","&:disabled, &.Mui-disabled":{opacity:.5,cursor:"not-allowed"}}),D=styled(B)(({theme:o})=>({boxShadow:"0px 8px 30px rgba(0, 0, 0, 0.16)",width:264,backgroundColor:"#ffffff",padding:"12px",borderRadius:o.spacing(1),"& .react-colorful":{width:"100%","&__saturation":{minHeight:152,borderRadius:"4px",marginBottom:o.spacing(2),border:0,"&-pointer":{width:13,height:13}},"&__hue":{borderRadius:"4px",height:"8px","&-pointer":{width:10,height:10}},"&__alpha":{marginTop:o.spacing(2),marginBottom:0,border:0,borderRadius:"4px",height:"8px","&-pointer":{width:10,height:10}}}})),V=styled(B)(()=>({display:"flex",gap:"8px",justifyContent:"flex-end"})),X=styled(o=>jsx(Y,{...o,component:"button"}))(({theme:o})=>({fontWeight:500,fontSize:"9px",color:o.palette.info.dark,textDecoration:"underline",cursor:"pointer",background:"transparent",border:"none",padding:0,margin:0,"&:disabled, &.Mui-disabled":{color:alpha(o.palette.info.dark,.5),textDecoration:"none"},"&:hover":{textDecoration:"none"}})),$=styled(O)(({theme:o})=>({textTransform:"capitalize",minWidth:"auto",width:74,borderRadius:"4px",border:`1px solid ${o.palette.info.dark}`,backgroundColor:o.palette.info.dark,fontWeight:700,fontSize:"11px",color:o.palette.common.white,"&:hover":{backgroundColor:o.palette.info.dark}})),U=styled(O)(({theme:o})=>({textTransform:"capitalize",minWidth:"auto",width:74,borderRadius:"4px",border:`1px solid ${o.palette.divider}`,backgroundColor:o.palette.common.white,fontWeight:500,fontSize:"11px",color:o.palette.text.primary,"&:hover":{background:"transparent"}})),Z=styled(B,{shouldForwardProp:o=>o!=="active"})(({theme:o,active:s})=>({display:"flex",justifyContent:"space-between",alignItems:"center",color:o.palette.text.primary,border:"1px solid #F2F2F2",fontSize:12,fontWeight:500,backgroundColor:"transparent",padding:"4px 8px",borderRadius:"4px",minWidth:70,cursor:"pointer",...s&&{border:"1px solid #1F88D0",boxShadow:"0px 0px 4px 0px #1F88D080"}})),q=styled(po)({backgroundColor:"#ffffff",borderRadius:"4px",boxShadow:"0px 8px 30px 0px #00000029",minWidth:70,"& .MuiMenuItem-root":{fontSize:12,fontWeight:500,padding:"4px 8px"}}),x=styled(lo)(({theme:o})=>({"& .MuiOutlinedInput-root":{fontSize:"12px",fontWeight:500,borderRadius:"4px","& input":{padding:"4px","&::-webkit-outer-spin-button, &::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0},"&[type=number]":{MozAppearance:"textfield"}},"& .MuiOutlinedInput-notchedOutline":{borderColor:o.palette.divider,borderWidth:"1px"},"&:hover, &.Mui-focused":{"& .MuiOutlinedInput-notchedOutline":{borderColor:o.palette.divider,borderWidth:"1px"}}}}));var ho=({scheme:o,setScheme:s})=>{let[n,r]=mo.useState(null),m=!!n,a=useCallback(c=>{r(n?null:c.currentTarget);},[n]),i=useCallback(()=>{r(null);},[]),d=useCallback(c=>{i(),s(c);},[i,s]);return jsxs(Fragment,{children:[jsxs(Z,{component:"button",active:m,onClick:a,children:[o,jsx(B,{component:"img",sx:{transform:m?"rotateZ(180deg)":"rotateZ(0)",transition:"200ms transform ease-out"},src:Wc})]}),jsx(fo,{anchorEl:n,open:!!n,placement:"bottom",disablePortal:true,keepMounted:true,modifiers:[{name:"offset",options:{offset:[0,4]}}],children:jsx(uo,{onClickAway:c=>{n?.contains(c.target)||i();},children:jsxs(q,{children:[jsx(J,{onClick:()=>d("RGB"),children:"RGB"}),jsx(J,{onClick:()=>d("HEX"),children:"HEX"})]})})})]})},K=ho;var Ro=({value:o,onChange:s,disableAlpha:n=false})=>{let[r,m]=useState(o),{r:a,g:i,b:d,a:c}=r;useEffect(()=>{m(o);},[o]);let u=useCallback((l,f)=>(isNaN(l)&&(l=0),l<0&&(l=0),l>f&&(l=f),console.log("num",l),l),[]),t=useCallback((l,f)=>P=>{m({...r,[l]:u(+P.target.value,f)});},[r,u]),e=useCallback((l,f)=>{s({...r,[l]:u(r[l],f)});},[s,r,u]);return jsxs(ro,{direction:"row",spacing:1,...n&&{flex:1},children:[jsx(x,{type:"number",value:a,onBlur:()=>e("r",255),onChange:t("r",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...n&&{sx:{flex:1}}}),jsx(x,{type:"number",value:i,onBlur:()=>e("g",255),onChange:t("g",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...n&&{sx:{flex:1}}}),jsx(x,{type:"number",value:d,onBlur:()=>e("b",255),onChange:t("b",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...n&&{sx:{flex:1}}}),!n&&jsx(x,{type:"number",value:c,onBlur:()=>e("a",100),onChange:t("a",100),inputProps:{min:0,max:100,style:{textAlign:"center"}},variant:"outlined",sx:{"& .MuiOutlinedInput-root":{pr:1}},InputProps:{endAdornment:jsx(j,{position:"end",sx:{m:0},children:jsx(Y,{component:"span",display:"inline-block",fontSize:12,fontWeight:500,children:"%"})})},size:"small"})]})},Q=Ro;var vo=({value:o,onChange:s,disableAlpha:n=false})=>{let r=useMemo(()=>v$1.rgb(o.r,o.g,o.b,o.a).hex().replace("#",""),[o]),[m,a]=useState(r),i=Math.round(o.a*100);return useEffect(()=>{let t=v$1.rgb(o.r,o.g,o.b).hex().replace("#","");a(t);},[o.r,o.g,o.b]),jsxs(ro,{direction:"row",spacing:1,alignItems:"flex-start",children:[jsx(x,{value:m,onChange:t=>{let e=t.target.value.replace(/[^0-9a-fA-F]/g,"").toUpperCase();e.length>6&&(e=e.slice(0,6)),a(e);},onBlur:()=>{let t=m;if(t.length===3&&(t=t.split("").map(e=>e+e).join(""),a(t)),t.length===6)try{let e=v$1(`#${t}`).alpha(o.a);s({r:e.red(),g:e.green(),b:e.blue(),a:e.alpha()});}catch{a(r);}else a(r);},placeholder:"FFFFFF",sx:{flex:1.4,"& .MuiOutlinedInput-root":{pl:1}},InputProps:{startAdornment:jsx(j,{position:"start",sx:{m:0},children:jsx(Y,{component:"span",color:t=>alpha(t.palette.text.primary,.5),display:"inline-block",fontSize:12,fontWeight:500,children:"#"})})}}),!n&&jsx(x,{type:"number",value:i,onChange:t=>{let e=parseInt(t.target.value,10);isNaN(e)&&(e=0),e<0&&(e=0),e>100&&(e=100),s({...o,a:e/100});},inputProps:{min:0,max:100},sx:{flex:.8,"& .MuiOutlinedInput-root":{pr:1}},InputProps:{endAdornment:jsx(j,{position:"end",sx:{m:0},children:jsx(Y,{component:"span",color:"text.primary",display:"inline-block",fontSize:12,fontWeight:500,children:"%"})})}})]})},oo=vo;var Wo=({initialValue:o="#ffffff",onCancel:s,onConfirm:n,disableAlpha:r=false})=>{let[m,a]=useState("RGB"),[i,d]=useState(()=>{let{alpha:p,...y}=Ba(o).value;return {...y,a:p}}),{t:c}=useTranslation(),u=useCallback(()=>{let{alpha:p,...y}=Ba(o).value;d({...y,a:p}),s();},[o,s]),t=useCallback(()=>{let{a:p,...y}=i;n(Ca({...y,alpha:r?1:p}));},[i,n,r]),e=useCallback(p=>{d(r?{...p,a:1}:p);},[r]),l=useCallback(p=>{d({...p,a:p.a/100});},[]),f=useCallback(p=>{d({...p,a:p.a});},[]);return jsxs(D,{className:"color-picker__widget",children:[jsx(r?RgbColorPicker:RgbaColorPicker,{color:i,onChange:e}),jsxs(ro,{mt:2,spacing:1,direction:"row",children:[jsx(K,{scheme:m,setScheme:a}),m==="RGB"?jsx(Q,{value:{...i,a:Math.round(i.a*100)},onChange:l,disableAlpha:r}):jsx(oo,{value:{...i,a:i.a},onChange:f,disableAlpha:r})]}),jsx(v,{sx:{my:"12px"}}),jsxs(V,{className:"color-picker__widget-actions",children:[jsx(U,{className:"color-picker__widget-actions__cancel",onClick:u,children:c("cancel")}),jsx($,{className:"color-picker__widget-actions__confirm",onClick:t,children:c("okay")})]})]})},to=Wo;var no={hideReset:false,disableAlpha:false},Vo=({value:o="#ffffff",onChange:s,onReset:n,sx:r,options:m=no,disabled:a=false})=>{let i=Bc(useId(),"color-picker"),[d,c]=useState(null),{disableAlpha:u=false,hideReset:t=false}={...no,...m},e=useRef(null),l=useCallback(()=>{a||c(e.current);},[a]),f=useCallback(()=>{a||c(null);},[a]),P=useCallback(p=>{s(u?p.substring(0,7):p),c(null);},[s,u]);return jsx(uo,{onClickAway:()=>c(null),children:jsxs(ro,{ref:e,id:i,"data-testid":"ColorPicker",bgcolor:"grey.400",borderRadius:"4px",p:"4px",pr:"12px",direction:"row",justifyContent:"space-between",spacing:1,alignItems:"center",className:"color-picker",sx:r,children:[jsxs(ro,{direction:"row",spacing:1,alignItems:"center",className:"color-picker__controls-wrapper",children:[jsx(B,{borderRadius:"5px",width:32,height:32,sx:{backgroundColor:o},className:"color-picker__viewer"}),jsxs(B,{className:"color-picker__actions-wrapper",children:[jsx(Y,{className:"color-picker__label",fontWeight:500,fontSize:9,color:"text.primary",textTransform:"uppercase",children:o}),jsx(X,{className:"color-picker__edit-btn",type:"button",onClick:l,disabled:a,children:"Edit"})]})]}),t?jsx("div",{}):jsx(G,{className:"color-picker__close-btn",type:"button",disabled:a,onClick:n,children:jsx(B,{component:"img",src:Fb,width:10,height:10})}),jsx(Popper,{anchorEl:d,open:!!d,placement:"top",children:jsx(to,{initialValue:o,onCancel:f,onConfirm:P,disableAlpha:u})})]})})},ao=Vo;var ot=ao;export{ot as a};
1
+ import {v}from'./chunk-FEZOSRP2.js';import {Bc,Ba,Ca}from'./chunk-ZTZOHMJ3.js';import {Gb,Xc}from'./chunk-RNBTIRD7.js';import mo,{useId,useState,useRef,useCallback,useEffect,useMemo}from'react';import B from'@mui/material/Box';import uo from'@mui/material/ClickAwayListener';import ro from'@mui/material/Stack';import Y from'@mui/material/Typography';import {styled,alpha}from'@mui/material/styles';import O from'@mui/material/Button';import lo from'@mui/material/TextField';import po from'@mui/material/MenuList';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {useTranslation}from'react-i18next';import {RgbColorPicker,RgbaColorPicker}from'react-colorful';import fo from'@mui/material/Popper';import J from'@mui/material/MenuItem';import j from'@mui/material/InputAdornment';import v$1 from'color';import {Popper}from'@mui/material';var G=styled("button")({background:"transparent",border:"none",padding:0,margin:0,cursor:"pointer",width:10,height:10,display:"flex",justifyContent:"center",alignItems:"center","&:disabled, &.Mui-disabled":{opacity:.5,cursor:"not-allowed"}}),D=styled(B)(({theme:o})=>({boxShadow:"0px 8px 30px rgba(0, 0, 0, 0.16)",width:264,backgroundColor:"#ffffff",padding:"12px",borderRadius:o.spacing(1),"& .react-colorful":{width:"100%","&__saturation":{minHeight:152,borderRadius:"4px",marginBottom:o.spacing(2),border:0,"&-pointer":{width:13,height:13}},"&__hue":{borderRadius:"4px",height:"8px","&-pointer":{width:10,height:10}},"&__alpha":{marginTop:o.spacing(2),marginBottom:0,border:0,borderRadius:"4px",height:"8px","&-pointer":{width:10,height:10}}}})),V=styled(B)(()=>({display:"flex",gap:"8px",justifyContent:"flex-end"})),X=styled(o=>jsx(Y,{...o,component:"button"}))(({theme:o})=>({fontWeight:500,fontSize:"9px",color:o.palette.info.dark,textDecoration:"underline",cursor:"pointer",background:"transparent",border:"none",padding:0,margin:0,"&:disabled, &.Mui-disabled":{color:alpha(o.palette.info.dark,.5),textDecoration:"none"},"&:hover":{textDecoration:"none"}})),$=styled(O)(({theme:o})=>({textTransform:"capitalize",minWidth:"auto",width:74,borderRadius:"4px",border:`1px solid ${o.palette.info.dark}`,backgroundColor:o.palette.info.dark,fontWeight:700,fontSize:"11px",color:o.palette.common.white,"&:hover":{backgroundColor:o.palette.info.dark}})),U=styled(O)(({theme:o})=>({textTransform:"capitalize",minWidth:"auto",width:74,borderRadius:"4px",border:`1px solid ${o.palette.divider}`,backgroundColor:o.palette.common.white,fontWeight:500,fontSize:"11px",color:o.palette.text.primary,"&:hover":{background:"transparent"}})),Z=styled(B,{shouldForwardProp:o=>o!=="active"})(({theme:o,active:s})=>({display:"flex",justifyContent:"space-between",alignItems:"center",color:o.palette.text.primary,border:"1px solid #F2F2F2",fontSize:12,fontWeight:500,backgroundColor:"transparent",padding:"4px 8px",borderRadius:"4px",minWidth:70,cursor:"pointer",...s&&{border:"1px solid #1F88D0",boxShadow:"0px 0px 4px 0px #1F88D080"}})),q=styled(po)({backgroundColor:"#ffffff",borderRadius:"4px",boxShadow:"0px 8px 30px 0px #00000029",minWidth:70,"& .MuiMenuItem-root":{fontSize:12,fontWeight:500,padding:"4px 8px"}}),x=styled(lo)(({theme:o})=>({"& .MuiOutlinedInput-root":{fontSize:"12px",fontWeight:500,borderRadius:"4px","& input":{padding:"4px","&::-webkit-outer-spin-button, &::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0},"&[type=number]":{MozAppearance:"textfield"}},"& .MuiOutlinedInput-notchedOutline":{borderColor:o.palette.divider,borderWidth:"1px"},"&:hover, &.Mui-focused":{"& .MuiOutlinedInput-notchedOutline":{borderColor:o.palette.divider,borderWidth:"1px"}}}}));var ho=({scheme:o,setScheme:s})=>{let[n,r]=mo.useState(null),m=!!n,a=useCallback(c=>{r(n?null:c.currentTarget);},[n]),i=useCallback(()=>{r(null);},[]),d=useCallback(c=>{i(),s(c);},[i,s]);return jsxs(Fragment,{children:[jsxs(Z,{component:"button",active:m,onClick:a,children:[o,jsx(B,{component:"img",sx:{transform:m?"rotateZ(180deg)":"rotateZ(0)",transition:"200ms transform ease-out"},src:Xc})]}),jsx(fo,{anchorEl:n,open:!!n,placement:"bottom",disablePortal:true,keepMounted:true,modifiers:[{name:"offset",options:{offset:[0,4]}}],children:jsx(uo,{onClickAway:c=>{n?.contains(c.target)||i();},children:jsxs(q,{children:[jsx(J,{onClick:()=>d("RGB"),children:"RGB"}),jsx(J,{onClick:()=>d("HEX"),children:"HEX"})]})})})]})},K=ho;var Ro=({value:o,onChange:s,disableAlpha:n=false})=>{let[r,m]=useState(o),{r:a,g:i,b:d,a:c}=r;useEffect(()=>{m(o);},[o]);let u=useCallback((l,f)=>(isNaN(l)&&(l=0),l<0&&(l=0),l>f&&(l=f),console.log("num",l),l),[]),t=useCallback((l,f)=>P=>{m({...r,[l]:u(+P.target.value,f)});},[r,u]),e=useCallback((l,f)=>{s({...r,[l]:u(r[l],f)});},[s,r,u]);return jsxs(ro,{direction:"row",spacing:1,...n&&{flex:1},children:[jsx(x,{type:"number",value:a,onBlur:()=>e("r",255),onChange:t("r",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...n&&{sx:{flex:1}}}),jsx(x,{type:"number",value:i,onBlur:()=>e("g",255),onChange:t("g",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...n&&{sx:{flex:1}}}),jsx(x,{type:"number",value:d,onBlur:()=>e("b",255),onChange:t("b",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...n&&{sx:{flex:1}}}),!n&&jsx(x,{type:"number",value:c,onBlur:()=>e("a",100),onChange:t("a",100),inputProps:{min:0,max:100,style:{textAlign:"center"}},variant:"outlined",sx:{"& .MuiOutlinedInput-root":{pr:1}},InputProps:{endAdornment:jsx(j,{position:"end",sx:{m:0},children:jsx(Y,{component:"span",display:"inline-block",fontSize:12,fontWeight:500,children:"%"})})},size:"small"})]})},Q=Ro;var vo=({value:o,onChange:s,disableAlpha:n=false})=>{let r=useMemo(()=>v$1.rgb(o.r,o.g,o.b,o.a).hex().replace("#",""),[o]),[m,a]=useState(r),i=Math.round(o.a*100);return useEffect(()=>{let t=v$1.rgb(o.r,o.g,o.b).hex().replace("#","");a(t);},[o.r,o.g,o.b]),jsxs(ro,{direction:"row",spacing:1,alignItems:"flex-start",children:[jsx(x,{value:m,onChange:t=>{let e=t.target.value.replace(/[^0-9a-fA-F]/g,"").toUpperCase();e.length>6&&(e=e.slice(0,6)),a(e);},onBlur:()=>{let t=m;if(t.length===3&&(t=t.split("").map(e=>e+e).join(""),a(t)),t.length===6)try{let e=v$1(`#${t}`).alpha(o.a);s({r:e.red(),g:e.green(),b:e.blue(),a:e.alpha()});}catch{a(r);}else a(r);},placeholder:"FFFFFF",sx:{flex:1.4,"& .MuiOutlinedInput-root":{pl:1}},InputProps:{startAdornment:jsx(j,{position:"start",sx:{m:0},children:jsx(Y,{component:"span",color:t=>alpha(t.palette.text.primary,.5),display:"inline-block",fontSize:12,fontWeight:500,children:"#"})})}}),!n&&jsx(x,{type:"number",value:i,onChange:t=>{let e=parseInt(t.target.value,10);isNaN(e)&&(e=0),e<0&&(e=0),e>100&&(e=100),s({...o,a:e/100});},inputProps:{min:0,max:100},sx:{flex:.8,"& .MuiOutlinedInput-root":{pr:1}},InputProps:{endAdornment:jsx(j,{position:"end",sx:{m:0},children:jsx(Y,{component:"span",color:"text.primary",display:"inline-block",fontSize:12,fontWeight:500,children:"%"})})}})]})},oo=vo;var Wo=({initialValue:o="#ffffff",onCancel:s,onConfirm:n,disableAlpha:r=false})=>{let[m,a]=useState("RGB"),[i,d]=useState(()=>{let{alpha:p,...y}=Ba(o).value;return {...y,a:p}}),{t:c}=useTranslation(),u=useCallback(()=>{let{alpha:p,...y}=Ba(o).value;d({...y,a:p}),s();},[o,s]),t=useCallback(()=>{let{a:p,...y}=i;n(Ca({...y,alpha:r?1:p}));},[i,n,r]),e=useCallback(p=>{d(r?{...p,a:1}:p);},[r]),l=useCallback(p=>{d({...p,a:p.a/100});},[]),f=useCallback(p=>{d({...p,a:p.a});},[]);return jsxs(D,{className:"color-picker__widget",children:[jsx(r?RgbColorPicker:RgbaColorPicker,{color:i,onChange:e}),jsxs(ro,{mt:2,spacing:1,direction:"row",children:[jsx(K,{scheme:m,setScheme:a}),m==="RGB"?jsx(Q,{value:{...i,a:Math.round(i.a*100)},onChange:l,disableAlpha:r}):jsx(oo,{value:{...i,a:i.a},onChange:f,disableAlpha:r})]}),jsx(v,{sx:{my:"12px"}}),jsxs(V,{className:"color-picker__widget-actions",children:[jsx(U,{className:"color-picker__widget-actions__cancel",onClick:u,children:c("cancel")}),jsx($,{className:"color-picker__widget-actions__confirm",onClick:t,children:c("okay")})]})]})},to=Wo;var no={hideReset:false,disableAlpha:false},Vo=({value:o="#ffffff",onChange:s,onReset:n,sx:r,options:m=no,disabled:a=false})=>{let i=Bc(useId(),"color-picker"),[d,c]=useState(null),{disableAlpha:u=false,hideReset:t=false}={...no,...m},e=useRef(null),l=useCallback(()=>{a||c(e.current);},[a]),f=useCallback(()=>{a||c(null);},[a]),P=useCallback(p=>{s(u?p.substring(0,7):p),c(null);},[s,u]);return jsx(uo,{onClickAway:()=>c(null),children:jsxs(ro,{ref:e,id:i,"data-testid":"ColorPicker",bgcolor:"grey.400",borderRadius:"4px",p:"4px",pr:"12px",direction:"row",justifyContent:"space-between",spacing:1,alignItems:"center",className:"color-picker",sx:r,children:[jsxs(ro,{direction:"row",spacing:1,alignItems:"center",className:"color-picker__controls-wrapper",children:[jsx(B,{borderRadius:"5px",width:32,height:32,sx:{backgroundColor:o},className:"color-picker__viewer"}),jsxs(B,{className:"color-picker__actions-wrapper",children:[jsx(Y,{className:"color-picker__label",fontWeight:500,fontSize:9,color:"text.primary",textTransform:"uppercase",children:o}),jsx(X,{className:"color-picker__edit-btn",type:"button",onClick:l,disabled:a,children:"Edit"})]})]}),t?jsx("div",{}):jsx(G,{className:"color-picker__close-btn",type:"button",disabled:a,onClick:n,children:jsx(B,{component:"img",src:Gb,width:10,height:10})}),jsx(Popper,{anchorEl:d,open:!!d,placement:"top",children:jsx(to,{initialValue:o,onCancel:f,onConfirm:P,disableAlpha:u})})]})})},ao=Vo;var ot=ao;export{ot as a};
@@ -1 +1 @@
1
- import {p}from'./chunk-4Y2COEZC.js';import {Wa,Bc,cb}from'./chunk-CZWXKHO7.js';import {Sk,ya,xa,wa,Pj}from'./chunk-2GSUGMI7.js';import {memo,useId}from'react';import C from'@mui/material/Box';import O from'lodash/capitalize';import {useTranslation}from'react-i18next';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var D=styled(C,{shouldForwardProp:o=>o!=="tableMode"})(({theme:o,tableMode:t})=>({fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"4px 8px",borderRadius:"24px",border:`1px solid ${o.palette.divider}`,color:o.palette.text.primary,height:Wa(t)?"18px":"24px"}));var e={DESKTOP:wa,PHONE:xa,TABLET:ya,TERMINAL:Sk};var i=o=>!!e[o];function S({type:o,isTextShown:t,tableMode:T,...E}){let p$1=Bc(useId(),"device-icon"),{t:v}=useTranslation(),m=i(o)?e[o]:null;return jsx(p,{title:m?`Device - ${cb((o??"").toLowerCase())}`:v("unKnown"),children:t?jsx(D,{id:p$1,"data-testid":"DeviceIcon",tableMode:T,children:o?O(o):"Unknown"}):jsx(C,{...E,id:p$1,"data-testid":"DeviceIcon",component:"img",src:o?m||Pj:Pj,alt:o})})}var b=memo(S);var X=b;export{e as a,i as b,X as c};
1
+ import {p}from'./chunk-FEZOSRP2.js';import {Wa,Bc,cb}from'./chunk-ZTZOHMJ3.js';import {Tk,ya,xa,wa,Qj}from'./chunk-RNBTIRD7.js';import {memo,useId}from'react';import C from'@mui/material/Box';import O from'lodash/capitalize';import {useTranslation}from'react-i18next';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var D=styled(C,{shouldForwardProp:o=>o!=="tableMode"})(({theme:o,tableMode:t})=>({fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"4px 8px",borderRadius:"24px",border:`1px solid ${o.palette.divider}`,color:o.palette.text.primary,height:Wa(t)?"18px":"24px"}));var e={DESKTOP:wa,PHONE:xa,TABLET:ya,TERMINAL:Tk};var i=o=>!!e[o];function S({type:o,isTextShown:t,tableMode:T,...E}){let p$1=Bc(useId(),"device-icon"),{t:v}=useTranslation(),m=i(o)?e[o]:null;return jsx(p,{title:m?`Device - ${cb((o??"").toLowerCase())}`:v("unKnown"),children:t?jsx(D,{id:p$1,"data-testid":"DeviceIcon",tableMode:T,children:o?O(o):"Unknown"}):jsx(C,{...E,id:p$1,"data-testid":"DeviceIcon",component:"img",src:o?m||Qj:Qj,alt:o})})}var b=memo(S);var X=b;export{e as a,i as b,X as c};
@@ -1 +1 @@
1
- import {b}from'./chunk-CAZWVRDN.js';import {L,aa,B}from'./chunk-4Y2COEZC.js';import {Dc}from'./chunk-CZWXKHO7.js';import {Db,A}from'./chunk-2GSUGMI7.js';import ne,{memo,useState,useEffect}from'react';import P from'@mui/material/Box';import te from'@mui/material/InputAdornment';import oe from'@mui/material/Skeleton';import {styled,Popper,Box,ClickAwayListener}from'@mui/material';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {styled as styled$1}from'@mui/material/styles';var N=styled("button")(({theme:e,disabled:o})=>({display:"flex",gap:"4px",alignItems:"center",".logo":{width:"15.568px",height:"12px",borderRadius:"3px"},".arrow":{width:14,alignSelf:""},span:{color:e.palette.text.primary,fontWeight:500,fontSize:"11px",borderRadius:"2px"},cursor:o?"default":"pointer",opacity:o?.5:1,paddingTop:0,backgroundColor:"transparent",border:"none",paddingInlineStart:0,minWidth:70,marginTop:1})),_=styled(Popper)(({theme:e})=>({zIndex:9999,backgroundColor:e.palette.common.white,padding:"4px 8px",borderRadius:"4px",border:`1px solid ${e.palette.divider}`,width:100})),H=styled("ul")(()=>({listStyle:"none",padding:0,margin:0,maxHeight:100,overflow:"auto"})),q=styled("li")(({theme:e})=>({display:"flex",gap:"4px",alignItems:"center",".logo":{width:"15.568px",height:"10.889px",borderRadius:"3px"},".arrow":{width:14},span:{color:e.palette.text.primary,fontWeight:500,fontSize:"11px"},height:24,cursor:"pointer"})),z=styled(L)(()=>({flexGrow:1,maxWidth:"100%",height:24,padding:"4px",marginBottom:"4px"})),D=styled(Box)(()=>({color:"red !important"}));function G({isLoading:e,countries:o,value:n,onCountryChange:l,required:b,disabled:f}){let[a,C]=useState(),[u,g]=useState(null),[y,i]=useState([]),[I,S]=useState(""),s=!!u&&!f,w=t=>{t.stopPropagation(),g(t.currentTarget);},m=()=>{g(null);},L=t=>{l?.(t),C(t),m(),i(o);},k=t=>{let p=t.target.value.toString()??"";if(S(p),!p){i(o);return}let Y=o.filter(F=>F.idd_prefix.toString().startsWith(p)||F.iso2.toLowerCase().startsWith(p.toLowerCase()));i(Y);};return useEffect(()=>{n&&C(n);},[n?.countryId]),useEffect(()=>{o.length&&i(o);},[o.length]),jsxs(P,{"data-testid":"CountriesList",sx:{position:"relative"},children:[jsx(N,{type:"button","aria-describedby":"CountriesList_CountriesWrapper",onClick:w,disabled:e||f,children:e?jsx(oe,{variant:"rectangular",width:56.5,height:15,sx:{borderRadius:"4px"}}):jsxs(Fragment,{children:[a&&jsxs(Fragment,{children:[jsx("img",{src:a.logo,alt:"c",className:"logo"}),jsx(P,{component:"span",flex:1,children:`+${a?.idd_prefix}`})]}),b&&jsx(D,{component:"span",children:"*"}),jsx(P,{component:"img",src:Db,alt:"d",className:"arrow",sx:{...s&&{transform:"rotate(180deg)"}}})]})}),s&&jsx(B,{onClick:m,sx:{zIndex:9999}}),s&&jsx(ClickAwayListener,{onClickAway:m,children:jsxs(_,{id:"CountriesList_CountriesWrapper",open:s,anchorEl:u,"data-testid":"CountriesList_CountriesWrapper",placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[-8,6]}}],children:[jsx(z,{type:"number",endAdornment:jsx(te,{position:"end",children:jsx("img",{src:A,alt:"arrow"})}),onChange:k,hideArrows:true,disableFocusRing:true,"data-testid":"CountriesList_InputStyled",value:I}),jsx(H,{"data-testid":"CountriesList_CountriesListStyled",children:y.map(t=>{let p=a?.countryId===t.countryId;return jsxs(q,{onClick:()=>{L(t);},sx:{backgroundColor:p?"#F9F9F9":"transparent",color:p?"#000":"#8D8D94"},children:[jsx("img",{src:t.logo,alt:"c",className:"logo"}),jsx("span",{children:`+${t.idd_prefix}`})]},`country-code-${t.countryId}`)})})]})})]})}G.displayName="CountriesList";var V=memo(G);var v=V;styled$1(P,{shouldForwardProp:e=>!["feedbackType","hasFeedback"].includes(e)})(({theme:e,feedbackType:o,hasFeedback:n})=>{let{borderColor:l}=aa(e,o);return {border:`1px solid ${o?l:e.palette.divider}`,display:"flex",position:"relative",alignItems:"center",borderRadius:n?"4px 4px 0 0":"4px",borderBottom:n?"none":void 0}});var K=styled$1(b)({flexGrow:1,maxWidth:"100%",paddingInlineEnd:0,img:{cursor:"pointer"}});styled$1("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"}));styled$1(P)(()=>({flex:1}));function U({phoneValue:e,error:o,hasError:n,countries:l,isCountriesLoading:b,countryValue:f,onCountryChange:a,onPhoneChange:C,helperText:u,required:g,disabled:y,feedback:i,id:I="PhoneInput",...S},s){let w=t=>{a?.(t);},m=i?.message??u,{isProvided:L}=Dc(i,{message:m});return jsx(K,{id:I,type:"number",value:e,"data-testid":"PhoneInput",ref:s,disableFocusRing:true,inputProps:{autoComplete:"off"},error:(o??n??false)&&!L,disabled:y,feedback:i,helperText:u,startAdornment:jsx(v,{isLoading:b,countries:l,value:f,onCountryChange:w,required:g,disabled:y}),...S,onChange:C,hideArrows:true})}U.displayName="PhoneInput";var X=ne.forwardRef(U);export{v as a,X as b};
1
+ import {b}from'./chunk-BNHPA7NL.js';import {L,aa,B}from'./chunk-FEZOSRP2.js';import {Dc}from'./chunk-ZTZOHMJ3.js';import {Eb,A}from'./chunk-RNBTIRD7.js';import ne,{memo,useState,useEffect}from'react';import P from'@mui/material/Box';import te from'@mui/material/InputAdornment';import oe from'@mui/material/Skeleton';import {styled,Popper,Box,ClickAwayListener}from'@mui/material';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {styled as styled$1}from'@mui/material/styles';var N=styled("button")(({theme:e,disabled:o})=>({display:"flex",gap:"4px",alignItems:"center",".logo":{width:"15.568px",height:"12px",borderRadius:"3px"},".arrow":{width:14,alignSelf:""},span:{color:e.palette.text.primary,fontWeight:500,fontSize:"11px",borderRadius:"2px"},cursor:o?"default":"pointer",opacity:o?.5:1,paddingTop:0,backgroundColor:"transparent",border:"none",paddingInlineStart:0,minWidth:70,marginTop:1})),_=styled(Popper)(({theme:e})=>({zIndex:9999,backgroundColor:e.palette.common.white,padding:"4px 8px",borderRadius:"4px",border:`1px solid ${e.palette.divider}`,width:100})),H=styled("ul")(()=>({listStyle:"none",padding:0,margin:0,maxHeight:100,overflow:"auto"})),q=styled("li")(({theme:e})=>({display:"flex",gap:"4px",alignItems:"center",".logo":{width:"15.568px",height:"10.889px",borderRadius:"3px"},".arrow":{width:14},span:{color:e.palette.text.primary,fontWeight:500,fontSize:"11px"},height:24,cursor:"pointer"})),z=styled(L)(()=>({flexGrow:1,maxWidth:"100%",height:24,padding:"4px",marginBottom:"4px"})),D=styled(Box)(()=>({color:"red !important"}));function G({isLoading:e,countries:o,value:n,onCountryChange:l,required:b,disabled:f}){let[a,C]=useState(),[u,g]=useState(null),[y,i]=useState([]),[I,S]=useState(""),s=!!u&&!f,w=t=>{t.stopPropagation(),g(t.currentTarget);},m=()=>{g(null);},L=t=>{l?.(t),C(t),m(),i(o);},k=t=>{let p=t.target.value.toString()??"";if(S(p),!p){i(o);return}let Y=o.filter(F=>F.idd_prefix.toString().startsWith(p)||F.iso2.toLowerCase().startsWith(p.toLowerCase()));i(Y);};return useEffect(()=>{n&&C(n);},[n?.countryId]),useEffect(()=>{o.length&&i(o);},[o.length]),jsxs(P,{"data-testid":"CountriesList",sx:{position:"relative"},children:[jsx(N,{type:"button","aria-describedby":"CountriesList_CountriesWrapper",onClick:w,disabled:e||f,children:e?jsx(oe,{variant:"rectangular",width:56.5,height:15,sx:{borderRadius:"4px"}}):jsxs(Fragment,{children:[a&&jsxs(Fragment,{children:[jsx("img",{src:a.logo,alt:"c",className:"logo"}),jsx(P,{component:"span",flex:1,children:`+${a?.idd_prefix}`})]}),b&&jsx(D,{component:"span",children:"*"}),jsx(P,{component:"img",src:Eb,alt:"d",className:"arrow",sx:{...s&&{transform:"rotate(180deg)"}}})]})}),s&&jsx(B,{onClick:m,sx:{zIndex:9999}}),s&&jsx(ClickAwayListener,{onClickAway:m,children:jsxs(_,{id:"CountriesList_CountriesWrapper",open:s,anchorEl:u,"data-testid":"CountriesList_CountriesWrapper",placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[-8,6]}}],children:[jsx(z,{type:"number",endAdornment:jsx(te,{position:"end",children:jsx("img",{src:A,alt:"arrow"})}),onChange:k,hideArrows:true,disableFocusRing:true,"data-testid":"CountriesList_InputStyled",value:I}),jsx(H,{"data-testid":"CountriesList_CountriesListStyled",children:y.map(t=>{let p=a?.countryId===t.countryId;return jsxs(q,{onClick:()=>{L(t);},sx:{backgroundColor:p?"#F9F9F9":"transparent",color:p?"#000":"#8D8D94"},children:[jsx("img",{src:t.logo,alt:"c",className:"logo"}),jsx("span",{children:`+${t.idd_prefix}`})]},`country-code-${t.countryId}`)})})]})})]})}G.displayName="CountriesList";var V=memo(G);var v=V;styled$1(P,{shouldForwardProp:e=>!["feedbackType","hasFeedback"].includes(e)})(({theme:e,feedbackType:o,hasFeedback:n})=>{let{borderColor:l}=aa(e,o);return {border:`1px solid ${o?l:e.palette.divider}`,display:"flex",position:"relative",alignItems:"center",borderRadius:n?"4px 4px 0 0":"4px",borderBottom:n?"none":void 0}});var K=styled$1(b)({flexGrow:1,maxWidth:"100%",paddingInlineEnd:0,img:{cursor:"pointer"}});styled$1("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"}));styled$1(P)(()=>({flex:1}));function U({phoneValue:e,error:o,hasError:n,countries:l,isCountriesLoading:b,countryValue:f,onCountryChange:a,onPhoneChange:C,helperText:u,required:g,disabled:y,feedback:i,id:I="PhoneInput",...S},s){let w=t=>{a?.(t);},m=i?.message??u,{isProvided:L}=Dc(i,{message:m});return jsx(K,{id:I,type:"number",value:e,"data-testid":"PhoneInput",ref:s,disableFocusRing:true,inputProps:{autoComplete:"off"},error:(o??n??false)&&!L,disabled:y,feedback:i,helperText:u,startAdornment:jsx(v,{isLoading:b,countries:l,value:f,onCountryChange:w,required:g,disabled:y}),...S,onChange:C,hideArrows:true})}U.displayName="PhoneInput";var X=ne.forwardRef(U);export{v as a,X as b};
@@ -1 +1 @@
1
- import {Bc}from'./chunk-CZWXKHO7.js';import {Dn}from'./chunk-2GSUGMI7.js';import {useId}from'react';import f from'@mui/material/Stack';import a from'@mui/material/Box';import d from'@mui/material/Skeleton';import {jsx,jsxs}from'react/jsx-runtime';function h(){let o=Bc(useId(),"default-mf-widget-loader");return jsxs(f,{id:o,"data-testid":"DefaultMFWidgetLoader",height:"100%",borderRadius:"0 0 12px 12px",overflow:"hidden",children:[jsxs(f,{direction:"row",spacing:1,height:"4.1875rem",sx:{pb:"1.2rem",paddingInline:"32px",pt:"10px",background:g=>g.palette.background.transparent[0]},children:[jsx(d,{sx:{bgcolor:"gray.300"},variant:"rounded",width:60,height:31}),jsx(d,{sx:{bgcolor:"gray.300"},variant:"rounded",width:60,height:31}),jsx(d,{sx:{bgcolor:"gray.300"},variant:"rounded",width:60,height:31})]}),jsx(a,{flex:1,bgcolor:"#fff"})]})}var W=4;function x(){let o=Bc(useId(),"reports-mf-widget-loader");return jsx(f,{id:o,"data-testid":"ReportsMFWidgetLoader",height:"100%",borderRadius:"0 0 12px 12px",overflow:"hidden",sx:{padding:"8px 32px"},children:Array.from({length:W}).map((g,u)=>jsx(a,{children:jsxs(f,{direction:"row",spacing:1,sx:{py:1,height:56,borderTop:"1px solid rgb(242, 242, 242)"},children:[jsx(d,{variant:"rounded",width:32,height:32}),jsxs(a,{sx:{display:"flex",flexDirection:"column",gap:"4px"},children:[jsx(d,{width:80,height:12.29}),jsxs(a,{sx:{display:"flex",gap:"4px"},children:[jsx(d,{width:50,height:12.29}),jsx(d,{width:125,height:12.29})]})]})]})},u))})}var F=({appCode:o})=>o===Dn.reports.code||o===Dn.upload.code?jsx(x,{}):jsx(h,{}),c=F;var G=c;export{G as a};
1
+ import {Bc}from'./chunk-ZTZOHMJ3.js';import {Gn}from'./chunk-RNBTIRD7.js';import {useId}from'react';import f from'@mui/material/Stack';import a from'@mui/material/Box';import d from'@mui/material/Skeleton';import {jsx,jsxs}from'react/jsx-runtime';function h(){let o=Bc(useId(),"default-mf-widget-loader");return jsxs(f,{id:o,"data-testid":"DefaultMFWidgetLoader",height:"100%",borderRadius:"0 0 12px 12px",overflow:"hidden",children:[jsxs(f,{direction:"row",spacing:1,height:"4.1875rem",sx:{pb:"1.2rem",paddingInline:"32px",pt:"10px",background:g=>g.palette.background.transparent[0]},children:[jsx(d,{sx:{bgcolor:"gray.300"},variant:"rounded",width:60,height:31}),jsx(d,{sx:{bgcolor:"gray.300"},variant:"rounded",width:60,height:31}),jsx(d,{sx:{bgcolor:"gray.300"},variant:"rounded",width:60,height:31})]}),jsx(a,{flex:1,bgcolor:"#fff"})]})}var W=4;function x(){let o=Bc(useId(),"reports-mf-widget-loader");return jsx(f,{id:o,"data-testid":"ReportsMFWidgetLoader",height:"100%",borderRadius:"0 0 12px 12px",overflow:"hidden",sx:{padding:"8px 32px"},children:Array.from({length:W}).map((g,u)=>jsx(a,{children:jsxs(f,{direction:"row",spacing:1,sx:{py:1,height:56,borderTop:"1px solid rgb(242, 242, 242)"},children:[jsx(d,{variant:"rounded",width:32,height:32}),jsxs(a,{sx:{display:"flex",flexDirection:"column",gap:"4px"},children:[jsx(d,{width:80,height:12.29}),jsxs(a,{sx:{display:"flex",gap:"4px"},children:[jsx(d,{width:50,height:12.29}),jsx(d,{width:125,height:12.29})]})]})]})},u))})}var F=({appCode:o})=>o===Gn.reports.code||o===Gn.upload.code?jsx(x,{}):jsx(h,{}),c=F;var G=c;export{G as a};
@@ -0,0 +1 @@
1
+ import {b as b$1,a}from'./chunk-FEZOSRP2.js';import {nc}from'./chunk-ZTZOHMJ3.js';import {forwardRef,useState,useRef,useEffect,memo}from'react';import {styled,alpha,useTheme}from'@mui/material/styles';import {motion,AnimatePresence}from'framer-motion';import {useTranslation}from'react-i18next';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import st from'@mui/material/Box';var r="os-shared-SearchButton",e={root:`${r}-root`,field:`${r}-field`,clear:`${r}-clear`,clearIcon:`${r}-clearIcon`,trigger:`${r}-trigger`,triggerActive:`${r}-triggerActive`},n=12,l=30,E=32,I=30,m=200,b={duration:.18,ease:"easeInOut"},y={duration:.05,ease:"easeIn"},A=3,O=10,f=11,H=48;var L=t=>jsxs("svg",{width:n,height:n,viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",...t,children:[jsx("circle",{cx:"6",cy:"6",r:"4.25",stroke:"currentColor",strokeWidth:"1.2"}),jsx("path",{d:"M9.2 9.2L12 12",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]}),D=t=>jsx("svg",{width:"13",height:"13",viewBox:"0 0 13 13",fill:"none","aria-hidden":"true",...t,children:jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.69808 4.16259C8.78018 4.16065 8.86095 4.18356 8.92981 4.22833C8.99866 4.27309 9.05239 4.33762 9.08393 4.41344C9.11548 4.48927 9.12338 4.57286 9.10659 4.65325C9.08981 4.73365 9.04911 4.80708 8.98986 4.86395L7.07755 6.77626L8.98839 8.68713L8.98986 8.68854C9.02896 8.72608 9.06018 8.77105 9.08169 8.82081C9.1032 8.87057 9.11456 8.92413 9.11511 8.97833C9.11566 9.03254 9.10539 9.08631 9.0849 9.1365C9.06441 9.18669 9.03411 9.23229 8.99578 9.27062C8.95745 9.30895 8.91185 9.33925 8.86166 9.35974C8.81147 9.38023 8.7577 9.3905 8.70349 9.38995C8.64928 9.3894 8.59573 9.37804 8.54597 9.35653C8.49621 9.33502 8.45125 9.30379 8.41371 9.26469L6.50141 7.35239L4.59054 9.26323L4.58913 9.2647C4.55159 9.30381 4.50662 9.33502 4.45685 9.35653C4.40709 9.37804 4.35354 9.3894 4.29933 9.38995C4.24513 9.3905 4.19135 9.38023 4.14116 9.35974C4.09098 9.33925 4.04538 9.30895 4.00705 9.27062C3.96872 9.23229 3.93842 9.18669 3.91793 9.1365C3.89744 9.08631 3.88717 9.03254 3.88772 8.97833C3.88827 8.92413 3.89963 8.87057 3.92114 8.82081C3.94264 8.77105 3.97388 8.7261 4.01298 8.68855L5.92528 6.77626L4.01443 4.86539L4.01339 4.86438C3.95522 4.80788 3.91524 4.73531 3.89855 4.65596C3.88186 4.5766 3.88923 4.49407 3.91971 4.41893C3.95019 4.34379 4.00239 4.27945 4.06964 4.23414C4.13689 4.18884 4.21615 4.16462 4.29722 4.1646C4.30093 4.1646 4.30464 4.16465 4.30835 4.16475C4.35906 4.16614 4.4091 4.17699 4.45589 4.19678C4.5061 4.21801 4.55154 4.24911 4.58952 4.28822L6.50141 6.20012L8.41228 4.28928L8.4137 4.2878C8.43812 4.26236 8.4655 4.24043 8.49507 4.22235C8.55578 4.18521 8.62571 4.1643 8.69808 4.16259Z",fill:"currentColor"})});var U=styled(st)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"relative",zIndex:A,width:"fit-content",height:t.v2.spacing(32),gap:t.v2.spacing(8)})),k=styled(motion.input)(({theme:t})=>{let{base:i,grey:o,brand:s}=t.v2.palette;return {padding:t.v2.spacing(8),paddingRight:t.v2.spacing(24),borderRadius:t.v2.radius(4),height:t.v2.spacing(32),color:o[900],fontSize:t.v2.typography.textVariants.body.small.regular.fontSize,outline:0,position:"relative",zIndex:O,background:i.white,display:"flex",minWidth:0,flexGrow:0,flexShrink:0,boxShadow:`0px 0px 4px 0px ${alpha(s[500],.5)}`,border:`1px solid ${s[500]}`,willChange:"width","::placeholder":{color:"#D5D5D5"}}}),G=styled(motion.button)(({theme:t})=>({position:"absolute",zIndex:f,top:0,bottom:0,right:t.v2.spacing(H),marginBlock:"auto",width:t.v2.spacing(24),height:t.v2.spacing(24),padding:0,border:"none",background:"transparent",color:t.v2.palette.grey[500],cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"flex-end",lineHeight:0,[`& .${e.clearIcon}`]:{backgroundColor:t.v2.palette.grey[100],borderRadius:"50%"}})),F=styled(b$1)(({theme:t})=>{let{base:i}=t.v2.palette,o="linear-gradient(270deg, #147DC5 0.67%, #3DA6E1 98.91%)";return {position:"relative",zIndex:f,"&&":{boxSizing:"border-box",width:t.v2.spacing(l),minWidth:t.v2.spacing(l),height:t.v2.spacing(E),padding:0,borderWidth:"1px",borderStyle:"solid",borderRadius:t.v2.radius(4)},[`&& .${a.icon}`]:{width:t.v2.spacing(n),height:t.v2.spacing(n)},"&:hover":{opacity:.7},[`&&.${e.triggerActive}`]:{boxSizing:"border-box",width:t.v2.spacing(l),minWidth:t.v2.spacing(l),height:t.v2.spacing(E),padding:0,border:"1px solid transparent",backgroundColor:"transparent",backgroundImage:o,backgroundClip:"padding-box",backgroundOrigin:"padding-box",color:i.white,boxShadow:"none",outline:"none","&:hover, &:focus, &:focus-visible":{opacity:.8}}}});var X=forwardRef(({onSearchChange:t,placeholder:i,defaultValue:o,id:s,className:z,sx:V,disabled:M,title:K,"aria-label":Y},j)=>{let[c,S]=useState(!!o),[q,g]=useState(false),[p,h]=useState(o??""),B=useRef(null),d=useRef(false),J=useTheme(),{t:Q}=useTranslation(),R=i??(Q("search")||"");useEffect(()=>{h(o??""),S(!!o);},[o]),useEffect(()=>{if(!c){d.current=false;return}d.current&&(d.current=false,B.current?.focus());},[c]);let tt=()=>{g(true),S(false),t?.(""),h("");},et=()=>{p&&t?.(p);},ot=()=>{c||(d.current=true),g(false),S(true),et();},rt=T=>{T.key==="Enter"&&t?.(p);},nt=T=>{h(T.currentTarget.value);},at=c||q;return jsxs(U,{ref:j,id:s,className:nc(e.root,z),sx:V,"data-testid":s??"SearchButton",children:[jsx(AnimatePresence,{initial:false,onExitComplete:()=>g(false),children:c&&jsxs(Fragment,{children:[jsx(k,{ref:B,className:e.field,initial:{width:I},animate:{width:m},exit:{width:I,border:`1px solid ${J.v2.palette.grey[100]}`,boxShadow:"none"},transition:b,placeholder:R,value:p,onKeyDown:rt,onChange:nt,"aria-label":R||"Search"}),jsx(G,{className:e.clear,type:"button",initial:{opacity:1},exit:{opacity:0},transition:y,"aria-label":"Clear search",onClick:tt,children:jsx(D,{className:e.clearIcon})})]})}),jsx(F,{type:"button",variant:"secondary",icon:jsx(L,{}),"aria-label":Y??"Search",disabled:M,title:K,className:nc(e.trigger,at&&e.triggerActive),onClick:ot})]})});X.displayName="SearchButton";var Z=memo(X);export{e as a,Z as b};
@@ -1 +1 @@
1
- import {j,d,n}from'./chunk-4Y2COEZC.js';import {Wb,nc}from'./chunk-CZWXKHO7.js';import {Cj,Jj,Pe}from'./chunk-2GSUGMI7.js';import {forwardRef,useState,useCallback,useImperativeHandle,useEffect,useMemo,memo}from'react';import {useDropzone}from'react-dropzone';import {styled,alpha}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var i="os-shared-FileDropbox",e={root:`${i}-root`,header:`${i}-header`,title:`${i}-title`,format:`${i}-format`,zone:`${i}-zone`,content:`${i}-content`,textWrapper:`${i}-textWrapper`,maximum:`${i}-maximum`,upload:`${i}-upload`,uploadAgain:`${i}-uploadAgain`};var y=styled("div")(({theme:o})=>({textAlign:"center",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:o.v2.spacing(32)})),f=styled("div")(()=>({paddingInline:"40px"})),s=styled(j,{shouldForwardProp:o=>o!=="$isError"})(({theme:o,$isError:l})=>{let{base:n,error:b}=o.v2.palette;return {color:l?b[500]:n.black,fontSize:"18px",fontWeight:600,lineHeight:"20px",marginBottom:o.v2.spacing(8)}});styled(j)(({theme:o})=>{let{base:l}=o.v2.palette;return {color:alpha(l.black,.7),fontSize:"12px",fontWeight:500,lineHeight:"20px"}});var u=styled("div",{shouldForwardProp:o=>o!=="$width"})(({theme:o,$width:l})=>{let{grey:n}=o.v2.palette;return {width:l||431,minHeight:176,border:"1px dashed #DDDDDD",borderRadius:o.v2.radius(8),padding:"24px 0",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:n[50]}}),g=styled("div")(({theme:o})=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:o.v2.spacing(24),color:"inherit",fontSize:"14px",lineHeight:"20px",cursor:"default"})),I=styled("div")(({theme:o})=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:o.v2.spacing(8),color:"inherit"})),w=styled("div")(({theme:o})=>{let{base:l}=o.v2.palette;return {color:alpha(l.black,.7),fontSize:"12px",fontWeight:500,lineHeight:"20px"}}),O=styled("span")(()=>({fontWeight:600,textDecorationLine:"underline",cursor:"pointer"})),Q=styled("button")(({theme:o})=>{let{base:l,grey:n}=o.v2.palette;return {color:l.black,fontSize:"12px",fontWeight:500,lineHeight:"20px",padding:"4px 12px",borderRadius:o.v2.radius(4),border:`1px solid ${n[100]}`,backgroundColor:l.white,cursor:"pointer"}});var _=forwardRef(function({accept:l,footer:n$1,options:b,isLoading:S,progress:ee,error:P,errorHint:oe,subtitle:h,isSuccess:T,action:te,title:a,width:N,progressVariant:re,className:C,sx:$,id:d$1,invalidFileTypeText:R="Invalid file type",fileTooLargePrefix:j="File is larger than",uploadingText:le="Uploading...",waitText:ae="Please wait",uploadBulkFileText:ie="Upload bulk file",uploadAgainText:pe="Upload again",clickToUploadText:ne="Click to upload",orDragAndDropText:se="or drag and drop",maximumFileSizePrefix:de="Maximum file size",supportedFormatsPrefix:A="Supported formats"},xe){let[x,M]=useState([]),{getRootProps:ce,getInputProps:me,open:D,acceptedFiles:Z,isDragReject:E,fileRejections:m}=useDropzone(b),B=useCallback(()=>{M([]);},[]);useImperativeHandle(xe,()=>({open:D,clear:B}),[D,B]),useEffect(()=>{M(Z);},[Z]);let v=Wb(b?.maxSize||0,0).toUpperCase(),c=useMemo(()=>{let be=m.length>0&&m[0].errors.some(W=>W.code==="file-invalid-type"),De=m.length>0&&m[0].errors.some(W=>W.code==="file-too-large");return E||be?R:De?`${j} ${v}`:P},[E,P,m,v,R,j]),z=useMemo(()=>x.length?jsxs(I,{className:e.textWrapper,children:[jsx("span",{children:x[0].name}),jsx(w,{className:e.maximum,children:Wb(x[0].size)})]}):null,[x]);return T&&x.length&&!S?jsxs(y,{id:d$1,"data-testid":d$1??"FileDropbox",className:nc(e.root,C),sx:$,children:[jsxs(f,{className:e.header,children:[typeof a=="string"?jsx(s,{className:e.title,children:a}):a??jsx(s,{className:e.title,children:"File uploaded"}),h]}),jsx(u,{className:e.zone,$width:N,children:jsxs(g,{"data-slot":"content",className:e.content,children:[T&&jsx(d,{src:Cj,alt:"Upload complete",sx:{width:56,height:56}}),z]})}),n$1]}):S&&x.length?jsxs(y,{id:d$1,"data-testid":d$1??"FileDropbox",className:nc(e.root,C),sx:$,children:[jsxs(f,{className:e.header,children:[a&&typeof a!="string"?a:jsxs(Fragment,{children:[jsx(s,{className:e.title,children:typeof a=="string"?a:le}),jsx("span",{className:e.format,children:ae})]}),h]}),jsx(u,{className:e.zone,$width:N,children:jsxs(g,{"data-slot":"content",className:e.content,children:[S&&jsx(n,{size:56,value:ee,variant:re??"determinate"}),z]})}),n$1]}):jsxs(y,{id:d$1,"data-testid":d$1??"FileDropbox",className:nc(e.root,C),sx:$,children:[jsxs(f,{className:e.header,children:[c?jsx(s,{$isError:true,className:e.title,children:c}):typeof a=="string"?jsx(s,{className:e.title,children:a}):a??jsx(s,{className:e.title,children:ie}),h||!!c&&jsx("span",{className:e.format,children:`${A}: xls, xlsx`})]}),jsxs(u,{className:e.zone,$width:N,...ce(),children:[jsx("input",{...me()}),jsxs(g,{"data-slot":"content",className:e.content,children:[jsx(d,{src:c?Jj:Pe,alt:c?"Upload error":"Upload file",sx:{width:56,height:56}}),oe,z,te??jsx(Fragment,{children:c?jsx(Q,{type:"button",className:e.uploadAgain,onClick:D,children:pe}):jsxs(I,{className:e.textWrapper,children:[jsxs("span",{children:[jsx(O,{className:e.upload,onClick:D,children:ne})," ",se]}),jsxs(w,{className:e.maximum,children:[de," ",v]}),l&&jsxs("span",{className:e.format,children:[A," ",l]})]})})]})]}),n$1]})});_.displayName="FileDropbox";var L=memo(_);export{e as a,L as b};
1
+ import {j,d,n}from'./chunk-FEZOSRP2.js';import {Wb,nc}from'./chunk-ZTZOHMJ3.js';import {Dj,Kj,Qe}from'./chunk-RNBTIRD7.js';import {forwardRef,useState,useCallback,useImperativeHandle,useEffect,useMemo,memo}from'react';import {useDropzone}from'react-dropzone';import {styled,alpha}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var i="os-shared-FileDropbox",e={root:`${i}-root`,header:`${i}-header`,title:`${i}-title`,format:`${i}-format`,zone:`${i}-zone`,content:`${i}-content`,textWrapper:`${i}-textWrapper`,maximum:`${i}-maximum`,upload:`${i}-upload`,uploadAgain:`${i}-uploadAgain`};var y=styled("div")(({theme:o})=>({textAlign:"center",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:o.v2.spacing(32)})),f=styled("div")(()=>({paddingInline:"40px"})),s=styled(j,{shouldForwardProp:o=>o!=="$isError"})(({theme:o,$isError:l})=>{let{base:n,error:b}=o.v2.palette;return {color:l?b[500]:n.black,fontSize:"18px",fontWeight:600,lineHeight:"20px",marginBottom:o.v2.spacing(8)}});styled(j)(({theme:o})=>{let{base:l}=o.v2.palette;return {color:alpha(l.black,.7),fontSize:"12px",fontWeight:500,lineHeight:"20px"}});var u=styled("div",{shouldForwardProp:o=>o!=="$width"})(({theme:o,$width:l})=>{let{grey:n}=o.v2.palette;return {width:l||431,minHeight:176,border:"1px dashed #DDDDDD",borderRadius:o.v2.radius(8),padding:"24px 0",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:n[50]}}),g=styled("div")(({theme:o})=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:o.v2.spacing(24),color:"inherit",fontSize:"14px",lineHeight:"20px",cursor:"default"})),I=styled("div")(({theme:o})=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:o.v2.spacing(8),color:"inherit"})),w=styled("div")(({theme:o})=>{let{base:l}=o.v2.palette;return {color:alpha(l.black,.7),fontSize:"12px",fontWeight:500,lineHeight:"20px"}}),O=styled("span")(()=>({fontWeight:600,textDecorationLine:"underline",cursor:"pointer"})),Q=styled("button")(({theme:o})=>{let{base:l,grey:n}=o.v2.palette;return {color:l.black,fontSize:"12px",fontWeight:500,lineHeight:"20px",padding:"4px 12px",borderRadius:o.v2.radius(4),border:`1px solid ${n[100]}`,backgroundColor:l.white,cursor:"pointer"}});var _=forwardRef(function({accept:l,footer:n$1,options:b,isLoading:S,progress:ee,error:P,errorHint:oe,subtitle:h,isSuccess:T,action:te,title:a,width:N,progressVariant:re,className:C,sx:$,id:d$1,invalidFileTypeText:R="Invalid file type",fileTooLargePrefix:j="File is larger than",uploadingText:le="Uploading...",waitText:ae="Please wait",uploadBulkFileText:ie="Upload bulk file",uploadAgainText:pe="Upload again",clickToUploadText:ne="Click to upload",orDragAndDropText:se="or drag and drop",maximumFileSizePrefix:de="Maximum file size",supportedFormatsPrefix:A="Supported formats"},xe){let[x,M]=useState([]),{getRootProps:ce,getInputProps:me,open:D,acceptedFiles:Z,isDragReject:E,fileRejections:m}=useDropzone(b),B=useCallback(()=>{M([]);},[]);useImperativeHandle(xe,()=>({open:D,clear:B}),[D,B]),useEffect(()=>{M(Z);},[Z]);let v=Wb(b?.maxSize||0,0).toUpperCase(),c=useMemo(()=>{let be=m.length>0&&m[0].errors.some(W=>W.code==="file-invalid-type"),De=m.length>0&&m[0].errors.some(W=>W.code==="file-too-large");return E||be?R:De?`${j} ${v}`:P},[E,P,m,v,R,j]),z=useMemo(()=>x.length?jsxs(I,{className:e.textWrapper,children:[jsx("span",{children:x[0].name}),jsx(w,{className:e.maximum,children:Wb(x[0].size)})]}):null,[x]);return T&&x.length&&!S?jsxs(y,{id:d$1,"data-testid":d$1??"FileDropbox",className:nc(e.root,C),sx:$,children:[jsxs(f,{className:e.header,children:[typeof a=="string"?jsx(s,{className:e.title,children:a}):a??jsx(s,{className:e.title,children:"File uploaded"}),h]}),jsx(u,{className:e.zone,$width:N,children:jsxs(g,{"data-slot":"content",className:e.content,children:[T&&jsx(d,{src:Dj,alt:"Upload complete",sx:{width:56,height:56}}),z]})}),n$1]}):S&&x.length?jsxs(y,{id:d$1,"data-testid":d$1??"FileDropbox",className:nc(e.root,C),sx:$,children:[jsxs(f,{className:e.header,children:[a&&typeof a!="string"?a:jsxs(Fragment,{children:[jsx(s,{className:e.title,children:typeof a=="string"?a:le}),jsx("span",{className:e.format,children:ae})]}),h]}),jsx(u,{className:e.zone,$width:N,children:jsxs(g,{"data-slot":"content",className:e.content,children:[S&&jsx(n,{size:56,value:ee,variant:re??"determinate"}),z]})}),n$1]}):jsxs(y,{id:d$1,"data-testid":d$1??"FileDropbox",className:nc(e.root,C),sx:$,children:[jsxs(f,{className:e.header,children:[c?jsx(s,{$isError:true,className:e.title,children:c}):typeof a=="string"?jsx(s,{className:e.title,children:a}):a??jsx(s,{className:e.title,children:ie}),h||!!c&&jsx("span",{className:e.format,children:`${A}: xls, xlsx`})]}),jsxs(u,{className:e.zone,$width:N,...ce(),children:[jsx("input",{...me()}),jsxs(g,{"data-slot":"content",className:e.content,children:[jsx(d,{src:c?Kj:Qe,alt:c?"Upload error":"Upload file",sx:{width:56,height:56}}),oe,z,te??jsx(Fragment,{children:c?jsx(Q,{type:"button",className:e.uploadAgain,onClick:D,children:pe}):jsxs(I,{className:e.textWrapper,children:[jsxs("span",{children:[jsx(O,{className:e.upload,onClick:D,children:ne})," ",se]}),jsxs(w,{className:e.maximum,children:[de," ",v]}),l&&jsxs("span",{className:e.format,children:[A," ",l]})]})})]})]}),n$1]})});_.displayName="FileDropbox";var L=memo(_);export{e as a,L as b};
@@ -1 +1 @@
1
- import {L,ba,aa}from'./chunk-4Y2COEZC.js';import {Bc,Dc,mc,nc,Ya}from'./chunk-CZWXKHO7.js';import {forwardRef,useId,memo}from'react';import ee from'@mui/material/Box';import {styled,alpha,useTheme}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var n="os-shared-TextInput",s={root:`${n}-root`,field:`${n}-field`,label:`${n}-label`,input:`${n}-input`,helperText:`${n}-helperText`};var h=styled(ee)(()=>({display:"flex",flexDirection:"column",gap:"4px",width:"100%"}));function S(e,t){let{borderColor:o}=aa(e,t),r=e.v2.radius(4);return {borderColor:o,borderBottom:"none",borderRadius:`${r} ${r} 0 0`,"&:focus-within":{borderColor:o,boxShadow:"none"}}}var g=styled("small",{shouldForwardProp:e=>e!=="$error"})(({theme:e,$error:t})=>({color:t?e.palette.error.main:alpha(e.v2.palette.base.black,.6),fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"}));function C(e,t){let o=typeof e=="string"&&Ya(e)?e:void 0;return {resolvedLabel:o??t??void 0,resolvedPlaceholder:o&&typeof t=="string"?t:void 0}}var P=forwardRef(({onChange:e,error:t=false,helperText:o,feedback:r,label:i,placeholder:v,disabled:F,fullWidth:$=true,startAdornment:k,endAdornment:L$1,readOnly:w,inputProps:A,InputProps:E,InputLabelProps:ae,className:H,sx:B,id:l="TextInput",...R},W)=>{let O=useTheme(),D=Bc(useId(),"text-input"),M=Z=>{e?.(Z.target.value??"");},{isProvided:a,isVisible:V,type:z}=Dc(r),{resolvedLabel:_,resolvedPlaceholder:j}=C(i,v),m=!!t&&!a,{sx:q,startAdornment:G,endAdornment:J,readOnly:K,inputProps:Q,disabled:U}=E??{},X=V?S(O,z):{},Y=mc(mc(X,q),B);return jsxs(ee,{className:s.root,children:[jsx(h,{id:D,"data-testid":"TextInput",children:jsx(L,{id:l,...R,ref:W,label:_,placeholder:j,disabled:F??U,fullWidth:$,error:m,startAdornment:k??G,endAdornment:L$1??J,readOnly:w??K,inputProps:{...Q,...A},onChange:M,className:nc(s.field,H),sx:Y})}),a?jsx(ba,{...r}):null,!a&&o?jsx(g,{className:s.helperText,id:l?`${l}-helper-text`:void 0,$error:m,children:o}):null]})});P.displayName="TextInput";var N=memo(P);export{s as a,N as b};
1
+ import {L,ba,aa}from'./chunk-FEZOSRP2.js';import {Bc,Dc,mc,nc,Ya}from'./chunk-ZTZOHMJ3.js';import {forwardRef,useId,memo}from'react';import ee from'@mui/material/Box';import {styled,alpha,useTheme}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var n="os-shared-TextInput",s={root:`${n}-root`,field:`${n}-field`,label:`${n}-label`,input:`${n}-input`,helperText:`${n}-helperText`};var h=styled(ee)(()=>({display:"flex",flexDirection:"column",gap:"4px",width:"100%"}));function S(e,t){let{borderColor:o}=aa(e,t),r=e.v2.radius(4);return {borderColor:o,borderBottom:"none",borderRadius:`${r} ${r} 0 0`,"&:focus-within":{borderColor:o,boxShadow:"none"}}}var g=styled("small",{shouldForwardProp:e=>e!=="$error"})(({theme:e,$error:t})=>({color:t?e.palette.error.main:alpha(e.v2.palette.base.black,.6),fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"}));function C(e,t){let o=typeof e=="string"&&Ya(e)?e:void 0;return {resolvedLabel:o??t??void 0,resolvedPlaceholder:o&&typeof t=="string"?t:void 0}}var P=forwardRef(({onChange:e,error:t=false,helperText:o,feedback:r,label:i,placeholder:v,disabled:F,fullWidth:$=true,startAdornment:k,endAdornment:L$1,readOnly:w,inputProps:A,InputProps:E,InputLabelProps:ae,className:H,sx:B,id:l="TextInput",...R},W)=>{let O=useTheme(),D=Bc(useId(),"text-input"),M=Z=>{e?.(Z.target.value??"");},{isProvided:a,isVisible:V,type:z}=Dc(r),{resolvedLabel:_,resolvedPlaceholder:j}=C(i,v),m=!!t&&!a,{sx:q,startAdornment:G,endAdornment:J,readOnly:K,inputProps:Q,disabled:U}=E??{},X=V?S(O,z):{},Y=mc(mc(X,q),B);return jsxs(ee,{className:s.root,children:[jsx(h,{id:D,"data-testid":"TextInput",children:jsx(L,{id:l,...R,ref:W,label:_,placeholder:j,disabled:F??U,fullWidth:$,error:m,startAdornment:k??G,endAdornment:L$1??J,readOnly:w??K,inputProps:{...Q,...A},onChange:M,className:nc(s.field,H),sx:Y})}),a?jsx(ba,{...r}):null,!a&&o?jsx(g,{className:s.helperText,id:l?`${l}-helper-text`:void 0,$error:m,children:o}):null]})});P.displayName="TextInput";var N=memo(P);export{s as a,N as b};
@@ -1 +1 @@
1
- import {d,r as r$1}from'./chunk-4Y2COEZC.js';import {mc,nc}from'./chunk-CZWXKHO7.js';import {Sd,Xe}from'./chunk-2GSUGMI7.js';import {forwardRef,useMemo,memo}from'react';import {styled}from'@mui/material/styles';import {jsx,Fragment}from'react/jsx-runtime';var N="os-shared-Logo",r={root:`${N}-root`,skeleton:`${N}-skeleton`},C="logo";var I=styled(d)(({theme:n})=>({borderRadius:"50%",backgroundColor:n.palette.common.white}));var R=forwardRef(({className:n,sx:f,id:s,src:o,width:g=24,height:l=24,isError:e,isLoading:S,fallback:t,alt:P=C},U)=>{let m=useMemo(()=>typeof o!="string"&&!!o?.type?.includes("application/pdf"),[o]),d=useMemo(()=>o?typeof o=="string"?o:(window.URL?URL:webkitURL).createObjectURL(o):"",[o]),w=useMemo(()=>e||!o?typeof t=="string"&&t?t:Sd:m?Xe:d,[o,t,e,m,d]);return S?jsx(r$1,{variant:"circular",className:r.skeleton,sx:mc({width:g,height:l,flexShrink:0},f),"data-testid":s??"Logo"}):(e||!o)&&t!==void 0&&typeof t!="string"?jsx(Fragment,{children:t}):jsx(I,{ref:U,id:s,"data-testid":s??"Logo",alt:P,src:w,className:nc(r.root,n),sx:mc({width:g,height:l,objectFit:m&&o&&!e?"none":"contain"},f)})});R.displayName="Logo";var D=memo(R);export{r as a,D as b};
1
+ import {d,r as r$1}from'./chunk-FEZOSRP2.js';import {mc,nc}from'./chunk-ZTZOHMJ3.js';import {Td,Ye}from'./chunk-RNBTIRD7.js';import {forwardRef,useMemo,memo}from'react';import {styled}from'@mui/material/styles';import {jsx,Fragment}from'react/jsx-runtime';var N="os-shared-Logo",r={root:`${N}-root`,skeleton:`${N}-skeleton`},C="logo";var I=styled(d)(({theme:n})=>({borderRadius:"50%",backgroundColor:n.palette.common.white}));var R=forwardRef(({className:n,sx:f,id:s,src:o,width:g=24,height:l=24,isError:e,isLoading:S,fallback:t,alt:P=C},U)=>{let m=useMemo(()=>typeof o!="string"&&!!o?.type?.includes("application/pdf"),[o]),d=useMemo(()=>o?typeof o=="string"?o:(window.URL?URL:webkitURL).createObjectURL(o):"",[o]),w=useMemo(()=>e||!o?typeof t=="string"&&t?t:Td:m?Ye:d,[o,t,e,m,d]);return S?jsx(r$1,{variant:"circular",className:r.skeleton,sx:mc({width:g,height:l,flexShrink:0},f),"data-testid":s??"Logo"}):(e||!o)&&t!==void 0&&typeof t!="string"?jsx(Fragment,{children:t}):jsx(I,{ref:U,id:s,"data-testid":s??"Logo",alt:P,src:w,className:nc(r.root,n),sx:mc({width:g,height:l,objectFit:m&&o&&!e?"none":"contain"},f)})});R.displayName="Logo";var D=memo(R);export{r as a,D as b};
@@ -0,0 +1 @@
1
+ import {j,p,d as d$1}from'./chunk-FEZOSRP2.js';import {Bc}from'./chunk-ZTZOHMJ3.js';import {Bk,zk,xk,uk,kk,mk,Ck,jk,ik,Ak,Nh,ub,nk,sb,ok,qk,rk,wk,vk,pk}from'./chunk-RNBTIRD7.js';import {useId}from'react';import W from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var R={ABANDONED:Nh,IN_PROGRESS:Ck,VOID:Ak,CANCELLED:ik,CAPTURED:jk,INITIATED:Ck,FAILED:mk,DECLINED:kk,RESTRICTED:uk,TIMEDOUT:xk,UNKNOWN:zk,AUTHORIZED:Bk},O={UNKNOWN:{gatewayIcon:nk,acquirerIcon:ub,color:"#FF7A00",background:"#FF7A001A"},TIMEDOUT:{gatewayIcon:nk,acquirerIcon:ub,color:"#FF7A00",background:"#FFF3E5"},FAILED:{gatewayIcon:nk,acquirerIcon:ub,color:"#FF7A00",background:"#FFF3E5"},DECLINED:{gatewayIcon:ok,acquirerIcon:sb,color:"#FF3D00",background:"#FFEAE5"},RESTRICTED:{gatewayIcon:ok,acquirerIcon:sb,color:"#FF3D00",background:"#FFEAE5"},ABANDONED:{gatewayIcon:nk,acquirerIcon:ub,color:"#FFD600",background:"#FFFBE5"},CANCELLED:{gatewayIcon:nk,acquirerIcon:ub,color:"#FFD600",background:"#FFFBE5"},INITIATED:{color:"#8D8D94",background:"transparent",gatewayIcon:nk,acquirerIcon:ub}},K={PENDING:rk,REFUNDED:qk},M={PENDING:{color:"#FF7A00",backgroundColor:"#FF7A000D"},REFUNDED:{color:"#4E1FD0",backgroundColor:"#4E1FD00D"}},Z={PAID_OUT:pk,SETTLED:vk,PENDING:wk},_={AUTHORIZED:Bk},L={CAPTURED:{color:"#1F88D0",background:"#1F88D00D"}};var q=styled(W)(()=>({display:"flex",gap:"4px",alignItems:"center",justifyContent:"center",borderRadius:"56px",padding:"2px 4px",cursor:"default"})),U=styled(j)(({theme:r})=>({color:r.v2.palette.base.white,fontWeight:600,fontSize:"8px",padding:"3px 2.57px",borderRadius:"4px",lineHeight:"100%"}));function d({tooltip:r,status:e,statusCode:P}){let h=Bc(useId(),"status-label"),I=O[e]??L[e]??null;return jsx(p,{title:r,children:jsxs(q,{id:h,"data-testid":"StatusLabel",sx:{backgroundColor:I?.background||"transparent"},children:[jsx(d$1,{src:R[e]}),jsx(U,{sx:B=>({backgroundColor:I?.color||B.palette.info.dark}),children:P})]})})}var co=d;export{R as a,O as b,K as c,M as d,Z as e,_ as f,L as g,co as h};
@@ -1,2 +1,2 @@
1
- import {a}from'./chunk-HDCNWBW5.js';import {d,R as R$1,L as L$1,V,Q as Q$1}from'./chunk-4Y2COEZC.js';import {nc}from'./chunk-CZWXKHO7.js';import {Fb,A as A$1,Qc}from'./chunk-2GSUGMI7.js';import {forwardRef,useState,useEffect,useMemo,memo,useRef,useLayoutEffect,useId}from'react';import gt from'@mui/material/ClickAwayListener';import {CircularProgress}from'@mui/material';import L from'@mui/material/Box';import fe from'@mui/material/Typography';import {styled,alpha}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var y="os-shared-NestedMultiSelect",s={root:`${y}-root`,open:`${y}-open`,label:`${y}-label`,placeholder:`${y}-placeholder`,arrow:`${y}-arrow`,menu:`${y}-menu`,search:`${y}-search`,selectedBadge:`${y}-selectedBadge`,fieldRow:`${y}-fieldRow`},re=40,A="data-nested-submenu",$="data-nested-submenu-anchor",se={strategy:"fixed"},ce=.7,ae=100,pe={width:10,height:7.5,flexShrink:0},ue={width:9,height:9,flexShrink:0};var et={overflow:"hidden",flex:"0 0 auto",width:"max-content",maxWidth:"100%",minWidth:0},tt=e=>({display:"flex",padding:"4px 8px 4px 6px",alignItems:"center",gap:"4px",borderRadius:"13px",backgroundColor:e,fontSize:"10px",fontWeight:500,cursor:"pointer"}),me=styled(L,{shouldForwardProp:e=>e!=="$disabled"})(({theme:e,$disabled:t=false})=>{let{base:o}=e.v2.palette;return {width:"100%",boxSizing:"border-box",minHeight:47,textAlign:"left",flexDirection:"column",border:`1px solid ${t?"#FAFBFB":"transparent"}`,borderRadius:"4px",backgroundColor:t?"#FAFBFB":e.palette.grey[400],minWidth:"89px",position:"relative",cursor:t?"not-allowed":"pointer",...t&&{color:alpha(o.black,.6),[`& .${s.label}`]:{opacity:.7,cursor:"not-allowed"},[`& .${s.placeholder}`]:{color:alpha(o.black,.6)},[`& .${s.arrow}`]:{opacity:.6},[`& .${s.fieldRow}`]:{opacity:.7},[`& .${s.fieldRow} *`]:{cursor:"not-allowed"}},[`&.${s.open} .${s.arrow}`]:{transform:"rotate(180deg)"},[`&.${s.open} .${s.arrow} svg path, &:focus-within .${s.arrow} svg path`]:{fill:"#1F88D0",stroke:"#1F88D0"},[`&.${s.open}, &:focus-within`]:{border:"1px solid #1F88D0",boxShadow:"0px 0px 4px 0px #1F88D080"}}}),he=styled(fe)(({theme:e})=>({position:"absolute",top:9,left:8,margin:0,cursor:"pointer",fontSize:"10px",fontWeight:500,lineHeight:"100%",color:e.palette.grey[700],display:"block",pointerEvents:"none"})),Se=styled(fe)(()=>({margin:0,fontWeight:500,fontSize:"11px",lineHeight:"18px",padding:"22px 30px 8px 8px"})),Me=styled(L)(({theme:e})=>({position:"absolute",top:15,right:10,width:16,height:16,display:"inline-flex",alignItems:"center",justifyContent:"center",color:"inherit",lineHeight:0,transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter})})),ge=styled(L)(()=>({display:"flex",flexDirection:"column",padding:"8px"})),ot={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},nt={display:"flex",flexWrap:"wrap",alignItems:"center",alignContent:"flex-start",gap:"4px",width:"100%",minWidth:0},be=styled(L,{shouldForwardProp:e=>e!=="$field"})(({$field:e})=>({...nt,...e?{padding:"22px 30px 8px 8px"}:{marginBottom:"8px","&:empty":{display:"none"}}})),G=styled(L,{shouldForwardProp:e=>e!=="$field"})(({theme:e,$field:t})=>({...tt(`${e.palette.info.dark}1a`),...et,...t&&{cursor:"inherit"}})),xe=styled("span")(()=>ot),Ne=styled(L)(()=>({position:"relative",width:"100%",minWidth:0})),ye=styled(L)(()=>({flex:1,maxWidth:"220px",minWidth:"89px",fontWeight:500})),Ce=styled(L)(()=>({display:"flex",gap:"12px",justifyContent:"space-between",flexGrow:1,alignItems:"center",maxWidth:"340px",minWidth:"89px",fontWeight:500}));var R=e=>!e.options&&typeof e.value=="string";function ve(e,t,o){if(e===void 0)return R(o);if(typeof e=="boolean")return e;if(typeof e=="function")return e(t,o);let n=e[t];return typeof n=="boolean"?n:R(o)}var F=e=>e.value??e.label,T=(e,t)=>t?.some(o=>o.value===e.value)??false,Le=(e,t,o)=>{if(T(e,t)){o(t?.filter(n=>n.value!==e.value)||[]);return}o([...t||[],e]);},X=e=>R(e)?[e]:(e.options??[]).flatMap(X),q=(e,t)=>{let o=e.filter(n=>T(n,t)).length;return {allSelected:e.length>0&&o===e.length,someSelected:o>0&&o<e.length}},Oe=(e,t,o)=>{let n=new Set(e.map(i=>i.value));if(q(e,t).allSelected){o((t??[]).filter(i=>!n.has(i.value)));return}let l=new Set((t??[]).map(i=>i.value)),r=e.filter(i=>!l.has(i.value));o([...t??[],...r]);},lt=(e,t)=>{let o=e[t];return typeof o=="string"?o:typeof o=="number"&&Number.isFinite(o)?String(o):""},it=(e,t,o)=>o.some(n=>lt(e,n).toLowerCase().includes(t)),Re=(e,t,o)=>{let n=t.toLowerCase().trim();if(!n)return e.map(i=>({node:i,depth:0}));let l=[],r=(i,d)=>{for(let c of i){if(R(c)){it(c,n,o)&&l.push({node:c,depth:d});continue}r(c.options??[],d+1);}};return r(e,0),l},rt=(e,t="right")=>{let o=e?.closest(`.${Q$1.panel}`);if(!e||!o)return 0;let n=e.getBoundingClientRect(),l=o.getBoundingClientRect(),r=t.startsWith("left")?n.left-l.left:l.right-n.right;return Math.max(0,r)},Ee=e=>[{name:"flip",enabled:true,options:{rootBoundary:"viewport",padding:8,fallbackPlacements:["left-start","right-end","left-end"]}},{name:"preventOverflow",enabled:true,options:{rootBoundary:"viewport",altAxis:true,padding:8}},{name:"offset",options:{offset:({placement:t})=>[0,rt(e.current,t)]}}],We=(e,t)=>e.length===t.length&&e.every((o,n)=>o===t[n]);function Be(e,t,o){let n=[],l=0;for(let r of e){if(t<=0){n.push(void 0);continue}if(l===0&&r>=t){n.push(Math.floor(t));continue}let i=l===0?0:o;if(l+i+r<=t+.5){n.push(void 0),l+=i+r;continue}let d=Math.floor(t-l-i);if(d>=ae&&d>=r*ce){n.push(d),l=0;continue}n.push(void 0),l=r;}return n}var we=(e,t)=>t instanceof Node&&!!e?.contains(t),Ie=(e,t,o)=>{if(we(t,e)||we(o,e))return true;if(!(e instanceof Element)||!o)return false;let n=e.closest(`[${A}]`)?.getAttribute($),l=n?document.getElementById(n):null;return !!(l&&o.contains(l))};function at({options:e,variant:t,hiddenCount:o=0,onRemove:n}){let l=useRef(null),r=useRef([]),[i,d$1]=useState([]),c=e.length+(o>0?1:0),C=e.map(a=>a.label).join("\0");useLayoutEffect(()=>{let a=l.current;if(!a||c===0)return;let m=()=>{let x=r.current.slice(0,c).filter(p=>p!=null);if(x.length!==c)return;let M=x.map(p=>p.style.maxWidth);x.forEach(p=>{p.style.maxWidth="none";});let h=x.map(p=>p.getBoundingClientRect().width);x.forEach((p,j)=>{p.style.maxWidth=M[j];});let g=getComputedStyle(a),W=a.clientWidth-parseFloat(g.paddingLeft)-parseFloat(g.paddingRight),z=parseFloat(g.columnGap||g.gap||"0")||0,B=Be(h,W,z);d$1(p=>We(p,B)?p:B);};m();let v=new ResizeObserver(m);return v.observe(a),()=>v.disconnect()},[c,C,t]);let f=t==="field",b=a=>m=>{m.stopPropagation(),m.preventDefault(),n?.(a);},w=a=>m=>{r.current[a]=m;};return jsxs(be,{ref:l,$field:f,className:f?s.fieldRow:void 0,children:[e.map((a,m)=>jsxs(G,{ref:w(m),$field:f,className:f?void 0:s.selectedBadge,style:i[m]!=null?{maxWidth:i[m]}:void 0,onClick:f?void 0:b(a),children:[f?null:jsx(d,{src:Qc,alt:"",sx:pe}),jsx(xe,{children:a.label}),f?null:jsx(d,{src:Fb,alt:"",sx:ue})]},`${m}-${a.value}`)),o>0?jsx(G,{ref:w(e.length),$field:f,style:i[e.length]!=null?{maxWidth:i[e.length]}:void 0,children:jsxs("span",{children:["+",o]})}):null]})}var H=at;function pt({options:e,maxVisibleValues:t}){let n=typeof t=="number"&&Number.isFinite(t)?Math.max(0,Math.floor(t)):e.length,l=e.slice(0,n),r=e.length-l.length;return jsx(Ne,{children:jsx(H,{options:l,variant:"field",hiddenCount:r})})}var Ae=pt;var Fe=()=>jsx("svg",{width:"5",height:"8",viewBox:"0 0 5 8",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":true,style:{display:"block",flexShrink:0},children:jsx("path",{d:"M0.117188 0.504028C0.115307 0.426166 0.138248 0.350264 0.182617 0.286255C0.227088 0.222214 0.290458 0.173028 0.363281 0.144653C0.436073 0.116302 0.516047 0.109152 0.592773 0.124146C0.668745 0.138995 0.738375 0.176073 0.793945 0.229614L4.43164 3.63391C4.50662 3.70421 4.55078 3.80153 4.55078 3.90442C4.55064 4.00712 4.5065 4.10376 4.43164 4.17395L0.794922 7.57922L0.793945 7.57825C0.738766 7.63096 0.669812 7.66692 0.594727 7.68176C0.519097 7.69665 0.440194 7.69049 0.368164 7.66321C0.296002 7.63581 0.232474 7.58801 0.1875 7.52551C0.14262 7.463 0.11821 7.3886 0.118164 7.31165C0.118166 7.25986 0.12907 7.20846 0.150391 7.16125C0.171346 7.11493 0.201824 7.07367 0.239258 7.03918L3.58691 3.90442L0.239258 0.769653C0.164191 0.701295 0.119752 0.605686 0.117188 0.504028Z",fill:"#20232B",stroke:"#20232B",strokeWidth:"0.233333"})});function Ve({label:e,itemCount:t,isSelected:o,isIndeterminate:n,onToggle:l,children:r,isSelectable:i=false}){let d=useId(),c=useRef(null),C=useRef(null),f=useRef(null),b=useRef(null),[w,a]=useState(false),m=useMemo(()=>Ee(c),[]),v=()=>{b.current!=null&&(window.clearTimeout(b.current),b.current=null);},x=()=>{t!==0&&(v(),a(true));},M=h=>{Ie(h.relatedTarget,c.current,C.current)||(v(),b.current=window.setTimeout(()=>{b.current=null,a(false);},re));};return useEffect(()=>()=>{b.current!=null&&window.clearTimeout(b.current);},[]),useEffect(()=>{if(!w)return;let h=()=>f.current?.update();return document.addEventListener("scroll",h,true),window.addEventListener("resize",h),()=>{document.removeEventListener("scroll",h,true),window.removeEventListener("resize",h);}},[w]),jsxs(V,{id:d,ref:c,isSelected:o,isIndeterminate:n,startAdornment:i?void 0:null,onClick:h=>{if(h.stopPropagation(),h.preventDefault(),!i){x();return}l();},onMouseEnter:x,onMouseLeave:M,children:[jsxs(Ce,{children:[e,jsx(Fe,{})]}),jsx(R$1,{ref:C,popperRef:f,[A]:"",[$]:d,sx:{maxHeight:"min(450px, calc(100dvh - 16px))",overflow:"auto"},open:w,anchorEl:c.current,placement:"right-start",modifiers:m,popperOptions:se,onMouseEnter:x,onMouseLeave:M,children:r})]})}function je({option:e,value:t,onChange:o,isSelectable:n=true}){let l=T(e,t);return jsx(V,{isSelected:l,onClick:i=>{i.stopPropagation(),i.preventDefault(),n&&Le(e,t,o);},startAdornment:n?void 0:null,children:jsx(ye,{children:e.label})})}function Q({node:e,depth:t,value:o,onChange:n,isSelectable:l}){let r=ve(l,t,e);if(R(e))return jsx(je,{option:e,value:o,onChange:n,isSelectable:r});if(!e.options)return null;let i=e.options,d=X(e),{allSelected:c,someSelected:C}=q(d,o);return jsx(Ve,{label:e.label,itemCount:i.length,isSelected:c,isIndeterminate:C,isSelectable:r,onToggle:()=>Oe(d,o,n),children:i.map(f=>jsx(Q,{node:f,depth:t+1,value:o,onChange:n,isSelectable:l},F(f)))})}var bt=["label"],Xe=forwardRef(({options:e,onChange:t,value:o,maxVisibleValues:n,placeholder:l,label:r,isLoading:i,isSelectable:d$1,disabled:c,className:C,sx:f,isSearchable:b=true,searchPlaceholder:w,searchBy:a$1=bt,onOpen:m,onClose:v},x)=>{let[M,h]=useState(null),[g,W]=useState(""),[z,B]=useState(void 0),p=!!M,j=r??l,qe=r?l??"Please Select":"Please Select";useEffect(()=>{if(!M)return;let u=()=>{let K=M.clientWidth;K>0&&B(_=>_===K?_:K);};if(u(),typeof ResizeObserver>"u")return;let O=new ResizeObserver(u);return O.observe(M),()=>O.disconnect()},[M]);let Ze=M?.clientWidth||z,Je=u=>{if(p){h(null),v?.();return}h(u.currentTarget),m?.();},Qe=()=>{h(null),v?.();},Ue=()=>{g&&W("");},Ye=useMemo(()=>Re(e,g,a$1),[e,g,a$1]),Y=o?.length??0,_e=i?jsx(CircularProgress,{size:16}):jsx(d,{src:g?Fb:A$1,alt:g?"close":"search",onClick:Ue,sx:{width:12,height:12,cursor:g?"pointer":"default"}});return jsx(gt,{onClickAway:()=>{p&&Qe();},children:jsxs(me,{ref:x,id:"FieldWrapper","data-testid":"NestedMultiSelect",$disabled:c,"aria-disabled":c||void 0,className:nc(s.root,p&&s.open,C),sx:f,onClick:u=>!c&&Je(u),children:[jsx(he,{className:s.label,component:"label",children:j}),Y===0&&jsx(Se,{className:s.placeholder,component:"p",children:qe}),jsx(Me,{className:s.arrow,"aria-hidden":true,children:i?jsx(CircularProgress,{size:16}):jsx(a,{})}),Y>0&&o?jsx(Ae,{options:o,maxVisibleValues:n}):null,jsx(R$1,{open:p,anchorEl:M,sx:{margin:"8px 0",maxHeight:330,overflow:"auto",width:Ze},panelProps:{className:s.menu},children:jsxs(ge,{children:[b?jsx(L$1,{className:s.search,fullWidth:true,size:"md",placeholder:w??l??"Select",endAdornment:_e,value:g,onClick:u=>{u.stopPropagation();},onMouseDown:u=>{u.stopPropagation();},onChange:u=>{W(u.target.value);},sx:{mb:"8px"}}):null,jsx(H,{options:o??[],variant:"menu",onRemove:u=>{t(o?.filter(O=>O.value!==u.value)||[]);}}),Ye.map(({node:u,depth:O})=>jsx(Q,{node:u,depth:O,value:o,onChange:t,isSelectable:d$1},F(u)))]})})]})})});Xe.displayName="NestedMultiSelect";var xt=memo(Xe);
1
+ import {a}from'./chunk-HDCNWBW5.js';import {d,R as R$1,L as L$1,V,Q as Q$1}from'./chunk-FEZOSRP2.js';import {nc}from'./chunk-ZTZOHMJ3.js';import {Gb,A as A$1,Rc}from'./chunk-RNBTIRD7.js';import {forwardRef,useState,useEffect,useMemo,memo,useRef,useLayoutEffect,useId}from'react';import gt from'@mui/material/ClickAwayListener';import {CircularProgress}from'@mui/material';import L from'@mui/material/Box';import fe from'@mui/material/Typography';import {styled,alpha}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var y="os-shared-NestedMultiSelect",s={root:`${y}-root`,open:`${y}-open`,label:`${y}-label`,placeholder:`${y}-placeholder`,arrow:`${y}-arrow`,menu:`${y}-menu`,search:`${y}-search`,selectedBadge:`${y}-selectedBadge`,fieldRow:`${y}-fieldRow`},re=40,A="data-nested-submenu",$="data-nested-submenu-anchor",se={strategy:"fixed"},ce=.7,ae=100,pe={width:10,height:7.5,flexShrink:0},ue={width:9,height:9,flexShrink:0};var et={overflow:"hidden",flex:"0 0 auto",width:"max-content",maxWidth:"100%",minWidth:0},tt=e=>({display:"flex",padding:"4px 8px 4px 6px",alignItems:"center",gap:"4px",borderRadius:"13px",backgroundColor:e,fontSize:"10px",fontWeight:500,cursor:"pointer"}),me=styled(L,{shouldForwardProp:e=>e!=="$disabled"})(({theme:e,$disabled:t=false})=>{let{base:o}=e.v2.palette;return {width:"100%",boxSizing:"border-box",minHeight:47,textAlign:"left",flexDirection:"column",border:`1px solid ${t?"#FAFBFB":"transparent"}`,borderRadius:"4px",backgroundColor:t?"#FAFBFB":e.palette.grey[400],minWidth:"89px",position:"relative",cursor:t?"not-allowed":"pointer",...t&&{color:alpha(o.black,.6),[`& .${s.label}`]:{opacity:.7,cursor:"not-allowed"},[`& .${s.placeholder}`]:{color:alpha(o.black,.6)},[`& .${s.arrow}`]:{opacity:.6},[`& .${s.fieldRow}`]:{opacity:.7},[`& .${s.fieldRow} *`]:{cursor:"not-allowed"}},[`&.${s.open} .${s.arrow}`]:{transform:"rotate(180deg)"},[`&.${s.open} .${s.arrow} svg path, &:focus-within .${s.arrow} svg path`]:{fill:"#1F88D0",stroke:"#1F88D0"},[`&.${s.open}, &:focus-within`]:{border:"1px solid #1F88D0",boxShadow:"0px 0px 4px 0px #1F88D080"}}}),he=styled(fe)(({theme:e})=>({position:"absolute",top:9,left:8,margin:0,cursor:"pointer",fontSize:"10px",fontWeight:500,lineHeight:"100%",color:e.palette.grey[700],display:"block",pointerEvents:"none"})),Se=styled(fe)(()=>({margin:0,fontWeight:500,fontSize:"11px",lineHeight:"18px",padding:"22px 30px 8px 8px"})),Me=styled(L)(({theme:e})=>({position:"absolute",top:15,right:10,width:16,height:16,display:"inline-flex",alignItems:"center",justifyContent:"center",color:"inherit",lineHeight:0,transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter})})),ge=styled(L)(()=>({display:"flex",flexDirection:"column",padding:"8px"})),ot={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},nt={display:"flex",flexWrap:"wrap",alignItems:"center",alignContent:"flex-start",gap:"4px",width:"100%",minWidth:0},be=styled(L,{shouldForwardProp:e=>e!=="$field"})(({$field:e})=>({...nt,...e?{padding:"22px 30px 8px 8px"}:{marginBottom:"8px","&:empty":{display:"none"}}})),G=styled(L,{shouldForwardProp:e=>e!=="$field"})(({theme:e,$field:t})=>({...tt(`${e.palette.info.dark}1a`),...et,...t&&{cursor:"inherit"}})),xe=styled("span")(()=>ot),Ne=styled(L)(()=>({position:"relative",width:"100%",minWidth:0})),ye=styled(L)(()=>({flex:1,maxWidth:"220px",minWidth:"89px",fontWeight:500})),Ce=styled(L)(()=>({display:"flex",gap:"12px",justifyContent:"space-between",flexGrow:1,alignItems:"center",maxWidth:"340px",minWidth:"89px",fontWeight:500}));var R=e=>!e.options&&typeof e.value=="string";function ve(e,t,o){if(e===void 0)return R(o);if(typeof e=="boolean")return e;if(typeof e=="function")return e(t,o);let n=e[t];return typeof n=="boolean"?n:R(o)}var F=e=>e.value??e.label,T=(e,t)=>t?.some(o=>o.value===e.value)??false,Le=(e,t,o)=>{if(T(e,t)){o(t?.filter(n=>n.value!==e.value)||[]);return}o([...t||[],e]);},X=e=>R(e)?[e]:(e.options??[]).flatMap(X),q=(e,t)=>{let o=e.filter(n=>T(n,t)).length;return {allSelected:e.length>0&&o===e.length,someSelected:o>0&&o<e.length}},Oe=(e,t,o)=>{let n=new Set(e.map(i=>i.value));if(q(e,t).allSelected){o((t??[]).filter(i=>!n.has(i.value)));return}let l=new Set((t??[]).map(i=>i.value)),r=e.filter(i=>!l.has(i.value));o([...t??[],...r]);},lt=(e,t)=>{let o=e[t];return typeof o=="string"?o:typeof o=="number"&&Number.isFinite(o)?String(o):""},it=(e,t,o)=>o.some(n=>lt(e,n).toLowerCase().includes(t)),Re=(e,t,o)=>{let n=t.toLowerCase().trim();if(!n)return e.map(i=>({node:i,depth:0}));let l=[],r=(i,d)=>{for(let c of i){if(R(c)){it(c,n,o)&&l.push({node:c,depth:d});continue}r(c.options??[],d+1);}};return r(e,0),l},rt=(e,t="right")=>{let o=e?.closest(`.${Q$1.panel}`);if(!e||!o)return 0;let n=e.getBoundingClientRect(),l=o.getBoundingClientRect(),r=t.startsWith("left")?n.left-l.left:l.right-n.right;return Math.max(0,r)},Ee=e=>[{name:"flip",enabled:true,options:{rootBoundary:"viewport",padding:8,fallbackPlacements:["left-start","right-end","left-end"]}},{name:"preventOverflow",enabled:true,options:{rootBoundary:"viewport",altAxis:true,padding:8}},{name:"offset",options:{offset:({placement:t})=>[0,rt(e.current,t)]}}],We=(e,t)=>e.length===t.length&&e.every((o,n)=>o===t[n]);function Be(e,t,o){let n=[],l=0;for(let r of e){if(t<=0){n.push(void 0);continue}if(l===0&&r>=t){n.push(Math.floor(t));continue}let i=l===0?0:o;if(l+i+r<=t+.5){n.push(void 0),l+=i+r;continue}let d=Math.floor(t-l-i);if(d>=ae&&d>=r*ce){n.push(d),l=0;continue}n.push(void 0),l=r;}return n}var we=(e,t)=>t instanceof Node&&!!e?.contains(t),Ie=(e,t,o)=>{if(we(t,e)||we(o,e))return true;if(!(e instanceof Element)||!o)return false;let n=e.closest(`[${A}]`)?.getAttribute($),l=n?document.getElementById(n):null;return !!(l&&o.contains(l))};function at({options:e,variant:t,hiddenCount:o=0,onRemove:n}){let l=useRef(null),r=useRef([]),[i,d$1]=useState([]),c=e.length+(o>0?1:0),C=e.map(a=>a.label).join("\0");useLayoutEffect(()=>{let a=l.current;if(!a||c===0)return;let m=()=>{let x=r.current.slice(0,c).filter(p=>p!=null);if(x.length!==c)return;let M=x.map(p=>p.style.maxWidth);x.forEach(p=>{p.style.maxWidth="none";});let h=x.map(p=>p.getBoundingClientRect().width);x.forEach((p,j)=>{p.style.maxWidth=M[j];});let g=getComputedStyle(a),W=a.clientWidth-parseFloat(g.paddingLeft)-parseFloat(g.paddingRight),z=parseFloat(g.columnGap||g.gap||"0")||0,B=Be(h,W,z);d$1(p=>We(p,B)?p:B);};m();let v=new ResizeObserver(m);return v.observe(a),()=>v.disconnect()},[c,C,t]);let f=t==="field",b=a=>m=>{m.stopPropagation(),m.preventDefault(),n?.(a);},w=a=>m=>{r.current[a]=m;};return jsxs(be,{ref:l,$field:f,className:f?s.fieldRow:void 0,children:[e.map((a,m)=>jsxs(G,{ref:w(m),$field:f,className:f?void 0:s.selectedBadge,style:i[m]!=null?{maxWidth:i[m]}:void 0,onClick:f?void 0:b(a),children:[f?null:jsx(d,{src:Rc,alt:"",sx:pe}),jsx(xe,{children:a.label}),f?null:jsx(d,{src:Gb,alt:"",sx:ue})]},`${m}-${a.value}`)),o>0?jsx(G,{ref:w(e.length),$field:f,style:i[e.length]!=null?{maxWidth:i[e.length]}:void 0,children:jsxs("span",{children:["+",o]})}):null]})}var H=at;function pt({options:e,maxVisibleValues:t}){let n=typeof t=="number"&&Number.isFinite(t)?Math.max(0,Math.floor(t)):e.length,l=e.slice(0,n),r=e.length-l.length;return jsx(Ne,{children:jsx(H,{options:l,variant:"field",hiddenCount:r})})}var Ae=pt;var Fe=()=>jsx("svg",{width:"5",height:"8",viewBox:"0 0 5 8",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":true,style:{display:"block",flexShrink:0},children:jsx("path",{d:"M0.117188 0.504028C0.115307 0.426166 0.138248 0.350264 0.182617 0.286255C0.227088 0.222214 0.290458 0.173028 0.363281 0.144653C0.436073 0.116302 0.516047 0.109152 0.592773 0.124146C0.668745 0.138995 0.738375 0.176073 0.793945 0.229614L4.43164 3.63391C4.50662 3.70421 4.55078 3.80153 4.55078 3.90442C4.55064 4.00712 4.5065 4.10376 4.43164 4.17395L0.794922 7.57922L0.793945 7.57825C0.738766 7.63096 0.669812 7.66692 0.594727 7.68176C0.519097 7.69665 0.440194 7.69049 0.368164 7.66321C0.296002 7.63581 0.232474 7.58801 0.1875 7.52551C0.14262 7.463 0.11821 7.3886 0.118164 7.31165C0.118166 7.25986 0.12907 7.20846 0.150391 7.16125C0.171346 7.11493 0.201824 7.07367 0.239258 7.03918L3.58691 3.90442L0.239258 0.769653C0.164191 0.701295 0.119752 0.605686 0.117188 0.504028Z",fill:"#20232B",stroke:"#20232B",strokeWidth:"0.233333"})});function Ve({label:e,itemCount:t,isSelected:o,isIndeterminate:n,onToggle:l,children:r,isSelectable:i=false}){let d=useId(),c=useRef(null),C=useRef(null),f=useRef(null),b=useRef(null),[w,a]=useState(false),m=useMemo(()=>Ee(c),[]),v=()=>{b.current!=null&&(window.clearTimeout(b.current),b.current=null);},x=()=>{t!==0&&(v(),a(true));},M=h=>{Ie(h.relatedTarget,c.current,C.current)||(v(),b.current=window.setTimeout(()=>{b.current=null,a(false);},re));};return useEffect(()=>()=>{b.current!=null&&window.clearTimeout(b.current);},[]),useEffect(()=>{if(!w)return;let h=()=>f.current?.update();return document.addEventListener("scroll",h,true),window.addEventListener("resize",h),()=>{document.removeEventListener("scroll",h,true),window.removeEventListener("resize",h);}},[w]),jsxs(V,{id:d,ref:c,isSelected:o,isIndeterminate:n,startAdornment:i?void 0:null,onClick:h=>{if(h.stopPropagation(),h.preventDefault(),!i){x();return}l();},onMouseEnter:x,onMouseLeave:M,children:[jsxs(Ce,{children:[e,jsx(Fe,{})]}),jsx(R$1,{ref:C,popperRef:f,[A]:"",[$]:d,sx:{maxHeight:"min(450px, calc(100dvh - 16px))",overflow:"auto"},open:w,anchorEl:c.current,placement:"right-start",modifiers:m,popperOptions:se,onMouseEnter:x,onMouseLeave:M,children:r})]})}function je({option:e,value:t,onChange:o,isSelectable:n=true}){let l=T(e,t);return jsx(V,{isSelected:l,onClick:i=>{i.stopPropagation(),i.preventDefault(),n&&Le(e,t,o);},startAdornment:n?void 0:null,children:jsx(ye,{children:e.label})})}function Q({node:e,depth:t,value:o,onChange:n,isSelectable:l}){let r=ve(l,t,e);if(R(e))return jsx(je,{option:e,value:o,onChange:n,isSelectable:r});if(!e.options)return null;let i=e.options,d=X(e),{allSelected:c,someSelected:C}=q(d,o);return jsx(Ve,{label:e.label,itemCount:i.length,isSelected:c,isIndeterminate:C,isSelectable:r,onToggle:()=>Oe(d,o,n),children:i.map(f=>jsx(Q,{node:f,depth:t+1,value:o,onChange:n,isSelectable:l},F(f)))})}var bt=["label"],Xe=forwardRef(({options:e,onChange:t,value:o,maxVisibleValues:n,placeholder:l,label:r,isLoading:i,isSelectable:d$1,disabled:c,className:C,sx:f,isSearchable:b=true,searchPlaceholder:w,searchBy:a$1=bt,onOpen:m,onClose:v},x)=>{let[M,h]=useState(null),[g,W]=useState(""),[z,B]=useState(void 0),p=!!M,j=r??l,qe=r?l??"Please Select":"Please Select";useEffect(()=>{if(!M)return;let u=()=>{let K=M.clientWidth;K>0&&B(_=>_===K?_:K);};if(u(),typeof ResizeObserver>"u")return;let O=new ResizeObserver(u);return O.observe(M),()=>O.disconnect()},[M]);let Ze=M?.clientWidth||z,Je=u=>{if(p){h(null),v?.();return}h(u.currentTarget),m?.();},Qe=()=>{h(null),v?.();},Ue=()=>{g&&W("");},Ye=useMemo(()=>Re(e,g,a$1),[e,g,a$1]),Y=o?.length??0,_e=i?jsx(CircularProgress,{size:16}):jsx(d,{src:g?Gb:A$1,alt:g?"close":"search",onClick:Ue,sx:{width:12,height:12,cursor:g?"pointer":"default"}});return jsx(gt,{onClickAway:()=>{p&&Qe();},children:jsxs(me,{ref:x,id:"FieldWrapper","data-testid":"NestedMultiSelect",$disabled:c,"aria-disabled":c||void 0,className:nc(s.root,p&&s.open,C),sx:f,onClick:u=>!c&&Je(u),children:[jsx(he,{className:s.label,component:"label",children:j}),Y===0&&jsx(Se,{className:s.placeholder,component:"p",children:qe}),jsx(Me,{className:s.arrow,"aria-hidden":true,children:i?jsx(CircularProgress,{size:16}):jsx(a,{})}),Y>0&&o?jsx(Ae,{options:o,maxVisibleValues:n}):null,jsx(R$1,{open:p,anchorEl:M,sx:{margin:"8px 0",maxHeight:330,overflow:"auto",width:Ze},panelProps:{className:s.menu},children:jsxs(ge,{children:[b?jsx(L$1,{className:s.search,fullWidth:true,size:"md",placeholder:w??l??"Select",endAdornment:_e,value:g,onClick:u=>{u.stopPropagation();},onMouseDown:u=>{u.stopPropagation();},onChange:u=>{W(u.target.value);},sx:{mb:"8px"}}):null,jsx(H,{options:o??[],variant:"menu",onRemove:u=>{t(o?.filter(O=>O.value!==u.value)||[]);}}),Ye.map(({node:u,depth:O})=>jsx(Q,{node:u,depth:O,value:o,onChange:t,isSelectable:d$1},F(u)))]})})]})})});Xe.displayName="NestedMultiSelect";var xt=memo(Xe);
2
2
  export{s as a,xt as b};
@@ -1 +1 @@
1
- import {nc}from'./chunk-CZWXKHO7.js';import {forwardRef,useState,memo}from'react';import {ResponsiveContainer,AreaChart,CartesianGrid,XAxis,YAxis,Tooltip,Area}from'recharts';import {useTheme,alpha}from'@mui/material/styles';import {styled,Box,Typography}from'@mui/material';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var l="os-shared-AreaChart",o={root:`${l}-root`,tooltip:`${l}-tooltip`,tooltipTitle:`${l}-tooltipTitle`,tooltipValue:`${l}-tooltipValue`,loading:`${l}-loading`,legend:`${l}-legend`};var G=styled(Box)(()=>({width:"100%",height:"100%",display:"flex",flexDirection:"column"})),B=styled(Box)(({theme:t})=>({flex:1,minHeight:0,position:"relative","& svg:focus":{outline:"none"},"& svg:focus-visible":{outline:`2px solid ${t.v2.palette.interactive.primary.default}`}})),F=styled(Box)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"center",flexWrap:"wrap",gap:t.v2.spacing(12),paddingTop:t.v2.spacing(8)})),H=styled(Box)(({theme:t})=>({...t.v2.typography.textVariants.body.small.medium,display:"inline-flex",alignItems:"center",gap:t.v2.spacing(4),color:t.v2.palette.foreground.secondary,whiteSpace:"nowrap"})),m=styled("span")(({$color:t})=>({width:8,height:8,borderRadius:"50%",backgroundColor:t,flexShrink:0})),O=styled(Box)(({theme:t})=>({width:"auto",display:"inline-block",whiteSpace:"nowrap",backgroundColor:t.v2.palette.background.primary,padding:t.v2.spacing(6),border:`1.5px solid ${t.v2.palette.border.default}`,borderRadius:t.v2.radius(8),backdropFilter:t.v2.blur[24],boxShadow:t.v2.elevation[200]})),W=styled(Typography)(({theme:t})=>({...t.v2.typography.textVariants.caption.medium,width:"auto",marginBottom:t.v2.spacing(4),color:t.v2.palette.foreground.secondary,whiteSpace:"nowrap",overflow:"visible"})),M=styled(Typography)(({theme:t})=>({...t.v2.typography.textVariants.body.small.semibold,display:"flex",alignItems:"center",gap:t.v2.spacing(5),color:t.v2.palette.foreground.primary,whiteSpace:"nowrap",overflow:"visible",width:"auto"}));var pt=[{dataKey:30},{dataKey:32.9941},{dataKey:39.0471},{dataKey:56.3412},{dataKey:69.3118},{dataKey:87.4706},{dataKey:94.3882},{dataKey:110.406}],dt=()=>jsx(ResponsiveContainer,{className:o.loading,children:jsxs(AreaChart,{margin:{top:40},data:pt,children:[jsx("defs",{children:jsxs("linearGradient",{id:"areaChartLoadingGradient",x1:"0",y1:"0",x2:"0",y2:"1",gradientUnits:"objectBoundingBox",children:[jsx("stop",{offset:"0.54",stopColor:"rgba(67, 67, 67, 0.035)"}),jsx("stop",{offset:"1",stopColor:"rgba(255, 255, 255, 0)"})]})}),jsx(Area,{dataKey:"dataKey",type:"linear",fill:"url(#areaChartLoadingGradient)",fillOpacity:1,stroke:"#C2C2C2",strokeWidth:1,strokeLinecap:"round",strokeDasharray:"4 4",activeDot:false})]})}),b=dt;var ct=({active:t,payload:n,series:h,formatValue:f,formatTitle:x})=>{if(!t||!n?.length)return null;let y=n[0]?.payload??{};return jsxs(O,{className:o.tooltip,children:[jsx(W,{className:o.tooltipTitle,children:x(y)}),n.map((p,S)=>{let s=String(p.dataKey??""),C=h.find(v=>v.key===s);return jsxs(M,{className:o.tooltipValue,children:[jsx(m,{$color:C?.color??p.color}),jsx("span",{children:C?.label??s}),jsx("span",{children:f(p.value,s,y)})]},`${s}-${S}`)})]})},X=ct;var bt="areaChartStack",Tt=t=>t==null?"":typeof t=="number"?t.toLocaleString():String(t),Y=forwardRef((t,n)=>{let{data:h,xAxisKey:f,series:x,formatValue:y=Tt,formatTitle:p,isLoading:S=false,empty:s,showTooltip:C=true,showGrid:v=false,showXAxis:w=false,showYAxis:L=false,showLegend:j=false,xAxisLabel:g,yAxisLabel:k,yAxisDomain:U,yAxisTicks:_,curve:q="monotone",isStacked:J=false,tooltipContent:Q,id:D,className:Z,sx:tt}=t,et=useTheme(),[at,N]=useState(false),rt=h?.length===0,r=et.v2.palette,K=[r.status.success.emphasis,r.interactive.primary.default,r.status.warning.default,r.status.danger.emphasis],u=x.map((e,it)=>{let V=e.color??K[it%K.length];return {key:String(e.key),label:e.label??String(e.key),color:V,fill:e.fill??alpha(V,.1)}}),ot=p??(e=>String(e[f]??"")),R={fontSize:11,fill:r.foreground.tertiary},P={fontSize:11,fill:r.foreground.secondary};return jsx(G,{ref:n,id:D,"data-testid":D??"AreaChart",className:nc(o.root,Z),sx:tt,children:S?jsx(b,{}):rt?s??jsx(b,{}):jsxs(Fragment,{children:[jsx(B,{children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(AreaChart,{margin:{top:20,right:5,bottom:w&&g?28:5,left:L&&k?24:5},data:h,children:[v&&jsx(CartesianGrid,{strokeDasharray:"3 3",stroke:r.border.default,vertical:false}),w&&jsx(XAxis,{dataKey:f,height:g?"auto":void 0,tickLine:false,axisLine:false,tick:R,label:g?{value:g,position:"insideBottom",offset:8,...P}:void 0}),L&&jsx(YAxis,{domain:U,ticks:_,tickLine:false,axisLine:false,tick:R,label:k?{value:k,angle:-90,position:"insideLeft",offset:8,...P}:void 0}),C&&jsx(Tooltip,{content:Q??jsx(X,{series:u,formatValue:y,formatTitle:ot}),cursor:{fill:r.grey[400],stroke:r.grey[400],strokeWidth:1,strokeOpacity:1,stopOpacity:.3,strokeDasharray:"5 5",strokeLinecap:"round",strokeLinejoin:"round"}}),u.map(e=>jsx(Area,{dataKey:e.key,type:q,fill:e.fill,stroke:e.color,stackId:J?bt:void 0,activeDot:{r:5,fill:e.color,strokeWidth:2,stroke:r.base.white,cursor:at?"pointer":"default",onMouseOver:()=>N(true),onMouseLeave:()=>N(false)}},e.key))]})})}),j&&u.length>0&&jsx(F,{className:o.legend,children:u.map(e=>jsxs(H,{children:[jsx(m,{$color:e.color}),e.label]},e.key))})]})})});Y.displayName="AreaChart";var wt=memo(Y);export{o as a,wt as b};
1
+ import {nc}from'./chunk-ZTZOHMJ3.js';import {forwardRef,useState,memo}from'react';import {ResponsiveContainer,AreaChart,CartesianGrid,XAxis,YAxis,Tooltip,Area}from'recharts';import {useTheme,alpha}from'@mui/material/styles';import {styled,Box,Typography}from'@mui/material';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var l="os-shared-AreaChart",o={root:`${l}-root`,tooltip:`${l}-tooltip`,tooltipTitle:`${l}-tooltipTitle`,tooltipValue:`${l}-tooltipValue`,loading:`${l}-loading`,legend:`${l}-legend`};var G=styled(Box)(()=>({width:"100%",height:"100%",display:"flex",flexDirection:"column"})),B=styled(Box)(({theme:t})=>({flex:1,minHeight:0,position:"relative","& svg:focus":{outline:"none"},"& svg:focus-visible":{outline:`2px solid ${t.v2.palette.interactive.primary.default}`}})),F=styled(Box)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"center",flexWrap:"wrap",gap:t.v2.spacing(12),paddingTop:t.v2.spacing(8)})),H=styled(Box)(({theme:t})=>({...t.v2.typography.textVariants.body.small.medium,display:"inline-flex",alignItems:"center",gap:t.v2.spacing(4),color:t.v2.palette.foreground.secondary,whiteSpace:"nowrap"})),m=styled("span")(({$color:t})=>({width:8,height:8,borderRadius:"50%",backgroundColor:t,flexShrink:0})),O=styled(Box)(({theme:t})=>({width:"auto",display:"inline-block",whiteSpace:"nowrap",backgroundColor:t.v2.palette.background.primary,padding:t.v2.spacing(6),border:`1.5px solid ${t.v2.palette.border.default}`,borderRadius:t.v2.radius(8),backdropFilter:t.v2.blur[24],boxShadow:t.v2.elevation[200]})),W=styled(Typography)(({theme:t})=>({...t.v2.typography.textVariants.caption.medium,width:"auto",marginBottom:t.v2.spacing(4),color:t.v2.palette.foreground.secondary,whiteSpace:"nowrap",overflow:"visible"})),M=styled(Typography)(({theme:t})=>({...t.v2.typography.textVariants.body.small.semibold,display:"flex",alignItems:"center",gap:t.v2.spacing(5),color:t.v2.palette.foreground.primary,whiteSpace:"nowrap",overflow:"visible",width:"auto"}));var pt=[{dataKey:30},{dataKey:32.9941},{dataKey:39.0471},{dataKey:56.3412},{dataKey:69.3118},{dataKey:87.4706},{dataKey:94.3882},{dataKey:110.406}],dt=()=>jsx(ResponsiveContainer,{className:o.loading,children:jsxs(AreaChart,{margin:{top:40},data:pt,children:[jsx("defs",{children:jsxs("linearGradient",{id:"areaChartLoadingGradient",x1:"0",y1:"0",x2:"0",y2:"1",gradientUnits:"objectBoundingBox",children:[jsx("stop",{offset:"0.54",stopColor:"rgba(67, 67, 67, 0.035)"}),jsx("stop",{offset:"1",stopColor:"rgba(255, 255, 255, 0)"})]})}),jsx(Area,{dataKey:"dataKey",type:"linear",fill:"url(#areaChartLoadingGradient)",fillOpacity:1,stroke:"#C2C2C2",strokeWidth:1,strokeLinecap:"round",strokeDasharray:"4 4",activeDot:false})]})}),b=dt;var ct=({active:t,payload:n,series:h,formatValue:f,formatTitle:x})=>{if(!t||!n?.length)return null;let y=n[0]?.payload??{};return jsxs(O,{className:o.tooltip,children:[jsx(W,{className:o.tooltipTitle,children:x(y)}),n.map((p,S)=>{let s=String(p.dataKey??""),C=h.find(v=>v.key===s);return jsxs(M,{className:o.tooltipValue,children:[jsx(m,{$color:C?.color??p.color}),jsx("span",{children:C?.label??s}),jsx("span",{children:f(p.value,s,y)})]},`${s}-${S}`)})]})},X=ct;var bt="areaChartStack",Tt=t=>t==null?"":typeof t=="number"?t.toLocaleString():String(t),Y=forwardRef((t,n)=>{let{data:h,xAxisKey:f,series:x,formatValue:y=Tt,formatTitle:p,isLoading:S=false,empty:s,showTooltip:C=true,showGrid:v=false,showXAxis:w=false,showYAxis:L=false,showLegend:j=false,xAxisLabel:g,yAxisLabel:k,yAxisDomain:U,yAxisTicks:_,curve:q="monotone",isStacked:J=false,tooltipContent:Q,id:D,className:Z,sx:tt}=t,et=useTheme(),[at,N]=useState(false),rt=h?.length===0,r=et.v2.palette,K=[r.status.success.emphasis,r.interactive.primary.default,r.status.warning.default,r.status.danger.emphasis],u=x.map((e,it)=>{let V=e.color??K[it%K.length];return {key:String(e.key),label:e.label??String(e.key),color:V,fill:e.fill??alpha(V,.1)}}),ot=p??(e=>String(e[f]??"")),R={fontSize:11,fill:r.foreground.tertiary},P={fontSize:11,fill:r.foreground.secondary};return jsx(G,{ref:n,id:D,"data-testid":D??"AreaChart",className:nc(o.root,Z),sx:tt,children:S?jsx(b,{}):rt?s??jsx(b,{}):jsxs(Fragment,{children:[jsx(B,{children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(AreaChart,{margin:{top:20,right:5,bottom:w&&g?28:5,left:L&&k?24:5},data:h,children:[v&&jsx(CartesianGrid,{strokeDasharray:"3 3",stroke:r.border.default,vertical:false}),w&&jsx(XAxis,{dataKey:f,height:g?"auto":void 0,tickLine:false,axisLine:false,tick:R,label:g?{value:g,position:"insideBottom",offset:8,...P}:void 0}),L&&jsx(YAxis,{domain:U,ticks:_,tickLine:false,axisLine:false,tick:R,label:k?{value:k,angle:-90,position:"insideLeft",offset:8,...P}:void 0}),C&&jsx(Tooltip,{content:Q??jsx(X,{series:u,formatValue:y,formatTitle:ot}),cursor:{fill:r.grey[400],stroke:r.grey[400],strokeWidth:1,strokeOpacity:1,stopOpacity:.3,strokeDasharray:"5 5",strokeLinecap:"round",strokeLinejoin:"round"}}),u.map(e=>jsx(Area,{dataKey:e.key,type:q,fill:e.fill,stroke:e.color,stackId:J?bt:void 0,activeDot:{r:5,fill:e.color,strokeWidth:2,stroke:r.base.white,cursor:at?"pointer":"default",onMouseOver:()=>N(true),onMouseLeave:()=>N(false)}},e.key))]})})}),j&&u.length>0&&jsx(F,{className:o.legend,children:u.map(e=>jsxs(H,{children:[jsx(m,{$color:e.color}),e.label]},e.key))})]})})});Y.displayName="AreaChart";var wt=memo(Y);export{o as a,wt as b};
@@ -1,8 +1,8 @@
1
- import {b}from'./chunk-MUR4ILTY.js';import {Bc}from'./chunk-CZWXKHO7.js';import {xb}from'./chunk-2GSUGMI7.js';import {useId,useCallback}from'react';import v,{autocompleteClasses}from'@mui/material/Autocomplete';import y from'@mui/material/Box';import M from'@mui/material/TextField';import R from'@mui/material/Popper';import {keyframes,styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var T=keyframes`
1
+ import {b}from'./chunk-MUR4ILTY.js';import {Bc}from'./chunk-ZTZOHMJ3.js';import {yb}from'./chunk-RNBTIRD7.js';import {useId,useCallback}from'react';import v,{autocompleteClasses}from'@mui/material/Autocomplete';import y from'@mui/material/Box';import M from'@mui/material/TextField';import R from'@mui/material/Popper';import {keyframes,styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var T=keyframes`
2
2
  0% {
3
3
  transform: rotate(-90deg);
4
4
  }
5
5
  100% {
6
6
  transform: rotate(270deg);
7
7
  }
8
- `,u=styled(y)({width:12,height:12,display:"flex",alignItems:"center",justifyContent:"center","& svg":{width:"100%",height:"100%",display:"block"},animation:`${T} 2s linear infinite`}),m=styled(M)({"& .MuiInputBase-root":{paddingTop:13,paddingBottom:13,borderRadius:4,"& .MuiOutlinedInput-notchedOutline":{borderWidth:1,borderStyle:"solid",borderColor:"#F2F2F2"},"&:hover":{"& .MuiOutlinedInput-notchedOutline":{borderColor:"#F2F2F2"}},"&.Mui-focused":{"& .MuiOutlinedInput-notchedOutline":{borderColor:"#1F88D0",boxShadow:"0px 0px 4px 0px #1F88D080"},"&:hover":{"& .MuiOutlinedInput-notchedOutline":{borderColor:"#1F88D0"}}},[`& .${autocompleteClasses.input}`]:{fontSize:11,paddingTop:0,paddingBottom:0,paddingLeft:0},[`& .${autocompleteClasses.endAdornment}`]:{marginRight:8}}}),c=styled(R)({fontSize:11,borderRadius:"8px",border:"1px solid #F2F2F2",boxShadow:"0px 2px 56px 0px #20232B24"});var D=f=>{let{options:x,value:b$1,onChange:g,label:n,renderInput:P,slotProps:p,textFieldProps:o,loading:l,popupIcon:F,...I}=f,h=Bc(useId(),"auto-complete"),C=useCallback(r=>{let A=typeof o=="function"?o(r):o;return jsx(m,{...r,...A,label:n})},[o,n]);return jsx(v,{id:h,"data-testid":"AutoComplete",options:x,value:b$1,onChange:g,loading:l,popupIcon:l?jsx(u,{"aria-hidden":true,children:jsx(b,{})}):F??jsx(y,{component:"img",src:xb,sx:{transform:"rotate(90deg)"},width:8,alt:"close"}),renderInput:P||C,PopperComponent:c,...I,slotProps:{...p,popper:{modifiers:[{name:"offset",options:{offset:[0,4]}}],...p?.popper}}})},Y=D;export{Y as a};
8
+ `,u=styled(y)({width:12,height:12,display:"flex",alignItems:"center",justifyContent:"center","& svg":{width:"100%",height:"100%",display:"block"},animation:`${T} 2s linear infinite`}),m=styled(M)({"& .MuiInputBase-root":{paddingTop:13,paddingBottom:13,borderRadius:4,"& .MuiOutlinedInput-notchedOutline":{borderWidth:1,borderStyle:"solid",borderColor:"#F2F2F2"},"&:hover":{"& .MuiOutlinedInput-notchedOutline":{borderColor:"#F2F2F2"}},"&.Mui-focused":{"& .MuiOutlinedInput-notchedOutline":{borderColor:"#1F88D0",boxShadow:"0px 0px 4px 0px #1F88D080"},"&:hover":{"& .MuiOutlinedInput-notchedOutline":{borderColor:"#1F88D0"}}},[`& .${autocompleteClasses.input}`]:{fontSize:11,paddingTop:0,paddingBottom:0,paddingLeft:0},[`& .${autocompleteClasses.endAdornment}`]:{marginRight:8}}}),c=styled(R)({fontSize:11,borderRadius:"8px",border:"1px solid #F2F2F2",boxShadow:"0px 2px 56px 0px #20232B24"});var D=f=>{let{options:x,value:b$1,onChange:g,label:n,renderInput:P,slotProps:p,textFieldProps:o,loading:l,popupIcon:F,...I}=f,h=Bc(useId(),"auto-complete"),C=useCallback(r=>{let A=typeof o=="function"?o(r):o;return jsx(m,{...r,...A,label:n})},[o,n]);return jsx(v,{id:h,"data-testid":"AutoComplete",options:x,value:b$1,onChange:g,loading:l,popupIcon:l?jsx(u,{"aria-hidden":true,children:jsx(b,{})}):F??jsx(y,{component:"img",src:yb,sx:{transform:"rotate(90deg)"},width:8,alt:"close"}),renderInput:P||C,PopperComponent:c,...I,slotProps:{...p,popper:{modifiers:[{name:"offset",options:{offset:[0,4]}}],...p?.popper}}})},Y=D;export{Y as a};
@@ -1 +1 @@
1
- import {$,Fb,A,wc,xc}from'./chunk-CZWXKHO7.js';import {useState,useEffect,useCallback,useLayoutEffect,useRef,useMemo}from'react';import {useLocation}from'react-router';import {useTheme}from'@mui/material/styles';function H(){let{innerWidth:e,innerHeight:n}=window;return {width:e,height:n}}function ge(){let[e,n]=useState(H);return useEffect(()=>{let t;function o(){cancelAnimationFrame(t),t=requestAnimationFrame(()=>{n(H());});}return window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o),cancelAnimationFrame(t);}},[]),e}var Te=()=>{let[e,n]=useState(false),[t,o]=useState(false),r=useCallback(()=>{n(true);},[]),s=useCallback(()=>{n(false);},[]),i=useCallback(()=>{o(true);},[]),a=useCallback(()=>{o(false);},[]);return {onMouseContentEnter:i,onMouseContentLeave:a,isHovered:e,isContentHovered:t,onMouseEnter:r,onMouseLeave:s}};function be({value:e,delay:n}){let[t,o]=useState(e);return useEffect(()=>{let r;return e?o(e):r=setTimeout(()=>{o(e);},n),()=>{clearTimeout(r);}},[e]),t}function Me(e,n){let[t,o]=useState({});return useEffect(()=>{e&&o(s=>({...s,[e]:n||0}));},[n,e]),{getBadgeCount:useCallback(s=>s?t[s]:"",[t])}}var ke=()=>{let{pathname:e}=useLocation();useLayoutEffect(()=>{$()||(window.location.href="/login");},[e]);};function He(e){return {isParameterSelected:(o,r)=>r?.map(s=>Fb(e,o,s)),getColumnOrder:o=>{let r=e.findIndex(s=>s.name?.toLowerCase()===o?.toLowerCase());return r===-1?100:r}}}var De=e=>{let[n,t]=useState(false);return useEffect(()=>{let o=e?.current;if(!o)return;let r=new IntersectionObserver(([s])=>{t(!s.isIntersecting);});return r.observe(o),()=>r.disconnect()},[e]),{showShadow:n}};var Pe=()=>{let e=useTheme(),n=e.palette.mode==="dark",t=e.palette.mode==="light";return {isDark:n,isLight:t}};function ze(){let[e,n]=useState(0),t=useRef(null),o=A(e),r=()=>{t.current&&(clearInterval(t.current),t.current=null);},s=()=>{r(),n(0);},i=a=>{a<=0||(t.current&&r(),n(a),t.current=setInterval(()=>{n(c=>{let u=c-1;return u<=0&&r(),u});},1e3));};return useEffect(()=>()=>{r();},[]),{timer:e,formattedTime:o,startTimer:i,stopTimer:r,resetTimer:s}}var Ne=e=>{let n=useMemo(()=>new Map(e.map(i=>[i.code.toLowerCase(),i])),[e]),t=useCallback(i=>n.get(i.toLowerCase()),[n]),o=useCallback(({appCode:i,serviceCode:a})=>t(i)?.app_services.find(({code:c})=>c.toLowerCase()===a.toLowerCase()),[t]),r=useCallback(({appCode:i,serviceCode:a})=>o({appCode:i,serviceCode:a})?.functions??[],[o]),s=useCallback(({appCode:i,serviceCode:a,functionCode:c})=>r({appCode:i,serviceCode:a}).find(({code:u})=>u?.toLowerCase()===c.toLowerCase()),[r]);return {getAppInfo:t,getServiceInfo:o,getServiceFunctions:r,getFunctionInfo:s}};function F(e){return useCallback((...n)=>{let t=new CustomEvent(e,{detail:n});window.dispatchEvent(t);},[e])}function Xe(e,n){let t=useRef(n);t.current=n,useEffect(()=>{let o=r=>{let s=r;t.current(...s.detail||[]);};return window.addEventListener(e,o),()=>{window.removeEventListener(e,o);}},[e]);}var et=(e,n)=>{let{selectedEntity:t,selectedMerchant:o,displayName:r}=useMemo(()=>{let s=n?.entities.find(c=>c.id===e?.entityId),i=s?.merchants?.find(c=>c.id===e?.merchantId),a=i?.display_name??i?.legacy_id??"Select";return {selectedEntity:s,selectedMerchant:i,displayName:a}},[n,e?.entityId,e?.merchantId]);return {selectedBrand:n,selectedEntity:t,selectedMerchant:o,displayName:r}};var se=()=>crypto.randomUUID();function rt(){let e=F("on-toast"),n=useCallback(t=>(o,r)=>{let s=r?.id??se();return e({action:"show",variant:t,message:o,options:{...r,id:s}}),s},[e]);return useMemo(()=>{let t=n("default");return t.success=n("success"),t.error=n("error"),t.loading=n("loading"),t.custom=n("custom"),t.dismiss=o=>{e({action:"dismiss",variant:"dismiss",toastId:o});},t.remove=o=>{e({action:"remove",variant:"remove",toastId:o});},t},[n,e])}var ae=10;function at({threshold:e=ae,containerRef:n}={}){let[t,o]=useState(true),[r,s]=useState(false),[i,a]=useState(false),c=useCallback(l=>{let{scrollTop:m,scrollHeight:p,clientHeight:f}=l;a(p>f+e),o(m<=e),s(p-(m+f)<=e);},[e]),u=useCallback(l=>{if(l){if("currentTarget"in l){c(l.currentTarget);return}c(l);}},[c]);return useEffect(()=>{if(!n?.current)return;let l=n.current;u(l);let m=new ResizeObserver(()=>{u(l);});return m.observe(l),()=>{m.disconnect();}},[n,u]),{handleScroll:u,scrolledToTop:t,scrolledToBottom:r,scrollable:i}}var lt=(e={})=>{let{checkUrl:n="/status",checkIntervalMs:t=3e4,debounceMs:o=800,timeoutMs:r=5e3}=e,s=typeof window<"u"&&typeof navigator<"u",[i,a]=useState(s?navigator.onLine:true),[c,u]=useState(false),[l,m]=useState(null),p=useRef(null),f=useRef(null),g=useCallback(d=>{p.current!==null&&window.clearTimeout(p.current),p.current=window.setTimeout(()=>{a(d),p.current=null;},o);},[o]);return useEffect(()=>{if(!s)return;let d=null,w=()=>{f.current!==null&&(window.clearInterval(f.current),f.current=null);},v=async()=>{u(true),m(null),d?.abort(),d=new AbortController;try{let M=window.setTimeout(()=>{d?.abort();},r),y=await fetch(n,{method:"GET",cache:"no-store",signal:d.signal});window.clearTimeout(M);let x=y.ok;g(x),x?w():m(`Health check failed with status ${y.status}`);}catch{g(false),m("Unable to reach network");}finally{u(false);}},S=()=>{w(),g(true);},C=()=>{g(false),w(),v(),f.current=window.setInterval(v,t);};return window.addEventListener("online",S),window.addEventListener("offline",C),navigator.onLine||(v(),f.current=window.setInterval(v,t)),()=>{window.removeEventListener("online",S),window.removeEventListener("offline",C),p.current!==null&&window.clearTimeout(p.current),w(),d?.abort();}},[s,n,t,o,r,g]),s?{isOnline:i,isChecking:c,error:l}:{isOnline:false,isChecking:false,error:"Online status is only available in a browser environment."}};var dt=(e={},n,t)=>{let o=wc(e,t.requiredFilterKeys);return {columns:useMemo(()=>xc(n,o,t),[n,o])}};function ht(e,n){return useCallback(t=>{t.key==="Enter"?(t.preventDefault(),e(),n(t)):t.key==="Escape"&&n(t);},[e,n])}function Ct(){let[e,n]=useState(true);return {onScrollHandler:useCallback(o=>{let{scrollTop:r,scrollHeight:s,clientHeight:i}=o.currentTarget,a=r===0||i<s-r-1;n(c=>c===a?c:a);},[]),showShadow:e}}export{ge as a,Te as b,be as c,Me as d,ke as e,He as f,De as g,Pe as h,ze as i,Ne as j,F as k,Xe as l,et as m,rt as n,at as o,lt as p,dt as q,ht as r,Ct as s};
1
+ import {$,Fb,A,wc,xc}from'./chunk-ZTZOHMJ3.js';import {useState,useEffect,useCallback,useLayoutEffect,useRef,useMemo}from'react';import {useLocation}from'react-router';import {useTheme}from'@mui/material/styles';function H(){let{innerWidth:e,innerHeight:n}=window;return {width:e,height:n}}function ge(){let[e,n]=useState(H);return useEffect(()=>{let t;function o(){cancelAnimationFrame(t),t=requestAnimationFrame(()=>{n(H());});}return window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o),cancelAnimationFrame(t);}},[]),e}var Te=()=>{let[e,n]=useState(false),[t,o]=useState(false),r=useCallback(()=>{n(true);},[]),s=useCallback(()=>{n(false);},[]),i=useCallback(()=>{o(true);},[]),a=useCallback(()=>{o(false);},[]);return {onMouseContentEnter:i,onMouseContentLeave:a,isHovered:e,isContentHovered:t,onMouseEnter:r,onMouseLeave:s}};function be({value:e,delay:n}){let[t,o]=useState(e);return useEffect(()=>{let r;return e?o(e):r=setTimeout(()=>{o(e);},n),()=>{clearTimeout(r);}},[e]),t}function Me(e,n){let[t,o]=useState({});return useEffect(()=>{e&&o(s=>({...s,[e]:n||0}));},[n,e]),{getBadgeCount:useCallback(s=>s?t[s]:"",[t])}}var ke=()=>{let{pathname:e}=useLocation();useLayoutEffect(()=>{$()||(window.location.href="/login");},[e]);};function He(e){return {isParameterSelected:(o,r)=>r?.map(s=>Fb(e,o,s)),getColumnOrder:o=>{let r=e.findIndex(s=>s.name?.toLowerCase()===o?.toLowerCase());return r===-1?100:r}}}var De=e=>{let[n,t]=useState(false);return useEffect(()=>{let o=e?.current;if(!o)return;let r=new IntersectionObserver(([s])=>{t(!s.isIntersecting);});return r.observe(o),()=>r.disconnect()},[e]),{showShadow:n}};var Pe=()=>{let e=useTheme(),n=e.palette.mode==="dark",t=e.palette.mode==="light";return {isDark:n,isLight:t}};function ze(){let[e,n]=useState(0),t=useRef(null),o=A(e),r=()=>{t.current&&(clearInterval(t.current),t.current=null);},s=()=>{r(),n(0);},i=a=>{a<=0||(t.current&&r(),n(a),t.current=setInterval(()=>{n(c=>{let u=c-1;return u<=0&&r(),u});},1e3));};return useEffect(()=>()=>{r();},[]),{timer:e,formattedTime:o,startTimer:i,stopTimer:r,resetTimer:s}}var Ne=e=>{let n=useMemo(()=>new Map(e.map(i=>[i.code.toLowerCase(),i])),[e]),t=useCallback(i=>n.get(i.toLowerCase()),[n]),o=useCallback(({appCode:i,serviceCode:a})=>t(i)?.app_services.find(({code:c})=>c.toLowerCase()===a.toLowerCase()),[t]),r=useCallback(({appCode:i,serviceCode:a})=>o({appCode:i,serviceCode:a})?.functions??[],[o]),s=useCallback(({appCode:i,serviceCode:a,functionCode:c})=>r({appCode:i,serviceCode:a}).find(({code:u})=>u?.toLowerCase()===c.toLowerCase()),[r]);return {getAppInfo:t,getServiceInfo:o,getServiceFunctions:r,getFunctionInfo:s}};function F(e){return useCallback((...n)=>{let t=new CustomEvent(e,{detail:n});window.dispatchEvent(t);},[e])}function Xe(e,n){let t=useRef(n);t.current=n,useEffect(()=>{let o=r=>{let s=r;t.current(...s.detail||[]);};return window.addEventListener(e,o),()=>{window.removeEventListener(e,o);}},[e]);}var et=(e,n)=>{let{selectedEntity:t,selectedMerchant:o,displayName:r}=useMemo(()=>{let s=n?.entities.find(c=>c.id===e?.entityId),i=s?.merchants?.find(c=>c.id===e?.merchantId),a=i?.display_name??i?.legacy_id??"Select";return {selectedEntity:s,selectedMerchant:i,displayName:a}},[n,e?.entityId,e?.merchantId]);return {selectedBrand:n,selectedEntity:t,selectedMerchant:o,displayName:r}};var se=()=>crypto.randomUUID();function rt(){let e=F("on-toast"),n=useCallback(t=>(o,r)=>{let s=r?.id??se();return e({action:"show",variant:t,message:o,options:{...r,id:s}}),s},[e]);return useMemo(()=>{let t=n("default");return t.success=n("success"),t.error=n("error"),t.loading=n("loading"),t.custom=n("custom"),t.dismiss=o=>{e({action:"dismiss",variant:"dismiss",toastId:o});},t.remove=o=>{e({action:"remove",variant:"remove",toastId:o});},t},[n,e])}var ae=10;function at({threshold:e=ae,containerRef:n}={}){let[t,o]=useState(true),[r,s]=useState(false),[i,a]=useState(false),c=useCallback(l=>{let{scrollTop:m,scrollHeight:p,clientHeight:f}=l;a(p>f+e),o(m<=e),s(p-(m+f)<=e);},[e]),u=useCallback(l=>{if(l){if("currentTarget"in l){c(l.currentTarget);return}c(l);}},[c]);return useEffect(()=>{if(!n?.current)return;let l=n.current;u(l);let m=new ResizeObserver(()=>{u(l);});return m.observe(l),()=>{m.disconnect();}},[n,u]),{handleScroll:u,scrolledToTop:t,scrolledToBottom:r,scrollable:i}}var lt=(e={})=>{let{checkUrl:n="/status",checkIntervalMs:t=3e4,debounceMs:o=800,timeoutMs:r=5e3}=e,s=typeof window<"u"&&typeof navigator<"u",[i,a]=useState(s?navigator.onLine:true),[c,u]=useState(false),[l,m]=useState(null),p=useRef(null),f=useRef(null),g=useCallback(d=>{p.current!==null&&window.clearTimeout(p.current),p.current=window.setTimeout(()=>{a(d),p.current=null;},o);},[o]);return useEffect(()=>{if(!s)return;let d=null,w=()=>{f.current!==null&&(window.clearInterval(f.current),f.current=null);},v=async()=>{u(true),m(null),d?.abort(),d=new AbortController;try{let M=window.setTimeout(()=>{d?.abort();},r),y=await fetch(n,{method:"GET",cache:"no-store",signal:d.signal});window.clearTimeout(M);let x=y.ok;g(x),x?w():m(`Health check failed with status ${y.status}`);}catch{g(false),m("Unable to reach network");}finally{u(false);}},S=()=>{w(),g(true);},C=()=>{g(false),w(),v(),f.current=window.setInterval(v,t);};return window.addEventListener("online",S),window.addEventListener("offline",C),navigator.onLine||(v(),f.current=window.setInterval(v,t)),()=>{window.removeEventListener("online",S),window.removeEventListener("offline",C),p.current!==null&&window.clearTimeout(p.current),w(),d?.abort();}},[s,n,t,o,r,g]),s?{isOnline:i,isChecking:c,error:l}:{isOnline:false,isChecking:false,error:"Online status is only available in a browser environment."}};var dt=(e={},n,t)=>{let o=wc(e,t.requiredFilterKeys);return {columns:useMemo(()=>xc(n,o,t),[n,o])}};function ht(e,n){return useCallback(t=>{t.key==="Enter"?(t.preventDefault(),e(),n(t)):t.key==="Escape"&&n(t);},[e,n])}function Ct(){let[e,n]=useState(true);return {onScrollHandler:useCallback(o=>{let{scrollTop:r,scrollHeight:s,clientHeight:i}=o.currentTarget,a=r===0||i<s-r-1;n(c=>c===a?c:a);},[]),showShadow:e}}export{ge as a,Te as b,be as c,Me as d,ke as e,He as f,De as g,Pe as h,ze as i,Ne as j,F as k,Xe as l,et as m,rt as n,at as o,lt as p,dt as q,ht as r,Ct as s};
@@ -1 +1 @@
1
- import {t,p}from'./chunk-4Y2COEZC.js';import {nc}from'./chunk-CZWXKHO7.js';import {forwardRef,memo,useMemo,Fragment,useState,useRef,useCallback,useEffect,useLayoutEffect}from'react';import Tt from'@mui/material/Box';import {styled}from'@mui/material/styles';import {motion}from'framer-motion';import {jsx,jsxs}from'react/jsx-runtime';var N="os-shared-AvatarStack",s={root:`${N}-root`,track:`${N}-track`,slot:`${N}-slot`,overlapSlot:`${N}-overlapSlot`,overlapItem:`${N}-overlapItem`,overflow:`${N}-overflow`},Xt="chip-stack-overlap-slot",E=`${s.overlapSlot} ${Xt}`,h=24,z=.22,et={duration:z,ease:"easeOut"},rt=1e3,at=120,Ut=["static","fanout-right","fanout-left","fanout-center"],K="static";function nt({items:t,getItemKey:e,renderItem:r}){return t?.length&&e&&r?{items:t,getItemKey:e,renderItem:r}:null}function it(t){return t==="fanout-left"?"left":t==="fanout-center"?"center":"right"}function lt(t,e){return e===void 0||e<1||t.length<e?{visibleItems:t,hiddenItems:[]}:{visibleItems:t.slice(0,e-1),hiddenItems:t.slice(e-1)}}function st(t,e){return lt(t,e).hiddenItems.length>0}function W({source:{items:t,getItemKey:e,renderItem:r},maxItems:a,slotSize:i,renderOverflow:o}){let{visibleItems:n,hiddenItems:c}=lt(t,a),d={slotSize:i},m=n.map((S,A)=>({key:e(S,A),render:()=>r(S,A,d)}));return c.length>0&&m.push({key:`avatar-stack-overflow-${c.length}-${n.length}`,render:()=>o({items:t,overflowItems:c,size:i})}),m}var jt=3,ot=60;function ct(t){let e=t.size??h,r=a=>Math.round(e*a/h);return {size:e,stackStep:t.stackStep??Math.round(e/2),gap:t.gap??Math.max(1,r(jt)),minTrackWidth:t.minTrackWidth??Math.max(ot,r(ot))}}function mt(t,e){return t<=0||e==="right"?0:e==="left"?t-1:Math.floor((t-1)/2)}function ut(t,e,r){return t<=0?0:(t-1)*e+r}function dt({slotCount:t,anchorIndex:e,slotWidths:r,gap:a,stackStep:i}){if(t===0)return [];let o=new Array(t);o[e]=e*i;for(let n=e-1;n>=0;n-=1)o[n]=o[n+1]-r[n]-a;for(let n=e+1;n<t;n+=1)o[n]=o[n-1]+r[n-1]+a;return o}function ft(t,e,r,a){return Array.from({length:t},(i,o)=>t<=1||!e?0:r[o]-o*a)}function St(t,e,r){if(t.length===0)return 0;let a=Math.min(...t),i=Math.max(...t.map((o,n)=>o+e[n]));return Math.max(r,i-a)}function At(t,e,r){return Array.from({length:t},(a,i)=>e.current[i]?.offsetWidth??r)}function pt(t,e){return t.length===e.length&&t.every((r,a)=>r===e[a])}function H(t){return t==null?[]:Array.isArray(t)?t:[t]}function X(t,e){return Array.from({length:t},()=>e)}function C(t){t.current&&clearTimeout(t.current);}function ht({slotCount:t,anchorIndex:e,size:r,stackStep:a,gap:i,isFanOutEnabled:o,compact:n}){let[c,d]=useState(false),m=useRef(null),S=useCallback(()=>{o&&(C(m),d(true));},[o]),A=useCallback(()=>{o&&(C(m),m.current=setTimeout(()=>d(false),at));},[o]);useEffect(()=>()=>C(m),[]),useEffect(()=>{o||d(false);},[o]);let u=useRef([]),l=useRef(null),[p,I]=useState(()=>X(t,r)),f=useCallback(()=>{let v=At(t,u,r);I(T=>pt(T,v)?T:v);},[t,r]);useLayoutEffect(()=>{I(X(t,r));},[t,r]),useLayoutEffect(()=>{f();},[t,r,f]),useEffect(()=>{let v=()=>{l.current&&cancelAnimationFrame(l.current),l.current=requestAnimationFrame(f);};return v(),window.addEventListener("resize",v),()=>{window.removeEventListener("resize",v),l.current&&cancelAnimationFrame(l.current);}},[f]);let y=o&&c,R=useMemo(()=>Array.from({length:t},(v,T)=>p[T]??r),[t,p,r]),_=useMemo(()=>dt({slotCount:t,anchorIndex:e,slotWidths:R,gap:i,stackStep:a}),[t,e,R,i,a]),M=useMemo(()=>ft(t,y,_,a),[t,y,_,a]),k=ut(t,a,r),D=useMemo(()=>St(_,R,k),[_,R,k]),V=y?D:n?r:k,L=useMemo(()=>Array.from({length:t},(v,T)=>!n||c||T===e?1:0),[t,n,c,e]);return {slotRefs:u,handleMouseEnter:S,handleMouseLeave:A,isExpanded:y,collapsedWidth:k,trackWidth:V,translateX:M,slotOpacity:L}}var x=t=>typeof t=="string"&&!t.startsWith("$")&&t!=="sx"&&t!=="theme"&&t!=="ownerState"&&t!=="as";function q(){return `var(--avatar-stack-slot-size, ${h}px)`}function qt(t){return `${Math.max(8,8.5*t/h)}px`}function yt(t){let{base:e,grey:r}=t.v2.palette,a=e.white;return {display:"flex",alignItems:"center",justifyContent:"center",width:q(),height:q(),borderRadius:"50%",border:`1px solid ${r[100]}`,background:a,backgroundColor:a,flexShrink:0,"&.MuiAvatar-colorDefault":{background:a,backgroundColor:a,color:"inherit"}}}var gt=styled(Tt,{shouldForwardProp:x})(({theme:t,$slotSize:e})=>({"--avatar-stack-slot-size":`${e}px`,display:"flex",alignItems:"center",paddingRight:t.v2.spacing(8),[`& .${s.overlapSlot}`]:{marginRight:`-${t.v2.spacing(8)}`,position:"relative",zIndex:1},[`& .${s.overlapSlot}:hover`]:{zIndex:2}})),bt=styled(t,{shouldForwardProp:x})(({theme:t})=>({...yt(t),overflow:"hidden",lineHeight:0,boxSizing:"border-box",padding:0,fontSize:"inherit","& > *":{width:"100%",height:"100%",minWidth:0,minHeight:0},"& img":{display:"block",width:"100%",height:"100%",objectFit:"contain"}})),xt=styled(t,{shouldForwardProp:x})(({theme:t})=>({...yt(t),fontSize:`max(8px, calc(${q()} * 8.5 / ${h}))`,fontWeight:t.v2.typography.fontWeightMedium,color:"rgba(0, 0, 0, 0.38)","&.MuiAvatar-colorDefault":{background:t.v2.palette.base.white,backgroundColor:t.v2.palette.base.white,color:"rgba(0, 0, 0, 0.38)"}})),Rt=styled(Tt,{shouldForwardProp:x})(({theme:t,$isFullWidth:e})=>({display:"flex",justifyContent:"flex-start",gap:t.v2.spacing(8),overflow:"visible",...e?{width:"100%"}:{}})),_t=styled("div",{shouldForwardProp:x})(({$width:t,$minWidth:e,$height:r,$zIndex:a})=>({position:"relative",overflow:"visible",width:t,minWidth:e,height:r,transition:`width ${z}s ease-out`,...a!==void 0?{zIndex:a}:{}})),wt=styled(motion.div,{shouldForwardProp:x})(({$index:t,$left:e,$size:r,$isHidden:a})=>({position:"absolute",top:0,left:e,zIndex:t,width:r,height:r,pointerEvents:a?"none":"auto"})),Nt=styled(t,{shouldForwardProp:x})(({theme:t,$size:e})=>({width:e,height:e,borderRadius:"50%",border:`1px solid ${t.v2.palette.grey[100]}`,display:"flex",alignItems:"center",justifyContent:"center",fontSize:qt(e),fontWeight:t.v2.typography.fontWeightBold,background:"#F5F5F5",backgroundColor:"#F5F5F5",flexShrink:0,"&.MuiAvatar-colorDefault":{background:"#F5F5F5",backgroundColor:"#F5F5F5",color:"inherit"}}));function Bt({overflowItems:t,size:e}){return jsxs(Nt,{className:s.overflow,$size:e,children:["+",t.length]})}function J({source:t,maxItems:e,renderOverflow:r,fanOutDirection:a,compact:i,slotProps:o,rootRef:n,id:c,"data-testid":d,className:m,sx:S}){let{zIndex:A=rt,size:u,stackStep:l,gap:p,minTrackWidth:I}=o?.layout??{},{size:f,stackStep:y,gap:R,minTrackWidth:_}=useMemo(()=>ct({size:u,stackStep:l,gap:p,minTrackWidth:I}),[u,l,p,I]),M=i||!st(t.items,e),k=useMemo(()=>W({source:t,maxItems:e,slotSize:f,renderOverflow:r??Bt}),[t,e,f,r]),D=mt(k.length,a),{slotRefs:Q,handleMouseEnter:V,handleMouseLeave:L,isExpanded:v,collapsedWidth:T,trackWidth:$t,translateX:Ft,slotOpacity:tt}=ht({slotCount:k.length,anchorIndex:D,size:f,stackStep:y,gap:R,isFanOutEnabled:M,compact:i});if(k.length===0)return null;let{className:Wt,sx:Ct,...Dt}=o?.shell??{},{className:Vt,...Lt}=o?.track??{};return jsx(Rt,{ref:n,...Dt,className:nc(s.root,m,Wt),sx:[...H(S),...H(Ct)],$isFullWidth:M,children:jsx(_t,{id:c,"data-testid":d,...Lt,className:nc(s.track,Vt),onMouseEnter:V,onMouseLeave:L,$width:$t,$minWidth:i?f:Math.max(_,T),$height:f,$zIndex:v?A:void 0,children:k.map(({key:zt,render:Kt},w)=>jsx(wt,{ref:Ht=>{Q.current[w]=Ht;},className:s.slot,initial:false,animate:{x:Ft[w]??0,opacity:tt[w]??1},transition:et,$index:w,$left:w*y,$size:f,$isHidden:tt[w]===0,children:Kt()},zt))})})}var Pt=forwardRef(({title:t,id:e,className:r,...a},i)=>{let o=t!=null&&t!=="",n=jsx(bt,{ref:i,id:e,"data-testid":e??"AvatarStackItem",className:nc(s.overlapItem,!o&&E,r),...a});return o?jsx(p,{title:t,wrapperProps:{className:E},children:n}):n});Pt.displayName="AvatarStackItem";var Y=memo(Pt);function te(t){return jsx(p,{title:`${t} more`,wrapperProps:{className:E},children:jsx(xt,{className:s.overflow,children:jsxs("span",{children:["+",t]})})})}function G({source:t,maxItems:e,renderOverflow:r,slotProps:a,rootRef:i,id:o,"data-testid":n,className:c,sx:d}){let m=a?.layout?.size??h,{renderItem:S}=t,A=W({source:{...t,renderItem:(u,l,p)=>jsx(Y,{children:S(u,l,p)})},maxItems:e,slotSize:m,renderOverflow:u=>r?.(u)??te(u.overflowItems.length)});return jsx(gt,{ref:i,id:o,"data-testid":n,className:nc(s.root,c),sx:d,$slotSize:m,children:A.map(({key:u,render:l})=>jsx(Fragment,{children:l()},u))})}function ne({variant:t=K,items:e,getItemKey:r,renderItem:a,maxItems:i,renderOverflow:o,compact:n=false,id:c,"data-testid":d,slotProps:m,sx:S,className:A},u){let l=useMemo(()=>nt({items:e,getItemKey:r,renderItem:a}),[e,r,a]);if(!l)return null;let p={source:l,maxItems:i,renderOverflow:o,slotProps:m,rootRef:u,id:c,"data-testid":d??c??"AvatarStack",className:A,sx:S};return t==="static"?jsx(G,{...p}):jsx(J,{...p,fanOutDirection:it(t),compact:n})}var Mt=forwardRef(ne);Mt.displayName="AvatarStack";var ie=memo(Mt),le=ie;export{s as a,Ut as b,K as c,Y as d,le as e};
1
+ import {t,p}from'./chunk-FEZOSRP2.js';import {nc}from'./chunk-ZTZOHMJ3.js';import {forwardRef,memo,useMemo,Fragment,useState,useRef,useCallback,useEffect,useLayoutEffect}from'react';import Tt from'@mui/material/Box';import {styled}from'@mui/material/styles';import {motion}from'framer-motion';import {jsx,jsxs}from'react/jsx-runtime';var N="os-shared-AvatarStack",s={root:`${N}-root`,track:`${N}-track`,slot:`${N}-slot`,overlapSlot:`${N}-overlapSlot`,overlapItem:`${N}-overlapItem`,overflow:`${N}-overflow`},Xt="chip-stack-overlap-slot",E=`${s.overlapSlot} ${Xt}`,h=24,z=.22,et={duration:z,ease:"easeOut"},rt=1e3,at=120,Ut=["static","fanout-right","fanout-left","fanout-center"],K="static";function nt({items:t,getItemKey:e,renderItem:r}){return t?.length&&e&&r?{items:t,getItemKey:e,renderItem:r}:null}function it(t){return t==="fanout-left"?"left":t==="fanout-center"?"center":"right"}function lt(t,e){return e===void 0||e<1||t.length<e?{visibleItems:t,hiddenItems:[]}:{visibleItems:t.slice(0,e-1),hiddenItems:t.slice(e-1)}}function st(t,e){return lt(t,e).hiddenItems.length>0}function W({source:{items:t,getItemKey:e,renderItem:r},maxItems:a,slotSize:i,renderOverflow:o}){let{visibleItems:n,hiddenItems:c}=lt(t,a),d={slotSize:i},m=n.map((S,A)=>({key:e(S,A),render:()=>r(S,A,d)}));return c.length>0&&m.push({key:`avatar-stack-overflow-${c.length}-${n.length}`,render:()=>o({items:t,overflowItems:c,size:i})}),m}var jt=3,ot=60;function ct(t){let e=t.size??h,r=a=>Math.round(e*a/h);return {size:e,stackStep:t.stackStep??Math.round(e/2),gap:t.gap??Math.max(1,r(jt)),minTrackWidth:t.minTrackWidth??Math.max(ot,r(ot))}}function mt(t,e){return t<=0||e==="right"?0:e==="left"?t-1:Math.floor((t-1)/2)}function ut(t,e,r){return t<=0?0:(t-1)*e+r}function dt({slotCount:t,anchorIndex:e,slotWidths:r,gap:a,stackStep:i}){if(t===0)return [];let o=new Array(t);o[e]=e*i;for(let n=e-1;n>=0;n-=1)o[n]=o[n+1]-r[n]-a;for(let n=e+1;n<t;n+=1)o[n]=o[n-1]+r[n-1]+a;return o}function ft(t,e,r,a){return Array.from({length:t},(i,o)=>t<=1||!e?0:r[o]-o*a)}function St(t,e,r){if(t.length===0)return 0;let a=Math.min(...t),i=Math.max(...t.map((o,n)=>o+e[n]));return Math.max(r,i-a)}function At(t,e,r){return Array.from({length:t},(a,i)=>e.current[i]?.offsetWidth??r)}function pt(t,e){return t.length===e.length&&t.every((r,a)=>r===e[a])}function H(t){return t==null?[]:Array.isArray(t)?t:[t]}function X(t,e){return Array.from({length:t},()=>e)}function C(t){t.current&&clearTimeout(t.current);}function ht({slotCount:t,anchorIndex:e,size:r,stackStep:a,gap:i,isFanOutEnabled:o,compact:n}){let[c,d]=useState(false),m=useRef(null),S=useCallback(()=>{o&&(C(m),d(true));},[o]),A=useCallback(()=>{o&&(C(m),m.current=setTimeout(()=>d(false),at));},[o]);useEffect(()=>()=>C(m),[]),useEffect(()=>{o||d(false);},[o]);let u=useRef([]),l=useRef(null),[p,I]=useState(()=>X(t,r)),f=useCallback(()=>{let v=At(t,u,r);I(T=>pt(T,v)?T:v);},[t,r]);useLayoutEffect(()=>{I(X(t,r));},[t,r]),useLayoutEffect(()=>{f();},[t,r,f]),useEffect(()=>{let v=()=>{l.current&&cancelAnimationFrame(l.current),l.current=requestAnimationFrame(f);};return v(),window.addEventListener("resize",v),()=>{window.removeEventListener("resize",v),l.current&&cancelAnimationFrame(l.current);}},[f]);let y=o&&c,R=useMemo(()=>Array.from({length:t},(v,T)=>p[T]??r),[t,p,r]),_=useMemo(()=>dt({slotCount:t,anchorIndex:e,slotWidths:R,gap:i,stackStep:a}),[t,e,R,i,a]),M=useMemo(()=>ft(t,y,_,a),[t,y,_,a]),k=ut(t,a,r),D=useMemo(()=>St(_,R,k),[_,R,k]),V=y?D:n?r:k,L=useMemo(()=>Array.from({length:t},(v,T)=>!n||c||T===e?1:0),[t,n,c,e]);return {slotRefs:u,handleMouseEnter:S,handleMouseLeave:A,isExpanded:y,collapsedWidth:k,trackWidth:V,translateX:M,slotOpacity:L}}var x=t=>typeof t=="string"&&!t.startsWith("$")&&t!=="sx"&&t!=="theme"&&t!=="ownerState"&&t!=="as";function q(){return `var(--avatar-stack-slot-size, ${h}px)`}function qt(t){return `${Math.max(8,8.5*t/h)}px`}function yt(t){let{base:e,grey:r}=t.v2.palette,a=e.white;return {display:"flex",alignItems:"center",justifyContent:"center",width:q(),height:q(),borderRadius:"50%",border:`1px solid ${r[100]}`,background:a,backgroundColor:a,flexShrink:0,"&.MuiAvatar-colorDefault":{background:a,backgroundColor:a,color:"inherit"}}}var gt=styled(Tt,{shouldForwardProp:x})(({theme:t,$slotSize:e})=>({"--avatar-stack-slot-size":`${e}px`,display:"flex",alignItems:"center",paddingRight:t.v2.spacing(8),[`& .${s.overlapSlot}`]:{marginRight:`-${t.v2.spacing(8)}`,position:"relative",zIndex:1},[`& .${s.overlapSlot}:hover`]:{zIndex:2}})),bt=styled(t,{shouldForwardProp:x})(({theme:t})=>({...yt(t),overflow:"hidden",lineHeight:0,boxSizing:"border-box",padding:0,fontSize:"inherit","& > *":{width:"100%",height:"100%",minWidth:0,minHeight:0},"& img":{display:"block",width:"100%",height:"100%",objectFit:"contain"}})),xt=styled(t,{shouldForwardProp:x})(({theme:t})=>({...yt(t),fontSize:`max(8px, calc(${q()} * 8.5 / ${h}))`,fontWeight:t.v2.typography.fontWeightMedium,color:"rgba(0, 0, 0, 0.38)","&.MuiAvatar-colorDefault":{background:t.v2.palette.base.white,backgroundColor:t.v2.palette.base.white,color:"rgba(0, 0, 0, 0.38)"}})),Rt=styled(Tt,{shouldForwardProp:x})(({theme:t,$isFullWidth:e})=>({display:"flex",justifyContent:"flex-start",gap:t.v2.spacing(8),overflow:"visible",...e?{width:"100%"}:{}})),_t=styled("div",{shouldForwardProp:x})(({$width:t,$minWidth:e,$height:r,$zIndex:a})=>({position:"relative",overflow:"visible",width:t,minWidth:e,height:r,transition:`width ${z}s ease-out`,...a!==void 0?{zIndex:a}:{}})),wt=styled(motion.div,{shouldForwardProp:x})(({$index:t,$left:e,$size:r,$isHidden:a})=>({position:"absolute",top:0,left:e,zIndex:t,width:r,height:r,pointerEvents:a?"none":"auto"})),Nt=styled(t,{shouldForwardProp:x})(({theme:t,$size:e})=>({width:e,height:e,borderRadius:"50%",border:`1px solid ${t.v2.palette.grey[100]}`,display:"flex",alignItems:"center",justifyContent:"center",fontSize:qt(e),fontWeight:t.v2.typography.fontWeightBold,background:"#F5F5F5",backgroundColor:"#F5F5F5",flexShrink:0,"&.MuiAvatar-colorDefault":{background:"#F5F5F5",backgroundColor:"#F5F5F5",color:"inherit"}}));function Bt({overflowItems:t,size:e}){return jsxs(Nt,{className:s.overflow,$size:e,children:["+",t.length]})}function J({source:t,maxItems:e,renderOverflow:r,fanOutDirection:a,compact:i,slotProps:o,rootRef:n,id:c,"data-testid":d,className:m,sx:S}){let{zIndex:A=rt,size:u,stackStep:l,gap:p,minTrackWidth:I}=o?.layout??{},{size:f,stackStep:y,gap:R,minTrackWidth:_}=useMemo(()=>ct({size:u,stackStep:l,gap:p,minTrackWidth:I}),[u,l,p,I]),M=i||!st(t.items,e),k=useMemo(()=>W({source:t,maxItems:e,slotSize:f,renderOverflow:r??Bt}),[t,e,f,r]),D=mt(k.length,a),{slotRefs:Q,handleMouseEnter:V,handleMouseLeave:L,isExpanded:v,collapsedWidth:T,trackWidth:$t,translateX:Ft,slotOpacity:tt}=ht({slotCount:k.length,anchorIndex:D,size:f,stackStep:y,gap:R,isFanOutEnabled:M,compact:i});if(k.length===0)return null;let{className:Wt,sx:Ct,...Dt}=o?.shell??{},{className:Vt,...Lt}=o?.track??{};return jsx(Rt,{ref:n,...Dt,className:nc(s.root,m,Wt),sx:[...H(S),...H(Ct)],$isFullWidth:M,children:jsx(_t,{id:c,"data-testid":d,...Lt,className:nc(s.track,Vt),onMouseEnter:V,onMouseLeave:L,$width:$t,$minWidth:i?f:Math.max(_,T),$height:f,$zIndex:v?A:void 0,children:k.map(({key:zt,render:Kt},w)=>jsx(wt,{ref:Ht=>{Q.current[w]=Ht;},className:s.slot,initial:false,animate:{x:Ft[w]??0,opacity:tt[w]??1},transition:et,$index:w,$left:w*y,$size:f,$isHidden:tt[w]===0,children:Kt()},zt))})})}var Pt=forwardRef(({title:t,id:e,className:r,...a},i)=>{let o=t!=null&&t!=="",n=jsx(bt,{ref:i,id:e,"data-testid":e??"AvatarStackItem",className:nc(s.overlapItem,!o&&E,r),...a});return o?jsx(p,{title:t,wrapperProps:{className:E},children:n}):n});Pt.displayName="AvatarStackItem";var Y=memo(Pt);function te(t){return jsx(p,{title:`${t} more`,wrapperProps:{className:E},children:jsx(xt,{className:s.overflow,children:jsxs("span",{children:["+",t]})})})}function G({source:t,maxItems:e,renderOverflow:r,slotProps:a,rootRef:i,id:o,"data-testid":n,className:c,sx:d}){let m=a?.layout?.size??h,{renderItem:S}=t,A=W({source:{...t,renderItem:(u,l,p)=>jsx(Y,{children:S(u,l,p)})},maxItems:e,slotSize:m,renderOverflow:u=>r?.(u)??te(u.overflowItems.length)});return jsx(gt,{ref:i,id:o,"data-testid":n,className:nc(s.root,c),sx:d,$slotSize:m,children:A.map(({key:u,render:l})=>jsx(Fragment,{children:l()},u))})}function ne({variant:t=K,items:e,getItemKey:r,renderItem:a,maxItems:i,renderOverflow:o,compact:n=false,id:c,"data-testid":d,slotProps:m,sx:S,className:A},u){let l=useMemo(()=>nt({items:e,getItemKey:r,renderItem:a}),[e,r,a]);if(!l)return null;let p={source:l,maxItems:i,renderOverflow:o,slotProps:m,rootRef:u,id:c,"data-testid":d??c??"AvatarStack",className:A,sx:S};return t==="static"?jsx(G,{...p}):jsx(J,{...p,fanOutDirection:it(t),compact:n})}var Mt=forwardRef(ne);Mt.displayName="AvatarStack";var ie=memo(Mt),le=ie;export{s as a,Ut as b,K as c,Y as d,le as e};