@tap-payments/os-micro-frontend-shared 0.3.263 → 0.3.264-test.1793609694

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 (260) hide show
  1. package/build/_chunks/{chunk-6IAMZFT6.js → chunk-2JYBMD4I.js} +1 -1
  2. package/build/_chunks/{chunk-ZRRZG4CU.js → chunk-4JUVQWRF.js} +1 -1
  3. package/build/_chunks/chunk-5DKCOPDF.js +1 -0
  4. package/build/_chunks/{chunk-ALZSCMJI.js → chunk-64ZDTAAW.js} +1 -1
  5. package/build/_chunks/{chunk-VDOQXEUT.js → chunk-7NMMD6VJ.js} +1 -1
  6. package/build/_chunks/{chunk-54TY5SXL.js → chunk-ABVY4O2O.js} +1 -1
  7. package/build/_chunks/{chunk-OL6PQPSI.js → chunk-AJS7K55Q.js} +1 -1
  8. package/build/_chunks/chunk-AXNWVU3K.js +2 -0
  9. package/build/_chunks/{chunk-MBC5H6W7.js → chunk-BNM6FJCR.js} +1 -1
  10. package/build/_chunks/{chunk-3CMVSEFO.js → chunk-BRFCMPF5.js} +1 -1
  11. package/build/_chunks/{chunk-LJY75SQY.js → chunk-BXVLLRHG.js} +1 -1
  12. package/build/_chunks/{chunk-Q6AL55UP.js → chunk-DFEQ23C7.js} +1 -1
  13. package/build/_chunks/{chunk-5BAFTVZQ.js → chunk-DJRPY3A2.js} +1 -1
  14. package/build/_chunks/{chunk-ZZPTXUPF.js → chunk-DOZLA7RE.js} +1 -1
  15. package/build/_chunks/{chunk-PGRQEN5C.js → chunk-DRRME7J2.js} +1 -1
  16. package/build/_chunks/{chunk-BTE72W4R.js → chunk-EUMG4QKT.js} +1 -1
  17. package/build/_chunks/{chunk-YFIYVG7E.js → chunk-F3U4ZIAP.js} +1 -1
  18. package/build/_chunks/{chunk-IA5IEBOH.js → chunk-FMUJQ45L.js} +1 -1
  19. package/build/_chunks/{chunk-IRBWQZSH.js → chunk-FNUU2KSZ.js} +1 -1
  20. package/build/_chunks/{chunk-6BFV6NCN.js → chunk-GBGW63EG.js} +1 -1
  21. package/build/_chunks/{chunk-EB24OXAG.js → chunk-GFOWTME6.js} +1 -1
  22. package/build/_chunks/{chunk-5DFEQLOX.js → chunk-GHI2J2Y4.js} +1 -1
  23. package/build/_chunks/{chunk-44P3BD62.js → chunk-H4FZYTL7.js} +1 -1
  24. package/build/_chunks/chunk-HEMK2P3G.js +9 -0
  25. package/build/_chunks/{chunk-WYJOH2AK.js → chunk-HOHQMC2O.js} +1 -1
  26. package/build/_chunks/{chunk-PNIR4GUC.js → chunk-IBHWDBBJ.js} +1 -1
  27. package/build/_chunks/{chunk-ESRTU72R.js → chunk-IPEPXEL5.js} +1 -1
  28. package/build/_chunks/chunk-K5TV637V.js +2 -0
  29. package/build/_chunks/{chunk-JZN7D44A.js → chunk-K6LOVRKX.js} +1 -1
  30. package/build/_chunks/{chunk-Y2GYQNCW.js → chunk-KCIFOOFA.js} +1 -1
  31. package/build/_chunks/chunk-L3NA7BJY.js +2 -0
  32. package/build/_chunks/{chunk-UPSV4H3R.js → chunk-LDCBWAC4.js} +1 -1
  33. package/build/_chunks/{chunk-74TIGJAP.js → chunk-LON6X4MJ.js} +1 -1
  34. package/build/_chunks/{chunk-N7BI2AMJ.js → chunk-LTIWXK7D.js} +1 -1
  35. package/build/_chunks/{chunk-HBR7P4LZ.js → chunk-LVQ2UFZT.js} +1 -1
  36. package/build/_chunks/{chunk-BFVDSVFM.js → chunk-LXG5YXOJ.js} +1 -1
  37. package/build/_chunks/chunk-MF5ATA3Y.js +1 -0
  38. package/build/_chunks/{chunk-TYMPXKFT.js → chunk-MI3EC2ZF.js} +1 -1
  39. package/build/_chunks/{chunk-QNBOZQDY.js → chunk-NUCUSAD2.js} +1 -1
  40. package/build/_chunks/{chunk-TC4ME6DZ.js → chunk-ONANHXZA.js} +1 -1
  41. package/build/_chunks/{chunk-2YNDLGG6.js → chunk-OOLWSYGD.js} +1 -1
  42. package/build/_chunks/{chunk-WHPBDYOY.js → chunk-PUJ762TG.js} +1 -1
  43. package/build/_chunks/chunk-RC2N67CM.js +2 -0
  44. package/build/_chunks/{chunk-7GTNCNBB.js → chunk-REZFP4CA.js} +1 -1
  45. package/build/_chunks/chunk-RNJI3YXH.js +1 -0
  46. package/build/_chunks/chunk-RUFO5P34.js +1 -0
  47. package/build/_chunks/{chunk-334EPCW5.js → chunk-SMJCH23I.js} +1 -1
  48. package/build/_chunks/chunk-SRVQWLPZ.js +1 -0
  49. package/build/_chunks/{chunk-JWLIHVLP.js → chunk-TN55SPRQ.js} +1 -1
  50. package/build/_chunks/{chunk-4HUB6MWM.js → chunk-TX3XM6XL.js} +1 -1
  51. package/build/_chunks/chunk-TY7VGG46.js +1 -0
  52. package/build/_chunks/chunk-TZOMS57X.js +1 -0
  53. package/build/_chunks/{chunk-TDNUHD3F.js → chunk-UC5FMNUV.js} +1 -1
  54. package/build/_chunks/chunk-UFNFYH2N.js +1 -0
  55. package/build/_chunks/{chunk-M6SPV57Z.js → chunk-UPZR423T.js} +1 -1
  56. package/build/_chunks/{chunk-B4T3R7V3.js → chunk-UXR6RZN4.js} +1 -1
  57. package/build/_chunks/{chunk-LEFLUMTS.js → chunk-WC2MF35C.js} +1 -1
  58. package/build/_chunks/chunk-WFQ2555H.js +1 -0
  59. package/build/_chunks/{chunk-MQT2XWOM.js → chunk-WXCTMI3J.js} +1 -1
  60. package/build/_chunks/{chunk-ZT35MSJQ.js → chunk-X5HRCMTE.js} +1 -1
  61. package/build/_chunks/{chunk-MGH52F2U.js → chunk-XRUOTYCI.js} +1 -1
  62. package/build/_chunks/{chunk-7SNHZ7VW.js → chunk-XXCH74F3.js} +1 -1
  63. package/build/_chunks/{chunk-HWDXYAQY.js → chunk-YIZKLFYJ.js} +1 -1
  64. package/build/_chunks/{chunk-7ZWAT3EG.js → chunk-ZCULKYWE.js} +1 -1
  65. package/build/_chunks/{chunk-OGVYYV4P.js → chunk-ZUK5FRG5.js} +1 -1
  66. package/build/components/ActionsDropdownMenu/index.js +1 -1
  67. package/build/components/Alert/index.js +1 -1
  68. package/build/components/AppServices/index.js +1 -1
  69. package/build/components/AppServicesBar/index.js +1 -1
  70. package/build/components/AppWindowWrapper/index.js +1 -1
  71. package/build/components/AreaChart/index.js +1 -1
  72. package/build/components/Autocomplete/Autocomplete.d.ts +5 -10
  73. package/build/components/Autocomplete/constants.d.ts +21 -0
  74. package/build/components/Autocomplete/icons.d.ts +10 -0
  75. package/build/components/Autocomplete/index.d.ts +3 -1
  76. package/build/components/Autocomplete/index.js +1 -1
  77. package/build/components/Autocomplete/style.d.ts +37 -6
  78. package/build/components/Autocomplete/type.d.ts +59 -0
  79. package/build/components/Autocomplete/utils.d.ts +9 -0
  80. package/build/components/AvatarStack/index.js +1 -1
  81. package/build/components/Calender/index.js +1 -1
  82. package/build/components/Card/index.js +1 -1
  83. package/build/components/CardList/index.js +1 -1
  84. package/build/components/ColorPicker/index.js +1 -1
  85. package/build/components/ColorPicker/style.d.ts +1 -1
  86. package/build/components/ColumnViews/index.d.ts +1 -2
  87. package/build/components/ColumnViews/index.js +1 -1
  88. package/build/components/ColumnViews/types.d.ts +0 -5
  89. package/build/components/ConfirmDialog/index.js +1 -1
  90. package/build/components/CountryFilter/index.js +1 -1
  91. package/build/components/CountryFlag/CountryFlag.d.ts +2 -10
  92. package/build/components/CountryFlag/constants.d.ts +4 -0
  93. package/build/components/CountryFlag/index.d.ts +3 -2
  94. package/build/components/CountryFlag/index.js +1 -1
  95. package/build/components/CountryFlag/style.d.ts +4 -0
  96. package/build/components/CountryFlag/type.d.ts +21 -0
  97. package/build/components/CurrenciesMenu/index.js +1 -1
  98. package/build/components/CurrencyAmount/index.js +1 -1
  99. package/build/components/CurrencyAmountInput/index.js +1 -1
  100. package/build/components/CurrencySymbol/CurrencySymbol.d.ts +3 -9
  101. package/build/components/CurrencySymbol/constants.d.ts +10 -0
  102. package/build/components/CurrencySymbol/index.d.ts +3 -2
  103. package/build/components/CurrencySymbol/index.js +1 -1
  104. package/build/components/CurrencySymbol/style.d.ts +7 -7
  105. package/build/components/CurrencySymbol/type.d.ts +19 -0
  106. package/build/components/DateFilter/index.js +1 -1
  107. package/build/components/DateInput/DateInput.d.ts +4 -0
  108. package/build/components/DateInput/constants.d.ts +74 -0
  109. package/build/components/DateInput/icons.d.ts +3 -0
  110. package/build/components/DateInput/index.d.ts +5 -0
  111. package/build/components/DateInput/index.js +1 -0
  112. package/build/components/DateInput/style.d.ts +38 -0
  113. package/build/components/DateInput/type.d.ts +84 -0
  114. package/build/components/DateInput/utils.d.ts +25 -0
  115. package/build/components/DeviceIcon/index.js +1 -1
  116. package/build/components/DropdownMenu/index.js +1 -1
  117. package/build/components/EmptyState/index.js +1 -1
  118. package/build/components/ErrorToast/index.js +1 -1
  119. package/build/components/FileDropbox/index.js +1 -1
  120. package/build/components/FilePreview/index.js +1 -1
  121. package/build/components/FileUploader/index.js +1 -1
  122. package/build/components/FilterChip/index.js +1 -1
  123. package/build/components/FilterDropdown/index.js +1 -1
  124. package/build/components/Filters/index.js +1 -1
  125. package/build/components/FlippingCard/index.js +1 -1
  126. package/build/components/GroupedSelect/icons.d.ts +1 -1
  127. package/build/components/GroupedSelect/index.js +1 -1
  128. package/build/components/GroupedSelect/style.d.ts +1 -1
  129. package/build/components/HeatMap/index.js +1 -1
  130. package/build/components/JSONViewer/index.js +1 -1
  131. package/build/components/LeftPeekRightExpandingChip/index.js +1 -1
  132. package/build/components/ListColumnFilter/index.js +1 -1
  133. package/build/components/{ColumnViews → ListHeader/components}/ColumnViewsMenu.d.ts +7 -1
  134. package/build/components/ListHeader/index.js +1 -1
  135. package/build/components/ListLayout/index.js +1 -1
  136. package/build/components/Loader/index.js +1 -1
  137. package/build/components/Logo/index.js +1 -1
  138. package/build/components/MFWidgetLoader/index.js +1 -1
  139. package/build/components/MaskedText/index.js +1 -1
  140. package/build/components/{NestedMultiSelect → MultiLevelSelect}/FieldSelectedValues.d.ts +2 -2
  141. package/build/components/MultiLevelSelect/MultiLevelSelect.d.ts +4 -0
  142. package/build/components/MultiLevelSelect/NodeMenuItem.d.ts +11 -0
  143. package/build/components/{NestedMultiSelect → MultiLevelSelect}/SelectableOption.d.ts +4 -4
  144. package/build/components/{NestedMultiSelect → MultiLevelSelect}/SelectedChips.d.ts +3 -3
  145. package/build/components/{NestedMultiSelect → MultiLevelSelect}/constants.d.ts +12 -12
  146. package/build/components/{InputBase/SelectBase/components/DefaultClearIcon.d.ts → MultiLevelSelect/icons.d.ts} +2 -2
  147. package/build/components/MultiLevelSelect/index.d.ts +4 -0
  148. package/build/components/MultiLevelSelect/index.js +1 -0
  149. package/build/components/{NestedMultiSelect → MultiLevelSelect}/type.d.ts +10 -10
  150. package/build/components/{NestedMultiSelect → MultiLevelSelect}/utils.d.ts +12 -12
  151. package/build/components/NestedDropdown/index.js +1 -1
  152. package/build/components/PhoneFilter/index.js +1 -1
  153. package/build/components/PhoneInput/index.js +1 -1
  154. package/build/components/ProgressRing/index.js +1 -1
  155. package/build/components/RadioGroup/index.js +1 -1
  156. package/build/components/RangeCalender/index.js +1 -1
  157. package/build/components/RatingCount/index.js +1 -1
  158. package/build/components/RightLeftExpandingCenterChip/index.js +1 -1
  159. package/build/components/SearchButton/index.js +1 -1
  160. package/build/components/SearchInput/index.js +1 -1
  161. package/build/components/Select/Select.d.ts +4 -0
  162. package/build/components/Select/SelectField.d.ts +37 -0
  163. package/build/components/Select/SelectFieldValue.d.ts +14 -0
  164. package/build/components/Select/constants.d.ts +49 -0
  165. package/build/components/Select/icons.d.ts +9 -0
  166. package/build/components/Select/index.d.ts +5 -0
  167. package/build/components/Select/index.js +1 -0
  168. package/build/components/Select/style.d.ts +87 -0
  169. package/build/components/Select/type.d.ts +102 -0
  170. package/build/components/Select/utils.d.ts +39 -0
  171. package/build/components/SheetViewChip/index.js +1 -1
  172. package/build/components/Sidebar/index.js +1 -1
  173. package/build/components/StatusBar/index.js +1 -1
  174. package/build/components/StatusButton/index.js +1 -1
  175. package/build/components/StatusFilter/index.js +1 -1
  176. package/build/components/StatusIcons/index.js +1 -1
  177. package/build/components/StatusLabel/index.js +1 -1
  178. package/build/components/TableCells/index.js +1 -1
  179. package/build/components/TableReports/index.js +1 -1
  180. package/build/components/TextInput/constants.d.ts +2 -0
  181. package/build/components/TextInput/index.js +1 -1
  182. package/build/components/TextInput/type.d.ts +6 -0
  183. package/build/components/TextInput/utils.d.ts +3 -1
  184. package/build/components/Timepicker/index.js +1 -1
  185. package/build/components/Toolbar/index.js +1 -1
  186. package/build/components/TreeDropdown/index.js +1 -1
  187. package/build/components/VerificationIcon/index.js +1 -1
  188. package/build/components/VirtualTables/index.js +1 -1
  189. package/build/components/index.d.ts +6 -8
  190. package/build/components/index.js +1 -1
  191. package/build/components/modules/RangeCalender/index.js +1 -1
  192. package/build/components/modules/VirtualTables/index.js +1 -1
  193. package/build/components/primitives/FieldFeedback/icons.d.ts +2 -1
  194. package/build/components/primitives/index.js +1 -1
  195. package/build/datetime/components/index.js +1 -1
  196. package/build/hooks/index.js +1 -1
  197. package/build/index.js +1 -1
  198. package/build/types/user.d.ts +0 -46
  199. package/build/utils/index.js +1 -1
  200. package/build/utils/number.d.ts +7 -0
  201. package/package.json +1 -1
  202. package/build/_chunks/chunk-4YB6A7BD.js +0 -8
  203. package/build/_chunks/chunk-53C2M4NA.js +0 -1
  204. package/build/_chunks/chunk-637B2KTR.js +0 -2
  205. package/build/_chunks/chunk-D43ULOY2.js +0 -1
  206. package/build/_chunks/chunk-DS6S5G66.js +0 -1
  207. package/build/_chunks/chunk-FOSRKOWU.js +0 -1
  208. package/build/_chunks/chunk-FQ2VMVUY.js +0 -0
  209. package/build/_chunks/chunk-HDCNWBW5.js +0 -1
  210. package/build/_chunks/chunk-HS3LRC2D.js +0 -1
  211. package/build/_chunks/chunk-I3LSSBRI.js +0 -1
  212. package/build/_chunks/chunk-K43ZLU4I.js +0 -2
  213. package/build/_chunks/chunk-L3QJZAXC.js +0 -1
  214. package/build/_chunks/chunk-MH3KQO3F.js +0 -1
  215. package/build/_chunks/chunk-MUR4ILTY.js +0 -2
  216. package/build/_chunks/chunk-NW7HJXBW.js +0 -8
  217. package/build/_chunks/chunk-SNCNXCPA.js +0 -1
  218. package/build/_chunks/chunk-TR2D6CJW.js +0 -2
  219. package/build/_chunks/chunk-XK6PKLJK.js +0 -1
  220. package/build/_chunks/chunk-Y7SE3WMR.js +0 -1
  221. package/build/_chunks/chunk-YROLX5D7.js +0 -8
  222. package/build/components/FormSelect/FormSelect.d.ts +0 -8
  223. package/build/components/FormSelect/FormSelectMenuSearchInput.d.ts +0 -9
  224. package/build/components/FormSelect/FormSelectSearchableField.d.ts +0 -3
  225. package/build/components/FormSelect/FormSelectSelectMenu.d.ts +0 -21
  226. package/build/components/FormSelect/index.d.ts +0 -3
  227. package/build/components/FormSelect/index.js +0 -1
  228. package/build/components/FormSelect/style.d.ts +0 -52
  229. package/build/components/FormSelect/type.d.ts +0 -105
  230. package/build/components/FormSelect/utils.d.ts +0 -15
  231. package/build/components/Icons/LoadingIcon.d.ts +0 -4
  232. package/build/components/Icons/MenuSearchIcon.d.ts +0 -3
  233. package/build/components/Icons/index.d.ts +0 -2
  234. package/build/components/Icons/index.js +0 -1
  235. package/build/components/InputBase/SelectBase/SelectBase.d.ts +0 -46
  236. package/build/components/InputBase/SelectBase/SelectBaseMultiple.d.ts +0 -33
  237. package/build/components/InputBase/SelectBase/components/DefaultSelectIcon.d.ts +0 -5
  238. package/build/components/InputBase/SelectBase/components/SelectBaseEndAdornment.d.ts +0 -13
  239. package/build/components/InputBase/SelectBase/components/SelectInlineProgress.d.ts +0 -6
  240. package/build/components/InputBase/SelectBase/index.d.ts +0 -3
  241. package/build/components/InputBase/SelectBase/style.d.ts +0 -14
  242. package/build/components/InputBase/SelectBase/utils.d.ts +0 -2
  243. package/build/components/InputBase/index.d.ts +0 -1
  244. package/build/components/InputBase/index.js +0 -1
  245. package/build/components/Inputs/Select/Select.d.ts +0 -3
  246. package/build/components/Inputs/Select/index.d.ts +0 -2
  247. package/build/components/Inputs/Select/type.d.ts +0 -9
  248. package/build/components/Inputs/index.d.ts +0 -2
  249. package/build/components/Inputs/index.js +0 -1
  250. package/build/components/MultiSelect/MultiSelect.d.ts +0 -21
  251. package/build/components/MultiSelect/index.d.ts +0 -2
  252. package/build/components/MultiSelect/index.js +0 -1
  253. package/build/components/MultiSelect/style.d.ts +0 -40
  254. package/build/components/NestedMultiSelect/NestedMultiSelect.d.ts +0 -4
  255. package/build/components/NestedMultiSelect/NodeMenuItem.d.ts +0 -11
  256. package/build/components/NestedMultiSelect/icons.d.ts +0 -2
  257. package/build/components/NestedMultiSelect/index.d.ts +0 -4
  258. package/build/components/NestedMultiSelect/index.js +0 -1
  259. /package/build/components/{NestedMultiSelect → MultiLevelSelect}/BranchMenuItem.d.ts +0 -0
  260. /package/build/components/{NestedMultiSelect → MultiLevelSelect}/style.d.ts +0 -0
