@tap-payments/os-micro-frontend-shared 0.3.303 → 0.3.305

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 (142) hide show
  1. package/build/_chunks/{chunk-25PY6EQI.js → chunk-2FXORJYX.js} +1 -1
  2. package/build/_chunks/{chunk-THSE46VC.js → chunk-2JH5SEI4.js} +1 -1
  3. package/build/_chunks/{chunk-5OC2QXZL.js → chunk-34HWDL5J.js} +1 -1
  4. package/build/_chunks/{chunk-VRGBJY4Q.js → chunk-35FTGOAE.js} +2 -2
  5. package/build/_chunks/{chunk-W77B5KVI.js → chunk-3CGM5AIR.js} +1 -1
  6. package/build/_chunks/{chunk-JSTCL624.js → chunk-3H3HOIU4.js} +1 -1
  7. package/build/_chunks/{chunk-53X3U5WT.js → chunk-4HUVBNX2.js} +1 -1
  8. package/build/_chunks/{chunk-ZGVTCYRV.js → chunk-4PLIYELJ.js} +1 -1
  9. package/build/_chunks/{chunk-BM6CKUSS.js → chunk-4RBTPX6N.js} +1 -1
  10. package/build/_chunks/{chunk-WE7OB4CG.js → chunk-4SW5QVKY.js} +1 -1
  11. package/build/_chunks/{chunk-XFEWBGH5.js → chunk-5CCHNAHI.js} +1 -1
  12. package/build/_chunks/{chunk-OJS6C6S6.js → chunk-65P4G37C.js} +1 -1
  13. package/build/_chunks/{chunk-PEOYN7GO.js → chunk-6ADYX62Z.js} +1 -1
  14. package/build/_chunks/{chunk-LZKPVI6B.js → chunk-6DSDVDT3.js} +1 -1
  15. package/build/_chunks/{chunk-57D57K75.js → chunk-6ICYOZW5.js} +1 -1
  16. package/build/_chunks/{chunk-K6633DSY.js → chunk-6UVTRYZN.js} +1 -1
  17. package/build/_chunks/{chunk-GDIPXZTC.js → chunk-6V4MRGTX.js} +1 -1
  18. package/build/_chunks/{chunk-4IQ3J4LF.js → chunk-6ZW3D5OZ.js} +1 -1
  19. package/build/_chunks/{chunk-SXXIPX35.js → chunk-7ECO5F7E.js} +1 -1
  20. package/build/_chunks/{chunk-MMXWSV6V.js → chunk-7IPJF2Q5.js} +1 -1
  21. package/build/_chunks/{chunk-RD4DGYOQ.js → chunk-AWGAUMAO.js} +1 -1
  22. package/build/_chunks/{chunk-P4S7PQWK.js → chunk-CAURIL6W.js} +1 -1
  23. package/build/_chunks/{chunk-S3EORDGB.js → chunk-CCEZR7F5.js} +1 -1
  24. package/build/_chunks/{chunk-SHUOO4XL.js → chunk-COUBVLRL.js} +1 -1
  25. package/build/_chunks/{chunk-OBELDQWE.js → chunk-DAZ5CGRZ.js} +1 -1
  26. package/build/_chunks/{chunk-76GQ37UR.js → chunk-DRPIQ533.js} +1 -1
  27. package/build/_chunks/{chunk-OHT5KJVT.js → chunk-EKGX7YJF.js} +1 -1
  28. package/build/_chunks/{chunk-BFBJOTG2.js → chunk-F5LDGF6K.js} +1 -1
  29. package/build/_chunks/{chunk-NOLYKMU3.js → chunk-GB3LATPS.js} +1 -1
  30. package/build/_chunks/{chunk-RL2HFGDQ.js → chunk-GMUHB2ZQ.js} +1 -1
  31. package/build/_chunks/{chunk-WXWRA4VU.js → chunk-HTMNZR65.js} +1 -1
  32. package/build/_chunks/{chunk-AN56DE5R.js → chunk-HUBSMYSG.js} +1 -1
  33. package/build/_chunks/{chunk-LVK5VG43.js → chunk-HYP5LBK6.js} +1 -1
  34. package/build/_chunks/{chunk-IM4LTXAH.js → chunk-I6PBVOOY.js} +1 -1
  35. package/build/_chunks/{chunk-4EOSR5FI.js → chunk-IMNIK3FP.js} +1 -1
  36. package/build/_chunks/{chunk-PNLHCTCW.js → chunk-JPYELJWZ.js} +1 -1
  37. package/build/_chunks/{chunk-6UMTGWFW.js → chunk-L42RXVBO.js} +1 -1
  38. package/build/_chunks/{chunk-VJSBADTP.js → chunk-L4HCC6CP.js} +1 -1
  39. package/build/_chunks/{chunk-CFZR2VK2.js → chunk-LSB4PUC5.js} +1 -1
  40. package/build/_chunks/{chunk-4NHNAJKD.js → chunk-MZ43ZE4Y.js} +1 -1
  41. package/build/_chunks/{chunk-DOK4RXSY.js → chunk-N25C2E4O.js} +1 -1
  42. package/build/_chunks/{chunk-GFEQDSYL.js → chunk-ND3VKGYK.js} +1 -1
  43. package/build/_chunks/{chunk-IHXFOGTQ.js → chunk-NJYMJRVD.js} +1 -1
  44. package/build/_chunks/{chunk-JY4U45C5.js → chunk-O3ZTDKHA.js} +1 -1
  45. package/build/_chunks/{chunk-I3FJZTZ5.js → chunk-P6TBY5JC.js} +1 -1
  46. package/build/_chunks/{chunk-HXJSH3G2.js → chunk-PLR3SYB3.js} +1 -1
  47. package/build/_chunks/{chunk-F537SQRQ.js → chunk-RLAQECJX.js} +1 -1
  48. package/build/_chunks/{chunk-QLASTW76.js → chunk-SUO6Z5IZ.js} +1 -1
  49. package/build/_chunks/{chunk-VBGXGFX5.js → chunk-SUYLGWZR.js} +1 -1
  50. package/build/_chunks/{chunk-6LO7PI3V.js → chunk-SW3QMIZP.js} +1 -1
  51. package/build/_chunks/{chunk-WYH4IUDI.js → chunk-TATQEBZC.js} +1 -1
  52. package/build/_chunks/{chunk-LJWTINBT.js → chunk-TXWOMXKB.js} +1 -1
  53. package/build/_chunks/{chunk-7S2LHLZC.js → chunk-TZQ3YZ5M.js} +1 -1
  54. package/build/_chunks/{chunk-HIGHKQAD.js → chunk-UEQBD3JS.js} +1 -1
  55. package/build/_chunks/{chunk-6ZPNLCMN.js → chunk-UHFL62LB.js} +1 -1
  56. package/build/_chunks/{chunk-DFN7XD7P.js → chunk-UOXM7EQZ.js} +1 -1
  57. package/build/_chunks/{chunk-N57Z6DIM.js → chunk-UP6RHAOC.js} +1 -1
  58. package/build/_chunks/{chunk-26OK5BYP.js → chunk-UQIO3NDG.js} +1 -1
  59. package/build/_chunks/{chunk-L2GLBT5H.js → chunk-VUQ6DJJD.js} +1 -1
  60. package/build/_chunks/{chunk-TZZV6XFT.js → chunk-W5JRHPDN.js} +1 -1
  61. package/build/_chunks/{chunk-NR5II44J.js → chunk-W5TL2PDS.js} +1 -1
  62. package/build/_chunks/{chunk-PPO3PSE7.js → chunk-Y3TWYFK2.js} +1 -1
  63. package/build/_chunks/{chunk-RXCJF7BB.js → chunk-Y5L72QWY.js} +1 -1
  64. package/build/_chunks/{chunk-WM3AFXCW.js → chunk-YT3NPFXA.js} +1 -1
  65. package/build/_chunks/{chunk-UF4J7JEY.js → chunk-YTADTKVU.js} +1 -1
  66. package/build/_chunks/{chunk-VYVRCIYJ.js → chunk-ZAAUVC2D.js} +1 -1
  67. package/build/components/ActionsDropdownMenu/index.js +1 -1
  68. package/build/components/Alert/index.js +1 -1
  69. package/build/components/AreaChart/index.js +1 -1
  70. package/build/components/Autocomplete/index.js +1 -1
  71. package/build/components/AvatarStack/index.js +1 -1
  72. package/build/components/Calender/index.js +1 -1
  73. package/build/components/Card/index.js +1 -1
  74. package/build/components/CardList/index.js +1 -1
  75. package/build/components/ColorPicker/index.js +1 -1
  76. package/build/components/ColumnViews/index.js +1 -1
  77. package/build/components/ConfirmDialog/index.js +1 -1
  78. package/build/components/CountryFlag/index.js +1 -1
  79. package/build/components/CurrenciesMenu/index.js +1 -1
  80. package/build/components/CurrencyAmount/index.js +1 -1
  81. package/build/components/CurrencyAmountInput/index.js +1 -1
  82. package/build/components/CurrencySymbol/index.js +1 -1
  83. package/build/components/DateFilter/index.js +1 -1
  84. package/build/components/DateInput/index.js +1 -1
  85. package/build/components/DeviceIcon/index.js +1 -1
  86. package/build/components/EmptyState/index.js +1 -1
  87. package/build/components/ErrorToast/index.js +1 -1
  88. package/build/components/ExpandableChip/index.js +1 -1
  89. package/build/components/ExportReportButton/index.js +1 -1
  90. package/build/components/FileDropbox/index.js +1 -1
  91. package/build/components/FilePreview/index.js +1 -1
  92. package/build/components/FileUploader/index.js +1 -1
  93. package/build/components/FilterBar/index.js +1 -1
  94. package/build/components/FilterButton/index.js +1 -1
  95. package/build/components/FilterChip/index.js +1 -1
  96. package/build/components/FilterPopover/index.js +1 -1
  97. package/build/components/FlipCard/index.js +1 -1
  98. package/build/components/GroupedSelect/index.js +1 -1
  99. package/build/components/HeatMap/index.js +1 -1
  100. package/build/components/ListHeader/index.js +1 -1
  101. package/build/components/Loader/index.js +1 -1
  102. package/build/components/Logo/index.js +1 -1
  103. package/build/components/MaskedText/index.js +1 -1
  104. package/build/components/MultiLevelMenu/index.js +1 -1
  105. package/build/components/MultiLevelSelect/index.js +1 -1
  106. package/build/components/PhoneInput/index.js +1 -1
  107. package/build/components/ProgressRing/index.js +1 -1
  108. package/build/components/RadioGroup/index.js +1 -1
  109. package/build/components/RangeCalender/index.js +1 -1
  110. package/build/components/RatingCount/index.js +1 -1
  111. package/build/components/SearchButton/index.js +1 -1
  112. package/build/components/SearchInput/index.js +1 -1
  113. package/build/components/Select/index.js +1 -1
  114. package/build/components/SheetViewChip/index.js +1 -1
  115. package/build/components/Sidebar/index.js +1 -1
  116. package/build/components/StatusIcons/index.js +1 -1
  117. package/build/components/TableCells/index.js +1 -1
  118. package/build/components/TableViewToggleButton/index.js +1 -1
  119. package/build/components/TextInput/index.js +1 -1
  120. package/build/components/Timeline/index.js +1 -1
  121. package/build/components/Timepicker/index.js +1 -1
  122. package/build/components/VerificationIcon/index.js +1 -1
  123. package/build/components/VirtualTables/index.js +1 -1
  124. package/build/components/Window/index.js +1 -1
  125. package/build/components/WindowServices/index.js +1 -1
  126. package/build/components/WindowToolbar/index.js +1 -1
  127. package/build/components/index.js +1 -1
  128. package/build/components/modules/JSONViewWindow/index.js +1 -1
  129. package/build/components/modules/RangeCalender/index.js +1 -1
  130. package/build/components/modules/VirtualTables/index.js +1 -1
  131. package/build/components/modules/WindowShell/index.js +1 -1
  132. package/build/components/modules/index.js +1 -1
  133. package/build/components/primitives/index.js +1 -1
  134. package/build/constants/index.d.ts +1 -0
  135. package/build/constants/index.js +1 -1
  136. package/build/constants/roles.d.ts +11 -0
  137. package/build/datetime/components/index.js +1 -1
  138. package/build/hooks/core/index.js +1 -1
  139. package/build/hooks/index.js +1 -1
  140. package/build/index.js +1 -1
  141. package/build/utils/index.js +1 -1
  142. package/package.json +1 -1
