@tap-payments/os-micro-frontend-shared 0.3.182-test.4 → 0.3.182-test.6

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 (158) hide show
  1. package/build/_chunks/{chunk-PJ2BCCZI.js → chunk-2SENQIAV.js} +1 -1
  2. package/build/_chunks/chunk-2ZSUWCWJ.js +1 -0
  3. package/build/_chunks/{chunk-GH43NHJ2.js → chunk-45PBPTCR.js} +1 -1
  4. package/build/_chunks/chunk-5TP2YZO7.js +2 -0
  5. package/build/_chunks/{chunk-IZENOXGO.js → chunk-5XU4E2GS.js} +1 -1
  6. package/build/_chunks/{chunk-27CKE5LO.js → chunk-6JBFW2CT.js} +1 -1
  7. package/build/_chunks/{chunk-RKQEODRF.js → chunk-6QO6WOG4.js} +1 -1
  8. package/build/_chunks/{chunk-4JXGA3OB.js → chunk-7QNDHMTX.js} +1 -1
  9. package/build/_chunks/{chunk-CQYXYYNC.js → chunk-A47JOO7H.js} +1 -1
  10. package/build/_chunks/{chunk-A2A6GTBC.js → chunk-A6Y6YL5Z.js} +1 -1
  11. package/build/_chunks/{chunk-WIQME66S.js → chunk-AP3AHXWU.js} +1 -1
  12. package/build/_chunks/{chunk-Y5HJUAMZ.js → chunk-B5F5NYTU.js} +1 -1
  13. package/build/_chunks/{chunk-TLAOA7ZF.js → chunk-BFA7JDSI.js} +1 -1
  14. package/build/_chunks/{chunk-JSC3KW4C.js → chunk-CYZ6QQMN.js} +1 -1
  15. package/build/_chunks/{chunk-5CGUALYW.js → chunk-DXI6G42Q.js} +1 -1
  16. package/build/_chunks/{chunk-2QINQUHF.js → chunk-EAWODBS3.js} +1 -1
  17. package/build/_chunks/{chunk-3ABGFDLW.js → chunk-EEOCGJGF.js} +1 -1
  18. package/build/_chunks/{chunk-HP62XFCT.js → chunk-EPOVIVRJ.js} +1 -1
  19. package/build/_chunks/{chunk-56R3ADFJ.js → chunk-FM6LEEYH.js} +1 -1
  20. package/build/_chunks/{chunk-DEKIIMGN.js → chunk-GCKJQWXA.js} +1 -1
  21. package/build/_chunks/{chunk-3T2OR3KW.js → chunk-GDDSIVZY.js} +1 -1
  22. package/build/_chunks/{chunk-2UVSOPTR.js → chunk-GLVBBMZ5.js} +1 -1
  23. package/build/_chunks/{chunk-YADUWKGM.js → chunk-HTNGZ26E.js} +1 -1
  24. package/build/_chunks/{chunk-7PJX5ZKM.js → chunk-IBBWXV4R.js} +2 -2
  25. package/build/_chunks/{chunk-7NTYMXH4.js → chunk-IBPFSBQL.js} +1 -1
  26. package/build/_chunks/{chunk-OGWUMYMY.js → chunk-J37UC5CR.js} +1 -1
  27. package/build/_chunks/{chunk-4CBQE3AB.js → chunk-J7XWBCKE.js} +1 -1
  28. package/build/_chunks/{chunk-XN47DSB4.js → chunk-JAZX3YDA.js} +1 -1
  29. package/build/_chunks/{chunk-AGQFP4MN.js → chunk-JCTXQPUQ.js} +1 -1
  30. package/build/_chunks/{chunk-WRR73LXR.js → chunk-JZAU3E6K.js} +1 -1
  31. package/build/_chunks/{chunk-OBQNUC7M.js → chunk-M5OE2QHS.js} +1 -1
  32. package/build/_chunks/{chunk-MW2U3CYT.js → chunk-M7OWIVWK.js} +1 -1
  33. package/build/_chunks/{chunk-CH2ZGJZI.js → chunk-NI5V2EIJ.js} +1 -1
  34. package/build/_chunks/{chunk-VNWKMRWK.js → chunk-NZZXZMT7.js} +1 -1
  35. package/build/_chunks/{chunk-ZMJUHXHX.js → chunk-O6FVASWN.js} +1 -1
  36. package/build/_chunks/chunk-OZUGKU3M.js +1 -0
  37. package/build/_chunks/chunk-P3FVYRTX.js +1 -0
  38. package/build/_chunks/{chunk-HKJC6M7O.js → chunk-QE447XS3.js} +1 -1
  39. package/build/_chunks/{chunk-HPF24DHY.js → chunk-QJGAD3EE.js} +1 -1
  40. package/build/_chunks/{chunk-4Z2TQN2P.js → chunk-RJCX7WPK.js} +1 -1
  41. package/build/_chunks/{chunk-ZCJSYQSQ.js → chunk-RSKZ4P26.js} +1 -1
  42. package/build/_chunks/{chunk-LLAU47BB.js → chunk-SJOLISU4.js} +1 -1
  43. package/build/_chunks/{chunk-POQMWUCD.js → chunk-SKYBSVA4.js} +1 -1
  44. package/build/_chunks/{chunk-MGMUAGFX.js → chunk-T4JTP3ZY.js} +1 -1
  45. package/build/_chunks/{chunk-2JH3DXZY.js → chunk-TQTXIPZM.js} +1 -1
  46. package/build/_chunks/{chunk-HHP2SQNP.js → chunk-TSEGTIJW.js} +1 -1
  47. package/build/_chunks/{chunk-HE6TUIYO.js → chunk-UWZW2PEP.js} +1 -1
  48. package/build/_chunks/{chunk-4C3JMCKP.js → chunk-WQFPJLGI.js} +1 -1
  49. package/build/_chunks/{chunk-RBVU22EH.js → chunk-XN74JNXK.js} +1 -1
  50. package/build/_chunks/{chunk-NGBJM3TE.js → chunk-XXH43MJ3.js} +1 -1
  51. package/build/_chunks/{chunk-VJTGGGCJ.js → chunk-XYR6MR4I.js} +1 -1
  52. package/build/_chunks/{chunk-DPRSHIL7.js → chunk-Z3GKYI37.js} +1 -1
  53. package/build/_chunks/chunk-ZEF2G4DA.js +1 -0
  54. package/build/components/AccountDropdown/index.js +1 -1
  55. package/build/components/ActionMenu/index.js +1 -1
  56. package/build/components/ActiveFilterChip/index.js +1 -1
  57. package/build/components/AmountConversionFilter/index.js +1 -1
  58. package/build/components/AmountInput/index.js +1 -1
  59. package/build/components/AmountSlider/index.js +1 -1
  60. package/build/components/AppServices/index.js +1 -1
  61. package/build/components/AppServicesBar/index.js +1 -1
  62. package/build/components/AppWindowWrapper/index.js +1 -1
  63. package/build/components/BrandLogo/index.js +1 -1
  64. package/build/components/Button/Button.d.ts +16 -0
  65. package/build/components/Button/PlusButton/PlusButton.d.ts +10 -0
  66. package/build/components/Button/PlusButton/index.d.ts +2 -0
  67. package/build/components/Button/StyledButton/StyledButton.d.ts +11 -0
  68. package/build/components/Button/StyledButton/index.d.ts +2 -0
  69. package/build/components/Button/StyledButton/style.d.ts +5 -0
  70. package/build/components/Button/index.d.ts +4 -0
  71. package/build/components/Button/index.js +1 -0
  72. package/build/components/Button/style.d.ts +5 -0
  73. package/build/components/Calender/index.js +1 -1
  74. package/build/components/ChipStack/index.js +1 -1
  75. package/build/components/ColorPicker/index.js +1 -1
  76. package/build/components/ColumnViews/hooks/useViewsMenu.d.ts +2 -2
  77. package/build/components/ColumnViews/index.js +1 -1
  78. package/build/components/ConfirmDialog/index.js +1 -1
  79. package/build/components/CountryFilter/index.js +1 -1
  80. package/build/components/CurrencyFilter/index.js +1 -1
  81. package/build/components/Customer/index.js +1 -1
  82. package/build/components/DateFilter/index.js +1 -1
  83. package/build/components/DateFilter/style.d.ts +6 -12
  84. package/build/components/DeviceIcon/index.js +1 -1
  85. package/build/components/Discount/index.js +1 -1
  86. package/build/components/Dropdown2/index.js +1 -1
  87. package/build/components/DropdownButton/index.js +1 -1
  88. package/build/components/DropdownMenu/index.js +1 -1
  89. package/build/components/ExpandableSideBar/index.js +1 -1
  90. package/build/components/FileInputPreview/index.js +1 -1
  91. package/build/components/FileUpload/index.js +1 -1
  92. package/build/components/FileUploader/index.js +1 -1
  93. package/build/components/FilterDropdown/index.js +1 -1
  94. package/build/components/Filters/index.js +1 -1
  95. package/build/components/HeatMap/index.js +1 -1
  96. package/build/components/IconWithBadge/index.js +1 -1
  97. package/build/components/InputBase/index.js +1 -1
  98. package/build/components/Inputs/index.js +1 -1
  99. package/build/components/JSONViewer/index.js +1 -1
  100. package/build/components/LanguageDropdown/index.js +1 -1
  101. package/build/components/ListColumnFilter/index.js +1 -1
  102. package/build/components/ListHeader/index.js +1 -1
  103. package/build/components/MenuItem/index.js +1 -1
  104. package/build/components/MerchantCurrencyDropdown/index.js +1 -1
  105. package/build/components/MerchantLogo/index.js +1 -1
  106. package/build/components/MerchantsDropdown/index.js +1 -1
  107. package/build/components/MultiSelectDropdownButton/index.js +1 -1
  108. package/build/components/MultiSelectWithSearch/index.js +1 -1
  109. package/build/components/NestedDropdown/index.js +1 -1
  110. package/build/components/PartnersFilter/index.js +1 -1
  111. package/build/components/PaymentSourceFilter/index.js +1 -1
  112. package/build/components/PhoneFilter/index.js +1 -1
  113. package/build/components/ProgressRing/index.js +1 -1
  114. package/build/components/RFH/index.js +1 -1
  115. package/build/components/RadioGroup/index.js +1 -1
  116. package/build/components/RangeCalender/index.js +1 -1
  117. package/build/components/RatingCount/index.js +1 -1
  118. package/build/components/ReceiptsViewer/index.js +1 -1
  119. package/build/components/ReferenceTypeFilter/index.js +1 -1
  120. package/build/components/SalesChannelFilter/index.js +1 -1
  121. package/build/components/SearchButton/index.js +1 -1
  122. package/build/components/SelectDropdown/index.js +1 -1
  123. package/build/components/SelectWithSearch/index.js +1 -1
  124. package/build/components/StatusBar/index.js +1 -1
  125. package/build/components/StatusButton/index.js +1 -1
  126. package/build/components/StatusFilter/index.js +1 -1
  127. package/build/components/StatusIcons/index.js +1 -1
  128. package/build/components/StatusLabel/index.js +1 -1
  129. package/build/components/TableCells/index.js +1 -1
  130. package/build/components/TableReports/index.js +1 -1
  131. package/build/components/Timepicker/index.js +1 -1
  132. package/build/components/Toolbar/index.js +1 -1
  133. package/build/components/TooltipChip/index.js +1 -1
  134. package/build/components/TreeDropdown/index.js +1 -1
  135. package/build/components/VAT/index.js +1 -1
  136. package/build/components/VerificationIcon/index.js +1 -1
  137. package/build/components/ViewColumnRadioFilter/index.js +1 -1
  138. package/build/components/VirtualTables/index.js +1 -1
  139. package/build/components/Widget/index.js +1 -1
  140. package/build/components/WindowAppIcon/index.js +1 -1
  141. package/build/components/WindowSideBar/index.js +1 -1
  142. package/build/components/index.d.ts +2 -2
  143. package/build/components/index.js +1 -1
  144. package/build/components/primitives/Dialog/style.d.ts +3 -1
  145. package/build/components/primitives/Dialog/type.d.ts +2 -0
  146. package/build/components/primitives/index.js +1 -1
  147. package/build/index.js +1 -1
  148. package/package.json +2 -2
  149. package/build/_chunks/chunk-EN3RBDWB.js +0 -1
  150. package/build/_chunks/chunk-FOLYGHQ2.js +0 -1
  151. package/build/_chunks/chunk-M2V4CFO7.js +0 -2
  152. package/build/_chunks/chunk-OZIYD5WI.js +0 -1
  153. package/build/components/Dialog/Dialog.d.ts +0 -14
  154. package/build/components/Dialog/components/DialogToolbar.d.ts +0 -9
  155. package/build/components/Dialog/constant.d.ts +0 -1
  156. package/build/components/Dialog/index.d.ts +0 -4
  157. package/build/components/Dialog/index.js +0 -1
  158. package/build/components/Dialog/style.d.ts +0 -272