@@ -1 +1 @@
1
- import {V,R}from'./chunk-K43ZLU4I.js';import {zc}from'./chunk-I3LSSBRI.js';import {xb}from'./chunk-IQAHULGQ.js';import {useId,useState,useRef,useMemo}from'react';import T from'@mui/material/Box';import {ClickAwayListener}from'@mui/material';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var h=styled("span")(()=>({fontSize:"11px"})),I=styled(V)(()=>({display:"flex",alignItems:"center",paddingInline:"16px",gap:"4px",borderBlock:"1px solid #F2F2F2",fontSize:"11px","&:hover":{backgroundColor:"#fff",boxShadow:"0px 0px 16px 0px #00000021"}})),M=styled(V)(({theme:e})=>({color:e.palette.info.dark,backgroundColor:"#F4F4F4",fontWeight:600,paddingInline:"16px",fontSize:"11px",gap:"4px"})),k=styled(V)(()=>({gap:"2px",paddingInline:"16px",fontSize:"11px","&:hover":{backgroundColor:"#fff",boxShadow:"0px 0px 16px 0px #00000021"}})),A=styled("img")({marginLeft:"auto",width:16,height:12}),b=styled("img")({borderRadius:"2px",width:16,height:12,flexShrink:0}),w={marginTop:"8px",marginBottom:"8px",maxHeight:"190px",overflow:"auto"},P={zIndex:99999};function s({onCountriesChange:e,sx:L,selectedCountries:r,countriesOptions:i}){let B=zc(useId(),"country-filter"),[a,g]=useState(null),f=useRef(null),y=!!a,E=()=>{if(!y){g(f.current);return}d();},d=()=>{g(null);},z=t=>r?.includes(t)??false,u=t=>{e(t);},H=t=>{let o=r?.includes(t)?r?.filter(m=>m!==t):[...r??[],t];u(o),e(o);},x=useMemo(()=>r?.length===i.length,[r,i]);return jsx(ClickAwayListener,{onClickAway:d,children:jsxs(T,{ref:f,sx:L,id:B,"data-testid":"CountryFilter",children:[jsx(T,{children:jsxs(I,{onMouseEnter:t=>{t.stopPropagation(),E();},startAdornment:null,children:[jsx(h,{children:"Country"}),jsx(A,{src:xb,alt:""})]})}),jsxs(R,{open:y,anchorEl:a,sx:w,placement:"right-start",popperSx:P,children:[jsx(M,{onClick:t=>{t.stopPropagation(),x?(u([]),e([])):(u(i.map(({value:o})=>o)),e(i.map(({value:o})=>o)));},isSelected:x,children:x?"Unselect All":"Select All"}),i.map(({value:t,label:o,icon:m})=>jsxs(k,{isSelected:z(t),onClick:()=>H(t),children:[jsx(b,{src:m,alt:""}),o]},t))]})]})})}var tt=s;export{s as a,tt as b};
1
+ import {V,R}from'./chunk-AXNWVU3K.js';import {Bc}from'./chunk-RUFO5P34.js';import {xb}from'./chunk-IQAHULGQ.js';import {useId,useState,useRef,useMemo}from'react';import T from'@mui/material/Box';import {ClickAwayListener}from'@mui/material';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var h=styled("span")(()=>({fontSize:"11px"})),I=styled(V)(()=>({display:"flex",alignItems:"center",paddingInline:"16px",gap:"4px",borderBlock:"1px solid #F2F2F2",fontSize:"11px","&:hover":{backgroundColor:"#fff",boxShadow:"0px 0px 16px 0px #00000021"}})),M=styled(V)(({theme:e})=>({color:e.palette.info.dark,backgroundColor:"#F4F4F4",fontWeight:600,paddingInline:"16px",fontSize:"11px",gap:"4px"})),k=styled(V)(()=>({gap:"2px",paddingInline:"16px",fontSize:"11px","&:hover":{backgroundColor:"#fff",boxShadow:"0px 0px 16px 0px #00000021"}})),A=styled("img")({marginLeft:"auto",width:16,height:12}),b=styled("img")({borderRadius:"2px",width:16,height:12,flexShrink:0}),w={marginTop:"8px",marginBottom:"8px",maxHeight:"190px",overflow:"auto"},P={zIndex:99999};function s({onCountriesChange:e,sx:L,selectedCountries:r,countriesOptions:i}){let B=Bc(useId(),"country-filter"),[a,g]=useState(null),f=useRef(null),y=!!a,E=()=>{if(!y){g(f.current);return}d();},d=()=>{g(null);},z=t=>r?.includes(t)??false,u=t=>{e(t);},H=t=>{let o=r?.includes(t)?r?.filter(m=>m!==t):[...r??[],t];u(o),e(o);},x=useMemo(()=>r?.length===i.length,[r,i]);return jsx(ClickAwayListener,{onClickAway:d,children:jsxs(T,{ref:f,sx:L,id:B,"data-testid":"CountryFilter",children:[jsx(T,{children:jsxs(I,{onMouseEnter:t=>{t.stopPropagation(),E();},startAdornment:null,children:[jsx(h,{children:"Country"}),jsx(A,{src:xb,alt:""})]})}),jsxs(R,{open:y,anchorEl:a,sx:w,placement:"right-start",popperSx:P,children:[jsx(M,{onClick:t=>{t.stopPropagation(),x?(u([]),e([])):(u(i.map(({value:o})=>o)),e(i.map(({value:o})=>o)));},isSelected:x,children:x?"Unselect All":"Select All"}),i.map(({value:t,label:o,icon:m})=>jsxs(k,{isSelected:z(t),onClick:()=>H(t),children:[jsx(b,{src:m,alt:""}),o]},t))]})]})})}var tt=s;export{s as a,tt as b};
@@ -1 +1 @@
1
- import {j}from'./chunk-K43ZLU4I.js';import {Ia,lc}from'./chunk-I3LSSBRI.js';import {forwardRef,memo}from'react';import {styled}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var r="os-shared-CurrencyAmount",e={root:`${r}-root`,integer:`${r}-integer`,separator:`${r}-separator`,decimal:`${r}-decimal`};var l=styled(j)(({theme:t})=>{let{fontSize:n,fontWeight:o}=t.v2.typography.textVariants.body.small.bold;return {fontSize:n,fontWeight:o,fontFamily:"inherit",lineHeight:"inherit",letterSpacing:"inherit",color:"inherit",display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",overflow:"auto"}}),u=styled("span")(({theme:t})=>({fontWeight:t.v2.typography.fontWeightRegular}));var f=forwardRef(({amount:t,currency:n,id:o,className:C,sx:A,...d},g)=>{let{integerAmount:h,decimalAmount:s}=Ia(t,n??"");return jsxs(l,{ref:g,component:"span",id:o,"data-testid":o??"CurrencyAmount",className:lc(e.root,C),sx:A,...d,children:[jsx("span",{className:e.integer,children:h}),s?jsxs(Fragment,{children:[jsx("span",{className:e.separator,children:"."}),jsx(u,{className:e.decimal,children:s})]}):null]})});f.displayName="CurrencyAmount";var S=memo(f);export{e as a,S as b};
1
+ import {j}from'./chunk-AXNWVU3K.js';import {Ka,nc}from'./chunk-RUFO5P34.js';import {forwardRef,memo}from'react';import {styled}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var r="os-shared-CurrencyAmount",e={root:`${r}-root`,integer:`${r}-integer`,separator:`${r}-separator`,decimal:`${r}-decimal`};var l=styled(j)(({theme:t})=>{let{fontSize:n,fontWeight:o}=t.v2.typography.textVariants.body.small.bold;return {fontSize:n,fontWeight:o,fontFamily:"inherit",lineHeight:"inherit",letterSpacing:"inherit",color:"inherit",display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",overflow:"auto"}}),u=styled("span")(({theme:t})=>({fontWeight:t.v2.typography.fontWeightRegular}));var f=forwardRef(({amount:t,currency:n,id:o,className:C,sx:A,...d},g)=>{let{integerAmount:h,decimalAmount:s}=Ka(t,n??"");return jsxs(l,{ref:g,component:"span",id:o,"data-testid":o??"CurrencyAmount",className:nc(e.root,C),sx:A,...d,children:[jsx("span",{className:e.integer,children:h}),s?jsxs(Fragment,{children:[jsx("span",{className:e.separator,children:"."}),jsx(u,{className:e.decimal,children:s})]}):null]})});f.displayName="CurrencyAmount";var S=memo(f);export{e as a,S as b};
@@ -1 +1 @@
1
- import {d,j}from'./chunk-K43ZLU4I.js';import {Xb,Ub,lc}from'./chunk-I3LSSBRI.js';import {Kj,Qe,Gb}from'./chunk-IQAHULGQ.js';import {forwardRef,useState,useCallback,useMemo,memo}from'react';import {useDropzone}from'react-dropzone';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var p="os-shared-FileUploader",a={root:`${p}-root`,content:`${p}-content`,iconWrapper:`${p}-iconWrapper`,textWrapper:`${p}-textWrapper`,upload:`${p}-upload`,maximum:`${p}-maximum`,errorMessage:`${p}-errorMessage`,closeButton:`${p}-closeButton`};var E=styled("div",{shouldForwardProp:e=>e!=="$disabled"})(({theme:e,$disabled:o})=>{let{grey:s}=e.v2.palette;return {width:"100%",borderRadius:e.v2.radius(4),padding:`${e.v2.spacing(4)} ${e.v2.spacing(8)}`,display:"flex",alignItems:"center",justifyContent:"flex-start",backgroundColor:s[50],gap:e.v2.spacing(8),cursor:o?"default":"pointer",position:"relative",'& [data-slot="input"]':{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:1,margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:1,whiteSpace:"nowrap"},...o&&{'& [data-slot="content"], & [data-slot="icon-wrapper"]':{cursor:"default",opacity:.6}}}}),V=styled("div")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",color:"inherit",cursor:"pointer",gap:e.v2.spacing(8)})),v=styled("div")(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center",gap:e.v2.spacing(4),color:"inherit"})),G=styled("div")(({theme:e})=>{let{grey:o,base:s}=e.v2.palette;return {display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",width:32,height:32,flexShrink:0,padding:e.v2.spacing(7),backgroundColor:s.white,borderRadius:e.v2.radius(4),border:`1px solid ${o[100]}`}}),H=styled("button")(()=>({display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",backgroundColor:"transparent",border:"none",width:16,height:16,padding:0,marginLeft:"auto"}));function J(e,o){return e||(o?`PDF, JPG or PNG files up to ${o}`:"PDF, JPG or PNG files")}var pe="Click to upload",L=forwardRef(function({options:o,files:s,onChange:$,processFiles:U,disabled:f,error:I,invalidFileTypeText:P="Invalid file type",fileTooLargePrefix:W="File is larger than",maxFileSize:F,preventDuplicates:y,label:A=pe,hintText:K,onResetError:C,className:O,sx:Q,id:w},Y){let[S,g]=useState(null),T=useCallback(t=>{if(g(null),U)return U(t);if(!y)return t.map(r=>({file:r,id:r.name}));let l=[],n=[];for(let r of t)Xb(r,s??[])?l.push(r.name):n.push({file:r,id:r.name});if(l.length>0){let r=l.length===1?"file":"files";g(`Duplicate ${r} detected: ${l.join(", ")}`);}return n},[s,y,U]),Z=useCallback(t=>{if(t.length===0){g(null);return}let l=T(t);(l.length>0||!y)&&$?.(l);},[T,y,$]),{getRootProps:_,getInputProps:ee,open:te,isDragReject:j$1,fileRejections:d$1}=useDropzone({...o,disabled:f||o?.disabled,onDrop:(t,l,n)=>{o?.onDrop?.(t,l,n),Z(t);}}),x=useMemo(()=>{if(F)return F;if(o?.maxSize)return Ub(o.maxSize,0).toUpperCase()},[F,o?.maxSize]),c=useMemo(()=>{let t=!!d$1?.length&&d$1.some(n=>n.errors?.some(r=>r.code==="file-invalid-type"));return !!d$1?.length&&d$1.some(n=>n.errors?.some(r=>r.code==="file-too-large"))&&x?`${W} ${x}`:t||j$1?P:S||I},[j$1,d$1,x,S,I,P,W]),oe=J(K,x),re=useCallback(t=>{t.stopPropagation(),g(null),C?.(t);},[C]);return jsxs(E,{ref:Y,id:w,"data-testid":w??"FileUploader",..._(),className:lc(a.root,O),sx:Q,$disabled:f,onClick:f?void 0:te,children:[jsx("input",{"data-slot":"input",...ee(),disabled:f}),jsxs(V,{"data-slot":"content",className:a.content,children:[jsx(G,{"data-slot":"icon-wrapper",className:a.iconWrapper,children:jsx(d,{src:c?Kj:Qe,alt:c?"Upload error":"Upload file",sx:{width:16,height:16}})}),c?jsxs(v,{className:a.textWrapper,children:[jsx(j,{textVariant:"micro.medium",className:a.errorMessage,sx:t=>({color:t.v2.palette.error[500]}),children:c}),jsx(j,{textVariant:"caption.medium",className:a.upload,children:"Click to upload again"})]}):jsxs(v,{className:a.textWrapper,children:[jsx(j,{textVariant:"caption.medium",className:a.upload,children:A}),jsx(j,{textVariant:"micro.medium",className:a.maximum,sx:{opacity:.7},children:oe})]})]}),c&&C&&jsx(H,{type:"button","data-slot":"close-icon-wrapper",className:a.closeButton,onClick:re,"aria-label":"Dismiss upload error",children:jsx(d,{src:Gb,alt:"Dismiss",sx:{width:10,height:10}})})]})});L.displayName="FileUploader";var X=memo(L);export{a,X as b};
1
+ import {d,j}from'./chunk-AXNWVU3K.js';import {Zb,Wb,nc}from'./chunk-RUFO5P34.js';import {Kj,Qe,Gb}from'./chunk-IQAHULGQ.js';import {forwardRef,useState,useCallback,useMemo,memo}from'react';import {useDropzone}from'react-dropzone';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var p="os-shared-FileUploader",a={root:`${p}-root`,content:`${p}-content`,iconWrapper:`${p}-iconWrapper`,textWrapper:`${p}-textWrapper`,upload:`${p}-upload`,maximum:`${p}-maximum`,errorMessage:`${p}-errorMessage`,closeButton:`${p}-closeButton`};var E=styled("div",{shouldForwardProp:e=>e!=="$disabled"})(({theme:e,$disabled:o})=>{let{grey:s}=e.v2.palette;return {width:"100%",borderRadius:e.v2.radius(4),padding:`${e.v2.spacing(4)} ${e.v2.spacing(8)}`,display:"flex",alignItems:"center",justifyContent:"flex-start",backgroundColor:s[50],gap:e.v2.spacing(8),cursor:o?"default":"pointer",position:"relative",'& [data-slot="input"]':{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:1,margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:1,whiteSpace:"nowrap"},...o&&{'& [data-slot="content"], & [data-slot="icon-wrapper"]':{cursor:"default",opacity:.6}}}}),V=styled("div")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",color:"inherit",cursor:"pointer",gap:e.v2.spacing(8)})),v=styled("div")(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center",gap:e.v2.spacing(4),color:"inherit"})),G=styled("div")(({theme:e})=>{let{grey:o,base:s}=e.v2.palette;return {display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",width:32,height:32,flexShrink:0,padding:e.v2.spacing(7),backgroundColor:s.white,borderRadius:e.v2.radius(4),border:`1px solid ${o[100]}`}}),H=styled("button")(()=>({display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",backgroundColor:"transparent",border:"none",width:16,height:16,padding:0,marginLeft:"auto"}));function J(e,o){return e||(o?`PDF, JPG or PNG files up to ${o}`:"PDF, JPG or PNG files")}var pe="Click to upload",L=forwardRef(function({options:o,files:s,onChange:$,processFiles:U,disabled:f,error:I,invalidFileTypeText:P="Invalid file type",fileTooLargePrefix:W="File is larger than",maxFileSize:F,preventDuplicates:y,label:A=pe,hintText:K,onResetError:C,className:O,sx:Q,id:w},Y){let[S,g]=useState(null),T=useCallback(t=>{if(g(null),U)return U(t);if(!y)return t.map(r=>({file:r,id:r.name}));let l=[],n=[];for(let r of t)Zb(r,s??[])?l.push(r.name):n.push({file:r,id:r.name});if(l.length>0){let r=l.length===1?"file":"files";g(`Duplicate ${r} detected: ${l.join(", ")}`);}return n},[s,y,U]),Z=useCallback(t=>{if(t.length===0){g(null);return}let l=T(t);(l.length>0||!y)&&$?.(l);},[T,y,$]),{getRootProps:_,getInputProps:ee,open:te,isDragReject:j$1,fileRejections:d$1}=useDropzone({...o,disabled:f||o?.disabled,onDrop:(t,l,n)=>{o?.onDrop?.(t,l,n),Z(t);}}),x=useMemo(()=>{if(F)return F;if(o?.maxSize)return Wb(o.maxSize,0).toUpperCase()},[F,o?.maxSize]),c=useMemo(()=>{let t=!!d$1?.length&&d$1.some(n=>n.errors?.some(r=>r.code==="file-invalid-type"));return !!d$1?.length&&d$1.some(n=>n.errors?.some(r=>r.code==="file-too-large"))&&x?`${W} ${x}`:t||j$1?P:S||I},[j$1,d$1,x,S,I,P,W]),oe=J(K,x),re=useCallback(t=>{t.stopPropagation(),g(null),C?.(t);},[C]);return jsxs(E,{ref:Y,id:w,"data-testid":w??"FileUploader",..._(),className:nc(a.root,O),sx:Q,$disabled:f,onClick:f?void 0:te,children:[jsx("input",{"data-slot":"input",...ee(),disabled:f}),jsxs(V,{"data-slot":"content",className:a.content,children:[jsx(G,{"data-slot":"icon-wrapper",className:a.iconWrapper,children:jsx(d,{src:c?Kj:Qe,alt:c?"Upload error":"Upload file",sx:{width:16,height:16}})}),c?jsxs(v,{className:a.textWrapper,children:[jsx(j,{textVariant:"micro.medium",className:a.errorMessage,sx:t=>({color:t.v2.palette.error[500]}),children:c}),jsx(j,{textVariant:"caption.medium",className:a.upload,children:"Click to upload again"})]}):jsxs(v,{className:a.textWrapper,children:[jsx(j,{textVariant:"caption.medium",className:a.upload,children:A}),jsx(j,{textVariant:"micro.medium",className:a.maximum,sx:{opacity:.7},children:oe})]})]}),c&&C&&jsx(H,{type:"button","data-slot":"close-icon-wrapper",className:a.closeButton,onClick:re,"aria-label":"Dismiss upload error",children:jsx(d,{src:Gb,alt:"Dismiss",sx:{width:10,height:10}})})]})});L.displayName="FileUploader";var X=memo(L);export{a,X as b};
@@ -1 +1 @@
1
- import {L as L$1}from'./chunk-K43ZLU4I.js';import {lc}from'./chunk-I3LSSBRI.js';import {forwardRef,useRef,useState,useEffect,useCallback,memo}from'react';import y from'@mui/material/SvgIcon';import {jsxs,Fragment,jsx}from'react/jsx-runtime';import E from'@mui/material/IconButton';import G from'@mui/material/InputAdornment';import {styled}from'@mui/material/styles';var o="os-shared-SearchInput",t={root:`${o}-root`,searchAdornment:`${o}-searchAdornment`,searchButton:`${o}-searchButton`,clearButton:`${o}-clearButton`,searchIcon:`${o}-searchIcon`,clearIcon:`${o}-clearIcon`};var L=n=>jsx(y,{viewBox:"0 0 12 12",sx:{width:12,height:12},...n,children:jsx("path",{d:"M7.68817 8.21429L7.6463 8.17242L7.60036 8.20978C6.88378 8.79249 5.97154 9.14299 4.97917 9.14299C2.68489 9.14299 0.815625 7.27372 0.815625 4.97943C0.815625 2.68514 2.68489 0.815869 4.97917 0.815869C7.27345 0.815869 9.14271 2.68514 9.14271 4.97943C9.14271 5.9718 8.79221 6.88405 8.2095 7.60064L8.17215 7.64657L8.21401 7.68844L11.0754 10.5499L11.0754 10.5499L11.0764 10.5508C11.1121 10.5851 11.1406 10.6261 11.1602 10.6715C11.1798 10.7169 11.1902 10.7658 11.1907 10.8153C11.1912 10.8648 11.1818 10.9139 11.1631 10.9597C11.1444 11.0055 11.1168 11.0471 11.0818 11.0821C11.0468 11.1171 11.0052 11.1447 10.9594 11.1634C10.9136 11.1821 10.8645 11.1915 10.815 11.191C10.7655 11.1905 10.7167 11.1801 10.6712 11.1605C10.6258 11.1409 10.5848 11.1124 10.5505 11.0767L10.5496 11.0757L7.68817 8.21429ZM7.43625 7.35711L7.43682 7.35789L7.44469 7.34971C8.03496 6.73571 8.39896 5.90202 8.39896 4.97943C8.39896 3.08554 6.87305 1.55962 4.97917 1.55962C3.08528 1.55962 1.55937 3.08554 1.55937 4.97943C1.55937 6.87332 3.08528 8.39924 4.97917 8.39924C5.90175 8.39924 6.73544 8.03524 7.34944 7.44496L7.35011 7.44566L7.35683 7.43652C7.37913 7.40618 7.40591 7.37941 7.43625 7.35711Z",fill:"#20232B",stroke:"white",strokeWidth:.13125})}),g=n=>jsxs(y,{viewBox:"0 0 13 13",sx:{width:13,height:13},...n,children:[jsx("rect",{width:"13",height:"13",rx:"6.5",fill:"#F2F2F2"}),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:"#8D8D94"})]});var v=styled(G)(({theme:n})=>({display:"flex",alignItems:"center",gap:n.v2.spacing(4),flexShrink:0,paddingTop:1})),M={padding:2,borderRadius:"50%",flexShrink:0},B=styled(E)(()=>({...M,"&.Mui-disabled":{opacity:.5}})),x=styled(E)(()=>({...M}));var N=forwardRef(({clearable:n=true,onClear:P,disabled:p=false,value:a,defaultValue:d,onChange:T,endAdornment:H,id:s="SearchInput",className:k,onKeyDown:m,inputProps:A,onClick:D,...R},c)=>{let h=useRef(null),[$,C]=useState(()=>String(a??d??"").length>0),K=n&&$&&!p;useEffect(()=>{a!==void 0&&C(String(a??"").length>0);},[a]);let F=useCallback(e=>{h.current=e,typeof c=="function"?c(e):c&&(c.current=e);},[c]),Z=e=>{C(e.target.value.length>0),T?.(e);},O=e=>{e.stopPropagation(),D?.(e);},V=useCallback(e=>{e.stopPropagation(),m?.(e);},[m]),W=e=>{e.stopPropagation();let l=h.current;l&&(Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value")?.set?.call(l,""),l.dispatchEvent(new Event("input",{bubbles:true})),l.focus()),C(false),P?.();},j=e=>{e.stopPropagation(),h.current?.focus();},I=e=>{e.preventDefault();},q=jsxs(Fragment,{children:[jsx(v,{position:"end",className:t.searchAdornment,children:K?jsx(x,{className:t.clearButton,id:s?`${s}-clear-button`:void 0,type:"button","aria-label":"Clear search",disabled:p,disableRipple:true,onMouseDown:I,onClick:W,children:jsx(g,{className:t.clearIcon})}):jsx(B,{className:t.searchButton,id:s?`${s}-search-button`:void 0,type:"button","aria-label":"Search",disabled:p,disableRipple:true,onMouseDown:I,onClick:j,children:jsx(L,{className:t.searchIcon})})}),H]});return jsx(L$1,{...R,ref:F,id:s,type:"text",disabled:p,value:a,defaultValue:d,onChange:Z,onKeyDown:V,onClick:O,inputProps:{autoComplete:"off",...A},endAdornment:q,className:lc(t.root,k),"data-testid":"SearchInput"})});N.displayName="SearchInput";var w=memo(N);export{t as a,w as b};
1
+ import {L as L$1}from'./chunk-AXNWVU3K.js';import {nc}from'./chunk-RUFO5P34.js';import {forwardRef,useRef,useState,useEffect,useCallback,memo}from'react';import y from'@mui/material/SvgIcon';import {jsxs,Fragment,jsx}from'react/jsx-runtime';import E from'@mui/material/IconButton';import G from'@mui/material/InputAdornment';import {styled}from'@mui/material/styles';var o="os-shared-SearchInput",t={root:`${o}-root`,searchAdornment:`${o}-searchAdornment`,searchButton:`${o}-searchButton`,clearButton:`${o}-clearButton`,searchIcon:`${o}-searchIcon`,clearIcon:`${o}-clearIcon`};var L=n=>jsx(y,{viewBox:"0 0 12 12",sx:{width:12,height:12},...n,children:jsx("path",{d:"M7.68817 8.21429L7.6463 8.17242L7.60036 8.20978C6.88378 8.79249 5.97154 9.14299 4.97917 9.14299C2.68489 9.14299 0.815625 7.27372 0.815625 4.97943C0.815625 2.68514 2.68489 0.815869 4.97917 0.815869C7.27345 0.815869 9.14271 2.68514 9.14271 4.97943C9.14271 5.9718 8.79221 6.88405 8.2095 7.60064L8.17215 7.64657L8.21401 7.68844L11.0754 10.5499L11.0754 10.5499L11.0764 10.5508C11.1121 10.5851 11.1406 10.6261 11.1602 10.6715C11.1798 10.7169 11.1902 10.7658 11.1907 10.8153C11.1912 10.8648 11.1818 10.9139 11.1631 10.9597C11.1444 11.0055 11.1168 11.0471 11.0818 11.0821C11.0468 11.1171 11.0052 11.1447 10.9594 11.1634C10.9136 11.1821 10.8645 11.1915 10.815 11.191C10.7655 11.1905 10.7167 11.1801 10.6712 11.1605C10.6258 11.1409 10.5848 11.1124 10.5505 11.0767L10.5496 11.0757L7.68817 8.21429ZM7.43625 7.35711L7.43682 7.35789L7.44469 7.34971C8.03496 6.73571 8.39896 5.90202 8.39896 4.97943C8.39896 3.08554 6.87305 1.55962 4.97917 1.55962C3.08528 1.55962 1.55937 3.08554 1.55937 4.97943C1.55937 6.87332 3.08528 8.39924 4.97917 8.39924C5.90175 8.39924 6.73544 8.03524 7.34944 7.44496L7.35011 7.44566L7.35683 7.43652C7.37913 7.40618 7.40591 7.37941 7.43625 7.35711Z",fill:"#20232B",stroke:"white",strokeWidth:.13125})}),g=n=>jsxs(y,{viewBox:"0 0 13 13",sx:{width:13,height:13},...n,children:[jsx("rect",{width:"13",height:"13",rx:"6.5",fill:"#F2F2F2"}),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:"#8D8D94"})]});var v=styled(G)(({theme:n})=>({display:"flex",alignItems:"center",gap:n.v2.spacing(4),flexShrink:0,paddingTop:1})),M={padding:2,borderRadius:"50%",flexShrink:0},B=styled(E)(()=>({...M,"&.Mui-disabled":{opacity:.5}})),x=styled(E)(()=>({...M}));var N=forwardRef(({clearable:n=true,onClear:P,disabled:p=false,value:a,defaultValue:d,onChange:T,endAdornment:H,id:s="SearchInput",className:k,onKeyDown:m,inputProps:A,onClick:D,...R},c)=>{let h=useRef(null),[$,C]=useState(()=>String(a??d??"").length>0),K=n&&$&&!p;useEffect(()=>{a!==void 0&&C(String(a??"").length>0);},[a]);let F=useCallback(e=>{h.current=e,typeof c=="function"?c(e):c&&(c.current=e);},[c]),Z=e=>{C(e.target.value.length>0),T?.(e);},O=e=>{e.stopPropagation(),D?.(e);},V=useCallback(e=>{e.stopPropagation(),m?.(e);},[m]),W=e=>{e.stopPropagation();let l=h.current;l&&(Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value")?.set?.call(l,""),l.dispatchEvent(new Event("input",{bubbles:true})),l.focus()),C(false),P?.();},j=e=>{e.stopPropagation(),h.current?.focus();},I=e=>{e.preventDefault();},q=jsxs(Fragment,{children:[jsx(v,{position:"end",className:t.searchAdornment,children:K?jsx(x,{className:t.clearButton,id:s?`${s}-clear-button`:void 0,type:"button","aria-label":"Clear search",disabled:p,disableRipple:true,onMouseDown:I,onClick:W,children:jsx(g,{className:t.clearIcon})}):jsx(B,{className:t.searchButton,id:s?`${s}-search-button`:void 0,type:"button","aria-label":"Search",disabled:p,disableRipple:true,onMouseDown:I,onClick:j,children:jsx(L,{className:t.searchIcon})})}),H]});return jsx(L$1,{...R,ref:F,id:s,type:"text",disabled:p,value:a,defaultValue:d,onChange:Z,onKeyDown:V,onClick:O,inputProps:{autoComplete:"off",...A},endAdornment:q,className:nc(t.root,k),"data-testid":"SearchInput"})});N.displayName="SearchInput";var w=memo(N);export{t as a,w as b};
@@ -1,2 +1,2 @@
1
- import {f}from'./chunk-JWLIHVLP.js';import {z}from'./chunk-K43ZLU4I.js';import {zc,Ka,g}from'./chunk-I3LSSBRI.js';import {zl,ja,Va,Pg,jl,_a,Ua,Yg,Xg,Zg,Wg,$g,Bb,Ab,Ak,ik,ib,vk,B,w as w$1,A,D,Uh,hk,u,Bk}from'./chunk-IQAHULGQ.js';import {memo,useId,useState,useRef,useEffect,useMemo,useCallback}from'react';import {useTranslation}from'react-i18next';import {styled,Button,Box,alpha,useTheme}from'@mui/material';import {jsx,jsxs,Fragment}from'react/jsx-runtime';function w({isActive:t,disableHover:e}){let[n,g]=useState(false),l=useTheme(),r=()=>{e||g(true);},u=()=>{g(false);},C=t?l.palette.common.white:l.palette.grey[700],d=n?l.palette.common.black:"transparent";return jsx("svg",{width:"27",height:"30",viewBox:"0 0 27 32",xmlns:"http://www.w3.org/2000/svg",children:jsxs("g",{id:"Group 140343",children:[jsx("path",{id:"Active",d:"M0 0H11C19.8366 0 27 7.16344 27 16C27 24.8366 19.8366 32 11 32H0V0Z",fill:d,fillOpacity:"0.1",onMouseEnter:r,onMouseLeave:u}),jsx("path",{id:"Union",fillRule:"evenodd",clipRule:"evenodd",d:"M15.6941 15.0078C15.6494 15.0193 15.6083 15.043 15.5758 15.0769L12.5026 18.1501L12.5025 18.1501L15.5756 15.0769C15.6082 15.043 15.6493 15.0193 15.6941 15.0078ZM12.5619 18.7465C12.5426 18.7512 12.5227 18.7536 12.5026 18.7536C12.4363 18.7536 12.3727 18.7273 12.3258 18.6804L9.07581 15.4304C9.04012 15.3957 9.01559 15.3512 9.00535 15.3025C8.99511 15.2538 8.99963 15.2032 9.01833 15.1571C9.03703 15.111 9.06907 15.0715 9.11033 15.0437C9.13446 15.0275 9.16112 15.0156 9.18904 15.0086C9.16105 15.0156 9.13433 15.0275 9.11013 15.0438C9.06887 15.0716 9.03684 15.111 9.01814 15.1571C8.99944 15.2032 8.99492 15.2539 9.00516 15.3026C9.0154 15.3513 9.03993 15.3958 9.07562 15.4305L12.3256 18.6805C12.3725 18.7273 12.4361 18.7537 12.5024 18.7537C12.5226 18.7537 12.5426 18.7512 12.5619 18.7465ZM16.1965 15.342C16.1781 15.4301 16.1338 15.5105 16.0693 15.5731L12.8205 18.8219C12.7361 18.9063 12.6217 18.9537 12.5024 18.9537C12.3831 18.9537 12.2686 18.9062 12.1842 18.8219L8.93507 15.5728C8.87148 15.5105 8.82775 15.4308 8.80944 15.3437C8.79101 15.2561 8.79914 15.165 8.8328 15.082C8.86646 14.999 8.92412 14.9279 8.99839 14.8779C9.07266 14.8279 9.16022 14.8011 9.24978 14.8011C9.30998 14.8011 9.36958 14.8132 9.42503 14.8366C9.47997 14.8599 9.52973 14.8938 9.57144 14.9364L12.5024 17.8673L15.433 14.9368C15.5151 14.852 15.6273 14.803 15.7454 14.8002C15.836 14.798 15.9252 14.8233 16.0013 14.8728C16.0773 14.9222 16.1367 14.9935 16.1715 15.0772C16.2063 15.1609 16.2151 15.2533 16.1965 15.342Z",fill:C})]})})}var zt=t=>({...t.typography.subtitle1,borderRadius:"50px",borderWidth:"1px",borderStyle:"solid",minWidth:"135.11px",height:"32px",display:"flex",justifyContent:"center",alignItems:"center",gap:"8px",textTransform:"none",transition:"none",paddingInline:t.spacing(2)}),mt=styled(Button,{shouldForwardProp:t=>t!=="statusVariant"})(({theme:t,statusVariant:e})=>({...zt(t),...e==="active"?{background:t.palette.background.gradient.shadedBlue,color:t.palette.common.white,"&:hover":{background:t.palette.background.gradient.shadedBlue,opacity:.8}}:{backgroundColor:t.palette.common.white,borderColor:t.palette.grey[100],color:t.palette.text.primary,"&:hover":{backgroundColor:t.palette.common.white,opacity:.7}}})),gt={active:mt,inActive:mt};styled(Box)(({theme:t,variant:e})=>({borderRadius:"50px",backgroundColor:e==="active"?alpha(t.palette.text.primary,.1):t.palette.grey[100],display:"flex",justifyContent:"center",alignItems:"center",paddingInline:t.spacing(.5),paddingBlock:t.spacing(.25),color:e==="active"?t.palette.common.white:t.palette.text.primary,fontSize:"8px",fontWeight:700,lineHeight:"10px"}));styled("img")(({theme:t,variant:e,icon:n})=>({fill:e==="active"?t.palette.common.white:t.palette.text.primary,color:e==="active"?t.palette.common.white:t.palette.text.primary,...!(["openFlag","closedFlag"].includes(n??"")&&e==="inActive")&&n!=="captured"&&{filter:e==="active"?"brightness(0) invert(1)":"brightness(0) invert(0)"},maxWidth:"14px",maxHeight:"14px"}));styled("p")(({theme:t})=>({fontSize:"0.6875rem",color:t.palette.background.default,fontStyle:"normal",margin:"auto",textTransform:"capitalize"}));var ht=styled(f)(({theme:t})=>({backgroundColor:"white",boxShadow:t.shadows[21],borderRadius:"0.25rem","& .MuiPaper-root":{borderRadius:"0.25rem",width:"12.5rem"}})),Ct=styled("span")(()=>({width:"27px",height:"100%",maxHeight:"100%",position:"absolute",top:"0",right:"0",bottom:"0",overflow:"hidden"})),ft=styled(Box)(({variant:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"0.5rem",fontWeight:t==="active"?700:400})),vt=styled(Box)(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"100%"})),It=styled("img")(({theme:t,variant:e,icon:n})=>({fill:e==="active"?t.palette.common.white:t.palette.text.primary,color:e==="active"?t.palette.common.white:t.palette.text.primary,...!(["openFlag","closedFlag"].includes(n??"")&&e==="inActive")&&n!=="captured"&&{filter:e==="active"?"brightness(0) invert(1)":"brightness(0) invert(0)"},maxWidth:"14px",maxHeight:"14px"})),xt=styled(Box)(({variant:t})=>({width:"14px",height:"14px",display:"flex",alignItems:"center","& img":{width:"14px",height:"14px",filter:t==="active"?"brightness(0) invert(1)":"brightness(0) invert(0)"}}));var bt={inProgress:Bk,initiated:Bk,abandoned:u,cancelled:hk,reversed:Uh,reports:D,search:A,chevronDown:w$1,unAuthorized:B,unSettled:vk,unCaptured:ib,captured:ik,authorized:Ak,openFlag:Ab,closedFlag:Bb,unauthenticated:$g,authenticated:Wg,paidOut:Zg,scheduled:Xg,checked:Yg,dashedChecked:Ua,deactivated:_a,destination:jl,destinationReversed:Pg,outstanding:Va,active:ja,inactive:zl};var Ut=memo(t=>{let{variant:e="inActive",badgeCount:n,icon:g$1,label:l,dropdownOptions:r,selectedStatus:u,onButtonBodyClick:C,iconMapper:d=bt,buttonSx:yt,...wt}=t,kt=zc(useId(),"status-button"),[Lt,M]=useState(0),{t:R}=useTranslation(),P=useRef(null),[T,x]=useState(null),[a,V]=useState(u??r?.[0]?.status);useEffect(()=>{u!==void 0&&V(u);},[u]);let p=useMemo(()=>!!r?.length,[r]),f=!!T&&Lt>1,m=e==="active",H=useMemo(()=>m?"active":"inactive",[m]),h=useMemo(()=>a?r?.find(o=>o.status===a):null,[a,r]),Mt=useMemo(()=>{if(h?.icon)return jsx(xt,{variant:e,children:h.icon});let o=a&&d[a]?a:g$1;if(o&&d[o])return jsx(It,{icon:o,variant:e,src:d[o],alt:`${o}-icon`})},[h,a,d,g$1,e]),Rt=useMemo(()=>!n||Number.isNaN(Ka(n))?null:jsx(z,{color:H,children:g(Number(n))}),[n,H]),W=useMemo(()=>p?jsx(w,{isActive:m}):null,[p,m]);useEffect(()=>{m||(M(0),x(null));},[m]);let b=useCallback(()=>{x(null);},[]),A=useCallback(()=>{p&&x(f?null:P.current);},[p,f]),Pt=useCallback(o=>{o.stopPropagation(),t?.onClick?.(o),C?.(a||r?.[0]?.status||"all"),A(),M(B=>B+1);},[t,C,a,r,A]),E=useCallback(o=>B=>{o?.onClick?.(B),V(o.status),b();},[b]),Tt=useMemo(()=>r?.map(o=>({...o,onClick:E(o)}))||[],[r,E]),Vt=gt[e],Ht=useMemo(()=>h?.label||(a?R(a):l),[h,a,R,l]);return jsxs(Fragment,{children:[jsx(Vt,{id:kt,"data-testid":"StatusButton",...wt,ref:P,onClick:Pt,statusVariant:e,sx:{...p&&{paddingInlineEnd:"27px"},...yt},children:jsxs(vt,{children:[jsxs(ft,{variant:e,children:[Mt,Ht,Rt]}),W&&jsx(Ct,{children:W})]})}),f&&p&&jsx(ht,{open:f,onClose:b,anchorEl:T,menuItems:Tt})]})}),St=Ut;var ge=St;
1
+ import {f}from'./chunk-TN55SPRQ.js';import {z}from'./chunk-AXNWVU3K.js';import {Bc,Ma,g}from'./chunk-RUFO5P34.js';import {zl,ja,Va,Pg,jl,_a,Ua,Yg,Xg,Zg,Wg,$g,Bb,Ab,Ak,ik,ib,vk,B,w as w$1,A,D,Uh,hk,u,Bk}from'./chunk-IQAHULGQ.js';import {memo,useId,useState,useRef,useEffect,useMemo,useCallback}from'react';import {useTranslation}from'react-i18next';import {styled,Button,Box,alpha,useTheme}from'@mui/material';import {jsx,jsxs,Fragment}from'react/jsx-runtime';function w({isActive:t,disableHover:e}){let[n,g]=useState(false),l=useTheme(),r=()=>{e||g(true);},u=()=>{g(false);},C=t?l.palette.common.white:l.palette.grey[700],d=n?l.palette.common.black:"transparent";return jsx("svg",{width:"27",height:"30",viewBox:"0 0 27 32",xmlns:"http://www.w3.org/2000/svg",children:jsxs("g",{id:"Group 140343",children:[jsx("path",{id:"Active",d:"M0 0H11C19.8366 0 27 7.16344 27 16C27 24.8366 19.8366 32 11 32H0V0Z",fill:d,fillOpacity:"0.1",onMouseEnter:r,onMouseLeave:u}),jsx("path",{id:"Union",fillRule:"evenodd",clipRule:"evenodd",d:"M15.6941 15.0078C15.6494 15.0193 15.6083 15.043 15.5758 15.0769L12.5026 18.1501L12.5025 18.1501L15.5756 15.0769C15.6082 15.043 15.6493 15.0193 15.6941 15.0078ZM12.5619 18.7465C12.5426 18.7512 12.5227 18.7536 12.5026 18.7536C12.4363 18.7536 12.3727 18.7273 12.3258 18.6804L9.07581 15.4304C9.04012 15.3957 9.01559 15.3512 9.00535 15.3025C8.99511 15.2538 8.99963 15.2032 9.01833 15.1571C9.03703 15.111 9.06907 15.0715 9.11033 15.0437C9.13446 15.0275 9.16112 15.0156 9.18904 15.0086C9.16105 15.0156 9.13433 15.0275 9.11013 15.0438C9.06887 15.0716 9.03684 15.111 9.01814 15.1571C8.99944 15.2032 8.99492 15.2539 9.00516 15.3026C9.0154 15.3513 9.03993 15.3958 9.07562 15.4305L12.3256 18.6805C12.3725 18.7273 12.4361 18.7537 12.5024 18.7537C12.5226 18.7537 12.5426 18.7512 12.5619 18.7465ZM16.1965 15.342C16.1781 15.4301 16.1338 15.5105 16.0693 15.5731L12.8205 18.8219C12.7361 18.9063 12.6217 18.9537 12.5024 18.9537C12.3831 18.9537 12.2686 18.9062 12.1842 18.8219L8.93507 15.5728C8.87148 15.5105 8.82775 15.4308 8.80944 15.3437C8.79101 15.2561 8.79914 15.165 8.8328 15.082C8.86646 14.999 8.92412 14.9279 8.99839 14.8779C9.07266 14.8279 9.16022 14.8011 9.24978 14.8011C9.30998 14.8011 9.36958 14.8132 9.42503 14.8366C9.47997 14.8599 9.52973 14.8938 9.57144 14.9364L12.5024 17.8673L15.433 14.9368C15.5151 14.852 15.6273 14.803 15.7454 14.8002C15.836 14.798 15.9252 14.8233 16.0013 14.8728C16.0773 14.9222 16.1367 14.9935 16.1715 15.0772C16.2063 15.1609 16.2151 15.2533 16.1965 15.342Z",fill:C})]})})}var zt=t=>({...t.typography.subtitle1,borderRadius:"50px",borderWidth:"1px",borderStyle:"solid",minWidth:"135.11px",height:"32px",display:"flex",justifyContent:"center",alignItems:"center",gap:"8px",textTransform:"none",transition:"none",paddingInline:t.spacing(2)}),mt=styled(Button,{shouldForwardProp:t=>t!=="statusVariant"})(({theme:t,statusVariant:e})=>({...zt(t),...e==="active"?{background:t.palette.background.gradient.shadedBlue,color:t.palette.common.white,"&:hover":{background:t.palette.background.gradient.shadedBlue,opacity:.8}}:{backgroundColor:t.palette.common.white,borderColor:t.palette.grey[100],color:t.palette.text.primary,"&:hover":{backgroundColor:t.palette.common.white,opacity:.7}}})),gt={active:mt,inActive:mt};styled(Box)(({theme:t,variant:e})=>({borderRadius:"50px",backgroundColor:e==="active"?alpha(t.palette.text.primary,.1):t.palette.grey[100],display:"flex",justifyContent:"center",alignItems:"center",paddingInline:t.spacing(.5),paddingBlock:t.spacing(.25),color:e==="active"?t.palette.common.white:t.palette.text.primary,fontSize:"8px",fontWeight:700,lineHeight:"10px"}));styled("img")(({theme:t,variant:e,icon:n})=>({fill:e==="active"?t.palette.common.white:t.palette.text.primary,color:e==="active"?t.palette.common.white:t.palette.text.primary,...!(["openFlag","closedFlag"].includes(n??"")&&e==="inActive")&&n!=="captured"&&{filter:e==="active"?"brightness(0) invert(1)":"brightness(0) invert(0)"},maxWidth:"14px",maxHeight:"14px"}));styled("p")(({theme:t})=>({fontSize:"0.6875rem",color:t.palette.background.default,fontStyle:"normal",margin:"auto",textTransform:"capitalize"}));var ht=styled(f)(({theme:t})=>({backgroundColor:"white",boxShadow:t.shadows[21],borderRadius:"0.25rem","& .MuiPaper-root":{borderRadius:"0.25rem",width:"12.5rem"}})),Ct=styled("span")(()=>({width:"27px",height:"100%",maxHeight:"100%",position:"absolute",top:"0",right:"0",bottom:"0",overflow:"hidden"})),ft=styled(Box)(({variant:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"0.5rem",fontWeight:t==="active"?700:400})),vt=styled(Box)(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"100%"})),It=styled("img")(({theme:t,variant:e,icon:n})=>({fill:e==="active"?t.palette.common.white:t.palette.text.primary,color:e==="active"?t.palette.common.white:t.palette.text.primary,...!(["openFlag","closedFlag"].includes(n??"")&&e==="inActive")&&n!=="captured"&&{filter:e==="active"?"brightness(0) invert(1)":"brightness(0) invert(0)"},maxWidth:"14px",maxHeight:"14px"})),xt=styled(Box)(({variant:t})=>({width:"14px",height:"14px",display:"flex",alignItems:"center","& img":{width:"14px",height:"14px",filter:t==="active"?"brightness(0) invert(1)":"brightness(0) invert(0)"}}));var bt={inProgress:Bk,initiated:Bk,abandoned:u,cancelled:hk,reversed:Uh,reports:D,search:A,chevronDown:w$1,unAuthorized:B,unSettled:vk,unCaptured:ib,captured:ik,authorized:Ak,openFlag:Ab,closedFlag:Bb,unauthenticated:$g,authenticated:Wg,paidOut:Zg,scheduled:Xg,checked:Yg,dashedChecked:Ua,deactivated:_a,destination:jl,destinationReversed:Pg,outstanding:Va,active:ja,inactive:zl};var Ut=memo(t=>{let{variant:e="inActive",badgeCount:n,icon:g$1,label:l,dropdownOptions:r,selectedStatus:u,onButtonBodyClick:C,iconMapper:d=bt,buttonSx:yt,...wt}=t,kt=Bc(useId(),"status-button"),[Lt,M]=useState(0),{t:R}=useTranslation(),P=useRef(null),[T,x]=useState(null),[a,V]=useState(u??r?.[0]?.status);useEffect(()=>{u!==void 0&&V(u);},[u]);let p=useMemo(()=>!!r?.length,[r]),f=!!T&&Lt>1,m=e==="active",H=useMemo(()=>m?"active":"inactive",[m]),h=useMemo(()=>a?r?.find(o=>o.status===a):null,[a,r]),Mt=useMemo(()=>{if(h?.icon)return jsx(xt,{variant:e,children:h.icon});let o=a&&d[a]?a:g$1;if(o&&d[o])return jsx(It,{icon:o,variant:e,src:d[o],alt:`${o}-icon`})},[h,a,d,g$1,e]),Rt=useMemo(()=>!n||Number.isNaN(Ma(n))?null:jsx(z,{color:H,children:g(Number(n))}),[n,H]),W=useMemo(()=>p?jsx(w,{isActive:m}):null,[p,m]);useEffect(()=>{m||(M(0),x(null));},[m]);let b=useCallback(()=>{x(null);},[]),A=useCallback(()=>{p&&x(f?null:P.current);},[p,f]),Pt=useCallback(o=>{o.stopPropagation(),t?.onClick?.(o),C?.(a||r?.[0]?.status||"all"),A(),M(B=>B+1);},[t,C,a,r,A]),E=useCallback(o=>B=>{o?.onClick?.(B),V(o.status),b();},[b]),Tt=useMemo(()=>r?.map(o=>({...o,onClick:E(o)}))||[],[r,E]),Vt=gt[e],Ht=useMemo(()=>h?.label||(a?R(a):l),[h,a,R,l]);return jsxs(Fragment,{children:[jsx(Vt,{id:kt,"data-testid":"StatusButton",...wt,ref:P,onClick:Pt,statusVariant:e,sx:{...p&&{paddingInlineEnd:"27px"},...yt},children:jsxs(vt,{children:[jsxs(ft,{variant:e,children:[Mt,Ht,Rt]}),W&&jsx(Ct,{children:W})]})}),f&&p&&jsx(ht,{open:f,onClose:b,anchorEl:T,menuItems:Tt})]})}),St=Ut;var ge=St;
2
2
  export{w as a,ge as b};
@@ -1 +1 @@
1
- import {j,P as P$1,O,V as V$1,R as R$1,d}from'./chunk-K43ZLU4I.js';import {lc,kc}from'./chunk-I3LSSBRI.js';import {Rc}from'./chunk-IQAHULGQ.js';import {forwardRef,useRef,useState,memo}from'react';import Te from'@mui/material/ClickAwayListener';import Le from'@mui/material/CircularProgress';import Ce from'@mui/material/SvgIcon';import {jsx,jsxs}from'react/jsx-runtime';import m from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';var i="os-shared-GroupedSelect",r={root:`${i}-root`,trigger:`${i}-trigger`,hasLabel:`${i}-hasLabel`,triggerIcon:`${i}-triggerIcon`,menu:`${i}-menu`,groups:`${i}-groups`,group:`${i}-group`,groupLabel:`${i}-groupLabel`,option:`${i}-option`,optionCheck:`${i}-optionCheck`};function P({open:e}){return jsx(Ce,{viewBox:"0 0 8 5",sx:{width:8,height:5,transform:e?"rotate(180deg)":"none",transition:"transform 0.2s ease"},children:jsx("path",{d:"M7.30273 0.117188C7.3806 0.115307 7.4565 0.138248 7.52051 0.182617C7.58455 0.227088 7.63373 0.290458 7.66211 0.363281C7.69046 0.436073 7.69761 0.516047 7.68262 0.592773C7.66777 0.668745 7.63069 0.738375 7.57715 0.793945L4.17285 4.43164C4.10255 4.50662 4.00523 4.55078 3.90234 4.55078C3.79964 4.55064 3.703 4.5065 3.63281 4.43164L0.227539 0.794922L0.228516 0.793945C0.175799 0.738766 0.139848 0.669812 0.125 0.594727C0.11011 0.519097 0.116275 0.440194 0.143555 0.368164C0.170957 0.296002 0.218752 0.232474 0.28125 0.1875C0.343758 0.14262 0.418162 0.11821 0.495117 0.118164C0.546901 0.118166 0.598306 0.12907 0.645508 0.150391C0.691832 0.171346 0.733094 0.201824 0.767578 0.239258L3.90234 3.58691L7.03711 0.239258C7.10547 0.164191 7.20108 0.119752 7.30273 0.117188Z",fill:"#20232B",stroke:"#20232B",strokeWidth:.233333})})}var W=styled(m,{shouldForwardProp:e=>e!=="open"&&e!=="disabled"})(({disabled:e})=>({display:"flex",alignItems:"center",cursor:e?"not-allowed":"pointer",position:"relative",maxWidth:"100%"})),A=styled(m,{shouldForwardProp:e=>e!=="disabled"})(({theme:e,disabled:t})=>({flex:1,minWidth:0,height:32,maxHeight:32,borderRadius:"4px",overflow:"hidden",backgroundColor:e.palette.grey[400],cursor:t?"default":"pointer",position:"relative",display:"flex",flexDirection:"column",justifyContent:"center",padding:"0 28px 0 8px",[`&:where(.${r.hasLabel})`]:{height:40,maxHeight:40,justifyContent:"flex-end"}})),R=styled(j,{shouldForwardProp:e=>e!=="$disabled"})(({theme:e,$disabled:t})=>({fontSize:"10px",fontWeight:500,lineHeight:"10px",color:t?e.palette.text.disabled:e.palette.grey[700],whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",paddingTop:8})),B=styled(m,{shouldForwardProp:e=>e!=="$placeholder"&&e!=="$disabled"})(({theme:e,$placeholder:t,$disabled:S})=>({fontSize:"11px",lineHeight:"11px",color:S?e.palette.text.disabled:t?e.palette.text.secondary:"#000",height:22,display:"flex",alignItems:"center",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"})),D=styled(m,{shouldForwardProp:e=>e!=="$disabled"})(({theme:e,$disabled:t})=>({position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",width:16,height:16,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",opacity:t?e.palette.action.disabledOpacity:1})),F=styled(m)(()=>({display:"flex",flexDirection:"column",maxHeight:180,overflow:"auto",scrollbarWidth:"thin",scrollbarColor:"#E5E5E5 #E5E5E5"})),z=styled(P$1)(({theme:e})=>{let t=`1px solid ${alpha(e.palette.common.black,.1)}`;return {flexShrink:0,border:0,borderRadius:0,"&.Mui-expanded:not(:last-of-type)":{borderBottom:t},[`&:last-of-type .${O.summary}`]:{borderBottom:"none"},[`&.Mui-expanded:last-of-type .${O.summary}`]:{borderBottom:t},[`& .${O.summary}`]:{backgroundColor:e.palette.common.white,borderBottom:t,minHeight:28,height:"auto","& .MuiAccordionSummary-content":{margin:"auto"},"&.Mui-expanded":{backgroundColor:"#F8F8F8",minHeight:28,height:"auto"}},[`& .${O.content}`]:{borderTop:"none"}}}),K=styled(j)(({theme:e})=>({fontSize:"10px",color:e.v2.palette.grey[500],fontWeight:600,lineHeight:"10px"})),V=styled(V$1)(()=>({fontSize:"10px",fontWeight:500,textTransform:"none",justifyContent:"space-between",padding:"8px 20px"}));function Ee(e,t){return e?.id===t?.id}var Y=forwardRef(({id:e,label:t,placeholder:S,renderValue:Z,IconComponent:J,isLoading:Q=false,options:U,value:f,onChange:X,isOptionEqualToValue:_=Ee,renderOption:ee,renderGroupLabel:oe,open:te,onOpenChange:re,expandedGroupIndex:b,defaultExpandedGroupIndex:le=0,onExpandedGroupChange:ne,disabled:p=false,sx:ae,menuSx:ie,className:de},se)=>{let C=useRef(null),[G,pe]=useState(null),[ce,ue]=useState(le),s=te??G!==null,c=G??C.current,me=b??ce,w=useRef(void 0);s&&c&&c.clientWidth>0&&(w.current=c.clientWidth);let ge=w.current,h=(o,l)=>{pe(l),re?.(o);},Se=o=>{if(p)return;let l=!s;h(l,l?o.currentTarget:null);},$=()=>{s&&h(false,null);},fe=o=>{o.key==="Escape"&&$();},he=(o,l)=>{let a=l?o:null;b===void 0&&ue(a),ne?.(a);},ye=o=>{o.disabled||(X?.(o),h(false,null));},T=Z?.(f)??f?.label??null,L=J,E=!!t;return jsx(Te,{onClickAway:$,children:jsxs(W,{ref:se,id:e,"data-testid":"GroupedSelect",className:lc(r.root,de),sx:ae,open:s,disabled:p,onClick:Se,onKeyDown:fe,children:[jsxs(A,{ref:C,className:lc(r.trigger,E&&r.hasLabel),disabled:p,children:[E&&jsx(R,{$disabled:p,children:t}),jsx(B,{$placeholder:T==null,$disabled:p,children:T??S??""}),jsx(D,{className:r.triggerIcon,$disabled:p,children:Q?jsx(Le,{size:14,sx:{color:"text.secondary"}}):L?jsx(L,{className:lc(s&&"MuiSelect-iconOpen")}):jsx(P,{open:s})})]}),jsx(R$1,{open:s,anchorEl:c,placement:"bottom-start",className:r.menu,sx:kc({width:ge??c?.clientWidth,marginTop:"4px"},ie),children:jsx(F,{className:r.groups,onClick:o=>o.stopPropagation(),onMouseDown:o=>o.stopPropagation(),children:(U??[]).map((o,l)=>jsx(z,{className:r.group,expanded:me===l,onChange:a=>he(l,a),slotProps:{root:{square:true}},label:oe?.(o.group,l)??jsx(K,{variant:"caption",className:r.groupLabel,children:o.group}),content:(o?.options||[]).map((a,xe)=>{let be=_(a,f);return jsxs(V,{className:r.option,startAdornment:null,isDisabled:a.disabled,onClick:()=>ye(a),children:[ee?.(a)??a.label,be&&jsx(d,{src:Rc,alt:"selected",sx:{width:14,height:10},className:r.optionCheck})]},`${l}-${xe}`)})},`${l}`))})})]})})});Y.displayName="GroupedSelect";var ke=memo(Y);export{r as a,ke as b};
1
+ import {j,P as P$1,O,V as V$1,R as R$1,d}from'./chunk-AXNWVU3K.js';import {nc,mc}from'./chunk-RUFO5P34.js';import {Rc}from'./chunk-IQAHULGQ.js';import {forwardRef,useRef,useState,memo}from'react';import Te from'@mui/material/ClickAwayListener';import Le from'@mui/material/CircularProgress';import Ce from'@mui/material/SvgIcon';import {jsx,jsxs}from'react/jsx-runtime';import m from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';var i="os-shared-GroupedSelect",r={root:`${i}-root`,trigger:`${i}-trigger`,hasLabel:`${i}-hasLabel`,triggerIcon:`${i}-triggerIcon`,menu:`${i}-menu`,groups:`${i}-groups`,group:`${i}-group`,groupLabel:`${i}-groupLabel`,option:`${i}-option`,optionCheck:`${i}-optionCheck`};function P({open:e}){return jsx(Ce,{viewBox:"0 0 8 5",sx:{width:8,height:5,transform:e?"rotate(180deg)":"none",transition:"transform 0.2s ease"},children:jsx("path",{d:"M7.30273 0.117188C7.3806 0.115307 7.4565 0.138248 7.52051 0.182617C7.58455 0.227088 7.63373 0.290458 7.66211 0.363281C7.69046 0.436073 7.69761 0.516047 7.68262 0.592773C7.66777 0.668745 7.63069 0.738375 7.57715 0.793945L4.17285 4.43164C4.10255 4.50662 4.00523 4.55078 3.90234 4.55078C3.79964 4.55064 3.703 4.5065 3.63281 4.43164L0.227539 0.794922L0.228516 0.793945C0.175799 0.738766 0.139848 0.669812 0.125 0.594727C0.11011 0.519097 0.116275 0.440194 0.143555 0.368164C0.170957 0.296002 0.218752 0.232474 0.28125 0.1875C0.343758 0.14262 0.418162 0.11821 0.495117 0.118164C0.546901 0.118166 0.598306 0.12907 0.645508 0.150391C0.691832 0.171346 0.733094 0.201824 0.767578 0.239258L3.90234 3.58691L7.03711 0.239258C7.10547 0.164191 7.20108 0.119752 7.30273 0.117188Z",fill:"#20232B",stroke:"#20232B",strokeWidth:.233333})})}var W=styled(m,{shouldForwardProp:e=>e!=="open"&&e!=="disabled"})(({disabled:e})=>({display:"flex",alignItems:"center",cursor:e?"not-allowed":"pointer",position:"relative",maxWidth:"100%"})),A=styled(m,{shouldForwardProp:e=>e!=="disabled"})(({theme:e,disabled:t})=>({flex:1,minWidth:0,height:32,maxHeight:32,borderRadius:"4px",overflow:"hidden",backgroundColor:e.palette.grey[400],cursor:t?"default":"pointer",position:"relative",display:"flex",flexDirection:"column",justifyContent:"center",padding:"0 28px 0 8px",[`&:where(.${r.hasLabel})`]:{height:40,maxHeight:40,justifyContent:"flex-end"}})),R=styled(j,{shouldForwardProp:e=>e!=="$disabled"})(({theme:e,$disabled:t})=>({fontSize:"10px",fontWeight:500,lineHeight:"10px",color:t?e.palette.text.disabled:e.palette.grey[700],whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",paddingTop:8})),B=styled(m,{shouldForwardProp:e=>e!=="$placeholder"&&e!=="$disabled"})(({theme:e,$placeholder:t,$disabled:S})=>({fontSize:"11px",lineHeight:"11px",color:S?e.palette.text.disabled:t?e.palette.text.secondary:"#000",height:22,display:"flex",alignItems:"center",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"})),D=styled(m,{shouldForwardProp:e=>e!=="$disabled"})(({theme:e,$disabled:t})=>({position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",width:16,height:16,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",opacity:t?e.palette.action.disabledOpacity:1})),F=styled(m)(()=>({display:"flex",flexDirection:"column",maxHeight:180,overflow:"auto",scrollbarWidth:"thin",scrollbarColor:"#E5E5E5 #E5E5E5"})),z=styled(P$1)(({theme:e})=>{let t=`1px solid ${alpha(e.palette.common.black,.1)}`;return {flexShrink:0,border:0,borderRadius:0,"&.Mui-expanded:not(:last-of-type)":{borderBottom:t},[`&:last-of-type .${O.summary}`]:{borderBottom:"none"},[`&.Mui-expanded:last-of-type .${O.summary}`]:{borderBottom:t},[`& .${O.summary}`]:{backgroundColor:e.palette.common.white,borderBottom:t,minHeight:28,height:"auto","& .MuiAccordionSummary-content":{margin:"auto"},"&.Mui-expanded":{backgroundColor:"#F8F8F8",minHeight:28,height:"auto"}},[`& .${O.content}`]:{borderTop:"none"}}}),K=styled(j)(({theme:e})=>({fontSize:"10px",color:e.v2.palette.grey[500],fontWeight:600,lineHeight:"10px"})),V=styled(V$1)(()=>({fontSize:"10px",fontWeight:500,textTransform:"none",justifyContent:"space-between",padding:"8px 20px"}));function Ee(e,t){return e?.id===t?.id}var Y=forwardRef(({id:e,label:t,placeholder:S,renderValue:Z,IconComponent:J,isLoading:Q=false,options:U,value:f,onChange:X,isOptionEqualToValue:_=Ee,renderOption:ee,renderGroupLabel:oe,open:te,onOpenChange:re,expandedGroupIndex:b,defaultExpandedGroupIndex:le=0,onExpandedGroupChange:ne,disabled:p=false,sx:ae,menuSx:ie,className:de},se)=>{let C=useRef(null),[G,pe]=useState(null),[ce,ue]=useState(le),s=te??G!==null,c=G??C.current,me=b??ce,w=useRef(void 0);s&&c&&c.clientWidth>0&&(w.current=c.clientWidth);let ge=w.current,h=(o,l)=>{pe(l),re?.(o);},Se=o=>{if(p)return;let l=!s;h(l,l?o.currentTarget:null);},$=()=>{s&&h(false,null);},fe=o=>{o.key==="Escape"&&$();},he=(o,l)=>{let a=l?o:null;b===void 0&&ue(a),ne?.(a);},ye=o=>{o.disabled||(X?.(o),h(false,null));},T=Z?.(f)??f?.label??null,L=J,E=!!t;return jsx(Te,{onClickAway:$,children:jsxs(W,{ref:se,id:e,"data-testid":"GroupedSelect",className:nc(r.root,de),sx:ae,open:s,disabled:p,onClick:Se,onKeyDown:fe,children:[jsxs(A,{ref:C,className:nc(r.trigger,E&&r.hasLabel),disabled:p,children:[E&&jsx(R,{$disabled:p,children:t}),jsx(B,{$placeholder:T==null,$disabled:p,children:T??S??""}),jsx(D,{className:r.triggerIcon,$disabled:p,children:Q?jsx(Le,{size:14,sx:{color:"text.secondary"}}):L?jsx(L,{className:nc(s&&"MuiSelect-iconOpen")}):jsx(P,{open:s})})]}),jsx(R$1,{open:s,anchorEl:c,placement:"bottom-start",className:r.menu,sx:mc({width:ge??c?.clientWidth,marginTop:"4px"},ie),children:jsx(F,{className:r.groups,onClick:o=>o.stopPropagation(),onMouseDown:o=>o.stopPropagation(),children:(U??[]).map((o,l)=>jsx(z,{className:r.group,expanded:me===l,onChange:a=>he(l,a),slotProps:{root:{square:true}},label:oe?.(o.group,l)??jsx(K,{variant:"caption",className:r.groupLabel,children:o.group}),content:(o?.options||[]).map((a,xe)=>{let be=_(a,f);return jsxs(V,{className:r.option,startAdornment:null,isDisabled:a.disabled,onClick:()=>ye(a),children:[ee?.(a)??a.label,be&&jsx(d,{src:Rc,alt:"selected",sx:{width:14,height:10},className:r.optionCheck})]},`${l}-${xe}`)})},`${l}`))})})]})})});Y.displayName="GroupedSelect";var ke=memo(Y);export{r as a,ke as b};
@@ -1 +1 @@
1
- import {lc}from'./chunk-I3LSSBRI.js';import {forwardRef,memo}from'react';import y from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var p="os-shared-ListLayout",t={root:`${p}-root`};var a=styled(y)(()=>({flex:1,position:"relative",display:"flex",flexDirection:"column",height:"100%"}));var e=forwardRef(({id:o,className:r,sx:i,children:m,...L},l)=>jsx(a,{ref:l,component:"article",id:o,"data-testid":o??"ListLayout",...L,className:lc(t.root,r),sx:i,children:m}));e.displayName="ListLayout";var d=memo(e);export{t as a,d as b};
1
+ import {nc}from'./chunk-RUFO5P34.js';import {forwardRef,memo}from'react';import y from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var p="os-shared-ListLayout",t={root:`${p}-root`};var a=styled(y)(()=>({flex:1,position:"relative",display:"flex",flexDirection:"column",height:"100%"}));var e=forwardRef(({id:o,className:r,sx:i,children:m,...L},l)=>jsx(a,{ref:l,component:"article",id:o,"data-testid":o??"ListLayout",...L,className:nc(t.root,r),sx:i,children:m}));e.displayName="ListLayout";var d=memo(e);export{t as a,d as b};
@@ -0,0 +1,9 @@
1
+ import {C,G,F as F$1}from'./chunk-UFNFYH2N.js';import {aa,ba}from'./chunk-AXNWVU3K.js';import {Dc,nc,mc}from'./chunk-RUFO5P34.js';import {Rc,A}from'./chunk-IQAHULGQ.js';import {memo,useCallback}from'react';import lo,{autocompleteClasses}from'@mui/material/Autocomplete';import F from'@mui/material/Box';import Ze from'@mui/material/Popper';import Je from'@mui/material/TextField';import {keyframes,styled,alpha}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var d="os-shared-Autocomplete",u={root:`${d}-root`,input:`${d}-input`,popper:`${d}-popper`,option:`${d}-option`,clear:`${d}-clear`,popupIndicator:`${d}-popupIndicator`,feedback:`${d}-feedback`},x={bottom:"bottom",top:"top"},oe=x.bottom,te="No results found",ne="Loading\u2026",le=8;var Xe=keyframes`
2
+ 0% {
3
+ transform: rotate(-90deg);
4
+ }
5
+ 100% {
6
+ transform: rotate(270deg);
7
+ }
8
+ `,pe=styled(F)({width:12,height:12,display:"flex",alignItems:"center",justifyContent:"center","& svg":{width:"100%",height:"100%",display:"block"},animation:`${Xe} 2s linear infinite`}),ie=styled(Je,{shouldForwardProp:e=>!["feedbackType","hasFeedback","hasLabel"].includes(e)})(({theme:e,error:o,feedbackType:n,hasFeedback:l,hasLabel:a})=>{let{borderColor:m}=n?aa(e,n):{borderColor:void 0},I=l?"4px 4px 0 0":"4px",p=o?`1px solid ${e.palette.error.main}`:n&&m?`1px solid ${m}`:"1px solid transparent";return {width:"100%","& .MuiInputLabel-root":{fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%",transform:"translate(8px, 15px) scale(1)",color:`${e.palette.grey[700]} !important`},"& .MuiInputLabel-root.MuiInputLabel-shrink":{transform:"translate(8px, 8px) scale(0.75)"},"& .MuiInputLabel-root.Mui-focused":{transform:"translate(8px, 8px) scale(0.75)"},"& .MuiFilledInput-root":{height:"40px",maxHeight:"40px",overflow:"hidden",borderRadius:I,borderBottomLeftRadius:l?0:"4px",borderBottomRightRadius:l?0:"4px",backgroundColor:e.palette.grey[400],border:p,borderBottom:l?"none":p,paddingTop:a?"11px":"0px",paddingBottom:a?"4px":"0px",paddingLeft:"8px",boxSizing:"border-box",display:"inline-flex",alignItems:a?"stretch":"center",transition:e.transitions.create(["border-color","box-shadow"],{duration:e.transitions.duration.shorter}),"&:before, &:after":{display:"none"},"&:hover":{backgroundColor:e.palette.grey[400]},"&.Mui-focused":{backgroundColor:e.palette.grey[400],border:l?`1px solid ${n?m:"transparent"}`:o?p:`1px solid ${e.v2.palette.brand[500]}`,borderBottom:l?"none":void 0,boxShadow:l||o?"none":`0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`},"&.Mui-disabled":{backgroundColor:e.palette.grey[400],boxShadow:"none",borderColor:"transparent"}},"& .MuiFilledInput-input":{padding:"0 !important",minHeight:0,height:"auto",boxSizing:"border-box",display:"flex",alignItems:a?"flex-end":"center",alignSelf:a?"flex-end":"center",fontSize:"11px",lineHeight:"11px",color:e.palette.common.black,paddingBottom:a?"1px !important":"0 !important"},"& .MuiFilledInput-root.MuiInputBase-adornedEnd .MuiAutocomplete-input":{flex:"1 1 0%",minWidth:30,width:0,maxWidth:"100%"},"& .MuiAutocomplete-endAdornment":{display:"flex",alignItems:"center",gap:"4px",top:"50%",transform:"translateY(-50%)",right:9},"& .MuiAutocomplete-popupIndicator":{transform:"none",padding:"1px",marginRight:0,marginLeft:0},"& .MuiAutocomplete-popupIndicator.MuiAutocomplete-popupIndicatorOpen":{transform:"none"},"& .MuiAutocomplete-clearIndicator":{visibility:"visible",padding:0,width:12,height:12,marginRight:0,marginLeft:0,backgroundColor:"transparent",color:e.v2.palette.base.black,"&:hover":{backgroundColor:"transparent",color:e.v2.palette.base.black},"& svg":{width:8,height:8,fontSize:8,display:"block"}}}}),se=styled(F,{shouldForwardProp:e=>e!=="$hasFeedback"})(({theme:e,$hasFeedback:o})=>({display:"flex",alignItems:"stretch",flexDirection:"column",width:"100%",borderRadius:4,overflow:"visible",textAlign:"start",...o&&{"&:has(.MuiInputBase-root.Mui-focused)":{boxShadow:`0px 0px 0px 1px ${e.v2.palette.brand[500]}, 0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`}}})),re=e=>({display:"flex",alignItems:"center",gap:"8px",padding:"8px",justifyContent:"space-between",fontSize:"10px",fontWeight:500,cursor:"default",pointerEvents:"none",backgroundColor:e.palette.common.white,color:e.v2.palette.grey[500]}),L="#F8F8F8",eo=e=>({fontSize:"12px",fontWeight:500,lineHeight:"14px",display:"flex",justifyContent:"space-between",alignItems:"center",gap:e.spacing(1),minHeight:40,padding:8,boxSizing:"border-box",borderRadius:4,backgroundColor:e.palette.common.white,'&.Mui-focused, &[aria-selected="true"], &.Mui-focusVisible, &[aria-selected="true"].Mui-focused':{backgroundColor:L},'&[aria-disabled="true"]':{opacity:.38,pointerEvents:"none"}}),oo={padding:8,maxHeight:320,display:"flex",flexDirection:"column",gap:4,overflowY:"auto"},ue=styled(Ze,{shouldForwardProp:e=>!["$menuHasLoadingText","$suppressAutocompleteNoOptions","$suppressEmptyMenuSurface"].includes(e)})(({theme:e,$menuHasLoadingText:o,$suppressAutocompleteNoOptions:n,$suppressEmptyMenuSurface:l})=>({"& .MuiPaper-root":l?{boxShadow:"none",border:"none",backgroundColor:"transparent",margin:0,marginTop:0,padding:0,maxHeight:0,minHeight:0,overflow:"hidden",borderRadius:0,pointerEvents:"none"}:{borderRadius:le,overflow:"hidden",boxShadow:e.shadows[8],border:`1px solid ${e.v2.palette.grey[100]}`,backgroundColor:e.palette.common.white},[`& .${autocompleteClasses.listbox}`]:{...oo,...l?{maxHeight:0,minHeight:0,overflow:"hidden"}:null},[`& .${autocompleteClasses.option}`]:eo(e),[`& .${autocompleteClasses.noOptions}`]:n?{display:"none !important"}:re(e),[`& .${autocompleteClasses.loading}`]:{...re(e),...o===false&&{display:"none"}}}));styled("span")(({theme:e})=>({fontSize:"10px",fontWeight:500,color:e.v2.palette.grey[500]}));var de=styled("li",{shouldForwardProp:e=>!["$selected","$optionDisabled"].includes(String(e))})(({theme:e,$selected:o,$optionDisabled:n})=>({fontSize:"12px",display:"flex",justifyContent:"space-between",alignItems:"center",gap:e.spacing(1),minHeight:40,padding:8,boxSizing:"border-box",borderRadius:4,backgroundColor:o?L:e.palette.common.white,"&.Mui-focused":{backgroundColor:L},...n&&{opacity:.38,pointerEvents:"none"}})),ce=styled("span")({flex:1,minWidth:0}),me=styled("img")({width:10,height:7.5,flexShrink:0}),fe=styled(F)({position:"relative",width:14,height:14,transform:"rotate(0deg)",display:"flex",alignItems:"center",justifyContent:"center","& img, & svg":{width:14,height:14,display:"block"}});styled("ul")({listStyle:"none",margin:0,padding:0});var be=styled("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block",width:"100%",textAlign:"start"}));var xe=C;function he(){return jsx(fe,{children:jsx(F,{component:"img",src:A,alt:"",sx:{width:14,height:14,display:"block"}})})}function ye(){return jsx(me,{src:Rc,alt:""})}function Ce(e){return jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[jsx("path",{d:"M6.66683 12.8333C3.26058 12.8333 0.500163 10.0729 0.500163 6.66667C0.500163 3.26042 3.26058 0.5 6.66683 0.5C10.0731 0.5 12.8335 3.26042 12.8335 6.66667C12.8335 10.0729 10.0731 12.8333 6.66683 12.8333Z",stroke:"url(#paint0_linear_1010_1334)",strokeMiterlimit:"10"}),jsx("defs",{children:jsxs("linearGradient",{id:"paint0_linear_1010_1334",x1:"12.8335",y1:"6.66667",x2:"0.500163",y2:"6.66667",gradientUnits:"userSpaceOnUse",children:[jsx("stop",{stopOpacity:"0.619608"}),jsx("stop",{offset:"1",stopOpacity:"0"})]})})]})}function h(e){if(e==null||typeof e!="object"||!("value"in e)||!("label"in e))return false;let o=e.value;return typeof o=="string"||typeof o=="number"}function S(e){if(e==null)return "";if(typeof e=="string"||typeof e=="number")return String(e);if(h(e))return G(e);if(typeof e=="object"&&"label"in e){let o=e.label;if(typeof o=="string"||typeof o=="number")return String(o);let n=F$1(o).trim();if(n)return n}return ""}function ke(e,o){return h(e)&&h(o)?e.value===o.value||String(e.value)===String(o.value):e===o}function Ae(e){return !!e?.disabled}function Se(e){if(h(e))return String(e.value);if(e!=null&&typeof e=="object"&&"id"in e){let o=e.id;if(o!=null)return String(o)}return S(e)}function Ie(e){return h(e)?e.label:typeof e=="string"||typeof e=="number"?String(e):e!=null&&typeof e=="object"&&"label"in e?e.label:S(e)}function ve(e){let{options:o,value:n,onChange:l,label:a,placeholder:m,renderInput:I,slotProps:p,textFieldProps:y,loading:Oe,isLoading:Me,popupIcon:Pe,error:Re=false,helperText:w,feedback:$,required:D,disabled:Te,id:N="Autocomplete",className:Le,autocompleteClassNames:C,PopperComponent:Fe,hasClearIcon:$e=true,hasSelectedCheckmark:H=false,ClearIconComponent:De,onClear:Ne,disableClearable:He,clearIcon:Ve,menuDirection:V=oe,getOptionLabel:v,renderOption:Be,isOptionEqualToValue:O,getOptionDisabled:M,getOptionKey:P,noOptionsText:Ee,loadingText:ze,sx:Ge,...We}=e,B=!!(Me||Oe),{isProvided:E,isVisible:k,type:z}=Dc($),G=Re&&!k,W=a!=null&&a!=="",je=De??xe,qe=useCallback(t=>v?v(t):S(t),[v]),Ke=useCallback((t,r)=>O?O(t,r):ke(t,r),[O]),R=useCallback(t=>M?M(t):Ae(t),[M]),_e=useCallback(t=>P?P(t):Se(t),[P]),Ue=useCallback((t,r,b)=>{let{key:T,...q}=t;return jsxs(de,{...q,className:nc(u.option,q.className),$selected:b.selected,$optionDisabled:R(r),children:[jsx(ce,{children:Ie(r)}),H&&b.selected?jsx(ye,{}):null]},T)},[R,H]),Ye=useCallback(t=>{let r=typeof y=="function"?y(t):y;return jsx(ie,{...t,...r,variant:"filled",fullWidth:true,label:a??void 0,placeholder:m??r?.placeholder??void 0,required:D,error:G,helperText:null,feedbackType:z,hasFeedback:k,hasLabel:W,className:nc(u.input,C?.input,r?.className),InputProps:{...t.InputProps,...r?.InputProps,disableUnderline:true}})},[y,a,m,D,G,z,k,W,C?.input]),j=jsx(lo,{...We,id:N,"data-testid":N??"Autocomplete",fullWidth:true,className:nc(u.root,C?.root,Le),options:o,value:n,disabled:!!Te,onChange:(t,r,b,T)=>{l?.(t,r,b,T),b==="clear"&&Ne?.();},loading:B,forcePopupIcon:true,popupIcon:B?jsx(pe,{"aria-hidden":true,children:jsx(Ce,{})}):Pe??jsx(he,{}),getOptionLabel:qe,isOptionEqualToValue:Ke,getOptionDisabled:R,getOptionKey:_e,renderOption:Be??Ue,renderInput:I||Ye,PopperComponent:Fe??ue,noOptionsText:Ee??te,loadingText:ze??ne,disableClearable:He??!$e,clearIcon:Ve??jsx(je,{className:u.clear}),sx:mc(t=>({[`& .${autocompleteClasses.clearIndicator}`]:{visibility:"visible",padding:0,width:12,height:12,margin:0,backgroundColor:"transparent",color:t.v2.palette.base.black,"&:hover":{backgroundColor:"transparent",color:t.v2.palette.base.black},"& svg":{width:8,height:8,fontSize:8,display:"block"}}}),Ge),slotProps:{...p,clearIndicator:{disableRipple:true,...p?.clearIndicator},paper:{elevation:0,...p?.paper},popper:{...p?.popper,placement:p?.popper?.placement??(V===x.top?"top-start":"bottom-start"),modifiers:[{name:"offset",options:{offset:[0,8]}},{name:"flip",enabled:V!==x.top,options:{fallbackPlacements:["top-start"]}},...p?.popper?.modifiers??[]],className:nc(u.popper,C?.popper,p?.popper?.className)}}});return !E&&(w==null||w==="")?j:jsxs(se,{$hasFeedback:k,children:[j,E?jsx(ba,{className:u.feedback,...$}):jsx(be,{children:w})]})}ve.displayName="Autocomplete";var ao=memo(ve);
9
+ export{u as a,x as b,ao as c};
@@ -1,2 +1,2 @@
1
- import {j}from'./chunk-K43ZLU4I.js';import {lc}from'./chunk-I3LSSBRI.js';import {forwardRef,memo}from'react';import {jsxs,jsx}from'react/jsx-runtime';import S from'@mui/material/Box';import {styled}from'@mui/material/styles';var l="os-shared-Alert",r={root:`${l}-root`,icon:`${l}-icon`,message:`${l}-message`},p={error:e=>({color:e.v2.palette.error[500],background:e.v2.palette.status.danger.subtle}),warning:e=>({color:e.v2.palette.warning[500],background:e.v2.palette.status.warning.subtle}),success:e=>({color:e.v2.palette.success[700],background:e.v2.palette.status.success.subtle}),info:e=>({color:e.v2.palette.brand[500],background:e.v2.palette.interactive.primary.subtle})};var C=()=>jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",children:jsx("path",{d:"M6 12C9.30838 12 12 9.30838 12 6C12 2.69162 9.30838 -2.35309e-07 6 -5.24537e-07C2.69162 -8.13764e-07 8.13764e-07 2.69162 5.24537e-07 6C2.35309e-07 9.30838 2.69162 12 6 12ZM6 11.1C3.17801 11.1 0.9 8.82198 0.9 6C0.9 3.17802 3.17802 0.899999 6 0.899999C8.82199 0.899999 11.1 3.17802 11.1 6C11.1 8.82198 8.82198 11.1 6 11.1ZM6 9C6.15913 9 6.31174 8.93679 6.42426 8.82426C6.53679 8.71174 6.6 8.55913 6.6 8.4C6.6 8.24087 6.53679 8.08826 6.42426 7.97574C6.31174 7.86321 6.15913 7.8 6 7.8C5.84087 7.8 5.68826 7.86321 5.57574 7.97574C5.46321 8.08826 5.4 8.24087 5.4 8.4C5.4 8.55913 5.46321 8.71174 5.57574 8.82426C5.68826 8.93679 5.84087 9 6 9ZM6.00703 6.90644C6.12628 6.90458 6.23991 6.85546 6.32296 6.76988C6.40602 6.6843 6.45171 6.56925 6.45 6.45L6.45 3.15C6.45084 3.09037 6.43983 3.03116 6.41759 2.97583C6.39535 2.92049 6.36234 2.87013 6.32047 2.82766C6.2786 2.7852 6.22871 2.75148 6.17369 2.72846C6.11868 2.70544 6.05964 2.69359 6 2.69359C5.94036 2.69359 5.88132 2.70544 5.82631 2.72846C5.77129 2.75148 5.7214 2.7852 5.67953 2.82766C5.63766 2.87013 5.60465 2.92049 5.58241 2.97583C5.56017 3.03116 5.54916 3.09037 5.55 3.15L5.55 6.45C5.54914 6.51023 5.56037 6.57002 5.58304 6.62583C5.60571 6.68163 5.63935 6.73232 5.68197 6.77489C5.72459 6.81745 5.77533 6.85103 5.83116 6.87363C5.887 6.89623 5.9468 6.90739 6.00703 6.90644Z",fill:"currentColor"})}),d=()=>jsx("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",children:jsx("path",{d:"M9.63285 0.429835C9.54018 0.432536 9.45219 0.471196 9.38752 0.537631L3.21672 6.70844L0.614302 4.10602C0.581421 4.07177 0.542037 4.04443 0.498457 4.0256C0.454877 4.00676 0.407977 3.99681 0.360503 3.99633C0.313029 3.99585 0.265937 4.00484 0.221983 4.02279C0.178029 4.04073 0.138097 4.06727 0.104526 4.10084C0.0709555 4.13441 0.0444206 4.17434 0.0264755 4.21829C0.00853037 4.26225 -0.000464234 4.30934 1.8446e-05 4.35681C0.000501126 4.40429 0.0104514 4.45119 0.0292865 4.49477C0.0481216 4.53835 0.0754629 4.57773 0.109709 4.61061L2.96442 7.46533C3.03134 7.53222 3.12209 7.5698 3.21672 7.5698C3.31134 7.5698 3.40209 7.53222 3.46901 7.46533L9.89212 1.04222C9.9436 0.992086 9.97874 0.927576 9.99295 0.857134C10.0072 0.786693 9.99978 0.713603 9.97176 0.647428C9.94374 0.581254 9.8964 0.525079 9.83593 0.486255C9.77546 0.447431 9.70468 0.427767 9.63285 0.429835Z",fill:"currentColor"})}),m=()=>jsx("svg",{width:"12",height:"11",viewBox:"0 0 12 11",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",children:jsx("path",{d:"M6 7.5V5.5M6 3.5H6.005M11 5.5C11 8.26142 8.76142 10.5 6 10.5C3.23858 10.5 1 8.26142 1 5.5C1 2.73858 3.23858 0.5 6 0.5C8.76142 0.5 11 2.73858 11 5.5Z",stroke:"currentColor",strokeWidth:"0.8",strokeLinecap:"round",strokeLinejoin:"round"})});var g=styled(S,{shouldForwardProp:e=>e!=="$severity"})(({theme:e,$severity:s})=>({...p[s](e),display:"flex",alignItems:"center",gap:e.v2.spacing(4),minHeight:e.v2.spacing(32),padding:e.v2.spacing(8),borderRadius:e.v2.radius(4)})),f=styled("span")({width:12,height:12,flexShrink:0,display:"inline-flex",alignItems:"center",justifyContent:"center","& svg":{width:12,height:12,display:"block"}}),u=styled(j)({color:"inherit",wordBreak:"break-word"});function k(e){switch(e){case "success":return jsx(d,{});case "info":return jsx(m,{});case "error":case "warning":return jsx(C,{})}}var y=forwardRef(({severity:e="error",message:s,icon:v,className:h,sx:w,id:i,...A},x)=>jsxs(g,{ref:x,...A,$severity:e,className:lc(r.root,h),sx:w,id:i,"data-testid":i??"Alert",children:[jsx(f,{className:r.icon,children:v??k(e)}),jsx(u,{component:"p",textVariant:"body.xsmall.regular",className:r.message,children:s})]}));y.displayName="Alert";var M=memo(y);
1
+ import {j}from'./chunk-AXNWVU3K.js';import {nc}from'./chunk-RUFO5P34.js';import {forwardRef,memo}from'react';import {jsxs,jsx}from'react/jsx-runtime';import S from'@mui/material/Box';import {styled}from'@mui/material/styles';var l="os-shared-Alert",r={root:`${l}-root`,icon:`${l}-icon`,message:`${l}-message`},p={error:e=>({color:e.v2.palette.error[500],background:e.v2.palette.status.danger.subtle}),warning:e=>({color:e.v2.palette.warning[500],background:e.v2.palette.status.warning.subtle}),success:e=>({color:e.v2.palette.success[700],background:e.v2.palette.status.success.subtle}),info:e=>({color:e.v2.palette.brand[500],background:e.v2.palette.interactive.primary.subtle})};var C=()=>jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",children:jsx("path",{d:"M6 12C9.30838 12 12 9.30838 12 6C12 2.69162 9.30838 -2.35309e-07 6 -5.24537e-07C2.69162 -8.13764e-07 8.13764e-07 2.69162 5.24537e-07 6C2.35309e-07 9.30838 2.69162 12 6 12ZM6 11.1C3.17801 11.1 0.9 8.82198 0.9 6C0.9 3.17802 3.17802 0.899999 6 0.899999C8.82199 0.899999 11.1 3.17802 11.1 6C11.1 8.82198 8.82198 11.1 6 11.1ZM6 9C6.15913 9 6.31174 8.93679 6.42426 8.82426C6.53679 8.71174 6.6 8.55913 6.6 8.4C6.6 8.24087 6.53679 8.08826 6.42426 7.97574C6.31174 7.86321 6.15913 7.8 6 7.8C5.84087 7.8 5.68826 7.86321 5.57574 7.97574C5.46321 8.08826 5.4 8.24087 5.4 8.4C5.4 8.55913 5.46321 8.71174 5.57574 8.82426C5.68826 8.93679 5.84087 9 6 9ZM6.00703 6.90644C6.12628 6.90458 6.23991 6.85546 6.32296 6.76988C6.40602 6.6843 6.45171 6.56925 6.45 6.45L6.45 3.15C6.45084 3.09037 6.43983 3.03116 6.41759 2.97583C6.39535 2.92049 6.36234 2.87013 6.32047 2.82766C6.2786 2.7852 6.22871 2.75148 6.17369 2.72846C6.11868 2.70544 6.05964 2.69359 6 2.69359C5.94036 2.69359 5.88132 2.70544 5.82631 2.72846C5.77129 2.75148 5.7214 2.7852 5.67953 2.82766C5.63766 2.87013 5.60465 2.92049 5.58241 2.97583C5.56017 3.03116 5.54916 3.09037 5.55 3.15L5.55 6.45C5.54914 6.51023 5.56037 6.57002 5.58304 6.62583C5.60571 6.68163 5.63935 6.73232 5.68197 6.77489C5.72459 6.81745 5.77533 6.85103 5.83116 6.87363C5.887 6.89623 5.9468 6.90739 6.00703 6.90644Z",fill:"currentColor"})}),d=()=>jsx("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",children:jsx("path",{d:"M9.63285 0.429835C9.54018 0.432536 9.45219 0.471196 9.38752 0.537631L3.21672 6.70844L0.614302 4.10602C0.581421 4.07177 0.542037 4.04443 0.498457 4.0256C0.454877 4.00676 0.407977 3.99681 0.360503 3.99633C0.313029 3.99585 0.265937 4.00484 0.221983 4.02279C0.178029 4.04073 0.138097 4.06727 0.104526 4.10084C0.0709555 4.13441 0.0444206 4.17434 0.0264755 4.21829C0.00853037 4.26225 -0.000464234 4.30934 1.8446e-05 4.35681C0.000501126 4.40429 0.0104514 4.45119 0.0292865 4.49477C0.0481216 4.53835 0.0754629 4.57773 0.109709 4.61061L2.96442 7.46533C3.03134 7.53222 3.12209 7.5698 3.21672 7.5698C3.31134 7.5698 3.40209 7.53222 3.46901 7.46533L9.89212 1.04222C9.9436 0.992086 9.97874 0.927576 9.99295 0.857134C10.0072 0.786693 9.99978 0.713603 9.97176 0.647428C9.94374 0.581254 9.8964 0.525079 9.83593 0.486255C9.77546 0.447431 9.70468 0.427767 9.63285 0.429835Z",fill:"currentColor"})}),m=()=>jsx("svg",{width:"12",height:"11",viewBox:"0 0 12 11",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",children:jsx("path",{d:"M6 7.5V5.5M6 3.5H6.005M11 5.5C11 8.26142 8.76142 10.5 6 10.5C3.23858 10.5 1 8.26142 1 5.5C1 2.73858 3.23858 0.5 6 0.5C8.76142 0.5 11 2.73858 11 5.5Z",stroke:"currentColor",strokeWidth:"0.8",strokeLinecap:"round",strokeLinejoin:"round"})});var g=styled(S,{shouldForwardProp:e=>e!=="$severity"})(({theme:e,$severity:s})=>({...p[s](e),display:"flex",alignItems:"center",gap:e.v2.spacing(4),minHeight:e.v2.spacing(32),padding:e.v2.spacing(8),borderRadius:e.v2.radius(4)})),f=styled("span")({width:12,height:12,flexShrink:0,display:"inline-flex",alignItems:"center",justifyContent:"center","& svg":{width:12,height:12,display:"block"}}),u=styled(j)({color:"inherit",wordBreak:"break-word"});function k(e){switch(e){case "success":return jsx(d,{});case "info":return jsx(m,{});case "error":case "warning":return jsx(C,{})}}var y=forwardRef(({severity:e="error",message:s,icon:v,className:h,sx:w,id:i,...A},x)=>jsxs(g,{ref:x,...A,$severity:e,className:nc(r.root,h),sx:w,id:i,"data-testid":i??"Alert",children:[jsx(f,{className:r.icon,children:v??k(e)}),jsx(u,{component:"p",textVariant:"body.xsmall.regular",className:r.message,children:s})]}));y.displayName="Alert";var M=memo(y);
2
2
  export{r as a,M as b};
@@ -1,2 +1,2 @@
1
- import {P as P$1,O}from'./chunk-K43ZLU4I.js';import {lc}from'./chunk-I3LSSBRI.js';import'./chunk-IQAHULGQ.js';import {forwardRef,useMemo,useState,memo}from'react';import {styled,alpha,useTheme}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var a="os-shared-Sidebar",e={root:`${a}-root`,header:`${a}-header`,content:`${a}-content`,footer:`${a}-footer`,link:`${a}-link`,group:`${a}-group`,groupSummary:`${a}-groupSummary`,groupSummaryActive:`${a}-groupSummaryActive`,groupSummaryExpanded:`${a}-groupSummaryExpanded`,groupHeader:`${a}-groupHeader`,groupContent:`${a}-groupContent`,groupItem:`${a}-groupItem`,startAdornment:`${a}-startAdornment`,endAdornment:`${a}-endAdornment`};var G=r=>{let{palette:n}=useTheme();return jsx("svg",{width:"15",height:"14",viewBox:"0 0 15 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r,children:jsx("path",{d:"M9.97437 5.23633C10.0426 5.23465 10.1087 5.25507 10.1648 5.29395C10.2207 5.33278 10.264 5.3876 10.2888 5.45117C10.3136 5.51487 10.3195 5.5852 10.3064 5.65234C10.2934 5.71873 10.2614 5.77954 10.2146 5.82813L7.23608 9.01172C7.17462 9.07723 7.08968 9.11518 6.99976 9.11523C6.90985 9.11523 6.82492 9.07717 6.76343 9.01172L3.78394 5.8291L3.78491 5.82812C3.73877 5.77985 3.70612 5.71999 3.69312 5.6543C3.68007 5.58802 3.68575 5.51818 3.70972 5.45508C3.7337 5.39201 3.77618 5.33717 3.83081 5.29785C3.88553 5.25857 3.95095 5.23732 4.01831 5.2373C4.0635 5.23736 4.10797 5.24702 4.14917 5.26562C4.18997 5.28407 4.2263 5.31071 4.25659 5.34375L6.99878 8.27246L9.74194 5.34375C9.80179 5.27779 9.88521 5.23858 9.97437 5.23633Z",fill:n.text.textSecondary,stroke:n.text.textSecondary,strokeWidth:"0.204167"})})};var E="linear-gradient(270deg, #147DC5 0.67%, #3DA6E1 98.91%)",H=styled("div")(({theme:r})=>{let{base:n}=r.v2.palette;return {backgroundColor:alpha(n.white,.7),backdropFilter:r.v2.blur[16],width:183,position:"sticky",padding:`${r.v2.spacing(16)} ${r.v2.spacing(8)}`,height:"100%",overflow:"hidden",display:"flex",flexDirection:"column"}}),L=styled("div")({flexShrink:0}),R=styled("div")(({theme:r})=>({display:"flex",flexDirection:"column",gap:r.v2.spacing(4),flex:1,minHeight:0,overflow:"auto"})),P=styled("div")({flexShrink:0}),C={border:"none",width:"100%",textAlign:"left",font:"inherit",cursor:"pointer"},f=styled("span")({display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0}),x=styled("span")({display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,marginLeft:"auto"}),D=styled("button",{shouldForwardProp:r=>r!=="$isActive"})(({theme:r,$isActive:n=false})=>{let{base:o,foreground:d}=r.v2.palette;return {...C,...r.v2.typography.textVariants.body.small.regular,background:n?E:"transparent",borderRadius:r.v2.radius(4),padding:`${r.v2.spacing(4)} ${r.v2.spacing(8)}`,color:n?o.white:d.primary,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:r.v2.spacing(4)}}),F=styled(P$1)(({theme:r})=>({"&&":{background:"transparent",boxShadow:"none"},border:"none !important",borderRadius:"4px !important",[`& .${O.summary}`]:{padding:0,paddingRight:8,minHeight:"24px",height:"24px","&.Mui-expanded":{minHeight:"24px",height:"24px"},borderRadius:"4px !important",background:"transparent",transition:"none"},[`& .${O.summary}.${e.groupSummaryActive}`]:{backgroundColor:r.v2.palette.base.white},[`& .${O.summary}.${e.groupSummaryExpanded}`]:{backgroundColor:r.v2.palette.base.white},[`& .${O.content}`]:{borderTop:"none",padding:0},[`& .${O.labelContent}`]:{flexGrow:1,minWidth:0}})),V=styled("span",{shouldForwardProp:r=>r!=="$isActive"})(({theme:r,$isActive:n=false})=>{let{base:o,foreground:d}=r.v2.palette;return {...C,...r.v2.typography.textVariants.body.small.regular,background:n?o.white:"transparent",borderRadius:r.v2.radius(4),padding:`${r.v2.spacing(4)} ${r.v2.spacing(8)}`,color:d.primary,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:r.v2.spacing(4),width:"100%",cursor:"pointer"}}),T=styled("div")(({theme:r})=>({display:"flex",flexDirection:"column",gap:r.v2.spacing(4),paddingTop:r.v2.spacing(4)})),j=styled("button",{shouldForwardProp:r=>r!=="$isActive"})(({theme:r,$isActive:n=false})=>{let{base:o,foreground:d}=r.v2.palette;return {...C,...r.v2.typography.textVariants.body.small.regular,background:n?E:"transparent",borderRadius:r.v2.radius(4),padding:`${r.v2.spacing(4)} ${r.v2.spacing(8)}`,color:n?o.white:d.primary,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:r.v2.spacing(4)}});var $=r=>!!r.sections?.length;function M(r,n){let o=n??r?.[0]?.sections?.[0]?.id??r?.[0]?.id,d=r?.find(c=>c.id===o),u=!d||!$(d),l=u?r?.find(c=>c.sections?.some(y=>y.id===o)):d,g=l?.id??d?.id??o,b=l?u?o:l.sections?.[0]?.id:void 0;return {activeId:o,activeGroupId:g,activeLeafId:b}}var B=forwardRef(({sections:r,activeSectionId:n,onSelect:o,defaultExpandedIds:d,header:u,footer:l,id:g,className:b,sx:c},y)=>{let{activeId:h,activeGroupId:A,activeLeafId:k}=useMemo(()=>M(r,n),[r,n]),[W,O]=useState(()=>Object.fromEntries((d??[]).map(t=>[t,true])));return jsxs(H,{ref:y,id:g,"data-testid":g??"Sidebar",className:lc(e.root,b),sx:c,children:[u?jsx(L,{className:e.header,children:u}):null,jsx(R,{className:e.content,children:r?.map(t=>{if(!$(t))return jsxs(D,{type:"button",$isActive:h===t.id,"aria-current":h===t.id?"true":void 0,onClick:()=>o?.(t,void 0,[t]),className:e.link,children:[t.startAdornment?jsx(f,{className:e.startAdornment,children:t.startAdornment}):null,t.title,t.endAdornment?jsx(x,{className:e.endAdornment,children:t.endAdornment}):null]},t.id);let I=W[t.id]??t.id===A;return jsx(F,{className:e.group,expanded:I,onChange:i=>O(_=>({..._,[t.id]:i})),expandIcon:jsx(G,{}),slotProps:{root:{component:"section"},summary:{className:lc(e.groupSummary,A===t.id&&e.groupSummaryActive,I&&e.groupSummaryExpanded)}},label:jsxs(V,{$isActive:A===t.id,className:e.groupHeader,children:[t.startAdornment?jsx(f,{className:e.startAdornment,children:t.startAdornment}):null,t.title,t.endAdornment?jsx(x,{className:e.endAdornment,children:t.endAdornment}):null]}),content:jsx(T,{className:e.groupContent,children:t.sections?.map(i=>jsxs(j,{type:"button",$isActive:k===i.id,"aria-current":k===i.id?"true":void 0,onClick:()=>o?.(i,t,[t,i]),className:e.groupItem,children:[i.startAdornment?jsx(f,{className:e.startAdornment,children:i.startAdornment}):null,i.title,i.endAdornment?jsx(x,{className:e.endAdornment,children:i.endAdornment}):null]},`${t.id}-${i.id}`))})},t.id)})}),l?jsx(P,{className:e.footer,children:l}):null]})});B.displayName="Sidebar";var X=memo(B);
1
+ import {P as P$1,O}from'./chunk-AXNWVU3K.js';import {nc}from'./chunk-RUFO5P34.js';import'./chunk-IQAHULGQ.js';import {forwardRef,useMemo,useState,memo}from'react';import {styled,alpha,useTheme}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var a="os-shared-Sidebar",e={root:`${a}-root`,header:`${a}-header`,content:`${a}-content`,footer:`${a}-footer`,link:`${a}-link`,group:`${a}-group`,groupSummary:`${a}-groupSummary`,groupSummaryActive:`${a}-groupSummaryActive`,groupSummaryExpanded:`${a}-groupSummaryExpanded`,groupHeader:`${a}-groupHeader`,groupContent:`${a}-groupContent`,groupItem:`${a}-groupItem`,startAdornment:`${a}-startAdornment`,endAdornment:`${a}-endAdornment`};var G=r=>{let{palette:n}=useTheme();return jsx("svg",{width:"15",height:"14",viewBox:"0 0 15 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r,children:jsx("path",{d:"M9.97437 5.23633C10.0426 5.23465 10.1087 5.25507 10.1648 5.29395C10.2207 5.33278 10.264 5.3876 10.2888 5.45117C10.3136 5.51487 10.3195 5.5852 10.3064 5.65234C10.2934 5.71873 10.2614 5.77954 10.2146 5.82813L7.23608 9.01172C7.17462 9.07723 7.08968 9.11518 6.99976 9.11523C6.90985 9.11523 6.82492 9.07717 6.76343 9.01172L3.78394 5.8291L3.78491 5.82812C3.73877 5.77985 3.70612 5.71999 3.69312 5.6543C3.68007 5.58802 3.68575 5.51818 3.70972 5.45508C3.7337 5.39201 3.77618 5.33717 3.83081 5.29785C3.88553 5.25857 3.95095 5.23732 4.01831 5.2373C4.0635 5.23736 4.10797 5.24702 4.14917 5.26562C4.18997 5.28407 4.2263 5.31071 4.25659 5.34375L6.99878 8.27246L9.74194 5.34375C9.80179 5.27779 9.88521 5.23858 9.97437 5.23633Z",fill:n.text.textSecondary,stroke:n.text.textSecondary,strokeWidth:"0.204167"})})};var E="linear-gradient(270deg, #147DC5 0.67%, #3DA6E1 98.91%)",H=styled("div")(({theme:r})=>{let{base:n}=r.v2.palette;return {backgroundColor:alpha(n.white,.7),backdropFilter:r.v2.blur[16],width:183,position:"sticky",padding:`${r.v2.spacing(16)} ${r.v2.spacing(8)}`,height:"100%",overflow:"hidden",display:"flex",flexDirection:"column"}}),L=styled("div")({flexShrink:0}),R=styled("div")(({theme:r})=>({display:"flex",flexDirection:"column",gap:r.v2.spacing(4),flex:1,minHeight:0,overflow:"auto"})),P=styled("div")({flexShrink:0}),C={border:"none",width:"100%",textAlign:"left",font:"inherit",cursor:"pointer"},f=styled("span")({display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0}),x=styled("span")({display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,marginLeft:"auto"}),D=styled("button",{shouldForwardProp:r=>r!=="$isActive"})(({theme:r,$isActive:n=false})=>{let{base:o,foreground:d}=r.v2.palette;return {...C,...r.v2.typography.textVariants.body.small.regular,background:n?E:"transparent",borderRadius:r.v2.radius(4),padding:`${r.v2.spacing(4)} ${r.v2.spacing(8)}`,color:n?o.white:d.primary,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:r.v2.spacing(4)}}),F=styled(P$1)(({theme:r})=>({"&&":{background:"transparent",boxShadow:"none"},border:"none !important",borderRadius:"4px !important",[`& .${O.summary}`]:{padding:0,paddingRight:8,minHeight:"24px",height:"24px","&.Mui-expanded":{minHeight:"24px",height:"24px"},borderRadius:"4px !important",background:"transparent",transition:"none"},[`& .${O.summary}.${e.groupSummaryActive}`]:{backgroundColor:r.v2.palette.base.white},[`& .${O.summary}.${e.groupSummaryExpanded}`]:{backgroundColor:r.v2.palette.base.white},[`& .${O.content}`]:{borderTop:"none",padding:0},[`& .${O.labelContent}`]:{flexGrow:1,minWidth:0}})),V=styled("span",{shouldForwardProp:r=>r!=="$isActive"})(({theme:r,$isActive:n=false})=>{let{base:o,foreground:d}=r.v2.palette;return {...C,...r.v2.typography.textVariants.body.small.regular,background:n?o.white:"transparent",borderRadius:r.v2.radius(4),padding:`${r.v2.spacing(4)} ${r.v2.spacing(8)}`,color:d.primary,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:r.v2.spacing(4),width:"100%",cursor:"pointer"}}),T=styled("div")(({theme:r})=>({display:"flex",flexDirection:"column",gap:r.v2.spacing(4),paddingTop:r.v2.spacing(4)})),j=styled("button",{shouldForwardProp:r=>r!=="$isActive"})(({theme:r,$isActive:n=false})=>{let{base:o,foreground:d}=r.v2.palette;return {...C,...r.v2.typography.textVariants.body.small.regular,background:n?E:"transparent",borderRadius:r.v2.radius(4),padding:`${r.v2.spacing(4)} ${r.v2.spacing(8)}`,color:n?o.white:d.primary,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:r.v2.spacing(4)}});var $=r=>!!r.sections?.length;function M(r,n){let o=n??r?.[0]?.sections?.[0]?.id??r?.[0]?.id,d=r?.find(c=>c.id===o),u=!d||!$(d),l=u?r?.find(c=>c.sections?.some(y=>y.id===o)):d,g=l?.id??d?.id??o,b=l?u?o:l.sections?.[0]?.id:void 0;return {activeId:o,activeGroupId:g,activeLeafId:b}}var B=forwardRef(({sections:r,activeSectionId:n,onSelect:o,defaultExpandedIds:d,header:u,footer:l,id:g,className:b,sx:c},y)=>{let{activeId:h,activeGroupId:A,activeLeafId:k}=useMemo(()=>M(r,n),[r,n]),[W,O]=useState(()=>Object.fromEntries((d??[]).map(t=>[t,true])));return jsxs(H,{ref:y,id:g,"data-testid":g??"Sidebar",className:nc(e.root,b),sx:c,children:[u?jsx(L,{className:e.header,children:u}):null,jsx(R,{className:e.content,children:r?.map(t=>{if(!$(t))return jsxs(D,{type:"button",$isActive:h===t.id,"aria-current":h===t.id?"true":void 0,onClick:()=>o?.(t,void 0,[t]),className:e.link,children:[t.startAdornment?jsx(f,{className:e.startAdornment,children:t.startAdornment}):null,t.title,t.endAdornment?jsx(x,{className:e.endAdornment,children:t.endAdornment}):null]},t.id);let I=W[t.id]??t.id===A;return jsx(F,{className:e.group,expanded:I,onChange:i=>O(_=>({..._,[t.id]:i})),expandIcon:jsx(G,{}),slotProps:{root:{component:"section"},summary:{className:nc(e.groupSummary,A===t.id&&e.groupSummaryActive,I&&e.groupSummaryExpanded)}},label:jsxs(V,{$isActive:A===t.id,className:e.groupHeader,children:[t.startAdornment?jsx(f,{className:e.startAdornment,children:t.startAdornment}):null,t.title,t.endAdornment?jsx(x,{className:e.endAdornment,children:t.endAdornment}):null]}),content:jsx(T,{className:e.groupContent,children:t.sections?.map(i=>jsxs(j,{type:"button",$isActive:k===i.id,"aria-current":k===i.id?"true":void 0,onClick:()=>o?.(i,t,[t,i]),className:e.groupItem,children:[i.startAdornment?jsx(f,{className:e.startAdornment,children:i.startAdornment}):null,i.title,i.endAdornment?jsx(x,{className:e.endAdornment,children:i.endAdornment}):null]},`${t.id}-${i.id}`))})},t.id)})}),l?jsx(P,{className:e.footer,children:l}):null]})});B.displayName="Sidebar";var X=memo(B);
2
2
  export{e as a,X as b};
@@ -1 +1 @@
1
- import {d,j}from'./chunk-K43ZLU4I.js';import {Vb,lc}from'./chunk-I3LSSBRI.js';import {Gb}from'./chunk-IQAHULGQ.js';import {forwardRef,memo}from'react';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var i="os-shared-FilePreview",t={root:`${i}-root`,wrapper:`${i}-wrapper`,content:`${i}-content`,iconWrapper:`${i}-iconWrapper`,textWrapper:`${i}-textWrapper`,filename:`${i}-filename`,closeButton:`${i}-closeButton`};var x=styled("div",{shouldForwardProp:e=>e!=="$disabled"})(({theme:e,$disabled:r})=>{let{grey:o,base:s}=e.v2.palette;return {width:"100%",borderRadius:e.v2.radius(4),padding:`${e.v2.spacing(4)} ${e.v2.spacing(8)}`,display:"flex",alignItems:"center",justifyContent:"flex-start",backgroundColor:o[50],gap:e.v2.spacing(8),color:s.black,...r&&{opacity:.6,cursor:"default"}}}),P=styled("div")(({theme:e})=>({width:"100%",minWidth:0,display:"flex",alignItems:"center",justifyContent:"space-between",gap:e.v2.spacing(8)})),g=styled("div")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",flex:1,minWidth:0,overflow:"hidden",color:"inherit",cursor:"pointer",gap:e.v2.spacing(8)})),F=styled("div")(({theme:e})=>{let{grey:r,base:o}=e.v2.palette;return {display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",width:32,height:32,flexShrink:0,overflow:"hidden",backgroundColor:o.white,borderRadius:e.v2.radius(4),border:`1px solid ${r[100]}`}}),C=styled("div")(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center",flex:1,minWidth:0,overflow:"hidden",gap:e.v2.spacing(4),color:"inherit"})),b=styled("button")(()=>({display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,marginLeft:"auto",cursor:"pointer",backgroundColor:"transparent",border:"none",padding:0}));var L=e=>e.type.includes("image")?URL.createObjectURL(e):"",h=forwardRef(function({file:r,disabled:o,onRemoveFile:s,getFilePreview:W=L,icon:N,action:m,id:v,className:$,sx:I},j$1){let f=Vb(r)?W(r.file):"",R=Vb(r)&&r.file.type.includes("application/pdf"),p=Vb(r)?r.file:r;return jsx(x,{ref:j$1,id:v,"data-testid":v??"FilePreview",className:lc(t.root,$),sx:I,$disabled:o,children:jsxs(P,{"data-slot":"file-wrapper",className:t.wrapper,children:[jsxs(g,{"data-slot":"file-Content",className:t.content,children:[jsx(F,{"data-slot":"file-icon-wrapper",className:t.iconWrapper,children:Vb(r)&&f?jsx(d,{src:f,alt:p.name,className:t.iconWrapper,sx:{width:32,height:32,borderRadius:"50%",objectFit:R?"none":"cover"},onError:k=>{k.currentTarget.src=p.name;}}):N}),jsxs(C,{"data-slot":"text-wrapper",className:t.textWrapper,children:[jsx(j,{textVariant:"caption.medium",noWrap:true,"data-slot":"filename",className:t.filename,children:p.name}),!Vb(r)&&m?m:null]})]}),!o&&jsx(b,{type:"button","aria-label":"Remove file","data-slot":"close-icon-wrapper",className:t.closeButton,onClick:()=>{s?.(r);},children:jsx(d,{src:Gb,alt:"Remove file",sx:{width:10,height:10}})})]})})});h.displayName="FilePreview";var S=memo(h);export{t as a,S as b};
1
+ import {d,j}from'./chunk-AXNWVU3K.js';import {Xb,nc}from'./chunk-RUFO5P34.js';import {Gb}from'./chunk-IQAHULGQ.js';import {forwardRef,memo}from'react';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var i="os-shared-FilePreview",t={root:`${i}-root`,wrapper:`${i}-wrapper`,content:`${i}-content`,iconWrapper:`${i}-iconWrapper`,textWrapper:`${i}-textWrapper`,filename:`${i}-filename`,closeButton:`${i}-closeButton`};var x=styled("div",{shouldForwardProp:e=>e!=="$disabled"})(({theme:e,$disabled:r})=>{let{grey:o,base:s}=e.v2.palette;return {width:"100%",borderRadius:e.v2.radius(4),padding:`${e.v2.spacing(4)} ${e.v2.spacing(8)}`,display:"flex",alignItems:"center",justifyContent:"flex-start",backgroundColor:o[50],gap:e.v2.spacing(8),color:s.black,...r&&{opacity:.6,cursor:"default"}}}),P=styled("div")(({theme:e})=>({width:"100%",minWidth:0,display:"flex",alignItems:"center",justifyContent:"space-between",gap:e.v2.spacing(8)})),g=styled("div")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",flex:1,minWidth:0,overflow:"hidden",color:"inherit",cursor:"pointer",gap:e.v2.spacing(8)})),F=styled("div")(({theme:e})=>{let{grey:r,base:o}=e.v2.palette;return {display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",width:32,height:32,flexShrink:0,overflow:"hidden",backgroundColor:o.white,borderRadius:e.v2.radius(4),border:`1px solid ${r[100]}`}}),C=styled("div")(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center",flex:1,minWidth:0,overflow:"hidden",gap:e.v2.spacing(4),color:"inherit"})),b=styled("button")(()=>({display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,marginLeft:"auto",cursor:"pointer",backgroundColor:"transparent",border:"none",padding:0}));var L=e=>e.type.includes("image")?URL.createObjectURL(e):"",h=forwardRef(function({file:r,disabled:o,onRemoveFile:s,getFilePreview:W=L,icon:N,action:m,id:v,className:$,sx:I},j$1){let f=Xb(r)?W(r.file):"",R=Xb(r)&&r.file.type.includes("application/pdf"),p=Xb(r)?r.file:r;return jsx(x,{ref:j$1,id:v,"data-testid":v??"FilePreview",className:nc(t.root,$),sx:I,$disabled:o,children:jsxs(P,{"data-slot":"file-wrapper",className:t.wrapper,children:[jsxs(g,{"data-slot":"file-Content",className:t.content,children:[jsx(F,{"data-slot":"file-icon-wrapper",className:t.iconWrapper,children:Xb(r)&&f?jsx(d,{src:f,alt:p.name,className:t.iconWrapper,sx:{width:32,height:32,borderRadius:"50%",objectFit:R?"none":"cover"},onError:k=>{k.currentTarget.src=p.name;}}):N}),jsxs(C,{"data-slot":"text-wrapper",className:t.textWrapper,children:[jsx(j,{textVariant:"caption.medium",noWrap:true,"data-slot":"filename",className:t.filename,children:p.name}),!Xb(r)&&m?m:null]})]}),!o&&jsx(b,{type:"button","aria-label":"Remove file","data-slot":"close-icon-wrapper",className:t.closeButton,onClick:()=>{s?.(r);},children:jsx(d,{src:Gb,alt:"Remove file",sx:{width:10,height:10}})})]})})});h.displayName="FilePreview";var S=memo(h);export{t as a,S as b};
@@ -0,0 +1,2 @@
1
+ import {a as a$1}from'./chunk-SRVQWLPZ.js';import {a}from'./chunk-UFNFYH2N.js';import {aa,ba}from'./chunk-AXNWVU3K.js';import {Dc,nc}from'./chunk-RUFO5P34.js';import {forwardRef,useRef,useState,useCallback,useEffect,useMemo,memo}from'react';import C from'@mui/material/Box';import {jsxs,jsx}from'react/jsx-runtime';import {styled,alpha}from'@mui/material/styles';import _e from'react-date-object';import K from'react-date-object/calendars/arabic';import qe from'react-date-object/calendars/gregorian';import X from'react-date-object/locales/arabic_en';import Ke from'react-date-object/locales/gregorian_en';var n={gregorian:"gregorian",hijri:"hijri"};var m="os-shared-DateInput",u={root:`${m}-root`,card:`${m}-card`,header:`${m}-header`,label:`${m}-label`,parts:`${m}-parts`,day:`${m}-day`,month:`${m}-month`,year:`${m}-year`,switcher:`${m}-switcher`,helperText:`${m}-helperText`},Se=n.gregorian,we="Day",Ce="Month",Ve="Year",$e="Switch to Hijri Calendar",je="Switch to Gregorian Calendar",Oe=4,Re=8,Q=52,U=56,He=360,Z=1900,Le=10,ke=["January","February","March","April","May","June","July","August","September","October","November","December"],ve=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sept","Oct","Nov","Dec"],Fe=["Muharram","Safar","Rabi' al-Awwal","Rabi' al-Thani","Jumada al-Awwal","Jumada al-Thani","Rajab","Sha'ban","Ramadan","Shawwal","Dhul-Qa'dah","Dhul-Hijjah"],Ne=["Muh","Saf","Rab' I","Rab' II","Jum I","Jum II","Raj","Sha'","Ram","Shaw","Dhu'Q","Dhu'H"],Pe={day:null,month:null,year:null},kt=256,De=30,Me={height:De,minHeight:De,boxSizing:"border-box"},v={MenuListProps:{sx:{gap:0}},PaperProps:{sx:{maxHeight:kt,[`& .${a.option}`]:Me,"& .MuiMenuItem-root":Me}}};function Te(e){return jsxs("svg",{width:12,height:12,viewBox:"0 0 9 9",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":true,...e,children:[jsx("path",{d:"M7.375 8.625H1.625C0.935 8.625 0.375 8.065 0.375 7.375V1.625C0.375 0.935 0.935 0.375 1.625 0.375H7.375C8.065 0.375 8.625 0.935 8.625 1.625V7.375C8.625 8.065 8.065 8.625 7.375 8.625Z",stroke:"currentColor",strokeWidth:"0.75"}),jsx("path",{d:"M0.375 2.375H8.625",stroke:"currentColor",strokeWidth:"0.75"}),jsx("circle",{cx:"2.375",cy:"4.375",r:"0.625",fill:"currentColor"}),jsx("circle",{cx:"4.5",cy:"4.375",r:"0.625",fill:"currentColor"}),jsx("circle",{cx:"6.625",cy:"4.375",r:"0.625",fill:"currentColor"}),jsx("circle",{cx:"2.375",cy:"6.625",r:"0.625",fill:"currentColor"}),jsx("circle",{cx:"4.5",cy:"6.625",r:"0.625",fill:"currentColor"})]})}var Ye=styled(C)({display:"flex",flexDirection:"column",width:"100%"}),We=styled(C,{shouldForwardProp:e=>!["$error","$disabled","$feedbackType","$hasSwitcher","$hasFeedback"].includes(e)})(({theme:e,$error:t,$disabled:l,$feedbackType:r,$hasSwitcher:o,$hasFeedback:i})=>{let D=(r?aa(e,r).borderColor:void 0)??(t?e.palette.error.main:e.v2.palette.grey[100]),M=`${Oe}px`,O=i?0:o?`${Re}px`:M;return {display:"flex",flexDirection:"column",width:"100%",overflow:"hidden",boxSizing:"border-box",backgroundColor:e.palette.common.white,border:`1px solid ${D}`,borderBottom:i?"none":`1px solid ${D}`,borderRadius:`${M} ${M} ${O} ${O}`,opacity:l?.6:1}}),Be=styled(C)({display:"flex",flexDirection:"column",gap:8,padding:8,boxSizing:"border-box",width:"100%"}),Ge=styled(C)({display:"flex",alignItems:"center",gap:4,minHeight:10}),Ae=styled("span")(({theme:e})=>({fontSize:10,fontWeight:500,fontStyle:"normal",lineHeight:"100%",letterSpacing:0,color:e.palette.grey[700]})),Ee=styled(C)({display:"flex",alignItems:"flex-start",gap:4,width:"100%",minWidth:0,[`& .${u.day}`]:{width:Q,minWidth:Q,flex:"none"},[`& .${u.month}`]:{flex:1,minWidth:0,width:"auto"},[`& .${u.year}`]:{width:U,minWidth:U,flex:"none"}}),Je=styled("button")(({theme:e})=>({display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",justifyContent:"center",width:"100%",minHeight:32,margin:0,padding:8,boxSizing:"border-box",border:"none",borderRadius:0,backgroundColor:alpha(e.palette.common.black,.05),color:e.palette.text.primary,cursor:"pointer",appearance:"none",fontFamily:"inherit",whiteSpace:"nowrap","&:hover:not(:disabled)":{backgroundColor:alpha(e.palette.common.black,.08)},"&:disabled":{cursor:"default"},"&:focus-visible":{outline:`2px solid ${e.palette.primary.main}`,outlineOffset:-2}})),ze=styled("span")({display:"inline-flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",gap:4,minWidth:0,whiteSpace:"nowrap"}),Qe=styled("span")({width:12,height:12,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center","& svg":{display:"block",width:12,height:12}}),Ue=styled("span")({display:"block",fontSize:10,fontWeight:500,fontStyle:"normal",lineHeight:"16px",letterSpacing:0,whiteSpace:"nowrap",color:"rgba(32, 35, 43, 1)"}),Ze=styled("small",{shouldForwardProp:e=>e!=="$error"})(({theme:e,$error:t})=>({color:t?e.palette.error.main:alpha(e.palette.common.black,.6),fontSize:10,lineHeight:"10px",marginTop:4,display:"block"})),F={width:"100%"};function p(e){if(e==null||e==="")return null;let t=Number(e);return Number.isFinite(t)?t:null}function Xe(e){return p(e.day)!=null&&p(e.month)!=null&&p(e.year)!=null}function et(e){return {day:e.day,month:e.month.number,year:e.year}}function tt(e,t){let l=p(e.day),r=p(e.month),o=p(e.year);if(l==null||r==null||o==null)return null;let i=t===n.hijri,f=new _e({year:o,month:r,day:1,calendar:i?K:qe,locale:i?X:Ke}),D=f.month.length;return f.setDay(Math.min(Math.max(l,1),D)),f}function q(e){let t=tt(e,n.gregorian);return t?(t.convert(K,X),et(t)):null}function Ft(e){let t=tt(e,n.hijri);return t?(t.convert(qe,Ke),et(t)):null}function at(e,t){return t!==n.hijri?e:q(e)??{day:null,month:null,year:null}}function nt(e,t){return t!==n.hijri?e:Ft(e)}function Nt(e,t){return new Date(e,t,0).getDate()}function ee(e,t,l){return t==null||t<1||t>12?30:l===n.hijri?e==null?30:new _e({year:e,month:t,day:1,calendar:K,locale:X}).month.length:Nt(e??2001,t)}function rt(e){let t=Math.max(1,Math.min(31,Math.floor(e)));return Array.from({length:t},(l,r)=>{let o=r+1;return {value:o,label:String(o)}})}function ot(e,t=false){return (e===n.hijri?t?Ne:Fe:t?ve:ke).map((r,o)=>({value:o+1,label:r}))}function lt(e,t){let l=Math.floor(Math.min(e,t)),r=Math.floor(Math.max(e,t)),o=[];for(let i=r;i>=l;i-=1)o.push({value:i,label:String(i)});return o}function it(e,t){let l=q({day:1,month:1,year:e}),r=q({day:31,month:12,year:t});return {yearMin:p(l?.year)??e,yearMax:p(r?.year)??t}}function ut(){return new Date().getFullYear()+Le}function pt(e,t){let l=p(e.day);if(l==null)return e;let r=ee(p(e.year),p(e.month),t);return l<=r?e:{...e,day:r}}function st(e){return e===n.hijri?n.gregorian:n.hijri}function dt(e){return e==null?null:Array.isArray(e)?e[0]??null:e}function Bt(e,t){if(e){if(typeof e=="function"){e(t);return}e.current=t;}}var ct=forwardRef(function({label:t,value:l,onChange:r,dayOptions:o,monthOptions:i,yearOptions:f,hasAbbreviatedMonths:D=false,dayLabel:M=we,monthLabel:O=Ce,yearLabel:ht=Ve,hasCalendarSwitcher:ae=false,calendarMode:ne,onCalendarModeChange:re,switcherLabel:ft,yearMin:P=Z,yearMax:bt,disabled:S=false,error:xt=false,helperText:oe,feedback:T,id:w="DateInput",className:yt,sx:It,dateInputClassNames:x},le){let ie=useRef(null),[gt,Dt]=useState(false),Y=l!==void 0,[Mt,St]=useState(Pe),W=Y?l:Mt,B=ne!==void 0,[wt,Ct]=useState(Se),R=B?ne:wt,[ue,G]=useState(null),Vt=!!(o||i||f),y=R===n.hijri&&!Vt,pe=D||gt,H=useCallback(a=>{let c=a<He;Dt(h=>h===c?h:c);},[]),$t=useCallback(a=>{ie.current=a,Bt(le,a),a&&!i&&H(a.getBoundingClientRect().width);},[i,le,H]);useEffect(()=>{let a=ie.current;if(!a||i)return;let c=()=>H(a.getBoundingClientRect().width);if(c(),typeof ResizeObserver>"u")return;let h=new ResizeObserver(c);return h.observe(a),()=>h.disconnect()},[i,H]);let{isProvided:se,isVisible:de,type:jt}=Dc(T),ce=!!xt&&!se,me=t?.trim()??"",he=ft??(R===n.hijri?je:$e),I=useMemo(()=>{if(!y)return W;let a=at(W,n.hijri);return Xe(a)?a:ue??a},[ue,y,W]),A=bt??ut(),L=useMemo(()=>y?it(P,A):{yearMin:P,yearMax:A},[y,A,P]),E=y?n.hijri:n.gregorian,fe=ee(p(I.year),p(I.month),E),Ot=useMemo(()=>o??rt(fe),[fe,o]),Rt=useMemo(()=>i??ot(E,pe),[E,i,pe]),Ht=useMemo(()=>f??lt(L.yearMin,L.yearMax),[L.yearMax,L.yearMin,f]),J=useCallback(a=>{let c=o?a:pt(a,n.gregorian);Y||St(c),r?.(c);},[o,Y,r]),z=useCallback(a=>c=>{let h={...I,[a]:dt(c)};if(!y){J(h);return}let be=nt(h,n.hijri);if(be){G(null),J(be);return}G(h);},[J,I,y]),Lt=useCallback(()=>{let a=st(R);G(null),B||Ct(a),re?.(a);},[R,B,re]);return jsxs(Ye,{ref:$t,id:w,"data-testid":"DateInput",className:nc(u.root,x?.root,yt),sx:It,children:[jsxs(We,{className:nc(u.card,x?.card),$error:ce,$disabled:S,$feedbackType:de?jt:void 0,$hasSwitcher:ae,$hasFeedback:de,children:[jsxs(Be,{children:[me?jsx(Ge,{className:nc(u.header,x?.header),children:jsx(Ae,{className:nc(u.label,x?.label),children:me})}):null,jsxs(Ee,{className:nc(u.parts,x?.parts),children:[jsx(C,{className:u.day,children:jsx(a$1,{id:`${w}-day`,label:M,options:Ot,value:I.day,onChange:z("day"),disabled:S,MenuProps:v,sx:F})}),jsx(C,{className:u.month,children:jsx(a$1,{id:`${w}-month`,label:O,options:Rt,value:I.month,onChange:z("month"),disabled:S,MenuProps:v,sx:F})}),jsx(C,{className:u.year,children:jsx(a$1,{id:`${w}-year`,label:ht,options:Ht,value:I.year,onChange:z("year"),disabled:S,MenuProps:v,sx:F})})]})]}),ae?jsx(Je,{type:"button",id:`${w}-switcher`,className:nc(u.switcher,x?.switcher),onClick:Lt,disabled:S,"aria-label":he,children:jsxs(ze,{children:[jsx(Qe,{children:jsx(Te,{"aria-hidden":true})}),jsx(Ue,{children:he})]})}):null]}),T?jsx(ba,{...T}):null,!se&&oe?jsx(Ze,{className:nc(u.helperText,x?.helperText),$error:ce,children:oe}):null]})});ct.displayName="DateInput";var mt=memo(ct);
2
+ export{n as a,u as b,mt as c};
@@ -1 +1 @@
1
- import {L,K,j}from'./chunk-K43ZLU4I.js';import {xa,Ia,l,lc}from'./chunk-I3LSSBRI.js';import {forwardRef,useState,useMemo,memo}from'react';import V from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var r="os-shared-CurrencyAmountInput",t={root:`${r}-root`,field:`${r}-field`,display:`${r}-display`,integer:`${r}-integer`,separator:`${r}-separator`,decimal:`${r}-decimal`};var N=styled(V)(({theme:e})=>({color:e.v2.palette.foreground.primary,border:`1px solid ${e.v2.palette.border.default}`,padding:e.v2.spacing(8),borderRadius:e.v2.radius(4),display:"flex",alignItems:"center",justifyContent:"flex-end",width:93,height:32,textAlign:"right",input:{fontSize:"11px",border:"none",color:e.v2.palette.foreground.primary,height:30,padding:0,textAlign:"right"}})),I=styled(L)(({theme:e})=>({flexGrow:1,maxWidth:"100%",padding:0,border:"none",backgroundColor:"transparent",borderRadius:"none",height:24,[`& .${K.input}`]:{padding:0},input:{textAlign:"right",width:"100%",fontWeight:e.v2.typography.fontWeightRegular}})),b=styled(j)(({theme:e})=>({...e.v2.typography.textVariants.body.small.bold,display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",overflow:"auto"})),v=styled("span")(({theme:e})=>({fontWeight:e.v2.typography.fontWeightRegular}));var q=xa(),D=forwardRef(({amount:e,setAmount:u,maxAmount:l$1,isError:R,placeholder:E,selectedCurrency:p,id:o,className:k,sx:P,...B},M)=>{let[W,m]=useState(false),[c,S]=useState(e||""),{integerAmount:F,decimalAmount:d}=Ia(e,p?.code?.english),K=useMemo(()=>l(p?.decimals),[p]),T=n=>{let i=Number(n.target.value)||0;if(l$1&&i>l$1)return false;S(i),u(i);},H=()=>{m(false),u(Number(c));},L=n=>{q&&isNaN(Number(n.key))&&n.key!=="Backspace"&&n.key!=="."&&n.preventDefault();};return jsx(N,{id:o,"data-testid":o??"CurrencyAmountInput",className:lc(t.root,k),sx:P,...B,children:W?jsx(I,{ref:M,id:o,className:t.field,type:"number",placeholder:E??K,value:c,onChange:T,onBlur:H,onKeyDown:L,error:!!R,inputProps:{step:"0.01"},hideArrows:true,autoFocus:true,disableFocusRing:true}):jsxs(b,{id:o?`${o}-display`:void 0,"data-testid":o?`${o}-display`:"CurrencyAmount",className:t.display,component:"span",onClick:()=>{m(true);},children:[jsx("span",{className:t.integer,children:F}),d?jsxs(Fragment,{children:[jsx("span",{className:t.separator,children:"."}),jsx(v,{className:t.decimal,children:d})]}):null]})})});D.displayName="CurrencyAmountInput";var J=memo(D);export{t as a,J as b};
1
+ import {L,K,j}from'./chunk-AXNWVU3K.js';import {za,Ka,l,nc}from'./chunk-RUFO5P34.js';import {forwardRef,useState,useMemo,memo}from'react';import V from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var r="os-shared-CurrencyAmountInput",t={root:`${r}-root`,field:`${r}-field`,display:`${r}-display`,integer:`${r}-integer`,separator:`${r}-separator`,decimal:`${r}-decimal`};var N=styled(V)(({theme:e})=>({color:e.v2.palette.foreground.primary,border:`1px solid ${e.v2.palette.border.default}`,padding:e.v2.spacing(8),borderRadius:e.v2.radius(4),display:"flex",alignItems:"center",justifyContent:"flex-end",width:93,height:32,textAlign:"right",input:{fontSize:"11px",border:"none",color:e.v2.palette.foreground.primary,height:30,padding:0,textAlign:"right"}})),I=styled(L)(({theme:e})=>({flexGrow:1,maxWidth:"100%",padding:0,border:"none",backgroundColor:"transparent",borderRadius:"none",height:24,[`& .${K.input}`]:{padding:0},input:{textAlign:"right",width:"100%",fontWeight:e.v2.typography.fontWeightRegular}})),b=styled(j)(({theme:e})=>({...e.v2.typography.textVariants.body.small.bold,display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",overflow:"auto"})),v=styled("span")(({theme:e})=>({fontWeight:e.v2.typography.fontWeightRegular}));var q=za(),D=forwardRef(({amount:e,setAmount:u,maxAmount:l$1,isError:R,placeholder:E,selectedCurrency:p,id:o,className:k,sx:P,...B},M)=>{let[W,m]=useState(false),[c,S]=useState(e||""),{integerAmount:F,decimalAmount:d}=Ka(e,p?.code?.english),K=useMemo(()=>l(p?.decimals),[p]),T=n=>{let i=Number(n.target.value)||0;if(l$1&&i>l$1)return false;S(i),u(i);},H=()=>{m(false),u(Number(c));},L=n=>{q&&isNaN(Number(n.key))&&n.key!=="Backspace"&&n.key!=="."&&n.preventDefault();};return jsx(N,{id:o,"data-testid":o??"CurrencyAmountInput",className:nc(t.root,k),sx:P,...B,children:W?jsx(I,{ref:M,id:o,className:t.field,type:"number",placeholder:E??K,value:c,onChange:T,onBlur:H,onKeyDown:L,error:!!R,inputProps:{step:"0.01"},hideArrows:true,autoFocus:true,disableFocusRing:true}):jsxs(b,{id:o?`${o}-display`:void 0,"data-testid":o?`${o}-display`:"CurrencyAmount",className:t.display,component:"span",onClick:()=>{m(true);},children:[jsx("span",{className:t.integer,children:F}),d?jsxs(Fragment,{children:[jsx("span",{className:t.separator,children:"."}),jsx(v,{className:t.decimal,children:d})]}):null]})})});D.displayName="CurrencyAmountInput";var J=memo(D);export{t as a,J as b};
@@ -1 +1 @@
1
- import {a,d,b,c,j as j$1,e}from'./chunk-ZRRZG4CU.js';import {zc}from'./chunk-I3LSSBRI.js';import {fc,gc}from'./chunk-IQAHULGQ.js';import {memo,useId,useState}from'react';import ee from'@mui/material/ClickAwayListener';import te from'@mui/material/Popper';import {useTranslation}from'react-i18next';import {DateObject,Calendar}from'react-multi-date-picker';import i from'@mui/material/Box';import l from'@mui/material/Button';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var O=styled(l)(()=>({minWidth:"auto",padding:0,"& > img":{cursor:"pointer"}})),z=styled(i)(()=>({position:"relative"})),H=styled(i,{shouldForwardProp:t=>t!=="open"})(({open:t,theme:e})=>({display:t?"flex":"none",flexDirection:"column",background:e.palette.common.white,boxShadow:e.shadows[9],borderRadius:e.spacing(1),top:37,color:e.palette.text.primary,fontSize:"11px",margin:"8px 0",".rmdp-calendar":{padding:"8px 16px 16px"},".rmdp-rtl *":{fontFamily:"Tajawal"},".rmdp-rtl .sd":{paddingTop:"4px"},".rmdp-wrapper":{position:"relative",borderRadius:"8px",boxShadow:"none"},".rmdp-day span":{fontSize:"11px",fontWeight:500},".rmdp-day, .rmdp-week-day":{width:40,height:40,marginBottom:"2px",padding:"4px",fontSize:"11px",color:e.palette.grey[900]},".rmdp-day-picker":{padding:0},".rmdp-day.rmdp-today span":{backgroundColor:"transparent !important",color:e.palette.info.dark},".rmdp-day.rmdp-today.end span, .rmdp-day.rmdp-today.end span":{color:e.palette.common.white},".rmdp-range, .rmdp-day:not(.rmdp-disabled):not(.rmdp-day-hidden) span:hover":{background:e.palette.info.light,boxShadow:"none",color:e.palette.grey[900]},".rmdp-range-hover.start, .rmdp-range.start, .rmdp-range-hover.end, .rmdp-range.end, .rmdp-rtl .rmdp-range-hover.start, .rmdp-rtl .rmdp-range.start, .rmdp-rtl .rmdp-range-hover.end, .rmdp-rtl .rmdp-range.end":{borderRadius:"50%",background:e.palette.background.gradient.darkShadedBlue,color:e.palette.common.white},".rmdp-range.start:after":{content:'""',position:"absolute",background:e.palette.info.light,height:"100%",width:"50%",right:0,top:0,zIndex:-1},".rmdp-rtl .rmdp-range.start:after":{right:"unset",left:0},".rmdp-range.end:after":{content:'""',position:"absolute",background:e.palette.info.light,height:"100%",width:"50%",left:0,top:0,zIndex:-1},".rmdp-rtl .rmdp-range.end:after":{left:"unset",right:0},".rmdp-week-day":{color:e.palette.grey[700],marginBottom:"4px",fontSize:"11px",padding:"4px"},".rmdp-header-values":{color:e.palette.grey[900],fontSize:"12px",fontWeight:500,lineHeight:"20px",letterSpacing:"0.1px"},".rmdp-header-values span:nth-of-type(2)":{display:"none"},".rmdp-header":{padding:"4px 0",margin:0,fontSize:"12px"},".rmdp-top-class":{display:"block !important"},".rmdp-day.rmdp-selected span:not(.highlight)":{background:e.palette.info.dark},".rmdp-day.start.end":{overflow:"hidden"}})),j=styled(l,{shouldForwardProp:t=>t!=="open"})(({open:t,theme:e})=>({color:e.palette.text.primary,fontSize:"11px",fontWeight:500,padding:e.spacing(1),borderRadius:"4px",border:"1px solid",borderColor:e.palette.divider,background:e.palette.common.white,textTransform:"none",height:32,...t&&{border:"1px solid",borderColor:e.palette.info.dark,boxShadow:e.shadows[7]}})),A=styled(i)(({theme:t})=>({display:"flex",justifyContent:"flex-end",alignItems:"center",gap:8,padding:"16px",borderTop:`1px solid ${t.palette.divider}`})),E=styled(l)(({theme:t})=>({textTransform:"capitalize",padding:"8px 24px",width:75,height:32,fontSize:"11px",background:"transparent",color:t.palette.text.primary,border:"1px solid",borderColor:t.palette.divider,fontWeight:500,borderRadius:"4px","&:hover":{background:"transparent",color:t.palette.text.primary}})),Y=styled(l)(({theme:t})=>({textTransform:"capitalize",padding:"8px 24px",width:75,height:32,fontSize:"11px",borderRadius:"4px",fontWeight:700,background:t.palette.info.dark,"&:hover":{background:t.palette.info.dark}})),F=styled(i)(()=>({display:"flex",gap:"8px"}));var ne=["Su","Mo","Tu","We","Th","Fr","Sa"];function ae({isAr:t=false,value:e$1,setValue:y,enableTimePicker:p,placement:L,sx:R,...N}){let V=zc(useId(),"calender"),[w,k]=useState(null),[C,$]=useState(e$1?new DateObject(new Date(e$1.toLocaleString())):new DateObject(new Date)),[D,g]=useState(e$1?new DateObject(new Date(e$1.toLocaleString())):new DateObject(new Date)),q=e$1?.hour?a(e$1.hour):d(),G=e$1?.hour?b(e$1.hour):b(new Date().getHours()),[a$1,J]=useState({hour:q,minute:e$1?.minute??c(),period:G}),{t:B}=useTranslation(),u=!!w,K=r=>r==="right"?t?fc:gc:t?gc:fc,Q=r=>{k(r.currentTarget);},f=()=>{k(null);},U=()=>{let r=a$1.hour;p&&(r=e(a$1.hour,a$1.period||"AM"));let d=p?D.setHour(r).setMinute(a$1.minute):D;$(d),y&&y(d),f();},X=r=>{J(r);};return jsx(ee,{onClickAway:f,children:jsxs(z,{sx:{...R},id:V,"data-testid":"Calender",children:[jsx(j,{onClick:Q,open:u,className:"date-button",children:C.format("MMM D, YYYY")}),jsx(te,{open:u,anchorEl:w,placement:L,children:jsxs(H,{className:"calender-content",open:u,children:[jsx(Calendar,{numberOfMonths:1,format:"MMM DD YYYY",monthYearSeparator:" ",renderButton:(r,d)=>jsx(O,{onClick:d,children:jsx("img",{src:K(r),alt:"arrow"})}),onMonthChange:r=>{g(r);},onYearChange:r=>{g(r);},onChange:r=>{g(r);},weekDays:t?void 0:ne,minDate:new Date,value:C,...N}),jsxs(A,{sx:{...p&&{justifyContent:"space-between"}},children:[p&&jsx(j$1,{enableRealTimeChange:true,onChange:X,defaultTime:a$1}),jsxs(F,{children:[jsx(E,{variant:"contained",onClick:f,children:B("cancel")}),jsx(Y,{variant:"contained",onClick:U,children:B("okay")})]})]})]})})]})})}var I=memo(ae);var Te=I;export{Te as a};
1
+ import {a,d,b,c,j as j$1,e}from'./chunk-4JUVQWRF.js';import {Bc}from'./chunk-RUFO5P34.js';import {fc,gc}from'./chunk-IQAHULGQ.js';import {memo,useId,useState}from'react';import ee from'@mui/material/ClickAwayListener';import te from'@mui/material/Popper';import {useTranslation}from'react-i18next';import {DateObject,Calendar}from'react-multi-date-picker';import i from'@mui/material/Box';import l from'@mui/material/Button';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var O=styled(l)(()=>({minWidth:"auto",padding:0,"& > img":{cursor:"pointer"}})),z=styled(i)(()=>({position:"relative"})),H=styled(i,{shouldForwardProp:t=>t!=="open"})(({open:t,theme:e})=>({display:t?"flex":"none",flexDirection:"column",background:e.palette.common.white,boxShadow:e.shadows[9],borderRadius:e.spacing(1),top:37,color:e.palette.text.primary,fontSize:"11px",margin:"8px 0",".rmdp-calendar":{padding:"8px 16px 16px"},".rmdp-rtl *":{fontFamily:"Tajawal"},".rmdp-rtl .sd":{paddingTop:"4px"},".rmdp-wrapper":{position:"relative",borderRadius:"8px",boxShadow:"none"},".rmdp-day span":{fontSize:"11px",fontWeight:500},".rmdp-day, .rmdp-week-day":{width:40,height:40,marginBottom:"2px",padding:"4px",fontSize:"11px",color:e.palette.grey[900]},".rmdp-day-picker":{padding:0},".rmdp-day.rmdp-today span":{backgroundColor:"transparent !important",color:e.palette.info.dark},".rmdp-day.rmdp-today.end span, .rmdp-day.rmdp-today.end span":{color:e.palette.common.white},".rmdp-range, .rmdp-day:not(.rmdp-disabled):not(.rmdp-day-hidden) span:hover":{background:e.palette.info.light,boxShadow:"none",color:e.palette.grey[900]},".rmdp-range-hover.start, .rmdp-range.start, .rmdp-range-hover.end, .rmdp-range.end, .rmdp-rtl .rmdp-range-hover.start, .rmdp-rtl .rmdp-range.start, .rmdp-rtl .rmdp-range-hover.end, .rmdp-rtl .rmdp-range.end":{borderRadius:"50%",background:e.palette.background.gradient.darkShadedBlue,color:e.palette.common.white},".rmdp-range.start:after":{content:'""',position:"absolute",background:e.palette.info.light,height:"100%",width:"50%",right:0,top:0,zIndex:-1},".rmdp-rtl .rmdp-range.start:after":{right:"unset",left:0},".rmdp-range.end:after":{content:'""',position:"absolute",background:e.palette.info.light,height:"100%",width:"50%",left:0,top:0,zIndex:-1},".rmdp-rtl .rmdp-range.end:after":{left:"unset",right:0},".rmdp-week-day":{color:e.palette.grey[700],marginBottom:"4px",fontSize:"11px",padding:"4px"},".rmdp-header-values":{color:e.palette.grey[900],fontSize:"12px",fontWeight:500,lineHeight:"20px",letterSpacing:"0.1px"},".rmdp-header-values span:nth-of-type(2)":{display:"none"},".rmdp-header":{padding:"4px 0",margin:0,fontSize:"12px"},".rmdp-top-class":{display:"block !important"},".rmdp-day.rmdp-selected span:not(.highlight)":{background:e.palette.info.dark},".rmdp-day.start.end":{overflow:"hidden"}})),j=styled(l,{shouldForwardProp:t=>t!=="open"})(({open:t,theme:e})=>({color:e.palette.text.primary,fontSize:"11px",fontWeight:500,padding:e.spacing(1),borderRadius:"4px",border:"1px solid",borderColor:e.palette.divider,background:e.palette.common.white,textTransform:"none",height:32,...t&&{border:"1px solid",borderColor:e.palette.info.dark,boxShadow:e.shadows[7]}})),A=styled(i)(({theme:t})=>({display:"flex",justifyContent:"flex-end",alignItems:"center",gap:8,padding:"16px",borderTop:`1px solid ${t.palette.divider}`})),E=styled(l)(({theme:t})=>({textTransform:"capitalize",padding:"8px 24px",width:75,height:32,fontSize:"11px",background:"transparent",color:t.palette.text.primary,border:"1px solid",borderColor:t.palette.divider,fontWeight:500,borderRadius:"4px","&:hover":{background:"transparent",color:t.palette.text.primary}})),Y=styled(l)(({theme:t})=>({textTransform:"capitalize",padding:"8px 24px",width:75,height:32,fontSize:"11px",borderRadius:"4px",fontWeight:700,background:t.palette.info.dark,"&:hover":{background:t.palette.info.dark}})),F=styled(i)(()=>({display:"flex",gap:"8px"}));var ne=["Su","Mo","Tu","We","Th","Fr","Sa"];function ae({isAr:t=false,value:e$1,setValue:y,enableTimePicker:p,placement:L,sx:R,...N}){let V=Bc(useId(),"calender"),[w,k]=useState(null),[C,$]=useState(e$1?new DateObject(new Date(e$1.toLocaleString())):new DateObject(new Date)),[D,g]=useState(e$1?new DateObject(new Date(e$1.toLocaleString())):new DateObject(new Date)),q=e$1?.hour?a(e$1.hour):d(),G=e$1?.hour?b(e$1.hour):b(new Date().getHours()),[a$1,J]=useState({hour:q,minute:e$1?.minute??c(),period:G}),{t:B}=useTranslation(),u=!!w,K=r=>r==="right"?t?fc:gc:t?gc:fc,Q=r=>{k(r.currentTarget);},f=()=>{k(null);},U=()=>{let r=a$1.hour;p&&(r=e(a$1.hour,a$1.period||"AM"));let d=p?D.setHour(r).setMinute(a$1.minute):D;$(d),y&&y(d),f();},X=r=>{J(r);};return jsx(ee,{onClickAway:f,children:jsxs(z,{sx:{...R},id:V,"data-testid":"Calender",children:[jsx(j,{onClick:Q,open:u,className:"date-button",children:C.format("MMM D, YYYY")}),jsx(te,{open:u,anchorEl:w,placement:L,children:jsxs(H,{className:"calender-content",open:u,children:[jsx(Calendar,{numberOfMonths:1,format:"MMM DD YYYY",monthYearSeparator:" ",renderButton:(r,d)=>jsx(O,{onClick:d,children:jsx("img",{src:K(r),alt:"arrow"})}),onMonthChange:r=>{g(r);},onYearChange:r=>{g(r);},onChange:r=>{g(r);},weekDays:t?void 0:ne,minDate:new Date,value:C,...N}),jsxs(A,{sx:{...p&&{justifyContent:"space-between"}},children:[p&&jsx(j$1,{enableRealTimeChange:true,onChange:X,defaultTime:a$1}),jsxs(F,{children:[jsx(E,{variant:"contained",onClick:f,children:B("cancel")}),jsx(Y,{variant:"contained",onClick:U,children:B("okay")})]})]})]})})]})})}var I=memo(ae);var Te=I;export{Te as a};