@@ -1 +1 @@
1
- import {h,b as b$1,f as f$1}from'./chunk-P4S7PQWK.js';import {b,h as h$1,c as c$1,e,d,j as j$1,i}from'./chunk-NR5II44J.js';import {g,f,h as h$2}from'./chunk-ISC5KT5E.js';import {H as H$1,j}from'./chunk-6ZPNLCMN.js';import {a}from'./chunk-VJSBADTP.js';import {Gb,Hb}from'./chunk-MMXWSV6V.js';import {c}from'./chunk-53X3U5WT.js';import {Wd,ta,el,fl,xi,Jk,A,ye,xe as xe$1,sa,qa,ra}from'./chunk-VRGBJY4Q.js';import {forwardRef,memo,createContext,useState,useRef,useMemo,useContext,useEffect,useCallback,useId}from'react';import ie from'@mui/material/Box';import it from'@mui/material/Typography';import P from'@uiw/react-json-view';import {motion,AnimatePresence}from'framer-motion';import {styled}from'@mui/material/styles';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {useTranslation}from'react-i18next';var O="os-shared-JSONViewWindow",m={root:`${O}-root`,body:`${O}-body`,requestPane:`${O}-requestPane`,responsePane:`${O}-responsePane`,section:`${O}-section`,title:`${O}-title`,actions:`${O}-actions`,scroll:`${O}-scroll`,footer:`${O}-footer`,count:`${O}-count`},N=400,B=545,Z=.5,co=20,mo=30,Ne="Items",We="JSON Response",be="JSON Request & Response",fo="rgb(231, 231, 231)";var uo=styled("span")({display:"inline-flex",alignItems:"center",gap:"6px"}),xo=styled("span")({margin:"0px",fontStyle:"normal",fontStretch:"normal",color:"rgb(32, 35, 43)",letterSpacing:"0px",fontSize:"9px",fontWeight:400,lineHeight:"10.8px"}),go=styled("span")({margin:"0px",fontStyle:"normal",fontStretch:"normal",color:"rgb(32, 35, 43)",letterSpacing:"0px",fontSize:"10.5px",fontWeight:700,lineHeight:"12.6px",textAlign:"right"});var ho=forwardRef(function({totalCount:o,id:n,className:t,sx:r},i){return jsx(h,{ref:i,id:n,"data-testid":n??"Footer",className:Hb(g,m.footer,t),sx:Gb({justifyContent:"flex-start",cursor:"move"},r),children:o!=null?jsx(H$1,{variant:"text",className:m.count,sx:{cursor:"text",borderWidth:.75},children:jsxs(uo,{children:[jsx(xo,{children:Ne}),jsx(go,{children:c(o??0)})]})}):null})});ho.displayName="Footer";var H=memo(ho);var yo=styled("button")(({theme:e})=>({outline:"none",cursor:"pointer",border:"1px solid transparent","&:hover":{boxShadow:e.shadows[8]},borderRadius:"0.25rem",position:"relative",backgroundColor:e.palette.background.transparent,display:"inline-flex",alignItems:"center",justifyContent:"center"})),Ie=styled(motion.img)({height:"14px",width:"14px"});function oe({"data-copied":e,style:o,onClick:n},{keyName:t}){return t?jsxs(yo,{style:o,onClick:r=>{n?.(r);},children:[jsx(AnimatePresence,{children:e&&jsx(Ie,{initial:{opacity:0},animate:{opacity:1,position:"absolute"},exit:{opacity:0},transition:{duration:.4},src:ta,alt:"icon"},"copied-icon")}),jsx(AnimatePresence,{children:!e&&jsx(Ie,{initial:{opacity:0},animate:{opacity:1,position:"absolute"},exit:{opacity:0},transition:{duration:.4},src:ra,alt:"icon"},"copy-icon")})]}):jsx("span",{})}var No=styled("button")(({theme:e})=>({padding:"0rem",borderRadius:"0.25rem",backgroundColor:e.palette.background.paper,display:"flex",alignItems:"center",justifyContent:"center",gap:"0.25rem",color:e.palette.text.primary,fontSize:"0.625rem",fontWeight:e.typography.fontWeightBold,outline:"none",cursor:"pointer",border:`1px solid ${e.palette.grey[100]}`,"&:hover":{boxShadow:"0px 0px 8px 0px rgba(31, 136, 208, 0.30)",border:`1px solid ${e.palette.info.dark};`},position:"relative",overflow:"hidden",transition:"all 0.2s ease-in-out",width:"24px",height:"24px",flexShrink:0}));function Wo({onClick:e,icon:o,label:n,disableAnimation:t,...r}){let[i,s]=useState(false),{t:c}=useTranslation();return jsxs(No,{...r,onClick:p=>{e?.(p),!t&&(s(true),setTimeout(()=>{s(false);},2e3));},children:[jsxs(ie,{sx:{width:"16px",display:"flex",overflow:"hidden",justifyContent:"center",alignItems:"center"},children:[jsx(AnimatePresence,{mode:"wait",children:i&&jsx(motion.img,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.4}},exit:{opacity:0,transition:{duration:.1}},transition:{duration:.4},src:ta,alt:"icon"},"id-icon")}),jsx(AnimatePresence,{mode:"wait",children:!i&&jsx(motion.img,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.4}},exit:{opacity:0,transition:{duration:.1}},transition:{duration:.4},src:o,alt:"icon"},"id-icon")})]}),n&&jsxs(Fragment,{children:[jsx(AnimatePresence,{children:i&&jsx(motion.span,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,position:"absolute"},transition:{duration:.4},children:c("copied")})}),jsx(AnimatePresence,{children:!i&&jsx(motion.span,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.4}},exit:{opacity:0,position:"absolute",width:"53px"},transition:{duration:.4},children:n})})]})]})}Wo.displayName="IconButton";var T=memo(Wo);var bo=styled("div")(()=>({display:"flex",alignItems:"center",position:"relative",flexShrink:0,width:"24px",height:"24px"})),Co=styled("button")(({theme:e,isActive:o})=>({width:"24px",height:"24px",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",border:`1px solid ${o?e.palette.info.dark:e.palette.grey[100]}`,backgroundColor:e.palette.background.paper,cursor:"pointer",outline:"none",padding:0,position:"relative",zIndex:11,transition:"all 0.2s ease-in-out","&:hover":{boxShadow:"0px 0px 8px 0px rgba(31, 136, 208, 0.30)",border:`1px solid ${e.palette.info.dark}`}})),Io=styled(motion.div)(()=>({position:"absolute",right:0,top:0,height:"24px",display:"flex",alignItems:"center",zIndex:20,background:"transparent"})),Oo=styled(motion.input)(({theme:e})=>({width:"177px",height:"24px",borderRadius:"4px",color:e.palette.text.primary,fontSize:"10px",outline:0,background:e.palette.background.paper,boxShadow:"0px 0px 8px 0px rgba(31, 136, 208, 0.30)",border:`1px solid ${e.palette.info.dark}`,paddingLeft:"8px",boxSizing:"border-box","::placeholder":{color:"#D5D5D5"}})),Te={position:"absolute",top:"50%",transform:"translateY(-50%)",zIndex:2,userSelect:"none"},To={...Te,background:"none",border:"none",padding:0,margin:0,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",outline:"none","&:disabled":{opacity:.3,cursor:"default"}},Po=styled("button")(()=>({...To,right:53})),_o=styled("button")(()=>({...To,right:39})),vo=styled(motion.img)(()=>({...Te,right:24,width:10,height:10,cursor:"pointer"})),Jo=styled(motion.img)(()=>({...Te,right:8,width:11,height:11,cursor:"default"})),Pe=styled("img")(()=>({width:10,height:10})),Eo=styled("img")(()=>({width:12,height:12})),Vo=styled("span")(({theme:e})=>({position:"absolute",right:67,top:"50%",transform:"translateY(-50%)",fontSize:"9px",lineHeight:1,color:e.palette.text.secondary,whiteSpace:"nowrap",userSelect:"none",zIndex:2,pointerEvents:"none"}));function Ht({value:e,onChange:o,currentIndex:n,totalCount:t,onPrev:r,onNext:i,onOpen:s,placeholder:c="Search..."}){let[a,p]=useState(false),u=useRef(null),f=e.trim().length>0,y=t>0,S=f,b=()=>{s?.(),p(true),requestAnimationFrame(()=>u.current?.focus());},C=()=>{o(""),p(false);};return jsxs(bo,{children:[jsx(AnimatePresence,{children:a&&jsxs(Io,{initial:{clipPath:"inset(0 0 0 100%)",opacity:0},animate:{clipPath:"inset(0 0 0 0%)",opacity:1},exit:{clipPath:"inset(0 0 0 100%)",opacity:0},transition:{duration:.22,ease:[.4,0,.2,1]},children:[jsx(Oo,{ref:u,initial:false,animate:{paddingRight:S?"98px":"24px"},transition:{duration:.15},placeholder:c,value:e,onChange:I=>o(I.target.value),onKeyDown:I=>{I.key==="Enter"&&(I.shiftKey?r():i()),I.key==="Escape"&&C();},onBlur:()=>{f||p(false);}}),S&&jsx(Po,{onClick:r,disabled:!y,title:"Previous match (Shift+Enter)",children:jsx(Pe,{src:el,alt:"prev"})}),S&&jsx(_o,{onClick:i,disabled:!y,title:"Next match (Enter)",children:jsx(Pe,{src:fl,alt:"next"})}),S&&jsx(vo,{src:xi,alt:"clear",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:C}),jsx(Jo,{src:Jk,alt:"search",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}}),S&&jsx(Vo,{children:y?`${n+1}/${t}`:"0/0"})]},"input-area")}),jsx(AnimatePresence,{children:!a&&jsx(motion.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.15},children:jsx(Co,{isActive:false,onClick:b,title:"Search",children:jsx(Eo,{src:A,alt:"search"})})})})]})}var M=memo(Ht);function Do(e,o){let n=[],t=o.length,r=0,i=e.indexOf(o,r);for(;i!==-1;){let s=i+t;n.push([i,s]),r=s,i=e.indexOf(o,r);}return n}var Mt={padding:0,outline:"none"};function Ao({text:e,queryLength:o,ranges:n,idPrefix:t}){let r=[],i=0;return n.forEach(([s,c],a)=>{s>i&&r.push(e.slice(i,s)),r.push(jsx("mark",{style:Mt,children:e.slice(s,s+o)},`${t}-${a}`)),i=c;}),i<e.length&&r.push(e.slice(i)),jsx(Fragment,{children:r})}function R({text:e,query:o}){let n=useId(),t=useMemo(()=>o.trim().toLowerCase(),[o]),r=useMemo(()=>{if(!t)return e;let i=e.toLowerCase(),s=Do(i,t);return s.length===0?e:jsx(Ao,{text:e,queryLength:o.length,ranges:s,idPrefix:n})},[e,o.length,t,n]);return jsx(Fragment,{children:r})}var Lo={overflow:"visible",boxShadow:"none",filter:"drop-shadow(0 0 20px rgba(0, 0, 0, 0.15))"},_e={"--w-rjv-color":"#9cdcfe","--w-rjv-key-string":"#357fb9","--w-rjv-background-color":"#ffffff","--w-rjv-line-color":"#ffffff","--w-rjv-arrow-color":"#116e6bed","--w-rjv-edit-color":"#9cdcfe","--w-rjv-info-color":"#9c9c9c7a","--w-rjv-update-color":"#FFE20B","--w-rjv-copied-color":"#9cdcfe","--w-rjv-copied-success-color":"#28a745","--w-rjv-curlybraces-color":"#000000","--w-rjv-colon-color":"#000000","--w-rjv-brackets-color":"#000000","--w-rjv-quotes-color":"#9cdcfe","--w-rjv-quotes-string-color":"#c27c46","--w-rjv-type-string-color":"#c27c46","--w-rjv-type-int-color":"#956ea5","--w-rjv-type-float-color":"#956ea5","--w-rjv-type-bigint-color":"#956ea5","--w-rjv-type-boolean-color":"#357fb9","--w-rjv-type-date-color":"#956ea5","--w-rjv-type-url-color":"#3b89cf","--w-rjv-type-null-color":"#956ea5","--w-rjv-type-nan-color":"#956ea5","--w-rjv-type-undefined-color":"#956ea5",padding:"1rem",height:"100%",overflow:"auto"},zo={..._e,background:"transparent","--w-rjv-line-color":"transparent"},ve=styled(j)(()=>({border:"1px solid rgba(242, 242, 242, 0.70);",display:"inline-flex",height:"24px",minWidth:"73px",padding:"0px 8px",justifyContent:"center",alignItems:"center",gap:"6px",borderRadius:"37.5px",backgroundColor:"#fff",fontSize:"9px",lineHeight:"15px",fontWeight:400})),Je=styled(ie)(()=>({display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",gap:"4px",paddingBlock:"8px",paddingInlineStart:"12px",paddingInlineEnd:"12px",position:"sticky",left:0,right:0,top:0,background:"#fff",zIndex:5,flexShrink:0,minHeight:44})),Ee=styled(ie)(()=>({display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"4px",flexShrink:0,marginLeft:"auto"})),Fo=styled(ie)(()=>({display:"flex",flexDirection:"row",flex:1,minHeight:0,height:"100%",width:"100%",background:"transparent",position:"relative",overflow:"visible"})),Ve=styled(ie)(()=>({display:"flex",flexDirection:"column",flex:1,minHeight:0,overflowY:"auto",overflowX:"hidden"})),qo=styled(motion.div,{shouldForwardProp:e=>!["isRequestShown","isMaximized"].includes(e)})(({isRequestShown:e,isMaximized:o})=>({width:"100%",height:"100%",minHeight:0,overflow:"hidden",background:"#fff",zIndex:20,position:"relative",left:0,display:"flex",flexDirection:"column",flex:1,minWidth:0,borderBottomRightRadius:"12px",borderBottomLeftRadius:e?0:"12px",...o&&{borderBottomLeftRadius:0,borderBottomRightRadius:0}})),$o=styled(motion.div,{shouldForwardProp:e=>!["isMaximized","currentRequestWidth"].includes(e)})(({isMaximized:e,currentRequestWidth:o})=>({backgroundColor:fo,backdropFilter:"blur(24px)",height:"100%",overflowY:"auto",overflowX:"hidden",position:"absolute",width:e?"100%":o,zIndex:19,display:"flex",flexDirection:"column",borderBottomLeftRadius:"12px",top:0,bottom:0})),Ko=styled("span")(()=>({color:"#032F62"})),Uo=styled("span")(()=>({color:"#357fb9"}));function se(e,o){return e.toLowerCase().includes(o)}function ae(e){return e.trim().toLowerCase()}function le(e){let o=ae(e);return (n,{keyName:t})=>{if(!o||!t)return;let r=String(t);if(se(r,o))return jsx(Uo,{children:jsx(R,{text:String(t),query:e})})}}function pe(e){let o=ae(e);return (n,{value:t})=>{if(!o)return;let r=String(t??"");if(se(r,o))return jsxs(Ko,{children:['"',jsx(R,{text:String(t??""),query:e}),'"']})}}function Qo(e,o){return e==null?String(e).includes(o):typeof e=="string"?e.toLowerCase().includes(o):typeof e=="number"||typeof e=="boolean"?String(e).includes(o):false}function Yo(e,o){if(Array.isArray(e)){let n=e.map(t=>Yo(t,o)).filter(t=>t!=null);return n.length>0?n:null}return typeof e=="object"&&e!==null?Xo(e,o):Qo(e,o)?e:null}function Xo(e,o){let n={};for(let[t,r]of Object.entries(e))if(t.toLowerCase().includes(o))n[t]=r;else if(typeof r=="object"&&r!==null){let i=Yo(r,o);i!==null&&(n[t]=i);}else Qo(r,o)&&(n[t]=r);return Object.keys(n).length>0?n:null}function Re(e,o){return o.trim()?Xo(e,o.toLowerCase()):e}function Zo(e,o,n){return {x:e/2-N/4+n*co,y:o/2-B/2+n*mo}}var nt="#FFE20B";function z(e,o){let[n,t]=useState(0),[r,i]=useState(0);useEffect(()=>{if(!o.trim()){i(0),t(0);return}let a=setTimeout(()=>{let p=e.current?.querySelectorAll("mark")??[];i(p.length),t(0);},50);return ()=>clearTimeout(a)},[o,e]),useEffect(()=>{if(!e.current||!o.trim())return;let a=Array.from(e.current.querySelectorAll("mark"));a.forEach((p,u)=>{let f=u===n;p.style.backgroundColor=f?nt:"transparent",p.style.outline=f?`1px solid ${nt}`:"none",p.style.borderRadius="2px";}),a[n]?.scrollIntoView({behavior:"smooth",block:"nearest"});},[n,r,o,e]);let s=useCallback(()=>{r!==0&&t(a=>(a+1)%r);},[r]),c=useCallback(()=>{r!==0&&t(a=>(a-1+r)%r);},[r]);return {currentIndex:n,totalCount:r,goNext:s,goPrev:c}}function st({json:e,requestJson:o={},onJsonSearch:n,onJsonCopy:t,onJsonIdCopy:r,onJsonNodesMinimize:i,onJsonNodesMaximize:s,isRequestShown:c,isToolbarAnimationDisabled:a}){let{isMaximized:p,size:u,isResizing:f}=b$1(),[y,S]=useState(false),[b,C]=useState(true),[x,g]=useState(""),[h,I]=useState(""),D=useRef(null),A=useRef(null),U=z(D,x),G=z(A,h),Wt=useMemo(()=>Object.keys(e??{})?.length??0,[e]),Ae=u.width||N,He=_=>{setTimeout(()=>{navigator.clipboard.writeText(_||"").then(()=>{});},10);},bt=useMemo(()=>Object.keys(o??{})?.length??0,[o]),Me=useMemo(()=>Re(e,x),[e,x]),je=useMemo(()=>Re(o,h),[o,h]);return jsxs(Fo,{"data-testid":"Pane",className:Hb(m.root,m.body),children:[jsx(AnimatePresence,{children:c&&jsx($o,{className:Hb(m.requestPane),initial:{left:0},animate:{left:p?0:-Ae},exit:{left:0},transition:{duration:Z,...a&&{duration:0},...f&&{duration:0}},isMaximized:p,currentRequestWidth:Ae,children:jsxs(ie,{ref:A,sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[jsxs(Je,{className:Hb(m.section),sx:{background:"transparent"},children:[jsx(ve,{variant:"subtitle1",className:Hb(m.title),children:"API Request"}),jsxs(Ee,{className:Hb(m.actions),children:[jsx(M,{value:h,onChange:I,onOpen:()=>n?.(),currentIndex:G.currentIndex,totalCount:G.totalCount,onPrev:G.goPrev,onNext:G.goNext}),jsx(T,{disableAnimation:true,onClick:()=>{b?s?.():i?.(),C(_=>!_);},icon:b?ye:xe$1}),jsx(T,{onClick:()=>{t?.(),navigator.clipboard.writeText(JSON.stringify(o,null,2)).then(()=>{});},icon:sa}),jsx(T,{onClick:()=>{r?.(),navigator.clipboard.writeText(e?.id||"").then(()=>{});},icon:qa})]})]}),h.trim()&&je===null?jsx(ie,{sx:{display:"flex",alignItems:"center",justifyContent:"center",flex:1,height:"100%"},children:jsx(it,{variant:"body2",sx:{fontSize:"0.75rem",color:"text.secondary"},children:"No Data Found"})}):jsx(Ve,{className:Hb(m.scroll),children:jsxs(P,{value:je??o,style:zo,displayDataTypes:false,collapsed:h.trim()?void 0:b?1:void 0,onCopied:(_,v)=>{typeof v=="string"&&He(v);},enableClipboard:false,children:[jsx(P.String,{render:pe(h)}),jsx(P.KeyName,{render:le(h)}),jsx(P.CountInfo,{render:(_,{keyName:v})=>{if(!v)return jsx("span",{})}}),jsx(P.Copied,{render:oe})]})}),jsx(H,{totalCount:bt,sx:{borderBottomRightRadius:0,background:"#f8f9fb"}})]})},"request-pane")}),jsxs(qo,{ref:D,className:Hb(m.responsePane),isMaximized:p,isRequestShown:c,initial:{...p&&{width:"100vw",left:0}},animate:{...p&&{position:"absolute",left:c?"50vw":"0"}},transition:{duration:Z,...a&&{duration:0},...f&&{duration:0}},children:[jsxs(Je,{className:Hb(m.section),children:[jsx(ve,{variant:"subtitle1",className:Hb(m.title),children:"API Response"}),jsxs(Ee,{className:Hb(m.actions),children:[jsx(M,{value:x,onChange:g,onOpen:()=>n?.(),currentIndex:U.currentIndex,totalCount:U.totalCount,onPrev:U.goPrev,onNext:U.goNext}),jsx(T,{disableAnimation:true,onClick:()=>{y?s?.():i?.(),S(_=>!_);},icon:y?ye:xe$1}),jsx(T,{onClick:()=>{t?.(),navigator.clipboard.writeText(JSON.stringify(e,null,2)).then(()=>{});},icon:sa}),jsx(T,{onClick:()=>{r?.(),navigator.clipboard.writeText(e?.id||"").then(()=>{});},icon:qa})]})]}),x.trim()&&Me===null?jsx(ie,{sx:{display:"flex",alignItems:"center",justifyContent:"center",flex:1,height:"100%"},children:jsx(it,{variant:"body2",sx:{fontSize:"0.75rem",color:"text.secondary"},children:"No Data Found"})}):jsx(Ve,{className:Hb(m.scroll),children:jsxs(P,{value:Me??e,style:_e,displayDataTypes:false,collapsed:x.trim()?void 0:y?1:void 0,onCopied:(_,v)=>{typeof v=="string"&&He(v);},children:[jsx(P.String,{render:pe(x)}),jsx(P.KeyName,{render:le(x)}),jsx(P.CountInfo,{render:(_,{keyName:v})=>{if(!v)return jsx("span",{})}}),jsx(P.Copied,{render:oe})]})}),jsx(H,{totalCount:Wt,sx:{borderBottomLeftRadius:c?0:"12px",background:"#f8f9fb"}})]})]})}st.displayName="Pane";var me=memo(st);var Ut="os-shared-JSONViewWindowToolbar",F={root:`${Ut}-root`};var lt=forwardRef(function({title:o,onClose:n,onMaximize:t,maximized:r=false,onRequestClick:i$1,requestDirection:s="left",showRequestIcon:c=false,id:a,className:p,sx:u},f$1){return jsxs(b,{ref:f$1,id:a??f,"data-testid":a??"Toolbar",sx:Gb({backgroundColor:"#f9f9f9",backdropFilter:"none"},u),className:Hb(F.root,p),children:[jsxs(h$1,{children:[jsx(c$1,{onClick:n}),jsx(e,{isMaximized:r,onClick:t}),c&&jsx(d,{onClick:i$1,direction:s,children:"Request"})]}),jsx(j$1,{title:o,icon:Wd}),jsx(i,{})]})});lt.displayName="Toolbar";var $=memo(lt);var Yt="os-shared-JSONViewWindowContent",pt={root:`${Yt}-root`};var dt=styled(motion.div)({flexShrink:0}),mt=styled("div")({display:"contents"});function en({requestJson:e={},onClose:o,onJsonRequestOpen:n,isRequestShown:t,setIsRequestShown:r,isToolbarAnimationDisabled:i,setIsToolbarAnimationDisabled:s,className:c,...a}){let{isMaximized:p,setIsMaximized:u,setSize:f,size:y,isResizing:S}=b$1(),b=Object.keys(e??{})?.length,C=y.width||N;return jsxs(Fragment,{children:[jsx(dt,{animate:{width:p?"100%":t?C*2:C,x:!p&&t?-C:0},transition:{duration:S||i?0:h$2},children:jsx($,{title:t?be:We,onClose:()=>o(),onMaximize:()=>{u(x=>!x),s(true),setTimeout(()=>{s(false);},h$2*1e3);},maximized:p,onRequestClick:()=>{r(x=>!x),s(false),t||(n?.(),f({width:N,height:B}));},requestDirection:t?"right":"left",showRequestIcon:!!b})}),jsx(mt,{className:Hb(pt.root,c),children:jsx(me,{...a,requestJson:e,onClose:o,onJsonRequestOpen:n,isRequestShown:t,isToolbarAnimationDisabled:i})})]})}var K=memo(en);var k=createContext({windows:[],open:()=>{},close:()=>{},closeAll:()=>{},handleWindowMinimize:()=>{},handleWindowOrder:()=>{},registerJSONViewWindowEvents:()=>{},containerRef:{current:null}});function ut({list:e,events:o,onClose:n,isWindowMinimized:t,windowOrder:r}){return e?.length?jsx(Fragment,{children:e.map((i,s)=>jsx(xe,{index:s,...o,...i,onClose:()=>{n(s);},isWindowMinimized:t,windowOrder:r},i.json.id))}):null}ut.displayName="List";var ue=memo(ut);var gt=({children:e,containerRef:o})=>{let[n,t]=useState([]),[r,i]=useState(false),[s,c]=useState(1),a=useRef({}),p=useCallback(g=>{if(n.length===7){alert("Maximum allowed active JSON View Window is 7 per table.");return}if(n.some(A=>A.json.id===g.json.id))return;let h=structuredClone(g.json),I=h.request_body,D={...g,json:h,requestJson:g.requestJson||I||void 0};delete D.json.request_body,t(A=>[...A,D]);},[n]),u=useCallback(g=>{t(h=>h.filter((I,D)=>g!==D));},[]),f=useCallback(()=>{t([]);},[]),y=useCallback(g=>{i(g);},[]),S=useCallback(g=>{c(g);},[]),b=useCallback(g=>{a.current=g;},[]),C=useMemo(()=>({onJsonRequestOpen:()=>a.current.onJsonRequestOpen?.(),onJsonSearch:()=>a.current.onJsonSearch?.(),onJsonCopy:()=>a.current.onJsonCopy?.(),onJsonIdCopy:()=>a.current.onJsonIdCopy?.(),onJsonNodesMinimize:()=>a.current.onJsonNodesMinimize?.(),onJsonNodesMaximize:()=>a.current.onJsonNodesMaximize?.()}),[]),x=useMemo(()=>({windows:n,open:p,close:u,closeAll:f,handleWindowMinimize:y,handleWindowOrder:S,registerJSONViewWindowEvents:b,containerRef:o}),[n,p,u,f,y,S,b,o]);return jsxs(k.Provider,{value:x,children:[e,jsx(ue,{list:n,events:C,onClose:u,isWindowMinimized:r,windowOrder:s})]})};function yt(e){let{containerRef:o}=useContext(k),{height:n,width:t}=a(),[r,i]=useState(false),[s,c]=useState(false);return jsx(f$1,{isOpen:true,onClose:e.onClose,containerRef:o,defaultSize:{width:N,height:B},minSize:{width:N,height:300},defaultPosition:Zo(t,n,e.index),order:e.windowOrder,isMinimized:e.isWindowMinimized,id:"json-view-window",className:Hb(m.root,e.className),sx:Lo,children:jsx(K,{...e,isRequestShown:r,setIsRequestShown:i,isToolbarAnimationDisabled:s,setIsToolbarAnimationDisabled:c})})}yt.displayName="JSONViewWindow";var xe=memo(yt);var Nt=({isWindowMinimized:e,windowOrder:o,...n}={})=>{let{windows:t,open:r,close:i,closeAll:s,handleWindowMinimize:c,handleWindowOrder:a,registerJSONViewWindowEvents:p}=useContext(k),u=useCallback(()=>{c(e??false);},[c,e]),f=useCallback(()=>{a(o??1);},[a,o]);return useEffect(()=>{f();},[f]),useEffect(()=>{u();},[u]),useEffect(()=>{p(n);},[p,n]),{open:r,close:i,closeAll:s,windows:t,count:t.length}};var Ts=xe;export{m as a,N as b,B as c,Z as d,Ne as e,We as f,be as g,H as h,T as i,M as j,R as k,z as l,me as m,F as n,$ as o,K as p,k as q,ue as r,gt as s,Nt as t,Ts as u};
1
+ import {h,b as b$1,f as f$1}from'./chunk-CAURIL6W.js';import {b,h as h$1,c as c$1,e,d,j as j$1,i}from'./chunk-W5TL2PDS.js';import {g,f,h as h$2}from'./chunk-ISC5KT5E.js';import {H as H$1,j}from'./chunk-UHFL62LB.js';import {a}from'./chunk-L4HCC6CP.js';import {Gb,Hb}from'./chunk-7IPJF2Q5.js';import {c}from'./chunk-4HUVBNX2.js';import {Wd,ta,el,fl,xi,Jk,A,ye,xe as xe$1,sa,qa,ra}from'./chunk-35FTGOAE.js';import {forwardRef,memo,createContext,useState,useRef,useMemo,useContext,useEffect,useCallback,useId}from'react';import ie from'@mui/material/Box';import it from'@mui/material/Typography';import P from'@uiw/react-json-view';import {motion,AnimatePresence}from'framer-motion';import {styled}from'@mui/material/styles';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {useTranslation}from'react-i18next';var O="os-shared-JSONViewWindow",m={root:`${O}-root`,body:`${O}-body`,requestPane:`${O}-requestPane`,responsePane:`${O}-responsePane`,section:`${O}-section`,title:`${O}-title`,actions:`${O}-actions`,scroll:`${O}-scroll`,footer:`${O}-footer`,count:`${O}-count`},N=400,B=545,Z=.5,co=20,mo=30,Ne="Items",We="JSON Response",be="JSON Request & Response",fo="rgb(231, 231, 231)";var uo=styled("span")({display:"inline-flex",alignItems:"center",gap:"6px"}),xo=styled("span")({margin:"0px",fontStyle:"normal",fontStretch:"normal",color:"rgb(32, 35, 43)",letterSpacing:"0px",fontSize:"9px",fontWeight:400,lineHeight:"10.8px"}),go=styled("span")({margin:"0px",fontStyle:"normal",fontStretch:"normal",color:"rgb(32, 35, 43)",letterSpacing:"0px",fontSize:"10.5px",fontWeight:700,lineHeight:"12.6px",textAlign:"right"});var ho=forwardRef(function({totalCount:o,id:n,className:t,sx:r},i){return jsx(h,{ref:i,id:n,"data-testid":n??"Footer",className:Hb(g,m.footer,t),sx:Gb({justifyContent:"flex-start",cursor:"move"},r),children:o!=null?jsx(H$1,{variant:"text",className:m.count,sx:{cursor:"text",borderWidth:.75},children:jsxs(uo,{children:[jsx(xo,{children:Ne}),jsx(go,{children:c(o??0)})]})}):null})});ho.displayName="Footer";var H=memo(ho);var yo=styled("button")(({theme:e})=>({outline:"none",cursor:"pointer",border:"1px solid transparent","&:hover":{boxShadow:e.shadows[8]},borderRadius:"0.25rem",position:"relative",backgroundColor:e.palette.background.transparent,display:"inline-flex",alignItems:"center",justifyContent:"center"})),Ie=styled(motion.img)({height:"14px",width:"14px"});function oe({"data-copied":e,style:o,onClick:n},{keyName:t}){return t?jsxs(yo,{style:o,onClick:r=>{n?.(r);},children:[jsx(AnimatePresence,{children:e&&jsx(Ie,{initial:{opacity:0},animate:{opacity:1,position:"absolute"},exit:{opacity:0},transition:{duration:.4},src:ta,alt:"icon"},"copied-icon")}),jsx(AnimatePresence,{children:!e&&jsx(Ie,{initial:{opacity:0},animate:{opacity:1,position:"absolute"},exit:{opacity:0},transition:{duration:.4},src:ra,alt:"icon"},"copy-icon")})]}):jsx("span",{})}var No=styled("button")(({theme:e})=>({padding:"0rem",borderRadius:"0.25rem",backgroundColor:e.palette.background.paper,display:"flex",alignItems:"center",justifyContent:"center",gap:"0.25rem",color:e.palette.text.primary,fontSize:"0.625rem",fontWeight:e.typography.fontWeightBold,outline:"none",cursor:"pointer",border:`1px solid ${e.palette.grey[100]}`,"&:hover":{boxShadow:"0px 0px 8px 0px rgba(31, 136, 208, 0.30)",border:`1px solid ${e.palette.info.dark};`},position:"relative",overflow:"hidden",transition:"all 0.2s ease-in-out",width:"24px",height:"24px",flexShrink:0}));function Wo({onClick:e,icon:o,label:n,disableAnimation:t,...r}){let[i,s]=useState(false),{t:c}=useTranslation();return jsxs(No,{...r,onClick:p=>{e?.(p),!t&&(s(true),setTimeout(()=>{s(false);},2e3));},children:[jsxs(ie,{sx:{width:"16px",display:"flex",overflow:"hidden",justifyContent:"center",alignItems:"center"},children:[jsx(AnimatePresence,{mode:"wait",children:i&&jsx(motion.img,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.4}},exit:{opacity:0,transition:{duration:.1}},transition:{duration:.4},src:ta,alt:"icon"},"id-icon")}),jsx(AnimatePresence,{mode:"wait",children:!i&&jsx(motion.img,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.4}},exit:{opacity:0,transition:{duration:.1}},transition:{duration:.4},src:o,alt:"icon"},"id-icon")})]}),n&&jsxs(Fragment,{children:[jsx(AnimatePresence,{children:i&&jsx(motion.span,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,position:"absolute"},transition:{duration:.4},children:c("copied")})}),jsx(AnimatePresence,{children:!i&&jsx(motion.span,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.4}},exit:{opacity:0,position:"absolute",width:"53px"},transition:{duration:.4},children:n})})]})]})}Wo.displayName="IconButton";var T=memo(Wo);var bo=styled("div")(()=>({display:"flex",alignItems:"center",position:"relative",flexShrink:0,width:"24px",height:"24px"})),Co=styled("button")(({theme:e,isActive:o})=>({width:"24px",height:"24px",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",border:`1px solid ${o?e.palette.info.dark:e.palette.grey[100]}`,backgroundColor:e.palette.background.paper,cursor:"pointer",outline:"none",padding:0,position:"relative",zIndex:11,transition:"all 0.2s ease-in-out","&:hover":{boxShadow:"0px 0px 8px 0px rgba(31, 136, 208, 0.30)",border:`1px solid ${e.palette.info.dark}`}})),Io=styled(motion.div)(()=>({position:"absolute",right:0,top:0,height:"24px",display:"flex",alignItems:"center",zIndex:20,background:"transparent"})),Oo=styled(motion.input)(({theme:e})=>({width:"177px",height:"24px",borderRadius:"4px",color:e.palette.text.primary,fontSize:"10px",outline:0,background:e.palette.background.paper,boxShadow:"0px 0px 8px 0px rgba(31, 136, 208, 0.30)",border:`1px solid ${e.palette.info.dark}`,paddingLeft:"8px",boxSizing:"border-box","::placeholder":{color:"#D5D5D5"}})),Te={position:"absolute",top:"50%",transform:"translateY(-50%)",zIndex:2,userSelect:"none"},To={...Te,background:"none",border:"none",padding:0,margin:0,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",outline:"none","&:disabled":{opacity:.3,cursor:"default"}},Po=styled("button")(()=>({...To,right:53})),_o=styled("button")(()=>({...To,right:39})),vo=styled(motion.img)(()=>({...Te,right:24,width:10,height:10,cursor:"pointer"})),Jo=styled(motion.img)(()=>({...Te,right:8,width:11,height:11,cursor:"default"})),Pe=styled("img")(()=>({width:10,height:10})),Eo=styled("img")(()=>({width:12,height:12})),Vo=styled("span")(({theme:e})=>({position:"absolute",right:67,top:"50%",transform:"translateY(-50%)",fontSize:"9px",lineHeight:1,color:e.palette.text.secondary,whiteSpace:"nowrap",userSelect:"none",zIndex:2,pointerEvents:"none"}));function Ht({value:e,onChange:o,currentIndex:n,totalCount:t,onPrev:r,onNext:i,onOpen:s,placeholder:c="Search..."}){let[a,p]=useState(false),u=useRef(null),f=e.trim().length>0,y=t>0,S=f,b=()=>{s?.(),p(true),requestAnimationFrame(()=>u.current?.focus());},C=()=>{o(""),p(false);};return jsxs(bo,{children:[jsx(AnimatePresence,{children:a&&jsxs(Io,{initial:{clipPath:"inset(0 0 0 100%)",opacity:0},animate:{clipPath:"inset(0 0 0 0%)",opacity:1},exit:{clipPath:"inset(0 0 0 100%)",opacity:0},transition:{duration:.22,ease:[.4,0,.2,1]},children:[jsx(Oo,{ref:u,initial:false,animate:{paddingRight:S?"98px":"24px"},transition:{duration:.15},placeholder:c,value:e,onChange:I=>o(I.target.value),onKeyDown:I=>{I.key==="Enter"&&(I.shiftKey?r():i()),I.key==="Escape"&&C();},onBlur:()=>{f||p(false);}}),S&&jsx(Po,{onClick:r,disabled:!y,title:"Previous match (Shift+Enter)",children:jsx(Pe,{src:el,alt:"prev"})}),S&&jsx(_o,{onClick:i,disabled:!y,title:"Next match (Enter)",children:jsx(Pe,{src:fl,alt:"next"})}),S&&jsx(vo,{src:xi,alt:"clear",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:C}),jsx(Jo,{src:Jk,alt:"search",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}}),S&&jsx(Vo,{children:y?`${n+1}/${t}`:"0/0"})]},"input-area")}),jsx(AnimatePresence,{children:!a&&jsx(motion.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.15},children:jsx(Co,{isActive:false,onClick:b,title:"Search",children:jsx(Eo,{src:A,alt:"search"})})})})]})}var M=memo(Ht);function Do(e,o){let n=[],t=o.length,r=0,i=e.indexOf(o,r);for(;i!==-1;){let s=i+t;n.push([i,s]),r=s,i=e.indexOf(o,r);}return n}var Mt={padding:0,outline:"none"};function Ao({text:e,queryLength:o,ranges:n,idPrefix:t}){let r=[],i=0;return n.forEach(([s,c],a)=>{s>i&&r.push(e.slice(i,s)),r.push(jsx("mark",{style:Mt,children:e.slice(s,s+o)},`${t}-${a}`)),i=c;}),i<e.length&&r.push(e.slice(i)),jsx(Fragment,{children:r})}function R({text:e,query:o}){let n=useId(),t=useMemo(()=>o.trim().toLowerCase(),[o]),r=useMemo(()=>{if(!t)return e;let i=e.toLowerCase(),s=Do(i,t);return s.length===0?e:jsx(Ao,{text:e,queryLength:o.length,ranges:s,idPrefix:n})},[e,o.length,t,n]);return jsx(Fragment,{children:r})}var Lo={overflow:"visible",boxShadow:"none",filter:"drop-shadow(0 0 20px rgba(0, 0, 0, 0.15))"},_e={"--w-rjv-color":"#9cdcfe","--w-rjv-key-string":"#357fb9","--w-rjv-background-color":"#ffffff","--w-rjv-line-color":"#ffffff","--w-rjv-arrow-color":"#116e6bed","--w-rjv-edit-color":"#9cdcfe","--w-rjv-info-color":"#9c9c9c7a","--w-rjv-update-color":"#FFE20B","--w-rjv-copied-color":"#9cdcfe","--w-rjv-copied-success-color":"#28a745","--w-rjv-curlybraces-color":"#000000","--w-rjv-colon-color":"#000000","--w-rjv-brackets-color":"#000000","--w-rjv-quotes-color":"#9cdcfe","--w-rjv-quotes-string-color":"#c27c46","--w-rjv-type-string-color":"#c27c46","--w-rjv-type-int-color":"#956ea5","--w-rjv-type-float-color":"#956ea5","--w-rjv-type-bigint-color":"#956ea5","--w-rjv-type-boolean-color":"#357fb9","--w-rjv-type-date-color":"#956ea5","--w-rjv-type-url-color":"#3b89cf","--w-rjv-type-null-color":"#956ea5","--w-rjv-type-nan-color":"#956ea5","--w-rjv-type-undefined-color":"#956ea5",padding:"1rem",height:"100%",overflow:"auto"},zo={..._e,background:"transparent","--w-rjv-line-color":"transparent"},ve=styled(j)(()=>({border:"1px solid rgba(242, 242, 242, 0.70);",display:"inline-flex",height:"24px",minWidth:"73px",padding:"0px 8px",justifyContent:"center",alignItems:"center",gap:"6px",borderRadius:"37.5px",backgroundColor:"#fff",fontSize:"9px",lineHeight:"15px",fontWeight:400})),Je=styled(ie)(()=>({display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",gap:"4px",paddingBlock:"8px",paddingInlineStart:"12px",paddingInlineEnd:"12px",position:"sticky",left:0,right:0,top:0,background:"#fff",zIndex:5,flexShrink:0,minHeight:44})),Ee=styled(ie)(()=>({display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"4px",flexShrink:0,marginLeft:"auto"})),Fo=styled(ie)(()=>({display:"flex",flexDirection:"row",flex:1,minHeight:0,height:"100%",width:"100%",background:"transparent",position:"relative",overflow:"visible"})),Ve=styled(ie)(()=>({display:"flex",flexDirection:"column",flex:1,minHeight:0,overflowY:"auto",overflowX:"hidden"})),qo=styled(motion.div,{shouldForwardProp:e=>!["isRequestShown","isMaximized"].includes(e)})(({isRequestShown:e,isMaximized:o})=>({width:"100%",height:"100%",minHeight:0,overflow:"hidden",background:"#fff",zIndex:20,position:"relative",left:0,display:"flex",flexDirection:"column",flex:1,minWidth:0,borderBottomRightRadius:"12px",borderBottomLeftRadius:e?0:"12px",...o&&{borderBottomLeftRadius:0,borderBottomRightRadius:0}})),$o=styled(motion.div,{shouldForwardProp:e=>!["isMaximized","currentRequestWidth"].includes(e)})(({isMaximized:e,currentRequestWidth:o})=>({backgroundColor:fo,backdropFilter:"blur(24px)",height:"100%",overflowY:"auto",overflowX:"hidden",position:"absolute",width:e?"100%":o,zIndex:19,display:"flex",flexDirection:"column",borderBottomLeftRadius:"12px",top:0,bottom:0})),Ko=styled("span")(()=>({color:"#032F62"})),Uo=styled("span")(()=>({color:"#357fb9"}));function se(e,o){return e.toLowerCase().includes(o)}function ae(e){return e.trim().toLowerCase()}function le(e){let o=ae(e);return (n,{keyName:t})=>{if(!o||!t)return;let r=String(t);if(se(r,o))return jsx(Uo,{children:jsx(R,{text:String(t),query:e})})}}function pe(e){let o=ae(e);return (n,{value:t})=>{if(!o)return;let r=String(t??"");if(se(r,o))return jsxs(Ko,{children:['"',jsx(R,{text:String(t??""),query:e}),'"']})}}function Qo(e,o){return e==null?String(e).includes(o):typeof e=="string"?e.toLowerCase().includes(o):typeof e=="number"||typeof e=="boolean"?String(e).includes(o):false}function Yo(e,o){if(Array.isArray(e)){let n=e.map(t=>Yo(t,o)).filter(t=>t!=null);return n.length>0?n:null}return typeof e=="object"&&e!==null?Xo(e,o):Qo(e,o)?e:null}function Xo(e,o){let n={};for(let[t,r]of Object.entries(e))if(t.toLowerCase().includes(o))n[t]=r;else if(typeof r=="object"&&r!==null){let i=Yo(r,o);i!==null&&(n[t]=i);}else Qo(r,o)&&(n[t]=r);return Object.keys(n).length>0?n:null}function Re(e,o){return o.trim()?Xo(e,o.toLowerCase()):e}function Zo(e,o,n){return {x:e/2-N/4+n*co,y:o/2-B/2+n*mo}}var nt="#FFE20B";function z(e,o){let[n,t]=useState(0),[r,i]=useState(0);useEffect(()=>{if(!o.trim()){i(0),t(0);return}let a=setTimeout(()=>{let p=e.current?.querySelectorAll("mark")??[];i(p.length),t(0);},50);return ()=>clearTimeout(a)},[o,e]),useEffect(()=>{if(!e.current||!o.trim())return;let a=Array.from(e.current.querySelectorAll("mark"));a.forEach((p,u)=>{let f=u===n;p.style.backgroundColor=f?nt:"transparent",p.style.outline=f?`1px solid ${nt}`:"none",p.style.borderRadius="2px";}),a[n]?.scrollIntoView({behavior:"smooth",block:"nearest"});},[n,r,o,e]);let s=useCallback(()=>{r!==0&&t(a=>(a+1)%r);},[r]),c=useCallback(()=>{r!==0&&t(a=>(a-1+r)%r);},[r]);return {currentIndex:n,totalCount:r,goNext:s,goPrev:c}}function st({json:e,requestJson:o={},onJsonSearch:n,onJsonCopy:t,onJsonIdCopy:r,onJsonNodesMinimize:i,onJsonNodesMaximize:s,isRequestShown:c,isToolbarAnimationDisabled:a}){let{isMaximized:p,size:u,isResizing:f}=b$1(),[y,S]=useState(false),[b,C]=useState(true),[x,g]=useState(""),[h,I]=useState(""),D=useRef(null),A=useRef(null),U=z(D,x),G=z(A,h),Wt=useMemo(()=>Object.keys(e??{})?.length??0,[e]),Ae=u.width||N,He=_=>{setTimeout(()=>{navigator.clipboard.writeText(_||"").then(()=>{});},10);},bt=useMemo(()=>Object.keys(o??{})?.length??0,[o]),Me=useMemo(()=>Re(e,x),[e,x]),je=useMemo(()=>Re(o,h),[o,h]);return jsxs(Fo,{"data-testid":"Pane",className:Hb(m.root,m.body),children:[jsx(AnimatePresence,{children:c&&jsx($o,{className:Hb(m.requestPane),initial:{left:0},animate:{left:p?0:-Ae},exit:{left:0},transition:{duration:Z,...a&&{duration:0},...f&&{duration:0}},isMaximized:p,currentRequestWidth:Ae,children:jsxs(ie,{ref:A,sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[jsxs(Je,{className:Hb(m.section),sx:{background:"transparent"},children:[jsx(ve,{variant:"subtitle1",className:Hb(m.title),children:"API Request"}),jsxs(Ee,{className:Hb(m.actions),children:[jsx(M,{value:h,onChange:I,onOpen:()=>n?.(),currentIndex:G.currentIndex,totalCount:G.totalCount,onPrev:G.goPrev,onNext:G.goNext}),jsx(T,{disableAnimation:true,onClick:()=>{b?s?.():i?.(),C(_=>!_);},icon:b?ye:xe$1}),jsx(T,{onClick:()=>{t?.(),navigator.clipboard.writeText(JSON.stringify(o,null,2)).then(()=>{});},icon:sa}),jsx(T,{onClick:()=>{r?.(),navigator.clipboard.writeText(e?.id||"").then(()=>{});},icon:qa})]})]}),h.trim()&&je===null?jsx(ie,{sx:{display:"flex",alignItems:"center",justifyContent:"center",flex:1,height:"100%"},children:jsx(it,{variant:"body2",sx:{fontSize:"0.75rem",color:"text.secondary"},children:"No Data Found"})}):jsx(Ve,{className:Hb(m.scroll),children:jsxs(P,{value:je??o,style:zo,displayDataTypes:false,collapsed:h.trim()?void 0:b?1:void 0,onCopied:(_,v)=>{typeof v=="string"&&He(v);},enableClipboard:false,children:[jsx(P.String,{render:pe(h)}),jsx(P.KeyName,{render:le(h)}),jsx(P.CountInfo,{render:(_,{keyName:v})=>{if(!v)return jsx("span",{})}}),jsx(P.Copied,{render:oe})]})}),jsx(H,{totalCount:bt,sx:{borderBottomRightRadius:0,background:"#f8f9fb"}})]})},"request-pane")}),jsxs(qo,{ref:D,className:Hb(m.responsePane),isMaximized:p,isRequestShown:c,initial:{...p&&{width:"100vw",left:0}},animate:{...p&&{position:"absolute",left:c?"50vw":"0"}},transition:{duration:Z,...a&&{duration:0},...f&&{duration:0}},children:[jsxs(Je,{className:Hb(m.section),children:[jsx(ve,{variant:"subtitle1",className:Hb(m.title),children:"API Response"}),jsxs(Ee,{className:Hb(m.actions),children:[jsx(M,{value:x,onChange:g,onOpen:()=>n?.(),currentIndex:U.currentIndex,totalCount:U.totalCount,onPrev:U.goPrev,onNext:U.goNext}),jsx(T,{disableAnimation:true,onClick:()=>{y?s?.():i?.(),S(_=>!_);},icon:y?ye:xe$1}),jsx(T,{onClick:()=>{t?.(),navigator.clipboard.writeText(JSON.stringify(e,null,2)).then(()=>{});},icon:sa}),jsx(T,{onClick:()=>{r?.(),navigator.clipboard.writeText(e?.id||"").then(()=>{});},icon:qa})]})]}),x.trim()&&Me===null?jsx(ie,{sx:{display:"flex",alignItems:"center",justifyContent:"center",flex:1,height:"100%"},children:jsx(it,{variant:"body2",sx:{fontSize:"0.75rem",color:"text.secondary"},children:"No Data Found"})}):jsx(Ve,{className:Hb(m.scroll),children:jsxs(P,{value:Me??e,style:_e,displayDataTypes:false,collapsed:x.trim()?void 0:y?1:void 0,onCopied:(_,v)=>{typeof v=="string"&&He(v);},children:[jsx(P.String,{render:pe(x)}),jsx(P.KeyName,{render:le(x)}),jsx(P.CountInfo,{render:(_,{keyName:v})=>{if(!v)return jsx("span",{})}}),jsx(P.Copied,{render:oe})]})}),jsx(H,{totalCount:Wt,sx:{borderBottomLeftRadius:c?0:"12px",background:"#f8f9fb"}})]})]})}st.displayName="Pane";var me=memo(st);var Ut="os-shared-JSONViewWindowToolbar",F={root:`${Ut}-root`};var lt=forwardRef(function({title:o,onClose:n,onMaximize:t,maximized:r=false,onRequestClick:i$1,requestDirection:s="left",showRequestIcon:c=false,id:a,className:p,sx:u},f$1){return jsxs(b,{ref:f$1,id:a??f,"data-testid":a??"Toolbar",sx:Gb({backgroundColor:"#f9f9f9",backdropFilter:"none"},u),className:Hb(F.root,p),children:[jsxs(h$1,{children:[jsx(c$1,{onClick:n}),jsx(e,{isMaximized:r,onClick:t}),c&&jsx(d,{onClick:i$1,direction:s,children:"Request"})]}),jsx(j$1,{title:o,icon:Wd}),jsx(i,{})]})});lt.displayName="Toolbar";var $=memo(lt);var Yt="os-shared-JSONViewWindowContent",pt={root:`${Yt}-root`};var dt=styled(motion.div)({flexShrink:0}),mt=styled("div")({display:"contents"});function en({requestJson:e={},onClose:o,onJsonRequestOpen:n,isRequestShown:t,setIsRequestShown:r,isToolbarAnimationDisabled:i,setIsToolbarAnimationDisabled:s,className:c,...a}){let{isMaximized:p,setIsMaximized:u,setSize:f,size:y,isResizing:S}=b$1(),b=Object.keys(e??{})?.length,C=y.width||N;return jsxs(Fragment,{children:[jsx(dt,{animate:{width:p?"100%":t?C*2:C,x:!p&&t?-C:0},transition:{duration:S||i?0:h$2},children:jsx($,{title:t?be:We,onClose:()=>o(),onMaximize:()=>{u(x=>!x),s(true),setTimeout(()=>{s(false);},h$2*1e3);},maximized:p,onRequestClick:()=>{r(x=>!x),s(false),t||(n?.(),f({width:N,height:B}));},requestDirection:t?"right":"left",showRequestIcon:!!b})}),jsx(mt,{className:Hb(pt.root,c),children:jsx(me,{...a,requestJson:e,onClose:o,onJsonRequestOpen:n,isRequestShown:t,isToolbarAnimationDisabled:i})})]})}var K=memo(en);var k=createContext({windows:[],open:()=>{},close:()=>{},closeAll:()=>{},handleWindowMinimize:()=>{},handleWindowOrder:()=>{},registerJSONViewWindowEvents:()=>{},containerRef:{current:null}});function ut({list:e,events:o,onClose:n,isWindowMinimized:t,windowOrder:r}){return e?.length?jsx(Fragment,{children:e.map((i,s)=>jsx(xe,{index:s,...o,...i,onClose:()=>{n(s);},isWindowMinimized:t,windowOrder:r},i.json.id))}):null}ut.displayName="List";var ue=memo(ut);var gt=({children:e,containerRef:o})=>{let[n,t]=useState([]),[r,i]=useState(false),[s,c]=useState(1),a=useRef({}),p=useCallback(g=>{if(n.length===7){alert("Maximum allowed active JSON View Window is 7 per table.");return}if(n.some(A=>A.json.id===g.json.id))return;let h=structuredClone(g.json),I=h.request_body,D={...g,json:h,requestJson:g.requestJson||I||void 0};delete D.json.request_body,t(A=>[...A,D]);},[n]),u=useCallback(g=>{t(h=>h.filter((I,D)=>g!==D));},[]),f=useCallback(()=>{t([]);},[]),y=useCallback(g=>{i(g);},[]),S=useCallback(g=>{c(g);},[]),b=useCallback(g=>{a.current=g;},[]),C=useMemo(()=>({onJsonRequestOpen:()=>a.current.onJsonRequestOpen?.(),onJsonSearch:()=>a.current.onJsonSearch?.(),onJsonCopy:()=>a.current.onJsonCopy?.(),onJsonIdCopy:()=>a.current.onJsonIdCopy?.(),onJsonNodesMinimize:()=>a.current.onJsonNodesMinimize?.(),onJsonNodesMaximize:()=>a.current.onJsonNodesMaximize?.()}),[]),x=useMemo(()=>({windows:n,open:p,close:u,closeAll:f,handleWindowMinimize:y,handleWindowOrder:S,registerJSONViewWindowEvents:b,containerRef:o}),[n,p,u,f,y,S,b,o]);return jsxs(k.Provider,{value:x,children:[e,jsx(ue,{list:n,events:C,onClose:u,isWindowMinimized:r,windowOrder:s})]})};function yt(e){let{containerRef:o}=useContext(k),{height:n,width:t}=a(),[r,i]=useState(false),[s,c]=useState(false);return jsx(f$1,{isOpen:true,onClose:e.onClose,containerRef:o,defaultSize:{width:N,height:B},minSize:{width:N,height:300},defaultPosition:Zo(t,n,e.index),order:e.windowOrder,isMinimized:e.isWindowMinimized,id:"json-view-window",className:Hb(m.root,e.className),sx:Lo,children:jsx(K,{...e,isRequestShown:r,setIsRequestShown:i,isToolbarAnimationDisabled:s,setIsToolbarAnimationDisabled:c})})}yt.displayName="JSONViewWindow";var xe=memo(yt);var Nt=({isWindowMinimized:e,windowOrder:o,...n}={})=>{let{windows:t,open:r,close:i,closeAll:s,handleWindowMinimize:c,handleWindowOrder:a,registerJSONViewWindowEvents:p}=useContext(k),u=useCallback(()=>{c(e??false);},[c,e]),f=useCallback(()=>{a(o??1);},[a,o]);return useEffect(()=>{f();},[f]),useEffect(()=>{u();},[u]),useEffect(()=>{p(n);},[p,n]),{open:r,close:i,closeAll:s,windows:t,count:t.length}};var Ts=xe;export{m as a,N as b,B as c,Z as d,Ne as e,We as f,be as g,H as h,T as i,M as j,R as k,z as l,me as m,F as n,$ as o,K as p,k as q,ue as r,gt as s,Nt as t,Ts as u};
@@ -1 +1 @@
1
- import {b,j as j$1,V,U,n,R,d as d$1}from'./chunk-6ZPNLCMN.js';import {Hb}from'./chunk-MMXWSV6V.js';import {Pj,m}from'./chunk-VRGBJY4Q.js';import {memo,forwardRef,useState,useMemo,useCallback}from'react';import Fe from'@mui/material/ClickAwayListener';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import Pe from'@mui/material/SvgIcon';import d from'@mui/material/Box';import {styled}from'@mui/material/styles';var c="os-shared-CurrenciesMenu",r={root:`${c}-root`,trigger:`${c}-trigger`,triggerInfo:`${c}-triggerInfo`,triggerLabel:`${c}-triggerLabel`,triggerArrow:`${c}-triggerArrow`,static:`${c}-static`,flag:`${c}-flag`,category:`${c}-category`,categoryLabel:`${c}-categoryLabel`,option:`${c}-option`,optionLabel:`${c}-optionLabel`};function $e({currency:e,className:o,sx:t}){let i=u=>{u.currentTarget.src!==Pj&&(u.currentTarget.src=Pj);};return jsx(d$1,{src:e?m(e):Pj,alt:e||"flag",onError:i,className:Hb(r.flag,o),sx:t??{width:14,height:14}})}var C=memo($e);var j=e=>jsx(Pe,{viewBox:"0 0 8 5",sx:{width:8,height:5},...e,children:jsx("path",{d:"M7.30267 0.117188C7.38054 0.115307 7.45644 0.138248 7.52045 0.182617C7.58449 0.227088 7.63367 0.290458 7.66205 0.363281C7.6904 0.436073 7.69755 0.516047 7.68256 0.592773C7.66771 0.668745 7.63063 0.738375 7.57709 0.793945L4.17279 4.43164C4.10249 4.50662 4.00517 4.55078 3.90228 4.55078C3.79958 4.55064 3.70294 4.5065 3.63275 4.43164L0.227478 0.794922L0.228455 0.793945C0.175738 0.738766 0.139787 0.669812 0.124939 0.594727C0.110049 0.519097 0.116214 0.440194 0.143494 0.368164C0.170896 0.296002 0.218691 0.232474 0.281189 0.1875C0.343697 0.14262 0.418101 0.11821 0.495056 0.118164C0.54684 0.118166 0.598245 0.12907 0.645447 0.150391C0.691771 0.171346 0.733033 0.201824 0.767517 0.239258L3.90228 3.58691L7.03705 0.239258C7.10541 0.164191 7.20102 0.119752 7.30267 0.117188Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.233333"})});function Se({currency:e,selected:o,renderOption:t}){return t?jsx(Fragment,{children:t(e,{selected:o})}):jsxs(Fragment,{children:[jsx(C,{currency:e}),jsx(j$1,{sx:{fontSize:11},className:r.optionLabel,children:e})]})}var re=memo(Se);var y=styled(d)(()=>({display:"inline-block"})),S=styled(b,{shouldForwardProp:e=>e!=="$open"})(({theme:e,$open:o=false})=>{let{base:t,border:i,brand:u}=e.v2.palette;return {display:"flex",alignItems:"center",justifyContent:"space-between",height:32,border:`1px solid ${i.default}`,borderRadius:e.v2.radius(4),backgroundColor:t.white,minWidth:74,padding:e.v2.spacing(8),color:t.black,...Re(o,u[500]),"&.Mui-disabled":{opacity:.7,border:`1px solid ${i.default}`,backgroundColor:t.white,color:t.black}}});function Re(e,o){return e?{borderColor:o}:{}}var O=styled(d)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.v2.spacing(4),minWidth:0})),M=styled(j$1)(()=>({fontSize:"11px",fontWeight:500,lineHeight:1.1})),F=styled(d,{shouldForwardProp:e=>e!=="$open"})(({$open:e=false})=>({display:"flex",alignItems:"center",flexShrink:0,transition:"transform 200ms cubic-bezier(0.4, 0, 0.2, 1)",...e&&{transform:"rotate(180deg)"}})),te=styled(d)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.v2.spacing(4),minWidth:0,padding:e.v2.spacing(8)})),oe=styled(d)(({theme:e})=>({borderBottom:`1px solid ${e.v2.palette.border.default}`,paddingBottom:e.v2.spacing(8),"&:last-child":{borderBottom:"none",paddingBottom:0}})),ne=styled(j$1)(({theme:e})=>({color:e.v2.palette.grey[500],fontSize:"10px",fontWeight:500,lineHeight:"100%",padding:e.v2.spacing(8)})),se=styled(V)({gap:"4px",borderTop:"none !important",height:24,[`& .${U.indicator}`]:{fontSize:11},"&:hover":{boxShadow:"7px 0px 8px 0px #F2F2F2"}});function Ae({currency:e,selected:o,onSelect:t,renderOption:i}){return jsx(se,{isSelected:o,startAdornment:null,onClick:()=>t(e),className:Hb(r.option),children:jsx(re,{currency:e,selected:o,renderOption:i})})}var ae=memo(Ae);function z(e){if(!e)return "";for(let o of e){if(typeof o=="string")return o;let t=o.items??[];if(t.length>0)return t[0]}return ""}function le(e){if(!e||e.length===0)return [];let o=[],t=[],i=0,u=()=>{t.length>0&&(o.push({key:`flat-${i++}`,items:t}),t=[]);};for(let m of e)if(typeof m=="string")t.push(m);else {u();let l=m.items??[];if(l.length===0)continue;o.push({key:`group-${i++}`,label:m.label,items:l});}return u(),o}function ce(e){if(!e)return 0;let o=0;for(let t of e)typeof t=="string"?o+=1:o+=t.items?.length??0;return o}var pe=forwardRef(({value:e,defaultValue:o,onChange:t,options:i,isLoading:u=false,disabled:m=false,id:l,className:b,sx:x,menuPlacement:me,menuProps:ge,placeholder:h="",triggerIcon:D,renderOption:fe,renderSelected:N,...I},L)=>{let[G,V]=useState(null),[Ce,de]=useState(()=>o??z(i)),B=e!==void 0,v=B?e:Ce,$=!!G,ye=useMemo(()=>le(i),[i]),Z=useMemo(()=>ce(i),[i]),Me=useCallback(a=>{m||V(a.currentTarget);},[m]),A=useCallback(()=>{V(null);},[]),be=useCallback(a=>{B||de(a),t?.(a),A();},[B,t,A]),w=D===void 0?jsx(j,{}):D,{placement:xe,sx:P,...he}=ge??{},Ne=xe??me,Ie=useMemo(()=>[{margin:"8px 0",minWidth:74},...Array.isArray(P)?P:[P]],[P]);if(u)return jsx(y,{ref:L,id:l,"data-testid":l??"CurrenciesMenu",className:Hb(r.root,b),sx:x,...I,children:jsxs(S,{variant:"secondary",disabled:true,className:Hb(r.trigger),children:[jsx(O,{className:Hb(r.triggerInfo),children:jsx(M,{className:Hb(r.triggerLabel),children:h})}),jsx(n,{size:12})]})});if(Z===0)return jsx(y,{ref:L,id:l,"data-testid":l??"CurrenciesMenu",className:Hb(r.root,b),sx:x,...I,children:jsxs(S,{variant:"secondary",disabled:true,className:Hb(r.trigger),children:[jsx(O,{className:Hb(r.triggerInfo),children:jsx(M,{className:Hb(r.triggerLabel),children:h})}),w?jsx(F,{$open:false,className:Hb(r.triggerArrow),children:w}):null]})});if(Z===1){let a=z(i);return jsx(y,{ref:L,id:l,"data-testid":l??"CurrenciesMenu",className:Hb(r.root,b),sx:x,...I,children:jsx(te,{className:Hb(r.static),children:N?jsx(Fragment,{children:N(a)}):jsxs(Fragment,{children:[jsx(C,{currency:a}),jsx(M,{className:Hb(r.triggerLabel),children:a||h})]})})})}return jsx(Fe,{onClickAway:A,children:jsxs(y,{ref:L,id:l,"data-testid":l??"CurrenciesMenu",className:Hb(r.root,b),sx:x,...I,children:[jsxs(S,{variant:"secondary",$open:$,disabled:m,onClick:Me,"aria-haspopup":"listbox","aria-expanded":$,className:Hb(r.trigger),children:[jsx(O,{className:Hb(r.triggerInfo),children:N?jsx(Fragment,{children:N(v)}):jsxs(Fragment,{children:[jsx(C,{currency:v}),jsx(M,{className:Hb(r.triggerLabel),children:v||h})]})}),w?jsx(F,{$open:$,className:Hb(r.triggerArrow),children:w}):null]}),jsx(R,{open:$,anchorEl:G,placement:Ne,sx:Ie,...he,children:ye.map(a=>jsxs(oe,{className:Hb(r.category),children:[a.label?jsx(ne,{className:Hb(r.categoryLabel),children:a.label}):null,a.items.map((T,Le)=>jsx(ae,{currency:T,selected:T===v,onSelect:be,renderOption:fe},`${a.key}:${T}-${Le}`))]},a.key))})]})})});pe.displayName="CurrenciesMenu";var ze=memo(pe);export{r as a,ze as b};
1
+ import {b,j as j$1,V,U,n,R,d as d$1}from'./chunk-UHFL62LB.js';import {Hb}from'./chunk-7IPJF2Q5.js';import {Pj,m}from'./chunk-35FTGOAE.js';import {memo,forwardRef,useState,useMemo,useCallback}from'react';import Fe from'@mui/material/ClickAwayListener';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import Pe from'@mui/material/SvgIcon';import d from'@mui/material/Box';import {styled}from'@mui/material/styles';var c="os-shared-CurrenciesMenu",r={root:`${c}-root`,trigger:`${c}-trigger`,triggerInfo:`${c}-triggerInfo`,triggerLabel:`${c}-triggerLabel`,triggerArrow:`${c}-triggerArrow`,static:`${c}-static`,flag:`${c}-flag`,category:`${c}-category`,categoryLabel:`${c}-categoryLabel`,option:`${c}-option`,optionLabel:`${c}-optionLabel`};function $e({currency:e,className:o,sx:t}){let i=u=>{u.currentTarget.src!==Pj&&(u.currentTarget.src=Pj);};return jsx(d$1,{src:e?m(e):Pj,alt:e||"flag",onError:i,className:Hb(r.flag,o),sx:t??{width:14,height:14}})}var C=memo($e);var j=e=>jsx(Pe,{viewBox:"0 0 8 5",sx:{width:8,height:5},...e,children:jsx("path",{d:"M7.30267 0.117188C7.38054 0.115307 7.45644 0.138248 7.52045 0.182617C7.58449 0.227088 7.63367 0.290458 7.66205 0.363281C7.6904 0.436073 7.69755 0.516047 7.68256 0.592773C7.66771 0.668745 7.63063 0.738375 7.57709 0.793945L4.17279 4.43164C4.10249 4.50662 4.00517 4.55078 3.90228 4.55078C3.79958 4.55064 3.70294 4.5065 3.63275 4.43164L0.227478 0.794922L0.228455 0.793945C0.175738 0.738766 0.139787 0.669812 0.124939 0.594727C0.110049 0.519097 0.116214 0.440194 0.143494 0.368164C0.170896 0.296002 0.218691 0.232474 0.281189 0.1875C0.343697 0.14262 0.418101 0.11821 0.495056 0.118164C0.54684 0.118166 0.598245 0.12907 0.645447 0.150391C0.691771 0.171346 0.733033 0.201824 0.767517 0.239258L3.90228 3.58691L7.03705 0.239258C7.10541 0.164191 7.20102 0.119752 7.30267 0.117188Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.233333"})});function Se({currency:e,selected:o,renderOption:t}){return t?jsx(Fragment,{children:t(e,{selected:o})}):jsxs(Fragment,{children:[jsx(C,{currency:e}),jsx(j$1,{sx:{fontSize:11},className:r.optionLabel,children:e})]})}var re=memo(Se);var y=styled(d)(()=>({display:"inline-block"})),S=styled(b,{shouldForwardProp:e=>e!=="$open"})(({theme:e,$open:o=false})=>{let{base:t,border:i,brand:u}=e.v2.palette;return {display:"flex",alignItems:"center",justifyContent:"space-between",height:32,border:`1px solid ${i.default}`,borderRadius:e.v2.radius(4),backgroundColor:t.white,minWidth:74,padding:e.v2.spacing(8),color:t.black,...Re(o,u[500]),"&.Mui-disabled":{opacity:.7,border:`1px solid ${i.default}`,backgroundColor:t.white,color:t.black}}});function Re(e,o){return e?{borderColor:o}:{}}var O=styled(d)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.v2.spacing(4),minWidth:0})),M=styled(j$1)(()=>({fontSize:"11px",fontWeight:500,lineHeight:1.1})),F=styled(d,{shouldForwardProp:e=>e!=="$open"})(({$open:e=false})=>({display:"flex",alignItems:"center",flexShrink:0,transition:"transform 200ms cubic-bezier(0.4, 0, 0.2, 1)",...e&&{transform:"rotate(180deg)"}})),te=styled(d)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.v2.spacing(4),minWidth:0,padding:e.v2.spacing(8)})),oe=styled(d)(({theme:e})=>({borderBottom:`1px solid ${e.v2.palette.border.default}`,paddingBottom:e.v2.spacing(8),"&:last-child":{borderBottom:"none",paddingBottom:0}})),ne=styled(j$1)(({theme:e})=>({color:e.v2.palette.grey[500],fontSize:"10px",fontWeight:500,lineHeight:"100%",padding:e.v2.spacing(8)})),se=styled(V)({gap:"4px",borderTop:"none !important",height:24,[`& .${U.indicator}`]:{fontSize:11},"&:hover":{boxShadow:"7px 0px 8px 0px #F2F2F2"}});function Ae({currency:e,selected:o,onSelect:t,renderOption:i}){return jsx(se,{isSelected:o,startAdornment:null,onClick:()=>t(e),className:Hb(r.option),children:jsx(re,{currency:e,selected:o,renderOption:i})})}var ae=memo(Ae);function z(e){if(!e)return "";for(let o of e){if(typeof o=="string")return o;let t=o.items??[];if(t.length>0)return t[0]}return ""}function le(e){if(!e||e.length===0)return [];let o=[],t=[],i=0,u=()=>{t.length>0&&(o.push({key:`flat-${i++}`,items:t}),t=[]);};for(let m of e)if(typeof m=="string")t.push(m);else {u();let l=m.items??[];if(l.length===0)continue;o.push({key:`group-${i++}`,label:m.label,items:l});}return u(),o}function ce(e){if(!e)return 0;let o=0;for(let t of e)typeof t=="string"?o+=1:o+=t.items?.length??0;return o}var pe=forwardRef(({value:e,defaultValue:o,onChange:t,options:i,isLoading:u=false,disabled:m=false,id:l,className:b,sx:x,menuPlacement:me,menuProps:ge,placeholder:h="",triggerIcon:D,renderOption:fe,renderSelected:N,...I},L)=>{let[G,V]=useState(null),[Ce,de]=useState(()=>o??z(i)),B=e!==void 0,v=B?e:Ce,$=!!G,ye=useMemo(()=>le(i),[i]),Z=useMemo(()=>ce(i),[i]),Me=useCallback(a=>{m||V(a.currentTarget);},[m]),A=useCallback(()=>{V(null);},[]),be=useCallback(a=>{B||de(a),t?.(a),A();},[B,t,A]),w=D===void 0?jsx(j,{}):D,{placement:xe,sx:P,...he}=ge??{},Ne=xe??me,Ie=useMemo(()=>[{margin:"8px 0",minWidth:74},...Array.isArray(P)?P:[P]],[P]);if(u)return jsx(y,{ref:L,id:l,"data-testid":l??"CurrenciesMenu",className:Hb(r.root,b),sx:x,...I,children:jsxs(S,{variant:"secondary",disabled:true,className:Hb(r.trigger),children:[jsx(O,{className:Hb(r.triggerInfo),children:jsx(M,{className:Hb(r.triggerLabel),children:h})}),jsx(n,{size:12})]})});if(Z===0)return jsx(y,{ref:L,id:l,"data-testid":l??"CurrenciesMenu",className:Hb(r.root,b),sx:x,...I,children:jsxs(S,{variant:"secondary",disabled:true,className:Hb(r.trigger),children:[jsx(O,{className:Hb(r.triggerInfo),children:jsx(M,{className:Hb(r.triggerLabel),children:h})}),w?jsx(F,{$open:false,className:Hb(r.triggerArrow),children:w}):null]})});if(Z===1){let a=z(i);return jsx(y,{ref:L,id:l,"data-testid":l??"CurrenciesMenu",className:Hb(r.root,b),sx:x,...I,children:jsx(te,{className:Hb(r.static),children:N?jsx(Fragment,{children:N(a)}):jsxs(Fragment,{children:[jsx(C,{currency:a}),jsx(M,{className:Hb(r.triggerLabel),children:a||h})]})})})}return jsx(Fe,{onClickAway:A,children:jsxs(y,{ref:L,id:l,"data-testid":l??"CurrenciesMenu",className:Hb(r.root,b),sx:x,...I,children:[jsxs(S,{variant:"secondary",$open:$,disabled:m,onClick:Me,"aria-haspopup":"listbox","aria-expanded":$,className:Hb(r.trigger),children:[jsx(O,{className:Hb(r.triggerInfo),children:N?jsx(Fragment,{children:N(v)}):jsxs(Fragment,{children:[jsx(C,{currency:v}),jsx(M,{className:Hb(r.triggerLabel),children:v||h})]})}),w?jsx(F,{$open:$,className:Hb(r.triggerArrow),children:w}):null]}),jsx(R,{open:$,anchorEl:G,placement:Ne,sx:Ie,...he,children:ye.map(a=>jsxs(oe,{className:Hb(r.category),children:[a.label?jsx(ne,{className:Hb(r.categoryLabel),children:a.label}):null,a.items.map((T,Le)=>jsx(ae,{currency:T,selected:T===v,onSelect:be,renderOption:fe},`${a.key}:${T}-${Le}`))]},a.key))})]})})});pe.displayName="CurrenciesMenu";var ze=memo(pe);export{r as a,ze as b};
@@ -1 +1 @@
1
- import {Hb}from'./chunk-MMXWSV6V.js';import {Th}from'./chunk-VRGBJY4Q.js';import {forwardRef,memo}from'react';import h from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var o="os-shared-EmptyState",t={root:`${o}-root`,icon:`${o}-icon`,title:`${o}-title`,description:`${o}-description`},l="Empty state",n="No data found",y="There is nothing to show here yet.";var c=styled(h)(()=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"0.5rem"})),S=styled("img")(()=>({width:"2rem",height:"2rem"})),d=styled("h1")(({theme:e})=>({fontWeight:600,fontSize:"1rem",color:e.palette.text?.primary,padding:0,margin:0,textAlign:"center"})),f=styled("p")(({theme:e})=>({fontWeight:400,fontSize:"0.75rem",color:e.palette.text?.primary,padding:0,margin:0,opacity:.5,textAlign:"center"}));var T=jsx(S,{src:Th,alt:l,className:t.icon}),x=forwardRef(({className:e,sx:E,icon:g=T,title:m=n,description:r=y,children:N,...u},D)=>jsxs(c,{ref:D,className:Hb(t.root,e),sx:E,"data-testid":"EmptyState",...u,children:[g,m?jsx(d,{className:t.title,children:m}):null,r?jsx(f,{className:t.description,children:r}):null,N]}));x.displayName="EmptyState";var A=memo(x);export{t as a,A as b};
1
+ import {Hb}from'./chunk-7IPJF2Q5.js';import {Th}from'./chunk-35FTGOAE.js';import {forwardRef,memo}from'react';import h from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var o="os-shared-EmptyState",t={root:`${o}-root`,icon:`${o}-icon`,title:`${o}-title`,description:`${o}-description`},l="Empty state",n="No data found",y="There is nothing to show here yet.";var c=styled(h)(()=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"0.5rem"})),S=styled("img")(()=>({width:"2rem",height:"2rem"})),d=styled("h1")(({theme:e})=>({fontWeight:600,fontSize:"1rem",color:e.palette.text?.primary,padding:0,margin:0,textAlign:"center"})),f=styled("p")(({theme:e})=>({fontWeight:400,fontSize:"0.75rem",color:e.palette.text?.primary,padding:0,margin:0,opacity:.5,textAlign:"center"}));var T=jsx(S,{src:Th,alt:l,className:t.icon}),x=forwardRef(({className:e,sx:E,icon:g=T,title:m=n,description:r=y,children:N,...u},D)=>jsxs(c,{ref:D,className:Hb(t.root,e),sx:E,"data-testid":"EmptyState",...u,children:[g,m?jsx(d,{className:t.title,children:m}):null,r?jsx(f,{className:t.description,children:r}):null,N]}));x.displayName="EmptyState";var A=memo(x);export{t as a,A as b};
@@ -1 +1 @@
1
- import {f as f$1,aa}from'./chunk-6ZPNLCMN.js';import {Sc,A as A$1}from'./chunk-VRGBJY4Q.js';import {forwardRef}from'react';import r from'@mui/material/Box';import oe from'@mui/material/CircularProgress';import ne from'@mui/material/SvgIcon';import J from'@mui/material/Button';import K from'@mui/material/FormControl';import Q from'@mui/material/Input';import v from'@mui/material/ListSubheader';import U from'@mui/material/MenuItem';import X from'@mui/material/Select';import {styled,alpha}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var n="os-shared-Select",u={root:`${n}-root`,field:`${n}-field`,menu:`${n}-menu`,option:`${n}-option`,clear:`${n}-clear`,feedback:`${n}-feedback`,values:`${n}-values`,value:`${n}-value`,valueOverflow:`${n}-valueOverflow`,search:`${n}-search`,summary:`${n}-summary`},le="Search",ae=8,de=8,l=28,a=36,o=17,se=4,z=256,W=272,B=293,pe=8,E={bottom:"bottom",top:"top"},ce=E.bottom,h={start:"start",end:"end"},xe=h.start,R=48,O=1,G=R-2*O,D=8,ge=10,j=13,N=D+j,Z=4,q=6,ue=G-N-Z-q,S=8,f=4,b=f,c=8,x=16,y=8,g=4,he=g+x+y,me=g+c+b;var Fe={maxHeight:z,[`&:has(.${u.search})`]:{maxHeight:`${W}px !important`},[`&:has(.${u.search}):has(.${u.summary})`]:{maxHeight:`${B}px !important`}},ke=styled(r)({width:"100%",display:"flex",flexDirection:"column"}),$e=styled(r)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1),width:"100%",minWidth:0})),Le=styled(f$1,{shouldForwardProp:e=>e!=="$mutedRect"})(({$mutedRect:e})=>({padding:0,pointerEvents:"none",...e&&{opacity:.5}})),A="#F8F8F8",ze=styled(U,{shouldForwardProp:e=>e!=="$selected"&&e!=="$hidden"})(({theme:e,$selected:i,$hidden:s})=>({fontSize:"12px",fontWeight:500,lineHeight:"16px",display:"flex",alignItems:"center",justifyContent:"space-between",gap:e.spacing(1),minHeight:l,height:"auto",flexShrink:0,padding:"6px 8px",overflow:"hidden",[e.breakpoints.up("sm")]:{minHeight:l},boxSizing:"border-box",borderRadius:4,backgroundColor:i?A:e.palette.common.white,"&.Mui-selected, &.Mui-focusVisible, &:hover, &.Mui-selected:hover":{backgroundColor:A},"&.Mui-disabled":{opacity:.38},...s&&{display:"none !important"}})),We=styled(r,{shouldForwardProp:e=>e!=="$customLayout"})(({$customLayout:e})=>({flex:1,minWidth:0,display:"flex",alignItems:e?"flex-start":"center",alignSelf:e?"stretch":void 0,height:e?"auto":void 0,overflow:e?"visible":"hidden",lineHeight:"16px"})),Be=styled("span")({display:"block",minWidth:0,maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"12px",fontWeight:500,lineHeight:"16px"}),Ae=styled(r,{shouldForwardProp:e=>e!=="$valueAlignment"})(({$valueAlignment:e})=>{let i=e===h.end;return {display:"flex",flexWrap:"nowrap",alignItems:"center",justifyContent:i?"flex-end":"flex-start",width:"100%",minWidth:0,maxWidth:"100%",overflow:"hidden",boxSizing:"border-box",pointerEvents:"none",textAlign:i?"end":"start"}}),Te=styled(r)(({theme:e})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0,flex:"0 1 auto",maxWidth:"100%",fontWeight:500,fontSize:11,lineHeight:"130%",letterSpacing:0,color:e.v2.palette.base.black,textAlign:"start"})),Ve=styled(r)({flex:"0 0 auto",whiteSpace:"nowrap",marginLeft:4,fontWeight:500,fontSize:11,lineHeight:"130%",letterSpacing:0,color:"var(--fg-brand, rgba(31, 136, 208, 1))"}),Y=styled(v)(({theme:e})=>({backgroundColor:e.palette.common.white,boxSizing:"border-box",height:a,minHeight:a,maxHeight:a,padding:0,lineHeight:1,overflow:"hidden",flexShrink:0,position:"sticky",top:0,zIndex:1,"&.MuiListSubheader-root":{height:a,minHeight:a,padding:0,lineHeight:1}}));Y.muiSkipListHighlight=true;var _=styled(v)(({theme:e})=>({backgroundColor:e.palette.common.white,boxSizing:"border-box",height:l,minHeight:l,padding:0,display:"flex",alignItems:"center",fontSize:12,fontWeight:500,lineHeight:"14px",color:e.v2.palette.grey[500],flexShrink:0,"&.MuiListSubheader-root":{height:l,minHeight:l,padding:0,lineHeight:"14px"}}));_.muiSkipListHighlight=true;var Ee=styled(Q)(({theme:e})=>({width:"100%",height:a,padding:"8px 8px 8px 12px",borderRadius:4,backgroundColor:e.palette.common.white,border:`1px solid ${e.v2.palette.grey[100]}`,boxSizing:"border-box","&:hover":{borderColor:e.v2.palette.grey[100]},"&.Mui-focused":{borderColor:e.v2.palette.brand[500],boxShadow:`0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`,backgroundColor:e.palette.common.white},"&:before, &:after":{display:"none"},"& input":{padding:0,fontSize:10},"& .MuiInputBase-input":{paddingRight:4}})),T=styled("img")({width:14,height:14,flexShrink:0,display:"block"}),Re=styled(v)(({theme:e})=>({backgroundColor:e.palette.common.white,boxSizing:"border-box",display:"flex",alignItems:"center",height:o,minHeight:o,maxHeight:o,padding:0,lineHeight:`${o}px`,overflow:"hidden",flexShrink:0,"&.MuiListSubheader-root":{height:o,minHeight:o,padding:0,lineHeight:`${o}px`}})),Oe=styled(r)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",boxSizing:"border-box",width:"100%",height:o,minHeight:o,gap:e.spacing(1)})),Ge=styled("span")(({theme:e})=>({fontFamily:e.typography.fontFamily,fontWeight:500,fontSize:11,lineHeight:`${o}px`,letterSpacing:0,color:e.v2.palette.grey[500]})),De=styled(J)(({theme:e})=>({minWidth:0,minHeight:0,height:o,padding:0,fontFamily:e.typography.fontFamily,fontWeight:500,fontStyle:"normal",fontSize:11,lineHeight:`${o}px`,letterSpacing:0,textTransform:"none",verticalAlign:"middle",color:e.v2.palette.brand[500],"&.MuiButton-root":{minWidth:0,minHeight:0,height:o,padding:0,lineHeight:`${o}px`}})),je=styled(K)(({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%"}})),Ne=styled(X,{shouldForwardProp:e=>!["feedbackType","hasFeedback","valueAlignment","hasLabel"].includes(e)})(({theme:e,error:i,feedbackType:s,hasFeedback:p,valueAlignment:V,hasLabel:w})=>{let{borderColor:I}=aa(e,s),C=p?"4px 4px 0 0":"4px",m=V===h.end,P=m?g:f,H=w?`18px ${P}px 6px ${S}px !important`:`0 ${P}px 0 ${S}px !important`;return {width:"100%",height:"40px !important",maxHeight:"40px !important",borderRadius:C,overflow:"hidden",backgroundColor:e.palette.grey[400],border:"1px solid transparent",boxSizing:"border-box",transition:e.transitions.create(["border-color","box-shadow"],{duration:e.transitions.duration.shorter}),"&.Mui-focused":{border:p?`1px solid ${s?I:"transparent"}`:`1px solid ${e.v2.palette.brand[500]}`,borderBottom:p?"none":void 0,boxShadow:p?"none":`0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`,backgroundColor:e.palette.grey[400]},"&.Mui-disabled":{backgroundColor:e.palette.grey[400],boxShadow:"none",borderColor:"transparent"},".MuiSelect-select":{padding:H,height:"40px !important",maxHeight:"40px !important",display:"flex !important",alignItems:w?"flex-end !important":"center !important",justifyContent:m?"flex-end !important":"flex-start !important",textAlign:m?"end !important":"start !important",boxSizing:"border-box",overflow:"hidden",backgroundColor:`${e.palette.grey[400]} !important`,borderRadius:C,fontSize:"11px",lineHeight:"11px",cursor:"pointer",position:"relative",zIndex:0,"&:focus":{backgroundColor:`${e.palette.grey[400]} !important`}},"&.Mui-disabled .MuiSelect-select":{cursor:"default"},".MuiSelect-filled":{padding:H},"&.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%"},"& .Select-endAdornmentRoot":{display:"flex",alignItems:"center",flexShrink:0,marginRight:b,gap:g,position:"relative",zIndex:2,pointerEvents:"auto","&.Select-endAdornmentRoot--loading":{marginRight:y}},"& .Select-clearIconButton":{display:"inline-flex",alignItems:"center",justifyContent:"center",width:12,height:12,padding:0,border:"none",appearance:"none",background:"transparent",color:e.v2.palette.base.black,cursor:"pointer",flexShrink:0,lineHeight:0,position:"relative",zIndex:2,pointerEvents:"auto","& svg":{display:"block",width:8,height:8,fontSize:8},"&:focus-visible":{outline:`2px solid ${e.palette.primary.main}`,outlineOffset:1}},"&.Mui-disabled .Select-clearIconButton":{opacity:"0 !important",pointerEvents:"none"},"& .Select-menuTriggerIcon":{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:c,minWidth:c,height:c,cursor:"pointer",color:e.v2.palette.base.black,lineHeight:0,"& svg, & .MuiSvgIcon-root":{transition:e.transitions.create(["transform","color"],{duration:e.transitions.duration.shorter})},"&.Select-menuTriggerIcon--loading":{width:x,minWidth:x,height:x,cursor:"default"}},"&.Mui-focused .Select-menuTriggerIcon, & .Select-menuTriggerIcon-open":{color:e.v2.palette.brand[500]},"& .Select-menuTriggerIcon-open svg, & .Select-menuTriggerIcon-open .MuiSvgIcon-root":{transform:"rotate(180deg)"},"&.Mui-disabled .MuiSelect-icon":{color:"rgba(0, 0, 0, 0.38)"},"&.Mui-disabled .Select-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)"}},...s&&{border:`1px solid ${I}`},...p&&{borderBottom:"none"},...i&&{border:`1px solid ${e.palette.error.main}`,boxShadow:"none"}}}),Ze=styled(r,{shouldForwardProp:e=>e!=="$hasFeedback"})(({theme:e,$hasFeedback:i})=>({display:"flex",alignItems:"stretch",height:"100%",flexDirection:"column",flex:1,width:"100%",cursor:"pointer",borderRadius:4,overflow:"visible",textAlign:"start",...i&&{"&:has(.MuiInputBase-root.Mui-focused)":{boxShadow:`0px 0px 0px 1px ${e.v2.palette.brand[500]}, 0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`}},"&:has(.MuiInputBase-root.Mui-disabled)":{cursor:"default"}})),qe=styled("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block",width:"100%",textAlign:"start"}));function et(){return jsx(r,{component:"img",src:Sc,alt:"",sx:{width:10,height:7.5,flexShrink:0}})}function tt(){return jsx(T,{src:A$1,alt:""})}function ot(){return jsxs("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"none","aria-hidden":true,children:[jsx("path",{d:"M1.795 1.739L6.316 6.26",stroke:"currentColor",strokeWidth:"0.875",strokeLinecap:"round"}),jsx("path",{d:"M6.316 1.739L1.795 6.26",stroke:"currentColor",strokeWidth:"0.875",strokeLinecap:"round"})]})}var ie=forwardRef((e,i)=>jsx(ne,{ref:i,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:"currentColor",stroke:"currentColor",strokeWidth:.233333})}));ie.displayName="SelectChevronIcon";function nt(){return jsx(oe,{size:14,sx:{color:"text.secondary"}})}export{ot as $,y as A,g as B,he as C,me as D,Fe as E,ke as F,$e as G,Le as H,ze as I,We as J,Be as K,Ae as L,Te as M,Ve as N,Y as O,_ as P,Ee as Q,Re as R,Oe as S,Ge as T,De as U,je as V,Ne as W,Ze as X,qe as Y,et as Z,tt as _,u as a,ie as aa,le as b,nt as ba,ae as c,de as d,se as e,z as f,W as g,B as h,pe as i,E as j,ce as k,h as l,xe as m,R as n,O as o,D as p,ge as q,j as r,N as s,Z as t,q as u,ue as v,S as w,b as x,c as y,x as z};
1
+ import {f as f$1,aa}from'./chunk-UHFL62LB.js';import {Sc,A as A$1}from'./chunk-35FTGOAE.js';import {forwardRef}from'react';import r from'@mui/material/Box';import oe from'@mui/material/CircularProgress';import ne from'@mui/material/SvgIcon';import J from'@mui/material/Button';import K from'@mui/material/FormControl';import Q from'@mui/material/Input';import v from'@mui/material/ListSubheader';import U from'@mui/material/MenuItem';import X from'@mui/material/Select';import {styled,alpha}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var n="os-shared-Select",u={root:`${n}-root`,field:`${n}-field`,menu:`${n}-menu`,option:`${n}-option`,clear:`${n}-clear`,feedback:`${n}-feedback`,values:`${n}-values`,value:`${n}-value`,valueOverflow:`${n}-valueOverflow`,search:`${n}-search`,summary:`${n}-summary`},le="Search",ae=8,de=8,l=28,a=36,o=17,se=4,z=256,W=272,B=293,pe=8,E={bottom:"bottom",top:"top"},ce=E.bottom,h={start:"start",end:"end"},xe=h.start,R=48,O=1,G=R-2*O,D=8,ge=10,j=13,N=D+j,Z=4,q=6,ue=G-N-Z-q,S=8,f=4,b=f,c=8,x=16,y=8,g=4,he=g+x+y,me=g+c+b;var Fe={maxHeight:z,[`&:has(.${u.search})`]:{maxHeight:`${W}px !important`},[`&:has(.${u.search}):has(.${u.summary})`]:{maxHeight:`${B}px !important`}},ke=styled(r)({width:"100%",display:"flex",flexDirection:"column"}),$e=styled(r)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1),width:"100%",minWidth:0})),Le=styled(f$1,{shouldForwardProp:e=>e!=="$mutedRect"})(({$mutedRect:e})=>({padding:0,pointerEvents:"none",...e&&{opacity:.5}})),A="#F8F8F8",ze=styled(U,{shouldForwardProp:e=>e!=="$selected"&&e!=="$hidden"})(({theme:e,$selected:i,$hidden:s})=>({fontSize:"12px",fontWeight:500,lineHeight:"16px",display:"flex",alignItems:"center",justifyContent:"space-between",gap:e.spacing(1),minHeight:l,height:"auto",flexShrink:0,padding:"6px 8px",overflow:"hidden",[e.breakpoints.up("sm")]:{minHeight:l},boxSizing:"border-box",borderRadius:4,backgroundColor:i?A:e.palette.common.white,"&.Mui-selected, &.Mui-focusVisible, &:hover, &.Mui-selected:hover":{backgroundColor:A},"&.Mui-disabled":{opacity:.38},...s&&{display:"none !important"}})),We=styled(r,{shouldForwardProp:e=>e!=="$customLayout"})(({$customLayout:e})=>({flex:1,minWidth:0,display:"flex",alignItems:e?"flex-start":"center",alignSelf:e?"stretch":void 0,height:e?"auto":void 0,overflow:e?"visible":"hidden",lineHeight:"16px"})),Be=styled("span")({display:"block",minWidth:0,maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"12px",fontWeight:500,lineHeight:"16px"}),Ae=styled(r,{shouldForwardProp:e=>e!=="$valueAlignment"})(({$valueAlignment:e})=>{let i=e===h.end;return {display:"flex",flexWrap:"nowrap",alignItems:"center",justifyContent:i?"flex-end":"flex-start",width:"100%",minWidth:0,maxWidth:"100%",overflow:"hidden",boxSizing:"border-box",pointerEvents:"none",textAlign:i?"end":"start"}}),Te=styled(r)(({theme:e})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0,flex:"0 1 auto",maxWidth:"100%",fontWeight:500,fontSize:11,lineHeight:"130%",letterSpacing:0,color:e.v2.palette.base.black,textAlign:"start"})),Ve=styled(r)({flex:"0 0 auto",whiteSpace:"nowrap",marginLeft:4,fontWeight:500,fontSize:11,lineHeight:"130%",letterSpacing:0,color:"var(--fg-brand, rgba(31, 136, 208, 1))"}),Y=styled(v)(({theme:e})=>({backgroundColor:e.palette.common.white,boxSizing:"border-box",height:a,minHeight:a,maxHeight:a,padding:0,lineHeight:1,overflow:"hidden",flexShrink:0,position:"sticky",top:0,zIndex:1,"&.MuiListSubheader-root":{height:a,minHeight:a,padding:0,lineHeight:1}}));Y.muiSkipListHighlight=true;var _=styled(v)(({theme:e})=>({backgroundColor:e.palette.common.white,boxSizing:"border-box",height:l,minHeight:l,padding:0,display:"flex",alignItems:"center",fontSize:12,fontWeight:500,lineHeight:"14px",color:e.v2.palette.grey[500],flexShrink:0,"&.MuiListSubheader-root":{height:l,minHeight:l,padding:0,lineHeight:"14px"}}));_.muiSkipListHighlight=true;var Ee=styled(Q)(({theme:e})=>({width:"100%",height:a,padding:"8px 8px 8px 12px",borderRadius:4,backgroundColor:e.palette.common.white,border:`1px solid ${e.v2.palette.grey[100]}`,boxSizing:"border-box","&:hover":{borderColor:e.v2.palette.grey[100]},"&.Mui-focused":{borderColor:e.v2.palette.brand[500],boxShadow:`0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`,backgroundColor:e.palette.common.white},"&:before, &:after":{display:"none"},"& input":{padding:0,fontSize:10},"& .MuiInputBase-input":{paddingRight:4}})),T=styled("img")({width:14,height:14,flexShrink:0,display:"block"}),Re=styled(v)(({theme:e})=>({backgroundColor:e.palette.common.white,boxSizing:"border-box",display:"flex",alignItems:"center",height:o,minHeight:o,maxHeight:o,padding:0,lineHeight:`${o}px`,overflow:"hidden",flexShrink:0,"&.MuiListSubheader-root":{height:o,minHeight:o,padding:0,lineHeight:`${o}px`}})),Oe=styled(r)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",boxSizing:"border-box",width:"100%",height:o,minHeight:o,gap:e.spacing(1)})),Ge=styled("span")(({theme:e})=>({fontFamily:e.typography.fontFamily,fontWeight:500,fontSize:11,lineHeight:`${o}px`,letterSpacing:0,color:e.v2.palette.grey[500]})),De=styled(J)(({theme:e})=>({minWidth:0,minHeight:0,height:o,padding:0,fontFamily:e.typography.fontFamily,fontWeight:500,fontStyle:"normal",fontSize:11,lineHeight:`${o}px`,letterSpacing:0,textTransform:"none",verticalAlign:"middle",color:e.v2.palette.brand[500],"&.MuiButton-root":{minWidth:0,minHeight:0,height:o,padding:0,lineHeight:`${o}px`}})),je=styled(K)(({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%"}})),Ne=styled(X,{shouldForwardProp:e=>!["feedbackType","hasFeedback","valueAlignment","hasLabel"].includes(e)})(({theme:e,error:i,feedbackType:s,hasFeedback:p,valueAlignment:V,hasLabel:w})=>{let{borderColor:I}=aa(e,s),C=p?"4px 4px 0 0":"4px",m=V===h.end,P=m?g:f,H=w?`18px ${P}px 6px ${S}px !important`:`0 ${P}px 0 ${S}px !important`;return {width:"100%",height:"40px !important",maxHeight:"40px !important",borderRadius:C,overflow:"hidden",backgroundColor:e.palette.grey[400],border:"1px solid transparent",boxSizing:"border-box",transition:e.transitions.create(["border-color","box-shadow"],{duration:e.transitions.duration.shorter}),"&.Mui-focused":{border:p?`1px solid ${s?I:"transparent"}`:`1px solid ${e.v2.palette.brand[500]}`,borderBottom:p?"none":void 0,boxShadow:p?"none":`0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`,backgroundColor:e.palette.grey[400]},"&.Mui-disabled":{backgroundColor:e.palette.grey[400],boxShadow:"none",borderColor:"transparent"},".MuiSelect-select":{padding:H,height:"40px !important",maxHeight:"40px !important",display:"flex !important",alignItems:w?"flex-end !important":"center !important",justifyContent:m?"flex-end !important":"flex-start !important",textAlign:m?"end !important":"start !important",boxSizing:"border-box",overflow:"hidden",backgroundColor:`${e.palette.grey[400]} !important`,borderRadius:C,fontSize:"11px",lineHeight:"11px",cursor:"pointer",position:"relative",zIndex:0,"&:focus":{backgroundColor:`${e.palette.grey[400]} !important`}},"&.Mui-disabled .MuiSelect-select":{cursor:"default"},".MuiSelect-filled":{padding:H},"&.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%"},"& .Select-endAdornmentRoot":{display:"flex",alignItems:"center",flexShrink:0,marginRight:b,gap:g,position:"relative",zIndex:2,pointerEvents:"auto","&.Select-endAdornmentRoot--loading":{marginRight:y}},"& .Select-clearIconButton":{display:"inline-flex",alignItems:"center",justifyContent:"center",width:12,height:12,padding:0,border:"none",appearance:"none",background:"transparent",color:e.v2.palette.base.black,cursor:"pointer",flexShrink:0,lineHeight:0,position:"relative",zIndex:2,pointerEvents:"auto","& svg":{display:"block",width:8,height:8,fontSize:8},"&:focus-visible":{outline:`2px solid ${e.palette.primary.main}`,outlineOffset:1}},"&.Mui-disabled .Select-clearIconButton":{opacity:"0 !important",pointerEvents:"none"},"& .Select-menuTriggerIcon":{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:c,minWidth:c,height:c,cursor:"pointer",color:e.v2.palette.base.black,lineHeight:0,"& svg, & .MuiSvgIcon-root":{transition:e.transitions.create(["transform","color"],{duration:e.transitions.duration.shorter})},"&.Select-menuTriggerIcon--loading":{width:x,minWidth:x,height:x,cursor:"default"}},"&.Mui-focused .Select-menuTriggerIcon, & .Select-menuTriggerIcon-open":{color:e.v2.palette.brand[500]},"& .Select-menuTriggerIcon-open svg, & .Select-menuTriggerIcon-open .MuiSvgIcon-root":{transform:"rotate(180deg)"},"&.Mui-disabled .MuiSelect-icon":{color:"rgba(0, 0, 0, 0.38)"},"&.Mui-disabled .Select-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)"}},...s&&{border:`1px solid ${I}`},...p&&{borderBottom:"none"},...i&&{border:`1px solid ${e.palette.error.main}`,boxShadow:"none"}}}),Ze=styled(r,{shouldForwardProp:e=>e!=="$hasFeedback"})(({theme:e,$hasFeedback:i})=>({display:"flex",alignItems:"stretch",height:"100%",flexDirection:"column",flex:1,width:"100%",cursor:"pointer",borderRadius:4,overflow:"visible",textAlign:"start",...i&&{"&:has(.MuiInputBase-root.Mui-focused)":{boxShadow:`0px 0px 0px 1px ${e.v2.palette.brand[500]}, 0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`}},"&:has(.MuiInputBase-root.Mui-disabled)":{cursor:"default"}})),qe=styled("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block",width:"100%",textAlign:"start"}));function et(){return jsx(r,{component:"img",src:Sc,alt:"",sx:{width:10,height:7.5,flexShrink:0}})}function tt(){return jsx(T,{src:A$1,alt:""})}function ot(){return jsxs("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"none","aria-hidden":true,children:[jsx("path",{d:"M1.795 1.739L6.316 6.26",stroke:"currentColor",strokeWidth:"0.875",strokeLinecap:"round"}),jsx("path",{d:"M6.316 1.739L1.795 6.26",stroke:"currentColor",strokeWidth:"0.875",strokeLinecap:"round"})]})}var ie=forwardRef((e,i)=>jsx(ne,{ref:i,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:"currentColor",stroke:"currentColor",strokeWidth:.233333})}));ie.displayName="SelectChevronIcon";function nt(){return jsx(oe,{size:14,sx:{color:"text.secondary"}})}export{ot as $,y as A,g as B,he as C,me as D,Fe as E,ke as F,$e as G,Le as H,ze as I,We as J,Be as K,Ae as L,Te as M,Ve as N,Y as O,_ as P,Ee as Q,Re as R,Oe as S,Ge as T,De as U,je as V,Ne as W,Ze as X,qe as Y,et as Z,tt as _,u as a,ie as aa,le as b,nt as ba,ae as c,de as d,se as e,z as f,W as g,B as h,pe as i,E as j,ce as k,h as l,xe as m,R as n,O as o,D as p,ge as q,j as r,N as s,Z as t,q as u,ue as v,S as w,b as x,c as y,x as z};
@@ -1 +1 @@
1
- import {d}from'./chunk-6ZPNLCMN.js';import {Gb,Hb}from'./chunk-MMXWSV6V.js';import {Pj,j,m}from'./chunk-VRGBJY4Q.js';import {forwardRef,memo}from'react';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var x="os-shared-CountryFlag",a={root:`${x}-root`};var p=styled(d)({width:"auto",height:"auto"});var f=forwardRef(({countryCode:o,currencyCode:t,width:y=16,height:i,alt:u,id:s,className:F,sx:C},c)=>jsx(p,{ref:c,id:s,"data-testid":s??"CountryFlag",src:o&&j(o)||t&&m(t)||Pj,alt:u??o??t??"flag",loading:"lazy",onError:d=>{d.currentTarget.src=Pj;},className:Hb(a.root,F),sx:Gb({width:y,height:i},C)}));f.displayName="CountryFlag";var P=memo(f);export{a,P as b};
1
+ import {d}from'./chunk-UHFL62LB.js';import {Gb,Hb}from'./chunk-7IPJF2Q5.js';import {Pj,j,m}from'./chunk-35FTGOAE.js';import {forwardRef,memo}from'react';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var x="os-shared-CountryFlag",a={root:`${x}-root`};var p=styled(d)({width:"auto",height:"auto"});var f=forwardRef(({countryCode:o,currencyCode:t,width:y=16,height:i,alt:u,id:s,className:F,sx:C},c)=>jsx(p,{ref:c,id:s,"data-testid":s??"CountryFlag",src:o&&j(o)||t&&m(t)||Pj,alt:u??o??t??"flag",loading:"lazy",onError:d=>{d.currentTarget.src=Pj;},className:Hb(a.root,F),sx:Gb({width:y,height:i},C)}));f.displayName="CountryFlag";var P=memo(f);export{a,P as b};
@@ -1 +1 @@
1
- import {b}from'./chunk-OHT5KJVT.js';import {b as b$1}from'./chunk-4IQ3J4LF.js';import {j,a}from'./chunk-RXCJF7BB.js';import {R,B as B$1,x,h}from'./chunk-6ZPNLCMN.js';import {Ib,Jb,Vb}from'./chunk-MMXWSV6V.js';import {m}from'./chunk-53X3U5WT.js';import {Xc,Yc,Wj,Xj,Yj,fc,gc,Zj,ec}from'./chunk-VRGBJY4Q.js';import {memo,forwardRef,useState,useMemo,useRef,useId,useEffect,useCallback}from'react';import S from'@mui/material/Box';import bt from'@mui/material/Popper';import It from'dayjs';import {useTranslation}from'react-i18next';import {Calendar,DateObject}from'react-multi-date-picker';import Ko from'@mui/material/ClickAwayListener';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';import he from'@mui/material/Button';import q from'react-date-object';import ot from'react-date-object/calendars/arabic';import tt from'react-date-object/calendars/gregorian';import rt from'react-date-object/locales/arabic_ar';import nt from'react-date-object/locales/arabic_en';import it from'react-date-object/locales/gregorian_ar';import at from'react-date-object/locales/gregorian_en';var Ne=styled(S)(({theme:e})=>({color:e.palette.grey[700],fontSize:"9px",fontWeight:500,marginBottom:"6px"})),Ke=styled(S,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:o})=>({borderRadius:"4px",border:`1px solid ${e.palette.divider}`,background:e.palette.common.white,height:32,padding:"8px",display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",...o&&{border:`1px solid ${e.palette.info.dark}`,background:e.palette.common.white,boxShadow:e.shadows[7]}})),_e=styled(S)(({theme:e})=>({borderRadius:"8px",background:e.palette.common.white,boxShadow:"0px 8px 36px 0px rgba(0, 0, 0, 0.15)",textAlign:"center",color:e.palette.grey[900],fontSize:"12px",fontWeight:500,lineHeight:"20px",letterSpacing:"0.1px",padding:"16px",display:"flex",alignItems:"center",justifyContent:"center",gap:"12px",flexDirection:"column"})),qe=styled(S)(({theme:e})=>({width:71,padding:"4px 0",cursor:"pointer","&:hover, &.active":{borderRadius:"100px",background:e.palette.info.light}}));var Xe={day:"Day",month:"Month",quarter:"Quarter",year:"Year"};function qo({sx:e,groupBy:o,isCalenderOpen:i,onUpdate:t}){let[n,p]=useState(null),m=!!n&&i,{t:s}=useTranslation(),c=()=>{p(null);},u=d=>{p(d.currentTarget);},l=d=>{t?.(d),c();};return jsx(Ko,{onClickAway:c,children:jsxs(S,{sx:e,children:[jsx(Ne,{children:s("groupedBy")}),jsxs(Ke,{onClick:u,open:m,children:[jsx("span",{children:Xe[o]}),jsx(S,{component:"img",src:Yc,alt:"arrow",sx:{...m&&{transform:"rotate(180deg)"}}})]}),jsx(R,{open:m,anchorEl:n,children:jsx(_e,{sx:{width:n?.clientWidth},children:Object.entries(Xe).map(([d,a])=>jsx(qe,{onClick:()=>{l(d);},className:o===d?"active":"",children:a},`${d}-groupedBy`))})})]})})}var Ve=memo(qo);var eo=Ve;var oo=styled(S)(({theme:e})=>({border:"1px solid",borderColor:e.palette.divider,borderRadius:"50px",paddingInline:"6px 12px",color:e.palette.text.primary,fontSize:"11px",display:"flex",gap:"8px",alignItems:"center",justifyContent:"space-between",height:32,marginTop:"8px",img:{width:16,height:16},"& > div":{display:"flex",alignItems:"center",gap:"2px"}}));function se({isHijri:e,onCalendarModeSwitch:o}){let{t:i}=useTranslation(),t=()=>{o?.(e?"gregorian":"hijri");};return jsx(S,{children:jsxs(oo,{children:[jsxs(S,{children:[jsx("img",{src:ec,alt:"hijri"}),jsx("span",{children:i("hijri")})]}),jsx(h,{checked:e,onChange:t})]})})}var no=se;var ao=styled(he)(({theme:e})=>({cursor:"pointer",borderRadius:"50px",border:"1px solid",borderColor:e.palette.divider,background:e.palette.common.white,color:e.palette.text.primary,fontSize:"11px",fontWeight:e.typography.fontWeightRegular,paddingInline:"12px",height:32,width:"max-content",textTransform:"unset","&:hover":{boxShadow:e.shadows[7],border:"1px solid",borderColor:e.palette.info.dark}})),po=styled(S)(()=>({display:"flex",flexDirection:"column",gap:"8px"}));var J=({isHijri:e,isAr:o=false})=>e?o?rt:nt:o?it:at,X=e=>e?ot:tt,M=e=>e.setHour(0).setMinute(0).setSecond(0).setMillisecond(0),B=e=>e.setHour(23).setMinute(59).setSecond(59).setMillisecond(999),Z=e=>{if(!(e?.[0]instanceof Date)||!(e?.[1]instanceof Date)){let[o,i]=m();return [new q(o),new q(i)]}return [new q(e?.[0]),new q(e?.[1])]};function ce({onChange:e,isHijri:o,isAr:i=false}){let t={locale:J({isHijri:o,isAr:i}),calendar:X(o)},n=useMemo(()=>[{id:"today",value:[new DateObject(t),new DateObject(t)]},{id:"lastWeek",value:[new DateObject(t).subtract(6,"day"),new DateObject(t)]},{id:"lastMonth",value:[new DateObject(t).subtract(30,"day"),new DateObject(t)]},{id:new DateObject(t).subtract(1,"month").toFirstOfMonth().format("MMMM YYYY"),value:[new DateObject(t).subtract(1,"month").toFirstOfMonth(),new DateObject(t).subtract(1,"month").toLastOfMonth()]},{id:new DateObject(t).subtract(2,"month").toFirstOfMonth().format("MMMM YYYY"),value:[new DateObject(t).subtract(2,"month").toFirstOfMonth(),new DateObject(t).subtract(2,"month").toLastOfMonth()]},{id:new DateObject(t).subtract(3,"month").toFirstOfMonth().format("MMMM YYYY"),value:[new DateObject(t).subtract(3,"month").toFirstOfMonth(),new DateObject(t).subtract(3,"month").toLastOfMonth()]}],[o,i]),{t:p}=useTranslation();return jsx(S,{"data-testid":"RangeCalender_QuickFilters",children:jsx(po,{children:n.map(m=>jsx(ao,{onClick:s=>{s.preventDefault(),e(m.value);},children:p(m.id)},m.id))})})}var lo=ce;var so=styled(he)(()=>({minWidth:"auto",padding:0,"& > img":{cursor:"pointer"}}));var ft=["Su","Mo","Tu","We","Th","Fr","Sa"];function gt({isAr:e=false,isHijri:o,values:i,onChange:t,numberOfMonths:n=2,...p},m){let s=c=>c==="right"?e?fc:gc:e?gc:fc;return jsx(Calendar,{ref:m,numberOfMonths:n,value:i,onChange:t,calendar:X(o),locale:J({isHijri:o,isAr:e}),range:true,format:"MMM DD",monthYearSeparator:" ",renderButton:(c,u)=>jsx(so,{onClick:u,children:jsx("img",{src:s(c),alt:"arrow"})}),weekDays:e?void 0:ft,maxDate:new Date,...p})}var mo=forwardRef(gt);var co=mo;var uo=styled(S)(()=>({'[class$="-IndicatorsContainer2"]':{display:"none"},"#react-select-2-listbox":{width:300}})),V=styled(S)(({theme:e})=>({borderRadius:e.spacing(.5),border:`1px solid ${e.palette.divider}`,background:e.palette.common.white,boxShadow:e.shadows[10],minWidth:200,width:"max-content",overflow:"auto"})),fo=styled(S,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:o})=>({width:156,fontSize:"11px",color:e.palette.text.primary,border:"1px solid",borderColor:e.palette.divider,minHeight:32,borderRadius:"4px",padding:e.spacing(1),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",cursor:"pointer",display:"flex",alignItems:"center",gap:e.spacing(1),fontWeight:500,...o&&{borderRadius:"4px",boxShadow:e.shadows[7],border:"1px solid",borderColor:e.palette.info.dark,background:e.palette.common.white},span:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}})),L=styled(S)(({theme:e})=>({padding:e.spacing(1),color:e.palette.text.primary,fontSize:"11px",display:"flex",alignItems:"center",gap:e.spacing(1),height:33,cursor:"pointer","&:hover":{boxShadow:"0px 0px 16px 0px #00000021"},"&+&":{borderTop:"1px solid",borderColor:e.palette.divider},"&.active span":{fontWeight:500},span:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}})),A=styled(S)(()=>({width:12,height:12})),F=styled(S)(({theme:e})=>({fontSize:"11px",color:e.palette.text.secondary,lineHeight:"15.03px","&.selected":{color:e.palette.info.dark}}));function ge({selectedTimezone:e,onChange:o,timezoneCountriesCodes:i,defaultCountryTimezone:t}){let[n,p]=useState(null),m=a=>{n||p(a.currentTarget);},s=()=>{n&&p(null);},c=(a,D)=>{a.stopPropagation(),o(D);},u=useMemo(()=>i?.map(a=>Ib(a)),[i]),l=useMemo(()=>u?.some(a=>e?.timezone===a?.timezone),[u,e]),d=useMemo(()=>e&&l?e:t,[e,t,l]);return jsxs(L,{onMouseEnter:m,onMouseLeave:s,onClick:()=>{e&&o(d);},children:[l?jsx("img",{src:Zj,alt:"icon"}):jsx(A,{}),jsx("img",{src:Xj,alt:"entity-timezone"}),jsx(b,{countryCode:d?.countryCode}),jsx(F,{className:l?"selected":"",children:l?e?.label:t?.label}),jsx(bt,{open:!!n,anchorEl:n,placement:"right-start",sx:{zIndex:3},disablePortal:true,children:jsx(V,{sx:{maxHeight:300},children:u?.map((a,D)=>{let j=a?.timezone===e?.timezone;return jsxs(L,{onClick:te=>{c(te,a);},sx:{gap:"4px"},children:[j?jsx("img",{src:Zj,alt:"icon"}):jsx(A,{}),jsx(b,{countryCode:a?.countryCode}),jsx(F,{className:j?"selected":"",children:a?.label})]},`timezone-item-${D}`)})})})]})}function xe({onChange:e,selectedTimezone:o,browserTimezone:i}){let t=useMemo(()=>i?Jb(i):void 0,[i]),n=()=>{t&&e(t);},p=t?.timezone===o?.timezone;return jsxs(L,{onClick:n,children:[p?jsx("img",{src:Zj,alt:"icon"}):jsx(A,{}),jsx("img",{src:Wj,alt:"user-timezone"}),jsx(b,{countryCode:t?.countryCode}),jsx(F,{className:p?"selected":"",children:t?.label})]})}function St({onChange:e,selectedTimezone:o,browserTimezone:i,defaultCountryTimezone:t,timezoneCountriesCodes:n}){let[p,m]=useState(null),s=!!p,c=()=>{m(null);},u=a=>{e(a),c();},l=a=>{m(a.currentTarget);},d=useMemo(()=>i===o?.timezone?Wj:o?.timezone===t.timezone?Xj:Yj,[i,t.timezone,o?.timezone]);return jsx(Ko,{onClickAway:c,children:jsxs(uo,{"data-testid":"CustomTimezone",children:[jsxs(fo,{open:s,onClick:l,children:[jsx("img",{src:d,alt:"timezone-icon"}),jsx(b,{countryCode:o?.countryCode}),jsx("span",{children:o?.label})]}),jsx(bt,{open:s,anchorEl:p,placement:"top-start",sx:{zIndex:1400},children:jsxs(V,{"data-testid":"CustomTimezone_dropdown",children:[jsx(ge,{onChange:u,selectedTimezone:o,defaultCountryTimezone:t,timezoneCountriesCodes:n}),jsx(xe,{onChange:u,selectedTimezone:o,browserTimezone:i})]})})]})})}var xo=memo(St);var bo=xo;var ho=styled(S,{shouldForwardProp:e=>e!=="$isSingleMonth"})(({theme:e,$isSingleMonth:o})=>({display:"flex",marginTop:"8px",background:e.palette.common.white,boxShadow:e.shadows[9],borderRadius:e.spacing(1),color:e.palette.text.primary,fontSize:"11px",".rmdp-calendar":{padding:"8px 16px 16px"},".rmdp-rtl *":{fontFamily:"Tajawal"},".rmdp-rtl .sd":{paddingTop:"4px"},".rmdp-wrapper":{position:"relative",borderRadius:"8px",boxShadow:"none",...o&&{width:"100%"}},".rmdp-day span":{fontSize:"11px",fontWeight:500},".rmdp-day, .rmdp-week-day":{width:40,height:40,marginBottom:"2px",padding:"4px",fontSize:"11px",color:e.palette.grey[900]},".rmdp-day-picker":{padding:0,...o&&{display:"block !important"}},".rmdp-day.rmdp-today span":{backgroundColor:"transparent !important",color:e.palette.info.dark},".rmdp-day.rmdp-today.end span, .rmdp-day.rmdp-today.end span":{color:e.palette.common.white},".rmdp-range, .rmdp-day:not(.rmdp-disabled):not(.rmdp-day-hidden) span:hover":{background:e.palette.info.light,boxShadow:"none",color:e.palette.grey[900]},".rmdp-range-hover.start, .rmdp-range.start, .rmdp-range-hover.end, .rmdp-range.end, .rmdp-rtl .rmdp-range-hover.start, .rmdp-rtl .rmdp-range.start, .rmdp-rtl .rmdp-range-hover.end, .rmdp-rtl .rmdp-range.end":{borderRadius:"50%",background:e.palette.background.gradient.darkShadedBlue,color:e.palette.common.white},".rmdp-range.start:after":{content:'""',position:"absolute",background:e.palette.info.light,height:"100%",width:"50%",right:0,top:0,zIndex:-1},".rmdp-rtl .rmdp-range.start:after":{right:"unset",left:0},".rmdp-range.end:after":{content:'""',position:"absolute",background:e.palette.info.light,height:"100%",width:"50%",left:0,top:0,zIndex:-1},".rmdp-rtl .rmdp-range.end:after":{left:"unset",right:0},".rmdp-week-day":{color:e.palette.grey[700],marginBottom:"4px",fontSize:"11px",padding:"4px"},".rmdp-header-values":{color:e.palette.grey[900],fontSize:"12px",fontWeight:500,lineHeight:"20px",letterSpacing:"0.1px"},".rmdp-header-values span:nth-of-type(2)":{display:"none"},".rmdp-header":{padding:"4px 0",margin:0,fontSize:"12px"},".rmdp-top-class":{display:"block !important"},".rmdp-day.rmdp-selected span:not(.highlight)":{background:e.palette.info.dark},".rmdp-day.start.end":{overflow:"hidden"},".rmdp-day.rmdp-disabled":{color:"#ccc",cursor:"not-allowed"}})),yo=styled(he)(({theme:e})=>({textTransform:"capitalize",padding:"8px 24px",width:75,height:32,fontSize:"11px",background:"transparent",color:e.palette.text.primary,border:"1px solid",borderColor:e.palette.divider,fontWeight:500,borderRadius:"4px","&:hover":{background:"transparent",color:e.palette.text.primary}})),wo=styled(he)(({theme:e})=>({textTransform:"capitalize",padding:"8px 24px",width:75,height:32,fontSize:"11px",borderRadius:"4px",fontWeight:700,background:e.palette.info.dark,"&:hover":{background:e.palette.info.dark}})),Co=styled(S)(()=>({display:"flex",gap:8,marginLeft:"auto",flexShrink:0})),To=styled(he,{shouldForwardProp:e=>e!=="open"})(({open:e,theme:o})=>({color:o.palette.text.primary,fontSize:"11px",fontWeight:500,padding:o.spacing(1),borderRadius:"4px",border:"1px solid",borderColor:o.palette.divider,background:o.palette.common.white,textTransform:"none",height:32,...e&&{border:"1px solid",borderColor:o.palette.info.dark,boxShadow:o.shadows[7]}})),ko=styled(S)(({theme:e})=>({background:e.palette.common.white,display:"flex",justifyContent:"space-between",alignItems:"center",gap:10,padding:"16px",borderTop:"1px solid",borderColor:e.palette.divider,borderBottomRightRadius:"8px"})),zo=styled(S)(({theme:e})=>({padding:16,paddingInlineEnd:"23px",borderRight:"1px solid",borderColor:e.palette.divider,background:e.palette.common.white,width:"max-content",borderTopLeftRadius:"8px",borderBottomLeftRadius:"8px",display:"flex",flexDirection:"column",gap:10,justifyContent:"space-between"})),So=styled(S)(()=>({display:"flex",alignItems:"center",gap:"10px"})),vo=styled(S)(()=>({position:"relative"})),Do=styled(S)(()=>({display:"flex",flexDirection:"column",gap:"24px"}));var Mo=styled(S,{shouldForwardProp:e=>e!=="isAllDay"})(({theme:e,isAllDay:o})=>({display:"flex",alignItems:"center",gap:e.spacing(1),position:"relative",paddingInline:"5px",".label":{width:"max-content"},...!o&&{paddingRight:e.spacing(1),"&:after":{content:'""',position:"absolute",width:"1px",background:e.palette.divider,right:0,height:17}}})),Bo=styled(S)(()=>({width:235})),Eo=styled(S)(({theme:e})=>({display:"flex",gap:"4px",".rmdp-input":{width:"64px",borderRadius:"19px",border:"1px solid",borderColor:e.palette.divider,color:e.palette.text.primary,fontSize:"11px",fontWeight:500,background:"transparent",cursor:"pointer"},".rmdp-input:focus":{boxShadow:e.shadows[7],border:`1px solid ${e.palette.info.dark}`,borderRadius:"19px"},".rmdp-time-picker":{boxShadow:e.shadows[5],borderRadius:e.spacing(1),padding:e.spacing(2),minWidth:"auto !important",div:{marginTop:0,display:"block"},"> div":{width:32,height:64},".rmdp-arrow":{borderColor:`${e.palette.background.transparent[1]} !important`},".rmdp-arrow-container":{justifyContent:"center","&:hover":{backgroundColor:"transparent",boxShadow:"unset"}},input:{borderRadius:"4px",border:`1px solid ${e.palette.divider}`,padding:0,width:32,height:32,fontSize:"11px",color:e.palette.text.primary,fontWeight:500,"&:focus, &:focus-visible":{border:`1px solid ${e.palette.info.dark}`,outline:"unset"}},".dvdr":{margin:"7px 4px 0"},".rmdp-am, .rmdp-pm":{margin:0,width:32,height:32,flex:"auto",justifyContent:"center",fontSize:"11px",color:e.palette.text.primary,fontWeight:500,display:"flex",cursor:"default"},"> div:last-child":{marginInlineStart:"4px",display:"block !important"},".rmdp-down, .rmdp-up":{position:"relative",i:{display:"none"},"&:before":{content:'""',position:"absolute",top:"5px",width:"10px",height:"10px",backgroundImage:`url(${Xc})`}},".rmdp-down:before":{transform:"rotate(180deg)"}},".rmdp-container":{position:"relative","> div":{top:"unset !important",bottom:"28px",transform:"unset !important"}}})),Oo=styled(S)(({theme:e})=>({display:"flex",gap:"8px",alignItems:"center",borderRadius:"50px",border:"1px solid",borderColor:e.palette.divider,paddingInline:"5px",width:"fit-content",height:32}));function Mt({values:e,setValues:o}){let{t:i}=useTranslation(),t=new DateObject(e[0]),n=new DateObject(e[1]),[p,m]=useState(t.dayOfYear===n.dayOfYear&&t.hour===0&&t.minute===0&&n.hour===23&&n.minute===59),s=({period:l,hour:d})=>l==="PM"&&d!==12?d+12:l==="AM"&&d===12?0:d,c=({hour:l,minute:d,period:a})=>{o([t.setHour(s({hour:l,period:a})).setMinute(d).setSecond(0),n]);},u=({hour:l,minute:d,period:a})=>{o([t,n.setHour(s({hour:l,period:a})).setMinute(d).setSecond(59)]);};return jsx(Bo,{children:jsxs(Oo,{children:[jsxs(Mo,{isAllDay:p,children:[jsx("span",{className:"label",children:i("allDay")}),jsx(h,{checked:p,onChange:l=>{m(!p),l.target.checked?o([M(e[0]),B(e[1])]):o(e);}})]}),!p&&jsxs(Eo,{children:[jsx(j,{defaultTime:{hour:a(t.hour),minute:t.minute,period:t.hour>=12?"PM":"AM"},size:"small",onChange:c,enableRealTimeChange:true},`${e[0]?.toString()}-start`),jsx(j,{defaultTime:{hour:a(n.hour),minute:n.minute,period:n.hour>=12?"PM":"AM"},size:"small",onChange:u,enableRealTimeChange:true},`${e[1]?.toString()}-end`)]})]})})}var Po=Mt;var Io=Po;function At({defaultDate:e,onDateChange:o,mode:i="gregorian",onCalendarModeSwitch:t,numberOfMonths:n,noTimezone:p,noQuickFilter:m,maxDateRange:s,onCalendarGroupChange:c,groupBy:u,timezone:l,onChangeTimezone:d,browserTimezone:a,renderCalendarButton:D,mainSx:j,popperProps:te,rangeDatePickerProps:Fo,defaultCountryTimezone:Ce,timezoneCountriesCodes:Te}){let[w,ke]=useState(Z(e)),[x$1,C]=useState(w),[ze,Se]=useState(l??null),[ve,Wo]=useState(u||"day"),[De,Me]=useState(null),y=!!De,[Be,Ee]=useState(false),{t:re}=useTranslation(),P=useRef(null),Ho=Vb(useId(),"range-calender"),ne=i==="hijri",Y=()=>{Me(null);},Oe=r=>{Me(r.currentTarget);};useEffect(()=>{if(!y){if(n===1)return;C(Z(e));}},[y]),useEffect(()=>{if(e){let r=Z(e);ke(r),C(r),P.current&&P.current.set("date",r[0]);}},[e]),useEffect(()=>{Se(l??null);},[l,y]);let Re=()=>{ke(x$1),Y();let r;x$1[0].dayOfYear===x$1[1].dayOfYear?r=[x$1[0],x$1[1]]:r=[M(x$1[0]),B(x$1[1])],o([r[0].toDate(),r[1].toDate()]),c?.(ve||"day"),d?.(ze);},jo=useCallback(()=>{let r=w[0].format("MMM D"),$=w[1]?w[1].format("MMM D"):w[0].format("MMM D");return r===$&&!p?r:`${r} - ${$}`},[w,p]),Yo=r=>{if(r.length<2||!s){C(r);return}let $=M(r[0]).toDate(),Qo=B(r[1]).toDate(),Pe=It(Qo).diff($,"day");if(Pe<=s){C(r);return}Ee(true),C([r[0],r[1].subtract(Pe-s,"d")]),setTimeout(()=>{Ee(false);},3e3);},$o=r=>{C([M(r[0]),B(r[1])]),P.current&&P.current.set("date",r[0]);},Go=r=>{r.key==="Enter"&&x$1[1]&&!Be?(r.stopPropagation(),Re()):r.key==="Escape"&&(r.stopPropagation(),Y());};return jsxs(vo,{id:Ho,"data-testid":"RangeCalender",sx:j,children:[D?D(y,Oe):jsx(To,{onClick:Oe,open:y,children:(w[0]||w[1])&&jo()}),y&&jsx(B$1,{onClick:r=>{r.stopPropagation(),Y();}}),jsx(bt,{open:y,anchorEl:De,placement:"bottom-end",...te,children:jsxs(ho,{onKeyDown:Go,$isSingleMonth:n===1,children:[!m&&jsxs(zo,{children:[jsx(lo,{onChange:$o,isHijri:ne}),jsxs(Do,{children:[u&&jsx(eo,{groupBy:ve,isCalenderOpen:y,onUpdate:r=>{Wo(r);}}),jsx(no,{isHijri:ne,onCalendarModeSwitch:t})]})]}),jsxs(S,{sx:{display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[jsx(co,{values:x$1,onChange:Yo,isHijri:ne,ref:P,numberOfMonths:n,...Fo}),jsx(x,{in:Be&&!!s,children:jsx(b$1,{severity:"error",message:re("dateRangeError",{number:s}),sx:{marginInline:"16px",marginBottom:"16px"}})}),jsxs(ko,{sx:{borderBottomLeftRadius:"8px"},children:[!p&&Ce&&a&&Te&&jsx(So,{children:jsx(bo,{onChange:Se,selectedTimezone:ze,browserTimezone:a,defaultCountryTimezone:Ce,timezoneCountriesCodes:Te},String(y))}),new DateObject(x$1[0]).dayOfYear===new DateObject(x$1[1]).dayOfYear&&jsx(Io,{values:x$1,setValues:C}),jsxs(Co,{children:[jsx(yo,{variant:"contained",onClick:Y,children:re("cancel")}),jsx(wo,{variant:"contained",onClick:Re,disabled:!x$1[1],children:re("okay")})]})]})]})]})})]})}var Ao=At;var bi=Ao;export{bi as a};
1
+ import {b}from'./chunk-EKGX7YJF.js';import {b as b$1}from'./chunk-6ZW3D5OZ.js';import {j,a}from'./chunk-Y5L72QWY.js';import {R,B as B$1,x,h}from'./chunk-UHFL62LB.js';import {Ib,Jb,Vb}from'./chunk-7IPJF2Q5.js';import {m}from'./chunk-4HUVBNX2.js';import {Xc,Yc,Wj,Xj,Yj,fc,gc,Zj,ec}from'./chunk-35FTGOAE.js';import {memo,forwardRef,useState,useMemo,useRef,useId,useEffect,useCallback}from'react';import S from'@mui/material/Box';import bt from'@mui/material/Popper';import It from'dayjs';import {useTranslation}from'react-i18next';import {Calendar,DateObject}from'react-multi-date-picker';import Ko from'@mui/material/ClickAwayListener';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';import he from'@mui/material/Button';import q from'react-date-object';import ot from'react-date-object/calendars/arabic';import tt from'react-date-object/calendars/gregorian';import rt from'react-date-object/locales/arabic_ar';import nt from'react-date-object/locales/arabic_en';import it from'react-date-object/locales/gregorian_ar';import at from'react-date-object/locales/gregorian_en';var Ne=styled(S)(({theme:e})=>({color:e.palette.grey[700],fontSize:"9px",fontWeight:500,marginBottom:"6px"})),Ke=styled(S,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:o})=>({borderRadius:"4px",border:`1px solid ${e.palette.divider}`,background:e.palette.common.white,height:32,padding:"8px",display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",...o&&{border:`1px solid ${e.palette.info.dark}`,background:e.palette.common.white,boxShadow:e.shadows[7]}})),_e=styled(S)(({theme:e})=>({borderRadius:"8px",background:e.palette.common.white,boxShadow:"0px 8px 36px 0px rgba(0, 0, 0, 0.15)",textAlign:"center",color:e.palette.grey[900],fontSize:"12px",fontWeight:500,lineHeight:"20px",letterSpacing:"0.1px",padding:"16px",display:"flex",alignItems:"center",justifyContent:"center",gap:"12px",flexDirection:"column"})),qe=styled(S)(({theme:e})=>({width:71,padding:"4px 0",cursor:"pointer","&:hover, &.active":{borderRadius:"100px",background:e.palette.info.light}}));var Xe={day:"Day",month:"Month",quarter:"Quarter",year:"Year"};function qo({sx:e,groupBy:o,isCalenderOpen:i,onUpdate:t}){let[n,p]=useState(null),m=!!n&&i,{t:s}=useTranslation(),c=()=>{p(null);},u=d=>{p(d.currentTarget);},l=d=>{t?.(d),c();};return jsx(Ko,{onClickAway:c,children:jsxs(S,{sx:e,children:[jsx(Ne,{children:s("groupedBy")}),jsxs(Ke,{onClick:u,open:m,children:[jsx("span",{children:Xe[o]}),jsx(S,{component:"img",src:Yc,alt:"arrow",sx:{...m&&{transform:"rotate(180deg)"}}})]}),jsx(R,{open:m,anchorEl:n,children:jsx(_e,{sx:{width:n?.clientWidth},children:Object.entries(Xe).map(([d,a])=>jsx(qe,{onClick:()=>{l(d);},className:o===d?"active":"",children:a},`${d}-groupedBy`))})})]})})}var Ve=memo(qo);var eo=Ve;var oo=styled(S)(({theme:e})=>({border:"1px solid",borderColor:e.palette.divider,borderRadius:"50px",paddingInline:"6px 12px",color:e.palette.text.primary,fontSize:"11px",display:"flex",gap:"8px",alignItems:"center",justifyContent:"space-between",height:32,marginTop:"8px",img:{width:16,height:16},"& > div":{display:"flex",alignItems:"center",gap:"2px"}}));function se({isHijri:e,onCalendarModeSwitch:o}){let{t:i}=useTranslation(),t=()=>{o?.(e?"gregorian":"hijri");};return jsx(S,{children:jsxs(oo,{children:[jsxs(S,{children:[jsx("img",{src:ec,alt:"hijri"}),jsx("span",{children:i("hijri")})]}),jsx(h,{checked:e,onChange:t})]})})}var no=se;var ao=styled(he)(({theme:e})=>({cursor:"pointer",borderRadius:"50px",border:"1px solid",borderColor:e.palette.divider,background:e.palette.common.white,color:e.palette.text.primary,fontSize:"11px",fontWeight:e.typography.fontWeightRegular,paddingInline:"12px",height:32,width:"max-content",textTransform:"unset","&:hover":{boxShadow:e.shadows[7],border:"1px solid",borderColor:e.palette.info.dark}})),po=styled(S)(()=>({display:"flex",flexDirection:"column",gap:"8px"}));var J=({isHijri:e,isAr:o=false})=>e?o?rt:nt:o?it:at,X=e=>e?ot:tt,M=e=>e.setHour(0).setMinute(0).setSecond(0).setMillisecond(0),B=e=>e.setHour(23).setMinute(59).setSecond(59).setMillisecond(999),Z=e=>{if(!(e?.[0]instanceof Date)||!(e?.[1]instanceof Date)){let[o,i]=m();return [new q(o),new q(i)]}return [new q(e?.[0]),new q(e?.[1])]};function ce({onChange:e,isHijri:o,isAr:i=false}){let t={locale:J({isHijri:o,isAr:i}),calendar:X(o)},n=useMemo(()=>[{id:"today",value:[new DateObject(t),new DateObject(t)]},{id:"lastWeek",value:[new DateObject(t).subtract(6,"day"),new DateObject(t)]},{id:"lastMonth",value:[new DateObject(t).subtract(30,"day"),new DateObject(t)]},{id:new DateObject(t).subtract(1,"month").toFirstOfMonth().format("MMMM YYYY"),value:[new DateObject(t).subtract(1,"month").toFirstOfMonth(),new DateObject(t).subtract(1,"month").toLastOfMonth()]},{id:new DateObject(t).subtract(2,"month").toFirstOfMonth().format("MMMM YYYY"),value:[new DateObject(t).subtract(2,"month").toFirstOfMonth(),new DateObject(t).subtract(2,"month").toLastOfMonth()]},{id:new DateObject(t).subtract(3,"month").toFirstOfMonth().format("MMMM YYYY"),value:[new DateObject(t).subtract(3,"month").toFirstOfMonth(),new DateObject(t).subtract(3,"month").toLastOfMonth()]}],[o,i]),{t:p}=useTranslation();return jsx(S,{"data-testid":"RangeCalender_QuickFilters",children:jsx(po,{children:n.map(m=>jsx(ao,{onClick:s=>{s.preventDefault(),e(m.value);},children:p(m.id)},m.id))})})}var lo=ce;var so=styled(he)(()=>({minWidth:"auto",padding:0,"& > img":{cursor:"pointer"}}));var ft=["Su","Mo","Tu","We","Th","Fr","Sa"];function gt({isAr:e=false,isHijri:o,values:i,onChange:t,numberOfMonths:n=2,...p},m){let s=c=>c==="right"?e?fc:gc:e?gc:fc;return jsx(Calendar,{ref:m,numberOfMonths:n,value:i,onChange:t,calendar:X(o),locale:J({isHijri:o,isAr:e}),range:true,format:"MMM DD",monthYearSeparator:" ",renderButton:(c,u)=>jsx(so,{onClick:u,children:jsx("img",{src:s(c),alt:"arrow"})}),weekDays:e?void 0:ft,maxDate:new Date,...p})}var mo=forwardRef(gt);var co=mo;var uo=styled(S)(()=>({'[class$="-IndicatorsContainer2"]':{display:"none"},"#react-select-2-listbox":{width:300}})),V=styled(S)(({theme:e})=>({borderRadius:e.spacing(.5),border:`1px solid ${e.palette.divider}`,background:e.palette.common.white,boxShadow:e.shadows[10],minWidth:200,width:"max-content",overflow:"auto"})),fo=styled(S,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:o})=>({width:156,fontSize:"11px",color:e.palette.text.primary,border:"1px solid",borderColor:e.palette.divider,minHeight:32,borderRadius:"4px",padding:e.spacing(1),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",cursor:"pointer",display:"flex",alignItems:"center",gap:e.spacing(1),fontWeight:500,...o&&{borderRadius:"4px",boxShadow:e.shadows[7],border:"1px solid",borderColor:e.palette.info.dark,background:e.palette.common.white},span:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}})),L=styled(S)(({theme:e})=>({padding:e.spacing(1),color:e.palette.text.primary,fontSize:"11px",display:"flex",alignItems:"center",gap:e.spacing(1),height:33,cursor:"pointer","&:hover":{boxShadow:"0px 0px 16px 0px #00000021"},"&+&":{borderTop:"1px solid",borderColor:e.palette.divider},"&.active span":{fontWeight:500},span:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}})),A=styled(S)(()=>({width:12,height:12})),F=styled(S)(({theme:e})=>({fontSize:"11px",color:e.palette.text.secondary,lineHeight:"15.03px","&.selected":{color:e.palette.info.dark}}));function ge({selectedTimezone:e,onChange:o,timezoneCountriesCodes:i,defaultCountryTimezone:t}){let[n,p]=useState(null),m=a=>{n||p(a.currentTarget);},s=()=>{n&&p(null);},c=(a,D)=>{a.stopPropagation(),o(D);},u=useMemo(()=>i?.map(a=>Ib(a)),[i]),l=useMemo(()=>u?.some(a=>e?.timezone===a?.timezone),[u,e]),d=useMemo(()=>e&&l?e:t,[e,t,l]);return jsxs(L,{onMouseEnter:m,onMouseLeave:s,onClick:()=>{e&&o(d);},children:[l?jsx("img",{src:Zj,alt:"icon"}):jsx(A,{}),jsx("img",{src:Xj,alt:"entity-timezone"}),jsx(b,{countryCode:d?.countryCode}),jsx(F,{className:l?"selected":"",children:l?e?.label:t?.label}),jsx(bt,{open:!!n,anchorEl:n,placement:"right-start",sx:{zIndex:3},disablePortal:true,children:jsx(V,{sx:{maxHeight:300},children:u?.map((a,D)=>{let j=a?.timezone===e?.timezone;return jsxs(L,{onClick:te=>{c(te,a);},sx:{gap:"4px"},children:[j?jsx("img",{src:Zj,alt:"icon"}):jsx(A,{}),jsx(b,{countryCode:a?.countryCode}),jsx(F,{className:j?"selected":"",children:a?.label})]},`timezone-item-${D}`)})})})]})}function xe({onChange:e,selectedTimezone:o,browserTimezone:i}){let t=useMemo(()=>i?Jb(i):void 0,[i]),n=()=>{t&&e(t);},p=t?.timezone===o?.timezone;return jsxs(L,{onClick:n,children:[p?jsx("img",{src:Zj,alt:"icon"}):jsx(A,{}),jsx("img",{src:Wj,alt:"user-timezone"}),jsx(b,{countryCode:t?.countryCode}),jsx(F,{className:p?"selected":"",children:t?.label})]})}function St({onChange:e,selectedTimezone:o,browserTimezone:i,defaultCountryTimezone:t,timezoneCountriesCodes:n}){let[p,m]=useState(null),s=!!p,c=()=>{m(null);},u=a=>{e(a),c();},l=a=>{m(a.currentTarget);},d=useMemo(()=>i===o?.timezone?Wj:o?.timezone===t.timezone?Xj:Yj,[i,t.timezone,o?.timezone]);return jsx(Ko,{onClickAway:c,children:jsxs(uo,{"data-testid":"CustomTimezone",children:[jsxs(fo,{open:s,onClick:l,children:[jsx("img",{src:d,alt:"timezone-icon"}),jsx(b,{countryCode:o?.countryCode}),jsx("span",{children:o?.label})]}),jsx(bt,{open:s,anchorEl:p,placement:"top-start",sx:{zIndex:1400},children:jsxs(V,{"data-testid":"CustomTimezone_dropdown",children:[jsx(ge,{onChange:u,selectedTimezone:o,defaultCountryTimezone:t,timezoneCountriesCodes:n}),jsx(xe,{onChange:u,selectedTimezone:o,browserTimezone:i})]})})]})})}var xo=memo(St);var bo=xo;var ho=styled(S,{shouldForwardProp:e=>e!=="$isSingleMonth"})(({theme:e,$isSingleMonth:o})=>({display:"flex",marginTop:"8px",background:e.palette.common.white,boxShadow:e.shadows[9],borderRadius:e.spacing(1),color:e.palette.text.primary,fontSize:"11px",".rmdp-calendar":{padding:"8px 16px 16px"},".rmdp-rtl *":{fontFamily:"Tajawal"},".rmdp-rtl .sd":{paddingTop:"4px"},".rmdp-wrapper":{position:"relative",borderRadius:"8px",boxShadow:"none",...o&&{width:"100%"}},".rmdp-day span":{fontSize:"11px",fontWeight:500},".rmdp-day, .rmdp-week-day":{width:40,height:40,marginBottom:"2px",padding:"4px",fontSize:"11px",color:e.palette.grey[900]},".rmdp-day-picker":{padding:0,...o&&{display:"block !important"}},".rmdp-day.rmdp-today span":{backgroundColor:"transparent !important",color:e.palette.info.dark},".rmdp-day.rmdp-today.end span, .rmdp-day.rmdp-today.end span":{color:e.palette.common.white},".rmdp-range, .rmdp-day:not(.rmdp-disabled):not(.rmdp-day-hidden) span:hover":{background:e.palette.info.light,boxShadow:"none",color:e.palette.grey[900]},".rmdp-range-hover.start, .rmdp-range.start, .rmdp-range-hover.end, .rmdp-range.end, .rmdp-rtl .rmdp-range-hover.start, .rmdp-rtl .rmdp-range.start, .rmdp-rtl .rmdp-range-hover.end, .rmdp-rtl .rmdp-range.end":{borderRadius:"50%",background:e.palette.background.gradient.darkShadedBlue,color:e.palette.common.white},".rmdp-range.start:after":{content:'""',position:"absolute",background:e.palette.info.light,height:"100%",width:"50%",right:0,top:0,zIndex:-1},".rmdp-rtl .rmdp-range.start:after":{right:"unset",left:0},".rmdp-range.end:after":{content:'""',position:"absolute",background:e.palette.info.light,height:"100%",width:"50%",left:0,top:0,zIndex:-1},".rmdp-rtl .rmdp-range.end:after":{left:"unset",right:0},".rmdp-week-day":{color:e.palette.grey[700],marginBottom:"4px",fontSize:"11px",padding:"4px"},".rmdp-header-values":{color:e.palette.grey[900],fontSize:"12px",fontWeight:500,lineHeight:"20px",letterSpacing:"0.1px"},".rmdp-header-values span:nth-of-type(2)":{display:"none"},".rmdp-header":{padding:"4px 0",margin:0,fontSize:"12px"},".rmdp-top-class":{display:"block !important"},".rmdp-day.rmdp-selected span:not(.highlight)":{background:e.palette.info.dark},".rmdp-day.start.end":{overflow:"hidden"},".rmdp-day.rmdp-disabled":{color:"#ccc",cursor:"not-allowed"}})),yo=styled(he)(({theme:e})=>({textTransform:"capitalize",padding:"8px 24px",width:75,height:32,fontSize:"11px",background:"transparent",color:e.palette.text.primary,border:"1px solid",borderColor:e.palette.divider,fontWeight:500,borderRadius:"4px","&:hover":{background:"transparent",color:e.palette.text.primary}})),wo=styled(he)(({theme:e})=>({textTransform:"capitalize",padding:"8px 24px",width:75,height:32,fontSize:"11px",borderRadius:"4px",fontWeight:700,background:e.palette.info.dark,"&:hover":{background:e.palette.info.dark}})),Co=styled(S)(()=>({display:"flex",gap:8,marginLeft:"auto",flexShrink:0})),To=styled(he,{shouldForwardProp:e=>e!=="open"})(({open:e,theme:o})=>({color:o.palette.text.primary,fontSize:"11px",fontWeight:500,padding:o.spacing(1),borderRadius:"4px",border:"1px solid",borderColor:o.palette.divider,background:o.palette.common.white,textTransform:"none",height:32,...e&&{border:"1px solid",borderColor:o.palette.info.dark,boxShadow:o.shadows[7]}})),ko=styled(S)(({theme:e})=>({background:e.palette.common.white,display:"flex",justifyContent:"space-between",alignItems:"center",gap:10,padding:"16px",borderTop:"1px solid",borderColor:e.palette.divider,borderBottomRightRadius:"8px"})),zo=styled(S)(({theme:e})=>({padding:16,paddingInlineEnd:"23px",borderRight:"1px solid",borderColor:e.palette.divider,background:e.palette.common.white,width:"max-content",borderTopLeftRadius:"8px",borderBottomLeftRadius:"8px",display:"flex",flexDirection:"column",gap:10,justifyContent:"space-between"})),So=styled(S)(()=>({display:"flex",alignItems:"center",gap:"10px"})),vo=styled(S)(()=>({position:"relative"})),Do=styled(S)(()=>({display:"flex",flexDirection:"column",gap:"24px"}));var Mo=styled(S,{shouldForwardProp:e=>e!=="isAllDay"})(({theme:e,isAllDay:o})=>({display:"flex",alignItems:"center",gap:e.spacing(1),position:"relative",paddingInline:"5px",".label":{width:"max-content"},...!o&&{paddingRight:e.spacing(1),"&:after":{content:'""',position:"absolute",width:"1px",background:e.palette.divider,right:0,height:17}}})),Bo=styled(S)(()=>({width:235})),Eo=styled(S)(({theme:e})=>({display:"flex",gap:"4px",".rmdp-input":{width:"64px",borderRadius:"19px",border:"1px solid",borderColor:e.palette.divider,color:e.palette.text.primary,fontSize:"11px",fontWeight:500,background:"transparent",cursor:"pointer"},".rmdp-input:focus":{boxShadow:e.shadows[7],border:`1px solid ${e.palette.info.dark}`,borderRadius:"19px"},".rmdp-time-picker":{boxShadow:e.shadows[5],borderRadius:e.spacing(1),padding:e.spacing(2),minWidth:"auto !important",div:{marginTop:0,display:"block"},"> div":{width:32,height:64},".rmdp-arrow":{borderColor:`${e.palette.background.transparent[1]} !important`},".rmdp-arrow-container":{justifyContent:"center","&:hover":{backgroundColor:"transparent",boxShadow:"unset"}},input:{borderRadius:"4px",border:`1px solid ${e.palette.divider}`,padding:0,width:32,height:32,fontSize:"11px",color:e.palette.text.primary,fontWeight:500,"&:focus, &:focus-visible":{border:`1px solid ${e.palette.info.dark}`,outline:"unset"}},".dvdr":{margin:"7px 4px 0"},".rmdp-am, .rmdp-pm":{margin:0,width:32,height:32,flex:"auto",justifyContent:"center",fontSize:"11px",color:e.palette.text.primary,fontWeight:500,display:"flex",cursor:"default"},"> div:last-child":{marginInlineStart:"4px",display:"block !important"},".rmdp-down, .rmdp-up":{position:"relative",i:{display:"none"},"&:before":{content:'""',position:"absolute",top:"5px",width:"10px",height:"10px",backgroundImage:`url(${Xc})`}},".rmdp-down:before":{transform:"rotate(180deg)"}},".rmdp-container":{position:"relative","> div":{top:"unset !important",bottom:"28px",transform:"unset !important"}}})),Oo=styled(S)(({theme:e})=>({display:"flex",gap:"8px",alignItems:"center",borderRadius:"50px",border:"1px solid",borderColor:e.palette.divider,paddingInline:"5px",width:"fit-content",height:32}));function Mt({values:e,setValues:o}){let{t:i}=useTranslation(),t=new DateObject(e[0]),n=new DateObject(e[1]),[p,m]=useState(t.dayOfYear===n.dayOfYear&&t.hour===0&&t.minute===0&&n.hour===23&&n.minute===59),s=({period:l,hour:d})=>l==="PM"&&d!==12?d+12:l==="AM"&&d===12?0:d,c=({hour:l,minute:d,period:a})=>{o([t.setHour(s({hour:l,period:a})).setMinute(d).setSecond(0),n]);},u=({hour:l,minute:d,period:a})=>{o([t,n.setHour(s({hour:l,period:a})).setMinute(d).setSecond(59)]);};return jsx(Bo,{children:jsxs(Oo,{children:[jsxs(Mo,{isAllDay:p,children:[jsx("span",{className:"label",children:i("allDay")}),jsx(h,{checked:p,onChange:l=>{m(!p),l.target.checked?o([M(e[0]),B(e[1])]):o(e);}})]}),!p&&jsxs(Eo,{children:[jsx(j,{defaultTime:{hour:a(t.hour),minute:t.minute,period:t.hour>=12?"PM":"AM"},size:"small",onChange:c,enableRealTimeChange:true},`${e[0]?.toString()}-start`),jsx(j,{defaultTime:{hour:a(n.hour),minute:n.minute,period:n.hour>=12?"PM":"AM"},size:"small",onChange:u,enableRealTimeChange:true},`${e[1]?.toString()}-end`)]})]})})}var Po=Mt;var Io=Po;function At({defaultDate:e,onDateChange:o,mode:i="gregorian",onCalendarModeSwitch:t,numberOfMonths:n,noTimezone:p,noQuickFilter:m,maxDateRange:s,onCalendarGroupChange:c,groupBy:u,timezone:l,onChangeTimezone:d,browserTimezone:a,renderCalendarButton:D,mainSx:j,popperProps:te,rangeDatePickerProps:Fo,defaultCountryTimezone:Ce,timezoneCountriesCodes:Te}){let[w,ke]=useState(Z(e)),[x$1,C]=useState(w),[ze,Se]=useState(l??null),[ve,Wo]=useState(u||"day"),[De,Me]=useState(null),y=!!De,[Be,Ee]=useState(false),{t:re}=useTranslation(),P=useRef(null),Ho=Vb(useId(),"range-calender"),ne=i==="hijri",Y=()=>{Me(null);},Oe=r=>{Me(r.currentTarget);};useEffect(()=>{if(!y){if(n===1)return;C(Z(e));}},[y]),useEffect(()=>{if(e){let r=Z(e);ke(r),C(r),P.current&&P.current.set("date",r[0]);}},[e]),useEffect(()=>{Se(l??null);},[l,y]);let Re=()=>{ke(x$1),Y();let r;x$1[0].dayOfYear===x$1[1].dayOfYear?r=[x$1[0],x$1[1]]:r=[M(x$1[0]),B(x$1[1])],o([r[0].toDate(),r[1].toDate()]),c?.(ve||"day"),d?.(ze);},jo=useCallback(()=>{let r=w[0].format("MMM D"),$=w[1]?w[1].format("MMM D"):w[0].format("MMM D");return r===$&&!p?r:`${r} - ${$}`},[w,p]),Yo=r=>{if(r.length<2||!s){C(r);return}let $=M(r[0]).toDate(),Qo=B(r[1]).toDate(),Pe=It(Qo).diff($,"day");if(Pe<=s){C(r);return}Ee(true),C([r[0],r[1].subtract(Pe-s,"d")]),setTimeout(()=>{Ee(false);},3e3);},$o=r=>{C([M(r[0]),B(r[1])]),P.current&&P.current.set("date",r[0]);},Go=r=>{r.key==="Enter"&&x$1[1]&&!Be?(r.stopPropagation(),Re()):r.key==="Escape"&&(r.stopPropagation(),Y());};return jsxs(vo,{id:Ho,"data-testid":"RangeCalender",sx:j,children:[D?D(y,Oe):jsx(To,{onClick:Oe,open:y,children:(w[0]||w[1])&&jo()}),y&&jsx(B$1,{onClick:r=>{r.stopPropagation(),Y();}}),jsx(bt,{open:y,anchorEl:De,placement:"bottom-end",...te,children:jsxs(ho,{onKeyDown:Go,$isSingleMonth:n===1,children:[!m&&jsxs(zo,{children:[jsx(lo,{onChange:$o,isHijri:ne}),jsxs(Do,{children:[u&&jsx(eo,{groupBy:ve,isCalenderOpen:y,onUpdate:r=>{Wo(r);}}),jsx(no,{isHijri:ne,onCalendarModeSwitch:t})]})]}),jsxs(S,{sx:{display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[jsx(co,{values:x$1,onChange:Yo,isHijri:ne,ref:P,numberOfMonths:n,...Fo}),jsx(x,{in:Be&&!!s,children:jsx(b$1,{severity:"error",message:re("dateRangeError",{number:s}),sx:{marginInline:"16px",marginBottom:"16px"}})}),jsxs(ko,{sx:{borderBottomLeftRadius:"8px"},children:[!p&&Ce&&a&&Te&&jsx(So,{children:jsx(bo,{onChange:Se,selectedTimezone:ze,browserTimezone:a,defaultCountryTimezone:Ce,timezoneCountriesCodes:Te},String(y))}),new DateObject(x$1[0]).dayOfYear===new DateObject(x$1[1]).dayOfYear&&jsx(Io,{values:x$1,setValues:C}),jsxs(Co,{children:[jsx(yo,{variant:"contained",onClick:Y,children:re("cancel")}),jsx(wo,{variant:"contained",onClick:Re,disabled:!x$1[1],children:re("okay")})]})]})]})]})})]})}var Ao=At;var bi=Ao;export{bi as a};
@@ -1 +1 @@
1
- import {j,k,d,l}from'./chunk-6ZPNLCMN.js';import {Hb}from'./chunk-MMXWSV6V.js';import {forwardRef,memo}from'react';import B from'@mui/material/FormControl';import j$1 from'@mui/material/FormControlLabel';import q from'@mui/material/RadioGroup';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var i="os-shared-RadioGroup",t={root:`${i}-root`,title:`${i}-title`,group:`${i}-group`,item:`${i}-item`,label:`${i}-label`,icon:`${i}-icon`},V=["sm","md","lg"],W=["vertical","horizontal"],u="sm",S="vertical",I=0,A={sm:[7.5,16,7.5,8],md:[9,16,9,10],lg:[11,16,11,12]},T={sm:35,md:40,lg:45},U={sm:o=>({...o.v2.typography.textVariants.body.small.medium}),md:o=>({...o.v2.typography.textVariants.body.medium.medium}),lg:o=>({...o.v2.typography.textVariants.body.large.semibold,fontWeight:o.v2.typography.fontWeightMedium})};function J(o,r){let[e,a,s,d]=A[r];return `${o.v2.spacing(e)} ${o.v2.spacing(a)} ${o.v2.spacing(s)} ${o.v2.spacing(d)}`}var D=styled(B)({display:"flex",flexDirection:"column",width:"100%",minWidth:0}),C=styled(j)(({theme:o})=>({color:o.v2.palette.grey[700],marginBottom:o.v2.spacing(4)})),N=styled(q,{shouldForwardProp:o=>o!=="$layout"&&o!=="$spacing"})(({theme:o,$layout:r,$spacing:e})=>({display:"flex",flexDirection:r==="horizontal"?"row":"column",gap:o.v2.spacing(e),...r==="horizontal"&&{[`& .${t.item}`]:{width:"auto",flexShrink:0}}})),v=styled(j$1,{shouldForwardProp:o=>o!=="$size"})(({theme:o,$size:r})=>{let{brand:e,grey:a}=o.v2.palette;return {margin:0,width:"100%",cursor:"pointer",padding:J(o,r),maxHeight:o.v2.spacing(T[r]),"& .MuiFormControlLabel-label":{...U[r](o),color:a[900],display:"block",width:"100%",cursor:"pointer"},[`& .${k.root}`]:{cursor:"pointer",color:"#8C9196","&.Mui-checked":{color:e[500]}}}}),E=styled("span")(({theme:o})=>({display:"flex",alignItems:"center",justifyContent:"space-between",gap:o.v2.spacing(8),width:"100%",minWidth:0})),$=styled(d)({flexShrink:0,display:"block",marginLeft:"auto"});var z=forwardRef(({option:o,size:r=u,customLabelRenderer:e,labelPosition:a="end",customRadioProps:s,labelSx:d,className:R,sx:y,...G},f)=>{let m=e?e(o):o.label,{src:l$1,...g}=o.icon??{};return jsx(v,{ref:f,value:o.value,control:jsx(l,{...s,...o.customProps}),label:jsxs(E,{className:t.label,sx:d,children:[m,l$1?jsx($,{...g,src:l$1,className:Hb(t.icon,o.icon?.className)}):null]}),disabled:o.disabled,labelPlacement:a,$size:r,className:Hb(t.item,R),sx:y,...G})});z.displayName="RadioItem";var F=memo(z);var w=forwardRef(({options:o,onOptionChange:r,size:e=u,customLabelRenderer:a,layout:s=S,spacing:d=I,labelPosition:R="end",customRadioProps:y,labelSx:G,onChange:f,title:m,id:l,className:g,sx:M,"data-testid":k,...H},Z)=>{let Y=(c,b)=>{r?.(b),f?.(c,b);};return jsxs(D,{ref:Z,id:l,"data-testid":k??l??"RadioGroup",className:Hb(t.root,g),sx:M,children:[typeof m=="string"?jsx(C,{component:"span",textVariant:"body.small.medium",className:t.title,children:m}):m,jsx(N,{className:t.group,$layout:s,$spacing:d,onChange:Y,...H,children:o.map(c=>jsx(F,{option:c,size:e,customLabelRenderer:a,labelPosition:R,customRadioProps:y,labelSx:G},c.value))})]})});w.displayName="RadioGroup";var to=memo(w);export{t as a,V as b,W as c,u as d,S as e,I as f,to as g};
1
+ import {j,k,d,l}from'./chunk-UHFL62LB.js';import {Hb}from'./chunk-7IPJF2Q5.js';import {forwardRef,memo}from'react';import B from'@mui/material/FormControl';import j$1 from'@mui/material/FormControlLabel';import q from'@mui/material/RadioGroup';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var i="os-shared-RadioGroup",t={root:`${i}-root`,title:`${i}-title`,group:`${i}-group`,item:`${i}-item`,label:`${i}-label`,icon:`${i}-icon`},V=["sm","md","lg"],W=["vertical","horizontal"],u="sm",S="vertical",I=0,A={sm:[7.5,16,7.5,8],md:[9,16,9,10],lg:[11,16,11,12]},T={sm:35,md:40,lg:45},U={sm:o=>({...o.v2.typography.textVariants.body.small.medium}),md:o=>({...o.v2.typography.textVariants.body.medium.medium}),lg:o=>({...o.v2.typography.textVariants.body.large.semibold,fontWeight:o.v2.typography.fontWeightMedium})};function J(o,r){let[e,a,s,d]=A[r];return `${o.v2.spacing(e)} ${o.v2.spacing(a)} ${o.v2.spacing(s)} ${o.v2.spacing(d)}`}var D=styled(B)({display:"flex",flexDirection:"column",width:"100%",minWidth:0}),C=styled(j)(({theme:o})=>({color:o.v2.palette.grey[700],marginBottom:o.v2.spacing(4)})),N=styled(q,{shouldForwardProp:o=>o!=="$layout"&&o!=="$spacing"})(({theme:o,$layout:r,$spacing:e})=>({display:"flex",flexDirection:r==="horizontal"?"row":"column",gap:o.v2.spacing(e),...r==="horizontal"&&{[`& .${t.item}`]:{width:"auto",flexShrink:0}}})),v=styled(j$1,{shouldForwardProp:o=>o!=="$size"})(({theme:o,$size:r})=>{let{brand:e,grey:a}=o.v2.palette;return {margin:0,width:"100%",cursor:"pointer",padding:J(o,r),maxHeight:o.v2.spacing(T[r]),"& .MuiFormControlLabel-label":{...U[r](o),color:a[900],display:"block",width:"100%",cursor:"pointer"},[`& .${k.root}`]:{cursor:"pointer",color:"#8C9196","&.Mui-checked":{color:e[500]}}}}),E=styled("span")(({theme:o})=>({display:"flex",alignItems:"center",justifyContent:"space-between",gap:o.v2.spacing(8),width:"100%",minWidth:0})),$=styled(d)({flexShrink:0,display:"block",marginLeft:"auto"});var z=forwardRef(({option:o,size:r=u,customLabelRenderer:e,labelPosition:a="end",customRadioProps:s,labelSx:d,className:R,sx:y,...G},f)=>{let m=e?e(o):o.label,{src:l$1,...g}=o.icon??{};return jsx(v,{ref:f,value:o.value,control:jsx(l,{...s,...o.customProps}),label:jsxs(E,{className:t.label,sx:d,children:[m,l$1?jsx($,{...g,src:l$1,className:Hb(t.icon,o.icon?.className)}):null]}),disabled:o.disabled,labelPlacement:a,$size:r,className:Hb(t.item,R),sx:y,...G})});z.displayName="RadioItem";var F=memo(z);var w=forwardRef(({options:o,onOptionChange:r,size:e=u,customLabelRenderer:a,layout:s=S,spacing:d=I,labelPosition:R="end",customRadioProps:y,labelSx:G,onChange:f,title:m,id:l,className:g,sx:M,"data-testid":k,...H},Z)=>{let Y=(c,b)=>{r?.(b),f?.(c,b);};return jsxs(D,{ref:Z,id:l,"data-testid":k??l??"RadioGroup",className:Hb(t.root,g),sx:M,children:[typeof m=="string"?jsx(C,{component:"span",textVariant:"body.small.medium",className:t.title,children:m}):m,jsx(N,{className:t.group,$layout:s,$spacing:d,onChange:Y,...H,children:o.map(c=>jsx(F,{option:c,size:e,customLabelRenderer:a,labelPosition:R,customRadioProps:y,labelSx:G},c.value))})]})});w.displayName="RadioGroup";var to=memo(w);export{t as a,V as b,W as c,u as d,S as e,I as f,to as g};
@@ -1 +1 @@
1
- import {p}from'./chunk-6ZPNLCMN.js';import {Hb}from'./chunk-MMXWSV6V.js';import {Nj,Mj,Lj,Jj,Hj,Ij,Kj}from'./chunk-VRGBJY4Q.js';import {forwardRef,memo}from'react';import F from'lodash/startCase';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var x="os-shared-VerificationIcon",n={root:`${x}-root`,img:`${x}-img`},h=(o=>(o.Verified="verified",o.Reviewed="reviewed",o.Completed="completed",o.Incomplete="incomplete",o.Rejected="rejected",o.Closed="closed",o.Archived="archived",o))(h||{});var a={verified:Kj,reviewed:Ij,completed:Hj,incomplete:Jj,rejected:Lj,closed:Mj,archived:Nj},t={verified:"#2ACE0029",reviewed:"#11D0FA29",completed:"#11D0FA29",incomplete:"#D9D9D929",rejected:"#FF3D0029",closed:"#D9D9D929",archived:"#D9D9D929"};var G=2.3,$=styled("span",{shouldForwardProp:r=>!["$variant","$bgColor","$size"].includes(r)})(({$variant:r="default",$bgColor:c,$size:e=10.5})=>{let i=Math.round(e*G);return {display:"inline-flex",alignItems:"center",justifyContent:"center",...r==="circle"&&{width:`${i}px`,height:`${i}px`,borderRadius:"50%",backgroundColor:c||t.incomplete}}});var R=forwardRef(({className:r,sx:c,icon:e,label:i,variant:D="default",size:s=10.5,width:N,height:o,...w},S)=>{let b=a[e]||a.incomplete,B=t[e]||t.incomplete,p$1=i===null?"":i||F(e),M=N??s,P=o??s,l=jsx($,{ref:S,className:Hb(n.root,r),sx:c,"data-testid":"VerificationIcon",$variant:D,$bgColor:B,$size:s,...w,children:jsx("img",{className:n.img,loading:"lazy",src:b,alt:p$1||e,width:M,height:P})});return i===null?l:jsx(p,{title:p$1,wrapperProps:{display:"inline-flex"},children:l})});R.displayName="VerificationIcon";var E=memo(R);export{n as a,h as b,a as c,t as d,E as e};
1
+ import {p}from'./chunk-UHFL62LB.js';import {Hb}from'./chunk-7IPJF2Q5.js';import {Nj,Mj,Lj,Jj,Hj,Ij,Kj}from'./chunk-35FTGOAE.js';import {forwardRef,memo}from'react';import F from'lodash/startCase';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var x="os-shared-VerificationIcon",n={root:`${x}-root`,img:`${x}-img`},h=(o=>(o.Verified="verified",o.Reviewed="reviewed",o.Completed="completed",o.Incomplete="incomplete",o.Rejected="rejected",o.Closed="closed",o.Archived="archived",o))(h||{});var a={verified:Kj,reviewed:Ij,completed:Hj,incomplete:Jj,rejected:Lj,closed:Mj,archived:Nj},t={verified:"#2ACE0029",reviewed:"#11D0FA29",completed:"#11D0FA29",incomplete:"#D9D9D929",rejected:"#FF3D0029",closed:"#D9D9D929",archived:"#D9D9D929"};var G=2.3,$=styled("span",{shouldForwardProp:r=>!["$variant","$bgColor","$size"].includes(r)})(({$variant:r="default",$bgColor:c,$size:e=10.5})=>{let i=Math.round(e*G);return {display:"inline-flex",alignItems:"center",justifyContent:"center",...r==="circle"&&{width:`${i}px`,height:`${i}px`,borderRadius:"50%",backgroundColor:c||t.incomplete}}});var R=forwardRef(({className:r,sx:c,icon:e,label:i,variant:D="default",size:s=10.5,width:N,height:o,...w},S)=>{let b=a[e]||a.incomplete,B=t[e]||t.incomplete,p$1=i===null?"":i||F(e),M=N??s,P=o??s,l=jsx($,{ref:S,className:Hb(n.root,r),sx:c,"data-testid":"VerificationIcon",$variant:D,$bgColor:B,$size:s,...w,children:jsx("img",{className:n.img,loading:"lazy",src:b,alt:p$1||e,width:M,height:P})});return i===null?l:jsx(p,{title:p$1,wrapperProps:{display:"inline-flex"},children:l})});R.displayName="VerificationIcon";var E=memo(R);export{n as a,h as b,a as c,t as d,E as e};
@@ -1 +1 @@
1
- import {Hb}from'./chunk-MMXWSV6V.js';import {forwardRef,useRef,useState,useCallback,useLayoutEffect,memo}from'react';import g from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var s="os-shared-CardList",e={root:`${s}-root`,item:`${s}-item`,itemContent:`${s}-itemContent`,itemStartAdornment:`${s}-itemStartAdornment`,itemText:`${s}-itemText`,itemEndAdornment:`${s}-itemEndAdornment`};var b=styled(g,{shouldForwardProp:t=>t!=="$showShadow"})(({theme:t,$showShadow:a})=>({borderRadius:"8px",overflow:"auto",flexGrow:1,height:"100%",listStyle:"none",margin:0,padding:0,boxSizing:"border-box",[`& .${e.item}:last-of-type`]:{borderBottom:"none"},"&::after":{content:'""',position:"sticky",bottom:0,display:"block",height:"32px",marginTop:"-32px",background:"linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(251, 251, 251, 0.8) 100%)",borderRadius:"0 0 8px 8px",pointerEvents:"none",zIndex:1,transition:t.transitions.create("opacity",{duration:250}),opacity:a?1:0}})),N=styled(g)(({theme:t})=>({display:"flex",justifyContent:"space-between",alignItems:"center",paddingTop:"12px",paddingBottom:"12px",paddingInlineStart:"12px",paddingInlineEnd:"8px",borderBottom:`1px solid ${t.palette.divider}`,height:40,boxSizing:"border-box"})),E=styled("aside")({display:"flex",alignItems:"center",gap:"8px"}),T=styled("span")(({theme:t})=>({color:t.v2.palette.base.black,fontSize:"11px",fontWeight:500,lineHeight:"13.2px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"})),$=styled("aside")({display:"flex",alignItems:"center"}),A=styled("aside")({display:"flex",alignItems:"center",gap:"4px"});var v=forwardRef(({hasShadow:t=true,children:a,onScroll:i,id:d,className:l,sx:p,"data-testid":c,...C},r)=>{let L=useRef(null),[P,H]=useState(true),f=useCallback(()=>{let o=L.current;if(!o)return;let{scrollTop:S,scrollHeight:u,clientHeight:I}=o,h=u>I+1&&(S===0||I<u-S-1);H(w=>w===h?w:h);},[]);useLayoutEffect(()=>{f();});let z=useCallback(o=>{L.current=o,typeof r=="function"?r(o):r&&(r.current=o);},[r]),B=useCallback(o=>{f(),i?.(o);},[i,f]);return jsx(b,{...C,component:"ul",ref:z,id:d,"data-testid":c??d??"CardList",onScroll:B,className:Hb(e.root,l),sx:p,$showShadow:P&&t,children:a})});v.displayName="CardList";var G=memo(v);var k=forwardRef(({children:t,startAdornment:a,endAdornment:i,id:d,className:l,sx:p,"data-testid":c,...C},r)=>jsxs(N,{...C,component:"li",ref:r,id:d,"data-testid":c??d??"CardListItem",className:Hb(e.item,l),sx:p,children:[jsxs(E,{className:e.itemContent,children:[a&&jsx($,{className:e.itemStartAdornment,children:a}),jsx(T,{className:e.itemText,children:t})]}),i&&jsx(A,{className:e.itemEndAdornment,children:i})]}));k.displayName="CardListItem";var J=memo(k);export{e as a,G as b,J as c};
1
+ import {Hb}from'./chunk-7IPJF2Q5.js';import {forwardRef,useRef,useState,useCallback,useLayoutEffect,memo}from'react';import g from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var s="os-shared-CardList",e={root:`${s}-root`,item:`${s}-item`,itemContent:`${s}-itemContent`,itemStartAdornment:`${s}-itemStartAdornment`,itemText:`${s}-itemText`,itemEndAdornment:`${s}-itemEndAdornment`};var b=styled(g,{shouldForwardProp:t=>t!=="$showShadow"})(({theme:t,$showShadow:a})=>({borderRadius:"8px",overflow:"auto",flexGrow:1,height:"100%",listStyle:"none",margin:0,padding:0,boxSizing:"border-box",[`& .${e.item}:last-of-type`]:{borderBottom:"none"},"&::after":{content:'""',position:"sticky",bottom:0,display:"block",height:"32px",marginTop:"-32px",background:"linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(251, 251, 251, 0.8) 100%)",borderRadius:"0 0 8px 8px",pointerEvents:"none",zIndex:1,transition:t.transitions.create("opacity",{duration:250}),opacity:a?1:0}})),N=styled(g)(({theme:t})=>({display:"flex",justifyContent:"space-between",alignItems:"center",paddingTop:"12px",paddingBottom:"12px",paddingInlineStart:"12px",paddingInlineEnd:"8px",borderBottom:`1px solid ${t.palette.divider}`,height:40,boxSizing:"border-box"})),E=styled("aside")({display:"flex",alignItems:"center",gap:"8px"}),T=styled("span")(({theme:t})=>({color:t.v2.palette.base.black,fontSize:"11px",fontWeight:500,lineHeight:"13.2px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"})),$=styled("aside")({display:"flex",alignItems:"center"}),A=styled("aside")({display:"flex",alignItems:"center",gap:"4px"});var v=forwardRef(({hasShadow:t=true,children:a,onScroll:i,id:d,className:l,sx:p,"data-testid":c,...C},r)=>{let L=useRef(null),[P,H]=useState(true),f=useCallback(()=>{let o=L.current;if(!o)return;let{scrollTop:S,scrollHeight:u,clientHeight:I}=o,h=u>I+1&&(S===0||I<u-S-1);H(w=>w===h?w:h);},[]);useLayoutEffect(()=>{f();});let z=useCallback(o=>{L.current=o,typeof r=="function"?r(o):r&&(r.current=o);},[r]),B=useCallback(o=>{f(),i?.(o);},[i,f]);return jsx(b,{...C,component:"ul",ref:z,id:d,"data-testid":c??d??"CardList",onScroll:B,className:Hb(e.root,l),sx:p,$showShadow:P&&t,children:a})});v.displayName="CardList";var G=memo(v);var k=forwardRef(({children:t,startAdornment:a,endAdornment:i,id:d,className:l,sx:p,"data-testid":c,...C},r)=>jsxs(N,{...C,component:"li",ref:r,id:d,"data-testid":c??d??"CardListItem",className:Hb(e.item,l),sx:p,children:[jsxs(E,{className:e.itemContent,children:[a&&jsx($,{className:e.itemStartAdornment,children:a}),jsx(T,{className:e.itemText,children:t})]}),i&&jsx(A,{className:e.itemEndAdornment,children:i})]}));k.displayName="CardListItem";var J=memo(k);export{e as a,G as b,J as c};
@@ -1 +1 @@
1
- import {j}from'./chunk-6ZPNLCMN.js';import {Hb}from'./chunk-MMXWSV6V.js';import {forwardRef,memo}from'react';import C from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var p="os-shared-Card",o={root:`${p}-root`,header:`${p}-header`,title:`${p}-title`},n=233,f=39;var c=styled(C)(({theme:r})=>{let{grey:e}=r.v2.palette;return {display:"flex",flexDirection:"column",height:n,border:`1px solid ${e[100]}`,borderRadius:r.v2.radius(8),backgroundColor:"#FBFBFB",fontSize:r.v2.typography.textVariants.body.small.regular.fontSize,transform:"scale(1)"}}),y=styled(C,{shouldForwardProp:r=>r!=="$hasStartAdornment"})(({theme:r,$hasStartAdornment:e})=>({display:"flex",alignItems:"center",...e&&{gap:r.v2.spacing(8)},height:f,flexShrink:0,overflow:"visible",padding:`${r.v2.spacing(8)} ${r.v2.spacing(12)}`,borderBottom:`1px solid ${r.v2.palette.grey[100]}`})),x=styled(j)(({theme:r})=>({flexGrow:1,minWidth:0,color:r.v2.palette.grey[900],textTransform:"capitalize"}));var H=forwardRef(({id:r,className:e,sx:d,children:s,...a},l)=>jsx(c,{ref:l,component:"article",id:r,"data-testid":r??"Card",...a,className:Hb(o.root,e),sx:d,children:s}));H.displayName="Card";var v=memo(H);var g=forwardRef(({id:r,className:e,sx:d,children:s,startAdornment:a,endAdornment:l,...S},N)=>jsxs(y,{ref:N,component:"header",id:r,"data-testid":r??"CardHeader",...S,$hasStartAdornment:a!=null,className:Hb(o.header,e),sx:d,children:[a,jsx(x,{component:"div",textVariant:"body.small.semibold",className:o.title,children:s}),l]}));g.displayName="CardHeader";var T=memo(g);export{o as a,v as b,T as c};
1
+ import {j}from'./chunk-UHFL62LB.js';import {Hb}from'./chunk-7IPJF2Q5.js';import {forwardRef,memo}from'react';import C from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var p="os-shared-Card",o={root:`${p}-root`,header:`${p}-header`,title:`${p}-title`},n=233,f=39;var c=styled(C)(({theme:r})=>{let{grey:e}=r.v2.palette;return {display:"flex",flexDirection:"column",height:n,border:`1px solid ${e[100]}`,borderRadius:r.v2.radius(8),backgroundColor:"#FBFBFB",fontSize:r.v2.typography.textVariants.body.small.regular.fontSize,transform:"scale(1)"}}),y=styled(C,{shouldForwardProp:r=>r!=="$hasStartAdornment"})(({theme:r,$hasStartAdornment:e})=>({display:"flex",alignItems:"center",...e&&{gap:r.v2.spacing(8)},height:f,flexShrink:0,overflow:"visible",padding:`${r.v2.spacing(8)} ${r.v2.spacing(12)}`,borderBottom:`1px solid ${r.v2.palette.grey[100]}`})),x=styled(j)(({theme:r})=>({flexGrow:1,minWidth:0,color:r.v2.palette.grey[900],textTransform:"capitalize"}));var H=forwardRef(({id:r,className:e,sx:d,children:s,...a},l)=>jsx(c,{ref:l,component:"article",id:r,"data-testid":r??"Card",...a,className:Hb(o.root,e),sx:d,children:s}));H.displayName="Card";var v=memo(H);var g=forwardRef(({id:r,className:e,sx:d,children:s,startAdornment:a,endAdornment:l,...S},N)=>jsxs(y,{ref:N,component:"header",id:r,"data-testid":r??"CardHeader",...S,$hasStartAdornment:a!=null,className:Hb(o.header,e),sx:d,children:[a,jsx(x,{component:"div",textVariant:"body.small.semibold",className:o.title,children:s}),l]}));g.displayName="CardHeader";var T=memo(g);export{o as a,v as b,T as c};
@@ -1 +1 @@
1
- import {b as b$1,a}from'./chunk-6ZPNLCMN.js';import {Hb}from'./chunk-MMXWSV6V.js';import {forwardRef,useState,useRef,useEffect,memo}from'react';import {styled,alpha,useTheme}from'@mui/material/styles';import {motion,AnimatePresence}from'framer-motion';import {useTranslation}from'react-i18next';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import it from'@mui/material/Box';var r="os-shared-SearchButton",e={root:`${r}-root`,field:`${r}-field`,clear:`${r}-clear`,clearIcon:`${r}-clearIcon`,trigger:`${r}-trigger`,triggerActive:`${r}-triggerActive`},n=12,l=30,E=32,I=30,m=200,b={duration:.18,ease:"easeInOut"},A={duration:.05,ease:"easeIn"},y=3,O=10,f=11,H=48;var L=t=>jsx("svg",{width:n,height:n,viewBox:"0 0 7 7",fill:"none","aria-hidden":"true",...t,children:jsx("path",{d:"M2.55453 0C1.14683 0 0 1.15002 0 2.56164C0 3.97325 1.14683 5.12328 2.55453 5.12328C3.16345 5.12328 3.72322 4.90758 4.16281 4.54912L5.89118 6.28229C5.91553 6.30772 5.9447 6.32803 5.97697 6.34202C6.00925 6.356 6.04398 6.36339 6.07913 6.36375C6.11429 6.36411 6.14917 6.35743 6.18172 6.3441C6.21427 6.33078 6.24384 6.31107 6.2687 6.28614C6.29356 6.26121 6.31321 6.23156 6.3265 6.19892C6.33979 6.16627 6.34645 6.1313 6.3461 6.09605C6.34574 6.06079 6.33837 6.02596 6.32442 5.9936C6.31047 5.96124 6.29022 5.93199 6.26486 5.90757L4.53649 4.17439C4.89396 3.73358 5.10906 3.17225 5.10906 2.56164C5.10906 1.15002 3.96223 0 2.55453 0ZM2.55453 0.529994C3.6766 0.529994 4.58054 1.43645 4.58054 2.56164C4.58054 3.10976 4.36494 3.60497 4.0152 3.96978C3.99364 3.98567 3.97461 4.00475 3.95877 4.02637C3.59497 4.37708 3.10113 4.59328 2.55453 4.59328C1.43247 4.59328 0.528524 3.68682 0.528524 2.56164C0.528524 1.43645 1.43247 0.529994 2.55453 0.529994Z",fill:"currentColor"})}),D=t=>jsx("svg",{width:"13",height:"13",viewBox:"0 0 13 13",fill:"none","aria-hidden":"true",...t,children:jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.69808 4.16259C8.78018 4.16065 8.86095 4.18356 8.92981 4.22833C8.99866 4.27309 9.05239 4.33762 9.08393 4.41344C9.11548 4.48927 9.12338 4.57286 9.10659 4.65325C9.08981 4.73365 9.04911 4.80708 8.98986 4.86395L7.07755 6.77626L8.98839 8.68713L8.98986 8.68854C9.02896 8.72608 9.06018 8.77105 9.08169 8.82081C9.1032 8.87057 9.11456 8.92413 9.11511 8.97833C9.11566 9.03254 9.10539 9.08631 9.0849 9.1365C9.06441 9.18669 9.03411 9.23229 8.99578 9.27062C8.95745 9.30895 8.91185 9.33925 8.86166 9.35974C8.81147 9.38023 8.7577 9.3905 8.70349 9.38995C8.64928 9.3894 8.59573 9.37804 8.54597 9.35653C8.49621 9.33502 8.45125 9.30379 8.41371 9.26469L6.50141 7.35239L4.59054 9.26323L4.58913 9.2647C4.55159 9.30381 4.50662 9.33502 4.45685 9.35653C4.40709 9.37804 4.35354 9.3894 4.29933 9.38995C4.24513 9.3905 4.19135 9.38023 4.14116 9.35974C4.09098 9.33925 4.04538 9.30895 4.00705 9.27062C3.96872 9.23229 3.93842 9.18669 3.91793 9.1365C3.89744 9.08631 3.88717 9.03254 3.88772 8.97833C3.88827 8.92413 3.89963 8.87057 3.92114 8.82081C3.94264 8.77105 3.97388 8.7261 4.01298 8.68855L5.92528 6.77626L4.01443 4.86539L4.01339 4.86438C3.95522 4.80788 3.91524 4.73531 3.89855 4.65596C3.88186 4.5766 3.88923 4.49407 3.91971 4.41893C3.95019 4.34379 4.00239 4.27945 4.06964 4.23414C4.13689 4.18884 4.21615 4.16462 4.29722 4.1646C4.30093 4.1646 4.30464 4.16465 4.30835 4.16475C4.35906 4.16614 4.4091 4.17699 4.45589 4.19678C4.5061 4.21801 4.55154 4.24911 4.58952 4.28822L6.50141 6.20012L8.41228 4.28928L8.4137 4.2878C8.43812 4.26236 8.4655 4.24043 8.49507 4.22235C8.55578 4.18521 8.62571 4.1643 8.69808 4.16259Z",fill:"currentColor"})});var U=styled(it)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"relative",zIndex:y,width:"fit-content",height:t.v2.spacing(32),gap:t.v2.spacing(8)})),G=styled(motion.input)(({theme:t})=>{let{base:i,grey:o,brand:s}=t.v2.palette;return {padding:t.v2.spacing(8),paddingRight:t.v2.spacing(24),borderRadius:t.v2.radius(4),height:t.v2.spacing(32),color:o[900],fontSize:t.v2.typography.textVariants.body.small.regular.fontSize,outline:0,position:"relative",zIndex:O,background:i.white,display:"flex",minWidth:0,flexGrow:0,flexShrink:0,boxShadow:`0px 0px 4px 0px ${alpha(s[500],.5)}`,border:`1px solid ${s[500]}`,willChange:"width","::placeholder":{color:"#D5D5D5"}}}),F=styled(motion.button)(({theme:t})=>({position:"absolute",zIndex:f,top:0,bottom:0,right:t.v2.spacing(H),marginBlock:"auto",width:t.v2.spacing(24),height:t.v2.spacing(24),padding:0,border:"none",background:"transparent",color:t.v2.palette.grey[500],cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"flex-end",lineHeight:0,[`& .${e.clearIcon}`]:{backgroundColor:t.v2.palette.grey[100],borderRadius:"50%"}})),k=styled(b$1)(({theme:t})=>{let{base:i}=t.v2.palette,o="linear-gradient(270deg, #147DC5 0.67%, #3DA6E1 98.91%)";return {position:"relative",zIndex:f,"&&":{boxSizing:"border-box",width:t.v2.spacing(l),minWidth:t.v2.spacing(l),height:t.v2.spacing(E),padding:0,borderWidth:"1px",borderStyle:"solid",borderRadius:t.v2.radius(4)},[`&& .${a.icon}`]:{width:t.v2.spacing(n),height:t.v2.spacing(n)},"&:hover":{opacity:.7},[`&&.${e.triggerActive}`]:{boxSizing:"border-box",width:t.v2.spacing(l),minWidth:t.v2.spacing(l),height:t.v2.spacing(E),padding:0,border:"1px solid transparent",backgroundColor:"transparent",backgroundImage:o,backgroundClip:"padding-box",backgroundOrigin:"padding-box",color:i.white,boxShadow:"none",outline:"none","&:hover, &:focus, &:focus-visible":{opacity:.8}}}});var W=forwardRef(({onSearchChange:t,placeholder:i,defaultValue:o,id:s,className:z,sx:M,disabled:V,title:K,"aria-label":Y},j)=>{let[c,S]=useState(!!o),[q,g]=useState(false),[p,T]=useState(o??""),B=useRef(null),d=useRef(false),J=useTheme(),{t:Q}=useTranslation(),R=i??(Q("search")||"");useEffect(()=>{T(o??""),S(!!o);},[o]),useEffect(()=>{if(!c){d.current=false;return}d.current&&(d.current=false,B.current?.focus());},[c]);let tt=()=>{g(true),S(false),t?.(""),T("");},et=()=>{p&&t?.(p);},ot=()=>{c||(d.current=true),g(false),S(true),et();},rt=_=>{_.key==="Enter"&&t?.(p);},nt=_=>{T(_.currentTarget.value);},at=c||q;return jsxs(U,{ref:j,id:s,className:Hb(e.root,z),sx:M,"data-testid":s??"SearchButton",children:[jsx(AnimatePresence,{initial:false,onExitComplete:()=>g(false),children:c&&jsxs(Fragment,{children:[jsx(G,{ref:B,className:e.field,initial:{width:I},animate:{width:m},exit:{width:I,border:`1px solid ${J.v2.palette.grey[100]}`,boxShadow:"none"},transition:b,placeholder:R,value:p,onKeyDown:rt,onChange:nt,"aria-label":R||"Search"}),jsx(F,{className:e.clear,type:"button",initial:{opacity:1},exit:{opacity:0},transition:A,"aria-label":"Clear search",onClick:tt,children:jsx(D,{className:e.clearIcon})})]})}),jsx(k,{type:"button",variant:"secondary",icon:jsx(L,{}),"aria-label":Y??"Search",disabled:V,title:K,className:Hb(e.trigger,at&&e.triggerActive),onClick:ot})]})});W.displayName="SearchButton";var X=memo(W);export{e as a,X as b};
1
+ import {b as b$1,a}from'./chunk-UHFL62LB.js';import {Hb}from'./chunk-7IPJF2Q5.js';import {forwardRef,useState,useRef,useEffect,memo}from'react';import {styled,alpha,useTheme}from'@mui/material/styles';import {motion,AnimatePresence}from'framer-motion';import {useTranslation}from'react-i18next';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import it from'@mui/material/Box';var r="os-shared-SearchButton",e={root:`${r}-root`,field:`${r}-field`,clear:`${r}-clear`,clearIcon:`${r}-clearIcon`,trigger:`${r}-trigger`,triggerActive:`${r}-triggerActive`},n=12,l=30,E=32,I=30,m=200,b={duration:.18,ease:"easeInOut"},A={duration:.05,ease:"easeIn"},y=3,O=10,f=11,H=48;var L=t=>jsx("svg",{width:n,height:n,viewBox:"0 0 7 7",fill:"none","aria-hidden":"true",...t,children:jsx("path",{d:"M2.55453 0C1.14683 0 0 1.15002 0 2.56164C0 3.97325 1.14683 5.12328 2.55453 5.12328C3.16345 5.12328 3.72322 4.90758 4.16281 4.54912L5.89118 6.28229C5.91553 6.30772 5.9447 6.32803 5.97697 6.34202C6.00925 6.356 6.04398 6.36339 6.07913 6.36375C6.11429 6.36411 6.14917 6.35743 6.18172 6.3441C6.21427 6.33078 6.24384 6.31107 6.2687 6.28614C6.29356 6.26121 6.31321 6.23156 6.3265 6.19892C6.33979 6.16627 6.34645 6.1313 6.3461 6.09605C6.34574 6.06079 6.33837 6.02596 6.32442 5.9936C6.31047 5.96124 6.29022 5.93199 6.26486 5.90757L4.53649 4.17439C4.89396 3.73358 5.10906 3.17225 5.10906 2.56164C5.10906 1.15002 3.96223 0 2.55453 0ZM2.55453 0.529994C3.6766 0.529994 4.58054 1.43645 4.58054 2.56164C4.58054 3.10976 4.36494 3.60497 4.0152 3.96978C3.99364 3.98567 3.97461 4.00475 3.95877 4.02637C3.59497 4.37708 3.10113 4.59328 2.55453 4.59328C1.43247 4.59328 0.528524 3.68682 0.528524 2.56164C0.528524 1.43645 1.43247 0.529994 2.55453 0.529994Z",fill:"currentColor"})}),D=t=>jsx("svg",{width:"13",height:"13",viewBox:"0 0 13 13",fill:"none","aria-hidden":"true",...t,children:jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.69808 4.16259C8.78018 4.16065 8.86095 4.18356 8.92981 4.22833C8.99866 4.27309 9.05239 4.33762 9.08393 4.41344C9.11548 4.48927 9.12338 4.57286 9.10659 4.65325C9.08981 4.73365 9.04911 4.80708 8.98986 4.86395L7.07755 6.77626L8.98839 8.68713L8.98986 8.68854C9.02896 8.72608 9.06018 8.77105 9.08169 8.82081C9.1032 8.87057 9.11456 8.92413 9.11511 8.97833C9.11566 9.03254 9.10539 9.08631 9.0849 9.1365C9.06441 9.18669 9.03411 9.23229 8.99578 9.27062C8.95745 9.30895 8.91185 9.33925 8.86166 9.35974C8.81147 9.38023 8.7577 9.3905 8.70349 9.38995C8.64928 9.3894 8.59573 9.37804 8.54597 9.35653C8.49621 9.33502 8.45125 9.30379 8.41371 9.26469L6.50141 7.35239L4.59054 9.26323L4.58913 9.2647C4.55159 9.30381 4.50662 9.33502 4.45685 9.35653C4.40709 9.37804 4.35354 9.3894 4.29933 9.38995C4.24513 9.3905 4.19135 9.38023 4.14116 9.35974C4.09098 9.33925 4.04538 9.30895 4.00705 9.27062C3.96872 9.23229 3.93842 9.18669 3.91793 9.1365C3.89744 9.08631 3.88717 9.03254 3.88772 8.97833C3.88827 8.92413 3.89963 8.87057 3.92114 8.82081C3.94264 8.77105 3.97388 8.7261 4.01298 8.68855L5.92528 6.77626L4.01443 4.86539L4.01339 4.86438C3.95522 4.80788 3.91524 4.73531 3.89855 4.65596C3.88186 4.5766 3.88923 4.49407 3.91971 4.41893C3.95019 4.34379 4.00239 4.27945 4.06964 4.23414C4.13689 4.18884 4.21615 4.16462 4.29722 4.1646C4.30093 4.1646 4.30464 4.16465 4.30835 4.16475C4.35906 4.16614 4.4091 4.17699 4.45589 4.19678C4.5061 4.21801 4.55154 4.24911 4.58952 4.28822L6.50141 6.20012L8.41228 4.28928L8.4137 4.2878C8.43812 4.26236 8.4655 4.24043 8.49507 4.22235C8.55578 4.18521 8.62571 4.1643 8.69808 4.16259Z",fill:"currentColor"})});var U=styled(it)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"relative",zIndex:y,width:"fit-content",height:t.v2.spacing(32),gap:t.v2.spacing(8)})),G=styled(motion.input)(({theme:t})=>{let{base:i,grey:o,brand:s}=t.v2.palette;return {padding:t.v2.spacing(8),paddingRight:t.v2.spacing(24),borderRadius:t.v2.radius(4),height:t.v2.spacing(32),color:o[900],fontSize:t.v2.typography.textVariants.body.small.regular.fontSize,outline:0,position:"relative",zIndex:O,background:i.white,display:"flex",minWidth:0,flexGrow:0,flexShrink:0,boxShadow:`0px 0px 4px 0px ${alpha(s[500],.5)}`,border:`1px solid ${s[500]}`,willChange:"width","::placeholder":{color:"#D5D5D5"}}}),F=styled(motion.button)(({theme:t})=>({position:"absolute",zIndex:f,top:0,bottom:0,right:t.v2.spacing(H),marginBlock:"auto",width:t.v2.spacing(24),height:t.v2.spacing(24),padding:0,border:"none",background:"transparent",color:t.v2.palette.grey[500],cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"flex-end",lineHeight:0,[`& .${e.clearIcon}`]:{backgroundColor:t.v2.palette.grey[100],borderRadius:"50%"}})),k=styled(b$1)(({theme:t})=>{let{base:i}=t.v2.palette,o="linear-gradient(270deg, #147DC5 0.67%, #3DA6E1 98.91%)";return {position:"relative",zIndex:f,"&&":{boxSizing:"border-box",width:t.v2.spacing(l),minWidth:t.v2.spacing(l),height:t.v2.spacing(E),padding:0,borderWidth:"1px",borderStyle:"solid",borderRadius:t.v2.radius(4)},[`&& .${a.icon}`]:{width:t.v2.spacing(n),height:t.v2.spacing(n)},"&:hover":{opacity:.7},[`&&.${e.triggerActive}`]:{boxSizing:"border-box",width:t.v2.spacing(l),minWidth:t.v2.spacing(l),height:t.v2.spacing(E),padding:0,border:"1px solid transparent",backgroundColor:"transparent",backgroundImage:o,backgroundClip:"padding-box",backgroundOrigin:"padding-box",color:i.white,boxShadow:"none",outline:"none","&:hover, &:focus, &:focus-visible":{opacity:.8}}}});var W=forwardRef(({onSearchChange:t,placeholder:i,defaultValue:o,id:s,className:z,sx:M,disabled:V,title:K,"aria-label":Y},j)=>{let[c,S]=useState(!!o),[q,g]=useState(false),[p,T]=useState(o??""),B=useRef(null),d=useRef(false),J=useTheme(),{t:Q}=useTranslation(),R=i??(Q("search")||"");useEffect(()=>{T(o??""),S(!!o);},[o]),useEffect(()=>{if(!c){d.current=false;return}d.current&&(d.current=false,B.current?.focus());},[c]);let tt=()=>{g(true),S(false),t?.(""),T("");},et=()=>{p&&t?.(p);},ot=()=>{c||(d.current=true),g(false),S(true),et();},rt=_=>{_.key==="Enter"&&t?.(p);},nt=_=>{T(_.currentTarget.value);},at=c||q;return jsxs(U,{ref:j,id:s,className:Hb(e.root,z),sx:M,"data-testid":s??"SearchButton",children:[jsx(AnimatePresence,{initial:false,onExitComplete:()=>g(false),children:c&&jsxs(Fragment,{children:[jsx(G,{ref:B,className:e.field,initial:{width:I},animate:{width:m},exit:{width:I,border:`1px solid ${J.v2.palette.grey[100]}`,boxShadow:"none"},transition:b,placeholder:R,value:p,onKeyDown:rt,onChange:nt,"aria-label":R||"Search"}),jsx(F,{className:e.clear,type:"button",initial:{opacity:1},exit:{opacity:0},transition:A,"aria-label":"Clear search",onClick:tt,children:jsx(D,{className:e.clearIcon})})]})}),jsx(k,{type:"button",variant:"secondary",icon:jsx(L,{}),"aria-label":Y??"Search",disabled:V,title:K,className:Hb(e.trigger,at&&e.triggerActive),onClick:ot})]})});W.displayName="SearchButton";var X=memo(W);export{e as a,X as b};
@@ -1 +1 @@
1
- import {v}from'./chunk-6ZPNLCMN.js';import {Hb,X as X$1,Y as Y$1}from'./chunk-MMXWSV6V.js';import {Gb,Yc}from'./chunk-VRGBJY4Q.js';import {forwardRef,useState,useRef,useCallback,memo,useEffect,useMemo}from'react';import H from'@mui/material/Box';import ko from'@mui/material/ClickAwayListener';import Po from'@mui/material/Popper';import go from'@mui/material/Stack';import ro from'@mui/material/Typography';import {RgbColorPicker,RgbaColorPicker}from'react-colorful';import eo from'@mui/material/MenuItem';import {styled,alpha}from'@mui/material/styles';import K from'@mui/material/Button';import Co from'@mui/material/TextField';import ho from'@mui/material/MenuList';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import v$1 from'color';import no from'@mui/material/InputAdornment';var m="os-shared-ColorPicker",n={root:`${m}-root`,controls:`${m}-controls`,swatch:`${m}-swatch`,actions:`${m}-actions`,valueLabel:`${m}-valueLabel`,editButton:`${m}-editButton`,resetButton:`${m}-resetButton`,panel:`${m}-panel`,panelFields:`${m}-panelFields`,panelFooter:`${m}-panelFooter`,panelCancel:`${m}-panelCancel`,panelConfirm:`${m}-panelConfirm`,schemeTrigger:`${m}-schemeTrigger`,schemeList:`${m}-schemeList`,channelInput:`${m}-channelInput`},F={hideReset:false,disableAlpha:false},I={cancel:"Cancel",confirm:"Okay"},w="Edit";var V=styled(go)(({theme:o})=>({backgroundColor:o.palette.grey[400],borderRadius:"4px",padding:o.spacing(.5),paddingRight:o.spacing(1.5)})),X=styled("button")({background:"transparent",border:"none",padding:0,margin:0,cursor:"pointer",width:10,height:10,display:"flex",justifyContent:"center",alignItems:"center","&:disabled, &.Mui-disabled":{opacity:.5,cursor:"not-allowed"}}),Z=styled(H)(({theme:o})=>({boxShadow:"0px 8px 30px rgba(0, 0, 0, 0.16)",width:264,backgroundColor:o.palette.common.white,padding:"12px",borderRadius:o.spacing(1),"& .react-colorful":{width:"100%","&__saturation":{minHeight:152,borderRadius:"4px",marginBottom:o.spacing(2),border:0,"&-pointer":{width:13,height:13}},"&__hue":{borderRadius:"4px",height:"8px","&-pointer":{width:10,height:10}},"&__alpha":{marginTop:o.spacing(2),marginBottom:0,border:0,borderRadius:"4px",height:"8px","&-pointer":{width:10,height:10}}}})),j=styled(H)(()=>({display:"flex",gap:"8px",justifyContent:"flex-end"})),q=styled("button")(({theme:o})=>({fontWeight:500,fontSize:"9px",color:o.palette.info.dark,textDecoration:"underline",cursor:"pointer",background:"transparent",border:"none",padding:0,margin:0,fontFamily:"inherit","&:disabled, &.Mui-disabled":{color:alpha(o.palette.info.dark,.5),textDecoration:"none",cursor:"not-allowed"},"&:hover:not(:disabled)":{textDecoration:"none"}})),J=styled(K)(({theme:o})=>({textTransform:"capitalize",minWidth:"auto",width:74,borderRadius:"4px",border:`1px solid ${o.palette.info.dark}`,backgroundColor:o.palette.info.dark,fontWeight:700,fontSize:"11px",color:o.palette.common.white,"&:hover":{backgroundColor:o.palette.info.dark}})),Q=styled(K)(({theme:o})=>({textTransform:"capitalize",minWidth:"auto",width:74,borderRadius:"4px",border:`1px solid ${o.palette.divider}`,backgroundColor:o.palette.common.white,fontWeight:500,fontSize:"11px",color:o.palette.text.primary,"&:hover":{background:"transparent"}})),Y=styled("button",{shouldForwardProp:o=>o!=="active"})(({theme:o,active:a})=>({display:"flex",justifyContent:"space-between",alignItems:"center",color:o.palette.text.primary,border:"1px solid #F2F2F2",fontSize:12,fontWeight:500,backgroundColor:"transparent",padding:"4px 8px",borderRadius:"4px",minWidth:70,cursor:"pointer",...a&&{border:"1px solid #1F88D0",boxShadow:"0px 0px 4px 0px #1F88D080"}})),oo=styled(ho)({backgroundColor:"#ffffff",borderRadius:"4px",boxShadow:"0px 8px 30px 0px #00000029",minWidth:70,"& .MuiMenuItem-root":{fontSize:12,fontWeight:500,padding:"4px 8px"}}),b=styled(Co)(({theme:o})=>({"& .MuiOutlinedInput-root":{fontSize:"12px",fontWeight:500,borderRadius:"4px","& input":{padding:"4px","&::-webkit-outer-spin-button, &::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0},"&[type=number]":{MozAppearance:"textfield"}},"& .MuiOutlinedInput-notchedOutline":{borderColor:o.palette.divider,borderWidth:"1px"},"&:hover, &.Mui-focused":{"& .MuiOutlinedInput-notchedOutline":{borderColor:o.palette.divider,borderWidth:"1px"}}}}));var yo=({scheme:o,setScheme:a})=>{let[l,t]=useState(null),u=!!l,i=useCallback(c=>{t(l?null:c.currentTarget);},[l]),s=useCallback(()=>{t(null);},[]),d=useCallback(c=>{s(),a(c);},[s,a]);return jsxs(Fragment,{children:[jsxs(Y,{type:"button",active:u,onClick:i,className:n.schemeTrigger,children:[o,jsx(H,{component:"img",sx:{transform:u?"rotateZ(180deg)":"rotateZ(0)",transition:"200ms transform ease-out"},src:Yc,alt:""})]}),jsx(Po,{anchorEl:l,open:u,placement:"bottom",disablePortal:true,keepMounted:true,modifiers:[{name:"offset",options:{offset:[0,4]}}],children:jsx(ko,{onClickAway:c=>{l?.contains(c.target)||s();},children:jsxs(oo,{className:n.schemeList,children:[jsx(eo,{onClick:()=>d("RGB"),children:"RGB"}),jsx(eo,{onClick:()=>d("HEX"),children:"HEX"})]})})})]})},to=yo;function B(o,a){return Number.isNaN(o)||o<0?0:o>a?a:o}var Ao=({value:o,onChange:a,disableAlpha:l=false})=>{let t=useMemo(()=>v$1.rgb(o.r,o.g,o.b,o.a).hex().replace("#",""),[o]),[u,i]=useState(t),s=Math.round(o.a*100);useEffect(()=>{let e=v$1.rgb(o.r,o.g,o.b).hex().replace("#","");i(e);},[o.r,o.g,o.b]);let d=e=>{let r=e.target.value.replace(/[^0-9a-fA-F]/g,"").toUpperCase();r.length>6&&(r=r.slice(0,6)),i(r);},c=()=>{let e=u;if(e.length===3&&(e=e.split("").map(r=>r+r).join(""),i(e)),e.length===6)try{let r=v$1(`#${e}`).alpha(o.a);a({r:r.red(),g:r.green(),b:r.blue(),a:r.alpha()});}catch{i(t);}else i(t);},C=e=>{let r=B(parseInt(e.target.value,10),100);a({...o,a:r/100});},f=n.channelInput;return jsxs(go,{direction:"row",spacing:1,alignItems:"flex-start",children:[jsx(b,{className:f,value:u,onChange:d,onBlur:c,placeholder:"FFFFFF",sx:{flex:1.4,"& .MuiOutlinedInput-root":{pl:1}},InputProps:{startAdornment:jsx(no,{position:"start",sx:{m:0},children:jsx(ro,{component:"span",color:e=>alpha(e.palette.text.primary,.5),display:"inline-block",fontSize:12,fontWeight:500,children:"#"})})}}),!l&&jsx(b,{className:f,type:"number",value:s,onChange:C,inputProps:{min:0,max:100},sx:{flex:.8,"& .MuiOutlinedInput-root":{pr:1}},InputProps:{endAdornment:jsx(no,{position:"end",sx:{m:0},children:jsx(ro,{component:"span",color:"text.primary",display:"inline-block",fontSize:12,fontWeight:500,children:"%"})})}})]})},ao=Ao;var _o=({value:o,onChange:a,disableAlpha:l=false})=>{let[t,u]=useState(o),{r:i,g:s,b:d,a:c}=t;useEffect(()=>{u(o);},[o]);let C=useCallback((r,x)=>p=>{u({...t,[r]:B(+p.target.value,x)});},[t]),f=useCallback((r,x)=>{a({...t,[r]:B(t[r],x)});},[a,t]),e=n.channelInput;return jsxs(go,{direction:"row",spacing:1,...l&&{flex:1},children:[jsx(b,{className:e,type:"number",value:i,onBlur:()=>f("r",255),onChange:C("r",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...l&&{sx:{flex:1}}}),jsx(b,{className:e,type:"number",value:s,onBlur:()=>f("g",255),onChange:C("g",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...l&&{sx:{flex:1}}}),jsx(b,{className:e,type:"number",value:d,onBlur:()=>f("b",255),onChange:C("b",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...l&&{sx:{flex:1}}}),!l&&jsx(b,{className:e,type:"number",value:c,onBlur:()=>f("a",100),onChange:C("a",100),inputProps:{min:0,max:100,style:{textAlign:"center"}},variant:"outlined",sx:{"& .MuiOutlinedInput-root":{pr:1}},InputProps:{endAdornment:jsx(no,{position:"end",sx:{m:0},children:jsx(ro,{component:"span",display:"inline-block",fontSize:12,fontWeight:500,children:"%"})})},size:"small"})]})},io=_o;var zo=({initialValue:o="#ffffff",onCancel:a,onConfirm:l,disableAlpha:t=false})=>{let[u,i]=useState("RGB"),[s,d]=useState(()=>{let{alpha:p,...k}=X$1(o).value;return {...k,a:p}}),c=useCallback(()=>{let{alpha:p,...k}=X$1(o).value;d({...k,a:p}),a();},[o,a]),C=useCallback(()=>{let{a:p,...k}=s;l(Y$1({...k,alpha:t?1:p}));},[s,l,t]),f=useCallback(p=>{d(t?{...p,a:1}:p);},[t]),e=useCallback(p=>{d({...p,a:p.a/100});},[]),r=useCallback(p=>{d({...p,a:p.a});},[]),x=t?RgbColorPicker:RgbaColorPicker;return jsxs(Z,{className:n.panel,children:[jsx(x,{color:s,onChange:f}),jsxs(go,{mt:2,spacing:1,direction:"row",className:n.panelFields,children:[jsx(to,{scheme:u,setScheme:i}),u==="RGB"?jsx(io,{value:{...s,a:Math.round(s.a*100)},onChange:e,disableAlpha:t}):jsx(ao,{value:{...s,a:s.a},onChange:r,disableAlpha:t})]}),jsx(v,{sx:{my:"12px"}}),jsxs(j,{className:n.panelFooter,children:[jsx(Q,{className:n.panelCancel,onClick:c,children:I.cancel}),jsx(J,{className:n.panelConfirm,onClick:C,children:I.confirm})]})]})},po=zo;var co=forwardRef(({value:o="#ffffff",onChange:a,onReset:l,sx:t,options:u,disabled:i=false,id:s,className:d},c)=>{let[C,f]=useState(null),{disableAlpha:e,hideReset:r}={...F,...u},x=useRef(null),p=useCallback(y=>{x.current=y,typeof c=="function"?c(y):c&&(c.current=y);},[c]),k=useCallback(()=>{i||f(x.current);},[i]),mo=useCallback(()=>{i||f(null);},[i]),uo=useCallback(y=>{a(e?y.substring(0,7):y),f(null);},[a,e]);return jsx(ko,{onClickAway:()=>f(null),children:jsxs(V,{ref:p,id:s,"data-testid":s??"ColorPicker",direction:"row",justifyContent:"space-between",spacing:1,alignItems:"center",className:Hb(n.root,d),sx:t,children:[jsxs(go,{direction:"row",spacing:1,alignItems:"center",className:n.controls,children:[jsx(H,{borderRadius:"5px",width:32,height:32,sx:{backgroundColor:o},className:n.swatch}),jsxs(H,{className:n.actions,children:[jsx(ro,{className:n.valueLabel,fontWeight:500,fontSize:9,color:"text.primary",textTransform:"uppercase",children:o}),jsx(q,{className:n.editButton,type:"button",onClick:k,disabled:i,children:w})]})]}),r?jsx("div",{}):jsx(X,{className:n.resetButton,type:"button",disabled:i,onClick:l,children:jsx(H,{component:"img",src:Gb,width:10,height:10,alt:""})}),jsx(Po,{anchorEl:C,open:!!C,placement:"top",children:jsx(po,{initialValue:o,onCancel:mo,onConfirm:uo,disableAlpha:e})})]})})});co.displayName="ColorPicker";var qo=memo(co);export{m as a,n as b,F as c,I as d,w as e,qo as f};
1
+ import {v}from'./chunk-UHFL62LB.js';import {Hb,X as X$1,Y as Y$1}from'./chunk-7IPJF2Q5.js';import {Gb,Yc}from'./chunk-35FTGOAE.js';import {forwardRef,useState,useRef,useCallback,memo,useEffect,useMemo}from'react';import H from'@mui/material/Box';import ko from'@mui/material/ClickAwayListener';import Po from'@mui/material/Popper';import go from'@mui/material/Stack';import ro from'@mui/material/Typography';import {RgbColorPicker,RgbaColorPicker}from'react-colorful';import eo from'@mui/material/MenuItem';import {styled,alpha}from'@mui/material/styles';import K from'@mui/material/Button';import Co from'@mui/material/TextField';import ho from'@mui/material/MenuList';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import v$1 from'color';import no from'@mui/material/InputAdornment';var m="os-shared-ColorPicker",n={root:`${m}-root`,controls:`${m}-controls`,swatch:`${m}-swatch`,actions:`${m}-actions`,valueLabel:`${m}-valueLabel`,editButton:`${m}-editButton`,resetButton:`${m}-resetButton`,panel:`${m}-panel`,panelFields:`${m}-panelFields`,panelFooter:`${m}-panelFooter`,panelCancel:`${m}-panelCancel`,panelConfirm:`${m}-panelConfirm`,schemeTrigger:`${m}-schemeTrigger`,schemeList:`${m}-schemeList`,channelInput:`${m}-channelInput`},F={hideReset:false,disableAlpha:false},I={cancel:"Cancel",confirm:"Okay"},w="Edit";var V=styled(go)(({theme:o})=>({backgroundColor:o.palette.grey[400],borderRadius:"4px",padding:o.spacing(.5),paddingRight:o.spacing(1.5)})),X=styled("button")({background:"transparent",border:"none",padding:0,margin:0,cursor:"pointer",width:10,height:10,display:"flex",justifyContent:"center",alignItems:"center","&:disabled, &.Mui-disabled":{opacity:.5,cursor:"not-allowed"}}),Z=styled(H)(({theme:o})=>({boxShadow:"0px 8px 30px rgba(0, 0, 0, 0.16)",width:264,backgroundColor:o.palette.common.white,padding:"12px",borderRadius:o.spacing(1),"& .react-colorful":{width:"100%","&__saturation":{minHeight:152,borderRadius:"4px",marginBottom:o.spacing(2),border:0,"&-pointer":{width:13,height:13}},"&__hue":{borderRadius:"4px",height:"8px","&-pointer":{width:10,height:10}},"&__alpha":{marginTop:o.spacing(2),marginBottom:0,border:0,borderRadius:"4px",height:"8px","&-pointer":{width:10,height:10}}}})),j=styled(H)(()=>({display:"flex",gap:"8px",justifyContent:"flex-end"})),q=styled("button")(({theme:o})=>({fontWeight:500,fontSize:"9px",color:o.palette.info.dark,textDecoration:"underline",cursor:"pointer",background:"transparent",border:"none",padding:0,margin:0,fontFamily:"inherit","&:disabled, &.Mui-disabled":{color:alpha(o.palette.info.dark,.5),textDecoration:"none",cursor:"not-allowed"},"&:hover:not(:disabled)":{textDecoration:"none"}})),J=styled(K)(({theme:o})=>({textTransform:"capitalize",minWidth:"auto",width:74,borderRadius:"4px",border:`1px solid ${o.palette.info.dark}`,backgroundColor:o.palette.info.dark,fontWeight:700,fontSize:"11px",color:o.palette.common.white,"&:hover":{backgroundColor:o.palette.info.dark}})),Q=styled(K)(({theme:o})=>({textTransform:"capitalize",minWidth:"auto",width:74,borderRadius:"4px",border:`1px solid ${o.palette.divider}`,backgroundColor:o.palette.common.white,fontWeight:500,fontSize:"11px",color:o.palette.text.primary,"&:hover":{background:"transparent"}})),Y=styled("button",{shouldForwardProp:o=>o!=="active"})(({theme:o,active:a})=>({display:"flex",justifyContent:"space-between",alignItems:"center",color:o.palette.text.primary,border:"1px solid #F2F2F2",fontSize:12,fontWeight:500,backgroundColor:"transparent",padding:"4px 8px",borderRadius:"4px",minWidth:70,cursor:"pointer",...a&&{border:"1px solid #1F88D0",boxShadow:"0px 0px 4px 0px #1F88D080"}})),oo=styled(ho)({backgroundColor:"#ffffff",borderRadius:"4px",boxShadow:"0px 8px 30px 0px #00000029",minWidth:70,"& .MuiMenuItem-root":{fontSize:12,fontWeight:500,padding:"4px 8px"}}),b=styled(Co)(({theme:o})=>({"& .MuiOutlinedInput-root":{fontSize:"12px",fontWeight:500,borderRadius:"4px","& input":{padding:"4px","&::-webkit-outer-spin-button, &::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0},"&[type=number]":{MozAppearance:"textfield"}},"& .MuiOutlinedInput-notchedOutline":{borderColor:o.palette.divider,borderWidth:"1px"},"&:hover, &.Mui-focused":{"& .MuiOutlinedInput-notchedOutline":{borderColor:o.palette.divider,borderWidth:"1px"}}}}));var yo=({scheme:o,setScheme:a})=>{let[l,t]=useState(null),u=!!l,i=useCallback(c=>{t(l?null:c.currentTarget);},[l]),s=useCallback(()=>{t(null);},[]),d=useCallback(c=>{s(),a(c);},[s,a]);return jsxs(Fragment,{children:[jsxs(Y,{type:"button",active:u,onClick:i,className:n.schemeTrigger,children:[o,jsx(H,{component:"img",sx:{transform:u?"rotateZ(180deg)":"rotateZ(0)",transition:"200ms transform ease-out"},src:Yc,alt:""})]}),jsx(Po,{anchorEl:l,open:u,placement:"bottom",disablePortal:true,keepMounted:true,modifiers:[{name:"offset",options:{offset:[0,4]}}],children:jsx(ko,{onClickAway:c=>{l?.contains(c.target)||s();},children:jsxs(oo,{className:n.schemeList,children:[jsx(eo,{onClick:()=>d("RGB"),children:"RGB"}),jsx(eo,{onClick:()=>d("HEX"),children:"HEX"})]})})})]})},to=yo;function B(o,a){return Number.isNaN(o)||o<0?0:o>a?a:o}var Ao=({value:o,onChange:a,disableAlpha:l=false})=>{let t=useMemo(()=>v$1.rgb(o.r,o.g,o.b,o.a).hex().replace("#",""),[o]),[u,i]=useState(t),s=Math.round(o.a*100);useEffect(()=>{let e=v$1.rgb(o.r,o.g,o.b).hex().replace("#","");i(e);},[o.r,o.g,o.b]);let d=e=>{let r=e.target.value.replace(/[^0-9a-fA-F]/g,"").toUpperCase();r.length>6&&(r=r.slice(0,6)),i(r);},c=()=>{let e=u;if(e.length===3&&(e=e.split("").map(r=>r+r).join(""),i(e)),e.length===6)try{let r=v$1(`#${e}`).alpha(o.a);a({r:r.red(),g:r.green(),b:r.blue(),a:r.alpha()});}catch{i(t);}else i(t);},C=e=>{let r=B(parseInt(e.target.value,10),100);a({...o,a:r/100});},f=n.channelInput;return jsxs(go,{direction:"row",spacing:1,alignItems:"flex-start",children:[jsx(b,{className:f,value:u,onChange:d,onBlur:c,placeholder:"FFFFFF",sx:{flex:1.4,"& .MuiOutlinedInput-root":{pl:1}},InputProps:{startAdornment:jsx(no,{position:"start",sx:{m:0},children:jsx(ro,{component:"span",color:e=>alpha(e.palette.text.primary,.5),display:"inline-block",fontSize:12,fontWeight:500,children:"#"})})}}),!l&&jsx(b,{className:f,type:"number",value:s,onChange:C,inputProps:{min:0,max:100},sx:{flex:.8,"& .MuiOutlinedInput-root":{pr:1}},InputProps:{endAdornment:jsx(no,{position:"end",sx:{m:0},children:jsx(ro,{component:"span",color:"text.primary",display:"inline-block",fontSize:12,fontWeight:500,children:"%"})})}})]})},ao=Ao;var _o=({value:o,onChange:a,disableAlpha:l=false})=>{let[t,u]=useState(o),{r:i,g:s,b:d,a:c}=t;useEffect(()=>{u(o);},[o]);let C=useCallback((r,x)=>p=>{u({...t,[r]:B(+p.target.value,x)});},[t]),f=useCallback((r,x)=>{a({...t,[r]:B(t[r],x)});},[a,t]),e=n.channelInput;return jsxs(go,{direction:"row",spacing:1,...l&&{flex:1},children:[jsx(b,{className:e,type:"number",value:i,onBlur:()=>f("r",255),onChange:C("r",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...l&&{sx:{flex:1}}}),jsx(b,{className:e,type:"number",value:s,onBlur:()=>f("g",255),onChange:C("g",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...l&&{sx:{flex:1}}}),jsx(b,{className:e,type:"number",value:d,onBlur:()=>f("b",255),onChange:C("b",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...l&&{sx:{flex:1}}}),!l&&jsx(b,{className:e,type:"number",value:c,onBlur:()=>f("a",100),onChange:C("a",100),inputProps:{min:0,max:100,style:{textAlign:"center"}},variant:"outlined",sx:{"& .MuiOutlinedInput-root":{pr:1}},InputProps:{endAdornment:jsx(no,{position:"end",sx:{m:0},children:jsx(ro,{component:"span",display:"inline-block",fontSize:12,fontWeight:500,children:"%"})})},size:"small"})]})},io=_o;var zo=({initialValue:o="#ffffff",onCancel:a,onConfirm:l,disableAlpha:t=false})=>{let[u,i]=useState("RGB"),[s,d]=useState(()=>{let{alpha:p,...k}=X$1(o).value;return {...k,a:p}}),c=useCallback(()=>{let{alpha:p,...k}=X$1(o).value;d({...k,a:p}),a();},[o,a]),C=useCallback(()=>{let{a:p,...k}=s;l(Y$1({...k,alpha:t?1:p}));},[s,l,t]),f=useCallback(p=>{d(t?{...p,a:1}:p);},[t]),e=useCallback(p=>{d({...p,a:p.a/100});},[]),r=useCallback(p=>{d({...p,a:p.a});},[]),x=t?RgbColorPicker:RgbaColorPicker;return jsxs(Z,{className:n.panel,children:[jsx(x,{color:s,onChange:f}),jsxs(go,{mt:2,spacing:1,direction:"row",className:n.panelFields,children:[jsx(to,{scheme:u,setScheme:i}),u==="RGB"?jsx(io,{value:{...s,a:Math.round(s.a*100)},onChange:e,disableAlpha:t}):jsx(ao,{value:{...s,a:s.a},onChange:r,disableAlpha:t})]}),jsx(v,{sx:{my:"12px"}}),jsxs(j,{className:n.panelFooter,children:[jsx(Q,{className:n.panelCancel,onClick:c,children:I.cancel}),jsx(J,{className:n.panelConfirm,onClick:C,children:I.confirm})]})]})},po=zo;var co=forwardRef(({value:o="#ffffff",onChange:a,onReset:l,sx:t,options:u,disabled:i=false,id:s,className:d},c)=>{let[C,f]=useState(null),{disableAlpha:e,hideReset:r}={...F,...u},x=useRef(null),p=useCallback(y=>{x.current=y,typeof c=="function"?c(y):c&&(c.current=y);},[c]),k=useCallback(()=>{i||f(x.current);},[i]),mo=useCallback(()=>{i||f(null);},[i]),uo=useCallback(y=>{a(e?y.substring(0,7):y),f(null);},[a,e]);return jsx(ko,{onClickAway:()=>f(null),children:jsxs(V,{ref:p,id:s,"data-testid":s??"ColorPicker",direction:"row",justifyContent:"space-between",spacing:1,alignItems:"center",className:Hb(n.root,d),sx:t,children:[jsxs(go,{direction:"row",spacing:1,alignItems:"center",className:n.controls,children:[jsx(H,{borderRadius:"5px",width:32,height:32,sx:{backgroundColor:o},className:n.swatch}),jsxs(H,{className:n.actions,children:[jsx(ro,{className:n.valueLabel,fontWeight:500,fontSize:9,color:"text.primary",textTransform:"uppercase",children:o}),jsx(q,{className:n.editButton,type:"button",onClick:k,disabled:i,children:w})]})]}),r?jsx("div",{}):jsx(X,{className:n.resetButton,type:"button",disabled:i,onClick:l,children:jsx(H,{component:"img",src:Gb,width:10,height:10,alt:""})}),jsx(Po,{anchorEl:C,open:!!C,placement:"top",children:jsx(po,{initialValue:o,onCancel:mo,onConfirm:uo,disableAlpha:e})})]})})});co.displayName="ColorPicker";var qo=memo(co);export{m as a,n as b,F as c,I as d,w as e,qo as f};