@@ -1 +1 @@
1
- import {r}from'./chunk-7PJX5ZKM.js';import {yc,cb}from'./chunk-2SKLD6QR.js';import {useId}from'react';import {motion}from'framer-motion';import {Box,Typography}from'@mui/material';import {styled}from'@mui/material/styles';import I from'@mui/material/Box';import {jsxs,jsx}from'react/jsx-runtime';var u=styled(Box)(({size:t})=>({display:"flex",flexDirection:"column",alignItems:"center",width:t,height:t,position:"relative"})),y=styled(Box)({position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center"}),b=styled(Typography,{shouldForwardProp:t=>t!=="isEmpty"})(({isEmpty:t})=>({fontSize:"17px",fontWeight:700,color:t?"#CFD0D2":"#000"})),D=styled(Typography,{shouldForwardProp:t=>t!=="isEmpty"})(({isEmpty:t})=>({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",color:t?"#CFD0D2":"#8D8D94",fontSize:"11px",fontWeight:500,letterSpacing:"0%",textAlign:"right",verticalAlign:"middle"}));var C=()=>jsxs(I,{component:"span",sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:"6px"},children:[jsx(r,{width:51,height:16}),jsx(r,{width:84,height:8})]});var v=({value:t,label:k,size:o=172,strokeWidth:p=22,isLoading:l=false})=>{let E=yc(useId(),"progress-ring"),m=t==null||t==="",F=cb(t||"0"),s=Math.min(Math.max(F??0,0),100),c=(o-p)/2,n=2*Math.PI*c,r=o/2;return jsxs(u,{id:E,"data-testid":"ProgressRing",size:o,children:[jsxs("svg",{width:o,height:o,viewBox:`0 0 ${o} ${o}`,style:{position:"absolute",top:0,left:0},children:[jsx("defs",{children:jsxs("linearGradient",{id:"progressGradient",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[jsx("stop",{offset:"0.67%",stopColor:"#3DA6E1"}),jsx("stop",{offset:"98.91%",stopColor:"#147DC5"})]})}),jsx("circle",{cx:r,cy:r,r:c,stroke:"#F3F3F3",strokeWidth:p,fill:"transparent"}),jsx(motion.circle,{cx:r,cy:r,r:c,stroke:"url(#progressGradient)",strokeWidth:p,fill:"transparent",strokeLinecap:"round",strokeDasharray:n,strokeDashoffset:n,transform:`rotate(-90 ${r} ${r})`,animate:{strokeDashoffset:l?n:n-n*s/100},transition:{duration:1,ease:"easeOut"}})]}),jsxs(y,{children:[jsx(b,{isEmpty:m,children:l?jsx(C,{}):m?"----":jsxs(motion.span,{initial:{opacity:0},animate:{opacity:1},transition:{ease:"easeOut",duration:.5},children:[Number.isInteger(s)?s:s.toFixed(1),"%"]})}),!l&&jsx(D,{isEmpty:m,children:k})]})]})},T=v;var U=T;export{U as a};
1
+ import {r}from'./chunk-IBBWXV4R.js';import {yc,cb}from'./chunk-2SKLD6QR.js';import {useId}from'react';import {motion}from'framer-motion';import {Box,Typography}from'@mui/material';import {styled}from'@mui/material/styles';import I from'@mui/material/Box';import {jsxs,jsx}from'react/jsx-runtime';var u=styled(Box)(({size:t})=>({display:"flex",flexDirection:"column",alignItems:"center",width:t,height:t,position:"relative"})),y=styled(Box)({position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center"}),b=styled(Typography,{shouldForwardProp:t=>t!=="isEmpty"})(({isEmpty:t})=>({fontSize:"17px",fontWeight:700,color:t?"#CFD0D2":"#000"})),D=styled(Typography,{shouldForwardProp:t=>t!=="isEmpty"})(({isEmpty:t})=>({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",color:t?"#CFD0D2":"#8D8D94",fontSize:"11px",fontWeight:500,letterSpacing:"0%",textAlign:"right",verticalAlign:"middle"}));var C=()=>jsxs(I,{component:"span",sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:"6px"},children:[jsx(r,{width:51,height:16}),jsx(r,{width:84,height:8})]});var v=({value:t,label:k,size:o=172,strokeWidth:p=22,isLoading:l=false})=>{let E=yc(useId(),"progress-ring"),m=t==null||t==="",F=cb(t||"0"),s=Math.min(Math.max(F??0,0),100),c=(o-p)/2,n=2*Math.PI*c,r=o/2;return jsxs(u,{id:E,"data-testid":"ProgressRing",size:o,children:[jsxs("svg",{width:o,height:o,viewBox:`0 0 ${o} ${o}`,style:{position:"absolute",top:0,left:0},children:[jsx("defs",{children:jsxs("linearGradient",{id:"progressGradient",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[jsx("stop",{offset:"0.67%",stopColor:"#3DA6E1"}),jsx("stop",{offset:"98.91%",stopColor:"#147DC5"})]})}),jsx("circle",{cx:r,cy:r,r:c,stroke:"#F3F3F3",strokeWidth:p,fill:"transparent"}),jsx(motion.circle,{cx:r,cy:r,r:c,stroke:"url(#progressGradient)",strokeWidth:p,fill:"transparent",strokeLinecap:"round",strokeDasharray:n,strokeDashoffset:n,transform:`rotate(-90 ${r} ${r})`,animate:{strokeDashoffset:l?n:n-n*s/100},transition:{duration:1,ease:"easeOut"}})]}),jsxs(y,{children:[jsx(b,{isEmpty:m,children:l?jsx(C,{}):m?"----":jsxs(motion.span,{initial:{opacity:0},animate:{opacity:1},transition:{ease:"easeOut",duration:.5},children:[Number.isInteger(s)?s:s.toFixed(1),"%"]})}),!l&&jsx(D,{isEmpty:m,children:k})]})]})},T=v;var U=T;export{U as a};
@@ -1 +1 @@
1
- import {r,p as p$1}from'./chunk-7PJX5ZKM.js';import {yc}from'./chunk-2SKLD6QR.js';import {useId}from'react';import p from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var u=styled(p)(({rows:e,columns:t})=>({display:"grid",gridTemplateColumns:`auto repeat(${t}, 1fr)`,gridTemplateRows:`auto repeat(${e}, 1fr)`,gap:"6px"})),$=styled(p)(()=>({width:24,position:"sticky",top:0,left:0,zIndex:3})),g=styled(p)(({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",textAlign:"center",fontSize:"10px",fontWeight:500,color:e.palette.grey[700],lineHeight:"100%",letterSpacing:"0",position:"sticky",top:0,zIndex:2,backgroundColor:"#fbfbfb"})),M=styled(p)(({theme:e,percentage:t=0})=>({width:"24px",height:"8px",borderRadius:"1px",backgroundColor:t===0?alpha(e.palette.grey[700],.1):alpha(e.palette.info.dark,t)})),O=styled(g)(()=>({fontSize:"9px",top:"auto",left:0,zIndex:1})),w=styled(p)(()=>({padding:"22px 12px",overflow:"auto",maxHeight:"480px"}));function b({xAxis:e,yAxis:t,series:n,isLoading:m,tooltip:l}){let s=yc(useId(),"heat-map"),d=e.labels,y=t.labels;return jsxs(w,{id:s,"data-testid":"HeatMap",children:[jsxs(u,{className:"x-labels",rows:1,columns:d.length,children:[jsx($,{}),d.map((r,c)=>jsx(g,{children:e.render?e.render(r):r},`x-${c}-${r}`))]}),jsx(u,{className:"y-labels",rows:y.length,columns:d.length,children:y.map((r$1,c)=>jsxs(Fragment,{children:[jsx(O,{sx:{minWidth:"25px"},children:t.render?t.render(r$1):r$1},`y-${c}-${r$1}`),d.map((i,h)=>{if(m)return jsx(r,{variant:"rectangular",width:"24px",height:"8px"},`${i}-${h}`);let f=n?.[i]?.[r$1]??{};return jsx(p$1,{title:l?.render&&f?.value?l.render(f,i,r$1):null,children:jsx(M,{percentage:f?.colorOpacityDegree})},`${i}-${h}`)})]}))})]})}var H=[.06,.1,.2,.3,.4,.5,.6,.7,.8,.9,1];function D(e,t,n){if(t===n)return 0;let m=n-t,l=(e-t)/m,s=Math.floor(l*10);return H[Math.max(0,Math.min(10,s))]}var q=b;export{D as a,q as b};
1
+ import {r,p as p$1}from'./chunk-IBBWXV4R.js';import {yc}from'./chunk-2SKLD6QR.js';import {useId}from'react';import p from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var u=styled(p)(({rows:e,columns:t})=>({display:"grid",gridTemplateColumns:`auto repeat(${t}, 1fr)`,gridTemplateRows:`auto repeat(${e}, 1fr)`,gap:"6px"})),$=styled(p)(()=>({width:24,position:"sticky",top:0,left:0,zIndex:3})),g=styled(p)(({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",textAlign:"center",fontSize:"10px",fontWeight:500,color:e.palette.grey[700],lineHeight:"100%",letterSpacing:"0",position:"sticky",top:0,zIndex:2,backgroundColor:"#fbfbfb"})),M=styled(p)(({theme:e,percentage:t=0})=>({width:"24px",height:"8px",borderRadius:"1px",backgroundColor:t===0?alpha(e.palette.grey[700],.1):alpha(e.palette.info.dark,t)})),O=styled(g)(()=>({fontSize:"9px",top:"auto",left:0,zIndex:1})),w=styled(p)(()=>({padding:"22px 12px",overflow:"auto",maxHeight:"480px"}));function b({xAxis:e,yAxis:t,series:n,isLoading:m,tooltip:l}){let s=yc(useId(),"heat-map"),d=e.labels,y=t.labels;return jsxs(w,{id:s,"data-testid":"HeatMap",children:[jsxs(u,{className:"x-labels",rows:1,columns:d.length,children:[jsx($,{}),d.map((r,c)=>jsx(g,{children:e.render?e.render(r):r},`x-${c}-${r}`))]}),jsx(u,{className:"y-labels",rows:y.length,columns:d.length,children:y.map((r$1,c)=>jsxs(Fragment,{children:[jsx(O,{sx:{minWidth:"25px"},children:t.render?t.render(r$1):r$1},`y-${c}-${r$1}`),d.map((i,h)=>{if(m)return jsx(r,{variant:"rectangular",width:"24px",height:"8px"},`${i}-${h}`);let f=n?.[i]?.[r$1]??{};return jsx(p$1,{title:l?.render&&f?.value?l.render(f,i,r$1):null,children:jsx(M,{percentage:f?.colorOpacityDegree})},`${i}-${h}`)})]}))})]})}var H=[.06,.1,.2,.3,.4,.5,.6,.7,.8,.9,1];function D(e,t,n){if(t===n)return 0;let m=n-t,l=(e-t)/m,s=Math.floor(l*10);return H[Math.max(0,Math.min(10,s))]}var q=b;export{D as a,q as b};
@@ -1 +1 @@
1
- import {c}from'./chunk-2JH3DXZY.js';import {s}from'./chunk-EDZWCPS2.js';import {memo,useState,useRef,useEffect}from'react';import {useTranslation}from'react-i18next';import F from'@mui/material/Box';import K from'@mui/material/Button';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var Q=styled(F)(({theme:n})=>({background:n.palette.grey[700],width:27,height:14,display:"inline-flex",alignItems:"center",marginInlineStart:"4px",borderRadius:"10px",padding:"2px 6px",img:{cursor:"pointer"}})),E=styled(F)(()=>({padding:"8px 16px",display:"flex",gap:"8px",justifyContent:"center"})),b=styled(K)(({theme:n})=>({textTransform:"capitalize",minWidth:"auto",width:"100%",borderRadius:"4px",border:`1px solid ${n.palette.info.dark}`,backgroundColor:n.palette.info.dark,fontWeight:700,fontSize:"11px",color:n.palette.common.white,"&:hover":{backgroundColor:n.palette.info.dark}})),O=styled(K)(({theme:n})=>({textTransform:"capitalize",minWidth:"auto",width:"100%",borderRadius:"4px",border:`1px solid ${n.palette.divider}`,backgroundColor:n.palette.common.white,fontWeight:500,fontSize:"11px",color:n.palette.text.primary,"&:hover":{background:"transparent"}}));var v="188px";function $({onCloseDropdown:n,filter:o,styles:g,header:R,searchable:c$1}){let[T,W]=useState([]),{t:f}=useTranslation(),p=useRef([]),B=o?.options?.map(e=>e.value).join(",")??"";useEffect(()=>{let e=i=>{let r=o?.data?.[o.apiKey]??[];if(Array.isArray(r)&&r.length)return new Set(r).has(i)},s=i=>i.map(({placeholder:r,value:t,isSelected:a,icon:l,options:d})=>{let x;if(c$1){let m=p.current.find(y=>y.apiKey===t);x=m!==void 0?m.isSelected??false:(a||e(t)||d?.every(({value:y})=>e(y)))??false;}else x=(a||e(t)||d?.every(({value:m})=>e(m)))??false;return {...r&&{label:r},name:t,selected:x,...l&&{icon:l},...d?.length&&{menuItems:s(d)}}});o.options&&W(s(o.options));},[o?.data,B,c$1]);let h=()=>{p.current=[];},P=e=>{h(),n(e);},I=()=>{if(c$1){let e=new Set(o?.data?.[o.apiKey]??[]);p.current.forEach(({apiKey:s,options:i,isSelected:r})=>{i?i.forEach(({apiKey:t,isSelected:a})=>{a?e.add(t):e.delete(t);}):r?e.add(s):e.delete(s);}),o?.onConfirm?.({[o.apiKey]:[...e]});}else {let e=p.current.reduce((s,{options:i,apiKey:r,isSelected:t})=>{if(i){let a=i.filter(({isSelected:l})=>l);a.length&&s.push(...a.map(({apiKey:l})=>l));}else t&&s.push(r);return s},[]);p.current.length&&o?.onConfirm?.({[o.apiKey]:[...new Set(e)]});}h();},V=s(I,n),A=e=>{I(),n(e);},N=e=>{let s=r=>r.map(({name:t,selected:a,menuItems:l,label:d})=>({...d&&{placeholder:d},apiKey:t,isSelected:a,...l?.length&&{options:s(l)}})),i=s(e);if(c$1){let r=new Set(i.map(t=>t.apiKey));p.current=[...p.current.filter(t=>!r.has(t.apiKey)),...i];}else p.current=i;},w=g?.maxWidth??v,k={maxWidth:w,width:`min(${w}, max-content)`};return jsx(c,{"data-testid":"ColumnFilter_List",title:f("filterBy")||"Filter by",menuItems:T,style:g,menuSx:k,sx:[e=>({...k,marginTop:"10px",textAlign:"left",boxShadow:e.shadows[3],overflow:"hidden",".nested-menu-item":{height:41,zIndex:9999}}),...(Array.isArray(o.sx)?o.sx:[o.sx]).filter(Boolean)],updatedList:N,header:R,onKeyDown:V,footer:jsxs(E,{sx:{position:"sticky",bottom:0,zIndex:99999},children:[jsx(O,{onClick:P,children:f("cancel")},"nested-dropdown-cancel"),jsx(b,{onClick:A,children:f("okay")},"nested-dropdown-ok")]})})}var M=memo($);var ce=M;export{v as a,Q as b,E as c,b as d,O as e,ce as f};
1
+ import {c}from'./chunk-TQTXIPZM.js';import {s}from'./chunk-EDZWCPS2.js';import {memo,useState,useRef,useEffect}from'react';import {useTranslation}from'react-i18next';import F from'@mui/material/Box';import K from'@mui/material/Button';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var Q=styled(F)(({theme:n})=>({background:n.palette.grey[700],width:27,height:14,display:"inline-flex",alignItems:"center",marginInlineStart:"4px",borderRadius:"10px",padding:"2px 6px",img:{cursor:"pointer"}})),E=styled(F)(()=>({padding:"8px 16px",display:"flex",gap:"8px",justifyContent:"center"})),b=styled(K)(({theme:n})=>({textTransform:"capitalize",minWidth:"auto",width:"100%",borderRadius:"4px",border:`1px solid ${n.palette.info.dark}`,backgroundColor:n.palette.info.dark,fontWeight:700,fontSize:"11px",color:n.palette.common.white,"&:hover":{backgroundColor:n.palette.info.dark}})),O=styled(K)(({theme:n})=>({textTransform:"capitalize",minWidth:"auto",width:"100%",borderRadius:"4px",border:`1px solid ${n.palette.divider}`,backgroundColor:n.palette.common.white,fontWeight:500,fontSize:"11px",color:n.palette.text.primary,"&:hover":{background:"transparent"}}));var v="188px";function $({onCloseDropdown:n,filter:o,styles:g,header:R,searchable:c$1}){let[T,W]=useState([]),{t:f}=useTranslation(),p=useRef([]),B=o?.options?.map(e=>e.value).join(",")??"";useEffect(()=>{let e=i=>{let r=o?.data?.[o.apiKey]??[];if(Array.isArray(r)&&r.length)return new Set(r).has(i)},s=i=>i.map(({placeholder:r,value:t,isSelected:a,icon:l,options:d})=>{let x;if(c$1){let m=p.current.find(y=>y.apiKey===t);x=m!==void 0?m.isSelected??false:(a||e(t)||d?.every(({value:y})=>e(y)))??false;}else x=(a||e(t)||d?.every(({value:m})=>e(m)))??false;return {...r&&{label:r},name:t,selected:x,...l&&{icon:l},...d?.length&&{menuItems:s(d)}}});o.options&&W(s(o.options));},[o?.data,B,c$1]);let h=()=>{p.current=[];},P=e=>{h(),n(e);},I=()=>{if(c$1){let e=new Set(o?.data?.[o.apiKey]??[]);p.current.forEach(({apiKey:s,options:i,isSelected:r})=>{i?i.forEach(({apiKey:t,isSelected:a})=>{a?e.add(t):e.delete(t);}):r?e.add(s):e.delete(s);}),o?.onConfirm?.({[o.apiKey]:[...e]});}else {let e=p.current.reduce((s,{options:i,apiKey:r,isSelected:t})=>{if(i){let a=i.filter(({isSelected:l})=>l);a.length&&s.push(...a.map(({apiKey:l})=>l));}else t&&s.push(r);return s},[]);p.current.length&&o?.onConfirm?.({[o.apiKey]:[...new Set(e)]});}h();},V=s(I,n),A=e=>{I(),n(e);},N=e=>{let s=r=>r.map(({name:t,selected:a,menuItems:l,label:d})=>({...d&&{placeholder:d},apiKey:t,isSelected:a,...l?.length&&{options:s(l)}})),i=s(e);if(c$1){let r=new Set(i.map(t=>t.apiKey));p.current=[...p.current.filter(t=>!r.has(t.apiKey)),...i];}else p.current=i;},w=g?.maxWidth??v,k={maxWidth:w,width:`min(${w}, max-content)`};return jsx(c,{"data-testid":"ColumnFilter_List",title:f("filterBy")||"Filter by",menuItems:T,style:g,menuSx:k,sx:[e=>({...k,marginTop:"10px",textAlign:"left",boxShadow:e.shadows[3],overflow:"hidden",".nested-menu-item":{height:41,zIndex:9999}}),...(Array.isArray(o.sx)?o.sx:[o.sx]).filter(Boolean)],updatedList:N,header:R,onKeyDown:V,footer:jsxs(E,{sx:{position:"sticky",bottom:0,zIndex:99999},children:[jsx(O,{onClick:P,children:f("cancel")},"nested-dropdown-cancel"),jsx(b,{onClick:A,children:f("okay")},"nested-dropdown-ok")]})})}var M=memo($);var ce=M;export{v as a,Q as b,E as c,b as d,O as e,ce as f};
@@ -1 +1 @@
1
- import {b}from'./chunk-MW2U3CYT.js';import {memo,useCallback,Fragment as Fragment$1,createElement}from'react';import {useTranslation}from'react-i18next';import {jsx,Fragment}from'react/jsx-runtime';function B({isActiveFilterVisible:f,availableStatuses:v,status:e,onStatusChange:i,buttonSx:l}){let{t:I}=useTranslation(),S=f??false,b$1=useCallback(s=>s===e&&!S?"active":"inActive",[e,S]),u=useCallback(s=>{i?.(s);},[i]);return jsx(Fragment,{children:v?.map(({render:s,...a},d)=>{if(s)return jsx(Fragment$1,{children:s({status:e,onChange:u},{...a,index:d})},`custom-status-slot-${d}`);if(!Array.isArray(a.status))return createElement(b,{...a,key:`status-button-array-${a.status}`,variant:b$1(a.status),onClick:()=>{Array.isArray(a.status)||u(a.status);},buttonSx:l});if(!a.status)return null;let o=a.status.filter(Boolean).map(t=>typeof t=="string"?{value:t}:t)||[],c=!!e&&o.some(t=>t?.value===e);return jsx("div",{children:jsx(b,{...a,selectedStatus:c?e:void 0,variant:c?"active":"inActive",onButtonBodyClick:t=>u(t),dropdownOptions:o.map(t=>({label:t?.label||I(t?.value||""),status:t?.value,icon:t.icon,onClick:()=>u(t.value)})),buttonSx:l})},o[0]?.value)})})}var p=memo(B);var M=p;export{M as a};
1
+ import {b}from'./chunk-M7OWIVWK.js';import {memo,useCallback,Fragment as Fragment$1,createElement}from'react';import {useTranslation}from'react-i18next';import {jsx,Fragment}from'react/jsx-runtime';function B({isActiveFilterVisible:f,availableStatuses:v,status:e,onStatusChange:i,buttonSx:l}){let{t:I}=useTranslation(),S=f??false,b$1=useCallback(s=>s===e&&!S?"active":"inActive",[e,S]),u=useCallback(s=>{i?.(s);},[i]);return jsx(Fragment,{children:v?.map(({render:s,...a},d)=>{if(s)return jsx(Fragment$1,{children:s({status:e,onChange:u},{...a,index:d})},`custom-status-slot-${d}`);if(!Array.isArray(a.status))return createElement(b,{...a,key:`status-button-array-${a.status}`,variant:b$1(a.status),onClick:()=>{Array.isArray(a.status)||u(a.status);},buttonSx:l});if(!a.status)return null;let o=a.status.filter(Boolean).map(t=>typeof t=="string"?{value:t}:t)||[],c=!!e&&o.some(t=>t?.value===e);return jsx("div",{children:jsx(b,{...a,selectedStatus:c?e:void 0,variant:c?"active":"inActive",onButtonBodyClick:t=>u(t),dropdownOptions:o.map(t=>({label:t?.label||I(t?.value||""),status:t?.value,icon:t.icon,onClick:()=>u(t.value)})),buttonSx:l})},o[0]?.value)})})}var p=memo(B);var M=p;export{M as a};
@@ -1 +1 @@
1
- import {b}from'./chunk-MW2U3CYT.js';import {yc}from'./chunk-2SKLD6QR.js';import {wi}from'./chunk-OK75VWGZ.js';import {memo,useId,useState,useRef,useEffect}from'react';import {useTheme}from'@mui/material';import {motion,AnimatePresence}from'framer-motion';import {useTranslation}from'react-i18next';import K from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var h=styled(motion.input)(({theme:t})=>({padding:"8px",paddingRight:"24px",borderRadius:"4px",height:32,color:t.palette.text.primary,fontSize:"11px",outline:0,zIndex:10,background:t.palette.common.white,display:"flex",minWidth:0,flexGrow:1,boxShadow:`0px 0px 4px 0px ${t.palette.info.dark}80`,border:`1px solid ${t.palette.info.dark}`,"::placeholder":{color:"#D5D5D5"}})),x=styled(motion.img)(()=>({position:"absolute",zIndex:11,cursor:"pointer"})),I=styled(b)(()=>({minWidth:"auto",borderRadius:"4px",paddingInline:"8px",position:"relative",zIndex:11})),g=styled(K)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"relative",zIndex:3,height:32,gap:8}));function j({onSearchChange:t,placeholder:v,...b}){let w=yc(useId(),"search-button"),[e,p]=useState(false),[C,i]=useState(false),[r,l]=useState(""),c=useRef(null);useEffect(()=>{e&&c.current?.focus();},[e]);let{t:B}=useTranslation(),E=useTheme(),T=()=>{i(true),p(false),t?.(""),l("");},k=()=>{i(false),p(true),P();},P=()=>{r&&t?.(r);},R=a=>{a.key==="Enter"&&t?.(r);},z=a=>{l(a.currentTarget.value);},D={duration:.18,ease:"easeInOut"},W={duration:.05,ease:"easeIn"},A=e||C;return jsxs(g,{id:w,"data-testid":"SearchButton",children:[jsx(AnimatePresence,{initial:false,onExitComplete:()=>i(false),children:e&&jsxs(Fragment,{children:[jsx(h,{ref:c,initial:{width:30},animate:{width:200},exit:{width:30,border:`1px solid ${E.palette.divider}`,boxShadow:"none"},transition:D,style:{willChange:"width"},placeholder:v??(B("search")||""),onKeyDown:R,onChange:z}),jsx(x,{style:{right:48},initial:{opacity:1},exit:{opacity:0},transition:W,src:wi,alt:"close",onClick:T})]})}),jsx(I,{...b,variant:A?"active":"inActive",icon:"search",onClick:k})]})}var y=memo(j);var pt=y;export{pt as a};
1
+ import {b}from'./chunk-M7OWIVWK.js';import {yc}from'./chunk-2SKLD6QR.js';import {wi}from'./chunk-OK75VWGZ.js';import {memo,useId,useState,useRef,useEffect}from'react';import {useTheme}from'@mui/material';import {motion,AnimatePresence}from'framer-motion';import {useTranslation}from'react-i18next';import K from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var h=styled(motion.input)(({theme:t})=>({padding:"8px",paddingRight:"24px",borderRadius:"4px",height:32,color:t.palette.text.primary,fontSize:"11px",outline:0,zIndex:10,background:t.palette.common.white,display:"flex",minWidth:0,flexGrow:1,boxShadow:`0px 0px 4px 0px ${t.palette.info.dark}80`,border:`1px solid ${t.palette.info.dark}`,"::placeholder":{color:"#D5D5D5"}})),x=styled(motion.img)(()=>({position:"absolute",zIndex:11,cursor:"pointer"})),I=styled(b)(()=>({minWidth:"auto",borderRadius:"4px",paddingInline:"8px",position:"relative",zIndex:11})),g=styled(K)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"relative",zIndex:3,height:32,gap:8}));function j({onSearchChange:t,placeholder:v,...b}){let w=yc(useId(),"search-button"),[e,p]=useState(false),[C,i]=useState(false),[r,l]=useState(""),c=useRef(null);useEffect(()=>{e&&c.current?.focus();},[e]);let{t:B}=useTranslation(),E=useTheme(),T=()=>{i(true),p(false),t?.(""),l("");},k=()=>{i(false),p(true),P();},P=()=>{r&&t?.(r);},R=a=>{a.key==="Enter"&&t?.(r);},z=a=>{l(a.currentTarget.value);},D={duration:.18,ease:"easeInOut"},W={duration:.05,ease:"easeIn"},A=e||C;return jsxs(g,{id:w,"data-testid":"SearchButton",children:[jsx(AnimatePresence,{initial:false,onExitComplete:()=>i(false),children:e&&jsxs(Fragment,{children:[jsx(h,{ref:c,initial:{width:30},animate:{width:200},exit:{width:30,border:`1px solid ${E.palette.divider}`,boxShadow:"none"},transition:D,style:{willChange:"width"},placeholder:v??(B("search")||""),onKeyDown:R,onChange:z}),jsx(x,{style:{right:48},initial:{opacity:1},exit:{opacity:0},transition:W,src:wi,alt:"close",onClick:T})]})}),jsx(I,{...b,variant:A?"active":"inActive",icon:"search",onClick:k})]})}var y=memo(j);var pt=y;export{pt as a};
@@ -1 +1 @@
1
- import {j as j$1}from'./chunk-7PJX5ZKM.js';import {yc}from'./chunk-2SKLD6QR.js';import {Xc,Cb}from'./chunk-OK75VWGZ.js';import {memo,useId}from'react';import n from'@mui/material/Box';import W from'@mui/material/Popover';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var x=styled(n,{shouldForwardProp:o=>o!=="open"&&o!=="disabled"})(({theme:o,open:e,disabled:r})=>({display:"flex",alignItems:"center",justifyContent:"space-between",paddingInlineStart:"8px",paddingInlineEnd:"4px",paddingTop:"6px",paddingBottom:"6px",borderRadius:"4px",background:"#F9F9F9",border:"1px solid #F9F9F9",cursor:"pointer",...e&&{borderColor:o.palette.info.dark,background:o.palette.common.white},...r&&{cursor:"not-allowed"}})),s=styled(n)(()=>({display:"flex",flexDirection:"column",gap:"4px",fontSize:"10px",fontWeight:500,flex:1})),c=styled(n)(({theme:o})=>({padding:"4px",borderRadius:"4px",boxShadow:"-26px 156px 44px 0px rgba(0, 0, 0, 0.00), -17px 100px 41px 0px rgba(0, 0, 0, 0.01), -9px 56px 34px 0px rgba(0, 0, 0, 0.05), -4px 25px 25px 0px rgba(0, 0, 0, 0.09), -1px 6px 14px 0px rgba(0, 0, 0, 0.10), 0px 0px 0px 0px rgba(0, 0, 0, 0.10)",backgroundColor:o.palette.common.white,maxHeight:200,marginTop:"4px",width:"auto",overflow:"auto"}));styled(j$1,{shouldForwardProp:o=>o!=="selected"})(({selected:o})=>({paddingInlineStart:"12px",paddingInlineEnd:"8px",paddingTop:"8px",paddingBottom:"8px",fontSize:"10px",color:"#000",fontWeight:500,lineHeight:"10px",cursor:"pointer",...o&&{backgroundColor:"#F8F8F8"}}));function H({onClose:o,open:e,anchorEl:r,trigger:b,onOpen:f,children:h,disabled:u}){let w=yc(useId(),"account-dropdown");return jsxs(x,{id:w,open:e,onClick:f,"data-testid":"Dropdown",disabled:u,children:[jsx(s,{children:b}),jsx(n,{sx:{width:16,height:16,display:"flex",alignItems:"center"},children:jsx(n,{component:"img",src:e?Xc:Cb,alt:"arrow",sx:{width:16,height:16,...e&&{width:12,height:12,padding:"2px"}}})}),jsx(W,{open:e,anchorEl:r,sx:{width:r?.clientWidth},onClose:o,anchorOrigin:{vertical:"bottom",horizontal:"left"},slotProps:{paper:{style:{width:r?.clientWidth,maxWidth:"unset"}}},children:jsx(c,{children:h})})]})}var g=memo(H);var j=g;export{j as a};
1
+ import {j as j$1}from'./chunk-IBBWXV4R.js';import {yc}from'./chunk-2SKLD6QR.js';import {Xc,Cb}from'./chunk-OK75VWGZ.js';import {memo,useId}from'react';import n from'@mui/material/Box';import W from'@mui/material/Popover';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var x=styled(n,{shouldForwardProp:o=>o!=="open"&&o!=="disabled"})(({theme:o,open:e,disabled:r})=>({display:"flex",alignItems:"center",justifyContent:"space-between",paddingInlineStart:"8px",paddingInlineEnd:"4px",paddingTop:"6px",paddingBottom:"6px",borderRadius:"4px",background:"#F9F9F9",border:"1px solid #F9F9F9",cursor:"pointer",...e&&{borderColor:o.palette.info.dark,background:o.palette.common.white},...r&&{cursor:"not-allowed"}})),s=styled(n)(()=>({display:"flex",flexDirection:"column",gap:"4px",fontSize:"10px",fontWeight:500,flex:1})),c=styled(n)(({theme:o})=>({padding:"4px",borderRadius:"4px",boxShadow:"-26px 156px 44px 0px rgba(0, 0, 0, 0.00), -17px 100px 41px 0px rgba(0, 0, 0, 0.01), -9px 56px 34px 0px rgba(0, 0, 0, 0.05), -4px 25px 25px 0px rgba(0, 0, 0, 0.09), -1px 6px 14px 0px rgba(0, 0, 0, 0.10), 0px 0px 0px 0px rgba(0, 0, 0, 0.10)",backgroundColor:o.palette.common.white,maxHeight:200,marginTop:"4px",width:"auto",overflow:"auto"}));styled(j$1,{shouldForwardProp:o=>o!=="selected"})(({selected:o})=>({paddingInlineStart:"12px",paddingInlineEnd:"8px",paddingTop:"8px",paddingBottom:"8px",fontSize:"10px",color:"#000",fontWeight:500,lineHeight:"10px",cursor:"pointer",...o&&{backgroundColor:"#F8F8F8"}}));function H({onClose:o,open:e,anchorEl:r,trigger:b,onOpen:f,children:h,disabled:u}){let w=yc(useId(),"account-dropdown");return jsxs(x,{id:w,open:e,onClick:f,"data-testid":"Dropdown",disabled:u,children:[jsx(s,{children:b}),jsx(n,{sx:{width:16,height:16,display:"flex",alignItems:"center"},children:jsx(n,{component:"img",src:e?Xc:Cb,alt:"arrow",sx:{width:16,height:16,...e&&{width:12,height:12,padding:"2px"}}})}),jsx(W,{open:e,anchorEl:r,sx:{width:r?.clientWidth},onClose:o,anchorOrigin:{vertical:"bottom",horizontal:"left"},slotProps:{paper:{style:{width:r?.clientWidth,maxWidth:"unset"}}},children:jsx(c,{children:h})})]})}var g=memo(H);var j=g;export{j as a};
@@ -1 +1 @@
1
- import {j}from'./chunk-7PJX5ZKM.js';import {g as g$1}from'./chunk-2SKLD6QR.js';import F from'react';import {useTranslation}from'react-i18next';import a from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var T="37px",f=styled(a,{shouldForwardProp:o=>o!=="showBackDrop"&&o!=="areTotalRowsNotFillingHeight"&&o!=="sandboxMode"&&o!=="maximized"})(({theme:o,showBackDrop:i,areTotalRowsNotFillingHeight:r,sandboxMode:p,maximized:n})=>({minHeight:T,...!n&&{borderBottomLeftRadius:o.spacing(1.5),borderBottomRightRadius:o.spacing(1.5)},display:"flex",alignItems:"center",border:"none",justifyContent:"space-between",padding:"6px 32px",background:p?o.palette.common.lightOrange:o.palette.grey[300],backdropFilter:"blur(32px)",boxShadow:i?o.shadows[24]:"none",borderTop:r?`1px outset ${o.palette.grey[800]}`:"none",width:"100%",marginTop:"auto",flexShrink:0,cursor:"move"})),u=styled("div")(({theme:o})=>({position:"absolute",top:0,left:0,right:0,height:"1.5px",backgroundColor:o.palette.grey[300],boxShadow:`inset 0 1px 0 0 ${o.palette.grey[300]}`})),d=styled(a)(({theme:o})=>({borderRadius:"37.5px",border:"0.75px solid rgba(242, 242, 242, 0.70)",backgroundColor:o.palette.common.white,opacity:1,paddingInline:o.spacing(1),display:"flex",alignItems:"center",height:24,gap:"7px",maxWidth:"max-content"})),x=styled(j)(()=>({fontSize:"9px",fontWeight:400,lineHeight:"10.8px"})),g=styled(j)(()=>({fontSize:"10.5px",fontWeight:700,lineHeight:"12.6px"}));styled(a)(()=>({display:"flex",gap:"3px",alignItems:"center"}));styled(a)(()=>({display:"flex",gap:"6px"}));styled("span")(()=>({fontWeight:400}));function R({totalCount:o,showBackDrop:i=false,showSeparator:r,sandboxMode:p,maximized:n,selectedCount:m,...y}){let{t:b}=useTranslation();return jsxs(f,{component:"footer","data-testid":"TableFooter",maximized:n??false,sandboxMode:p,showBackDrop:i,areTotalRowsNotFillingHeight:!!r,...y,children:[r&&jsx(u,{}),m?jsxs(d,{sx:{gap:"6px",cursor:"text"},children:[jsx(x,{children:b("selected")}),jsx(g,{children:g$1(m)})]}):null,o||o===0?jsxs(d,{sx:{gap:"6px",cursor:"text"},children:[jsx(x,{children:b("count")}),jsx(g,{children:g$1(o||0)})]}):null]})}var h=F.memo(R);var M=h;export{T as a,h as b,M as c};
1
+ import {j}from'./chunk-IBBWXV4R.js';import {g as g$1}from'./chunk-2SKLD6QR.js';import F from'react';import {useTranslation}from'react-i18next';import a from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var T="37px",f=styled(a,{shouldForwardProp:o=>o!=="showBackDrop"&&o!=="areTotalRowsNotFillingHeight"&&o!=="sandboxMode"&&o!=="maximized"})(({theme:o,showBackDrop:i,areTotalRowsNotFillingHeight:r,sandboxMode:p,maximized:n})=>({minHeight:T,...!n&&{borderBottomLeftRadius:o.spacing(1.5),borderBottomRightRadius:o.spacing(1.5)},display:"flex",alignItems:"center",border:"none",justifyContent:"space-between",padding:"6px 32px",background:p?o.palette.common.lightOrange:o.palette.grey[300],backdropFilter:"blur(32px)",boxShadow:i?o.shadows[24]:"none",borderTop:r?`1px outset ${o.palette.grey[800]}`:"none",width:"100%",marginTop:"auto",flexShrink:0,cursor:"move"})),u=styled("div")(({theme:o})=>({position:"absolute",top:0,left:0,right:0,height:"1.5px",backgroundColor:o.palette.grey[300],boxShadow:`inset 0 1px 0 0 ${o.palette.grey[300]}`})),d=styled(a)(({theme:o})=>({borderRadius:"37.5px",border:"0.75px solid rgba(242, 242, 242, 0.70)",backgroundColor:o.palette.common.white,opacity:1,paddingInline:o.spacing(1),display:"flex",alignItems:"center",height:24,gap:"7px",maxWidth:"max-content"})),x=styled(j)(()=>({fontSize:"9px",fontWeight:400,lineHeight:"10.8px"})),g=styled(j)(()=>({fontSize:"10.5px",fontWeight:700,lineHeight:"12.6px"}));styled(a)(()=>({display:"flex",gap:"3px",alignItems:"center"}));styled(a)(()=>({display:"flex",gap:"6px"}));styled("span")(()=>({fontWeight:400}));function R({totalCount:o,showBackDrop:i=false,showSeparator:r,sandboxMode:p,maximized:n,selectedCount:m,...y}){let{t:b}=useTranslation();return jsxs(f,{component:"footer","data-testid":"TableFooter",maximized:n??false,sandboxMode:p,showBackDrop:i,areTotalRowsNotFillingHeight:!!r,...y,children:[r&&jsx(u,{}),m?jsxs(d,{sx:{gap:"6px",cursor:"text"},children:[jsx(x,{children:b("selected")}),jsx(g,{children:g$1(m)})]}):null,o||o===0?jsxs(d,{sx:{gap:"6px",cursor:"text"},children:[jsx(x,{children:b("count")}),jsx(g,{children:g$1(o||0)})]}):null]})}var h=F.memo(R);var M=h;export{T as a,h as b,M as c};
@@ -1 +1 @@
1
- import {d as d$1}from'./chunk-JSC3KW4C.js';import {a}from'./chunk-MGMUAGFX.js';import {yc}from'./chunk-2SKLD6QR.js';import {Eb,A as A$1}from'./chunk-OK75VWGZ.js';import {useId,useMemo,useState}from'react';import d from'@mui/material/Box';import R from'@mui/material/Skeleton';import {styled}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var b=styled(d)(({theme:e})=>({display:"flex",flexDirection:"column",borderRadius:"8px",border:`1px solid ${e.palette.divider}`,backgroundColor:e.palette.common.white,maxHeight:"232px",overflow:"auto"})),k=styled(d)(()=>({display:"flex",flexDirection:"column",gap:"8px"})),v=styled(d,{shouldForwardProp:e=>e!=="$active"})(({$active:e})=>({display:"flex",alignItems:"center",justifyContent:"center",width:"13px",height:"13px",borderRadius:"50%",...e&&{backgroundColor:"#F2F2F2"}})),y=styled("img",{shouldForwardProp:e=>e!=="$isClear"})(({$isClear:e})=>({...e&&{backgroundColor:"#F2F2F2",borderRadius:"4px",width:"8px",height:"8px"}})),W=styled(d$1,{shouldForwardProp:e=>e!=="$hasSearchValue"})(({$hasSearchValue:e})=>({cursor:e?"pointer":"default",width:"100%",fontSize:"11px",border:"1px solid #F2F2F2",backgroundColor:"#fff","&.Mui-disabled":{backgroundColor:"#F8F8F8"}})),w=styled(a)(({theme:e})=>({backgroundColor:"#F8F8F8",fontSize:"11px",fontWeight:600,padding:"4px 8px",color:e.palette.info.dark,gap:"4px"})),A=styled(a)(()=>({fontSize:"11px",padding:"4px 8px",gap:"4px",fontWeight:400})),L=styled(R)(()=>({width:"100%",height:24}));function M({onSalesChannelChange:e,onSearchChange:h,filteredOptions:a,isLoading:P,initialSalesChannels:m,initialSalesChannelsSearch:V}){let B=yc(useId(),"sales-channel-filter"),o=useMemo(()=>m||[],[m]),[l,u]=useState(V||""),S=t=>o.some(i=>i.id===t),s=useMemo(()=>o?.length===a.length&&a?.length>0,[o,a]),g=useMemo(()=>o?.some(t=>t.id==="blank")&&o?.length===1,[o]),x=useMemo(()=>o?.length===0||g,[g,o?.length]);return jsxs(k,{id:B,"data-testid":"SalesChannelFilter",children:[jsx(W,{$hasSearchValue:!!l,placeholder:"Search",endAdornment:!x&&jsx(v,{$active:!!l,children:jsx(y,{src:l?Eb:A$1,alt:"search",$isClear:!!l,onClick:()=>{u(""),h("");}})}),disabled:x,onChange:t=>{u(t.target.value),h(t.target.value);},value:l,disableUnderline:true}),jsx(b,{children:P?Array.from({length:9}).map((t,i)=>jsx(L,{variant:"rectangular"},i)):jsxs(Fragment,{children:[jsx(w,{isSelected:s,isIndeterminate:!s&&(o?.length||0)>0,onClick:t=>{t.stopPropagation(),e(s?[]:a);},children:s?"Deselect All":"Select All"}),a.map(t=>jsx(A,{isSelected:S(t.id),onClick:i=>{i.stopPropagation();let O=S(t.id)?o?.filter(D=>D.id!==t.id):[...o??[],t];e(O);},children:t?.name?.en},t.id))]})})]})}export{M as a};
1
+ import {d as d$1}from'./chunk-CYZ6QQMN.js';import {a}from'./chunk-T4JTP3ZY.js';import {yc}from'./chunk-2SKLD6QR.js';import {Eb,A as A$1}from'./chunk-OK75VWGZ.js';import {useId,useMemo,useState}from'react';import d from'@mui/material/Box';import R from'@mui/material/Skeleton';import {styled}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var b=styled(d)(({theme:e})=>({display:"flex",flexDirection:"column",borderRadius:"8px",border:`1px solid ${e.palette.divider}`,backgroundColor:e.palette.common.white,maxHeight:"232px",overflow:"auto"})),k=styled(d)(()=>({display:"flex",flexDirection:"column",gap:"8px"})),v=styled(d,{shouldForwardProp:e=>e!=="$active"})(({$active:e})=>({display:"flex",alignItems:"center",justifyContent:"center",width:"13px",height:"13px",borderRadius:"50%",...e&&{backgroundColor:"#F2F2F2"}})),y=styled("img",{shouldForwardProp:e=>e!=="$isClear"})(({$isClear:e})=>({...e&&{backgroundColor:"#F2F2F2",borderRadius:"4px",width:"8px",height:"8px"}})),W=styled(d$1,{shouldForwardProp:e=>e!=="$hasSearchValue"})(({$hasSearchValue:e})=>({cursor:e?"pointer":"default",width:"100%",fontSize:"11px",border:"1px solid #F2F2F2",backgroundColor:"#fff","&.Mui-disabled":{backgroundColor:"#F8F8F8"}})),w=styled(a)(({theme:e})=>({backgroundColor:"#F8F8F8",fontSize:"11px",fontWeight:600,padding:"4px 8px",color:e.palette.info.dark,gap:"4px"})),A=styled(a)(()=>({fontSize:"11px",padding:"4px 8px",gap:"4px",fontWeight:400})),L=styled(R)(()=>({width:"100%",height:24}));function M({onSalesChannelChange:e,onSearchChange:h,filteredOptions:a,isLoading:P,initialSalesChannels:m,initialSalesChannelsSearch:V}){let B=yc(useId(),"sales-channel-filter"),o=useMemo(()=>m||[],[m]),[l,u]=useState(V||""),S=t=>o.some(i=>i.id===t),s=useMemo(()=>o?.length===a.length&&a?.length>0,[o,a]),g=useMemo(()=>o?.some(t=>t.id==="blank")&&o?.length===1,[o]),x=useMemo(()=>o?.length===0||g,[g,o?.length]);return jsxs(k,{id:B,"data-testid":"SalesChannelFilter",children:[jsx(W,{$hasSearchValue:!!l,placeholder:"Search",endAdornment:!x&&jsx(v,{$active:!!l,children:jsx(y,{src:l?Eb:A$1,alt:"search",$isClear:!!l,onClick:()=>{u(""),h("");}})}),disabled:x,onChange:t=>{u(t.target.value),h(t.target.value);},value:l,disableUnderline:true}),jsx(b,{children:P?Array.from({length:9}).map((t,i)=>jsx(L,{variant:"rectangular"},i)):jsxs(Fragment,{children:[jsx(w,{isSelected:s,isIndeterminate:!s&&(o?.length||0)>0,onClick:t=>{t.stopPropagation(),e(s?[]:a);},children:s?"Deselect All":"Select All"}),a.map(t=>jsx(A,{isSelected:S(t.id),onClick:i=>{i.stopPropagation();let O=S(t.id)?o?.filter(D=>D.id!==t.id):[...o??[],t];e(O);},children:t?.name?.en},t.id))]})})]})}export{M as a};
@@ -1 +1 @@
1
- import {f,v}from'./chunk-7PJX5ZKM.js';import {yc}from'./chunk-2SKLD6QR.js';import {useId}from'react';import {styled,MenuItem,Menu,ListItemIcon,ListItemText,Select,useTheme,Box}from'@mui/material';import {jsxs,jsx}from'react/jsx-runtime';var g=styled(MenuItem,{shouldForwardProp:t=>t!=="alwaysShowRightAction"})(({theme:t,alwaysShowRightAction:n})=>({backgroundColor:n?t.palette.common.lightOrange:"","&:hover":{backgroundColor:n?t.palette.common.lightOrange:"",boxShadow:t.shadows[10],":hover":{"& .sandbox-Icon":{left:"-16px !important",transition:"all 0.3s ease-in-out"},"& .close-Icon":{display:"block !important"}}}})),h=styled(Menu,{shouldForwardProp:t=>t!=="minWidth"})(({theme:t,minWidth:n})=>({".MuiMenu-paper":{borderRadius:4,minWidth:n},".MuiMenuItem-root":{display:"flex",gap:"4px",minHeight:"36px",alignItems:"center",paddingInline:8,transition:t.transitions.create(["visibility"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.complex}),".menu-right-action":{visibility:"hidden"},"&:hover":{".menu-right-action":{visibility:"visible"}}},"&.tap-dropdown":{zIndex:2e3,".MuiList-root":{padding:0}}})),x=styled(ListItemIcon)(()=>({minWidth:"16px !important"})),S=styled(ListItemText)(()=>({".MuiTypography-root":{fontSize:"0.6875rem"}})),D=styled(Select)(({theme:t})=>({padding:"0.25rem 0.34rem 0.25rem 0.5rem",display:"flex",justifyContent:"center",alignItems:"center",gap:"0.19rem",width:"auto",flexShrink:0,borderRadius:"0.5rem",boxShadow:t.shadows[5],cursor:"pointer",outline:t.palette.background.default,border:"none",backgroundColor:t.palette.background.default,"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},"& .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},"& .MuiMenuList-root":{padding:"0px !important",margin:0},"& .MuiSelect-outlined":{padding:"0px !important"}})),z=styled(MenuItem)(({theme:t})=>({display:"flex",height:"2.5rem",width:"10.43rem",alignItems:"center",gap:"0.5",alignSelf:"stretch",transition:"boxShadow 0.2s ease-in-out",backgroundColor:"inherit !important",margin:0,padding:0,paddingTop:"0px !important",paddingBottom:"0px !important","&:hover":{boxSizing:"border-box",boxShadow:`${t.shadows[3]}`}})),A=styled("p")(({theme:t})=>({color:t.palette.text.primary,fontSize:"0.68rem",fontWeight:600,textAlign:"center",padding:"0 !important",margin:"0 !important",textTransform:"capitalize",".MuiOutlinedInput-input":{paddingRight:0},"MuiInputBase-input":{paddingRight:0},".MuiSelect-select":{paddingRight:0}})),W=styled("p")(({theme:t})=>({fontSize:"0.75rem",fontWeight:500,color:t.palette.text.primary,paddingLeft:"1rem !important",transition:"boxShadow 0.2s ease-in-out"})),B=styled("img")(()=>({width:"0.75rem",height:"auto",padding:0,paddingBottom:.5,margin:0,verticalAlign:"middle",boxSizing:"border-box"})),y=styled(f)(()=>({padding:0,paddingRight:"4px",width:"14px !important",".MuiSvgIcon-root":{width:"12px !important",height:"12px !important"}}));function N({open:t,menuItems:n,anchorEl:a,onClose:d,footer:f,selected:w,multiple:M,allowShadows:p=true,...C}){let k=yc(useId(),"dropdown-menu"),l=useTheme();return jsxs(h,{id:k,"data-testid":"DropdownMenu",open:t,anchorEl:a,onClose:d,onContextMenu:o=>{o.preventDefault(),d();},...C,className:"tap-dropdown",minWidth:a?.clientWidth||"auto",children:[n.map((o,r)=>o.name==="divider"?jsx(v,{sx:{margin:"0 !important"}},`${o.label}-${r}`):jsx("div",{children:o.label&&jsxs(g,{alwaysShowRightAction:o.alwaysShowRightAction,onClick:v=>{o.onClick&&o.onClick(v);},onContextMenu:o.onRightClick,selected:o.selected,sx:{"&:hover":{backgroundColor:"transparent",boxShadow:p?l.shadows[10]:"none","& .sandbox-Icon":{display:"none"},"& .close-Icon":{display:"block !important"}},...r===w&&{backgroundColor:"transparent",boxShadow:p?l.shadows[10]:"none"},...o.sx},children:[M&&jsx(y,{size:"small",checked:o.selected}),o.icon&&jsx(x,{children:o.icon}),jsx(S,{children:o.label}),jsx(Box,{className:o.alwaysShowRightAction?"":"menu-right-action",children:o.rightAction&&o.rightAction})]})},`${o.label}-${r}`)),f]})}var I=N;var Y=I;export{D as a,z as b,A as c,W as d,B as e,Y as f};
1
+ import {f,v}from'./chunk-IBBWXV4R.js';import {yc}from'./chunk-2SKLD6QR.js';import {useId}from'react';import {styled,MenuItem,Menu,ListItemIcon,ListItemText,Select,useTheme,Box}from'@mui/material';import {jsxs,jsx}from'react/jsx-runtime';var g=styled(MenuItem,{shouldForwardProp:t=>t!=="alwaysShowRightAction"})(({theme:t,alwaysShowRightAction:n})=>({backgroundColor:n?t.palette.common.lightOrange:"","&:hover":{backgroundColor:n?t.palette.common.lightOrange:"",boxShadow:t.shadows[10],":hover":{"& .sandbox-Icon":{left:"-16px !important",transition:"all 0.3s ease-in-out"},"& .close-Icon":{display:"block !important"}}}})),h=styled(Menu,{shouldForwardProp:t=>t!=="minWidth"})(({theme:t,minWidth:n})=>({".MuiMenu-paper":{borderRadius:4,minWidth:n},".MuiMenuItem-root":{display:"flex",gap:"4px",minHeight:"36px",alignItems:"center",paddingInline:8,transition:t.transitions.create(["visibility"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.complex}),".menu-right-action":{visibility:"hidden"},"&:hover":{".menu-right-action":{visibility:"visible"}}},"&.tap-dropdown":{zIndex:2e3,".MuiList-root":{padding:0}}})),x=styled(ListItemIcon)(()=>({minWidth:"16px !important"})),S=styled(ListItemText)(()=>({".MuiTypography-root":{fontSize:"0.6875rem"}})),D=styled(Select)(({theme:t})=>({padding:"0.25rem 0.34rem 0.25rem 0.5rem",display:"flex",justifyContent:"center",alignItems:"center",gap:"0.19rem",width:"auto",flexShrink:0,borderRadius:"0.5rem",boxShadow:t.shadows[5],cursor:"pointer",outline:t.palette.background.default,border:"none",backgroundColor:t.palette.background.default,"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},"& .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"transparent"},"& .MuiMenuList-root":{padding:"0px !important",margin:0},"& .MuiSelect-outlined":{padding:"0px !important"}})),z=styled(MenuItem)(({theme:t})=>({display:"flex",height:"2.5rem",width:"10.43rem",alignItems:"center",gap:"0.5",alignSelf:"stretch",transition:"boxShadow 0.2s ease-in-out",backgroundColor:"inherit !important",margin:0,padding:0,paddingTop:"0px !important",paddingBottom:"0px !important","&:hover":{boxSizing:"border-box",boxShadow:`${t.shadows[3]}`}})),A=styled("p")(({theme:t})=>({color:t.palette.text.primary,fontSize:"0.68rem",fontWeight:600,textAlign:"center",padding:"0 !important",margin:"0 !important",textTransform:"capitalize",".MuiOutlinedInput-input":{paddingRight:0},"MuiInputBase-input":{paddingRight:0},".MuiSelect-select":{paddingRight:0}})),W=styled("p")(({theme:t})=>({fontSize:"0.75rem",fontWeight:500,color:t.palette.text.primary,paddingLeft:"1rem !important",transition:"boxShadow 0.2s ease-in-out"})),B=styled("img")(()=>({width:"0.75rem",height:"auto",padding:0,paddingBottom:.5,margin:0,verticalAlign:"middle",boxSizing:"border-box"})),y=styled(f)(()=>({padding:0,paddingRight:"4px",width:"14px !important",".MuiSvgIcon-root":{width:"12px !important",height:"12px !important"}}));function N({open:t,menuItems:n,anchorEl:a,onClose:d,footer:f,selected:w,multiple:M,allowShadows:p=true,...C}){let k=yc(useId(),"dropdown-menu"),l=useTheme();return jsxs(h,{id:k,"data-testid":"DropdownMenu",open:t,anchorEl:a,onClose:d,onContextMenu:o=>{o.preventDefault(),d();},...C,className:"tap-dropdown",minWidth:a?.clientWidth||"auto",children:[n.map((o,r)=>o.name==="divider"?jsx(v,{sx:{margin:"0 !important"}},`${o.label}-${r}`):jsx("div",{children:o.label&&jsxs(g,{alwaysShowRightAction:o.alwaysShowRightAction,onClick:v=>{o.onClick&&o.onClick(v);},onContextMenu:o.onRightClick,selected:o.selected,sx:{"&:hover":{backgroundColor:"transparent",boxShadow:p?l.shadows[10]:"none","& .sandbox-Icon":{display:"none"},"& .close-Icon":{display:"block !important"}},...r===w&&{backgroundColor:"transparent",boxShadow:p?l.shadows[10]:"none"},...o.sx},children:[M&&jsx(y,{size:"small",checked:o.selected}),o.icon&&jsx(x,{children:o.icon}),jsx(S,{children:o.label}),jsx(Box,{className:o.alwaysShowRightAction?"":"menu-right-action",children:o.rightAction&&o.rightAction})]})},`${o.label}-${r}`)),f]})}var I=N;var Y=I;export{D as a,z as b,A as c,W as d,B as e,Y as f};
@@ -1 +1 @@
1
- import {a}from'./chunk-DEKIIMGN.js';import {a as a$1}from'./chunk-3T2OR3KW.js';import {j,f}from'./chunk-7PJX5ZKM.js';import {yc}from'./chunk-2SKLD6QR.js';import {Pc}from'./chunk-OK75VWGZ.js';import {useId,useState,useCallback,useMemo,createElement}from'react';import c from'@mui/material/Box';import ne from'@mui/material/Typography';import O from'@mui/material/Input';import {styled}from'@mui/material/styles';import {CircularProgress}from'@mui/material';import ee from'@mui/material/SvgIcon';import {jsx,jsxs}from'react/jsx-runtime';var me=styled(j)(({theme:e})=>({fontSize:"10px",color:e.v2.palette.grey[500],fontWeight:600,lineHeight:"10px"})),xe=styled(j)(({theme:e})=>({fontSize:"11px",color:e.v2.palette.base.black,fontWeight:600,lineHeight:"14.3px",width:200})),fe=styled(c)(()=>({display:"flex",flexDirection:"column",maxHeight:400,overflow:"auto",gap:"8px"})),D=styled(O)(({theme:e})=>({width:"inherit",height:32,padding:"11px 12px",fontSize:"10px",borderRadius:"5px",backgroundColor:"#F9F9F9",border:"1px solid transparent","&.Mui-focused":{borderColor:e.palette.info.dark}})),Se=styled(f)({padding:0,width:12,height:12,".MuiSvgIcon-root, img":{width:12,height:12}}),F=styled(c)(()=>({display:"flex",flexDirection:"column",gap:"8px",padding:"4px"})),ge=styled(c)(()=>({display:"flex",gap:"8px",padding:"4px",flexWrap:"wrap"})),Ce=styled(c)(({theme:e})=>({display:"flex",padding:"4px 8px 4px 6px",alignItems:"center",gap:"4px",borderRadius:"13px",backgroundColor:`${e.palette.info.dark}1a`,fontSize:"10px",fontWeight:500,cursor:"pointer"})),g=styled(j)(({selected:e})=>({display:"flex",gap:"8px",alignItems:"center",fontSize:"10px",fontWeight:500,color:"#000",cursor:"pointer",padding:8,justifyContent:"space-between",...e&&{backgroundColor:"#F8F8F8"}}));var te="M4.83332 0C2.16987 0 0 2.16988 0 4.83334C0 7.4968 2.16987 9.66668 4.83332 9.66668C5.98544 9.66668 7.04455 9.2597 7.87628 8.58335L11.1465 11.8535C11.1925 11.9015 11.2477 11.9398 11.3088 11.9662C11.3698 11.9926 11.4356 12.0066 11.5021 12.0072C11.5686 12.0079 11.6346 11.9953 11.6962 11.9702C11.7578 11.945 11.8137 11.9078 11.8607 11.8608C11.9078 11.8138 11.945 11.7578 11.9701 11.6962C11.9953 11.6346 12.0079 11.5686 12.0072 11.5021C12.0065 11.4356 11.9926 11.3699 11.9662 11.3088C11.9398 11.2478 11.9015 11.1926 11.8535 11.1465L8.58331 7.87632C9.25966 7.04458 9.66664 5.98546 9.66664 4.83334C9.66664 2.16988 7.49677 0 4.83332 0ZM4.83332 1C6.95633 1 8.66665 2.71032 8.66665 4.83334C8.66665 5.86755 8.25871 6.80192 7.59699 7.49025C7.5562 7.52023 7.5202 7.55623 7.49022 7.59702C6.80189 8.25875 5.86752 8.66668 4.83332 8.66668C2.71031 8.66668 0.999997 6.95636 0.999997 4.83334C0.999997 2.71032 2.71031 1 4.83332 1Z";function oe({size:e=12,sx:a,className:r,...d}){return jsx(ee,{viewBox:"0 0 12 12",inheritViewBox:true,className:`${r??""} MUISvgIcon__search-icon`,sx:{width:e,height:e,color:"text.primary",...a},...d,children:jsx("path",{d:te,fill:"currentColor"})})}var N=oe;function pe({options:e,onChangeOption:a$2,selectedOption:r,placeholder:d,label:A,isLoading:R,renderOption:C,iconUrl:h,disabled:u,onClearValue:m,slotProps:V={},hideSelectedCheckmark:$,listWrapperSx:Z={},name:U,...q}){let G=yc(useId(),"select-with-search"),{selectInput:I={},searchInput:J={},dropdownContainer:v={},item:b={}}=V,[y,w]=useState(null),[n,x]=useState(""),K=useCallback(()=>{m!==void 0?m():a$2(null);},[m,a$2]),f=!!y,Q=t=>{u||w(f?null:t.currentTarget);},S=()=>{w(null),x("");},X=R?jsx(CircularProgress,{size:16}):jsx(N,{onClick:()=>{n&&x("");},role:"button"}),W=useMemo(()=>n?e.filter(t=>{let p=t?.label?.toLowerCase(),j=t?.value?.toLowerCase();return p?.includes(n.toLowerCase())||j?.includes(n.toLowerCase())}):e,[e,n]),Y=useMemo(()=>jsx(c,{sx:{display:"flex",alignItems:"center",maxWidth:16},children:jsx(c,{component:"img",src:h,alt:"icon",sx:{maxWidth:12,height:12}})}),[h]);return jsx(a,{id:G,"data-testid":"SelectWithSearch",disabled:u,open:f,anchorEl:y,onOpen:Q,onClose:S,hasValue:!!r?.value,onClear:K,trigger:jsx(a$1,{className:"SelectWithSearch_input",name:U,placeholder:"Please Select",label:A,sx:{cursor:"pointer"},value:r?.label||"",InputLabelProps:{filled:!!r?.label},disabled:u,...I,InputProps:{readOnly:true,disableUnderline:true,...!!h&&{startAdornment:Y},...I.InputProps}}),listWrapperSx:{height:"100%",overflow:"hidden",...Z},slotProps:{popover:{slotProps:{paper:{sx:{overflow:"hidden"}}}}},...q,children:jsxs(F,{...v,className:`SelectWithSearch_container ${v?.className??""}`,children:[jsx(D,{className:"SelectWithSearch_input",placeholder:d||"Select",endAdornment:X,onClick:t=>{t.stopPropagation();},value:n,onChange:t=>{x(t.target.value);},disableUnderline:true,sx:{cursor:"default",width:"100%",backgroundColor:"white",border:"1px solid #F2F2F2",...e.length&&{marginBottom:"4px"},...n&&{cursor:"pointer"}},...J}),jsxs(c,{className:"SelectWithSearch_options",overflow:"auto",maxHeight:400,children:[W.length===0&&n&&jsx(g,{selected:false,...b,children:jsx(ne,{component:"span",fontSize:"10px",fontWeight:500,color:"#8D8D94",children:"No results found"})}),W.map(t=>C?C(t,{closeDropdown:S,open:f}):createElement(g,{...b,className:`SelectWithSearch_item ${r?.value===t.value?"SelectWithSearch_item-selected":""}`,key:t.value,selected:r?.value===t.value,onClick:p=>{p.stopPropagation(),p.preventDefault(),r?.value===t.value?a$2(null):a$2(t),S();}},jsx("span",{children:t.label}),!$&&r?.value===t?.value&&jsx(c,{component:"img",src:Pc,alt:"close",sx:{width:10,height:7.5}})))]})]})})}var H=pe;var Re=H;export{me as a,xe as b,fe as c,D as d,Se as e,F as f,ge as g,Ce as h,g as i,Re as j};
1
+ import {a}from'./chunk-GCKJQWXA.js';import {a as a$1}from'./chunk-GDDSIVZY.js';import {j,f}from'./chunk-IBBWXV4R.js';import {yc}from'./chunk-2SKLD6QR.js';import {Pc}from'./chunk-OK75VWGZ.js';import {useId,useState,useCallback,useMemo,createElement}from'react';import c from'@mui/material/Box';import ne from'@mui/material/Typography';import O from'@mui/material/Input';import {styled}from'@mui/material/styles';import {CircularProgress}from'@mui/material';import ee from'@mui/material/SvgIcon';import {jsx,jsxs}from'react/jsx-runtime';var me=styled(j)(({theme:e})=>({fontSize:"10px",color:e.v2.palette.grey[500],fontWeight:600,lineHeight:"10px"})),xe=styled(j)(({theme:e})=>({fontSize:"11px",color:e.v2.palette.base.black,fontWeight:600,lineHeight:"14.3px",width:200})),fe=styled(c)(()=>({display:"flex",flexDirection:"column",maxHeight:400,overflow:"auto",gap:"8px"})),D=styled(O)(({theme:e})=>({width:"inherit",height:32,padding:"11px 12px",fontSize:"10px",borderRadius:"5px",backgroundColor:"#F9F9F9",border:"1px solid transparent","&.Mui-focused":{borderColor:e.palette.info.dark}})),Se=styled(f)({padding:0,width:12,height:12,".MuiSvgIcon-root, img":{width:12,height:12}}),F=styled(c)(()=>({display:"flex",flexDirection:"column",gap:"8px",padding:"4px"})),ge=styled(c)(()=>({display:"flex",gap:"8px",padding:"4px",flexWrap:"wrap"})),Ce=styled(c)(({theme:e})=>({display:"flex",padding:"4px 8px 4px 6px",alignItems:"center",gap:"4px",borderRadius:"13px",backgroundColor:`${e.palette.info.dark}1a`,fontSize:"10px",fontWeight:500,cursor:"pointer"})),g=styled(j)(({selected:e})=>({display:"flex",gap:"8px",alignItems:"center",fontSize:"10px",fontWeight:500,color:"#000",cursor:"pointer",padding:8,justifyContent:"space-between",...e&&{backgroundColor:"#F8F8F8"}}));var te="M4.83332 0C2.16987 0 0 2.16988 0 4.83334C0 7.4968 2.16987 9.66668 4.83332 9.66668C5.98544 9.66668 7.04455 9.2597 7.87628 8.58335L11.1465 11.8535C11.1925 11.9015 11.2477 11.9398 11.3088 11.9662C11.3698 11.9926 11.4356 12.0066 11.5021 12.0072C11.5686 12.0079 11.6346 11.9953 11.6962 11.9702C11.7578 11.945 11.8137 11.9078 11.8607 11.8608C11.9078 11.8138 11.945 11.7578 11.9701 11.6962C11.9953 11.6346 12.0079 11.5686 12.0072 11.5021C12.0065 11.4356 11.9926 11.3699 11.9662 11.3088C11.9398 11.2478 11.9015 11.1926 11.8535 11.1465L8.58331 7.87632C9.25966 7.04458 9.66664 5.98546 9.66664 4.83334C9.66664 2.16988 7.49677 0 4.83332 0ZM4.83332 1C6.95633 1 8.66665 2.71032 8.66665 4.83334C8.66665 5.86755 8.25871 6.80192 7.59699 7.49025C7.5562 7.52023 7.5202 7.55623 7.49022 7.59702C6.80189 8.25875 5.86752 8.66668 4.83332 8.66668C2.71031 8.66668 0.999997 6.95636 0.999997 4.83334C0.999997 2.71032 2.71031 1 4.83332 1Z";function oe({size:e=12,sx:a,className:r,...d}){return jsx(ee,{viewBox:"0 0 12 12",inheritViewBox:true,className:`${r??""} MUISvgIcon__search-icon`,sx:{width:e,height:e,color:"text.primary",...a},...d,children:jsx("path",{d:te,fill:"currentColor"})})}var N=oe;function pe({options:e,onChangeOption:a$2,selectedOption:r,placeholder:d,label:A,isLoading:R,renderOption:C,iconUrl:h,disabled:u,onClearValue:m,slotProps:V={},hideSelectedCheckmark:$,listWrapperSx:Z={},name:U,...q}){let G=yc(useId(),"select-with-search"),{selectInput:I={},searchInput:J={},dropdownContainer:v={},item:b={}}=V,[y,w]=useState(null),[n,x]=useState(""),K=useCallback(()=>{m!==void 0?m():a$2(null);},[m,a$2]),f=!!y,Q=t=>{u||w(f?null:t.currentTarget);},S=()=>{w(null),x("");},X=R?jsx(CircularProgress,{size:16}):jsx(N,{onClick:()=>{n&&x("");},role:"button"}),W=useMemo(()=>n?e.filter(t=>{let p=t?.label?.toLowerCase(),j=t?.value?.toLowerCase();return p?.includes(n.toLowerCase())||j?.includes(n.toLowerCase())}):e,[e,n]),Y=useMemo(()=>jsx(c,{sx:{display:"flex",alignItems:"center",maxWidth:16},children:jsx(c,{component:"img",src:h,alt:"icon",sx:{maxWidth:12,height:12}})}),[h]);return jsx(a,{id:G,"data-testid":"SelectWithSearch",disabled:u,open:f,anchorEl:y,onOpen:Q,onClose:S,hasValue:!!r?.value,onClear:K,trigger:jsx(a$1,{className:"SelectWithSearch_input",name:U,placeholder:"Please Select",label:A,sx:{cursor:"pointer"},value:r?.label||"",InputLabelProps:{filled:!!r?.label},disabled:u,...I,InputProps:{readOnly:true,disableUnderline:true,...!!h&&{startAdornment:Y},...I.InputProps}}),listWrapperSx:{height:"100%",overflow:"hidden",...Z},slotProps:{popover:{slotProps:{paper:{sx:{overflow:"hidden"}}}}},...q,children:jsxs(F,{...v,className:`SelectWithSearch_container ${v?.className??""}`,children:[jsx(D,{className:"SelectWithSearch_input",placeholder:d||"Select",endAdornment:X,onClick:t=>{t.stopPropagation();},value:n,onChange:t=>{x(t.target.value);},disableUnderline:true,sx:{cursor:"default",width:"100%",backgroundColor:"white",border:"1px solid #F2F2F2",...e.length&&{marginBottom:"4px"},...n&&{cursor:"pointer"}},...J}),jsxs(c,{className:"SelectWithSearch_options",overflow:"auto",maxHeight:400,children:[W.length===0&&n&&jsx(g,{selected:false,...b,children:jsx(ne,{component:"span",fontSize:"10px",fontWeight:500,color:"#8D8D94",children:"No results found"})}),W.map(t=>C?C(t,{closeDropdown:S,open:f}):createElement(g,{...b,className:`SelectWithSearch_item ${r?.value===t.value?"SelectWithSearch_item-selected":""}`,key:t.value,selected:r?.value===t.value,onClick:p=>{p.stopPropagation(),p.preventDefault(),r?.value===t.value?a$2(null):a$2(t),S();}},jsx("span",{children:t.label}),!$&&r?.value===t?.value&&jsx(c,{component:"img",src:Pc,alt:"close",sx:{width:10,height:7.5}})))]})]})})}var H=pe;var Re=H;export{me as a,xe as b,fe as c,D as d,Se as e,F as f,ge as g,Ce as h,g as i,Re as j};
@@ -1 +1 @@
1
- import {a as a$1}from'./chunk-KCDAETD2.js';import {a}from'./chunk-MQFXJL5S.js';import {r}from'./chunk-7PJX5ZKM.js';import {yc,Fa,Ga,Ea,h}from'./chunk-2SKLD6QR.js';import {Yc,Xc,Oc,Nc,Mc,Pc,Te}from'./chunk-OK75VWGZ.js';import {useRef,useId,useState,useEffect}from'react';import {useTranslation}from'react-i18next';import {createPortal}from'react-dom';import {styled,alpha}from'@mui/material';import oe from'@mui/material/Popover';import Je from'react-currency-input-field';import {jsx,Fragment,jsxs}from'react/jsx-runtime';var ne=styled("div")(({showWarning:e})=>({display:"flex",gap:"0.25rem",justifyContent:"flex-start",alignItems:"flex-start",padding:"0.25rem",borderRadius:"0.25rem",width:"14.25rem",minHeight:e?"3.6rem":"2.5rem"})),te=styled("div")(()=>({display:"flex",flexDirection:"column",width:"100%"})),re=styled("div")(()=>({display:"flex",alignItems:"flex-start",justifyContent:"space-between",flex:1})),ie=styled("div")(({theme:e,showWarning:o,showDropDown:t})=>({height:"2rem",border:o?`1px solid ${e.palette.common.red}24`:t?`1px solid ${e.palette.info.dark}`:`1px solid ${e.palette.grey[100]}`,borderRadius:o?"0.25rem 0.25rem 0rem 0rem":"0.25rem",display:"flex",alignItems:"center",justifyContent:"space-between",paddingRight:"0.5rem",paddingLeft:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",margin:0,zIndex:4e3,...t&&{boxShadow:`0px 0px 4px 0px ${e.palette.info.dark}80`}})),ae=styled("div")(({theme:e})=>({height:"1.1rem",borderRadius:"0rem 0rem 0.25rem 0.25rem",display:"flex",justifyContent:"flex-start",margin:0,alignItems:"center",background:e.palette.background.gradient.error,paddingLeft:"0.5rem"})),se=styled("p")(({theme:e})=>({color:e.palette.common.red,fontSize:"0.62rem",fontWeight:400,fontFamily:"Lato",padding:0,margin:0,paddingLeft:"0.25rem"})),de=styled("img")({height:"auto",width:"auto",verticalAlign:"top"}),le=styled("div")({display:"flex",flexDirection:"column",justifyContent:"center"}),ce=styled("div")({display:"flex",height:"0.8rem",alignItems:"center",width:"8.5rem"}),pe=styled(Je)(({theme:e,showWarning:o,disabled:t})=>({color:o?e.palette.common.red:e.palette.text.primary,fontSize:"0.8125rem",fontWeight:600,width:"4.5rem",height:"0.9rem",border:"none",outline:"none",textAlign:"right",padding:0,"&::-webkit-outer-spin-button":{appearance:"none",margin:0},"&::-webkit-inner-spin-button":{appearance:"none",margin:0},backgroundColor:"transparent",alignSelf:"flex-end","&::placeholder":{color:e.palette.grey.A400},...t&&{opacity:.3}})),me=styled("p")(({theme:e})=>({color:e.palette.text.primary,fontSize:"0.8125rem",fontWeight:600,width:"5.2rem",border:"none",outline:"none",padding:0,margin:0,paddingLeft:16,textAlign:"right","&::-webkit-outer-spin-button":{appearance:"none",margin:0},"&::-webkit-inner-spin-button":{appearance:"none",margin:0},alignSelf:"center"})),I=styled("p")(({theme:e,showWarning:o,showBottomPadding:t,autoMargin:i})=>({color:o?e.palette.common.red:e.palette.grey[700],fontSize:"0.625rem",fontWeight:500,padding:0,margin:0,height:t?"0.43rem":"auto",...t&&{lineHeight:"0.625",leadingTrim:"both",paddingBottom:"0.31rem"},...i&&{paddingBottom:"0.43rem",lineHeight:"0.625"}})),Ne=styled("div")({display:"flex"}),v=styled(Ne)(({limited:e,paddingTop:o,marginRightAuto:t})=>({paddingRight:"0.5rem",alignItems:"center",cursor:"pointer",...t&&{marginRight:"auto"},...e&&{width:"3rem"},...o&&{paddingTop:"0.31rem"}})),A=styled("p")(({theme:e})=>({color:e.palette.text.primary,fontSize:"0.68rem",fontWeight:500,margin:0,padding:0,textTransform:"capitalize",paddingRight:"0.25rem",paddingLeft:"0.2rem",lineHeight:"0.865"})),ue=styled("div")({width:0,height:0}),ge=styled(oe)(({theme:e})=>({backgroundColor:e.palette.background.default,boxShadow:e.shadows[21],"& .MuiPaper-root":{borderRadius:"0.25rem"}})),F=styled("div")(({theme:e,disabled:o,isRefundInProcess:t,warning:i,isHighlighted:a})=>({borderRadius:"0.3rem",backgroundColor:e.palette.common.white,border:`1px solid ${t?e.palette.info.dark:e.palette.grey[100]}`,width:"2rem",height:"2rem",display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",pointerEvents:o?"none":"auto",transition:"all 0.2s ease-in-out","&:hover":{border:`1px solid ${i?e.palette.common.red:e.palette.info.dark}`},...a&&{border:`1px solid ${e.palette.info.dark}`},...o&&{opacity:.3}})),H=styled("img")(()=>({width:"0.85rem",height:"0.85rem"})),fe=styled(oe)(({theme:e})=>({backgroundColor:"transparent",boxShadow:e.shadows[21],borderRadius:"0.25rem","& .MuiPaper-root":{borderRadius:"0.25rem"}})),he=styled("div")(({showDaysMenu:e})=>({height:e?"4.5rem":"auto"})),ye=styled("div")(({theme:e})=>({display:"flex",alignItems:"flex-start",justifyContent:"space-between",borderBottom:`1px solid ${e.palette.grey[100]}`,maxWidth:"9.25rem",height:"2.75rem",padding:"0.5rem",cursor:"pointer",gap:"0.31rem",flexDirection:"column",transition:"all 0.2s ease-in-out","&:hover":{boxShadow:`0px 0px 16px 0px ${alpha(e.palette.common.black,.13)}`}})),Ce=styled("img")(({spaceFromBottom:e,currencyPadding:o})=>({height:"0.4rem",width:"0.6rem",cursor:"pointer",marginBottom:e||o?"0":"auto",verticalAlign:"middle",...e&&{marginTop:"2px"}}));var Xe=({selectedCurrency:e,option:o,closeDropdown:t,handleSelectOption:i})=>{let{t:a$1}=useTranslation();return jsxs(ye,{onClick:()=>{i&&i(o.value,o?.currency),t();},children:[jsx(I,{showBottomPadding:true,showWarning:false,children:a$1(o.name)}),jsxs(ce,{children:[jsxs(v,{marginRightAuto:true,children:[jsx(a,{currencyCode:o?.currency??e,width:"0.76rem"}),jsx(A,{children:o?.currency??e})]}),jsx(me,{showWarning:false,children:Fa(o.value||0,o?.currency??e)})]})]})};function Ye({menuAnchor:e,showDropDown:o,selectedCurrency:t,options:i,closeDropdown:a,handleSelectOption:g}){return i.length<=1?null:jsx(fe,{open:o,anchorEl:e,anchorOrigin:{vertical:18,horizontal:-76},style:{backgroundColor:"transparent",zIndex:4e3,padding:0,margin:0},onClose:a,children:jsx(he,{children:i.map(f=>jsx(Fragment,{children:Xe({selectedCurrency:t,option:f,closeDropdown:a,handleSelectOption:g})}))})})}var $=Ye;function oo({showWarning:e,selectedCurrency:o,onAmountChange:t,amount:i,currencyConfig:a$2,toggleDropDown:g,showDropDown:f,showDropdownIcon:M,disabled:x,isLoading:h}){let{t:b}=useTranslation(),y=useRef(null),C=()=>{y.current&&y.current.click();};return jsxs(Fragment,{children:[jsxs(le,{children:[jsx(I,{showBottomPadding:true,showWarning:e,children:b("amount")}),jsxs(v,{limited:true,paddingTop:true,onClick:C,children:[jsx(a,{currencyCode:o,width:"0.76rem"}),jsx(A,{children:jsx(a$1,{currency:o})}),!e&&M&&jsx(Ce,{src:f?Yc:Xc,alt:"drop-down icon",currencyPadding:true})]})]}),jsx(ue,{ref:y,onClick:g}),h?jsx(r,{variant:"text",width:"100%",height:"100%"}):jsx(pe,{disabled:x,placeholder:a$2[o]?"0.000":"0.00",onValueChange:t,value:i,decimalsLimit:a$2[o]??2,showWarning:e||false,decimalScale:a$2[o]??2,autoFocus:true})]})}var B=oo;function so({anchorEl:e,initialAmount:o,options:t,onConfirm:i,handleClose:a,currency:g,isCheckMarkHighlighted:f}){let M=yc(useId(),"action-menu"),{t:x}=useTranslation(),[h$1,b]=useState(o?.toString()),[y,C]=useState(),[u,k]=useState(""),be=useRef(null),[R,E]=useState(false),[c,Se]=useState(g),j=false,[De,Ie]=useState(false),[ve,G]=useState(Oc),[Ae,K]=useState(Nc),Me=useRef(),ke=()=>{C(void 0),E(false);};useEffect(()=>{Me.current?.focus();},[De]);let Re=()=>{ke(),Ie(r=>!r);},Ee=!!e,We=r=>{E(p=>!p),C(r.currentTarget);},Pe=t?.find(r=>r.currency===c)?.value,Te$1=Fa(Pe||0,c),Oe=`${x("maxAllowed")} ${Te$1}`,Fe=`${x("minAllowed")} ${Ga(.1,c||"KWD")}`,He=r=>{let p=h(r);p>o?k(Oe):p<.1&&r!==void 0?k(Fe):k(""),b(r);},Le=(r,p)=>{let Ve=Ga(r||0,p||"KWD");b(Ve),Se(p||c);},U=r=>{C(void 0),E(false),a(r);},$e=()=>{K(Pc);},ze=()=>{K(Nc);},V=r=>{U(r);},Be=()=>{U();},je=()=>{G(Te);},Ge=()=>{G(Oc);},Ke=()=>{i?.(h(h$1),c),V();},Ue=!!u||!h$1;return createPortal(jsx(ge,{id:M,"data-testid":"ActionMenu",open:Ee,anchorEl:e,style:{backgroundColor:"transparent",zIndex:3e3},"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",anchorOrigin:{vertical:"top",horizontal:-234},ref:be,onClose:r=>{V(r);},children:jsxs(ne,{showWarning:!!u,children:[jsxs(te,{children:[jsxs(ie,{showWarning:!!u,showDropDown:R,children:[jsx(B,{showWarning:!!u,selectedCurrency:c,onAmountChange:He,amount:h$1,currencyConfig:Ea,toggleDropDown:We,showDropDown:!R,showDropdownIcon:(t?.length||0)>1}),jsx($,{showDropDown:R,menuAnchor:y,selectedCurrency:c,closeDropdown:Re,options:t??[],handleSelectOption:Le})]}),!!u&&jsxs(ae,{children:[jsx(de,{src:Mc,alt:"info"}),jsx(se,{children:u})]})]}),jsxs(re,{children:[jsx(F,{onMouseLeave:Ge,onMouseEnter:je,warning:true,role:"button",onClick:Be,children:jsx(H,{isRefundInProcess:j,src:ve,alt:"Cross icon"})}),jsx(F,{onMouseLeave:ze,onMouseEnter:$e,isRefundInProcess:j,disabled:Ue,role:"button",onClick:Ke,isHighlighted:f,children:jsx(H,{src:Ae,alt:"Check icon"})})]})]})}),document.body)}var xe=so;var jo=xe;export{$ as a,B as b,jo as c};
1
+ import {a as a$1}from'./chunk-KCDAETD2.js';import {a}from'./chunk-MQFXJL5S.js';import {r}from'./chunk-IBBWXV4R.js';import {yc,Fa,Ga,Ea,h}from'./chunk-2SKLD6QR.js';import {Yc,Xc,Oc,Nc,Mc,Pc,Te}from'./chunk-OK75VWGZ.js';import {useRef,useId,useState,useEffect}from'react';import {useTranslation}from'react-i18next';import {createPortal}from'react-dom';import {styled,alpha}from'@mui/material';import oe from'@mui/material/Popover';import Je from'react-currency-input-field';import {jsx,Fragment,jsxs}from'react/jsx-runtime';var ne=styled("div")(({showWarning:e})=>({display:"flex",gap:"0.25rem",justifyContent:"flex-start",alignItems:"flex-start",padding:"0.25rem",borderRadius:"0.25rem",width:"14.25rem",minHeight:e?"3.6rem":"2.5rem"})),te=styled("div")(()=>({display:"flex",flexDirection:"column",width:"100%"})),re=styled("div")(()=>({display:"flex",alignItems:"flex-start",justifyContent:"space-between",flex:1})),ie=styled("div")(({theme:e,showWarning:o,showDropDown:t})=>({height:"2rem",border:o?`1px solid ${e.palette.common.red}24`:t?`1px solid ${e.palette.info.dark}`:`1px solid ${e.palette.grey[100]}`,borderRadius:o?"0.25rem 0.25rem 0rem 0rem":"0.25rem",display:"flex",alignItems:"center",justifyContent:"space-between",paddingRight:"0.5rem",paddingLeft:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",margin:0,zIndex:4e3,...t&&{boxShadow:`0px 0px 4px 0px ${e.palette.info.dark}80`}})),ae=styled("div")(({theme:e})=>({height:"1.1rem",borderRadius:"0rem 0rem 0.25rem 0.25rem",display:"flex",justifyContent:"flex-start",margin:0,alignItems:"center",background:e.palette.background.gradient.error,paddingLeft:"0.5rem"})),se=styled("p")(({theme:e})=>({color:e.palette.common.red,fontSize:"0.62rem",fontWeight:400,fontFamily:"Lato",padding:0,margin:0,paddingLeft:"0.25rem"})),de=styled("img")({height:"auto",width:"auto",verticalAlign:"top"}),le=styled("div")({display:"flex",flexDirection:"column",justifyContent:"center"}),ce=styled("div")({display:"flex",height:"0.8rem",alignItems:"center",width:"8.5rem"}),pe=styled(Je)(({theme:e,showWarning:o,disabled:t})=>({color:o?e.palette.common.red:e.palette.text.primary,fontSize:"0.8125rem",fontWeight:600,width:"4.5rem",height:"0.9rem",border:"none",outline:"none",textAlign:"right",padding:0,"&::-webkit-outer-spin-button":{appearance:"none",margin:0},"&::-webkit-inner-spin-button":{appearance:"none",margin:0},backgroundColor:"transparent",alignSelf:"flex-end","&::placeholder":{color:e.palette.grey.A400},...t&&{opacity:.3}})),me=styled("p")(({theme:e})=>({color:e.palette.text.primary,fontSize:"0.8125rem",fontWeight:600,width:"5.2rem",border:"none",outline:"none",padding:0,margin:0,paddingLeft:16,textAlign:"right","&::-webkit-outer-spin-button":{appearance:"none",margin:0},"&::-webkit-inner-spin-button":{appearance:"none",margin:0},alignSelf:"center"})),I=styled("p")(({theme:e,showWarning:o,showBottomPadding:t,autoMargin:i})=>({color:o?e.palette.common.red:e.palette.grey[700],fontSize:"0.625rem",fontWeight:500,padding:0,margin:0,height:t?"0.43rem":"auto",...t&&{lineHeight:"0.625",leadingTrim:"both",paddingBottom:"0.31rem"},...i&&{paddingBottom:"0.43rem",lineHeight:"0.625"}})),Ne=styled("div")({display:"flex"}),v=styled(Ne)(({limited:e,paddingTop:o,marginRightAuto:t})=>({paddingRight:"0.5rem",alignItems:"center",cursor:"pointer",...t&&{marginRight:"auto"},...e&&{width:"3rem"},...o&&{paddingTop:"0.31rem"}})),A=styled("p")(({theme:e})=>({color:e.palette.text.primary,fontSize:"0.68rem",fontWeight:500,margin:0,padding:0,textTransform:"capitalize",paddingRight:"0.25rem",paddingLeft:"0.2rem",lineHeight:"0.865"})),ue=styled("div")({width:0,height:0}),ge=styled(oe)(({theme:e})=>({backgroundColor:e.palette.background.default,boxShadow:e.shadows[21],"& .MuiPaper-root":{borderRadius:"0.25rem"}})),F=styled("div")(({theme:e,disabled:o,isRefundInProcess:t,warning:i,isHighlighted:a})=>({borderRadius:"0.3rem",backgroundColor:e.palette.common.white,border:`1px solid ${t?e.palette.info.dark:e.palette.grey[100]}`,width:"2rem",height:"2rem",display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",pointerEvents:o?"none":"auto",transition:"all 0.2s ease-in-out","&:hover":{border:`1px solid ${i?e.palette.common.red:e.palette.info.dark}`},...a&&{border:`1px solid ${e.palette.info.dark}`},...o&&{opacity:.3}})),H=styled("img")(()=>({width:"0.85rem",height:"0.85rem"})),fe=styled(oe)(({theme:e})=>({backgroundColor:"transparent",boxShadow:e.shadows[21],borderRadius:"0.25rem","& .MuiPaper-root":{borderRadius:"0.25rem"}})),he=styled("div")(({showDaysMenu:e})=>({height:e?"4.5rem":"auto"})),ye=styled("div")(({theme:e})=>({display:"flex",alignItems:"flex-start",justifyContent:"space-between",borderBottom:`1px solid ${e.palette.grey[100]}`,maxWidth:"9.25rem",height:"2.75rem",padding:"0.5rem",cursor:"pointer",gap:"0.31rem",flexDirection:"column",transition:"all 0.2s ease-in-out","&:hover":{boxShadow:`0px 0px 16px 0px ${alpha(e.palette.common.black,.13)}`}})),Ce=styled("img")(({spaceFromBottom:e,currencyPadding:o})=>({height:"0.4rem",width:"0.6rem",cursor:"pointer",marginBottom:e||o?"0":"auto",verticalAlign:"middle",...e&&{marginTop:"2px"}}));var Xe=({selectedCurrency:e,option:o,closeDropdown:t,handleSelectOption:i})=>{let{t:a$1}=useTranslation();return jsxs(ye,{onClick:()=>{i&&i(o.value,o?.currency),t();},children:[jsx(I,{showBottomPadding:true,showWarning:false,children:a$1(o.name)}),jsxs(ce,{children:[jsxs(v,{marginRightAuto:true,children:[jsx(a,{currencyCode:o?.currency??e,width:"0.76rem"}),jsx(A,{children:o?.currency??e})]}),jsx(me,{showWarning:false,children:Fa(o.value||0,o?.currency??e)})]})]})};function Ye({menuAnchor:e,showDropDown:o,selectedCurrency:t,options:i,closeDropdown:a,handleSelectOption:g}){return i.length<=1?null:jsx(fe,{open:o,anchorEl:e,anchorOrigin:{vertical:18,horizontal:-76},style:{backgroundColor:"transparent",zIndex:4e3,padding:0,margin:0},onClose:a,children:jsx(he,{children:i.map(f=>jsx(Fragment,{children:Xe({selectedCurrency:t,option:f,closeDropdown:a,handleSelectOption:g})}))})})}var $=Ye;function oo({showWarning:e,selectedCurrency:o,onAmountChange:t,amount:i,currencyConfig:a$2,toggleDropDown:g,showDropDown:f,showDropdownIcon:M,disabled:x,isLoading:h}){let{t:b}=useTranslation(),y=useRef(null),C=()=>{y.current&&y.current.click();};return jsxs(Fragment,{children:[jsxs(le,{children:[jsx(I,{showBottomPadding:true,showWarning:e,children:b("amount")}),jsxs(v,{limited:true,paddingTop:true,onClick:C,children:[jsx(a,{currencyCode:o,width:"0.76rem"}),jsx(A,{children:jsx(a$1,{currency:o})}),!e&&M&&jsx(Ce,{src:f?Yc:Xc,alt:"drop-down icon",currencyPadding:true})]})]}),jsx(ue,{ref:y,onClick:g}),h?jsx(r,{variant:"text",width:"100%",height:"100%"}):jsx(pe,{disabled:x,placeholder:a$2[o]?"0.000":"0.00",onValueChange:t,value:i,decimalsLimit:a$2[o]??2,showWarning:e||false,decimalScale:a$2[o]??2,autoFocus:true})]})}var B=oo;function so({anchorEl:e,initialAmount:o,options:t,onConfirm:i,handleClose:a,currency:g,isCheckMarkHighlighted:f}){let M=yc(useId(),"action-menu"),{t:x}=useTranslation(),[h$1,b]=useState(o?.toString()),[y,C]=useState(),[u,k]=useState(""),be=useRef(null),[R,E]=useState(false),[c,Se]=useState(g),j=false,[De,Ie]=useState(false),[ve,G]=useState(Oc),[Ae,K]=useState(Nc),Me=useRef(),ke=()=>{C(void 0),E(false);};useEffect(()=>{Me.current?.focus();},[De]);let Re=()=>{ke(),Ie(r=>!r);},Ee=!!e,We=r=>{E(p=>!p),C(r.currentTarget);},Pe=t?.find(r=>r.currency===c)?.value,Te$1=Fa(Pe||0,c),Oe=`${x("maxAllowed")} ${Te$1}`,Fe=`${x("minAllowed")} ${Ga(.1,c||"KWD")}`,He=r=>{let p=h(r);p>o?k(Oe):p<.1&&r!==void 0?k(Fe):k(""),b(r);},Le=(r,p)=>{let Ve=Ga(r||0,p||"KWD");b(Ve),Se(p||c);},U=r=>{C(void 0),E(false),a(r);},$e=()=>{K(Pc);},ze=()=>{K(Nc);},V=r=>{U(r);},Be=()=>{U();},je=()=>{G(Te);},Ge=()=>{G(Oc);},Ke=()=>{i?.(h(h$1),c),V();},Ue=!!u||!h$1;return createPortal(jsx(ge,{id:M,"data-testid":"ActionMenu",open:Ee,anchorEl:e,style:{backgroundColor:"transparent",zIndex:3e3},"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",anchorOrigin:{vertical:"top",horizontal:-234},ref:be,onClose:r=>{V(r);},children:jsxs(ne,{showWarning:!!u,children:[jsxs(te,{children:[jsxs(ie,{showWarning:!!u,showDropDown:R,children:[jsx(B,{showWarning:!!u,selectedCurrency:c,onAmountChange:He,amount:h$1,currencyConfig:Ea,toggleDropDown:We,showDropDown:!R,showDropdownIcon:(t?.length||0)>1}),jsx($,{showDropDown:R,menuAnchor:y,selectedCurrency:c,closeDropdown:Re,options:t??[],handleSelectOption:Le})]}),!!u&&jsxs(ae,{children:[jsx(de,{src:Mc,alt:"info"}),jsx(se,{children:u})]})]}),jsxs(re,{children:[jsx(F,{onMouseLeave:Ge,onMouseEnter:je,warning:true,role:"button",onClick:Be,children:jsx(H,{isRefundInProcess:j,src:ve,alt:"Cross icon"})}),jsx(F,{onMouseLeave:ze,onMouseEnter:$e,isRefundInProcess:j,disabled:Ue,role:"button",onClick:Ke,isHighlighted:f,children:jsx(H,{src:Ae,alt:"Check icon"})})]})]})}),document.body)}var xe=so;var jo=xe;export{$ as a,B as b,jo as c};
@@ -1 +1 @@
1
- import {f as f$1}from'./chunk-TLAOA7ZF.js';import {styled,Button,Box,alpha}from'@mui/material';var l=t=>({...t.typography.subtitle1,borderRadius:"50px",borderWidth:"1px",borderStyle:"solid",minWidth:"135.11px",height:"32px",display:"flex",justifyContent:"center",alignItems:"center",gap:"8px",textTransform:"none",transition:"none",paddingInline:t.spacing(2)}),n=styled(Button,{shouldForwardProp:t=>t!=="statusVariant"})(({theme:t,statusVariant:e})=>({...l(t),...e==="active"?{background:t.palette.background.gradient.shadedBlue,color:t.palette.common.white,"&:hover":{background:t.palette.background.gradient.shadedBlue,opacity:.8}}:{backgroundColor:t.palette.common.white,borderColor:t.palette.grey[100],color:t.palette.text.primary,"&:hover":{backgroundColor:t.palette.common.white,opacity:.7}}})),u={active:n,inActive:n};styled(Box)(({theme:t,variant:e})=>({borderRadius:"50px",backgroundColor:e==="active"?alpha(t.palette.text.primary,.1):t.palette.grey[100],display:"flex",justifyContent:"center",alignItems:"center",paddingInline:t.spacing(.5),paddingBlock:t.spacing(.25),color:e==="active"?t.palette.common.white:t.palette.text.primary,fontSize:"8px",fontWeight:700,lineHeight:"10px"}));styled("img")(({theme:t,variant:e,icon:a})=>({fill:e==="active"?t.palette.common.white:t.palette.text.primary,color:e==="active"?t.palette.common.white:t.palette.text.primary,...!(["openFlag","closedFlag"].includes(a??"")&&e==="inActive")&&a!=="captured"&&{filter:e==="active"?"brightness(0) invert(1)":"brightness(0) invert(0)"},maxWidth:"14px",maxHeight:"14px"}));var m=styled("p")(({theme:t})=>({fontSize:"0.6875rem",color:t.palette.background.default,fontStyle:"normal",margin:"auto",textTransform:"capitalize"})),h=styled(f$1)(({theme:t})=>({backgroundColor:"white",boxShadow:t.shadows[21],borderRadius:"0.25rem","& .MuiPaper-root":{borderRadius:"0.25rem",width:"12.5rem"}})),y=styled("span")(()=>({width:"27px",height:"100%",maxHeight:"100%",position:"absolute",top:"0",right:"0",bottom:"0",overflow:"hidden"})),b=styled(Box)(({variant:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"0.5rem",fontWeight:t==="active"?700:400})),f=styled(Box)(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"100%"})),S=styled("img")(({theme:t,variant:e,icon:a})=>({fill:e==="active"?t.palette.common.white:t.palette.text.primary,color:e==="active"?t.palette.common.white:t.palette.text.primary,...!(["openFlag","closedFlag"].includes(a??"")&&e==="inActive")&&a!=="captured"&&{filter:e==="active"?"brightness(0) invert(1)":"brightness(0) invert(0)"},maxWidth:"14px",maxHeight:"14px"})),v=styled(Box)(({variant:t})=>({width:"14px",height:"14px",display:"flex",alignItems:"center","& img":{width:"14px",height:"14px",filter:t==="active"?"brightness(0) invert(1)":"brightness(0) invert(0)"}}));export{u as a,m as b,h as c,y as d,b as e,f,S as g,v as h};
1
+ import {f as f$1}from'./chunk-BFA7JDSI.js';import {styled,Button,Box,alpha}from'@mui/material';var l=t=>({...t.typography.subtitle1,borderRadius:"50px",borderWidth:"1px",borderStyle:"solid",minWidth:"135.11px",height:"32px",display:"flex",justifyContent:"center",alignItems:"center",gap:"8px",textTransform:"none",transition:"none",paddingInline:t.spacing(2)}),n=styled(Button,{shouldForwardProp:t=>t!=="statusVariant"})(({theme:t,statusVariant:e})=>({...l(t),...e==="active"?{background:t.palette.background.gradient.shadedBlue,color:t.palette.common.white,"&:hover":{background:t.palette.background.gradient.shadedBlue,opacity:.8}}:{backgroundColor:t.palette.common.white,borderColor:t.palette.grey[100],color:t.palette.text.primary,"&:hover":{backgroundColor:t.palette.common.white,opacity:.7}}})),u={active:n,inActive:n};styled(Box)(({theme:t,variant:e})=>({borderRadius:"50px",backgroundColor:e==="active"?alpha(t.palette.text.primary,.1):t.palette.grey[100],display:"flex",justifyContent:"center",alignItems:"center",paddingInline:t.spacing(.5),paddingBlock:t.spacing(.25),color:e==="active"?t.palette.common.white:t.palette.text.primary,fontSize:"8px",fontWeight:700,lineHeight:"10px"}));styled("img")(({theme:t,variant:e,icon:a})=>({fill:e==="active"?t.palette.common.white:t.palette.text.primary,color:e==="active"?t.palette.common.white:t.palette.text.primary,...!(["openFlag","closedFlag"].includes(a??"")&&e==="inActive")&&a!=="captured"&&{filter:e==="active"?"brightness(0) invert(1)":"brightness(0) invert(0)"},maxWidth:"14px",maxHeight:"14px"}));var m=styled("p")(({theme:t})=>({fontSize:"0.6875rem",color:t.palette.background.default,fontStyle:"normal",margin:"auto",textTransform:"capitalize"})),h=styled(f$1)(({theme:t})=>({backgroundColor:"white",boxShadow:t.shadows[21],borderRadius:"0.25rem","& .MuiPaper-root":{borderRadius:"0.25rem",width:"12.5rem"}})),y=styled("span")(()=>({width:"27px",height:"100%",maxHeight:"100%",position:"absolute",top:"0",right:"0",bottom:"0",overflow:"hidden"})),b=styled(Box)(({variant:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"0.5rem",fontWeight:t==="active"?700:400})),f=styled(Box)(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"100%"})),S=styled("img")(({theme:t,variant:e,icon:a})=>({fill:e==="active"?t.palette.common.white:t.palette.text.primary,color:e==="active"?t.palette.common.white:t.palette.text.primary,...!(["openFlag","closedFlag"].includes(a??"")&&e==="inActive")&&a!=="captured"&&{filter:e==="active"?"brightness(0) invert(1)":"brightness(0) invert(0)"},maxWidth:"14px",maxHeight:"14px"})),v=styled(Box)(({variant:t})=>({width:"14px",height:"14px",display:"flex",alignItems:"center","& img":{width:"14px",height:"14px",filter:t==="active"?"brightness(0) invert(1)":"brightness(0) invert(0)"}}));export{u as a,m as b,h as c,y as d,b as e,f,S as g,v as h};
@@ -1,3 +1,3 @@
1
- import {p}from'./chunk-7PJX5ZKM.js';import {yc}from'./chunk-2SKLD6QR.js';import {Bi}from'./chunk-OK75VWGZ.js';import {useState,useId}from'react';import T from'@mui/material/Skeleton';import i from'@mui/material/Box';import {styled,Box}from'@mui/material';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var h=styled(Box)(()=>({display:"flex",alignItems:"center",justifyContent:"center",borderRadius:12,border:"1.03px solid"})),c=styled(Box)`
1
+ import {p}from'./chunk-IBBWXV4R.js';import {yc}from'./chunk-2SKLD6QR.js';import {Bi}from'./chunk-OK75VWGZ.js';import {useState,useId}from'react';import T from'@mui/material/Skeleton';import i from'@mui/material/Box';import {styled,Box}from'@mui/material';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var h=styled(Box)(()=>({display:"flex",alignItems:"center",justifyContent:"center",borderRadius:12,border:"1.03px solid"})),c=styled(Box)`
2
2
  position: absolute;
3
3
  `;function d({mainIcon:B,overlayIcon:p$1,mainIconAlt:u="main icon",mainIconSize:t=20,containerSize:a=24,overlayPosition:b={top:10,left:17},borderColor:w="#F2F2F2",label:y="",sx:I,onError:W,containerSx:C}){let[e,s]=useState(true),F=yc(useId(),"icon-with-badge");return jsx(p,{title:y,children:jsx(i,{id:F,"data-testid":"IconWithBadge",display:"flex",alignItems:"center",gap:1,sx:{position:"relative",...C},children:jsxs(h,{style:{borderColor:w,width:a,height:a},children:[t&&e&&jsx(i,{width:t,height:t,children:e&&jsx(T,{variant:"circular",width:`${t}px`,height:`${t}px`})}),jsxs(Fragment,{children:[p$1&&jsx(c,{sx:b,children:p$1}),jsx(i,{width:t,height:t,component:"img",src:B||Bi,alt:u,sx:{borderRadius:"50%",objectFit:"scale-down",opacity:e?0:1,...I},onError:n=>{s(false),n.currentTarget.src=Bi,W?.(n);},onLoad:()=>{s(false);}})]})]})})})}var M=d;export{M as a};
@@ -1 +1 @@
1
- import {a}from'./chunk-WRR73LXR.js';import {memo}from'react';import r from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var d=styled(r)(({theme:o})=>({display:"flex",gap:o.spacing(1),insetInlineStart:o.spacing(1.25),zIndex:1}));styled(r)(({theme:o})=>({width:12,height:12,borderRadius:"50%",cursor:"pointer",backgroundColor:`${o.palette.grey[200]}14`,display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s ease-in-out",img:{opacity:"0",transition:"all 0.2s ease-in-out"},"&:active":{backgroundColor:`${o.palette.grey[200]} !important`}}));var l=styled(r)(({theme:o})=>({display:"flex",height:"2rem",justifyContent:"space-between",alignItems:"center",width:"100%",paddingLeft:o.spacing(1.25),paddingRight:o.spacing(1.25),"& > *":{flex:"1 1 0px;"}})),p=styled("div",{shouldForwardProp:o=>o!=="sandboxMode"&&o!=="maximized"&&o!=="isDragging"})(({maximized:o,isDragging:t})=>({...!o&&{borderTopRightRadius:12,borderTopLeftRadius:12},...t&&{cursor:"move"},margin:0})),H=styled(r,{shouldForwardProp:o=>o!=="maximized"&&o!=="isDragging"})(({isDragging:o})=>({...o&&{cursor:"move"},position:"relative",zIndex:1,margin:0})),s=styled(r,{shouldForwardProp:o=>o!=="maximized"&&o!=="isHovered"})(({theme:o,maximized:t})=>({height:32,position:"relative",display:"flex",width:"100%",justifyContent:"center",transition:"all 0.5s ease-in-out",borderTopLeftRadius:"12px",borderTopRightRadius:"12px",...t&&{display:"block !important",position:"fixed",right:0,left:0,zIndex:999,background:"transparent",".toolbar-wrapper":{display:"flex",justifyContent:"space-between",gap:10,alignItems:"center",position:"absolute",right:0,left:0,height:"2rem",".action-box":{visibility:"hidden"}},"&:hover":{".toolbar-wrapper":{top:0},".action-box":{visibility:"visible"}}},":hover":{".header-icon":{backgroundColor:`${o.palette.grey[200]}40`},".header-icon img":{opacity:1}}})),f=styled(p)(()=>({position:"sticky",top:0,left:0,right:0,zIndex:1e3,background:"#eaeaea",backdropFilter:"blur(32px)"}));function v({onMouseEnter:o,onMouseLeave:t,isMaximized:g,isHovered:x,children:w,rightActions:m,leftActions:a$1,title:b,icon:y,...u}){return jsx(s,{onMouseEnter:o,onMouseLeave:t,maximized:g,id:"toolbar","data-testid":"Toolbar",isHovered:x,...u,children:jsxs(l,{className:"toolbar-wrapper",children:[a$1?jsx(d,{className:"action-box",children:a$1}):jsx("div",{}),jsx(a,{title:b,icon:y}),m||jsx("div",{})]})})}var c=memo(v);var D=c;export{p as a,H as b,f as c,D as d};
1
+ import {a}from'./chunk-JZAU3E6K.js';import {memo}from'react';import r from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var d=styled(r)(({theme:o})=>({display:"flex",gap:o.spacing(1),insetInlineStart:o.spacing(1.25),zIndex:1}));styled(r)(({theme:o})=>({width:12,height:12,borderRadius:"50%",cursor:"pointer",backgroundColor:`${o.palette.grey[200]}14`,display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s ease-in-out",img:{opacity:"0",transition:"all 0.2s ease-in-out"},"&:active":{backgroundColor:`${o.palette.grey[200]} !important`}}));var l=styled(r)(({theme:o})=>({display:"flex",height:"2rem",justifyContent:"space-between",alignItems:"center",width:"100%",paddingLeft:o.spacing(1.25),paddingRight:o.spacing(1.25),"& > *":{flex:"1 1 0px;"}})),p=styled("div",{shouldForwardProp:o=>o!=="sandboxMode"&&o!=="maximized"&&o!=="isDragging"})(({maximized:o,isDragging:t})=>({...!o&&{borderTopRightRadius:12,borderTopLeftRadius:12},...t&&{cursor:"move"},margin:0})),H=styled(r,{shouldForwardProp:o=>o!=="maximized"&&o!=="isDragging"})(({isDragging:o})=>({...o&&{cursor:"move"},position:"relative",zIndex:1,margin:0})),s=styled(r,{shouldForwardProp:o=>o!=="maximized"&&o!=="isHovered"})(({theme:o,maximized:t})=>({height:32,position:"relative",display:"flex",width:"100%",justifyContent:"center",transition:"all 0.5s ease-in-out",borderTopLeftRadius:"12px",borderTopRightRadius:"12px",...t&&{display:"block !important",position:"fixed",right:0,left:0,zIndex:999,background:"transparent",".toolbar-wrapper":{display:"flex",justifyContent:"space-between",gap:10,alignItems:"center",position:"absolute",right:0,left:0,height:"2rem",".action-box":{visibility:"hidden"}},"&:hover":{".toolbar-wrapper":{top:0},".action-box":{visibility:"visible"}}},":hover":{".header-icon":{backgroundColor:`${o.palette.grey[200]}40`},".header-icon img":{opacity:1}}})),f=styled(p)(()=>({position:"sticky",top:0,left:0,right:0,zIndex:1e3,background:"#eaeaea",backdropFilter:"blur(32px)"}));function v({onMouseEnter:o,onMouseLeave:t,isMaximized:g,isHovered:x,children:w,rightActions:m,leftActions:a$1,title:b,icon:y,...u}){return jsx(s,{onMouseEnter:o,onMouseLeave:t,maximized:g,id:"toolbar","data-testid":"Toolbar",isHovered:x,...u,children:jsxs(l,{className:"toolbar-wrapper",children:[a$1?jsx(d,{className:"action-box",children:a$1}):jsx("div",{}),jsx(a,{title:b,icon:y}),m||jsx("div",{})]})})}var c=memo(v);var D=c;export{p as a,H as b,f as c,D as d};
@@ -1 +1 @@
1
- import {a as a$2}from'./chunk-SSBDL6XS.js';import {a}from'./chunk-EN3RBDWB.js';import {a as a$1}from'./chunk-P2VRYOKF.js';import {j as j$1,f}from'./chunk-7PJX5ZKM.js';import {vb,Eb,A,Cb,Pc}from'./chunk-OK75VWGZ.js';import me,{useState,useRef,useMemo}from'react';import {Box,CircularProgress,Typography}from'@mui/material';import xe from'@mui/material/ClickAwayListener';import h from'@mui/material/Box';import le from'@mui/material/Input';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';styled(j$1)(({theme:e})=>({fontSize:"10px",color:e.v2.palette.grey[500],fontWeight:600,lineHeight:"10px"}));styled(j$1)(({theme:e})=>({fontSize:"11px",color:e.v2.palette.base.black,fontWeight:600,lineHeight:"14.3px",width:200}));styled(h)(()=>({display:"flex",flexDirection:"column",maxHeight:400,overflow:"auto",gap:"8px"}));var H=styled(le)(({theme:e})=>({width:"inherit",height:32,padding:"11px 12px",fontSize:"10px",borderRadius:"5px",backgroundColor:"#F9F9F9",border:"1px solid transparent","&.Mui-focused":{borderColor:e.palette.info.dark}}));styled(f)({padding:0,width:12,height:12,".MuiSvgIcon-root, img":{width:12,height:12}});var D=styled(h)(()=>({display:"flex",flexDirection:"column",gap:"8px",padding:"4px"})),I=styled(h)(()=>({display:"flex",gap:"8px",padding:"4px",flexWrap:"wrap",paddingInlineEnd:"20px"})),M=styled(h)(({theme:e,maxWidth:o})=>({display:"flex",padding:"4px 8px 4px 6px",alignItems:"center",gap:"4px",borderRadius:"13px",backgroundColor:`${e.palette.info.dark}1a`,fontSize:"10px",fontWeight:500,cursor:"pointer",...o&&{maxWidth:`${o}%`}}));styled(j$1)(()=>({display:"flex",gap:"8px",alignItems:"center",fontSize:"10px",fontWeight:500,color:"#000",cursor:"pointer",padding:8}));var N=styled(h)(({theme:e})=>({width:"100%",flexDirection:"column",border:`1px solid ${e.palette.grey[100]}`,borderRadius:"4px",backgroundColor:e.palette.grey[400],minWidth:"89px",position:"relative"})),z=styled(h)(()=>({position:"absolute",right:8,bottom:13.5,width:15,height:15}));var R=e=>e.length===0?true:"value"in e[0],$=(e,o,p)=>o?e.filter(r=>p.some(a=>r?.[a]?.toLowerCase().includes(o.toLowerCase()))):e,G=(e,o,p)=>e.map(r=>{let a=r?.options.map(l=>{let S=l?.options?.filter(n=>p.some(d=>n?.[d]?.toLowerCase().includes(o.toLowerCase())));return {...l,options:S}}).filter(l=>l?.options?.length>0);return {...r,options:a}}).filter(r=>r?.options?.length>0);function X({childOption:e,selectedOptions:o,onChangeOptions:p}){let[r,a$2]=useState(null),l=n=>{p([...o||[],n]);},S=n=>{p(o?.filter(d=>d.value!==n.value)||[]);};return jsxs(a,{onMouseEnter:n=>{e.options?.length>0&&a$2(n.currentTarget);},onMouseLeave:()=>{r&&a$2(null);},children:[jsxs(Box,{sx:{display:"flex",gap:"12px",justifyContent:"space-between",flexGrow:1,alignItems:"center",maxWidth:"220px",minWidth:"89px"},children:[e.label,jsx("img",{src:vb,className:"arrow-icon",alt:"arrow"})]}),jsx(a$1,{sx:{maxHeight:"450px",overflow:"auto"},open:!!r,anchorEl:r,placement:"right-start",children:e.options?.map(n=>{let w=!!o?.find(s=>s.value===n.value);return jsx(a,{isSelected:w,onClick:s=>{s.stopPropagation(),s.preventDefault(),w?S(n):l(n);},children:jsx(Box,{sx:{flex:1,maxWidth:"220px",minWidth:"89px"},children:n.label})},n.value)})})]})}function J({parentOption:e,selectedOptions:o,onChangeOptions:p}){let[r,a$2]=useState(null);return jsxs(a,{onMouseEnter:l=>{e.options?.length>0&&a$2(l.currentTarget);},onMouseLeave:()=>{r&&a$2(null);},children:[jsxs(Box,{sx:{display:"flex",gap:"12px",justifyContent:"space-between",flexGrow:1,alignItems:"center",maxWidth:"340px",minWidth:"89px"},children:[e.label,jsx("img",{src:vb,className:"arrow-icon",alt:"arrow"})]}),jsx(a$1,{sx:{maxHeight:"450px",overflow:"auto"},open:!!r,anchorEl:r,placement:"right-start",children:e.options?.map(l=>jsx(X,{childOption:l,selectedOptions:o,onChangeOptions:p},l.label))})]})}function Q({option:e,selectedOptions:o,onChangeOptions:p}){let r=o?.some(a=>a.value===e.value)??false;return jsx(a,{isSelected:r,onClick:a=>{if(a.stopPropagation(),a.preventDefault(),r){p(o?.filter(l=>l.value!==e.value)||[]);return}p([...o||[],e]);},children:jsx(Box,{sx:{flex:1,maxWidth:"220px",minWidth:"89px"},children:e.label})})}function ge({options:e,onChangeOptions:o,selectedOptions:p,placeholder:r,isLoading:a,searchBy:l=["label"],disabled:S}){let n=R(e),[d,w]=useState(null),[s,E]=useState(""),ee=useRef(null),b=!!d,te=t=>{w(b?null:t.currentTarget);},oe=()=>{w(null);},re=()=>{s&&E("");},T=useMemo(()=>{if(n)return $(e,s,l)},[n,e,s,l]),F=useMemo(()=>{if(!n)return s?G(e,s,l):e},[n,e,s,l]),ne=!!(n?T:F)?.length,ie=a?jsx(CircularProgress,{size:16}):jsx(a$2,{src:s?Eb:A,alt:s?"close":"search",onClick:re,sx:{width:12,height:12}}),f=Number(p?.length??0);return jsx(xe,{onClickAway:()=>{b&&oe();},children:jsxs(N,{id:"TriggerWrapper","data-testid":"MultiSelectWithSearch",onClick:t=>!S&&te(t),ref:ee,children:[jsx(Typography,{color:"grey",sx:{cursor:"pointer",fontSize:"10px",padding:"4px"},component:"label",children:r}),f===0&&jsx(Typography,{sx:{fontWeight:500,fontSize:"11px",padding:"0px 4px 4px"},component:"p",children:"Please Select"}),jsx(z,{component:"img",src:Cb,alt:"down arrow",sx:{...b&&{transform:"rotate(180deg)"}}}),!!f&&jsx(I,{id:"SelectedBadgesWrapper",children:f>0&&f<=2?p?.map(t=>jsxs(M,{maxWidth:90,children:[jsx(a$2,{src:Pc,alt:"blue-check",sx:{width:10,height:7.5}}),jsx("span",{children:t.label})]},t.value)):f>2&&p?.slice(0,2)?.map((t,v)=>jsxs(me.Fragment,{children:[jsxs(M,{maxWidth:90,children:[jsx(a$2,{src:Pc,alt:"blue-check",sx:{width:10,height:7.5}}),jsx("span",{children:t.label})]}),v===1&&jsx(M,{maxWidth:90,children:jsxs("span",{children:["+",f-2]})})]},t.value))}),jsx(a$1,{open:b,anchorEl:d,sx:{margin:"8px 0",maxHeight:330,overflow:"auto",maxWidth:"340px"},children:jsxs(D,{children:[jsx(H,{placeholder:r||"Select",endAdornment:ie,onClick:t=>{t.stopPropagation();},value:s,onChange:t=>{E(t.target.value);},disableUnderline:true,sx:{cursor:"default",width:"100%",backgroundColor:"white",border:"1px solid #F2F2F2",...ne&&{marginBottom:"4px"},...s&&{cursor:"pointer"}}}),jsx(I,{children:p?.map(t=>jsxs(M,{sx:{maxWidth:"150px"},onClick:v=>{v.stopPropagation(),v.preventDefault(),o(p?.filter(pe=>pe.value!==t.value)||[]);},children:[jsx(a$2,{src:Pc,alt:"blue-check",sx:{width:10,height:7.5}}),jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.label}),jsx(a$2,{src:Eb,alt:"close",sx:{width:9,height:9}})]},t.value))}),n?T?.map(t=>jsx(Q,{option:t,selectedOptions:p,onChangeOptions:o},t.value)):F?.map(t=>jsx(J,{parentOption:t,selectedOptions:p,onChangeOptions:o},t.label))]})})]})})}var j=ge;var at=j;export{X as a,J as b,Q as c,at as d};
1
+ import {a as a$2}from'./chunk-SSBDL6XS.js';import {a}from'./chunk-2ZSUWCWJ.js';import {a as a$1}from'./chunk-P2VRYOKF.js';import {j as j$1,f}from'./chunk-IBBWXV4R.js';import {vb,Eb,A,Cb,Pc}from'./chunk-OK75VWGZ.js';import me,{useState,useRef,useMemo}from'react';import {Box,CircularProgress,Typography}from'@mui/material';import xe from'@mui/material/ClickAwayListener';import h from'@mui/material/Box';import le from'@mui/material/Input';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';styled(j$1)(({theme:e})=>({fontSize:"10px",color:e.v2.palette.grey[500],fontWeight:600,lineHeight:"10px"}));styled(j$1)(({theme:e})=>({fontSize:"11px",color:e.v2.palette.base.black,fontWeight:600,lineHeight:"14.3px",width:200}));styled(h)(()=>({display:"flex",flexDirection:"column",maxHeight:400,overflow:"auto",gap:"8px"}));var H=styled(le)(({theme:e})=>({width:"inherit",height:32,padding:"11px 12px",fontSize:"10px",borderRadius:"5px",backgroundColor:"#F9F9F9",border:"1px solid transparent","&.Mui-focused":{borderColor:e.palette.info.dark}}));styled(f)({padding:0,width:12,height:12,".MuiSvgIcon-root, img":{width:12,height:12}});var D=styled(h)(()=>({display:"flex",flexDirection:"column",gap:"8px",padding:"4px"})),I=styled(h)(()=>({display:"flex",gap:"8px",padding:"4px",flexWrap:"wrap",paddingInlineEnd:"20px"})),M=styled(h)(({theme:e,maxWidth:o})=>({display:"flex",padding:"4px 8px 4px 6px",alignItems:"center",gap:"4px",borderRadius:"13px",backgroundColor:`${e.palette.info.dark}1a`,fontSize:"10px",fontWeight:500,cursor:"pointer",...o&&{maxWidth:`${o}%`}}));styled(j$1)(()=>({display:"flex",gap:"8px",alignItems:"center",fontSize:"10px",fontWeight:500,color:"#000",cursor:"pointer",padding:8}));var N=styled(h)(({theme:e})=>({width:"100%",flexDirection:"column",border:`1px solid ${e.palette.grey[100]}`,borderRadius:"4px",backgroundColor:e.palette.grey[400],minWidth:"89px",position:"relative"})),z=styled(h)(()=>({position:"absolute",right:8,bottom:13.5,width:15,height:15}));var R=e=>e.length===0?true:"value"in e[0],$=(e,o,p)=>o?e.filter(r=>p.some(a=>r?.[a]?.toLowerCase().includes(o.toLowerCase()))):e,G=(e,o,p)=>e.map(r=>{let a=r?.options.map(l=>{let S=l?.options?.filter(n=>p.some(d=>n?.[d]?.toLowerCase().includes(o.toLowerCase())));return {...l,options:S}}).filter(l=>l?.options?.length>0);return {...r,options:a}}).filter(r=>r?.options?.length>0);function X({childOption:e,selectedOptions:o,onChangeOptions:p}){let[r,a$2]=useState(null),l=n=>{p([...o||[],n]);},S=n=>{p(o?.filter(d=>d.value!==n.value)||[]);};return jsxs(a,{onMouseEnter:n=>{e.options?.length>0&&a$2(n.currentTarget);},onMouseLeave:()=>{r&&a$2(null);},children:[jsxs(Box,{sx:{display:"flex",gap:"12px",justifyContent:"space-between",flexGrow:1,alignItems:"center",maxWidth:"220px",minWidth:"89px"},children:[e.label,jsx("img",{src:vb,className:"arrow-icon",alt:"arrow"})]}),jsx(a$1,{sx:{maxHeight:"450px",overflow:"auto"},open:!!r,anchorEl:r,placement:"right-start",children:e.options?.map(n=>{let w=!!o?.find(s=>s.value===n.value);return jsx(a,{isSelected:w,onClick:s=>{s.stopPropagation(),s.preventDefault(),w?S(n):l(n);},children:jsx(Box,{sx:{flex:1,maxWidth:"220px",minWidth:"89px"},children:n.label})},n.value)})})]})}function J({parentOption:e,selectedOptions:o,onChangeOptions:p}){let[r,a$2]=useState(null);return jsxs(a,{onMouseEnter:l=>{e.options?.length>0&&a$2(l.currentTarget);},onMouseLeave:()=>{r&&a$2(null);},children:[jsxs(Box,{sx:{display:"flex",gap:"12px",justifyContent:"space-between",flexGrow:1,alignItems:"center",maxWidth:"340px",minWidth:"89px"},children:[e.label,jsx("img",{src:vb,className:"arrow-icon",alt:"arrow"})]}),jsx(a$1,{sx:{maxHeight:"450px",overflow:"auto"},open:!!r,anchorEl:r,placement:"right-start",children:e.options?.map(l=>jsx(X,{childOption:l,selectedOptions:o,onChangeOptions:p},l.label))})]})}function Q({option:e,selectedOptions:o,onChangeOptions:p}){let r=o?.some(a=>a.value===e.value)??false;return jsx(a,{isSelected:r,onClick:a=>{if(a.stopPropagation(),a.preventDefault(),r){p(o?.filter(l=>l.value!==e.value)||[]);return}p([...o||[],e]);},children:jsx(Box,{sx:{flex:1,maxWidth:"220px",minWidth:"89px"},children:e.label})})}function ge({options:e,onChangeOptions:o,selectedOptions:p,placeholder:r,isLoading:a,searchBy:l=["label"],disabled:S}){let n=R(e),[d,w]=useState(null),[s,E]=useState(""),ee=useRef(null),b=!!d,te=t=>{w(b?null:t.currentTarget);},oe=()=>{w(null);},re=()=>{s&&E("");},T=useMemo(()=>{if(n)return $(e,s,l)},[n,e,s,l]),F=useMemo(()=>{if(!n)return s?G(e,s,l):e},[n,e,s,l]),ne=!!(n?T:F)?.length,ie=a?jsx(CircularProgress,{size:16}):jsx(a$2,{src:s?Eb:A,alt:s?"close":"search",onClick:re,sx:{width:12,height:12}}),f=Number(p?.length??0);return jsx(xe,{onClickAway:()=>{b&&oe();},children:jsxs(N,{id:"TriggerWrapper","data-testid":"MultiSelectWithSearch",onClick:t=>!S&&te(t),ref:ee,children:[jsx(Typography,{color:"grey",sx:{cursor:"pointer",fontSize:"10px",padding:"4px"},component:"label",children:r}),f===0&&jsx(Typography,{sx:{fontWeight:500,fontSize:"11px",padding:"0px 4px 4px"},component:"p",children:"Please Select"}),jsx(z,{component:"img",src:Cb,alt:"down arrow",sx:{...b&&{transform:"rotate(180deg)"}}}),!!f&&jsx(I,{id:"SelectedBadgesWrapper",children:f>0&&f<=2?p?.map(t=>jsxs(M,{maxWidth:90,children:[jsx(a$2,{src:Pc,alt:"blue-check",sx:{width:10,height:7.5}}),jsx("span",{children:t.label})]},t.value)):f>2&&p?.slice(0,2)?.map((t,v)=>jsxs(me.Fragment,{children:[jsxs(M,{maxWidth:90,children:[jsx(a$2,{src:Pc,alt:"blue-check",sx:{width:10,height:7.5}}),jsx("span",{children:t.label})]}),v===1&&jsx(M,{maxWidth:90,children:jsxs("span",{children:["+",f-2]})})]},t.value))}),jsx(a$1,{open:b,anchorEl:d,sx:{margin:"8px 0",maxHeight:330,overflow:"auto",maxWidth:"340px"},children:jsxs(D,{children:[jsx(H,{placeholder:r||"Select",endAdornment:ie,onClick:t=>{t.stopPropagation();},value:s,onChange:t=>{E(t.target.value);},disableUnderline:true,sx:{cursor:"default",width:"100%",backgroundColor:"white",border:"1px solid #F2F2F2",...ne&&{marginBottom:"4px"},...s&&{cursor:"pointer"}}}),jsx(I,{children:p?.map(t=>jsxs(M,{sx:{maxWidth:"150px"},onClick:v=>{v.stopPropagation(),v.preventDefault(),o(p?.filter(pe=>pe.value!==t.value)||[]);},children:[jsx(a$2,{src:Pc,alt:"blue-check",sx:{width:10,height:7.5}}),jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.label}),jsx(a$2,{src:Eb,alt:"close",sx:{width:9,height:9}})]},t.value))}),n?T?.map(t=>jsx(Q,{option:t,selectedOptions:p,onChangeOptions:o},t.value)):F?.map(t=>jsx(J,{parentOption:t,selectedOptions:p,onChangeOptions:o},t.label))]})})]})})}var j=ge;var at=j;export{X as a,J as b,Q as c,at as d};
@@ -1 +1 @@
1
- import {j as j$1}from'./chunk-7PJX5ZKM.js';import {yc}from'./chunk-2SKLD6QR.js';import {memo,useId,useRef,useMemo}from'react';import v from'@mui/material/Box';import ro from'@mui/material/Popover';import {styled}from'@mui/material/styles';import L from'@mui/material/SvgIcon';import {jsx,jsxs}from'react/jsx-runtime';var P=styled(v,{shouldForwardProp:o=>o!=="open"&&o!=="disabled"})(({theme:o,open:r,disabled:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",borderRadius:"4px",background:"#ffffff",cursor:"pointer",position:"relative",maxWidth:"100%",...r&&{borderColor:o.palette.info.dark,background:o.palette.common.white},"& .SelectDropdown_trailing-icon":{color:o.palette.text.primary},"&.SelectDropdown-open":{"& .SelectDropdown_trailing-arrow":{color:o.palette.info.dark}},"&.SelectDropdown-disabled":{"& .SelectDropdown_trailing-icon":{color:o.palette.text.disabled}},...e&&{cursor:"not-allowed"}})),I=styled(v)(({theme:o})=>({padding:"4px",borderRadius:"4px",boxShadow:"-26px 156px 44px 0px rgba(0, 0, 0, 0.00), -17px 100px 41px 0px rgba(0, 0, 0, 0.01), -9px 56px 34px 0px rgba(0, 0, 0, 0.05), -4px 25px 25px 0px rgba(0, 0, 0, 0.09), -1px 6px 14px 0px rgba(0, 0, 0, 0.10), 0px 0px 0px 0px rgba(0, 0, 0, 0.10)",backgroundColor:o.palette.common.white,maxHeight:400,marginTop:"4px",width:"auto",overflow:"auto"}));styled(j$1)(({selected:o})=>({display:"flex",gap:"8px",alignItems:"center",fontSize:"10px",fontWeight:500,color:"#000",cursor:"pointer",padding:8,justifyContent:"space-between",...o&&{backgroundColor:"#F8F8F8"}}));var D=jsx("path",{d:"M7.30267 0.117188C7.38054 0.115307 7.45644 0.138248 7.52045 0.182617C7.58449 0.227088 7.63367 0.290458 7.66205 0.363281C7.6904 0.436073 7.69755 0.516047 7.68256 0.592773C7.66771 0.668745 7.63063 0.738375 7.57709 0.793945L4.17279 4.43164C4.10249 4.50662 4.00517 4.55078 3.90228 4.55078C3.79958 4.55064 3.70294 4.5065 3.63275 4.43164L0.227478 0.794922L0.228455 0.793945C0.175738 0.738766 0.139787 0.669812 0.124939 0.594727C0.110049 0.519097 0.116214 0.440194 0.143494 0.368164C0.170896 0.296002 0.218691 0.232474 0.281189 0.1875C0.343697 0.14262 0.418101 0.11821 0.495056 0.118164C0.54684 0.118166 0.598245 0.12907 0.645447 0.150391C0.691771 0.171346 0.733033 0.201824 0.767517 0.239258L3.90228 3.58691L7.03705 0.239258C7.10541 0.164191 7.20102 0.119752 7.30267 0.117188Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.233333"}),y={down:0,up:180,left:90,right:-90},Z=["down","up"],j="cubic-bezier(0.4, 0, 0.2, 1)";function q({direction:o="down",size:r=8,transitionEffect:e="rotation",transitionDurationMs:t=200,sx:n,className:p,...d}){let i=typeof r=="number"?r*5/8:"auto",m=e==="none"?"none":`opacity ${t}ms ease-in-out`,g=e==="none"?"none":`transform ${t}ms ${j}`,a=`${p??""} MUISvgIcon__trailing-arrow-icon`;return e==="fade"?jsx(L,{viewBox:"0 0 8 5",inheritViewBox:true,sx:{width:r,height:i,color:"inherit",position:"relative",overflow:"visible",...n},className:a,...d,children:Z.map(s=>jsx("g",{transform:`rotate(${y[s]} 4 2.5)`,style:{opacity:o===s?1:0,transition:m,pointerEvents:"none"},children:D},s))}):jsx(L,{viewBox:"0 0 8 5",inheritViewBox:true,sx:{width:r,height:i,color:"text.primary",transform:`rotate(${y[o]}deg)`,transformOrigin:"50% 50%",transition:g,...n},className:a,...d,children:D})}var T=q;var K="M0.110352 0.700684C0.107667 0.584484 0.13977 0.470009 0.203125 0.372559C0.266534 0.275041 0.358424 0.199466 0.46582 0.154785C0.573201 0.110137 0.691824 0.0987907 0.805664 0.122559C0.919306 0.146383 1.02308 0.203847 1.10352 0.287598L1.10547 0.289551L3.59766 2.78076L3.6748 2.85889L3.75293 2.78076L6.24512 0.289551L6.24609 0.287598C6.29924 0.23225 6.36317 0.188178 6.43359 0.157715C6.50408 0.12725 6.58044 0.110644 6.65723 0.109863C6.73385 0.109132 6.80991 0.123886 6.88086 0.152832C6.95193 0.18185 7.017 0.22453 7.07129 0.278809C7.12559 0.333107 7.16824 0.398144 7.19727 0.469238C7.22623 0.540187 7.24095 0.616243 7.24023 0.692871C7.23945 0.769659 7.22285 0.846017 7.19238 0.916504C7.1771 0.951852 7.1586 0.985627 7.13672 1.01709L7.0625 1.104L7.06055 1.10498L4.56934 3.59717L4.49121 3.67529L7.0625 6.24658C7.11787 6.29976 7.16193 6.36362 7.19238 6.43408C7.22278 6.50446 7.23942 6.58008 7.24023 6.65674C7.24101 6.73353 7.22629 6.81025 7.19727 6.88135C7.16829 6.95222 7.12539 7.01662 7.07129 7.0708C7.01702 7.12507 6.95191 7.16775 6.88086 7.19678C6.80988 7.22576 6.73389 7.24048 6.65723 7.23975C6.58044 7.23897 6.50408 7.22334 6.43359 7.19287C6.36315 7.16242 6.29925 7.11834 6.24609 7.06299L6.24512 7.06104L3.75293 4.56885L3.6748 4.4917L1.10449 7.06201L1.04004 7.11865C0.972059 7.17051 0.89296 7.20736 0.808594 7.2251C0.696438 7.24861 0.579855 7.23782 0.473633 7.19482C0.367223 7.15166 0.275113 7.07813 0.210938 6.98291C0.146759 6.88765 0.113309 6.77453 0.113281 6.65967C0.113345 6.5826 0.128185 6.50605 0.158203 6.43506C0.188279 6.36398 0.232716 6.29937 0.288086 6.24561L0.289063 6.24463L2.78125 3.75342L2.85938 3.67529L0.289063 1.10498L0.287109 1.104C0.17719 0.998435 0.11395 0.853049 0.110352 0.700684Z";function Q({size:o=8,strokeColor:r="white",strokeWidthSvg:e=.22006,sx:t,className:n,...p}){return jsx(L,{viewBox:"0 0 8 8",inheritViewBox:true,sx:{width:o,height:o,color:"inherit",...t},className:`${n??""} MUISvgIcon__trailing-close-icon`,...p,children:jsx("path",{d:K,fill:"currentColor",stroke:r,strokeWidth:e})})}var N=Q;function to(o){let{onClose:r,open:e,anchorEl:t,trigger:n,onOpen:p,children:d,disabled:i,listWrapperSx:m,hideArrow:g,onClear:a,hasValue:s,className:u,slotProps:A,...R}=o,E=yc(useId(),"select-dropdown"),f=a&&s,w=useRef(void 0);e&&t&&t.clientWidth>0&&(w.current=t.clientWidth);let M=w.current,{listWrapper:O,popover:H}=A??{},{slotProps:$,...V}=H??{},{paper:F,...z}=$??{},l=F,G={...l,sx:[{width:M??t?.clientWidth,maxWidth:"unset",boxSizing:"border-box"},...l?.sx?Array.isArray(l.sx)?l.sx:[l.sx]:[]]},U=useMemo(()=>["SelectDropdown",e&&"SelectDropdown-open",i&&"SelectDropdown-disabled",u].filter(Boolean).join(" "),[u,e,i]);return jsxs(P,{id:E,open:e,onClick:p,"data-testid":"SelectDropdown",disabled:i,className:U,...R,children:[jsx(v,{className:"SelectDropdown_trigger",sx:{flex:1,cursor:"pointer"},children:n}),jsxs(v,{width:16,height:16,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",right:8,className:"SelectDropdown_trailing-icon",role:"button",...f&&{sx:{cursor:"pointer"},onClick:h=>{h.stopPropagation(),h.preventDefault(),a();}},children:[!g&&!f&&jsx(T,{className:"SelectDropdown_trailing-arrow",direction:e?"up":"down",transitionEffect:"fade"}),f&&jsx(N,{className:"SelectDropdown_trailing-close"})]}),jsx(ro,{open:e,anchorEl:t,onClose:r,anchorOrigin:{vertical:"bottom",horizontal:"left"},...V,slotProps:{...z,paper:G},children:jsx(I,{className:"SelectDropdown_list-wrapper",sx:m,...O,children:d})})]})}var _=memo(to);var _o=_;export{_o as a};
1
+ import {j as j$1}from'./chunk-IBBWXV4R.js';import {yc}from'./chunk-2SKLD6QR.js';import {memo,useId,useRef,useMemo}from'react';import v from'@mui/material/Box';import ro from'@mui/material/Popover';import {styled}from'@mui/material/styles';import L from'@mui/material/SvgIcon';import {jsx,jsxs}from'react/jsx-runtime';var P=styled(v,{shouldForwardProp:o=>o!=="open"&&o!=="disabled"})(({theme:o,open:r,disabled:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",borderRadius:"4px",background:"#ffffff",cursor:"pointer",position:"relative",maxWidth:"100%",...r&&{borderColor:o.palette.info.dark,background:o.palette.common.white},"& .SelectDropdown_trailing-icon":{color:o.palette.text.primary},"&.SelectDropdown-open":{"& .SelectDropdown_trailing-arrow":{color:o.palette.info.dark}},"&.SelectDropdown-disabled":{"& .SelectDropdown_trailing-icon":{color:o.palette.text.disabled}},...e&&{cursor:"not-allowed"}})),I=styled(v)(({theme:o})=>({padding:"4px",borderRadius:"4px",boxShadow:"-26px 156px 44px 0px rgba(0, 0, 0, 0.00), -17px 100px 41px 0px rgba(0, 0, 0, 0.01), -9px 56px 34px 0px rgba(0, 0, 0, 0.05), -4px 25px 25px 0px rgba(0, 0, 0, 0.09), -1px 6px 14px 0px rgba(0, 0, 0, 0.10), 0px 0px 0px 0px rgba(0, 0, 0, 0.10)",backgroundColor:o.palette.common.white,maxHeight:400,marginTop:"4px",width:"auto",overflow:"auto"}));styled(j$1)(({selected:o})=>({display:"flex",gap:"8px",alignItems:"center",fontSize:"10px",fontWeight:500,color:"#000",cursor:"pointer",padding:8,justifyContent:"space-between",...o&&{backgroundColor:"#F8F8F8"}}));var D=jsx("path",{d:"M7.30267 0.117188C7.38054 0.115307 7.45644 0.138248 7.52045 0.182617C7.58449 0.227088 7.63367 0.290458 7.66205 0.363281C7.6904 0.436073 7.69755 0.516047 7.68256 0.592773C7.66771 0.668745 7.63063 0.738375 7.57709 0.793945L4.17279 4.43164C4.10249 4.50662 4.00517 4.55078 3.90228 4.55078C3.79958 4.55064 3.70294 4.5065 3.63275 4.43164L0.227478 0.794922L0.228455 0.793945C0.175738 0.738766 0.139787 0.669812 0.124939 0.594727C0.110049 0.519097 0.116214 0.440194 0.143494 0.368164C0.170896 0.296002 0.218691 0.232474 0.281189 0.1875C0.343697 0.14262 0.418101 0.11821 0.495056 0.118164C0.54684 0.118166 0.598245 0.12907 0.645447 0.150391C0.691771 0.171346 0.733033 0.201824 0.767517 0.239258L3.90228 3.58691L7.03705 0.239258C7.10541 0.164191 7.20102 0.119752 7.30267 0.117188Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.233333"}),y={down:0,up:180,left:90,right:-90},Z=["down","up"],j="cubic-bezier(0.4, 0, 0.2, 1)";function q({direction:o="down",size:r=8,transitionEffect:e="rotation",transitionDurationMs:t=200,sx:n,className:p,...d}){let i=typeof r=="number"?r*5/8:"auto",m=e==="none"?"none":`opacity ${t}ms ease-in-out`,g=e==="none"?"none":`transform ${t}ms ${j}`,a=`${p??""} MUISvgIcon__trailing-arrow-icon`;return e==="fade"?jsx(L,{viewBox:"0 0 8 5",inheritViewBox:true,sx:{width:r,height:i,color:"inherit",position:"relative",overflow:"visible",...n},className:a,...d,children:Z.map(s=>jsx("g",{transform:`rotate(${y[s]} 4 2.5)`,style:{opacity:o===s?1:0,transition:m,pointerEvents:"none"},children:D},s))}):jsx(L,{viewBox:"0 0 8 5",inheritViewBox:true,sx:{width:r,height:i,color:"text.primary",transform:`rotate(${y[o]}deg)`,transformOrigin:"50% 50%",transition:g,...n},className:a,...d,children:D})}var T=q;var K="M0.110352 0.700684C0.107667 0.584484 0.13977 0.470009 0.203125 0.372559C0.266534 0.275041 0.358424 0.199466 0.46582 0.154785C0.573201 0.110137 0.691824 0.0987907 0.805664 0.122559C0.919306 0.146383 1.02308 0.203847 1.10352 0.287598L1.10547 0.289551L3.59766 2.78076L3.6748 2.85889L3.75293 2.78076L6.24512 0.289551L6.24609 0.287598C6.29924 0.23225 6.36317 0.188178 6.43359 0.157715C6.50408 0.12725 6.58044 0.110644 6.65723 0.109863C6.73385 0.109132 6.80991 0.123886 6.88086 0.152832C6.95193 0.18185 7.017 0.22453 7.07129 0.278809C7.12559 0.333107 7.16824 0.398144 7.19727 0.469238C7.22623 0.540187 7.24095 0.616243 7.24023 0.692871C7.23945 0.769659 7.22285 0.846017 7.19238 0.916504C7.1771 0.951852 7.1586 0.985627 7.13672 1.01709L7.0625 1.104L7.06055 1.10498L4.56934 3.59717L4.49121 3.67529L7.0625 6.24658C7.11787 6.29976 7.16193 6.36362 7.19238 6.43408C7.22278 6.50446 7.23942 6.58008 7.24023 6.65674C7.24101 6.73353 7.22629 6.81025 7.19727 6.88135C7.16829 6.95222 7.12539 7.01662 7.07129 7.0708C7.01702 7.12507 6.95191 7.16775 6.88086 7.19678C6.80988 7.22576 6.73389 7.24048 6.65723 7.23975C6.58044 7.23897 6.50408 7.22334 6.43359 7.19287C6.36315 7.16242 6.29925 7.11834 6.24609 7.06299L6.24512 7.06104L3.75293 4.56885L3.6748 4.4917L1.10449 7.06201L1.04004 7.11865C0.972059 7.17051 0.89296 7.20736 0.808594 7.2251C0.696438 7.24861 0.579855 7.23782 0.473633 7.19482C0.367223 7.15166 0.275113 7.07813 0.210938 6.98291C0.146759 6.88765 0.113309 6.77453 0.113281 6.65967C0.113345 6.5826 0.128185 6.50605 0.158203 6.43506C0.188279 6.36398 0.232716 6.29937 0.288086 6.24561L0.289063 6.24463L2.78125 3.75342L2.85938 3.67529L0.289063 1.10498L0.287109 1.104C0.17719 0.998435 0.11395 0.853049 0.110352 0.700684Z";function Q({size:o=8,strokeColor:r="white",strokeWidthSvg:e=.22006,sx:t,className:n,...p}){return jsx(L,{viewBox:"0 0 8 8",inheritViewBox:true,sx:{width:o,height:o,color:"inherit",...t},className:`${n??""} MUISvgIcon__trailing-close-icon`,...p,children:jsx("path",{d:K,fill:"currentColor",stroke:r,strokeWidth:e})})}var N=Q;function to(o){let{onClose:r,open:e,anchorEl:t,trigger:n,onOpen:p,children:d,disabled:i,listWrapperSx:m,hideArrow:g,onClear:a,hasValue:s,className:u,slotProps:A,...R}=o,E=yc(useId(),"select-dropdown"),f=a&&s,w=useRef(void 0);e&&t&&t.clientWidth>0&&(w.current=t.clientWidth);let M=w.current,{listWrapper:O,popover:H}=A??{},{slotProps:$,...V}=H??{},{paper:F,...z}=$??{},l=F,G={...l,sx:[{width:M??t?.clientWidth,maxWidth:"unset",boxSizing:"border-box"},...l?.sx?Array.isArray(l.sx)?l.sx:[l.sx]:[]]},U=useMemo(()=>["SelectDropdown",e&&"SelectDropdown-open",i&&"SelectDropdown-disabled",u].filter(Boolean).join(" "),[u,e,i]);return jsxs(P,{id:E,open:e,onClick:p,"data-testid":"SelectDropdown",disabled:i,className:U,...R,children:[jsx(v,{className:"SelectDropdown_trigger",sx:{flex:1,cursor:"pointer"},children:n}),jsxs(v,{width:16,height:16,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",right:8,className:"SelectDropdown_trailing-icon",role:"button",...f&&{sx:{cursor:"pointer"},onClick:h=>{h.stopPropagation(),h.preventDefault(),a();}},children:[!g&&!f&&jsx(T,{className:"SelectDropdown_trailing-arrow",direction:e?"up":"down",transitionEffect:"fade"}),f&&jsx(N,{className:"SelectDropdown_trailing-close"})]}),jsx(ro,{open:e,anchorEl:t,onClose:r,anchorOrigin:{vertical:"bottom",horizontal:"left"},...V,slotProps:{...z,paper:G},children:jsx(I,{className:"SelectDropdown_list-wrapper",sx:m,...O,children:d})})]})}var _=memo(to);var _o=_;export{_o as a};
@@ -1 +1 @@
1
- import {a}from'./chunk-2RTUHSFA.js';import {a as a$1}from'./chunk-RIJFII4O.js';import {ba,ca}from'./chunk-7PJX5ZKM.js';import {yc,Ac}from'./chunk-2SKLD6QR.js';import {Pc,Cb,A}from'./chunk-OK75VWGZ.js';import qt,{useId,forwardRef,memo,useState,useCallback,useMemo,useEffect}from'react';import Le from'@mui/material/Box';import {styled}from'@mui/material/styles';import _t from'@mui/material/TextField';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import po from'@mui/material/InputLabel';import so from'@mui/material/MenuItem';import Jt from'@mui/material/SvgIcon';import eo from'@mui/material/IconButton';import Yt from'@mui/material/CircularProgress';import ro from'@mui/material/FormControl';import Ue from'@mui/material/Select';import Mo from'@mui/material/Skeleton';import {styled as styled$1,Popper,Box,ClickAwayListener}from'@mui/material';import Wo from'@mui/material/Input';var Ae=styled(Le)(()=>({display:"flex",flexDirection:"column",gap:"4px",width:"100%",minHeight:40,"& .MuiTextField-root":{flex:1,margin:"0 !important"}})),We=styled(_t,{shouldForwardProp:e=>!["hasError","feedbackType","hasFeedback","hideArrows","hasLabel"].includes(e)})(({theme:e,hasError:t,feedbackType:r,hasFeedback:n,hideArrows:g,hasLabel:l,disabled:s})=>{let{borderColor:u}=ba(e,r),a=n?"4px 4px 0 0":"4px",c=s?e.palette.grey[400]:e.palette.common.white,o=e.palette.divider;return r&&(o=u),t&&!r&&(o=e.palette.error.main),{border:`1px solid ${o}`,borderBottom:n?"none":void 0,borderRadius:a,...g&&{"& input[type=number]":{MozAppearance:"textfield"},"& input[type=number]::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:0},"& input[type=number]::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0}},"& .MuiFormLabel-asterisk":{color:"red"},"& .MuiInputLabel-root":{fontSize:"10px",fontWeight:500,lineHeight:"100%",transform:"translate(8px, 15px) scale(1)",color:`${e.palette.grey[700]} !important`,overflow:"visible"},"& .MuiInputLabel-root.MuiInputLabel-shrink, & .MuiInputLabel-root.Mui-focused":{transform:"translate(8px, 8px) scale(0.75)"},"& .MuiFilledInput-root":{maxHeight:"40px !important",height:"40px",overflow:"hidden",borderRadius:a,backgroundColor:c,paddingTop:l?"11px":"0px",paddingBottom:l?"4px":"0px",paddingLeft:"8px",boxSizing:"border-box",display:"inline-flex",alignItems:l?"stretch":"center","&:before, &:after":{display:"none"},"&:hover, &.Mui-focused, &.Mui-disabled":{backgroundColor:c}},"& .MuiFilledInput-input":{margin:0,padding:"0 !important",minHeight:0,height:"auto",boxSizing:"border-box",display:"flex",alignItems:l?"flex-end":"center",alignSelf:l?"flex-end":"center",fontSize:"11px",lineHeight:"11px",color:e.palette.text.primary,paddingBottom:l?"1px !important":"0 !important","&::placeholder":{color:e.palette.grey[500],opacity:1}}}}),He=styled("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"}));var Ne=qt.forwardRef(({name:e,onChange:t,hasError:r,helperText:n,hideArrows:g,feedback:l,InputProps:s,InputLabelProps:u,label:a,placeholder:c,...o},y)=>{let C=yc(useId(),"input-base"),I=x=>{t?.(x.target.value??"");},{isProvided:m,isVisible:b,type:p}=Ac(l),S=typeof a=="string"&&a.trim().length>0?a:void 0,v=S??c,f=S&&typeof c=="string"?c:void 0;return jsxs(Le,{children:[jsx(Ae,{id:C,"data-testid":"InputBase",children:jsx(We,{rows:1,hasError:!!r&&!m,hasFeedback:b,feedbackType:p,hasLabel:!!v,fullWidth:true,size:"small",variant:"filled",ref:y,name:e,type:o.type??"text",label:v,placeholder:f,onChange:I,InputLabelProps:u,InputProps:{disableUnderline:true,...s,sx:s?.sx},hideArrows:g,...o})}),m?jsx(ca,{...l}):null,!m&&n&&jsx(He,{children:n})]})});Ne.displayName="InputBase";var ze=Ne;var Kt=ze;var $e=forwardRef((e,t)=>jsx(Jt,{ref:t,viewBox:"0 0 8 8",fontSize:"small",...e,children:jsx("path",{d:"M6.63965 0.102539C6.75727 0.0997602 6.87304 0.133137 6.97168 0.197266C7.07023 0.261345 7.14718 0.353407 7.19238 0.461914C7.23757 0.570522 7.24961 0.690513 7.22559 0.805664C7.20154 0.920834 7.1425 1.02595 7.05762 1.10742L7.05664 1.10938L4.56738 3.59766L4.49512 3.66992L7.05762 6.23242C7.11359 6.28617 7.15865 6.35066 7.18945 6.42188C7.22023 6.49308 7.23648 6.5699 7.2373 6.64746C7.23809 6.72499 7.22359 6.80223 7.19434 6.87402C7.16499 6.9459 7.1213 7.0115 7.06641 7.06641C7.01149 7.12132 6.94592 7.16498 6.87402 7.19434C6.8022 7.22362 6.72502 7.23809 6.64746 7.2373C6.56987 7.23649 6.4931 7.22024 6.42188 7.18945C6.35064 7.15865 6.28618 7.1136 6.23242 7.05762L6.23145 7.05664L3.74219 4.56836L3.66992 4.49512L3.59766 4.56836L1.1084 7.05664L1.10742 7.05762C1.05365 7.11362 0.989227 7.15864 0.917969 7.18945C0.846721 7.22025 0.769997 7.2365 0.692383 7.2373C0.614798 7.23809 0.537661 7.22364 0.46582 7.19434C0.393921 7.16498 0.328351 7.12132 0.273438 7.06641C0.218559 7.01151 0.174849 6.94589 0.145508 6.87402C0.116258 6.80223 0.101751 6.72498 0.102539 6.64746C0.103364 6.5699 0.119618 6.49308 0.150391 6.42188C0.181198 6.35065 0.226245 6.28617 0.282227 6.23242L2.84473 3.66992L2.77246 3.59766L0.283203 1.10938L0.282227 1.1084L0.224609 1.04297C0.172384 0.974382 0.136093 0.894624 0.118164 0.80957C0.0942576 0.695891 0.104774 0.577375 0.148438 0.469727C0.192107 0.362124 0.266971 0.269962 0.363281 0.205078C0.459591 0.140238 0.573348 0.105497 0.689453 0.105469C0.767281 0.105527 0.844313 0.121103 0.916016 0.151367C0.987801 0.181723 1.05308 0.226359 1.10742 0.282227L3.66992 2.84473L6.23242 0.282227C6.33914 0.171037 6.48558 0.106239 6.63965 0.102539Z",fill:"#20232B",stroke:"white",strokeWidth:.20511})}));$e.displayName="DefaultClearIcon";var z=$e;var _e=forwardRef((e,t)=>jsx(Jt,{ref:t,viewBox:"0 0 8 5",fill:"none",fontSize:"small",sx:{width:8,height:5},...e,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})}));_e.displayName="DefaultSelectIcon";var qe=_e;function ke({size:e=20,color:t="grey.A400",...r}){return jsx(Yt,{size:e,sx:{backgroundColor:"transparent",color:t},...r})}function K({endAdornmentProp:e,isLoading:t,showClear:r,showMenuArrow:n,menuOpen:g,IconComponent:l,ClearIconComponent:s=z,onClear:u,onClearDefault:a}){return !(e||r||t||n)?null:jsxs(Le,{className:"SelectBase-endAdornmentRoot",component:"span",children:[e,t?jsx(ke,{}):null,!t&&r?jsx(eo,{className:"SelectBase-clearIconButton",type:"button",tabIndex:0,size:"small","aria-label":"Clear selection",onMouseDown:o=>{o.preventDefault(),o.stopPropagation();},onClick:o=>{o.preventDefault(),o.stopPropagation(),u?u():a();},sx:o=>({p:"1px",flexShrink:0,cursor:"pointer",color:"inherit",backgroundColor:"transparent",...l?{mr:2}:{},"&:hover":{backgroundColor:o.palette.action.hover},"&:focus-visible":{outline:`2px solid ${o.palette.primary.main}`,outlineOffset:1}}),children:jsx(s,{sx:{fontSize:8,width:8,height:8}})}):null,!t&&n&&!l&&jsx(Le,{component:"span",className:`SelectBase-menuTriggerIcon${g?" SelectBase-menuTriggerIcon-open":""}`,"aria-hidden":true,children:jsx(qe,{})})]})}function le(e,t){if(e==null)return false;if(Array.isArray(e))return e.length>0;if(typeof e=="object"){if(t){let n=t(e);return n!=null&&n!==""}let r=e.id;return r!=null&&r!==""}return String(e)!==""}var pe=styled(ro)(({theme:e})=>({minWidth:52,height:"40px !important",maxHeight:"40px !important",backgroundColor:"transparent",width:"100%",cursor:"pointer","& .MuiInputBase-root":{cursor:"pointer"},"& .MuiInputBase-root.Mui-disabled":{cursor:"default"},"& .MuiFormLabel-asterisk":{color:"red"},"& .MuiFormLabel-root":{fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%",transform:"translate(8px, 15px) scale(1)",color:`${e.palette.grey[700]} !important`,height:"100%",pointerEvents:"none"},".MuiFormLabel-root.MuiFormLabel-filled":{transform:"translate(8px, 8px) scale(0.75) "},".MuiFormLabel-root.Mui-focused":{transform:"translate(8px, 8px) scale(0.75)",fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%"}}));styled(Ue)(({theme:e})=>({fontSize:"11px",lineHeight:"11px",color:e.palette.common.black,borderRadius:"4px",boxShadow:e.shadows[17],border:"none",outline:"none","&:focus":{border:"1px solid #1F88D0"},"& .MuiOutlinedInput-root":{"& fieldset":{borderColor:"rgba(0, 0, 0, 0.23)"},"&.Mui-focused fieldset":{border:"2px solid red"}},minWidth:52,height:"40px !important",maxHeight:"40px !important",width:"100%","& .MuiFormLabel-asterisk":{color:"red"},"& .MuiFormLabel-root":{fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%",transform:"translate(8px, 15px) scale(1)"},".MuiFormLabel-root.MuiFormLabel-filled":{transform:"translate(8px, 8px) scale(0.75) "},".MuiFormLabel-root.Mui-focused":{transform:"translate(8px, 8px) scale(0.75)",fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%"}}));var se=styled("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"})),de=styled(Ue,{shouldForwardProp:e=>!["feedbackType","hasFeedback"].includes(e)})(({theme:e,error:t,feedbackType:r,hasFeedback:n})=>{let{borderColor:g}=ba(e,r),l=n?"4px 4px 0 0":"4px";return {width:"100%",height:"40px !important",maxHeight:"40px !important",borderRadius:l,overflow:"hidden",backgroundColor:e.palette.grey[400],"&.Mui-disabled":{backgroundColor:e.palette.grey[400]},".MuiSelect-select":{padding:"0 8px !important",height:"40px !important",maxHeight:"40px !important",display:"flex",alignItems:"flex-end !important",backgroundColor:`${e.palette.grey[400]} !important`,borderRadius:l,fontSize:"11px",cursor:"pointer","&:focus":{backgroundColor:`${e.palette.grey[400]} !important`}},"&.Mui-disabled .MuiSelect-select":{cursor:"default"},".MuiSelect-filled":{padding:"0 8px !important"},"&.MuiInputBase-adornedEnd":{display:"inline-flex",alignItems:"center",backgroundColor:e.palette.grey[400],gap:0},"&&.MuiInputBase-adornedEnd .MuiInputBase-input":{flex:"1 1 0%",minWidth:0,width:"auto",maxWidth:"100%"},"& .SelectBase-endAdornmentRoot":{display:"flex",alignItems:"center",flexShrink:0,gap:"8px",position:"relative",zIndex:1},"& .SelectBase-menuTriggerIcon":{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",cursor:"pointer",color:"inherit",lineHeight:0,"& svg, & .MuiSvgIcon-root":{transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter})}},"& .SelectBase-menuTriggerIcon-open svg, & .SelectBase-menuTriggerIcon-open .MuiSvgIcon-root":{transform:"rotate(180deg)"},"&.Mui-disabled .MuiSelect-icon":{color:"rgba(0, 0, 0, 0.38)"},"&.Mui-disabled .SelectBase-menuTriggerIcon":{cursor:"default",color:"rgba(0, 0, 0, 0.38)","& svg path":{fill:"rgba(0, 0, 0, 0.38)",stroke:"rgba(0, 0, 0, 0.38)"}},...r&&{border:`1px solid ${g}`},...n&&{borderBottom:"none"},...t&&{border:`1px solid ${e.palette.error.main}`}}}),ue=styled(Le)(()=>({display:"flex",alignItems:"stretch",height:"100%",flexDirection:"column",flex:1,cursor:"pointer","&:has(.MuiInputBase-root.Mui-disabled)":{cursor:"default"}}));function uo(e,t){let{menuSearchable:r,menuSearchPlaceholder:n,...g}=e,{required:l,hasError:s,label:u,value:a,helperText:c,feedback:o,onChange:y,options:C,isOptionEqualToValue:I,renderOption:m,getOptionValue:b,isLoading:p,children:S,getOptionLabel:v,IconComponent:f,showClearIcon:x=false,ClearIconComponent:T=z,onClear:E,endAdornment:Y,inputProps:xe,open:O,onOpen:j,onClose:ee,menuHasSelectedCheckMark:Ce=false,..._}=g,he=yc(useId(),"select-base"),[Ie,Se]=useState(false),q=O??Ie,A=useCallback((i,U)=>{U?j?.(i):ee?.(i),O===void 0&&Se(U);},[j,ee,O]),Be=i=>{y?.(i);},Pe=()=>a==null?"":m?m(a):v?v(a):a?.label??"",te="";a!=null&&(te=(b?b(a):a?.id)??"");let V=!!(_.disabled||p),oe=x&&le(a,b)&&!V,d=jsx(K,{endAdornmentProp:Y,isLoading:!!p,showClear:oe,showMenuArrow:!p,menuOpen:q,IconComponent:f,ClearIconComponent:T,onClear:E,onClearDefault:()=>y?.(null)}),{isProvided:h,isVisible:L,type:B}=Ac(o);return jsxs(ue,{onMouseDown:i=>{i.button===0&&(i.target.closest('.MuiSelect-select[role="combobox"]')||i.target.closest(".SelectBase-clearIconButton")||V||(i.preventDefault(),i.stopPropagation(),A(i,!q)));},onClick:i=>{i.target.closest('.MuiSelect-select[role="combobox"]')||i.target.closest(".SelectBase-clearIconButton")||(i.preventDefault(),i.stopPropagation());},children:[jsxs(pe,{id:he,variant:"filled","data-testid":"SelectBase",required:l,children:[jsx(po,{id:`select-label-${u.trim()}`,"data-testid":"SelectBase_InputLabel",children:u}),jsx(de,{"data-testid":"SelectBase_Select",ref:t,value:te,error:s&&!L,feedbackType:B,hasFeedback:L,disableUnderline:true,required:l,labelId:`select-label-${u.trim()}`,id:`select-label-${u.trim()}`,renderValue:Pe,..._,open:q,onOpen:i=>A(i,true),onClose:i=>A(i,false),inputProps:xe,disabled:V,IconComponent:f??(()=>null),endAdornment:d,children:S||C?.map(i=>{let U=I?I(i,a):i?.id===a?.id,$t=(b?b(i):i?.id)??i?.label??"select-base-item";return jsxs(so,{disabled:!!i.disabled,value:(b?b(i):i?.id)??"",onClick:()=>{Be(i);},sx:{fontSize:"12px",display:"flex",justifyContent:"space-between",alignItems:"center",gap:1,backgroundColor:Ee=>U?Ee.palette.action.hover:Ee.palette.common.white},children:[jsx(Le,{component:"span",sx:{flex:1,minWidth:0},children:m?m(i):i.label}),Ce&&U?jsx(Le,{component:"img",src:Pc,alt:"",sx:{width:10,height:7.5,flexShrink:0}}):null]},`select-base-item-${$t}`)})})]}),h?jsx(ca,{...o}):jsx(se,{children:c})]})}var Ke=qt.forwardRef(uo);function Co({required:e,hasError:t,label:r,value:n,helperText:g,feedback:l,onChange:s,options:u,isOptionEqualToValue:a,renderOption:c,getOptionValue:o,isLoading:y,children:C,getOptionLabel:I,IconComponent:m,showClearIcon:b=false,ClearIconComponent:p=z,onClear:S,endAdornment:v,inputProps:f,open:x,onOpen:T,onClose:E,...Y},xe){let[O,j]=useState(false),ee=yc(useId(),"select-base-multiple"),Ce=x??O,_=useCallback((d,h)=>{h?T?.(d):E?.(d),x===void 0&&j(h);},[T,E,x]),he=d=>{s?.(d);},Ie=()=>{let d=n?.filter(h=>h!=null)??[];return o?d.map(o):d.map(h=>h?.id)},Se=useMemo(()=>u?.filter(d=>n?.some(h=>{if(h==null)return false;if(a)return a(d,h);if(o){let W=o(d),H=o(h);return W===H||String(W)===String(H)}let L=d?.id,B=h?.id;return L===B||String(L)===String(B)})),[u,n,a,o]),q=()=>Se?.map(d=>I?I(d):d.label)?.join(", "),A=!!(Y.disabled||y),Be=b&&le(n,o)&&!A,te=jsx(K,{endAdornmentProp:v,isLoading:!!y,showClear:Be,showMenuArrow:!y,menuOpen:Ce,IconComponent:m,ClearIconComponent:p,onClear:S,onClearDefault:()=>s?.([])}),{isProvided:V,isVisible:oe,type:Fe}=Ac(l);return jsxs(ue,{children:[jsxs(pe,{id:ee,variant:"filled","data-testid":"SelectBase",required:e,children:[jsx(po,{id:`select-label-${r.trim()}`,"data-testid":"SelectBase_InputLabel",children:r}),jsx(de,{multiple:true,"data-testid":"SelectBase_Select",ref:xe,value:Ie()??"",error:t&&!oe,feedbackType:Fe,hasFeedback:oe,disableUnderline:true,required:e,labelId:`select-label-${r.trim()}`,id:`select-label-${r.trim()}`,renderValue:q,...Y,open:x,onOpen:d=>_(d,true),onClose:d=>_(d,false),inputProps:f,disabled:A,IconComponent:m??(()=>null),endAdornment:te,onChange:d=>{let L=d.target.value?.map(B=>u?.find(W=>{if(o){let i=o(W);return i===B||String(i)===String(B)}let H=W?.id;return H===B||String(H)===String(B)}));s?.(L?.filter(B=>B!=null)??[]);},children:C||u?.map((d,h)=>{let L=a?a(d,n):d?.id===n?.id;return jsx(so,{value:(o?o(d):d?.id)??"",onClick:()=>{he(d);},sx:{fontSize:"12px",backgroundColor:B=>L?B.palette.action.hover:B.palette.common.white},children:c?c(d):d.label},`select-base-multiple-item-${h}`)})})]}),V?jsx(ca,{...l}):jsx(se,{children:g})]})}var Je=qt.forwardRef(Co);var ho=Ke;var Qe=styled$1("button")(({theme:e,disabled:t})=>({display:"flex",gap:"4px",alignItems:"center",".logo":{width:"15.568px",height:"10.889px",borderRadius:"3px"},".arrow":{width:14},span:{color:e.palette.text.primary,fontWeight:500,fontSize:"11px"},height:24,cursor:t?"default":"pointer",opacity:t?.5:1})),Xe=styled$1(Popper)(({theme:e})=>({zIndex:9999,backgroundColor:e.palette.common.white,padding:"4px 8px",borderRadius:"4px",border:`1px solid ${e.palette.divider}`,width:100})),Ye=styled$1("ul")(()=>({listStyle:"none",padding:0,margin:0,maxHeight:100,overflow:"auto"})),je=styled$1("li")(({theme:e})=>({display:"flex",gap:"4px",alignItems:"center",".logo":{width:"15.568px",height:"10.889px",borderRadius:"3px"},".arrow":{width:14},span:{color:e.palette.text.primary,fontWeight:500,fontSize:"11px"},height:24,cursor:"pointer"})),et=styled$1(a)(()=>({height:24,padding:"4px",marginBottom:"4px"})),tt=styled$1(Box)(()=>({color:"red !important"}));function at({isLoading:e,countries:t,value:r,onCountryChange:n,required:g,disabled:l}){let[s,u]=useState(),[a,c]=useState(null),[o,y]=useState([]),[C,I]=useState(""),m=!!a&&!l,b=f=>{f.stopPropagation(),c(f.currentTarget);},p=()=>{c(null);},S=f=>{n?.(f),u(f),p(),y(t);},v=f=>{let x=f.target.value.toString()??"";if(I(x),!x){y(t);return}let T=t.filter(E=>E.idd_prefix.toString().startsWith(x)||E.iso2.toLowerCase().startsWith(x.toLowerCase()));y(T);};return useEffect(()=>{r&&u(r);},[r?.countryId]),useEffect(()=>{t.length&&y(t);},[t.length]),jsxs(Le,{"data-testid":"CountriesList",sx:{position:"relative"},children:[jsx(Qe,{type:"button","aria-describedby":"CountriesList_CountriesWrapper",onClick:b,disabled:e||l,sx:{backgroundColor:"transparent",border:"none",height:34,paddingInlineStart:"8px"},children:e?jsx(Mo,{variant:"rectangular",width:56.5,height:20,sx:{borderRadius:"4px"}}):jsxs(Fragment,{children:[s&&jsxs(Fragment,{children:[jsx("img",{src:s.logo,alt:"c",className:"logo"}),jsx("span",{children:`+${s?.idd_prefix}`})]}),g&&jsx(tt,{component:"span",children:"*"}),jsx(Le,{component:"img",src:Cb,alt:"d",className:"arrow",sx:{...m&&{transform:"rotate(180deg)"}}})]})}),m&&jsx(a$1,{onClick:p,sx:{zIndex:9999}}),m&&jsx(ClickAwayListener,{onClickAway:p,children:jsxs(Xe,{id:"CountriesList_CountriesWrapper",open:m,anchorEl:a,"data-testid":"CountriesList_CountriesWrapper",placement:"bottom-start",children:[jsx(et,{endAdornment:jsx("img",{src:A,alt:"arrow"}),onChange:v,hideArrows:true,"data-testid":"CountriesList_InputStyled",value:C}),jsx(Ye,{"data-testid":"CountriesList_CountriesListStyled",children:o.map(f=>{let x=s?.countryId===f.countryId;return jsxs(je,{onClick:()=>{S(f);},sx:{backgroundColor:x?"#F9F9F9":"transparent",color:x?"#000":"#8D8D94"},children:[jsx("img",{src:f.logo,alt:"c",className:"logo"}),jsx("span",{children:`+${f.idd_prefix}`})]},`country-code-${f.countryId}`)})})]})})]})}at.displayName="CountriesList";var it=memo(at);var me=it;var pt=styled(Le,{shouldForwardProp:e=>!["feedbackType","hasFeedback"].includes(e)})(({theme:e,feedbackType:t,hasFeedback:r})=>{let{borderColor:n}=ba(e,t);return {border:`1px solid ${t?n:e.palette.divider}`,display:"flex",position:"relative",paddingInline:"8px",paddingInlineStart:"0px",alignItems:"center",borderRadius:r?"4px 4px 0 0":"4px",borderBottom:r?"none":void 0,height:"40px"}}),st=styled(a)(({error:e})=>({border:"none",paddingInlineEnd:0,img:{cursor:"pointer"},...e&&{borderBottomLeftRadius:0,borderBottomRightRadius:0,borderBottom:"none"}})),dt=styled("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"})),ut=styled(Le)(()=>({flex:1}));function mt({phoneValue:e,hasError:t,countries:r,isCountriesLoading:n,countryValue:g,onCountryChange:l,onPhoneChange:s,helperText:u,required:a,disabled:c,feedback:o,...y},C){let I=x=>{s?.(x.target.value);},m=x=>{l?.(x);},b=o?.message??u,{isProvided:p,isVisible:S,type:v}=Ac(o,{message:b}),f=yc(useId(),"phone-input-base");return jsxs(ut,{id:f,"data-testid":"PhoneInput",children:[jsxs(pt,{"data-testid":"PhoneInput_MobileWrapper",feedbackType:v,hasFeedback:S,children:[jsx(me,{isLoading:n,countries:r,value:g,onCountryChange:m,required:a,disabled:c}),jsx(st,{value:e,"data-testid":"PhoneInput_InputNumberStyled",ref:C,inputProps:{autoComplete:"off"},error:t&&!p,disabled:c,...y,onChange:I,hideArrows:true})]}),jsx(ca,{type:o?.type,message:b,icon:o?.icon}),!S&&!p?jsx(dt,{children:u}):null]})}mt.displayName="PhoneInputBase";var ft=qt.forwardRef(mt);var Lo=ft;var gt=styled$1("button")(({theme:e})=>({display:"flex",gap:"4px",alignItems:"center",".logo":{width:"15.568px",height:"10.889px",borderRadius:"3px"},".arrow":{width:14},span:{color:e.palette.text.primary,fontWeight:500,fontSize:"11px"},height:24,cursor:"pointer"})),yt=styled$1(Popper)(({theme:e})=>({zIndex:99,backgroundColor:e.palette.common.white,padding:"4px 8px",borderRadius:"4px",border:`1px solid ${e.palette.divider}`,width:100})),bt=styled$1("ul")(()=>({listStyle:"none",padding:0,margin:0,maxHeight:100,overflow:"auto"})),xt=styled$1("li")(({theme:e})=>({display:"flex",gap:"4px",alignItems:"center",".logo":{width:"15.568px",height:"10.889px",borderRadius:"3px"},".arrow":{width:14},span:{color:e.palette.text.primary,fontWeight:500,fontSize:"11px"},height:24,cursor:"pointer"})),Ct=styled$1(Box)(()=>({color:"red !important"}));function Bt({isLoading:e,currencies:t,value:r,onCurrencyChange:n,required:g}){let l=yc(useId(),"currencies-list"),[s,u]=useState(),[a,c]=useState(null),[o,y]=useState([]),C=!!a,I=p=>{p.stopPropagation(),c(p.currentTarget);},m=()=>{c(null);},b=p=>{n?.(p),u(p),m(),y(t);};return useEffect(()=>{r&&u(r);},[r?.currencyId]),useEffect(()=>{t.length&&y(t);},[t.length]),jsxs(Le,{id:l,"data-testid":"currenciesList",sx:{position:"relative"},children:[jsx(gt,{type:"button","aria-describedby":"currenciesList_currenciesWrapper",onClick:I,disabled:e,sx:{backgroundColor:"transparent",border:"none",height:34,paddingInlineStart:"8px"},children:e?jsx(Mo,{variant:"rectangular",width:56.5,height:20,sx:{borderRadius:"4px"}}):jsxs(Fragment,{children:[s&&jsxs(Fragment,{children:[jsx("img",{src:s.logo,alt:"c",className:"logo"}),jsx("span",{children:s?.code.english})]}),g&&jsx(Ct,{component:"span",children:"*"}),jsx(Le,{component:"img",src:Cb,alt:"d",className:"arrow",sx:{...C&&{transform:"rotate(180deg)"}}})]})}),C&&jsx(a$1,{onClick:m}),C&&jsx(yt,{id:"currenciesList_currenciesWrapper",open:C,anchorEl:a,"data-testid":"currenciesList_currenciesWrapper",placement:"bottom-start",children:jsx(bt,{"data-testid":"currenciesList_currenciesListStyled",children:o.map(p=>{let S=s?.currencyId===p.currencyId;return jsxs(xt,{onClick:()=>{b(p);},sx:{backgroundColor:S?"#F9F9F9":"transparent",color:S?"#000":"#8D8D94"},children:[jsx("img",{src:p.logo,alt:"c",className:"logo"}),jsx("span",{children:p?.code.english})]},`currency-code-${p.currencyId}`)})})})]})}Bt.displayName="CurrenciesList";var Mt=memo(Bt);var kt=Mt;var wt=styled(Wo,{shouldForwardProp:e=>!["hasError","hideArrows"].includes(e)})(({theme:e,hideArrows:t})=>({padding:"8px",border:`1px solid ${e.palette.divider}`,borderRadius:"4px",height:32,color:e.palette.text.primary,fontSize:"11px",outline:0,maxWidth:"100%",display:"flex",flexGrow:1,"::placeholder":{color:e.palette.grey[700],fontWeight:400},...t&&{"& input[type=number]":{MozAppearance:"textfield"},"& input[type=number]::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:0},"& input[type=number]::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0}}})),Lt=styled(Le)(()=>({flex:1}));function zo({hasError:e,hideArrows:t,inputProps:r,...n},g){let l=yc(useId(),"amount-input-number");return jsx(Lt,{id:l,"data-testid":"AmountInputNumber",onClick:s=>{s.stopPropagation();},children:jsx(wt,{ref:g,placeholder:n.placeholder,hideArrows:true,hasError:e,disableUnderline:true,inputProps:{...r,type:"number"},onKeyDown:s=>{["e","E","+","-"].includes(s.key)&&s.preventDefault();},...n})})}var Ft=forwardRef(zo);var Et=Ft;var Rt=styled(Le,{shouldForwardProp:e=>e!=="hasError"})(({theme:e,hasError:t})=>({border:`1px solid ${e.palette.divider}`,display:"flex",justifyContent:"space-between",position:"relative",paddingInline:"8px",paddingInlineStart:"0px",alignItems:"center",borderRadius:"4px",height:"40px",...t&&{border:`1px solid ${e.palette.error.main}`}})),Tt=styled(Le)(()=>({width:"50px"})),At=styled(Et)(({error:e})=>({border:"none",paddingInlineEnd:0,img:{cursor:"pointer"},...e&&{borderBottomLeftRadius:0,borderBottomRightRadius:0,borderBottom:"none"}})),Wt=styled("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"})),Ht=styled(Le)(()=>({flex:1}));function zt({amountValue:e,hasError:t,currencies:r,isCurrenciesLoading:n,currencyValue:g,onCurrencyChange:l,onAmountChange:s,onAmountBlur:u,helperText:a,required:c,...o},y){let C=p=>{s?.(p.target.value);},I=p=>{u?.(p.target.value);},m=p=>{l?.(p);},b=yc(useId(),"amount-input-base");return jsxs(Ht,{id:b,"data-testid":"AmountInput",children:[jsxs(Rt,{"data-testid":"AmountInput_MobileWrapper",hasError:t,children:[jsx(kt,{isLoading:n,currencies:r,value:g,onCurrencyChange:m,required:c}),jsx(Tt,{children:jsx(At,{value:e,"data-testid":"AmountInput_InputNumberStyled",ref:y,inputProps:{autoComplete:"off"},error:t,...o,onChange:C,onBlur:I,hideArrows:true})})]}),jsx(Wt,{children:a})]})}zt.displayName="AmountInputBase";var Dt=qt.forwardRef(zt);var Oo=Dt;export{Kt as a,z as b,se as c,ue as d,Je as e,ho as f,me as g,Lo as h,Oo as i};
1
+ import {a}from'./chunk-2RTUHSFA.js';import {a as a$1}from'./chunk-RIJFII4O.js';import {ba,ca}from'./chunk-IBBWXV4R.js';import {yc,Ac}from'./chunk-2SKLD6QR.js';import {Pc,Cb,A}from'./chunk-OK75VWGZ.js';import qt,{useId,forwardRef,memo,useState,useCallback,useMemo,useEffect}from'react';import Le from'@mui/material/Box';import {styled}from'@mui/material/styles';import _t from'@mui/material/TextField';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import po from'@mui/material/InputLabel';import so from'@mui/material/MenuItem';import Jt from'@mui/material/SvgIcon';import eo from'@mui/material/IconButton';import Yt from'@mui/material/CircularProgress';import ro from'@mui/material/FormControl';import Ue from'@mui/material/Select';import Mo from'@mui/material/Skeleton';import {styled as styled$1,Popper,Box,ClickAwayListener}from'@mui/material';import Wo from'@mui/material/Input';var Ae=styled(Le)(()=>({display:"flex",flexDirection:"column",gap:"4px",width:"100%",minHeight:40,"& .MuiTextField-root":{flex:1,margin:"0 !important"}})),We=styled(_t,{shouldForwardProp:e=>!["hasError","feedbackType","hasFeedback","hideArrows","hasLabel"].includes(e)})(({theme:e,hasError:t,feedbackType:r,hasFeedback:n,hideArrows:g,hasLabel:l,disabled:s})=>{let{borderColor:u}=ba(e,r),a=n?"4px 4px 0 0":"4px",c=s?e.palette.grey[400]:e.palette.common.white,o=e.palette.divider;return r&&(o=u),t&&!r&&(o=e.palette.error.main),{border:`1px solid ${o}`,borderBottom:n?"none":void 0,borderRadius:a,...g&&{"& input[type=number]":{MozAppearance:"textfield"},"& input[type=number]::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:0},"& input[type=number]::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0}},"& .MuiFormLabel-asterisk":{color:"red"},"& .MuiInputLabel-root":{fontSize:"10px",fontWeight:500,lineHeight:"100%",transform:"translate(8px, 15px) scale(1)",color:`${e.palette.grey[700]} !important`,overflow:"visible"},"& .MuiInputLabel-root.MuiInputLabel-shrink, & .MuiInputLabel-root.Mui-focused":{transform:"translate(8px, 8px) scale(0.75)"},"& .MuiFilledInput-root":{maxHeight:"40px !important",height:"40px",overflow:"hidden",borderRadius:a,backgroundColor:c,paddingTop:l?"11px":"0px",paddingBottom:l?"4px":"0px",paddingLeft:"8px",boxSizing:"border-box",display:"inline-flex",alignItems:l?"stretch":"center","&:before, &:after":{display:"none"},"&:hover, &.Mui-focused, &.Mui-disabled":{backgroundColor:c}},"& .MuiFilledInput-input":{margin:0,padding:"0 !important",minHeight:0,height:"auto",boxSizing:"border-box",display:"flex",alignItems:l?"flex-end":"center",alignSelf:l?"flex-end":"center",fontSize:"11px",lineHeight:"11px",color:e.palette.text.primary,paddingBottom:l?"1px !important":"0 !important","&::placeholder":{color:e.palette.grey[500],opacity:1}}}}),He=styled("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"}));var Ne=qt.forwardRef(({name:e,onChange:t,hasError:r,helperText:n,hideArrows:g,feedback:l,InputProps:s,InputLabelProps:u,label:a,placeholder:c,...o},y)=>{let C=yc(useId(),"input-base"),I=x=>{t?.(x.target.value??"");},{isProvided:m,isVisible:b,type:p}=Ac(l),S=typeof a=="string"&&a.trim().length>0?a:void 0,v=S??c,f=S&&typeof c=="string"?c:void 0;return jsxs(Le,{children:[jsx(Ae,{id:C,"data-testid":"InputBase",children:jsx(We,{rows:1,hasError:!!r&&!m,hasFeedback:b,feedbackType:p,hasLabel:!!v,fullWidth:true,size:"small",variant:"filled",ref:y,name:e,type:o.type??"text",label:v,placeholder:f,onChange:I,InputLabelProps:u,InputProps:{disableUnderline:true,...s,sx:s?.sx},hideArrows:g,...o})}),m?jsx(ca,{...l}):null,!m&&n&&jsx(He,{children:n})]})});Ne.displayName="InputBase";var ze=Ne;var Kt=ze;var $e=forwardRef((e,t)=>jsx(Jt,{ref:t,viewBox:"0 0 8 8",fontSize:"small",...e,children:jsx("path",{d:"M6.63965 0.102539C6.75727 0.0997602 6.87304 0.133137 6.97168 0.197266C7.07023 0.261345 7.14718 0.353407 7.19238 0.461914C7.23757 0.570522 7.24961 0.690513 7.22559 0.805664C7.20154 0.920834 7.1425 1.02595 7.05762 1.10742L7.05664 1.10938L4.56738 3.59766L4.49512 3.66992L7.05762 6.23242C7.11359 6.28617 7.15865 6.35066 7.18945 6.42188C7.22023 6.49308 7.23648 6.5699 7.2373 6.64746C7.23809 6.72499 7.22359 6.80223 7.19434 6.87402C7.16499 6.9459 7.1213 7.0115 7.06641 7.06641C7.01149 7.12132 6.94592 7.16498 6.87402 7.19434C6.8022 7.22362 6.72502 7.23809 6.64746 7.2373C6.56987 7.23649 6.4931 7.22024 6.42188 7.18945C6.35064 7.15865 6.28618 7.1136 6.23242 7.05762L6.23145 7.05664L3.74219 4.56836L3.66992 4.49512L3.59766 4.56836L1.1084 7.05664L1.10742 7.05762C1.05365 7.11362 0.989227 7.15864 0.917969 7.18945C0.846721 7.22025 0.769997 7.2365 0.692383 7.2373C0.614798 7.23809 0.537661 7.22364 0.46582 7.19434C0.393921 7.16498 0.328351 7.12132 0.273438 7.06641C0.218559 7.01151 0.174849 6.94589 0.145508 6.87402C0.116258 6.80223 0.101751 6.72498 0.102539 6.64746C0.103364 6.5699 0.119618 6.49308 0.150391 6.42188C0.181198 6.35065 0.226245 6.28617 0.282227 6.23242L2.84473 3.66992L2.77246 3.59766L0.283203 1.10938L0.282227 1.1084L0.224609 1.04297C0.172384 0.974382 0.136093 0.894624 0.118164 0.80957C0.0942576 0.695891 0.104774 0.577375 0.148438 0.469727C0.192107 0.362124 0.266971 0.269962 0.363281 0.205078C0.459591 0.140238 0.573348 0.105497 0.689453 0.105469C0.767281 0.105527 0.844313 0.121103 0.916016 0.151367C0.987801 0.181723 1.05308 0.226359 1.10742 0.282227L3.66992 2.84473L6.23242 0.282227C6.33914 0.171037 6.48558 0.106239 6.63965 0.102539Z",fill:"#20232B",stroke:"white",strokeWidth:.20511})}));$e.displayName="DefaultClearIcon";var z=$e;var _e=forwardRef((e,t)=>jsx(Jt,{ref:t,viewBox:"0 0 8 5",fill:"none",fontSize:"small",sx:{width:8,height:5},...e,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})}));_e.displayName="DefaultSelectIcon";var qe=_e;function ke({size:e=20,color:t="grey.A400",...r}){return jsx(Yt,{size:e,sx:{backgroundColor:"transparent",color:t},...r})}function K({endAdornmentProp:e,isLoading:t,showClear:r,showMenuArrow:n,menuOpen:g,IconComponent:l,ClearIconComponent:s=z,onClear:u,onClearDefault:a}){return !(e||r||t||n)?null:jsxs(Le,{className:"SelectBase-endAdornmentRoot",component:"span",children:[e,t?jsx(ke,{}):null,!t&&r?jsx(eo,{className:"SelectBase-clearIconButton",type:"button",tabIndex:0,size:"small","aria-label":"Clear selection",onMouseDown:o=>{o.preventDefault(),o.stopPropagation();},onClick:o=>{o.preventDefault(),o.stopPropagation(),u?u():a();},sx:o=>({p:"1px",flexShrink:0,cursor:"pointer",color:"inherit",backgroundColor:"transparent",...l?{mr:2}:{},"&:hover":{backgroundColor:o.palette.action.hover},"&:focus-visible":{outline:`2px solid ${o.palette.primary.main}`,outlineOffset:1}}),children:jsx(s,{sx:{fontSize:8,width:8,height:8}})}):null,!t&&n&&!l&&jsx(Le,{component:"span",className:`SelectBase-menuTriggerIcon${g?" SelectBase-menuTriggerIcon-open":""}`,"aria-hidden":true,children:jsx(qe,{})})]})}function le(e,t){if(e==null)return false;if(Array.isArray(e))return e.length>0;if(typeof e=="object"){if(t){let n=t(e);return n!=null&&n!==""}let r=e.id;return r!=null&&r!==""}return String(e)!==""}var pe=styled(ro)(({theme:e})=>({minWidth:52,height:"40px !important",maxHeight:"40px !important",backgroundColor:"transparent",width:"100%",cursor:"pointer","& .MuiInputBase-root":{cursor:"pointer"},"& .MuiInputBase-root.Mui-disabled":{cursor:"default"},"& .MuiFormLabel-asterisk":{color:"red"},"& .MuiFormLabel-root":{fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%",transform:"translate(8px, 15px) scale(1)",color:`${e.palette.grey[700]} !important`,height:"100%",pointerEvents:"none"},".MuiFormLabel-root.MuiFormLabel-filled":{transform:"translate(8px, 8px) scale(0.75) "},".MuiFormLabel-root.Mui-focused":{transform:"translate(8px, 8px) scale(0.75)",fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%"}}));styled(Ue)(({theme:e})=>({fontSize:"11px",lineHeight:"11px",color:e.palette.common.black,borderRadius:"4px",boxShadow:e.shadows[17],border:"none",outline:"none","&:focus":{border:"1px solid #1F88D0"},"& .MuiOutlinedInput-root":{"& fieldset":{borderColor:"rgba(0, 0, 0, 0.23)"},"&.Mui-focused fieldset":{border:"2px solid red"}},minWidth:52,height:"40px !important",maxHeight:"40px !important",width:"100%","& .MuiFormLabel-asterisk":{color:"red"},"& .MuiFormLabel-root":{fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%",transform:"translate(8px, 15px) scale(1)"},".MuiFormLabel-root.MuiFormLabel-filled":{transform:"translate(8px, 8px) scale(0.75) "},".MuiFormLabel-root.Mui-focused":{transform:"translate(8px, 8px) scale(0.75)",fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%"}}));var se=styled("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"})),de=styled(Ue,{shouldForwardProp:e=>!["feedbackType","hasFeedback"].includes(e)})(({theme:e,error:t,feedbackType:r,hasFeedback:n})=>{let{borderColor:g}=ba(e,r),l=n?"4px 4px 0 0":"4px";return {width:"100%",height:"40px !important",maxHeight:"40px !important",borderRadius:l,overflow:"hidden",backgroundColor:e.palette.grey[400],"&.Mui-disabled":{backgroundColor:e.palette.grey[400]},".MuiSelect-select":{padding:"0 8px !important",height:"40px !important",maxHeight:"40px !important",display:"flex",alignItems:"flex-end !important",backgroundColor:`${e.palette.grey[400]} !important`,borderRadius:l,fontSize:"11px",cursor:"pointer","&:focus":{backgroundColor:`${e.palette.grey[400]} !important`}},"&.Mui-disabled .MuiSelect-select":{cursor:"default"},".MuiSelect-filled":{padding:"0 8px !important"},"&.MuiInputBase-adornedEnd":{display:"inline-flex",alignItems:"center",backgroundColor:e.palette.grey[400],gap:0},"&&.MuiInputBase-adornedEnd .MuiInputBase-input":{flex:"1 1 0%",minWidth:0,width:"auto",maxWidth:"100%"},"& .SelectBase-endAdornmentRoot":{display:"flex",alignItems:"center",flexShrink:0,gap:"8px",position:"relative",zIndex:1},"& .SelectBase-menuTriggerIcon":{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",cursor:"pointer",color:"inherit",lineHeight:0,"& svg, & .MuiSvgIcon-root":{transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter})}},"& .SelectBase-menuTriggerIcon-open svg, & .SelectBase-menuTriggerIcon-open .MuiSvgIcon-root":{transform:"rotate(180deg)"},"&.Mui-disabled .MuiSelect-icon":{color:"rgba(0, 0, 0, 0.38)"},"&.Mui-disabled .SelectBase-menuTriggerIcon":{cursor:"default",color:"rgba(0, 0, 0, 0.38)","& svg path":{fill:"rgba(0, 0, 0, 0.38)",stroke:"rgba(0, 0, 0, 0.38)"}},...r&&{border:`1px solid ${g}`},...n&&{borderBottom:"none"},...t&&{border:`1px solid ${e.palette.error.main}`}}}),ue=styled(Le)(()=>({display:"flex",alignItems:"stretch",height:"100%",flexDirection:"column",flex:1,cursor:"pointer","&:has(.MuiInputBase-root.Mui-disabled)":{cursor:"default"}}));function uo(e,t){let{menuSearchable:r,menuSearchPlaceholder:n,...g}=e,{required:l,hasError:s,label:u,value:a,helperText:c,feedback:o,onChange:y,options:C,isOptionEqualToValue:I,renderOption:m,getOptionValue:b,isLoading:p,children:S,getOptionLabel:v,IconComponent:f,showClearIcon:x=false,ClearIconComponent:T=z,onClear:E,endAdornment:Y,inputProps:xe,open:O,onOpen:j,onClose:ee,menuHasSelectedCheckMark:Ce=false,..._}=g,he=yc(useId(),"select-base"),[Ie,Se]=useState(false),q=O??Ie,A=useCallback((i,U)=>{U?j?.(i):ee?.(i),O===void 0&&Se(U);},[j,ee,O]),Be=i=>{y?.(i);},Pe=()=>a==null?"":m?m(a):v?v(a):a?.label??"",te="";a!=null&&(te=(b?b(a):a?.id)??"");let V=!!(_.disabled||p),oe=x&&le(a,b)&&!V,d=jsx(K,{endAdornmentProp:Y,isLoading:!!p,showClear:oe,showMenuArrow:!p,menuOpen:q,IconComponent:f,ClearIconComponent:T,onClear:E,onClearDefault:()=>y?.(null)}),{isProvided:h,isVisible:L,type:B}=Ac(o);return jsxs(ue,{onMouseDown:i=>{i.button===0&&(i.target.closest('.MuiSelect-select[role="combobox"]')||i.target.closest(".SelectBase-clearIconButton")||V||(i.preventDefault(),i.stopPropagation(),A(i,!q)));},onClick:i=>{i.target.closest('.MuiSelect-select[role="combobox"]')||i.target.closest(".SelectBase-clearIconButton")||(i.preventDefault(),i.stopPropagation());},children:[jsxs(pe,{id:he,variant:"filled","data-testid":"SelectBase",required:l,children:[jsx(po,{id:`select-label-${u.trim()}`,"data-testid":"SelectBase_InputLabel",children:u}),jsx(de,{"data-testid":"SelectBase_Select",ref:t,value:te,error:s&&!L,feedbackType:B,hasFeedback:L,disableUnderline:true,required:l,labelId:`select-label-${u.trim()}`,id:`select-label-${u.trim()}`,renderValue:Pe,..._,open:q,onOpen:i=>A(i,true),onClose:i=>A(i,false),inputProps:xe,disabled:V,IconComponent:f??(()=>null),endAdornment:d,children:S||C?.map(i=>{let U=I?I(i,a):i?.id===a?.id,$t=(b?b(i):i?.id)??i?.label??"select-base-item";return jsxs(so,{disabled:!!i.disabled,value:(b?b(i):i?.id)??"",onClick:()=>{Be(i);},sx:{fontSize:"12px",display:"flex",justifyContent:"space-between",alignItems:"center",gap:1,backgroundColor:Ee=>U?Ee.palette.action.hover:Ee.palette.common.white},children:[jsx(Le,{component:"span",sx:{flex:1,minWidth:0},children:m?m(i):i.label}),Ce&&U?jsx(Le,{component:"img",src:Pc,alt:"",sx:{width:10,height:7.5,flexShrink:0}}):null]},`select-base-item-${$t}`)})})]}),h?jsx(ca,{...o}):jsx(se,{children:c})]})}var Ke=qt.forwardRef(uo);function Co({required:e,hasError:t,label:r,value:n,helperText:g,feedback:l,onChange:s,options:u,isOptionEqualToValue:a,renderOption:c,getOptionValue:o,isLoading:y,children:C,getOptionLabel:I,IconComponent:m,showClearIcon:b=false,ClearIconComponent:p=z,onClear:S,endAdornment:v,inputProps:f,open:x,onOpen:T,onClose:E,...Y},xe){let[O,j]=useState(false),ee=yc(useId(),"select-base-multiple"),Ce=x??O,_=useCallback((d,h)=>{h?T?.(d):E?.(d),x===void 0&&j(h);},[T,E,x]),he=d=>{s?.(d);},Ie=()=>{let d=n?.filter(h=>h!=null)??[];return o?d.map(o):d.map(h=>h?.id)},Se=useMemo(()=>u?.filter(d=>n?.some(h=>{if(h==null)return false;if(a)return a(d,h);if(o){let W=o(d),H=o(h);return W===H||String(W)===String(H)}let L=d?.id,B=h?.id;return L===B||String(L)===String(B)})),[u,n,a,o]),q=()=>Se?.map(d=>I?I(d):d.label)?.join(", "),A=!!(Y.disabled||y),Be=b&&le(n,o)&&!A,te=jsx(K,{endAdornmentProp:v,isLoading:!!y,showClear:Be,showMenuArrow:!y,menuOpen:Ce,IconComponent:m,ClearIconComponent:p,onClear:S,onClearDefault:()=>s?.([])}),{isProvided:V,isVisible:oe,type:Fe}=Ac(l);return jsxs(ue,{children:[jsxs(pe,{id:ee,variant:"filled","data-testid":"SelectBase",required:e,children:[jsx(po,{id:`select-label-${r.trim()}`,"data-testid":"SelectBase_InputLabel",children:r}),jsx(de,{multiple:true,"data-testid":"SelectBase_Select",ref:xe,value:Ie()??"",error:t&&!oe,feedbackType:Fe,hasFeedback:oe,disableUnderline:true,required:e,labelId:`select-label-${r.trim()}`,id:`select-label-${r.trim()}`,renderValue:q,...Y,open:x,onOpen:d=>_(d,true),onClose:d=>_(d,false),inputProps:f,disabled:A,IconComponent:m??(()=>null),endAdornment:te,onChange:d=>{let L=d.target.value?.map(B=>u?.find(W=>{if(o){let i=o(W);return i===B||String(i)===String(B)}let H=W?.id;return H===B||String(H)===String(B)}));s?.(L?.filter(B=>B!=null)??[]);},children:C||u?.map((d,h)=>{let L=a?a(d,n):d?.id===n?.id;return jsx(so,{value:(o?o(d):d?.id)??"",onClick:()=>{he(d);},sx:{fontSize:"12px",backgroundColor:B=>L?B.palette.action.hover:B.palette.common.white},children:c?c(d):d.label},`select-base-multiple-item-${h}`)})})]}),V?jsx(ca,{...l}):jsx(se,{children:g})]})}var Je=qt.forwardRef(Co);var ho=Ke;var Qe=styled$1("button")(({theme:e,disabled:t})=>({display:"flex",gap:"4px",alignItems:"center",".logo":{width:"15.568px",height:"10.889px",borderRadius:"3px"},".arrow":{width:14},span:{color:e.palette.text.primary,fontWeight:500,fontSize:"11px"},height:24,cursor:t?"default":"pointer",opacity:t?.5:1})),Xe=styled$1(Popper)(({theme:e})=>({zIndex:9999,backgroundColor:e.palette.common.white,padding:"4px 8px",borderRadius:"4px",border:`1px solid ${e.palette.divider}`,width:100})),Ye=styled$1("ul")(()=>({listStyle:"none",padding:0,margin:0,maxHeight:100,overflow:"auto"})),je=styled$1("li")(({theme:e})=>({display:"flex",gap:"4px",alignItems:"center",".logo":{width:"15.568px",height:"10.889px",borderRadius:"3px"},".arrow":{width:14},span:{color:e.palette.text.primary,fontWeight:500,fontSize:"11px"},height:24,cursor:"pointer"})),et=styled$1(a)(()=>({height:24,padding:"4px",marginBottom:"4px"})),tt=styled$1(Box)(()=>({color:"red !important"}));function at({isLoading:e,countries:t,value:r,onCountryChange:n,required:g,disabled:l}){let[s,u]=useState(),[a,c]=useState(null),[o,y]=useState([]),[C,I]=useState(""),m=!!a&&!l,b=f=>{f.stopPropagation(),c(f.currentTarget);},p=()=>{c(null);},S=f=>{n?.(f),u(f),p(),y(t);},v=f=>{let x=f.target.value.toString()??"";if(I(x),!x){y(t);return}let T=t.filter(E=>E.idd_prefix.toString().startsWith(x)||E.iso2.toLowerCase().startsWith(x.toLowerCase()));y(T);};return useEffect(()=>{r&&u(r);},[r?.countryId]),useEffect(()=>{t.length&&y(t);},[t.length]),jsxs(Le,{"data-testid":"CountriesList",sx:{position:"relative"},children:[jsx(Qe,{type:"button","aria-describedby":"CountriesList_CountriesWrapper",onClick:b,disabled:e||l,sx:{backgroundColor:"transparent",border:"none",height:34,paddingInlineStart:"8px"},children:e?jsx(Mo,{variant:"rectangular",width:56.5,height:20,sx:{borderRadius:"4px"}}):jsxs(Fragment,{children:[s&&jsxs(Fragment,{children:[jsx("img",{src:s.logo,alt:"c",className:"logo"}),jsx("span",{children:`+${s?.idd_prefix}`})]}),g&&jsx(tt,{component:"span",children:"*"}),jsx(Le,{component:"img",src:Cb,alt:"d",className:"arrow",sx:{...m&&{transform:"rotate(180deg)"}}})]})}),m&&jsx(a$1,{onClick:p,sx:{zIndex:9999}}),m&&jsx(ClickAwayListener,{onClickAway:p,children:jsxs(Xe,{id:"CountriesList_CountriesWrapper",open:m,anchorEl:a,"data-testid":"CountriesList_CountriesWrapper",placement:"bottom-start",children:[jsx(et,{endAdornment:jsx("img",{src:A,alt:"arrow"}),onChange:v,hideArrows:true,"data-testid":"CountriesList_InputStyled",value:C}),jsx(Ye,{"data-testid":"CountriesList_CountriesListStyled",children:o.map(f=>{let x=s?.countryId===f.countryId;return jsxs(je,{onClick:()=>{S(f);},sx:{backgroundColor:x?"#F9F9F9":"transparent",color:x?"#000":"#8D8D94"},children:[jsx("img",{src:f.logo,alt:"c",className:"logo"}),jsx("span",{children:`+${f.idd_prefix}`})]},`country-code-${f.countryId}`)})})]})})]})}at.displayName="CountriesList";var it=memo(at);var me=it;var pt=styled(Le,{shouldForwardProp:e=>!["feedbackType","hasFeedback"].includes(e)})(({theme:e,feedbackType:t,hasFeedback:r})=>{let{borderColor:n}=ba(e,t);return {border:`1px solid ${t?n:e.palette.divider}`,display:"flex",position:"relative",paddingInline:"8px",paddingInlineStart:"0px",alignItems:"center",borderRadius:r?"4px 4px 0 0":"4px",borderBottom:r?"none":void 0,height:"40px"}}),st=styled(a)(({error:e})=>({border:"none",paddingInlineEnd:0,img:{cursor:"pointer"},...e&&{borderBottomLeftRadius:0,borderBottomRightRadius:0,borderBottom:"none"}})),dt=styled("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"})),ut=styled(Le)(()=>({flex:1}));function mt({phoneValue:e,hasError:t,countries:r,isCountriesLoading:n,countryValue:g,onCountryChange:l,onPhoneChange:s,helperText:u,required:a,disabled:c,feedback:o,...y},C){let I=x=>{s?.(x.target.value);},m=x=>{l?.(x);},b=o?.message??u,{isProvided:p,isVisible:S,type:v}=Ac(o,{message:b}),f=yc(useId(),"phone-input-base");return jsxs(ut,{id:f,"data-testid":"PhoneInput",children:[jsxs(pt,{"data-testid":"PhoneInput_MobileWrapper",feedbackType:v,hasFeedback:S,children:[jsx(me,{isLoading:n,countries:r,value:g,onCountryChange:m,required:a,disabled:c}),jsx(st,{value:e,"data-testid":"PhoneInput_InputNumberStyled",ref:C,inputProps:{autoComplete:"off"},error:t&&!p,disabled:c,...y,onChange:I,hideArrows:true})]}),jsx(ca,{type:o?.type,message:b,icon:o?.icon}),!S&&!p?jsx(dt,{children:u}):null]})}mt.displayName="PhoneInputBase";var ft=qt.forwardRef(mt);var Lo=ft;var gt=styled$1("button")(({theme:e})=>({display:"flex",gap:"4px",alignItems:"center",".logo":{width:"15.568px",height:"10.889px",borderRadius:"3px"},".arrow":{width:14},span:{color:e.palette.text.primary,fontWeight:500,fontSize:"11px"},height:24,cursor:"pointer"})),yt=styled$1(Popper)(({theme:e})=>({zIndex:99,backgroundColor:e.palette.common.white,padding:"4px 8px",borderRadius:"4px",border:`1px solid ${e.palette.divider}`,width:100})),bt=styled$1("ul")(()=>({listStyle:"none",padding:0,margin:0,maxHeight:100,overflow:"auto"})),xt=styled$1("li")(({theme:e})=>({display:"flex",gap:"4px",alignItems:"center",".logo":{width:"15.568px",height:"10.889px",borderRadius:"3px"},".arrow":{width:14},span:{color:e.palette.text.primary,fontWeight:500,fontSize:"11px"},height:24,cursor:"pointer"})),Ct=styled$1(Box)(()=>({color:"red !important"}));function Bt({isLoading:e,currencies:t,value:r,onCurrencyChange:n,required:g}){let l=yc(useId(),"currencies-list"),[s,u]=useState(),[a,c]=useState(null),[o,y]=useState([]),C=!!a,I=p=>{p.stopPropagation(),c(p.currentTarget);},m=()=>{c(null);},b=p=>{n?.(p),u(p),m(),y(t);};return useEffect(()=>{r&&u(r);},[r?.currencyId]),useEffect(()=>{t.length&&y(t);},[t.length]),jsxs(Le,{id:l,"data-testid":"currenciesList",sx:{position:"relative"},children:[jsx(gt,{type:"button","aria-describedby":"currenciesList_currenciesWrapper",onClick:I,disabled:e,sx:{backgroundColor:"transparent",border:"none",height:34,paddingInlineStart:"8px"},children:e?jsx(Mo,{variant:"rectangular",width:56.5,height:20,sx:{borderRadius:"4px"}}):jsxs(Fragment,{children:[s&&jsxs(Fragment,{children:[jsx("img",{src:s.logo,alt:"c",className:"logo"}),jsx("span",{children:s?.code.english})]}),g&&jsx(Ct,{component:"span",children:"*"}),jsx(Le,{component:"img",src:Cb,alt:"d",className:"arrow",sx:{...C&&{transform:"rotate(180deg)"}}})]})}),C&&jsx(a$1,{onClick:m}),C&&jsx(yt,{id:"currenciesList_currenciesWrapper",open:C,anchorEl:a,"data-testid":"currenciesList_currenciesWrapper",placement:"bottom-start",children:jsx(bt,{"data-testid":"currenciesList_currenciesListStyled",children:o.map(p=>{let S=s?.currencyId===p.currencyId;return jsxs(xt,{onClick:()=>{b(p);},sx:{backgroundColor:S?"#F9F9F9":"transparent",color:S?"#000":"#8D8D94"},children:[jsx("img",{src:p.logo,alt:"c",className:"logo"}),jsx("span",{children:p?.code.english})]},`currency-code-${p.currencyId}`)})})})]})}Bt.displayName="CurrenciesList";var Mt=memo(Bt);var kt=Mt;var wt=styled(Wo,{shouldForwardProp:e=>!["hasError","hideArrows"].includes(e)})(({theme:e,hideArrows:t})=>({padding:"8px",border:`1px solid ${e.palette.divider}`,borderRadius:"4px",height:32,color:e.palette.text.primary,fontSize:"11px",outline:0,maxWidth:"100%",display:"flex",flexGrow:1,"::placeholder":{color:e.palette.grey[700],fontWeight:400},...t&&{"& input[type=number]":{MozAppearance:"textfield"},"& input[type=number]::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:0},"& input[type=number]::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0}}})),Lt=styled(Le)(()=>({flex:1}));function zo({hasError:e,hideArrows:t,inputProps:r,...n},g){let l=yc(useId(),"amount-input-number");return jsx(Lt,{id:l,"data-testid":"AmountInputNumber",onClick:s=>{s.stopPropagation();},children:jsx(wt,{ref:g,placeholder:n.placeholder,hideArrows:true,hasError:e,disableUnderline:true,inputProps:{...r,type:"number"},onKeyDown:s=>{["e","E","+","-"].includes(s.key)&&s.preventDefault();},...n})})}var Ft=forwardRef(zo);var Et=Ft;var Rt=styled(Le,{shouldForwardProp:e=>e!=="hasError"})(({theme:e,hasError:t})=>({border:`1px solid ${e.palette.divider}`,display:"flex",justifyContent:"space-between",position:"relative",paddingInline:"8px",paddingInlineStart:"0px",alignItems:"center",borderRadius:"4px",height:"40px",...t&&{border:`1px solid ${e.palette.error.main}`}})),Tt=styled(Le)(()=>({width:"50px"})),At=styled(Et)(({error:e})=>({border:"none",paddingInlineEnd:0,img:{cursor:"pointer"},...e&&{borderBottomLeftRadius:0,borderBottomRightRadius:0,borderBottom:"none"}})),Wt=styled("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block"})),Ht=styled(Le)(()=>({flex:1}));function zt({amountValue:e,hasError:t,currencies:r,isCurrenciesLoading:n,currencyValue:g,onCurrencyChange:l,onAmountChange:s,onAmountBlur:u,helperText:a,required:c,...o},y){let C=p=>{s?.(p.target.value);},I=p=>{u?.(p.target.value);},m=p=>{l?.(p);},b=yc(useId(),"amount-input-base");return jsxs(Ht,{id:b,"data-testid":"AmountInput",children:[jsxs(Rt,{"data-testid":"AmountInput_MobileWrapper",hasError:t,children:[jsx(kt,{isLoading:n,currencies:r,value:g,onCurrencyChange:m,required:c}),jsx(Tt,{children:jsx(At,{value:e,"data-testid":"AmountInput_InputNumberStyled",ref:y,inputProps:{autoComplete:"off"},error:t,...o,onChange:C,onBlur:I,hideArrows:true})})]}),jsx(Wt,{children:a})]})}zt.displayName="AmountInputBase";var Dt=qt.forwardRef(zt);var Oo=Dt;export{Kt as a,z as b,se as c,ue as d,Je as e,ho as f,me as g,Lo as h,Oo as i};
@@ -1 +1 @@
1
- import {f as f$1}from'./chunk-RKQEODRF.js';import {a as a$1}from'./chunk-HHUVMRYO.js';import {a as a$2}from'./chunk-RIJFII4O.js';import {a,f,e}from'./chunk-2QINQUHF.js';import {z as z$1}from'./chunk-7PJX5ZKM.js';import {Ka,g,yc}from'./chunk-2SKLD6QR.js';import {Cb}from'./chunk-OK75VWGZ.js';import {memo,useRef,useMemo,useCallback,useId,useState}from'react';import {styled,Typography,Box,Popper}from'@mui/material';import {useTranslation}from'react-i18next';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var O=styled(Typography)(()=>({display:"block",textAlign:"center",fontSize:"10px",fontWeight:500,color:"#8D8D94",padding:"24px 0"})),A=styled(Box,{shouldForwardProp:t=>t!=="isDisabled"})(({isDisabled:t})=>({display:"flex",justifyContent:"space-between",alignItems:"center",gap:"4px",...t&&{"& img":{opacity:.3}}}));var tt=memo(t=>{let{variant:e$1="inActive",badgeCount:o,label:r,...n}=t,s=useRef(null),m=useMemo(()=>!o||Number.isNaN(Ka(o))?null:jsx(z$1,{color:"inactive",children:g(Number(o))}),[o]),a$1=useCallback(p=>{p.stopPropagation(),t?.onClick?.(p);},[t]),l=a[e$1];return jsx(l,{"data-testid":"MultiSelectStatusButton",...n,ref:s,onClick:a$1,statusVariant:e$1,children:jsx(f,{children:jsxs(e,{variant:e$1,children:[r,m]})})})}),W=tt;function V(t){let e=new Set;return t.filter(o=>e.has(o.value)?false:(e.add(o.value),true))}function h(t,e){let o=e.toLowerCase();return t.reduce((r,n)=>{if(n.options?.length){let s=h(n.options,e);s.length&&r.push({...n,options:s});}else (n.placeholder?.toLowerCase().includes(o)||n.value.toLowerCase().includes(o))&&r.push(n);return r},[])}function it({buttonLabel:t,onClear:e,onConfirm:o,dropdownItems:r,apiKey:n,data:s,styles:m,buttonDisabled:a,searchable:l,searchPlaceholder:p}){let{t:Q}=useTranslation(),Y=p??`${Q("search")}...`,$=yc(useId(),"multi-select-dropdown-button"),[C,b]=useState(null),[u,d]=useState(""),G=c=>{b(c.currentTarget);},g=()=>{b(null),d("");},x=!!C,L=s?.[n],J=Array.isArray(L)?L.length:0,S=useMemo(()=>{if(!r)return r;let c=V(r);return !l||!u?c:h(c,u)},[l,u,r]),v=l&&!!u&&S?.length===0,U=l?jsxs(Fragment,{children:[jsx(a$1,{name:"multi-select-search",value:u,placeholder:Y,onSearchChange:d,onSearchReset:()=>d(""),sx:{pt:0}}),v&&jsx(O,{children:"No results found"})]}):void 0;return jsxs("div",{id:$,"data-testid":"MultiSelectDropdownButton",children:[jsx(W,{onClick:G,label:jsxs(A,{isDisabled:a,children:[t,jsx("img",{src:Cb,alt:"arrow-down"})]}),disabled:a,badgeCount:J}),x&&jsx(a$2,{onClick:g}),jsx(Popper,{open:x,anchorEl:C,placement:"bottom-start",sx:{zIndex:9999},children:jsx(f$1,{onCloseDropdown:g,filter:{apiKey:n,data:s,onClear:e,onConfirm:o,options:S,type:"list"},styles:{...m,height:v?"auto":"300px",overflowY:"scroll",maxWidth:"200px"},header:U,searchable:l})})]})}var z=memo(it);var Ot=z;export{Ot as a};
1
+ import {f as f$1}from'./chunk-6QO6WOG4.js';import {a as a$1}from'./chunk-HHUVMRYO.js';import {a,f,e}from'./chunk-EAWODBS3.js';import {a as a$2}from'./chunk-RIJFII4O.js';import {z as z$1}from'./chunk-IBBWXV4R.js';import {Ka,g,yc}from'./chunk-2SKLD6QR.js';import {Cb}from'./chunk-OK75VWGZ.js';import {memo,useRef,useMemo,useCallback,useId,useState}from'react';import {styled,Typography,Box,Popper}from'@mui/material';import {useTranslation}from'react-i18next';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var O=styled(Typography)(()=>({display:"block",textAlign:"center",fontSize:"10px",fontWeight:500,color:"#8D8D94",padding:"24px 0"})),A=styled(Box,{shouldForwardProp:t=>t!=="isDisabled"})(({isDisabled:t})=>({display:"flex",justifyContent:"space-between",alignItems:"center",gap:"4px",...t&&{"& img":{opacity:.3}}}));var tt=memo(t=>{let{variant:e$1="inActive",badgeCount:o,label:r,...n}=t,s=useRef(null),m=useMemo(()=>!o||Number.isNaN(Ka(o))?null:jsx(z$1,{color:"inactive",children:g(Number(o))}),[o]),a$1=useCallback(p=>{p.stopPropagation(),t?.onClick?.(p);},[t]),l=a[e$1];return jsx(l,{"data-testid":"MultiSelectStatusButton",...n,ref:s,onClick:a$1,statusVariant:e$1,children:jsx(f,{children:jsxs(e,{variant:e$1,children:[r,m]})})})}),W=tt;function V(t){let e=new Set;return t.filter(o=>e.has(o.value)?false:(e.add(o.value),true))}function h(t,e){let o=e.toLowerCase();return t.reduce((r,n)=>{if(n.options?.length){let s=h(n.options,e);s.length&&r.push({...n,options:s});}else (n.placeholder?.toLowerCase().includes(o)||n.value.toLowerCase().includes(o))&&r.push(n);return r},[])}function it({buttonLabel:t,onClear:e,onConfirm:o,dropdownItems:r,apiKey:n,data:s,styles:m,buttonDisabled:a,searchable:l,searchPlaceholder:p}){let{t:Q}=useTranslation(),Y=p??`${Q("search")}...`,$=yc(useId(),"multi-select-dropdown-button"),[C,b]=useState(null),[u,d]=useState(""),G=c=>{b(c.currentTarget);},g=()=>{b(null),d("");},x=!!C,L=s?.[n],J=Array.isArray(L)?L.length:0,S=useMemo(()=>{if(!r)return r;let c=V(r);return !l||!u?c:h(c,u)},[l,u,r]),v=l&&!!u&&S?.length===0,U=l?jsxs(Fragment,{children:[jsx(a$1,{name:"multi-select-search",value:u,placeholder:Y,onSearchChange:d,onSearchReset:()=>d(""),sx:{pt:0}}),v&&jsx(O,{children:"No results found"})]}):void 0;return jsxs("div",{id:$,"data-testid":"MultiSelectDropdownButton",children:[jsx(W,{onClick:G,label:jsxs(A,{isDisabled:a,children:[t,jsx("img",{src:Cb,alt:"arrow-down"})]}),disabled:a,badgeCount:J}),x&&jsx(a$2,{onClick:g}),jsx(Popper,{open:x,anchorEl:C,placement:"bottom-start",sx:{zIndex:9999},children:jsx(f$1,{onCloseDropdown:g,filter:{apiKey:n,data:s,onClear:e,onConfirm:o,options:S,type:"list"},styles:{...m,height:v?"auto":"300px",overflowY:"scroll",maxWidth:"200px"},header:U,searchable:l})})]})}var z=memo(it);var Ot=z;export{Ot as a};
@@ -1,4 +1,4 @@
1
- import {a as a$3}from'./chunk-DEKIIMGN.js';import {a,b,f as f$1,d,c,h as h$1,i,e}from'./chunk-3T2OR3KW.js';import {a as a$4}from'./chunk-SSBDL6XS.js';import {a as a$1}from'./chunk-2OCEVAZN.js';import {a as a$2,b as b$1}from'./chunk-MUR4ILTY.js';import {f,ba,j,P,O,h,ca}from'./chunk-7PJX5ZKM.js';import {yc,Ac}from'./chunk-2SKLD6QR.js';import {Pc,A}from'./chunk-OK75VWGZ.js';import*as de from'react';import de__default,{useId,useState,useEffect,useMemo,useRef,useCallback}from'react';import {useFormContext,Controller,FormProvider,useForm}from'react-hook-form';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import ne from'@mui/material/Box';import Ft from'@mui/material/Button';import Ct from'@mui/material/Input';import lo from'@mui/material/ListSubheader';import io from'@mui/material/MenuItem';import {keyframes,styled,alpha}from'@mui/material/styles';import Rt from'@mui/material/Popper';import Lt from'@mui/material/TextField';function st({onSubmit:e,methods:o,children:t}){let r=yc(useId(),"default-form");return jsx(FormProvider,{...o,children:jsx("form",{id:r,"data-testid":"DefaultForm",onSubmit:e,noValidate:true,children:t})})}var ut=de__default.memo(st);var Xe=de.forwardRef(({name:e,helperText:o,hideArrows:t,feedback:r,...n},l)=>{let{control:s}=useFormContext();return jsx(Controller,{name:e,control:s,defaultValue:n.defaultValue,render:({field:d,fieldState:u})=>jsx(a,{...n,...d,ref:l,hasError:!!u.error,helperText:o??u.error?.message,feedback:r,hideArrows:t,onChange:h=>{d.onChange(h),n.onChange?.(h);},onWheel:h=>{h.target instanceof HTMLElement&&h.target.blur();}})})});Xe.displayName="RFHFormInput";var Ze=de.memo(Xe);var ht=Ze;function oo({phoneName:e,countries:o,countryName:t,helperText:r,isCountriesLoading:n,disabled:l,feedback:s,...d}){let{control:u,watch:h,setValue:f}=useFormContext(),F=h(t),S=x=>{f(t,x);};return jsx(Controller,{name:e,control:u,render:({field:{onChange:x,value:m},fieldState:a})=>jsx(h$1,{...d,phoneValue:m,countries:o,hasError:!!a.error,helperText:r??a.error?.message,feedback:s,onPhoneChange:C=>{x(C);},disabled:l,countryValue:F,onCountryChange:S,isCountriesLoading:n})})}oo.displayName="RFHPhoneInput";var to=oo;var gt=to;var Ie=(e,o)=>e.toFixed(o);function ro({amountName:e,currencies:o,currencyName:t,helperText:r,isCurrenciesLoading:n,...l}){let{control:s,watch:d,setValue:u}=useFormContext(),h=d(t),f=d(e),F=S=>{u(t,S),u(e,Ie(Number(f),S?.decimals||2));};return jsx(Controller,{name:e,control:s,render:({field:{onChange:S,value:x},fieldState:m})=>jsx(i,{...l,amountValue:x??"",currencies:o,hasError:!!m.error,helperText:r??m.error?.message,onAmountChange:a=>{S(a);},onAmountBlur:a=>{S(Ie(Number(a),h?.decimals||2));},currencyValue:h,onCurrencyChange:F,isCurrenciesLoading:n})})}ro.displayName="RFHAmountInput";var ao=ro;var yt=ao;var Mt=keyframes`
1
+ import {a as a$3}from'./chunk-GCKJQWXA.js';import {a,b,f as f$1,d,c,h as h$1,i,e}from'./chunk-GDDSIVZY.js';import {a as a$4}from'./chunk-SSBDL6XS.js';import {a as a$1}from'./chunk-2OCEVAZN.js';import {a as a$2,b as b$1}from'./chunk-MUR4ILTY.js';import {f,ba,j,P,O,h,ca}from'./chunk-IBBWXV4R.js';import {yc,Ac}from'./chunk-2SKLD6QR.js';import {Pc,A}from'./chunk-OK75VWGZ.js';import*as de from'react';import de__default,{useId,useState,useEffect,useMemo,useRef,useCallback}from'react';import {useFormContext,Controller,FormProvider,useForm}from'react-hook-form';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import ne from'@mui/material/Box';import Ft from'@mui/material/Button';import Ct from'@mui/material/Input';import lo from'@mui/material/ListSubheader';import io from'@mui/material/MenuItem';import {keyframes,styled,alpha}from'@mui/material/styles';import Rt from'@mui/material/Popper';import Lt from'@mui/material/TextField';function st({onSubmit:e,methods:o,children:t}){let r=yc(useId(),"default-form");return jsx(FormProvider,{...o,children:jsx("form",{id:r,"data-testid":"DefaultForm",onSubmit:e,noValidate:true,children:t})})}var ut=de__default.memo(st);var Xe=de.forwardRef(({name:e,helperText:o,hideArrows:t,feedback:r,...n},l)=>{let{control:s}=useFormContext();return jsx(Controller,{name:e,control:s,defaultValue:n.defaultValue,render:({field:d,fieldState:u})=>jsx(a,{...n,...d,ref:l,hasError:!!u.error,helperText:o??u.error?.message,feedback:r,hideArrows:t,onChange:h=>{d.onChange(h),n.onChange?.(h);},onWheel:h=>{h.target instanceof HTMLElement&&h.target.blur();}})})});Xe.displayName="RFHFormInput";var Ze=de.memo(Xe);var ht=Ze;function oo({phoneName:e,countries:o,countryName:t,helperText:r,isCountriesLoading:n,disabled:l,feedback:s,...d}){let{control:u,watch:h,setValue:f}=useFormContext(),F=h(t),S=x=>{f(t,x);};return jsx(Controller,{name:e,control:u,render:({field:{onChange:x,value:m},fieldState:a})=>jsx(h$1,{...d,phoneValue:m,countries:o,hasError:!!a.error,helperText:r??a.error?.message,feedback:s,onPhoneChange:C=>{x(C);},disabled:l,countryValue:F,onCountryChange:S,isCountriesLoading:n})})}oo.displayName="RFHPhoneInput";var to=oo;var gt=to;var Ie=(e,o)=>e.toFixed(o);function ro({amountName:e,currencies:o,currencyName:t,helperText:r,isCurrenciesLoading:n,...l}){let{control:s,watch:d,setValue:u}=useFormContext(),h=d(t),f=d(e),F=S=>{u(t,S),u(e,Ie(Number(f),S?.decimals||2));};return jsx(Controller,{name:e,control:s,render:({field:{onChange:S,value:x},fieldState:m})=>jsx(i,{...l,amountValue:x??"",currencies:o,hasError:!!m.error,helperText:r??m.error?.message,onAmountChange:a=>{S(a);},onAmountBlur:a=>{S(Ie(Number(a),h?.decimals||2));},currencyValue:h,onCurrencyChange:F,isCurrenciesLoading:n})})}ro.displayName="RFHAmountInput";var ao=ro;var yt=ao;var Mt=keyframes`
2
2
  0% {
3
3
  transform: rotate(-90deg);
4
4
  }