@tap-payments/os-micro-frontend-shared 0.3.172 → 0.3.173-test.1
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.
- package/build/_chunks/{chunk-MSX6IV3H.js → chunk-2DGIC6NG.js} +1 -1
- package/build/_chunks/{chunk-JDMBYSHD.js → chunk-2FRODYTK.js} +1 -1
- package/build/_chunks/{chunk-Q2Q2IXLX.js → chunk-2HLBUAAA.js} +1 -1
- package/build/_chunks/{chunk-SETYQSFH.js → chunk-2RQRGSYA.js} +1 -1
- package/build/_chunks/{chunk-V4UV2ODA.js → chunk-3BMEC32B.js} +1 -1
- package/build/_chunks/{chunk-DNSW5PCY.js → chunk-3OA3MOS3.js} +1 -1
- package/build/_chunks/{chunk-VCCUFQCS.js → chunk-3QCEOE6H.js} +1 -1
- package/build/_chunks/{chunk-ECFMPEKG.js → chunk-4FDNCCKY.js} +1 -1
- package/build/_chunks/{chunk-L63OBPT5.js → chunk-6I4SV7SI.js} +1 -1
- package/build/_chunks/{chunk-EQLHDGOW.js → chunk-6UU3RN3Y.js} +1 -1
- package/build/_chunks/{chunk-EUDSF3XM.js → chunk-BQTMM5WN.js} +1 -1
- package/build/_chunks/{chunk-OUCG6J7O.js → chunk-BSXGYGFB.js} +1 -1
- package/build/_chunks/{chunk-Z4IUZWD2.js → chunk-BTLYVVUV.js} +1 -1
- package/build/_chunks/{chunk-PRWB6O3G.js → chunk-ERJ6W263.js} +1 -1
- package/build/_chunks/chunk-GEOGJNCO.js +2 -0
- package/build/_chunks/{chunk-XFDWIT4G.js → chunk-IEVFY2WC.js} +1 -1
- package/build/_chunks/{chunk-FZBD7FI3.js → chunk-IFOPQWIG.js} +1 -1
- package/build/_chunks/{chunk-5K2F4RPD.js → chunk-IQUDUXM2.js} +1 -1
- package/build/_chunks/{chunk-7MQ3VKWW.js → chunk-JQARTVZE.js} +1 -1
- package/build/_chunks/{chunk-WPXFVGVS.js → chunk-K3VPGX5Y.js} +1 -1
- package/build/_chunks/{chunk-OEC6ZA2S.js → chunk-KDIWOP4E.js} +1 -1
- package/build/_chunks/{chunk-2ONEFZQ3.js → chunk-KDXJYLPY.js} +1 -1
- package/build/_chunks/chunk-KWTIOGYK.js +1 -0
- package/build/_chunks/{chunk-5O4ACTMO.js → chunk-LF53Q3HW.js} +1 -1
- package/build/_chunks/{chunk-RKDVYNO5.js → chunk-LPJZD5IN.js} +1 -1
- package/build/_chunks/{chunk-FCYFKZN4.js → chunk-MCLIRRED.js} +1 -1
- package/build/_chunks/chunk-MCX337WI.js +2 -0
- package/build/_chunks/{chunk-UDCZTC7R.js → chunk-NYQZZ67B.js} +1 -1
- package/build/_chunks/{chunk-QA4IZBFF.js → chunk-Q322CKA2.js} +1 -1
- package/build/_chunks/{chunk-HBQPVMO7.js → chunk-Q7LSE3VS.js} +1 -1
- package/build/_chunks/{chunk-CYGOLBLN.js → chunk-QUZFTQK2.js} +1 -1
- package/build/_chunks/{chunk-UGBA2F4Y.js → chunk-R25W3CPM.js} +1 -1
- package/build/_chunks/{chunk-PI37WQUM.js → chunk-RU4U2U3Q.js} +1 -1
- package/build/_chunks/{chunk-O4FZHAHB.js → chunk-TKPHY4WB.js} +1 -1
- package/build/_chunks/{chunk-QBVIXPYJ.js → chunk-UIEX72JY.js} +1 -1
- package/build/_chunks/{chunk-HFGVZWAF.js → chunk-UXQVTNUQ.js} +1 -1
- package/build/_chunks/{chunk-G44IPJYN.js → chunk-VMRBPJIQ.js} +1 -1
- package/build/_chunks/{chunk-3BDQMGND.js → chunk-VPT2PY7N.js} +1 -1
- package/build/_chunks/{chunk-THN4PMLJ.js → chunk-WBXKAK6S.js} +1 -1
- package/build/_chunks/{chunk-D62QZ7FH.js → chunk-WHLBHLAV.js} +1 -1
- package/build/components/ActionMenu/index.js +1 -1
- package/build/components/ActiveFilterChip/index.js +1 -1
- package/build/components/AmountConversionFilter/index.js +1 -1
- package/build/components/AmountInput/index.js +1 -1
- package/build/components/AmountSlider/index.js +1 -1
- package/build/components/AppServices/index.js +1 -1
- package/build/components/AppServicesBar/index.js +1 -1
- package/build/components/BrandLogo/index.js +1 -1
- package/build/components/Button/index.js +1 -1
- package/build/components/ChipStack/index.js +1 -1
- package/build/components/ColorPicker/index.js +1 -1
- package/build/components/ColumnViews/index.js +1 -1
- package/build/components/ConfirmDialog/index.js +1 -1
- package/build/components/CountryFilter/index.js +1 -1
- package/build/components/CurrencyFilter/index.js +1 -1
- package/build/components/Customer/index.js +1 -1
- package/build/components/DateFilter/index.js +1 -1
- package/build/components/DeviceIcon/index.js +1 -1
- package/build/components/Discount/index.js +1 -1
- package/build/components/Dropdown2/index.js +1 -1
- package/build/components/DropdownButton/index.js +1 -1
- package/build/components/DropdownMenu/index.js +1 -1
- package/build/components/ExpandableSideBar/index.js +1 -1
- package/build/components/FileInputPreview/index.js +1 -1
- package/build/components/FileUpload/index.js +1 -1
- package/build/components/FilterDropdown/index.js +1 -1
- package/build/components/Filters/index.js +1 -1
- package/build/components/HeatMap/index.js +1 -1
- package/build/components/IconWithBadge/index.js +1 -1
- package/build/components/InputBase/index.js +1 -1
- package/build/components/Inputs/index.js +1 -1
- package/build/components/LanguageDropdown/index.js +1 -1
- package/build/components/ListColumnFilter/index.js +1 -1
- package/build/components/ListHeader/index.js +1 -1
- package/build/components/MenuItem/index.js +1 -1
- package/build/components/MerchantCurrencyDropdown/index.js +1 -1
- package/build/components/MerchantLogo/index.js +1 -1
- package/build/components/MerchantsDropdown/index.js +1 -1
- package/build/components/MultiSelectDropdownButton/index.js +1 -1
- package/build/components/MultiSelectWithSearch/index.js +1 -1
- package/build/components/NestedDropdown/index.js +1 -1
- package/build/components/PartnersFilter/index.js +1 -1
- package/build/components/PaymentSourceFilter/index.js +1 -1
- package/build/components/PhoneFilter/index.js +1 -1
- package/build/components/ProgressRing/index.js +1 -1
- package/build/components/RFH/index.js +1 -1
- package/build/components/RadioGroup/index.js +1 -1
- package/build/components/RangeCalender/index.js +1 -1
- package/build/components/RatingCount/index.js +1 -1
- package/build/components/ReceiptsViewer/index.js +1 -1
- package/build/components/ReferenceTypeFilter/index.js +1 -1
- package/build/components/SalesChannelFilter/index.js +1 -1
- package/build/components/SearchButton/index.js +1 -1
- package/build/components/SelectWithSearch/index.js +1 -1
- package/build/components/StatusBar/index.js +1 -1
- package/build/components/StatusButton/index.js +1 -1
- package/build/components/StatusFilter/index.js +1 -1
- package/build/components/StatusIcons/index.js +1 -1
- package/build/components/StatusLabel/index.js +1 -1
- package/build/components/TableCells/CustomCells/IDButton/IDButton.d.ts +3 -3
- package/build/components/TableCells/CustomCells/IDButton/icons.d.ts +4 -0
- package/build/components/TableCells/CustomCells/IDButton/style.d.ts +2 -526
- package/build/components/TableCells/index.js +1 -1
- package/build/components/TableReports/index.js +1 -1
- package/build/components/TooltipChip/index.js +1 -1
- package/build/components/TreeDropdown/index.js +1 -1
- package/build/components/VAT/index.js +1 -1
- package/build/components/VerificationIcon/index.js +1 -1
- package/build/components/ViewColumnRadioFilter/index.js +1 -1
- package/build/components/VirtualTables/index.js +1 -1
- package/build/components/WindowSideBar/index.js +1 -1
- package/build/components/index.d.ts +1 -1
- package/build/components/index.js +1 -1
- package/build/components/primitives/CopyButton/type.d.ts +3 -1
- package/build/components/primitives/index.js +1 -1
- package/build/index.js +1 -1
- package/package.json +2 -2
- package/build/_chunks/chunk-6CF4CODV.js +0 -1
- package/build/_chunks/chunk-RGHVZKKB.js +0 -2
- package/build/_chunks/chunk-YEDTAZS4.js +0 -2
- package/build/components/CopyImage/CopyImage.d.ts +0 -10
- package/build/components/CopyImage/index.d.ts +0 -2
- package/build/components/CopyImage/index.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-6G45KTCP.js';import {a as a$2}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-6G45KTCP.js';import {a as a$2}from'./chunk-6UU3RN3Y.js';import {f}from'./chunk-MCX337WI.js';import {a}from'./chunk-GNY2VGGW.js';import {yc}from'./chunk-W6W4YZ7G.js';import {Qc}from'./chunk-3YAJNHQC.js';import {useId,useState,useCallback,useMemo,createElement}from'react';import c from'@mui/material/Box';import ne from'@mui/material/Typography';import O from'@mui/material/Input';import {styled}from'@mui/material/styles';import {CircularProgress}from'@mui/material';import ee from'@mui/material/SvgIcon';import {jsx,jsxs}from'react/jsx-runtime';var xe=styled(a)(({theme:e})=>({fontSize:"10px",color:e.palette.grey[700],fontWeight:600,lineHeight:"10px"})),fe=styled(a)(({theme:e})=>({fontSize:"11px",color:e.palette.text.primary,fontWeight:600,lineHeight:"14.3px",width:200})),Se=styled(c)(()=>({display:"flex",flexDirection:"column",maxHeight:400,overflow:"auto",gap:"8px"})),D=styled(O)(({theme:e})=>({width:"inherit",height:32,padding:"11px 12px",fontSize:"10px",borderRadius:"5px",backgroundColor:"#F9F9F9",border:"1px solid transparent","&.Mui-focused":{borderColor:e.palette.info.dark}})),ge=styled(f)({padding:0,width:12,height:12,".MuiSvgIcon-root, img":{width:12,height:12}}),F=styled(c)(()=>({display:"flex",flexDirection:"column",gap:"8px",padding:"4px"})),Ce=styled(c)(()=>({display:"flex",gap:"8px",padding:"4px",flexWrap:"wrap"})),Ie=styled(c)(({theme:e})=>({display:"flex",padding:"4px 8px 4px 6px",alignItems:"center",gap:"4px",borderRadius:"13px",backgroundColor:`${e.palette.info.dark}1a`,fontSize:"10px",fontWeight:500,cursor:"pointer"})),g=styled(a)(({theme:e,selected:n})=>({display:"flex",gap:"8px",alignItems:"center",fontSize:"10px",fontWeight:500,color:e.palette.common.black,cursor:"pointer",padding:8,justifyContent:"space-between",...n&&{backgroundColor:"#F8F8F8"}}));var te="M4.83332 0C2.16987 0 0 2.16988 0 4.83334C0 7.4968 2.16987 9.66668 4.83332 9.66668C5.98544 9.66668 7.04455 9.2597 7.87628 8.58335L11.1465 11.8535C11.1925 11.9015 11.2477 11.9398 11.3088 11.9662C11.3698 11.9926 11.4356 12.0066 11.5021 12.0072C11.5686 12.0079 11.6346 11.9953 11.6962 11.9702C11.7578 11.945 11.8137 11.9078 11.8607 11.8608C11.9078 11.8138 11.945 11.7578 11.9701 11.6962C11.9953 11.6346 12.0079 11.5686 12.0072 11.5021C12.0065 11.4356 11.9926 11.3699 11.9662 11.3088C11.9398 11.2478 11.9015 11.1926 11.8535 11.1465L8.58331 7.87632C9.25966 7.04458 9.66664 5.98546 9.66664 4.83334C9.66664 2.16988 7.49677 0 4.83332 0ZM4.83332 1C6.95633 1 8.66665 2.71032 8.66665 4.83334C8.66665 5.86755 8.25871 6.80192 7.59699 7.49025C7.5562 7.52023 7.5202 7.55623 7.49022 7.59702C6.80189 8.25875 5.86752 8.66668 4.83332 8.66668C2.71031 8.66668 0.999997 6.95636 0.999997 4.83334C0.999997 2.71032 2.71031 1 4.83332 1Z";function oe({size:e=12,sx:n,className:r,...d}){return jsx(ee,{viewBox:"0 0 12 12",inheritViewBox:true,className:`${r??""} MUISvgIcon__search-icon`,sx:{width:e,height:e,color:"text.primary",...n},...d,children:jsx("path",{d:te,fill:"currentColor"})})}var N=oe;function pe({options:e,onChangeOption:n,selectedOption:r,placeholder:d,label:A,isLoading:R,renderOption:C,iconUrl:h,disabled:u,onClearValue:m,slotProps:V={},hideSelectedCheckmark:$,listWrapperSx:Z={},name:U,...q}){let G=yc(useId(),"select-with-search"),{selectInput:I={},searchInput:J={},dropdownContainer:v={},item:b={}}=V,[w,y]=useState(null),[a,x]=useState(""),K=useCallback(()=>{m!==void 0?m():n(null);},[m,n]),f=!!w,Q=t=>{u||y(f?null:t.currentTarget);},S=()=>{y(null),x("");},X=R?jsx(CircularProgress,{size:16}):jsx(N,{onClick:()=>{a&&x("");},role:"button"}),W=useMemo(()=>a?e.filter(t=>{let p=t?.label?.toLowerCase(),j=t?.value?.toLowerCase();return p?.includes(a.toLowerCase())||j?.includes(a.toLowerCase())}):e,[e,a]),Y=useMemo(()=>jsx(c,{sx:{display:"flex",alignItems:"center",maxWidth:16},children:jsx(c,{component:"img",src:h,alt:"icon",sx:{maxWidth:12,height:12}})}),[h]);return jsx(a$1,{id:G,"data-testid":"SelectWithSearch",disabled:u,open:f,anchorEl:w,onOpen:Q,onClose:S,hasValue:!!r?.value,onClear:K,trigger:jsx(a$2,{className:"SelectWithSearch_input",name:U,placeholder:"Please Select",label:A,sx:{cursor:"pointer"},value:r?.label||"",InputLabelProps:{filled:!!r?.label},disabled:u,...I,InputProps:{readOnly:true,disableUnderline:true,...!!h&&{startAdornment:Y},...I.InputProps}}),listWrapperSx:{height:"100%",overflow:"hidden",...Z},slotProps:{popover:{slotProps:{paper:{sx:{overflow:"hidden"}}}}},...q,children:jsxs(F,{...v,className:`SelectWithSearch_container ${v?.className??""}`,children:[jsx(D,{className:"SelectWithSearch_input",placeholder:d||"Select",endAdornment:X,onClick:t=>{t.stopPropagation();},value:a,onChange:t=>{x(t.target.value);},disableUnderline:true,sx:{cursor:"default",width:"100%",backgroundColor:"white",border:"1px solid #F2F2F2",...e.length&&{marginBottom:"4px"},...a&&{cursor:"pointer"}},...J}),jsxs(c,{className:"SelectWithSearch_options",overflow:"auto",maxHeight:400,children:[W.length===0&&a&&jsx(g,{selected:false,...b,children:jsx(ne,{component:"span",fontSize:"10px",fontWeight:500,color:"#8D8D94",children:"No results found"})}),W.map(t=>C?C(t,{closeDropdown:S,open:f}):createElement(g,{...b,className:`SelectWithSearch_item ${r?.value===t.value?"SelectWithSearch_item-selected":""}`,key:t.value,selected:r?.value===t.value,onClick:p=>{p.stopPropagation(),p.preventDefault(),r?.value===t.value?n(null):n(t),S();}},jsx("span",{children:t.label}),!$&&r?.value===t?.value&&jsx(c,{component:"img",src:Qc,alt:"close",sx:{width:10,height:7.5}})))]})]})})}var H=pe;var Ve=H;export{xe as a,fe as b,Se as c,D as d,ge as e,F as f,Ce as g,Ie as h,g as i,Ve as j};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {kc,yc,ab,Zb,jc,zc,xa}from'./chunk-W6W4YZ7G.js';import {forwardRef,memo,useId,createElement,useState,useCallback,useMemo,Children,useEffect,useRef}from'react';import Qe from'@mui/material/Box';import Za,{circularProgressClasses}from'@mui/material/CircularProgress';import Wa from'@mui/material/ButtonBase';import {styled,alpha,useTheme}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import Ko from'@mui/material/SvgIcon';import _a from'@mui/material/Checkbox';import qa from'@mui/material/FormControlLabel';import ts from'@mui/material/Switch';import ls from'@mui/material/Typography';import gs from'@mui/material/Radio';import Ts from'@mui/material/Tooltip';import As from'@mui/material/Skeleton';import Os from'@mui/material/Avatar';import Ys from'@mui/material/Divider';import tn from'@mui/material/Collapse';import {createPortal}from'react-dom';import xn from'@mui/material/Backdrop';import On,{SliderThumb}from'@mui/material/Slider';import _n from'@mui/material/FormControl';import qn from'@mui/material/InputLabel';import Jn from'@mui/material/Input';import ai from'@mui/material/InputBase';import pi from'@mui/material/Accordion';import di from'@mui/material/AccordionDetails';import ci from'@mui/material/AccordionSummary';import xi from'@mui/material/Popper';import ki from'@mui/material/Dialog';import wi from'@mui/material/DialogActions';import Ii from'@mui/material/DialogContent';import Bi from'@mui/material/DialogTitle';import {LazyLoadImage}from'react-lazy-load-image-component';import rl from'@mui/material/Stack';var z="os-shared-Button",N={root:`${z}-root`,content:`${z}-content`,startIcon:`${z}-startIcon`,endIcon:`${z}-endIcon`,icon:`${z}-icon`,loading:`${z}-loading`,loadingSpinner:`${z}-loadingSpinner`},be={sm:{height:24,paddingY:8,paddingX:16,fontSize:"10px"},md:{height:32,minWidth:79,paddingY:8,paddingX:24,fontSize:"13px",lineHeight:"16px"},lg:{height:40,paddingY:8,paddingX:32,fontSize:"12px"}},Se={sm:{width:24,minWidth:24,height:24,padding:0},md:{width:30,minWidth:30,height:30,padding:0},lg:{width:38,minWidth:38,height:38,padding:0}},ve={sm:12,md:12,lg:14};var ke=styled(Wa,{shouldForwardProp:o=>o!=="$variant"&&o!=="$size"&&o!=="$fullWidth"&&o!=="$isLoading"&&o!=="$hasIcon"&&o!=="$isIconOnly"})(({theme:o,$variant:e="primary",$size:t="md",$fullWidth:r,$isLoading:a,$hasIcon:s,$isIconOnly:i})=>{let n=o.v2.palette,{paddingX:p,paddingY:d,...c}=be[t],m=Se[t];return {display:"inline-flex",alignItems:"center",justifyContent:"center",gap:o.v2.spacing(6),borderRadius:o.v2.radius(4),lineHeight:"100%",whiteSpace:"nowrap",position:"relative",cursor:a?"not-allowed":"pointer",transition:"background-color 0.15s ease, opacity 0.15s ease",...c,padding:`${o.v2.spacing(d)} ${o.v2.spacing(p)}`,fontWeight:o.typography.fontWeightMedium,...r&&!i&&{width:"100%"},...s&&!r&&!i&&{width:"auto",minWidth:0},...e==="primary"&&{background:n.brand[500],color:n.base.white,"&.Mui-disabled":{opacity:1,background:n.interactive.primary.disabled,color:n.base.white}},...e==="secondary"&&{backgroundColor:n.base.white,color:n.grey[900],border:`1px solid ${n.grey[100]}`,"&.Mui-disabled":{opacity:1,color:n.foreground.disabled}},...e==="ghost"&&{padding:0,minWidth:0,backgroundColor:"transparent",color:n.foreground.brand,"&.Mui-disabled":{opacity:.5}},...e==="danger"&&{backgroundColor:n.status.danger.default,color:n.base.white,"&.Mui-disabled":{opacity:1,backgroundColor:alpha(n.status.danger.default,.14),color:n.base.white}},...i&&{boxSizing:"border-box",...m}}}),Q=styled("span")(({theme:o})=>{let e=o.v2.spacing(16);return {display:"inline-flex",justifyContent:"center",alignItems:"center",flexShrink:0,width:e,height:e}});var Ie=forwardRef(({children:o,variant:e="primary",size:t="md",isLoading:r=false,startIcon:a,endIcon:s,icon:i,fullWidth:n=false,disabled:p,className:d,sx:c,...m},u)=>{let f=i!=null;return jsxs(ke,{ref:u,className:kc(N.root,d),$variant:e,$size:t,$fullWidth:n,$isLoading:r,$hasIcon:f||!!a||!!s||r,$isIconOnly:f,disabled:p||r,"data-testid":"Button",sx:c,...m,children:[jsx(Qe,{component:"span",className:N.content,sx:{display:"inline-flex",alignItems:"center",gap:"inherit",visibility:r?"hidden":"visible"},children:f?jsx(Q,{className:N.icon,children:i}):jsxs(Fragment,{children:[a&&jsx(Q,{className:N.startIcon,children:a}),o,s&&jsx(Q,{className:N.endIcon,children:s})]})}),r&&jsx(Q,{className:N.loading,sx:{position:"absolute"},children:jsx(Za,{className:N.loadingSpinner,size:ve[t],color:"inherit"})})]})});Ie.displayName="Button";var Be=memo(Ie);var Ka="os-shared-Icon",po={root:`${Ka}-root`};var Te=styled("img")(({theme:o})=>({width:o.v2.spacing(16),height:o.v2.spacing(16),verticalAlign:"middle",flexShrink:0}));var Pe=forwardRef(({className:o,sx:e,...t},r)=>jsx(Te,{className:kc(po.root,o),sx:e,"data-testid":"Icon",...t,ref:r}));Pe.displayName="Icon";var $e=memo(Pe);var jo="os-shared-Checkbox",D={root:`${jo}-root`,control:`${jo}-control`,label:`${jo}-label`};var Me=({disabled:o,...e})=>{let{v2:t}=useTheme(),{brand:r,base:a,foreground:s}=t.palette;return jsxs(Ko,{viewBox:"0 0 12 12",sx:{width:12,height:12},...e,children:[jsx("rect",{width:"12",height:"12",rx:"2.4",fill:o?s.disabled:r[500]}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.83391 3.74206C9.04243 3.9443 9.05652 4.28711 8.86537 4.50775L5.64586 8.22387C5.55146 8.33284 5.41909 8.39627 5.27942 8.39948C5.13975 8.40269 5.0049 8.3454 4.90612 8.24088L3.15002 6.38282C2.94999 6.17118 2.94999 5.82804 3.15002 5.61641C3.35004 5.40477 3.67435 5.40477 3.87437 5.61641L5.2522 7.07424L8.11024 3.77535C8.30138 3.55472 8.62538 3.53981 8.83391 3.74206Z",fill:a.white})]})},Fe=({disabled:o,...e})=>{let{v2:t}=useTheme(),{base:r,grey:a}=t.palette;return jsx(Ko,{viewBox:"0 0 12 12",sx:{width:12,height:12},...e,children:jsx("rect",{x:"0.6",y:"0.6",width:"10.8",height:"10.8",rx:"1.8",fill:o?a[50]:r.white,stroke:o?a[200]:a[500],strokeWidth:"1.2"})})},Le=({disabled:o,...e})=>{let{v2:t}=useTheme(),{brand:r,base:a,foreground:s}=t.palette;return jsxs(Ko,{viewBox:"0 0 12 12",sx:{width:12,height:12},...e,children:[jsx("rect",{width:"12",height:"12",rx:"2.4",fill:o?s.disabled:r[500]}),jsx("rect",{x:"3",y:"5.4",width:"6",height:"1.2",rx:"0.5",fill:a.white})]})};var Ae=styled(_a)(({theme:o})=>({padding:o.v2.spacing(2),"&:hover":{backgroundColor:"transparent"}})),Re=styled(qa)(({theme:o})=>{let{base:e,grey:t}=o.v2.palette;return {marginLeft:0,gap:o.v2.spacing(4),"& .MuiFormControlLabel-label":{fontSize:"11px",color:e.black},"& .MuiFormControlLabel-label.Mui-disabled":{color:t[500]}}});var We=forwardRef(({label:o,labelPlacement:e="end",disabled:t,sx:r,className:a,...s},i)=>{let n=yc(useId(),"checkbox"),p=jsx(Ae,{id:n,ref:i,disableRipple:true,disabled:t,checkedIcon:jsx(Me,{disabled:t}),icon:jsx(Fe,{disabled:t}),indeterminateIcon:jsx(Le,{disabled:t}),"data-testid":"Checkbox",className:kc(o?D.control:D.root,o?void 0:a),sx:o?void 0:r,...s});return o?jsx(Re,{className:kc(D.root,a),sx:r,control:p,label:o,labelPlacement:e,disabled:t,componentsProps:{typography:{className:D.label}}}):p});We.displayName="Checkbox";var Ee=memo(We);var es="os-shared-Switch",co={root:`${es}-root`};var He=styled(ts)(({theme:o,disabled:e})=>{let{base:t,grey:r,success:a}=o.v2.palette;return {width:28,height:16,padding:0,borderRadius:o.v2.radius(8),opacity:e?.5:1,overflow:"visible","& .MuiSwitch-switchBase":{padding:0,margin:o.v2.spacing(1),color:t.white,transitionDuration:"300ms","&:hover":{backgroundColor:"transparent"},"&.Mui-focusVisible":{outline:`2px solid ${r[400]}`,outlineOffset:2},"&.Mui-checked":{transform:"translateX(12px)",color:t.white,"& + .MuiSwitch-track":{backgroundColor:a[500],opacity:1,border:0}},"&.Mui-disabled":{color:t.white,"& + .MuiSwitch-track":{opacity:1},"& .MuiSwitch-thumb":{filter:"none"}},"&.Mui-checked.Mui-disabled":{color:t.white}},"& .MuiSwitch-thumb":{boxSizing:"border-box",width:14,height:14,color:t.white,backgroundColor:t.white,boxShadow:"none",filter:e?"none":"drop-shadow(0px 3px 0.5px rgba(0, 0, 0, 0.04)) drop-shadow(0px 3px 4px rgba(0, 0, 0, 0.12))"},"& .MuiSwitch-track":{borderRadius:o.v2.radius(8),backgroundColor:"#D9D9D9",opacity:1,transition:o.transitions.create(["background-color"],{duration:300})}}});var Ve=forwardRef(({className:o,sx:e,...t},r)=>jsx(He,{ref:r,className:kc(co.root,o),sx:e,"data-testid":"Switch",disableRipple:true,...t}));Ve.displayName="Switch";var Oe=memo(Ve);var is="os-shared-Typography",mo={root:`${is}-root`};var Ze=styled(ls)(({theme:o})=>{let{base:e}=o.v2.palette;return {color:e.black}});var je=forwardRef(({variant:o="body1",weight:e,isTruncated:t=false,isUppercase:r=false,className:a,sx:s,...i},n)=>{let p=useTheme(),d={regular:p.typography.fontWeightRegular,medium:p.typography.fontWeightMedium,semibold:p.typography.fontWeightBold,bold:p.typography.fontWeightBolder??700},c=e!==void 0?typeof e=="number"?e:d[e]:void 0,m=Array.isArray(s)?s:[s];return jsx(Ze,{ref:n,className:kc(mo.root,a),variant:o,sx:[c!==void 0&&{fontWeight:c},t&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},r&&{textTransform:"uppercase"},...m],"data-testid":"Typography",...i})});je.displayName="Typography";var Ke=memo(je);var us="os-shared-RadioButton";var fo={root:`${us}-root`};var Ge=({disabled:o,...e})=>{let{v2:t}=useTheme(),{brand:r,base:a}=t.palette,s=o?"#BDC1CC":r[500];return jsxs(Ko,{viewBox:"0 0 12 12",sx:{width:12,height:12,fill:"none"},...e,children:[jsx("rect",{x:"1.2",y:"1.2",width:"9.6",height:"9.6",rx:"4.8",fill:s,stroke:s,strokeWidth:"1.2",style:{fill:s,stroke:s}}),jsx("circle",{cx:"6",cy:"6",r:"2.25",fill:a.white,style:{fill:a.white}})]})},Ye=({disabled:o,...e})=>{let{v2:t}=useTheme(),{base:r,grey:a}=t.palette,s=o?a[50]:r.white,i=o?a[200]:a[500];return jsx(Ko,{viewBox:"0 0 12 12",sx:{width:12,height:12,fill:"none"},...e,children:jsx("rect",{x:"1.2",y:"1.2",width:"9.6",height:"9.6",rx:"4.8",fill:s,stroke:i,strokeWidth:"1.2",style:{fill:s,stroke:i}})})};var _e=styled(gs)(({theme:o})=>({padding:o.v2.spacing(2),"&:hover":{backgroundColor:"transparent"},"& .MuiSvgIcon-root":{fontSize:12,width:12,height:12}}));var qe=forwardRef(({disabled:o,sx:e,className:t,...r},a)=>jsx(_e,{ref:a,disableRipple:true,disabled:o,checkedIcon:jsx(Ge,{disabled:o}),icon:jsx(Ye,{disabled:o}),"data-testid":"RadioButton",className:kc(fo.root,t),sx:e,...r}));qe.displayName="RadioButton";var Je=memo(qe);var yo="os-shared-CircularProgress",A={root:`${yo}-root`,progress:`${yo}-progress`,labelOverlay:`${yo}-labelOverlay`,labelText:`${yo}-labelText`};var ot=styled(Za)(({theme:o})=>{let{brand:e}=o.v2.palette;return {color:"#147DC5",background:alpha(e[500],.05),borderRadius:"50%",[`& .${circularProgressClasses.circle}`]:{strokeLinecap:"round"}}}),et=styled(Qe)(()=>({position:"relative",display:"inline-flex"})),tt=styled(Qe)(()=>({top:0,left:0,bottom:0,right:0,position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"})),rt=styled(ls)(({theme:o})=>({fontSize:o.typography.fontSize,fontWeight:o.typography.fontWeightBolder??700,color:"#3B4152"}));var at=forwardRef(({variant:o="indeterminate",hasLabel:e=true,value:t,className:r,sx:a,...s},i)=>{let n=o==="determinate"&&e;return jsxs(et,{className:kc(A.root,r),sx:a,"data-testid":"CircularProgress",children:[jsx(ot,{ref:i,variant:o,value:t,className:A.progress,...s}),n&&jsx(tt,{className:A.labelOverlay,children:jsx(rt,{className:A.labelText,variant:"caption",color:"text.secondary",children:`${Math.round(t??0)}%`})})]})});at.displayName="CircularProgress";var st=memo(at);var R="os-shared-Tooltip",h={popper:`${R}-popper`,tooltip:`${R}-tooltip`,arrow:`${R}-arrow`,content:`${R}-content`,title:`${R}-title`,supportingText:`${R}-supportingText`,wrapper:`${R}-wrapper`};var nt=styled(({className:o,...e})=>createElement(Ts,{...e,classes:{popper:kc(h.popper,o),tooltip:h.tooltip,arrow:h.arrow}}))(({theme:o})=>{let{base:e,grey:t}=o.v2.palette,r=e.white,a="var(--tooltip-border-width) solid var(--tooltip-border-color)";return {"--tooltip-border-color":"#3C373721","--tooltip-border-width":"1px",zIndex:999999,[`& .${h.arrow}`]:{color:r,"&:before":{backgroundColor:r,boxSizing:"border-box",border:a}},[`& .${h.tooltip}`]:{backgroundColor:r,color:t[700],boxShadow:o.v2.elevation[200],fontSize:12,fontWeight:400,lineHeight:1.2,padding:o.v2.spacing(6),borderRadius:o.v2.radius(8),border:a,maxWidth:320,wordBreak:"break-word"}}}),it=styled("div")(({theme:o})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",gap:o.v2.spacing(6),maxWidth:296,width:"100%"})),lt=styled("div",{shouldForwardProp:o=>o!=="$hasSupportingText"})(({theme:o,$hasSupportingText:e})=>{let{grey:t}=o.v2.palette;return {margin:0,fontSize:12,fontWeight:e?600:400,lineHeight:e?1:1.2,color:e?t[700]:alpha(t[700],.77),width:e?"100%":void 0}}),pt=styled("div")(({theme:o})=>{let{grey:e}=o.v2.palette;return {margin:0,fontSize:11,fontWeight:400,lineHeight:"normal",color:e[500],width:"100%",whiteSpace:"pre-wrap"}});function Fs(o){return o!=null&&o!==false&&o!==""}function Ls(o,e){let t=Fs(e),r=jsx(lt,{className:h.title,$hasSupportingText:t,children:o});return t?jsxs(it,{className:h.content,children:[r,jsx(pt,{className:h.supportingText,children:e})]}):r}function dt({className:o,title:e,supportingText:t,placement:r="top",children:a,wrapperProps:s,sx:i,...n}){let{className:p,...d}=s??{};return jsx(nt,{className:o,title:Ls(e,t),placement:r,arrow:true,sx:i,...n,children:jsx(Qe,{display:"flex",alignItems:"center","data-testid":"Tooltip",className:kc(h.wrapper,p),...d,children:a})})}dt.displayName="Tooltip";var ct=memo(dt);var Ds="os-shared-Skeleton",ho={root:`${Ds}-root`};var mt=styled(As)(()=>({}));var ft=forwardRef(({className:o,sx:e,variant:t="rounded",height:r=16,...a},s)=>jsx(mt,{ref:s,className:kc(ho.root,o),sx:e,"data-testid":"Skeleton",variant:t,height:r,...a}));ft.displayName="Skeleton";var ut=memo(ft);var Vs="os-shared-Avatar",bo={root:`${Vs}-root`},So="xs",vo="teal",yt={teal:{from:"#31D5C8",to:"#1186C5"},green:{from:"#A2E9BD",to:"#44BB74"},cyan:{from:"#6BF6EB",to:"#32D6C9"},steel:{from:"#61AFC9",to:"#7FBFD4"},sage:{from:"#9DB7A4",to:"#7FBFD4"},gold:{from:"#D7B38C",to:"#FFE09F"},lime:{from:"#ADD6A2",to:"#FFDDB2"}},gt={xs:{dimension:24,fontSize:"9px"},sm:{dimension:32,fontSize:"12px"},md:{dimension:40,fontSize:"15px"},lg:{dimension:48,fontSize:"17px"},xl:{dimension:56,fontSize:"20px"}};function js(o){let{from:e,to:t}=yt[o];return `linear-gradient(90deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.1) 100%), linear-gradient(135deg, ${e} 0%, ${t} 100%)`}var xt=styled(Os,{shouldForwardProp:o=>!["$size","$color"].includes(o)})(({theme:o,$size:e=So,$color:t=vo})=>{let{dimension:r,fontSize:a}=gt[e],{base:s}=o.v2.palette,i=js(t);return {width:r,height:r,flexShrink:0,fontSize:a,fontWeight:o.typography.fontWeightMedium,lineHeight:"normal",color:s.white,background:i,backgroundColor:"transparent","&.MuiAvatar-colorDefault":{color:s.white,background:i,backgroundColor:"transparent"}}});var Ct=forwardRef(({className:o,sx:e,size:t=So,color:r=vo,...a},s)=>jsx(xt,{ref:s,className:kc(bo.root,o),sx:e,"data-testid":"Avatar",...a,$size:t,$color:r,variant:"circular"}));Ct.displayName="Avatar";var ht=memo(Ct);var Gs="os-shared-Divider",No={root:`${Gs}-root`};function qs(o,e){let{grey:t,border:r}=e.v2.palette;return o==="subtle"?r.subtle:t[100]}var bt=styled(Ys,{shouldForwardProp:o=>o!=="$type"})(({theme:o,$type:e="default",orientation:t="horizontal"})=>({borderColor:qs(e,o),...t==="vertical"?{borderBottomWidth:0,borderRightWidth:1}:{borderBottomWidth:1}}));var St=forwardRef(({className:o,sx:e,orientation:t="horizontal",type:r="default",...a},s)=>jsx(bt,{ref:s,className:kc(No.root,o),sx:e,"data-testid":"Divider",orientation:t,$type:r,...a}));St.displayName="Divider";var vt=memo(St);var en="os-shared-Collapse",ko={root:`${en}-root`};var Nt=styled(tn)(()=>({}));var kt=forwardRef(({className:o,sx:e,children:t,unmountOnExit:r=true,timeout:a=300,...s},i)=>jsx(Nt,{ref:i,className:kc(ko.root,o),sx:e,"data-testid":"Collapse",unmountOnExit:r,timeout:a,...s,children:t}));kt.displayName="Collapse";var wt=memo(kt);var ln="os-shared-Badge",wo={root:`${ln}-root`},Io="default",It={default:"#29b6f6",primary:"#1976d2",secondary:"#f50057",neutral:"#656565",gray:"#CFCFCF",orange:"#FFD503"};function cn(o,e){let{base:t,grey:r,brand:a,success:s,warning:i,error:n,gradient:p}=e.v2.palette;if(o==="highlight")return p.brand;let d=It[o];return d||({inactive:r[100],active:alpha(t.black,.1),dark:a[500],red:n[500],success:s[500],warning:i[500],error:n[500]}[o]??t.white)}function mn(o,e){let{base:t}=e.v2.palette;return o==="inactive"?t.black:(t.white)}var Tt=styled("span",{shouldForwardProp:o=>!["$color","$compact","$round","$pointer"].includes(o)})(({theme:o,$color:e=Io,$compact:t,$round:r,$pointer:a})=>{let s=cn(e,o);return {paddingBlock:o.v2.spacing(2),paddingInline:t?"0.16056rem":r?"0.275rem":o.v2.spacing(4),borderRadius:t?o.v2.radius(4):r?o.v2.radius(16):o.v2.radius(48),background:s,color:mn(e,o),fontSize:"8px",fontWeight:700,lineHeight:"10px",letterSpacing:0,overflow:"hidden",height:t?"12px":r?"16px":void 0,display:"inline-flex",alignItems:"center",justifyContent:"center",whiteSpace:"nowrap",cursor:a?"pointer":"auto"}});var Pt=forwardRef(({className:o,sx:e,color:t,state:r,compact:a,round:s,pointer:i,children:n,...p},d)=>{let c=t??r??Io;return jsx(Tt,{ref:d,className:kc(wo.root,o),sx:e,"data-testid":"Badge",...p,$color:c,$compact:a,$round:s,$pointer:i,children:n})});Pt.displayName="Badge";var $t=memo(Pt);var gn="os-shared-Backdrop",Bo={root:`${gn}-root`};var Mt=styled(xn,{shouldForwardProp:o=>o!=="$hasBlur"})(({theme:o,$hasBlur:e=false})=>{let t=e?o.v2.blur[6]:"none";return {zIndex:1,backgroundColor:alpha("#000",.3),backdropFilter:t,WebkitBackdropFilter:t}});var Ft=forwardRef(({className:o,sx:e,open:t=true,hasBlur:r=false,onClose:a,onClick:s,...i},n)=>{if(!t)return null;let p=d=>{a?.(),s?.(d);};return createPortal(jsx(Mt,{open:t,$hasBlur:r,ref:n,className:kc(Bo.root,o),sx:e,"data-testid":"Backdrop",onClick:p,...i}),document.body)});Ft.displayName="Backdrop";var Lt=memo(Ft);var To="os-shared-CopyButton",B={root:`${To}-root`,icon:`${To}-icon`,copyIcon:`${To}-copyIcon`,copiedIcon:`${To}-copiedIcon`};var At=o=>{let{v2:e}=useTheme(),{base:t}=e.palette;return jsx(Ko,{sx:{height:12.6,width:13},...o,children:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"11",height:"13",viewBox:"2.67 1.67 10.66 12.66",fill:"none",children:jsx("path",{d:"M11.3333 13.6978L11.3332 13.6979C11.1002 14.0479 10.7072 14.2582 10.2863 14.2582H5.83317C4.12559 14.2582 2.7415 12.8741 2.7415 11.1665V4.71338C2.7415 4.29279 2.95172 3.89983 3.30186 3.66641L3.5915 3.47331V11.1665C3.5915 12.4046 4.59508 13.4082 5.83317 13.4082H11.5264L11.3333 13.6978ZM4.40817 3.49984C4.40817 2.53467 5.20133 1.7415 6.1665 1.7415H11.4998C12.465 1.7415 13.2582 2.53467 13.2582 3.49984V10.8332C13.2582 11.7983 12.465 12.5915 11.4998 12.5915H6.1665C5.20133 12.5915 4.40817 11.7983 4.40817 10.8332V3.49984ZM11.4998 2.5915H6.1665C5.65901 2.5915 5.25817 2.99234 5.25817 3.49984V10.8332C5.25817 11.3407 5.65901 11.7415 6.1665 11.7415H11.4998C12.0073 11.7415 12.4082 11.3407 12.4082 10.8332V3.49984C12.4082 2.99234 12.0073 2.5915 11.4998 2.5915Z",fill:t.black,stroke:t.white,strokeWidth:"0.15"})})})},Rt=o=>{let{v2:e}=useTheme(),{success:t,base:r}=e.palette;return jsx(Ko,{sx:{height:12.6,width:13},...o,children:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"2 2 12.33 12.33",fill:"none",children:[jsx("path",{d:"M8.16646 2.00146C11.5718 2.00146 14.3315 4.76114 14.3315 8.16646C14.3315 11.5718 11.5718 14.3315 8.16646 14.3315C4.76114 14.3315 2.00146 11.5718 2.00146 8.16646C2.00146 4.76114 4.76114 2.00146 8.16646 2.00146Z",fill:t[500]}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.984 5.89153C11.2107 6.10097 11.2247 6.45454 11.0152 6.68124L7.57351 10.4067C7.46772 10.5212 7.31891 10.5863 7.16302 10.5863C7.00713 10.5863 6.85832 10.5212 6.75253 10.4067L5.03167 8.54397C4.82222 8.31726 4.83622 7.9637 5.06293 7.75425C5.28963 7.54481 5.6432 7.55881 5.85264 7.78552L7.16302 9.20392L10.1943 5.92279C10.4037 5.69608 10.7573 5.68209 10.984 5.89153Z",fill:r.white})]})})};var Et=styled("span")({position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:16,height:16,flexShrink:0,cursor:"pointer",verticalAlign:"middle"}),Yo=styled("span",{shouldForwardProp:o=>o!=="$visible"})(({$visible:o})=>({position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",opacity:o?1:0,transition:"opacity 200ms ease"}));var Ht=forwardRef(({className:o,sx:e,text:t,feedbackMs:r=2e3,icon:a=jsx(At,{}),onClick:s,...i},n)=>{let[p,d]=useState(false),c=m=>{m.stopPropagation(),ab(t),d(true),setTimeout(()=>d(false),r),s?.(m);};return jsxs(Et,{ref:n,className:kc(B.root,o),sx:e,role:"button",tabIndex:0,"data-testid":"CopyButton",onClick:c,...i,children:[jsx(Yo,{className:kc(B.icon,B.copyIcon),$visible:!p,children:a}),jsx(Yo,{className:kc(B.icon,B.copiedIcon),$visible:p,children:jsx(Rt,{})})]})});Ht.displayName="CopyButton";var Vt=memo(Ht);var _o="os-shared-ProgressBar",U={root:`${_o}-root`,fill:`${_o}-fill`,text:`${_o}-text`};var Zt=styled(Qe,{shouldForwardProp:o=>!["$value","$isDecimal"].includes(o)})(({theme:o,$value:e,$isDecimal:t})=>{let{base:r}=o.v2.palette;return {width:`${e}%`,minWidth:e>=10?"28px":"24px",height:"18px",borderRadius:o.v2.radius(50),background:"linear-gradient(256deg, #147DC5 0%, #3DA6E1 100%)",display:"flex",alignItems:"center",justifyContent:e>10?"flex-end":"center",paddingInlineEnd:e>10?o.v2.spacing(2):o.v2.spacing(0),...e===0&&{background:alpha(r.black,26/255)},...t&&{minWidth:e>=10?"40px":"36px"}}}),jt=styled(Qe,{shouldForwardProp:o=>o!=="$value"})(({theme:o,$value:e})=>{let{base:t}=o.v2.palette;return {height:"14px",maxWidth:"36px",minWidth:"20px",background:alpha(t.black,26/255),borderRadius:o.v2.radius(50),display:"flex",alignItems:"center",justifyContent:"center",padding:0,...e===0&&{background:alpha(t.black,0)}}}),Kt=styled(ls,{shouldForwardProp:o=>o!=="$value"})(({theme:o,$value:e})=>{let{base:t,grey:r}=o.v2.palette;return {fontSize:"8px",fontWeight:o.typography.fontWeightBolder??700,color:t.white,padding:`${o.v2.spacing(2)} ${o.v2.spacing(4)}`,...e===0&&{color:alpha(r[500],.5)}}});var Xt=forwardRef(({className:o,sx:e,value:t},r)=>{let a=!Number.isInteger(t);return jsx(Zt,{ref:r,className:kc(U.root,o),sx:e,"data-testid":"ProgressBar",$value:t,$isDecimal:a,children:jsx(jt,{className:U.fill,$value:t,children:jsxs(Kt,{className:U.text,$value:t,variant:"caption",children:[Number(t.toFixed(2)),"%"]})})})});Xt.displayName="ProgressBar";var Gt=memo(Xt);var Mo="os-shared-Chip",k={root:`${Mo}-root`,text:`${Mo}-text`,copyButton:`${Mo}-copyButton`,icon:`${Mo}-icon`},Yt={text:{height:24,paddingBlock:4,paddingInline:8,borderRadius:48},circular:{height:24,width:24,padding:4,borderRadius:12},"pill-icon":{height:24,width:36,paddingBlock:4,paddingInline:6,borderRadius:12}};var Jt=o=>{let{v2:e}=useTheme(),{base:t}=e.palette;return jsx(Ko,{sx:{height:"10px"},...o,children:jsx("svg",{width:"11",height:"13",viewBox:"0 0 11 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{d:"M0.924805 9.5C0.924805 10.7381 1.9289 11.7412 3.16699 11.7412H8.86035L8.66699 12.0312C8.43398 12.3812 8.04094 12.5917 7.62012 12.5918H3.16699C1.45941 12.5918 0.0751953 11.2076 0.0751953 9.5V3.04688C0.0751953 2.62628 0.28561 2.23342 0.635742 2L0.924805 1.80664V9.5ZM3.5 0.0751953H8.83301C9.79807 0.0751953 10.5916 0.867985 10.5918 1.83301V9.16699C10.5916 10.132 9.79807 10.9248 8.83301 10.9248H3.5C2.53494 10.9248 1.74139 10.132 1.74121 9.16699V1.83301C1.74139 0.867985 2.53494 0.0751953 3.5 0.0751953ZM3.5 0.924805C2.99261 0.924805 2.59197 1.32567 2.5918 1.83301V9.16699C2.59197 9.67433 2.99261 10.0752 3.5 10.0752H8.83301C9.3404 10.0752 9.74104 9.67433 9.74121 9.16699V1.83301C9.74104 1.32567 9.3404 0.924805 8.83301 0.924805H3.5Z",fill:t.black,stroke:t.white,strokeWidth:"0.15"})})})},Qt=o=>{let{v2:e}=useTheme(),{success:t,base:r}=e.palette;return jsx(Ko,{sx:{height:"10px"},...o,children:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"2 2 12.33 12.33",fill:"none",children:[jsx("path",{d:"M8.16646 2.00146C11.5718 2.00146 14.3315 4.76114 14.3315 8.16646C14.3315 11.5718 11.5718 14.3315 8.16646 14.3315C4.76114 14.3315 2.00146 11.5718 2.00146 8.16646C2.00146 4.76114 4.76114 2.00146 8.16646 2.00146Z",fill:t[500]}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.984 5.89153C11.2107 6.10097 11.2247 6.45454 11.0152 6.68124L7.57351 10.4067C7.46772 10.5212 7.31891 10.5863 7.16302 10.5863C7.00713 10.5863 6.85832 10.5212 6.75253 10.4067L5.03167 8.54397C4.82222 8.31726 4.83622 7.9637 5.06293 7.75425C5.28963 7.54481 5.6432 7.55881 5.85264 7.78552L7.16302 9.20392L10.1943 5.92279C10.4037 5.69608 10.7573 5.68209 10.984 5.89153Z",fill:r.white})]})})};function zn(o,e){let t=Yt[o];return {height:t.height,..."width"in t&&{width:t.width,minWidth:t.width},..."padding"in t&&{padding:e.v2.spacing(t.padding)},..."paddingBlock"in t&&{paddingBlock:e.v2.spacing(t.paddingBlock)},..."paddingInline"in t&&{paddingInline:e.v2.spacing(t.paddingInline)},borderRadius:e.v2.radius(t.borderRadius)}}var er=styled(Qe,{shouldForwardProp:o=>!["$variant","$hasIcon","$hasCopy","$isSelected","$disableAnimation"].includes(o)})(({theme:o,$variant:e="text",$hasIcon:t,$hasCopy:r,$isSelected:a,$disableAnimation:s})=>{let{grey:i,base:n}=o.v2.palette;return {display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,boxSizing:"border-box",lineHeight:1,letterSpacing:0,whiteSpace:"nowrap",fontSize:11,fontWeight:o.typography.fontWeightRegular,color:n.black,border:`1px solid ${i[100]}`,backgroundColor:n.white,...zn(e,o),...e==="text"&&t&&{gap:o.v2.spacing(6),paddingInlineStart:o.v2.spacing(5),paddingInlineEnd:o.v2.spacing(8)},...r&&{gap:o.v2.spacing(4)},[`& .${k.icon}`]:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:14,height:14,overflow:"hidden","& img, & svg":{width:14,height:14,display:"block"}},...a&&{boxShadow:`${n.white} 7px 0px 8px 2px`},...s&&{transition:"none !important",animation:"none !important",transform:"none !important","& *":{transition:"none !important",animation:"none !important",transform:"none !important"}}}}),Jo=styled(Qe)({textAlign:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0,flex:"0 1 auto"}),tr=styled("span",{shouldForwardProp:o=>o!=="$copied"})(({$copied:o})=>({position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:12,height:12,flexShrink:0,cursor:"pointer",opacity:o?1:.6,transition:"opacity 150ms ease","&:hover":{opacity:1}})),Qo=styled("span",{shouldForwardProp:o=>o!=="$visible"})(({$visible:o})=>({position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",opacity:o?1:0,transition:"opacity 150ms ease"}));var ar=forwardRef(({className:o,sx:e,children:t,icon:r,variant:a="text",disabled:s=false,isSelected:i=false,copyText:n,unknownText:p="Unknown",disableAnimation:d=false,...c},m)=>{let[u,f]=useState(false),y=!!(t&&n),x=r!=null&&!y,g=useCallback(v=>{v.stopPropagation(),n&&(ab(n),f(true),setTimeout(()=>f(false),2e3));},[n]),S=useMemo(()=>x?jsx("span",{className:k.icon,children:r}):null,[x,r]),L=useMemo(()=>{if(t){let v=y&&typeof t=="string"?Zb(t):void 0;return jsx(Jo,{className:k.text,"data-is-arabic":v,children:t})}return x?null:jsx(Jo,{className:k.text,children:p})},[t,y,x,p]),C=useMemo(()=>y?jsxs(tr,{className:k.copyButton,role:"button",tabIndex:0,"aria-label":u?"copied":"copy","data-testid":"ChipCopyButton",$copied:u,onClick:g,children:[jsx(Qo,{$visible:!u,children:jsx(Jt,{})}),jsx(Qo,{$visible:u,children:jsx(Qt,{})})]}):null,[y,u,g]);return jsxs(er,{ref:m,"data-testid":"Chip",className:kc(k.root,o,`CustomVariant_${a}`),sx:jc(s?{cursor:"not-allowed",opacity:.5}:{},e),$variant:a,$hasIcon:x,$hasCopy:y,$isSelected:i,$disableAnimation:d,...c,children:[S,L,C]})});ar.displayName="Chip";var sr=memo(ar);var ee="os-shared-Slider",T={root:`${ee}-root`,thumb:`${ee}-thumb`,thumbIcon:`${ee}-thumbIcon`};var nr=o=>{let{v2:e}=useTheme(),{grey:t}=e.palette;return jsx(Ko,{sx:{width:"5px",height:"8px",pointerEvents:"none"},...o,children:jsxs("svg",{width:"5",height:"8",viewBox:"0 0 5 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("path",{d:"M0.459961 0.460449L0.459961 6.59897",stroke:t[500],strokeWidth:"0.920779",strokeLinecap:"round"}),jsx("path",{d:"M2.44531 0.460388L2.44531 6.59891",stroke:t[500],strokeWidth:"0.920779",strokeLinecap:"round"}),jsx("path",{d:"M4.4375 0.460388L4.4375 6.59891",stroke:t[500],strokeWidth:"0.920779",strokeLinecap:"round"})]})})};var ir=styled(On)(({theme:o})=>{let{brand:e,base:t}=o.v2.palette,r=["0px 0px 1.25px 0px rgba(0, 0, 0, 0.1)","0px 1.25px 1.25px 0px rgba(0, 0, 0, 0.09)","0px 3.75px 2.5px 0px rgba(0, 0, 0, 0.05)","0px 7.5px 2.5px 0px rgba(0, 0, 0, 0.01)","0px 11.25px 3.75px 0px rgba(0, 0, 0, 0)"].join(", ");return {color:e[500],height:8,padding:0,"& .MuiSlider-rail":{backgroundColor:"#CFCFCF",opacity:1,left:0},"& .MuiSlider-thumb":{height:20,width:20,backgroundColor:t.white,border:"none",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:r,"&:focus, &:hover, &.Mui-active, &.Mui-focusVisible":{boxShadow:r}},[`& .${T.thumbIcon}`]:{width:"5px",height:"8px",pointerEvents:"none"}}});function Gn({children:o,className:e,...t}){return jsxs(SliderThumb,{className:kc(T.thumb,e),...t,children:[o,jsx(nr,{className:T.thumbIcon})]})}var lr=forwardRef(({className:o,sx:e,value:t,min:r,max:a,step:s,disabled:i,onChange:n,slots:p,...d},c)=>{let m=useCallback((u,f)=>{n(f);},[n]);return jsx(ir,{ref:c,className:kc(T.root,o),sx:e,"data-testid":"Slider",value:t,min:r,max:a,step:s,disabled:i,onChange:m,...d,slots:{thumb:Gn,...p}})});lr.displayName="Slider";var pr=memo(lr);var te="os-shared-Input",G={root:`${te}-root`,label:`${te}-label`,input:`${te}-input`},cr={sm:28,md:32,labelled:40};var mr=(o,e)=>cr[o?"labelled":e],fr=styled(Jn,{shouldForwardProp:o=>!["$hasLabel","$hideArrows","$size"].includes(o)})(({theme:o,$hasLabel:e=false,$hideArrows:t=false,$size:r="md"})=>{let{base:a,grey:s}=o.v2.palette;return {height:mr(e,r),padding:e?o.v2.spacing(8):`0 ${o.v2.spacing(8)}`,border:"none",borderRadius:"inherit",fontSize:"11px",fontWeight:o.typography.fontWeightMedium,color:a.black,backgroundColor:"transparent",display:"flex",alignItems:e?"stretch":"center","&.Mui-disabled":{color:s[500]},"& input":{paddingTop:o.v2.spacing(4),paddingBottom:o.v2.spacing(4)},"& input::placeholder":{color:s[500],fontWeight:o.typography.fontWeightRegular,opacity:e?0:1,...e&&{transition:"opacity 0.2s ease"}},"& input:-webkit-autofill, & input:-webkit-autofill:hover, & input:-webkit-autofill:focus":{WebkitTextFillColor:a.black,caretColor:a.black,transition:"background-color 5000s ease-in-out 0s"},"&::before, &::after":{display:"none"},...e&&{marginTop:0,"& input":{margin:"0px !important",padding:"0px !important",paddingTop:`${o.v2.spacing(10)} !important`,lineHeight:"130%"},"& input:focus::placeholder":{opacity:"1 !important"}},...t&&{"& input[type=number]":{MozAppearance:"textfield"},"& input[type=number]::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:0},"& input[type=number]::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0}}}}),ur=styled(qn)(({theme:o})=>{let{grey:e}=o.v2.palette;return {fontSize:"11px",color:`${e[500]} !important`}}),yr=styled(_n,{shouldForwardProp:o=>!["$hasLabel","$size"].includes(o)})(({theme:o,disabled:e,error:t,fullWidth:r,$hasLabel:a=false,$size:s="md"})=>{let{grey:i,base:n,error:p}=o.v2.palette;return {position:"relative",display:"flex",flexDirection:"column",width:r?"100%":"auto",height:mr(a,s),margin:0,border:`1px solid ${t?"#FF3D00":i[100]}`,borderRadius:o.v2.radius(4),backgroundColor:e?i[100]:n.white,transition:"border-color 0.15s ease","&:focus-within":{borderColor:t?"#FF3D00":i[50]},"& .MuiFormLabel-asterisk":{color:p[500]},"& .MuiInputLabel-root":{position:"absolute",left:0,top:0,zIndex:1,pointerEvents:"none",padding:o.v2.spacing(8),fontSize:"10px",fontWeight:o.typography.fontWeightMedium,lineHeight:"100%",transform:"translate(0, 6px) scale(1) !important",transformOrigin:"top left"},"& .MuiInputLabel-root.MuiInputLabel-shrink, & .MuiInputLabel-root.MuiFormLabel-filled, & .MuiInputLabel-root.Mui-focused":{transform:"translate(0, -1.5px) scale(0.75) !important",color:`${i[500]} !important`},"& .MuiInput-root":{flex:1,marginTop:"0 !important"}}});var xr=forwardRef(({label:o,size:e="md",error:t=false,disabled:r=false,fullWidth:a=false,placeholder:s,hideArrows:i=false,type:n,id:p,className:d,sx:c,onKeyDown:m,onWheel:u,...f},y)=>{let x=!!o,g=n==="number",S=C=>{let v=C.metaKey||C.ctrlKey||C.altKey,Zo=C.key.length===1;(["e","E","+","-"].includes(C.key)||xa()&&Zo&&!v&&!/^[0-9.]$/.test(C.key))&&C.preventDefault(),m?.(C);},L=C=>{C.target instanceof HTMLElement&&C.target.blur(),u?.(C);};return jsxs(yr,{className:kc(G.root,d),sx:c,error:t,disabled:r,fullWidth:a,"data-testid":"Input",$hasLabel:x,$size:e,children:[x&&jsx(ur,{className:G.label,htmlFor:p,children:o}),jsx(fr,{id:p,inputRef:y,className:G.input,type:n,error:t,disabled:r,placeholder:s??void 0,"aria-invalid":t||void 0,disableUnderline:true,fullWidth:true,$hasLabel:x,$hideArrows:i,$size:e,onKeyDown:g?S:m,onWheel:g?L:u,...f})]})});xr.displayName="Input";var Cr=memo(xr);var ae="os-shared-Textarea",Y={root:`${ae}-root`,label:`${ae}-label`,textarea:`${ae}-textarea`},_=3;var hr=styled(ai,{shouldForwardProp:o=>!["$error","$hasLabel","$minRows"].includes(o)})(({theme:o,$hasLabel:e=false,$minRows:t=_})=>{let{base:r,grey:a}=o.v2.palette;return {border:"none",borderRadius:"inherit",padding:e?`${o.v2.spacing(32)} ${o.v2.spacing(8)} ${o.v2.spacing(8)}`:`${o.v2.spacing(8)} ${o.v2.spacing(12)}`,fontSize:"11px",fontWeight:o.typography.fontWeightMedium,lineHeight:"normal",color:r.black,backgroundColor:"transparent",alignItems:"flex-start",width:"100%",...e&&{marginTop:0},"&.Mui-disabled":{color:a[500]},"& textarea":{resize:"vertical",minHeight:e?void 0:`${Math.max(t*20,60)}px`,padding:0,margin:0},"& textarea::placeholder":{color:a[500],fontWeight:o.typography.fontWeightMedium,opacity:1},"& textarea:-webkit-autofill, & textarea:-webkit-autofill:hover, & textarea:-webkit-autofill:focus":{WebkitTextFillColor:r.black,caretColor:r.black,transition:"background-color 5000s ease-in-out 0s"},"&::before, &::after":{display:"none"}}}),br=styled(qn)(({theme:o})=>{let{grey:e}=o.v2.palette;return {fontSize:"10px",fontWeight:o.typography.fontWeightMedium,color:`${e[500]} !important`}}),Sr=styled(_n,{shouldForwardProp:o=>!["$hasLabel","$minRows"].includes(o)})(({theme:o,disabled:e,error:t,fullWidth:r,$hasLabel:a=false,$minRows:s=_})=>{let{grey:i,base:n,error:p}=o.v2.palette,d=t?p[500]:i[100];return {position:"relative",display:"flex",flexDirection:"column",width:r?"100%":"auto",minHeight:a?96+(s-_)*20:void 0,margin:0,border:`1px solid ${d}`,borderRadius:o.v2.radius(4),backgroundColor:e?i[100]:n.white,transition:"border-color 0.15s ease","&:focus-within":{borderColor:t?p[500]:i[50]},"& .MuiFormLabel-asterisk":{color:p[500]},"& .MuiInputLabel-root":{position:"absolute",left:0,top:0,zIndex:1,pointerEvents:"none",display:"flex",alignItems:"flex-start",gap:o.v2.spacing(2),padding:o.v2.spacing(8),fontSize:"10px",fontWeight:o.typography.fontWeightMedium,lineHeight:"100%",transform:"none !important",transformOrigin:"top left",color:`${i[500]} !important`},"& .MuiInputBase-root":{flex:1,marginTop:"0 !important"}}});var Nr=forwardRef(({label:o,error:e=false,disabled:t=false,fullWidth:r=false,placeholder:a,minRows:s=_,maxRows:i,id:n,className:p,sx:d,required:c,...m},u)=>{let f=!!o;return jsxs(Sr,{className:kc(Y.root,p),sx:d,error:e,disabled:t,fullWidth:r,required:c,variant:"standard","data-testid":"Textarea",$hasLabel:f,$minRows:s,children:[f&&jsx(br,{className:Y.label,htmlFor:n,shrink:true,disableAnimation:true,required:c,children:o}),jsx(hr,{id:n,inputRef:u,className:Y.textarea,multiline:true,minRows:s,maxRows:i,disabled:t,required:c,placeholder:a??void 0,"aria-invalid":e||void 0,fullWidth:true,$error:e,$hasLabel:f,$minRows:s,...m})]})});Nr.displayName="Textarea";var kr=memo(Nr);var E="os-shared-Accordion",w={root:`${E}-root`,summary:`${E}-summary`,content:`${E}-content`,labelStartAdornment:`${E}-labelStartAdornment`,labelContent:`${E}-labelContent`,labelEndAdornment:`${E}-labelEndAdornment`,expandIcon:`${E}-expandIcon`};var Ir=()=>{let{v2:o}=useTheme(),{base:e}=o.palette;return jsx("svg",{width:"9",height:"5",viewBox:"0 0 9 5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{d:"M0.0501709 0.427246C0.0493864 0.478467 0.0592757 0.529176 0.0784912 0.57666C0.0976579 0.623937 0.125505 0.667471 0.161499 0.703613L3.82556 4.47803C3.86116 4.51465 3.90353 4.54403 3.95056 4.56396C3.99773 4.58391 4.04876 4.59422 4.09998 4.59424C4.15123 4.59424 4.20218 4.58392 4.24939 4.56396C4.29655 4.54401 4.33969 4.51476 4.37537 4.47803L8.03845 0.703613C8.07407 0.667816 8.10232 0.625348 8.12146 0.578613C8.14069 0.531638 8.15017 0.480932 8.14978 0.430176C8.14935 0.379519 8.13942 0.329298 8.11951 0.282715C8.09956 0.236042 8.06999 0.19405 8.03357 0.158691C7.99716 0.123349 7.95384 0.0952198 7.90662 0.0766602C7.8595 0.0582058 7.80878 0.0491929 7.75818 0.050293C7.70763 0.0514427 7.65792 0.0629948 7.61169 0.0834961C7.56537 0.104067 7.52346 0.13358 7.48865 0.17041L4.09998 3.65967L0.711304 0.17041C0.65912 0.115154 0.592066 0.0759001 0.517944 0.059082C0.443585 0.0422622 0.365385 0.0481013 0.294312 0.0756836C0.22324 0.103266 0.162075 0.15178 0.11853 0.214355C0.0750125 0.276905 0.05135 0.351058 0.0501709 0.427246Z",fill:e.black,stroke:e.black,strokeWidth:"0.1"})})};var Tr=styled(pi)(({theme:o,square:e})=>{let{grey:t,base:r}=o.v2.palette;return {overflow:"hidden",border:`1px solid ${t[100]}`,...!e&&{borderRadius:o.v2.radius(8)},margin:0,background:r.white,"&:before":{content:"unset"},"&.Mui-expanded":{margin:0},"&.Mui-disabled":{opacity:.5,pointerEvents:"none"}}}),Pr=styled(ci)(({theme:o})=>({background:"#fbfbfb",minHeight:"40px",height:"40px",padding:o.v2.spacing(10),"&.Mui-expanded":{minHeight:"40px",height:"40px"},"& .MuiAccordionSummary-content":{margin:0,display:"flex",flexDirection:"row",alignItems:"center",flexGrow:1,minWidth:0,gap:o.v2.spacing(10)},"& .MuiAccordionSummary-expandIconWrapper":{marginLeft:o.v2.spacing(8)}})),$r=styled(di)(({theme:o})=>{let{grey:e}=o.v2.palette;return {padding:0,borderTop:`1px solid ${e[100]}`}}),Mr=styled(Qe)({display:"inline-flex",alignItems:"center",justifyContent:"center",transition:"transform 0.2s ease",transform:"rotate(0deg)"}),Fr=styled(Qe)({minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"});var Dr=forwardRef(({expanded:o,defaultExpanded:e=false,onChange:t,label:r,content:a,labelStartAdornment:s,labelEndAdornment:i,slotProps:n={},disabled:p=false,expandIcon:d,className:c,sx:m,...u},f)=>{let y=o!==void 0,[x,g]=useState(e),S=y?o:x,L=(pl,ye)=>{y||g(ye),t?.(ye);},{showArrow:C=true,...v}=n.label??{},{className:Zo,sx:za,...Da}=n.root??{},Aa=d??(C?jsx(Mr,{component:"span",className:w.expandIcon,children:jsx(Ir,{})}):null),Ra=jsxs(Fragment,{children:[s!=null&&jsx(Qe,{component:"span",className:w.labelStartAdornment,...n.labelStartAdornment,sx:jc({flexShrink:0},n.labelStartAdornment?.sx),children:s}),jsx(Fr,{component:"span",className:w.labelContent,...n.labelContent,sx:n.labelContent?.sx,children:r}),i!=null&&jsx(Qe,{component:"span",className:w.labelEndAdornment,...n.labelEndAdornment,sx:jc({flexShrink:0,marginLeft:"auto"},n.labelEndAdornment?.sx),children:i})]});return jsxs(Tr,{ref:f,"data-testid":"Accordion",disabled:p,expanded:S,onChange:L,className:kc(w.root,c,Zo),sx:jc(m??{},za),...Da,...u,children:[jsx(Pr,{className:w.summary,expandIcon:Aa,"aria-expanded":S,...v,children:Ra}),jsx($r,{className:w.content,...n.content,children:a})]})});Dr.displayName="Accordion";var Ar=memo(Dr);var Rr="os-shared-Menu",to={popper:`${Rr}-popper`,panel:`${Rr}-panel`};var Er=styled(xi)({}),Hr=styled(Qe,{shouldForwardProp:o=>o!=="$showShadow"})(({theme:o,$showShadow:e})=>{let{grey:t,base:r}=o.v2.palette;return {borderRadius:o.v2.radius(4),background:r.white,width:"max-content",cursor:"pointer",boxShadow:o.v2.elevation[200],display:"flex",flexDirection:"column",overflowY:"auto",maxHeight:"432px","&:focus":{outline:"none"},".menu-item + .menu-item":{borderTop:`1px solid ${t[100]}`},"&::after":{content:e?'""':"none",width:"100%",height:"34px",position:"sticky",bottom:0,pointerEvents:"none",background:`linear-gradient(180deg, rgba(255,255,255,0) 0%, ${r.white} 100%)`}}});var Or=forwardRef(({open:o,anchorEl:e,children:t,placement:r,popperSx:a,panelProps:s,className:i,sx:n,...p},d)=>{let[c,m]=useState(false),f=useMemo(()=>Children.count(t),[t])>12&&c,{onScroll:y,className:x,sx:g,...S}=s??{},L=useCallback(v=>{m((v.currentTarget.scrollTop??0)>0),y?.(v);},[y]),C=kc(to.panel,x,"MuiPopper-dropdown");return jsx(Er,{ref:d,className:kc(to.popper,i),"data-testid":"Menu",open:o,anchorEl:e,placement:r??"bottom-start",sx:a,...p,children:jsx(Hr,{$showShadow:f,onScroll:L,className:C,sx:jc(n??{},g),...S,children:t})})});Or.displayName="Menu";var Zr=memo(Or);var ro="os-shared-Dialog",P={root:`${ro}-root`,title:`${ro}-title`,divider:`${ro}-divider`,content:`${ro}-content`,actions:`${ro}-actions`};var jr=styled(ki)(({theme:o})=>{let{base:e}=o.v2.palette;return {"& .MuiDialog-paper:not(.MuiDialog-paperFullWidth)":{width:394},"& .MuiDialog-paper":{backgroundColor:e.white,boxShadow:"0px 0px 16px 0px rgba(0, 0, 0, 0.11)",borderRadius:o.v2.radius(8)},"& .MuiModal-backdrop":{background:alpha("#000",.2)}}}),Kr=styled(Bi)(({theme:o})=>{let{base:e}=o.v2.palette;return {padding:`${o.v2.spacing(16)} ${o.v2.spacing(16)} ${o.v2.spacing(12)}`,fontSize:"13px",fontWeight:o.typography.fontWeightBolder,lineHeight:"normal",color:e.black,whiteSpace:"nowrap"}}),Ur=styled("hr")(({theme:o})=>{let{grey:e}=o.v2.palette;return {display:"block",border:"none",borderTop:`1px solid ${e[100]}`,margin:0,width:"100%",flexShrink:0}}),Xr=styled(Ii,{shouldForwardProp:o=>o!=="$hasHeading"})(({theme:o,$hasHeading:e})=>{let{grey:t}=o.v2.palette;return {padding:`${e?o.v2.spacing(12):o.v2.spacing(16)} ${o.v2.spacing(16)} ${o.v2.spacing(16)}`,fontSize:"12px",fontWeight:o.typography.fontWeightMedium,lineHeight:"normal",color:t[500]}}),Gr=styled(wi)(({theme:o})=>({padding:`0 ${o.v2.spacing(16)} ${o.v2.spacing(16)}`,gap:o.v2.spacing(8),justifyContent:"flex-end","& > :not(style) ~ :not(style)":{marginLeft:0}}));var _r=forwardRef(({heading:o,actions:e,children:t,onClose:r,open:a,className:s,sx:i,...n},p)=>jsxs(jr,{ref:p,"data-testid":"Dialog",open:a,onClose:r,className:kc(P.root,s),sx:i,...n,children:[o?jsxs(Fragment,{children:[jsx(Kr,{className:P.title,children:o}),jsx(Ur,{"aria-hidden":true,className:P.divider})]}):null,t!=null?jsx(Xr,{className:P.content,$hasHeading:!!o,children:t}):null,e?jsx(Gr,{className:P.actions,children:e}):null]}));_r.displayName="Dialog";var qr=memo(_r);var Do="os-shared-MenuItem",$={root:`${Do}-root`,indicator:`${Do}-indicator`,content:`${Do}-content`,disabled:`${Do}-disabled`},V={unchecked:"unchecked",checked:"checked",indeterminate:"indeterminate"};var Qr=()=>{let{v2:o}=useTheme(),{brand:e,base:t}=o.palette;return jsxs("svg",{width:"14",height:"14",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("rect",{x:"0.6",y:"0.6",width:"10.8",height:"10.8",rx:"2.4",fill:e[500]}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.83391 3.74245C9.04243 3.94469 9.05652 4.2875 8.86537 4.50814L5.64586 8.22426C5.55146 8.33322 5.41909 8.39666 5.27942 8.39987C5.13975 8.40308 5.0049 8.34579 4.90612 8.24127L3.15002 6.38321C2.94999 6.17157 2.94999 5.82843 3.15002 5.61679C3.35004 5.40516 3.67435 5.40516 3.87437 5.61679L5.2522 7.07463L8.11024 3.77574C8.30138 3.55511 8.62538 3.5402 8.83391 3.74245Z",fill:t.white})]})},oa=()=>jsx("svg",{width:"14",height:"14",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsx("rect",{x:"1.19998",y:"1.19998",width:"9.6",height:"9.6",rx:"1.8",fill:"#FAFBFB",stroke:"#D2D5D8",strokeWidth:"1.2"})}),ea=()=>{let{v2:o}=useTheme(),{brand:e}=o.palette;return jsxs("svg",{width:"14",height:"14",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("rect",{x:"1.2",y:"1.2",width:"9.6",height:"9.6",rx:"2.4",fill:e[500],stroke:e[500],strokeWidth:"1.2"}),jsx("rect",{x:"3",y:"5.4",width:"6",height:"1.2",rx:"0.5",fill:"#FAFBFB"})]})};var aa=styled(Qe,{shouldForwardProp:o=>o!=="$isDisabled"})(({theme:o,$isDisabled:e=false})=>{let{base:t}=o.v2.palette;return {padding:o.v2.spacing(8),position:"relative",display:"flex",alignItems:"center",gap:o.v2.spacing(8),textTransform:"capitalize",cursor:e?"not-allowed":"pointer",flex:1,fontSize:o.typography.subtitle1.fontSize,opacity:e?.5:1,color:t.black}}),ne=styled("span")({width:14,height:14,flexShrink:0,pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"center","& svg":{display:"block"}});function Di(o,e){return e?V.indeterminate:o?V.checked:V.unchecked}var Ai={[V.unchecked]:oa,[V.checked]:Qr,[V.indeterminate]:ea};function Ri(o,e,t){if(o===null)return null;if(o!==void 0)return jsx(ne,{className:$.indicator,"aria-hidden":true,children:o});let r=Di(e,t),a=Ai[r];return jsx(ne,{className:$.indicator,"aria-hidden":true,children:jsx(a,{})})}var sa=forwardRef(({isSelected:o=false,isDisabled:e=false,isIndeterminate:t=false,startAdornment:r,onClick:a,children:s,className:i,sx:n,...p},d)=>{let c=kc($.root,"menu-item",e&&$.disabled,i);return jsxs(aa,{ref:d,"data-testid":"MenuItem",className:c,sx:n,onClick:e?void 0:a,$isDisabled:e,...p,children:[Ri(r,o,t),jsx("span",{className:$.content,children:s})]})});sa.displayName="MenuItem";var na=memo(sa);var ia="os-shared-ToggleButtons",so={root:`${ia}-root`,button:`${ia}-button`},ie={text:"text",icon:"icon"},Ro=ie.text,le={sm:"sm",md:"md"},no=le.md,pe={md:{buttonHeight:28,fontSize:11,containerRadius:4,iconCell:28,iconSlot:14},sm:{buttonHeight:20,fontSize:9,containerRadius:3,iconCell:20,iconSlot:11}},la={text:{paddingX:8},icon:{paddingX:0}};function Ei(o,e){let{palette:t,elevation:r}=o.v2;return e?{backgroundColor:t.background.primary,boxShadow:r[100],color:t.foreground.primary}:{backgroundColor:"transparent",boxShadow:"none",color:t.foreground.secondary}}var ca=styled(Qe,{shouldForwardProp:o=>o!=="$size"})(({theme:o,$size:e=no})=>{let t=pe[e];return {backgroundColor:o.v2.palette.background.secondary,display:"inline-flex",alignItems:"center",padding:o.v2.spacing(2),borderRadius:o.v2.radius(t.containerRadius)}}),ma=styled(Qe,{shouldForwardProp:o=>o!=="$isActive"&&o!=="$type"&&o!=="$size"})(({theme:o,$isActive:e=false,$type:t=Ro,$size:r=no})=>{let a=pe[r],s=la[t],i=t==="icon";return {boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,height:a.buttonHeight,width:i?a.iconCell:"auto",minWidth:i?a.iconCell:0,padding:`0 ${o.v2.spacing(s.paddingX)}`,borderRadius:o.v2.radius(2),fontSize:a.fontSize,fontWeight:o.typography.fontWeightMedium,lineHeight:1,letterSpacing:0,whiteSpace:"nowrap",cursor:"pointer",transition:"background-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease",...Ei(o,e),...i&&{"& img, & svg":{width:a.iconSlot,height:a.iconSlot,display:"block"}}}});function ua({options:o,activeKey:e,onChange:t,type:r=Ro,size:a=no,containerProps:s,buttonProps:i,id:n,className:p,sx:d},c){let{className:m,sx:u,...f}=s??{},y=kc(so.root,p,m);return jsx(ca,{ref:c,id:n,"data-testid":"ToggleButtons",className:y,$size:a,sx:jc(d??{},u),...f,children:o.map(x=>jsx(ma,{className:so.button,$isActive:e===x.key,$type:r,$size:a,onClick:()=>t(x.key),...i,children:x.content},x.key))})}var Oi=forwardRef(ua);ua.displayName="ToggleButtons";var ya=memo(Oi);var Zi="os-shared-LazyImage",Wo={root:`${Zi}-root`},Eo={opacity:()=>import('react-lazy-load-image-component/src/effects/opacity.css'),blur:()=>import('react-lazy-load-image-component/src/effects/blur.css'),"black-and-white":()=>import('react-lazy-load-image-component/src/effects/black-and-white.css')};var ga=styled(Qe)({display:"inline-flex",justifyContent:"center",alignItems:"center"});function Ho(o){return o!=null&&o in Eo}var qi=LazyLoadImage,Ca=forwardRef(({effect:o,wrapperProps:e,id:t,className:r,sx:a,placeholderSrc:s,...i},n)=>{let[p,d]=useState(Ho(o));if(useEffect(()=>{if(!Ho(o)){d(false);return}d(true),Eo[o]().finally(()=>{d(false);});},[o]),p)return null;let{className:c,sx:m,style:u,...f}=e??{},y=Ho(o)||!!s||u!=null;return jsx(ga,{component:"span",...f,className:kc(Wo.root,c??r),sx:m!=null?jc(a??{},m):a,children:jsx(qi,{...i,ref:n,effect:o,placeholderSrc:s,id:t,"data-testid":"LazyImage",wrapperProps:y?{style:{display:"flex",justifyContent:"center",alignItems:"center",...u}}:void 0})})});Ca.displayName="LazyImage";var ha=memo(Ca);var M="#FF7A00",de="os-shared-FieldFeedback",J={root:`${de}-root`,icon:`${de}-icon`,message:`${de}-message`};var ba=({severity:o="error",...e})=>{let t=useTheme(),{error:r}=t.v2.palette,a=o==="warning"?M:r[500];return jsx(Ko,{sx:{width:12,height:12},...e,children:jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{d:"M6 12C9.30838 12 12 9.30838 12 6C12 2.69162 9.30838 -2.35309e-07 6 -5.24537e-07C2.69162 -8.13764e-07 8.13764e-07 2.69162 5.24537e-07 6C2.35309e-07 9.30838 2.69162 12 6 12ZM6 11.1C3.17801 11.1 0.9 8.82198 0.9 6C0.9 3.17802 3.17802 0.899999 6 0.899999C8.82199 0.899999 11.1 3.17802 11.1 6C11.1 8.82198 8.82198 11.1 6 11.1ZM6 9C6.15913 9 6.31174 8.93679 6.42426 8.82426C6.53679 8.71174 6.6 8.55913 6.6 8.4C6.6 8.24087 6.53679 8.08826 6.42426 7.97574C6.31174 7.86321 6.15913 7.8 6 7.8C5.84087 7.8 5.68826 7.86321 5.57574 7.97574C5.46321 8.08826 5.4 8.24087 5.4 8.4C5.4 8.55913 5.46321 8.71174 5.57574 8.82426C5.68826 8.93679 5.84087 9 6 9ZM6.00703 6.90644C6.12628 6.90458 6.23991 6.85546 6.32296 6.76988C6.40602 6.6843 6.45171 6.56925 6.45 6.45L6.45 3.15C6.45084 3.09037 6.43983 3.03116 6.41759 2.97583C6.39535 2.92049 6.36234 2.87013 6.32047 2.82766C6.2786 2.7852 6.22871 2.75148 6.17369 2.72846C6.11868 2.70544 6.05964 2.69359 6 2.69359C5.94036 2.69359 5.88132 2.70544 5.82631 2.72846C5.77129 2.75148 5.7214 2.7852 5.67953 2.82766C5.63766 2.87013 5.60465 2.92049 5.58241 2.97583C5.56017 3.03116 5.54916 3.09037 5.55 3.15L5.55 6.45C5.54914 6.51023 5.56037 6.57002 5.58304 6.62583C5.60571 6.68163 5.63935 6.73232 5.68197 6.77489C5.72459 6.81745 5.77533 6.85103 5.83116 6.87363C5.887 6.89623 5.9468 6.90739 6.00703 6.90644Z",fill:a})})})},Sa=o=>{let{v2:e}=useTheme(),{success:t}=e.palette;return jsx(Ko,{sx:{width:12,height:12},...o,children:jsx("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{d:"M9.63285 0.429835C9.54018 0.432536 9.45219 0.471196 9.38752 0.537631L3.21672 6.70844L0.614302 4.10602C0.581421 4.07177 0.542037 4.04443 0.498457 4.0256C0.454877 4.00676 0.407977 3.99681 0.360503 3.99633C0.313029 3.99585 0.265937 4.00484 0.221983 4.02279C0.178029 4.04073 0.138097 4.06727 0.104526 4.10084C0.0709555 4.13441 0.0444206 4.17434 0.0264755 4.21829C0.00853037 4.26225 -0.000464234 4.30934 1.8446e-05 4.35681C0.000501126 4.40429 0.0104514 4.45119 0.0292865 4.49477C0.0481216 4.53835 0.0754629 4.57773 0.109709 4.61061L2.96442 7.46533C3.03134 7.53222 3.12209 7.5698 3.21672 7.5698C3.31134 7.5698 3.40209 7.53222 3.46901 7.46533L9.89212 1.04222C9.9436 0.992086 9.97874 0.927576 9.99295 0.857134C10.0072 0.786693 9.99978 0.713603 9.97176 0.647428C9.94374 0.581254 9.8964 0.525079 9.83593 0.486255C9.77546 0.447431 9.70468 0.427767 9.63285 0.429835Z",fill:t[700]})})})},va=o=>{let{v2:e}=useTheme(),{base:t}=e.palette;return jsx(Ko,{sx:{width:12,height:12},...o,children:jsx("svg",{width:"12",height:"11",viewBox:"0 0 12 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{d:"M6 7.5V5.5M6 3.5H6.005M11 5.5C11 8.26142 8.76142 10.5 6 10.5C3.23858 10.5 1 8.26142 1 5.5C1 2.73858 3.23858 0.5 6 0.5C8.76142 0.5 11 2.73858 11 5.5Z",stroke:t.black,strokeWidth:"0.8",strokeLinecap:"round",strokeLinejoin:"round"})})})};function Vo(o,e){let t=e??"error",{brand:r}=o.v2.palette;switch(t){case "warning":return {borderColor:alpha(M,.15),backgroundColor:alpha(M,.15),textColor:M};case "success":return {borderColor:alpha("#76BB40",.15),backgroundColor:alpha("#76BB40",.15),textColor:"#76BB40"};case "info":return {borderColor:alpha(r[500],.12),backgroundColor:alpha(r[500],.12),textColor:r[500]};case "error":return {borderColor:alpha("#FF3D00",.15),backgroundColor:alpha("#FF3D00",.15),textColor:"#FF3D00"};default:return t}}var Na=styled("div",{shouldForwardProp:o=>o!=="$feedbackType"})(({theme:o,$feedbackType:e})=>{let{backgroundColor:t}=Vo(o,e);return {display:"flex",alignItems:"flex-start",gap:o.v2.spacing(4),minHeight:"32px",padding:`${o.v2.spacing(8)} ${o.v2.spacing(12)}`,background:t,borderRadius:`0 0 ${o.v2.radius(4)} ${o.v2.radius(4)}`}}),ka=styled("div",{shouldForwardProp:o=>o!=="$feedbackType"})(({theme:o,$feedbackType:e})=>{let{textColor:t}=Vo(o,e);return {fontSize:"10px",lineHeight:"16px",display:"block",color:t,wordBreak:"break-word"}}),wa=styled("span")({width:12,height:12,flexShrink:0,marginTop:"2px",display:"inline-flex",alignItems:"center",justifyContent:"center","& svg":{width:12,height:12,display:"block"}});function ol(o){switch(o){case "success":return jsx(Sa,{});case "info":return jsx(va,{});case "error":case "warning":return jsx(ba,{severity:o})}}var Ia=forwardRef(({type:o="error",message:e,icon:t,className:r,sx:a},s)=>{if(!zc(e))return null;let i=o;return jsxs(Na,{ref:s,"data-testid":"FieldFeedback",className:kc(J.root,r),sx:a,$feedbackType:i,children:[t??jsx(wa,{className:J.icon,children:ol(i)}),jsx(ka,{className:J.message,$feedbackType:i,children:e})]})});Ia.displayName="FieldFeedback";var Ba=memo(Ia);var tl="os-shared-ScrollLoader",Oo={root:`${tl}-root`};var Ta=styled(rl)({overflow:"auto",height:"100%",maxHeight:"100%"});function ue(o,e=50){return o.scrollHeight-(o.scrollTop+o.clientHeight)<=e}var Fa=forwardRef(({loadMoreItems:o,hasMore:e,isLoading:t=false,isFetchingNextPage:r,children:a,className:s,sx:i,id:n,...p},d)=>{let[c,m]=useState(false),u=useRef(o),f=useRef(null);u.current=o;let y=useCallback(()=>{e&&!r&&u.current();},[e,r]),x=useCallback(()=>{let g=f.current;g&&ue(g)&&y();},[y]);return useEffect(()=>{let g=f.current;if(g)return g.addEventListener("scroll",x),()=>g.removeEventListener("scroll",x)},[x]),useEffect(()=>{let g=f.current;if(!g||t||c)return;let S=window.setTimeout(()=>{m(true),ue(g)&&y();},1e3);return ()=>window.clearTimeout(S)},[t,y,c]),jsx(Ta,{ref:g=>{f.current=g,typeof d=="function"?d(g):d&&(d.current=g);},id:n,"data-testid":"ScrollLoader",className:kc(Oo.root,s),sx:i,...p,children:a})});Fa.displayName="ScrollLoader";var La=memo(Fa);
|
|
2
|
+
export{ha as $,Bo as A,Lt as B,B as C,Vt as D,U as E,Gt as F,k as G,sr as H,T as I,pr as J,G as K,Cr as L,Y as M,kr as N,w as O,Ar as P,to as Q,Zr as R,P as S,qr as T,$ as U,na as V,so as W,ie as X,le as Y,ya as Z,Wo as _,N as a,M as aa,Be as b,J as ba,po as c,Vo as ca,$e as d,Ba as da,D as e,Oo as ea,Ee as f,La as fa,co as g,Oe as h,mo as i,Ke as j,fo as k,Je as l,A as m,st as n,h as o,ct as p,ho as q,ut as r,bo as s,ht as t,No as u,vt as v,ko as w,wt as x,wo as y,$t as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {d as d$1}from'./chunk-
|
|
1
|
+
import {d as d$1}from'./chunk-MCLIRRED.js';import {a}from'./chunk-WHLBHLAV.js';import {yc}from'./chunk-W6W4YZ7G.js';import {Fb,B}from'./chunk-3YAJNHQC.js';import {useId,useMemo,useState}from'react';import d from'@mui/material/Box';import R from'@mui/material/Skeleton';import {styled}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var b=styled(d)(({theme:e})=>({display:"flex",flexDirection:"column",borderRadius:"8px",border:`1px solid ${e.palette.divider}`,backgroundColor:e.palette.common.white,maxHeight:"232px",overflow:"auto"})),k=styled(d)(()=>({display:"flex",flexDirection:"column",gap:"8px"})),v=styled(d,{shouldForwardProp:e=>e!=="$active"})(({$active:e})=>({display:"flex",alignItems:"center",justifyContent:"center",width:"13px",height:"13px",borderRadius:"50%",...e&&{backgroundColor:"#F2F2F2"}})),y=styled("img",{shouldForwardProp:e=>e!=="$isClear"})(({$isClear:e})=>({...e&&{backgroundColor:"#F2F2F2",borderRadius:"4px",width:"8px",height:"8px"}})),W=styled(d$1,{shouldForwardProp:e=>e!=="$hasSearchValue"})(({$hasSearchValue:e})=>({cursor:e?"pointer":"default",width:"100%",fontSize:"11px",border:"1px solid #F2F2F2",backgroundColor:"#fff","&.Mui-disabled":{backgroundColor:"#F8F8F8"}})),w=styled(a)(({theme:e})=>({backgroundColor:"#F8F8F8",fontSize:"11px",fontWeight:600,padding:"4px 8px",color:e.palette.info.dark,gap:"4px"})),A=styled(a)(()=>({fontSize:"11px",padding:"4px 8px",gap:"4px",fontWeight:400})),L=styled(R)(()=>({width:"100%",height:24}));function M({onSalesChannelChange:e,onSearchChange:h,filteredOptions:a,isLoading:P,initialSalesChannels:m,initialSalesChannelsSearch:V}){let B$1=yc(useId(),"sales-channel-filter"),o=useMemo(()=>m||[],[m]),[l,u]=useState(V||""),S=t=>o.some(i=>i.id===t),s=useMemo(()=>o?.length===a.length&&a?.length>0,[o,a]),g=useMemo(()=>o?.some(t=>t.id==="blank")&&o?.length===1,[o]),x=useMemo(()=>o?.length===0||g,[g,o?.length]);return jsxs(k,{id:B$1,"data-testid":"SalesChannelFilter",children:[jsx(W,{$hasSearchValue:!!l,placeholder:"Search",endAdornment:!x&&jsx(v,{$active:!!l,children:jsx(y,{src:l?Fb:B,alt:"search",$isClear:!!l,onClick:()=>{u(""),h("");}})}),disabled:x,onChange:t=>{u(t.target.value),h(t.target.value);},value:l,disableUnderline:true}),jsx(b,{children:P?Array.from({length:9}).map((t,i)=>jsx(L,{variant:"rectangular"},i)):jsxs(Fragment,{children:[jsx(w,{isSelected:s,isIndeterminate:!s&&(o?.length||0)>0,onClick:t=>{t.stopPropagation(),e(s?[]:a);},children:s?"Deselect All":"Select All"}),a.map(t=>jsx(A,{isSelected:S(t.id),onClick:i=>{i.stopPropagation();let O=S(t.id)?o?.filter(D=>D.id!==t.id):[...o??[],t];e(O);},children:t?.name?.en},t.id))]})})]})}export{M as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {b}from'./chunk-
|
|
1
|
+
import {b}from'./chunk-LF53Q3HW.js';import {z}from'./chunk-MCX337WI.js';import {yc}from'./chunk-W6W4YZ7G.js';import {Sh}from'./chunk-3YAJNHQC.js';import {memo,useId}from'react';import {styled,Box}from'@mui/material';import {jsxs,jsx}from'react/jsx-runtime';var a=styled(Box,{shouldForwardProp:t=>t!=="isLongLabel"})(({theme:t,isLongLabel:e})=>({display:"flex",justifyContent:"center",alignItems:"center",padding:"6px 16px",height:"32px",background:t.palette.background.gradient.shadedBlue,color:t.palette.common.white,borderRadius:"50px",fontSize:"11px",gap:t.spacing(1),minWidth:e?"12rem":"8.4rem",marginRight:"auto",position:"relative"}));function u({ids:t,visible:e,label:o,onDismiss:c,dismissible:m=true}){let d=yc(useId(),"active-filter-chip");return e?jsxs(a,{id:d,"data-testid":"ActiveFilterChip",isLongLabel:(o?.length??0)>11,children:[o?jsx(b,{children:o}):jsx("span",{children:t?.join(",")}),m&&jsx(z,{pointer:true,round:true,onClick:c,color:"active",sx:{position:"absolute",right:"8px"},children:jsx("img",{src:Sh,alt:"close",style:{width:"8px",height:"7px"}})})]}):null}var s=memo(u);var S=s;export{S as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {f,p}from'./chunk-
|
|
1
|
+
import {f,p}from'./chunk-MCX337WI.js';import {a}from'./chunk-GNY2VGGW.js';import {yc}from'./chunk-W6W4YZ7G.js';import {wb}from'./chunk-3YAJNHQC.js';import {memo,useRef,useState,useEffect,useMemo,useId}from'react';import ie from'@mui/material/Popper';import {styled,Box}from'@mui/material';import {jsx,jsxs}from'react/jsx-runtime';var k=styled(a)(({theme:e})=>({fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.subtitle1.fontSize,color:e.palette.grey[700],paddingInlineStart:e.spacing(2),paddingTop:e.spacing(1),paddingBottom:e.spacing(1),paddingInlineEnd:e.spacing(1)})),R=styled(Box,{shouldForwardProp:e=>e!=="disabled"})(({theme:e,disabled:n})=>({fontWeight:e.typography.fontWeightMedium,padding:e.spacing(1),position:"relative",display:"flex",alignItems:"center",textTransform:"capitalize",cursor:n?"not-allowed":"pointer",flex:1,zIndex:99999,".MuiButtonBase-root":{width:"16px",marginInlineEnd:"4px"}})),z=styled(Box)(({theme:e})=>({borderRadius:e.spacing(.5),background:e.palette.background.default,width:"max-content",cursor:"pointer",zIndex:99999,boxShadow:e.shadows[11],display:"flex",flexDirection:"column",".nested-menu-item + .nested-menu-item":{borderTop:`1px solid ${e.palette.divider}`,zIndex:99999},".nested-menu-item:hover":{transition:e.transitions.create(["boxShadow","border"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.complex}),boxShadow:e.shadows[6],border:"none",position:"relative"}})),B=styled(Box)(({theme:e})=>({...e.typography.subtitle1,color:e.palette.text.primary})),H=styled(f)(()=>({padding:0,paddingRight:"4px",".MuiSvgIcon-root":{width:12,height:12}})),$=styled(Box)(()=>({display:"flex",gap:"4px",alignItems:"center",flexGrow:1,minWidth:0,overflow:"hidden"})),A=styled(Box)(()=>({display:"flex",gap:"12px",justifyContent:"space-between",flexGrow:1,alignItems:"center",minWidth:0,overflow:"hidden"})),O=styled(Box)(({theme:e})=>({borderRadius:"50%",background:e.palette.divider,width:13,height:14,fontSize:"8px",fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",lineHeight:"10px"})),G=styled(Box)(()=>({display:"flex",alignItems:"center",gap:"8px",flexShrink:0,position:"relative",left:4})),F=styled(Box)(()=>({flex:"1 0 auto"})),_=styled(Box)(()=>({position:"relative",zIndex:999999}));function q(e){return e.scrollWidth-e.clientWidth>1}function oe({children:e}){let n=useRef(null),[r,t]=useState(false);return jsx(p,{arrow:true,placement:"top",title:e,open:r,onOpen:()=>{let f=n.current;f&&q(f)&&t(true);},onClose:()=>t(false),componentsProps:{tooltip:{sx:{maxWidth:280,whiteSpace:"normal",wordBreak:"break-word"}}},wrapperProps:{sx:{flex:1,minWidth:0,display:"block",overflow:"hidden"}},children:jsx(B,{ref:n,sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e})})}var K=memo(oe);function se({label:e,icon:n,name:r,menuItems:t,setSelected:f,onSelect:C,selected:i,displayChildrenCount:I,disabled:s,placement:h="right",sx:g,menuSx:P}){let[u,S]=useState(null),l=useRef(null),[a,p]=useState(false),w=o=>{!s&&i!==void 0&&(f({name:o,selected:!i}),i||p(false));};return useEffect(()=>{p(!!(t?.some(o=>o.selected)&&!t?.every(o=>o.selected)));},[]),jsxs(R,{"data-testid":"NestedDropdown_MenuItem",ref:l,className:`nested-menu-item ${u?"active":""} ${s?"disabled":""}`,onMouseEnter:o=>{!u&&t?.length&&S(o.currentTarget);},onMouseLeave:()=>{u&&S(null);},onClick:o=>{s||(o.stopPropagation(),w(r));},sx:{...t?.length&&{cursor:s?"not-allowed":"pointer"},zIndex:99999,...g},disabled:s,children:[i!==void 0&&jsx(H,{size:"small",indeterminate:a,checked:i,disabled:s}),jsxs($,{children:[n&&n,jsxs(A,{children:[e&&jsx(K,{children:e}),!!t?.length&&jsxs(G,{children:[I&&jsx(O,{children:t.length}),jsx("img",{src:wb,className:"arrow-icon",alt:"arrow",style:{height:12}})]})]})]}),t?.length&&jsx(ie,{open:!!(u&&t?.length),anchorEl:u,placement:h==="left"?"left-start":"right-start",sx:{zIndex:99999,...P},children:jsx(T,{className:"child-dropdown",menuItems:t,placement:h,sx:P,onChildrenChange:o=>{let y=o.every(d=>d.selected);i!==void 0&&!s&&(y&&f({name:r,selected:true}),o.every(d=>!d.selected)&&f({name:r,selected:false}),p(o?.some(d=>d.selected)&&!o.every(d=>!d.selected)&&!y));},onSelect:o=>{C(o,r);}})})]})}var M=memo(se);function ae({title:e,menuItems:n,onChildrenChange:r,onSelect:t,className:f,updatedList:C,footer:i,header:I,placement:s="right",...h}){let[g,P]=useState({name:"",selected:false}),[u,S]=useState();return useEffect(()=>{S(n);},[n]),useEffect(()=>{if(g.name){let{name:l,selected:a}=g,p=[],w=d=>d?.map(m=>(p.push({name:m.name,selected:a}),{...m,selected:a,...m.menuItems?.length&&{menuItems:w(m.menuItems)}})),y=(d=>d.map(m=>m.name===l?(p.push({name:m.name,selected:a}),{...m,selected:a,...m.menuItems?.length&&{menuItems:w(m.menuItems)}}):m))(u);S(y),C&&C(y),r&&r(y),t&&t(p);}},[g]),jsxs(z,{component:"article",className:`tap-dropdown ${f||""}`,...h,children:[jsx(_,{children:e&&jsx(k,{component:"p",children:e})}),I,jsx(F,{children:u?.map((l,a)=>jsx(M,{setSelected:({name:p,selected:w})=>{P({name:p,selected:w});},onSelect:p=>{t&&t(p);},placement:s,...l},`${l.name}-${a}`))}),i&&i]})}var T=memo(ae);var Y=(e,{menuItemSx:n,menuSx:r})=>(e.forEach(t=>{t.sx={...n,...t.sx},t.menuSx={...r,...t.menuSx},t.menuItems?.length&&Y(t.menuItems,{menuItemSx:n,menuSx:r});}),e);function he({title:e,menuItems:n,onSelect:r,updatedList:t,header:f,placement:C="right",menuItemSx:i={},menuSx:I={},...s}){let h=useMemo(()=>Y(n,{menuItemSx:i,menuSx:I}),[n,i,I]),[g,P]=useState(h),u=yc(useId(),"nested-dropdown");useEffect(()=>{P(h);},[h]);let S=l=>{let a=w=>w.map(o=>({...o,selected:l.find(y=>o.name===y.name)?.selected??o.selected,...o.menuItems?.length&&{menuItems:a(o.menuItems)}})),p=a(g);P(p),t&&t(p);};return jsx(T,{id:u,"data-testid":"NestedDropdown",placement:C,menuItems:g,title:e,header:f,onSelect:l=>{r&&r(l),S(l);},...s})}var Z=memo(he);var Ue=Z;export{M as a,T as b,Ue as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {b}from'./chunk-
|
|
1
|
+
import {b}from'./chunk-3QCEOE6H.js';import {memo,useCallback,Fragment as Fragment$1,createElement}from'react';import {useTranslation}from'react-i18next';import {jsx,Fragment}from'react/jsx-runtime';function B({isActiveFilterVisible:f,availableStatuses:v,status:e,onStatusChange:i,buttonSx:l}){let{t:I}=useTranslation(),S=f??false,b$1=useCallback(s=>s===e&&!S?"active":"inActive",[e,S]),u=useCallback(s=>{i?.(s);},[i]);return jsx(Fragment,{children:v?.map(({render:s,...a},d)=>{if(s)return jsx(Fragment$1,{children:s({status:e,onChange:u},{...a,index:d})},`custom-status-slot-${d}`);if(!Array.isArray(a.status))return createElement(b,{...a,key:`status-button-array-${a.status}`,variant:b$1(a.status),onClick:()=>{Array.isArray(a.status)||u(a.status);},buttonSx:l});if(!a.status)return null;let o=a.status.filter(Boolean).map(t=>typeof t=="string"?{value:t}:t)||[],c=!!e&&o.some(t=>t?.value===e);return jsx("div",{children:jsx(b,{...a,selectedStatus:c?e:void 0,variant:c?"active":"inActive",onButtonBodyClick:t=>u(t),dropdownOptions:o.map(t=>({label:t?.label||I(t?.value||""),status:t?.value,icon:t.icon,onClick:()=>u(t.value)})),buttonSx:l})},o[0]?.value)})})}var p=memo(B);var M=p;export{M as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-ZONDSLTR.js';import {p}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-ZONDSLTR.js';import {p}from'./chunk-MCX337WI.js';import {yc,f as f$1}from'./chunk-W6W4YZ7G.js';import {nb}from'./chunk-3YAJNHQC.js';import {useId}from'react';import {useTranslation}from'react-i18next';import {jsx,jsxs}from'react/jsx-runtime';var m=t=>({start:{x:t*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:t*39,transition:{duration:.3,type:"tween",ease:"easeOut"}}});var d=({children:t})=>jsx("span",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"2px"},children:t});function f({value:t,index:e}){let s=yc(useId(),"rating-count"),{t:u}=useTranslation();return jsx(p,{title:u("totalPaymentCount",{amount:f$1(t)}),wrapperProps:{display:"inline-flex"},children:jsx(a,{id:s,order:e,variants:m(e),"data-testid":"RatingCount",children:jsxs(d,{children:[jsx("img",{src:nb,alt:"star",style:{width:"10px",height:"10px"}})," ",(t||0)>1&&jsx("span",{style:{fontSize:"9.782px"},children:t})]})})})}export{f as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import'./chunk-WMNFDDLA.js';import {P,O as O$1}from'./chunk-
|
|
1
|
+
import'./chunk-WMNFDDLA.js';import {P,O as O$1}from'./chunk-MCX337WI.js';import {yc}from'./chunk-W6W4YZ7G.js';import {memo,useId,useState,useEffect}from'react';import p from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';import {jsx,Fragment}from'react/jsx-runtime';var f="32px";var g=styled(p,{shouldForwardProp:e=>e!=="isMaximized"})(({theme:e,isMaximized:i})=>({background:alpha(e.palette.common.white,.7),backdropFilter:"blur(8px)",width:183,position:"sticky",padding:"16px 8px",paddingTop:i?f:"16px",height:"100%",overflow:"auto"})),b=styled(p)(()=>({display:"flex",flexDirection:"column",gap:"8px"})),S=styled(p,{shouldForwardProp:e=>e!=="isActive"})(({theme:e,isActive:i})=>({background:i?"linear-gradient(270deg, #147DC5 0.67%, #3DA6E1 98.91%)":"transparent",borderRadius:"4px",padding:"4px 8px",color:i?e.palette.common.white:e.palette.text.primary,fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px",cursor:"pointer",fontWeight:600})),h=styled(p,{shouldForwardProp:e=>e!=="isActive"})(({theme:e,isActive:i})=>({background:i?"#FFFFFF":"transparent",borderRadius:"4px",padding:"4px 8px",color:e.palette.text.primary,fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px",cursor:"pointer",fontWeight:600})),B=styled(P)(({theme:e})=>({background:"transparent",border:"none !important",borderRadius:"4px !important",[`& .${O$1.summary}`]:{padding:0,paddingRight:e.spacing(1),minHeight:"40px",height:"40px","&.Mui-expanded":{minHeight:"40px",height:"40px"},marginBottom:4,borderRadius:"4px !important"},[`& .${O$1.content}`]:{borderTop:"none",padding:0}}));function w({sections:e,isMaximized:i,onClick:m,activeSection:A,activeSubSection:k}){let I=yc(useId(),"expandable-side-bar"),r=A||e?.[0]?.id,F=k||e?.[0]?.subSections?.[0]?.id,[C,c]=useState({});return useEffect(()=>{e?.length&&c(t=>{let o=false,d={...t};for(let x of e)x.id in d||(d[x.id]=r===x.id,o=true);return o?d:t});},[e,r]),useEffect(()=>{r&&c(t=>({...t,[r]:true}));},[r]),jsx(g,{isMaximized:i,id:I,"data-testid":"ExpandableSideBar",children:jsx(b,{children:e?.map(t=>jsx(B,{expanded:C[t.id]??false,onChange:o=>c(d=>({...d,[t.id]:o})),slotProps:{root:{component:"section"}},label:jsx(h,{onClick:()=>{m?.(t.id,t.subSections?.[0]?.id);},isActive:r===t.id,children:t.title}),content:jsx(Fragment,{children:t.subSections?.map(o=>jsx(S,{onClick:()=>{m?.(t.id,o.id);},isActive:F===o.id,children:o.title},`${t.id}-${o.id}`))})},`${t.id}`))})})}var E=memo(w);var O=E;export{O as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {f,b as b$1,g,a as a$2,e,d,c as c$1}from'./chunk-GB5N3AEY.js';import {a as a$4}from'./chunk-UGBA2F4Y.js';import {a as a$1}from'./chunk-MXXAZH6N.js';import {c}from'./chunk-OUCG6J7O.js';import {a}from'./chunk-ZONDSLTR.js';import {o,j as j$1,k,l,p as p$1}from'./chunk-XFDWIT4G.js';import {p,z}from'./chunk-RGHVZKKB.js';import {a as a$3}from'./chunk-SUBIH236.js';import {b}from'./chunk-UYDM5BBG.js';import {Va,yc,Ha,Ia,bc,f as f$1}from'./chunk-W6W4YZ7G.js';import {s}from'./chunk-N372QRVU.js';import {U,zi,Bi,Ai,yi,Fi,dh,Wg,ch,Sj,Tj,ub,hk,kk,Bk,ik,vb,wa,va,tk,h,Vg}from'./chunk-3YAJNHQC.js';import {useId,useMemo,useCallback}from'react';import {useTranslation}from'react-i18next';import {styled,Box,useTheme}from'@mui/material';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {motion}from'framer-motion';import {styled as styled$1,useTheme as useTheme$1}from'@mui/material/styles';import _ from'lodash/camelCase';import Qe from'@mui/material/Box';var lt={ORDER:{label:"order",icon:yi,color:"#5E30EB"},SAVED_CARD:{label:"cardAgreement",icon:Ai,color:"#76BB40"},SUBSCRIPTION:{label:"subscription",icon:Bi,color:"#00C7BE"},INSTALLMENT:{label:"installment",icon:zi,color:"#32ADE6"}},dt={SAVED_TOKEN:{label:"savedToken",icon:U,color:"#76BB40"},COUNT:{label:"countBadge",icon:"countBadge",color:"#76BB40"}};styled("span")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.5)}));styled("img")(()=>({width:"35px",height:"16px",display:"block"}));styled("span")(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"14.67px",height:"10px"}));styled("img")(()=>({maxWidth:"100%",width:"100%"}));var ct=styled("span")(({theme:t})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:t.palette.text.primary})),mt=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px"}));function Ie({type:t,hasSavedCard:o,totalPaymentsCount:e,isTextShown:r}){let l=yc(useId(),"agreement-icon"),p$1=useTheme(),{t:a$2}=useTranslation(),n=useMemo(()=>[...o?[dt.SAVED_TOKEN]:[],...(e||0)>0?[dt.COUNT]:[],...t&<[t]?[lt[t]]:[]],[o,e,t]),d=c=>r?jsx(a,{"data-testid":"AgreementCell_countBadge",children:jsx(p,{title:a$2("totalPaymentCount",{amount:f$1(e)}),children:jsx(mt,{children:jsxs(ct,{"data-testid":"AgreementCell_totalPaymentsCount",sx:{color:dt.COUNT.color},children:["x",e]})})})},c):jsx(a$4,{value:e,index:c},c),s=n.map((c,g)=>c.label==="countBadge"?d(g):jsx(p,{title:a$2(c.label),children:jsx(a,{children:r?jsx(mt,{children:jsx(ct,{"data-testid":"AgreementCell_agreementType",sx:{color:c.color},children:a$2(c.label)})}):jsx(a$1,{sx:{maxWidth:"16px",maxHeight:"16px",height:"auto",width:"auto"},src:c.icon,alt:"agreement"})},c.color)},c.color)),f=jsx(p,{title:"No agreement",children:jsx(a,{children:r?jsx(mt,{children:jsx(ct,{"data-testid":"AgreementCell_agreementType",sx:{color:p$1.palette.text.secondary},children:"No agreement"})}):jsx(a$1,{sx:{maxWidth:"24px",maxHeight:"24px",height:"auto",width:"auto"},src:Fi,alt:"agreement"})},"no-agreement")},"no-agreement");return jsx(Box,{id:l,"data-testid":"AgreementIcon",sx:{display:"flex",alignItems:"center",gap:"4px"},children:s?.length>0?s:f})}var To=Ie;var Ce=To;styled("span")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(1)}));styled("img")(()=>({maxWidth:"36px",maxHeight:"24px"}));styled(motion.span,{shouldForwardProp:t=>t!=="sourcesCount"})(({theme:t,sourcesCount:o})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${o*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:t.palette.background.paper,borderRadius:"16px"}));var Ao=styled("span")(({theme:t})=>({fontSize:"11px",padding:"2px 0",color:t.palette.text.primary})),Po=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"4px",textAlign:"center",width:"100%"}));styled("span")(({theme:t})=>({position:"absolute",left:0,zIndex:6,border:`1px solid ${t.palette.divider}`,borderRadius:"12px",backgroundColor:t.palette.background.paper,width:"36px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"}));styled(motion.div)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(1)}));var Wo=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px"}));var kt={"3DS":{tooltip:"3DS",icon:Tj,borderColor:"rgba(31, 136, 208, 0.10)"},"Device Biometric":{tooltip:"Biometric",icon:Sj,borderColor:"rgba(31, 136, 208, 0.10)"},"Non-3DS":{tooltip:"Non 3DS",icon:ch,borderColor:"rgba(31, 136, 208, 0.10)"}},vo={FAILED:{tooltip:"Failed",icon:Wg,borderColor:"rgba(255, 61, 0, 0.10)"},REJECTED:{tooltip:"Rejected",icon:dh,borderColor:"rgba(255, 61, 0, 0.10)"}};function be({transactionStatus:t,eci:o,authType:e,isTextShown:r}){let l=yc(useId(),"auth-icons"),p$1=useMemo(()=>{let n=t?vo[t]:null,d=n?.tooltip,s=t==="AUTHENTICATED"?null:n?.icon;return [{tooltip:d,content:r?d:s,type:r?"text":"icon"},...e?[{tooltip:e,content:r?kt[e]?.tooltip:kt[e]?.icon,type:r?"text":"icon"}]:[],{tooltip:"",content:o?`ECI ${o}`:"",type:"text"}]},[t,r,e,o]),a=useMemo(()=>p$1.filter(n=>!!n.content).map((n,d)=>{let s=n.type==="text"?jsx(Po,{"data-testid":"AuthenticationCell_BadgeTextWrapper",children:jsx(Ao,{sx:{border:"none"},"data-testid":"AuthenticationCell_TextLabel","data-source":n.content,children:n.content})}):jsx(a$1,{sx:{width:"16px",height:"16px"},src:n.content,alt:n.tooltip});return jsx(p,{title:n.tooltip,children:s},`${n.tooltip}-${d}`)}),[p$1]);return jsx(Wo,{id:l,"data-testid":"AuthIcons",children:a})}var ko=be;var Se=(t,o,e)=>({start:{x:t*6,transition:{duration:.3,type:"tween",ease:"easeIn"},...t>0&&{opacity:0}},animate:{x:e?t*e:t*39,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:o,...t>0&&{opacity:1}}});var Te=ko;var tt={VOID:{icon:ik},CAPTURED:{icon:hk}};var ut=styled$1(motion.div)(({theme:t,isCapture:o})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:t.spacing(.5),paddingInline:t.spacing(.3),paddingBlock:t.spacing(.3),height:"100%",minWidth:"100%",backgroundColor:o?"#eaf3fb":"#eeeeee",borderRadius:"56px",width:"fit-content",fontSize:"10px",color:t.palette.text.primary,position:"relative",zIndex:10})),ft=styled$1("div")(({theme:t,percentage:o,isCapture:e})=>({border:`0.6px ${[0,100].includes(o)?"solid":"dashed"} ${e?t.palette.info.dark:"#656565"}`,borderRadius:"80px",padding:t.spacing(.316),paddingLeft:t.spacing(.516),fontSize:"7px",fontWeight:t.typography.fontWeightBold,color:e?t.palette.info.dark:"#656565",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.5)})),xt=styled$1("div")(({percentage:t,isCapture:o,theme:e})=>({background:`conic-gradient(${o?e.palette.info.dark:"#656565"} ${t}%, transparent 0.00%)`,borderRadius:"50%",width:"8.333px",height:"8.333px",border:`0.6px solid ${o?e.palette.info.dark:"#656565"}`})),gt=styled$1("img")({width:"14px",height:"14px"}),j=styled$1(o)({width:"16px",height:"16px"}),N=styled$1("img")({width:"16px",height:"16px"}),Bo=styled$1(Box)({display:"flex",alignItems:"center",justifyContent:"center"});function It(t){return t<5?5:t===100?95:t}function Be({voidPercentage:t,capturePercentage:o,captureCount:e,autoType:r,captureAmount:l,voidAmount:p$1,currency:a,isTextShown:n,remainingAmount:d,isSheetViewShown:s,selectionProps:f={}}){let c=Number(o)+Number(t)===100||d<=0,g=yc(useId(),"capture-auto-icon"),T=useTheme$1(),{t:A}=useTranslation(),P=Ha(d||0),L=useCallback(C=>`Auto ${C} - ${a} ${P.integerAmount}.${P.decimalAmount}`,[a,P.decimalAmount,P.integerAmount]),J=useCallback(C=>{let X=C==="Capture"?l:p$1,{integerAmount:D,decimalAmount:v}=Ia(X,a);return `Partial ${C} - ${a} ${D}.${v}`},[l,p$1,a]),x=o>0?jsx(p,{title:J("Capture"),children:jsxs(ut,{isCapture:true,isFullyUsed:c,whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:T.shadows[4]}},children:[jsx(gt,{src:ub,alt:"captured"}),jsxs(motion.div,{style:{display:"none",alignItems:"center",justifyContent:"center",gap:"4px"},initial:{width:0,opacity:0},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto",display:"flex"},fadeIn:{transition:{delay:.5},opacity:1}},children:[jsxs(ft,{isCapture:true,percentage:o,children:[o,"% ",jsx(xt,{isCapture:true,percentage:It(o)})]}),e>1&&jsxs(z,{compact:true,color:"dark",children:[e,"x"]})]})]})}):r==="CAPTURED"&&!c?jsx(p,{title:L("Capture"),children:jsx(j,{children:jsx(N,{src:tt.CAPTURED?.icon,alt:"auto"})})}):jsx(p,{title:L("Capture"),children:jsx(j,{children:jsx(N,{src:tt.CAPTURED?.icon,alt:"auto"})})}),I=o===100?jsx(p,{title:A("captured"),children:jsx(Bo,{children:jsx(N,{src:kk,alt:"captured"})})}):x,W=useMemo(()=>s&&I?jsx(b,{chipIndex:4,copyText:A("captured"),selectionProps:f,children:A("captured")}):n&&I?jsx(k,{children:A("captured")}):I,[n,I,s,f]);return W&&jsx("div",{id:g,"data-testid":"CaptureAutoIcon",style:{zIndex:12},children:W})}var Do=Be;function Ve({voidPercentage:t,capturePercentage:o,voidCount:e,autoType:r,captureAmount:l$1,voidAmount:p$1,currency:a,isTextShown:n,isSheetViewShown:d,selectionProps:s={},remainingAmount:f}){let c=Number(o)+Number(t)===100||f<=0,g=yc(useId(),"void-auto-icon"),T=useTheme$1(),{t:A}=useTranslation(),P=Ha(f||0),L=useCallback(C=>`Auto ${C} - ${a} ${P.integerAmount}.${P.decimalAmount}`,[a,P.decimalAmount,P.integerAmount]),J=useCallback(C=>{let X=C==="Capture"?l$1:p$1,{integerAmount:D,decimalAmount:v}=Ia(X,a);return `Partial ${C} - ${a} ${D}.${v}`},[l$1,p$1,a]),x=t>0||p$1?jsx(p,{title:J("Void"),children:jsxs(ut,{isFullyUsed:c,whileHover:["animate","fadeIn"],animate:"start",sx:{zIndex:14,background:T.palette.common.white,border:`0.75px solid ${T.palette.grey[600]}1A`},variants:{animate:{boxShadow:T.shadows[4]}},children:[jsx(gt,{src:Bk,alt:"void"}),jsxs(motion.div,{style:{display:"none",alignItems:"center",justifyContent:"center",gap:"4px"},initial:{width:0,opacity:0},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto",display:"flex"},fadeIn:{transition:{delay:.5},opacity:1}},children:[jsxs(ft,{percentage:t,children:[t,"% ",jsx(xt,{percentage:It(t)})]}),e>0&&jsxs(z,{compact:true,color:"neutral",children:[e,"x"]})]})]})}):r==="VOID"&&!c?jsx(p,{title:L("Void"),children:jsx(j,{children:jsx(N,{src:tt.VOID?.icon,alt:"auto"})})}):null,I=t===100?jsx(p,{title:A("void"),children:jsx(j,{children:jsx(N,{src:Bk,alt:"void"})})}):x,W=useMemo(()=>d&&I?jsx(b,{chipIndex:5,copyText:A("void"),selectionProps:s,children:A("void")}):n&&I?jsx(l,{children:A("void")}):I,[n,I,d,s]);return W?jsx("div",{id:g,"data-testid":"VoidAutoIcon",style:{...!d&&{zIndex:11}},children:W}):null}var $o=Ve;var Me=Do;var Fe=({authorizedStatus:t,isTextShown:o,iconStyles:e,tableMode:r,chipIndex:l=0,selectionProps:p$1={}})=>{let{t:a}=useTranslation(),n=useTheme$1(),d=a(_(t));return Va(r)?jsx(b,{copyText:d,chipIndex:l,selectionProps:p$1,children:d}):jsx(p,{title:d,children:o?jsx(j$1,{"data-testid":"StatusCell_AuthorizedStatusLabel",sx:{color:n.palette.info.dark},children:d}):jsx(a$1,{src:f[t],alt:"authorized-icon","data-testid":"StatusCell_AuthorizedStatusIcon",sx:e})})};var _o=styled$1(motion.span)(({theme:t})=>({color:t.palette.common.white,display:"block",fontWeight:t.typography.fontWeightBold,fontSize:"9.78px",borderRadius:"4px",paddingInline:t.spacing(.45)})),Vo=styled$1(motion.span)(()=>({display:"block",width:"0",overflow:"hidden"})),Bt=styled$1("img")(()=>({width:"10px",height:"10px"})),Lt=styled$1(motion.span)(({theme:t})=>({width:"18px",height:"18px",borderRadius:"50%",backgroundColor:t.palette.background.paper,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,position:"relative"})),Dt=styled$1(motion.div,{shouldForwardProp:t=>t!=="isVisible"})(({isVisible:t})=>({display:"flex",justifyContent:"center",alignItems:"center",gap:"4px",width:"0",overflow:"hidden",opacity:0,...!t&&{padding:"0 !important"}})),Mo=styled$1(motion.div)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start"})),zo=styled$1(motion.span)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minHeight:"24px",cursor:"pointer",borderRadius:"16px"})),No={delay:.2,ease:"easeIn",fadeIn:{duration:.2}},Go={animate:{width:"auto",paddingRight:"4px",paddingLeft:"4px"},fadeIn:{opacity:1,transition:{delay:.7}}},Fo={animate:{width:"auto"},fadeIn:{opacity:1,transition:{delay:1}}},Uo={animate:{width:"auto",paddingRight:"8px",paddingLeft:"4px"}},Et={fadeIn:{duration:.3},animate:{duration:.1}},Oo={fadeIn:{opacity:1}},jo=styled$1(j$1)(()=>({width:"88px",height:"100%"})),$t=styled$1(Box)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.25),height:"100%"}));function qe({chargeStatus:t,gatewayTooltip:o$1,acquirerTooltip:e,chargeTooltip:r,errorCode:l,isTextShown:p$2,gatewayCode:a,acquirerCode:n,unCapturedStyles:d,iconStyles:s$1,iconWrapperStyles:f,gatewayIconWrapperStyles:c,gatewayContainerStyles:g$1,gateWayIconStyles:T,showBadge:A=true,isSheetViewShown:P=false,selectionProps:L={},chipIndex:J=0}){let x=t?b$1[t]:null,I=t?g[t]:null,W=useTheme$1(),{t:C}=useTranslation(),X=yc(useId(),"charge-status-icon"),D=r&&jsx(Fragment,{children:jsx("div",{children:r})}),v=e&&jsxs(Fragment,{children:[jsx("div",{children:"Acquirer"}),jsx("div",{children:e})]}),Y=o$1&&jsxs(Fragment,{children:[jsx("div",{children:"Gateway"}),jsx("div",{children:o$1})]}),Ft=t&&a$2[t]&&jsx("div",{"data-testid":"ChargeStatusIcon_ChargeIcon",style:{display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",borderRadius:x?"50%":"",...f},children:jsx(p$1,{src:a$2[t],alt:"charge-icon","data-testid":"ChargeStatusIcon_StatusIcon",style:{borderRadius:x?"50%":"",width:"16px",height:"16px",...s$1}})});return P?jsxs($t,{children:[jsxs(b,{copyText:C(_(t)),chipIndex:J,selectionProps:L,children:[C(_(t))," ",l]}),x&&jsxs(Fragment,{children:[a&&jsxs(b,{copyText:"Gateway",chipIndex:1,selectionProps:L,children:["Gateway ",a]}),n&&jsxs(b,{copyText:"Acquirer",chipIndex:2,selectionProps:L,children:["Acquirer ",n]})]})]}):p$2?jsxs($t,{children:[jsx(p,{title:D,children:jsxs(jo,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":_(t),sx:{background:x?.background||I?.background||"transparent",color:x?.color||I?.color||W.palette.info.dark,borderColor:`${x?.color||I?.color||W.palette.info.dark}1A`},children:[C(_(t))," ",l]})}),x&&jsxs(Fragment,{children:[a&&jsx(p,{title:Y,children:jsxs(j$1,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":_(t),sx:{background:x?.background||I?.background||"transparent",color:x?.color||I?.color||W.palette.info.dark},children:["Gateway ",a]})}),n&&jsx(p,{title:v,children:jsxs(j$1,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":_(t),sx:{background:x?.background||I?.background||"transparent",color:x?.color||I?.color||W.palette.info.dark},children:["Acquirer ",n]})})]})]}):jsx(o,{id:X,"data-testid":"ChargeStatusIcon_StatusIconWrapper",style:{...f},children:s?.includes(t||"")&&(D||v||Y)?jsxs(zo,{"data-testid":"ChargeStatusIcon_UnCapturedContainer",whileHover:["animate","fadeIn"],style:{left:"0",...A&&{paddingInline:"12px",border:"1px solid #F2F2F2",borderRadius:"12px",backgroundColor:"#fff"},...d},children:[jsx(Mo,{"data-testid":"ChargeStatusIcon_UnCapturedBadge",sx:{borderRadius:"56px"},initial:{background:"transparent"},variants:{animate:{background:x?.background}},children:jsx(p,{title:D??C(_(t)),children:jsxs(Fragment,{children:[Ft,jsx(Vo,{"data-testid":"ChargeStatusIcon_ErrorCodeWrapper",transition:{animate:{duration:.05}},variants:Uo,style:{...l&&{padding:"0 !important"}},children:jsx(_o,{"data-testid":"ChargeStatusIcon_ErrorCodeLabel",sx:{background:x?.color},transition:No,variants:Oo,initial:{opacity:0},children:l})})]})})}),jsx(Dt,{"data-testid":"ChargeStatusIcon_GatewaysContainer",transition:Et,variants:Go,style:g$1,isVisible:!!Y,children:Y&&jsx(p,{title:Y,children:jsx(Lt,{"data-testid":"ChargeStatusIcon_GatewayIconWrapper",style:{background:x?.background,...c},children:jsx(Bt,{src:x?.gatewayIcon,alt:"gateway-icon","data-testid":"ChargeStatusIcon_GatewayIcon",style:T})})})}),jsx(Dt,{"data-testid":"ChargeStatusIcon_GatewaysContainer",transition:Et,variants:Fo,style:g$1,isVisible:!!v,children:v&&jsx(p,{title:v,children:jsx(Lt,{"data-testid":"ChargeStatusIcon_AcquirerIconWrapper",style:{background:x?.background,...c},children:jsx(Bt,{src:x?.acquirerIcon,alt:"acquirer-icon","data-testid":"ChargeStatusIcon_AcquirerIcon",style:T})})})})]}):jsx(p,{title:D??C(_(t)),children:jsx(o,{children:Ft})})})}var Xe=()=>{let{t}=useTranslation(),o=yc(useId(),"customer-initiated-icon");return jsx(p,{title:t("merchantInitiated"),children:jsx("img",{id:o,"data-testid":"merchantInitiatedIcon",src:vb,alt:"merchant",style:{width:"16px",height:"16px"}})})};var Ye={G:"Global",R:"Regional",L:"Local"},ot=({geographyVariant:t,countryCode:o,isTextShown:e})=>{let r=t?Ye[t]:void 0,l=r||o?`${r||""} ${r&&o?"-":""} ${o?`Country - ${o}`:""}`:void 0;return e||!o?null:jsx(p,{title:l,children:jsx(a$3,{countryCode:o})})};var tr=({geographyVariant:t,isTextShown:o,deviceCountry:e,deviceType:r,tableMode:l})=>{let p=yc(useId(),"device-icon-chip");return jsxs(Qe,{id:p,"data-testid":"DeviceIconChip",sx:{display:"flex",gap:"8px",alignItems:"center",...Va(l)&&{height:"18px"}},children:[jsx(ot,{geographyVariant:t,isTextShown:o,countryCode:e}),jsx(c,{type:r,isTextShown:o,tableMode:l})]})};var rr=({isDisputeOpen:t,iconStyles:o})=>{let e=yc(useId(),"dispute-icon");return jsx(p$1,{id:e,"data-testid":"StatusCell_DisputeStatusIcon",sx:{width:"13.5px",height:"13.5px"},src:t?wa:va,alt:"dispute-icon",style:o})};var Xo=styled$1(Qe,{shouldForwardProp:t=>t!=="tableMode"})(({theme:t,tableMode:o})=>({display:"flex",gap:t.spacing(.5),...Va(o)&&{height:"18px"},alignItems:"center"})),Yo=styled$1("span")(({theme:t})=>({fontSize:"10px",fontWeight:500,color:t.palette.text.primary}));function Vt({countryCode:t,isTextShown:o,cardNumber:e,bankName:r,tableMode:l}){let p$1=yc(useId(),"issuer-icon"),a=e?.slice(0,4),n=e?.slice(-4);return jsxs(Xo,{id:p$1,"data-testid":"IssuerIcon",tableMode:l,children:[t&&jsx(ot,{countryCode:t,isTextShown:o}),jsx(p,{title:`${r?`Issuer - ${r}`:""}`,children:jsx(Yo,{children:`${a||""} ${n||""}`})})]})}var sr=Vt;styled(motion.div)(({theme:t,background:o})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.5),paddingInline:t.spacing(.75),paddingBlock:t.spacing(.5),backgroundColor:o,height:"24px",width:"fit-content",borderRadius:"24px",fontSize:"10px",color:t.palette.text.primary}));var Ra=styled("img")(()=>({height:"13.125px",width:"12px"})),bt=styled("div")(()=>({fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"center",width:"65px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"4.5px 8px",borderRadius:"24px"})),ka=styled("div")(({theme:t})=>({color:t.palette.common.white,background:t.palette.error.main,fontSize:"0.6rem",fontWeight:600,borderRadius:"16px",padding:"2px 8px",display:"flex",alignItems:"center",justifyContent:"center"})),Ba=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px"}));var ur=({payoutStatus:t="PENDING",isTextShown:o,payoutTooltip:e$1,iconStyles:r,isSheetViewShown:l,chipIndex:p$2=0,selectionProps:a={}})=>{let{t:n}=useTranslation(),d=yc(useId(),"payout-icon"),s=n(_(t)),f=e$1||s;return l?jsx(b,{chipIndex:p$2,copyText:s,selectionProps:a,children:s}):jsx(p,{title:f,children:o?jsx(bt,{id:d,"data-testid":"StatusCell_PayoutStatusLabel",children:s}):jsx(p$1,{id:d,src:e[t],alt:"settled-icon","data-testid":"StatusCell_PayoutStatusIcon",style:r})})};var Qo=styled$1(motion.img)(()=>({width:"14px",height:"14px"})),Zo=styled$1(motion.span)(({theme:t})=>({color:t.palette.common.white,borderRadius:t.spacing(.5),height:"12px",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"9.782px",fontWeight:600,backgroundColor:t.palette.secondary.main})),Mt=styled$1(motion.div)(({theme:t})=>({height:"16px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:`${t.palette.secondary.main}1A`,paddingInline:t.spacing(.5),borderRadius:"56px"})),qa=(t,o,e)=>({start:{x:t*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:e?t*e:t*49,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:o}}),Ka=styled$1(motion.span)(({isTextShown:t,theme:o})=>({border:`1px solid ${o.palette.divider}`,borderRadius:"12px",backgroundColor:o.palette.background.paper,height:"24px",display:"flex",alignItems:"center",justifyContent:"center",minWidth:t?"auto":"36px",...t&&{border:"none"}})),Ja=styled$1(motion.div,{shouldForwardProp:t=>t!=="order"})(({order:t=0})=>({display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:0,left:0,zIndex:t+6,width:"fit-content",height:"24px",cursor:"pointer",borderRadius:"16px","&:hover":{zIndex:200}})),Xa=styled$1(motion.div,{shouldForwardProp:t=>t!=="statusesCount"})(({statusesCount:t=1})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"relative",minWidth:`${t*6+36}px`,height:"24px",cursor:"pointer",borderRadius:"16px",overflow:"visible"})),Ya=styled$1("div")(()=>({display:"flex",gap:"4px",justifyContent:"flex-start",alignItems:"center",position:"relative",width:"100%",overflow:"visible"}));var hr=({isTextShown:t,refundStatus:o="PENDING",refundTooltip:e="",refundCount:r,iconStyles:l,isSheetViewShown:p$2,chipIndex:a=0,selectionProps:n={}})=>{let{t:d$1}=useTranslation(),s=useTheme$1(),f=yc(useId(),"refund-icon"),c=(r||0)>1,g=d$1(_(o));if(p$2)return jsxs(b,{chipIndex:a,selectionProps:n,copyText:g,children:[g," ",c?`${r}x`:null]});let T=jsxs(Zo,{"data-testid":"StatusCell_RefundsCountBadge",initial:{width:0,opacity:0,padding:"0px"},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto",display:"flex",padding:"1.285px 2.569px"},fadeIn:{transition:{delay:.5},opacity:1}},children:[r,"x"]});return t?jsx(p,{title:jsx("div",{children:jsx("div",{children:e})}),children:jsx(bt,{id:f,"data-testid":"StatusCell_RefundStatusLabel",sx:{color:d[o].color,backgroundColor:d[o].backgroundColor,width:"90px"},children:jsxs(Mt,{whileInView:c?["animate","fadeIn"]:void 0,variants:{animate:{boxShadow:s.shadows[4],gap:s.spacing(.5)}},children:[g," ",c?T:null]})})}):jsx(p,{title:jsx("div",{children:jsx("div",{children:e})}),children:c?jsxs(Mt,{id:f,whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:s.shadows[4],gap:s.spacing(.5)}},children:[jsx(Qo,{src:tk,alt:"multi-refunded-icon","data-testid":"StatusCell_MultiRefundIcon"}),T]}):jsx(p$1,{id:f,src:c$1[o],alt:"refunded-icon","data-testid":"StatusCell_RefundStatusIcon",style:l})})},te=hr;var Cr=te;var yr={american_express:"AMEX",debit:"card",credit:"card",unionpay:"UnionPay",jaywan:"JAYWAN"},B=t=>yr[t?.toLowerCase()||""]||t;styled("span")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(1)}));var oe=styled("img")(()=>({maxWidth:"24px",maxHeight:"16px"}));styled(motion.span,{shouldForwardProp:t=>t!=="sourcesCount"})(({theme:t,sourcesCount:o})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${o*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:t.palette.background.paper,borderRadius:"16px"}));var ee=styled("span")(({theme:t})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:t.palette.text.primary})),re=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px",textAlign:"center",width:"100%"}));styled("span")(({theme:t})=>({position:"absolute",left:0,zIndex:6,border:`1px solid ${t.palette.divider}`,borderRadius:"12px",backgroundColor:t.palette.background.paper,width:"36px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"}));var ne=styled("span")(({theme:t})=>({fontSize:"10px",fontWeight:500,color:t.palette.text.primary}));function At({source:t,isTextShown:o,title:e,width:r,height:l,imgSx:p$1}){let{t:a}=useTranslation(),n=h(t);return jsx(p,{title:e,children:o?jsx(re,{"data-testid":"SourceCell_BadgeTextWrapper",children:jsx(ee,{"data-testid":"SourceCell_TextLabel","data-source":t,children:a(_(t))})}):jsx(oe,{src:n,alt:t,width:r,height:l,onError:d=>{d.currentTarget.src=h("card");},sx:p$1})})}function vr({payment:t,card:o,isTextShown:e,firstIcon:r}){let l=yc(useId(),"source-icons"),{t:p}=useTranslation(),a=useCallback(()=>{let s=[],f=bc(t),c=t?.method,g=t?.scheme;return B(c)?.toLowerCase()===B(g)?.toLowerCase()?s.push(B(c),B(f)):s.push(B(c),B(f),B(g)),s},[t]),n=useMemo(()=>jsx(At,{source:r,isTextShown:e,title:p(_(r))},r),[r,e,p]),d=useMemo(()=>a()?.filter(s=>!!s&&s!==r)?.map((s,f,c)=>{let g=t?.wallet===p("sv_wallet")?p("storedValueWallet"):p("passThruWallet"),T=f===c.length-1&&o?.last_four?`${p(_(s))} - ${o?.last_four}`:p(_(s));return jsx(At,{source:s,isTextShown:e,title:f===0&&s==="Wallet"?g:T},`${s}-${f}`)}),[a,t,o,e,p,r]);return jsxs(Box,{id:l,"data-testid":"SourceIcons",display:"flex",alignItems:"center",gap:.5,children:[r&&n,d,o?.last_four&&jsxs(ne,{children:["\xB7\xB7\xB7 ",o?.last_four]})]})}var rt={PROCESSED:Vg,FAILED:""};var se=styled("span")(({theme:t})=>({fontSize:"11px",padding:"2px 0",color:t.palette.text.primary})),le=styled("img")(()=>({width:"16px",height:"16px"})),de=styled("span")(()=>({width:"24px",height:"24px",borderRadius:"50%",backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}));function ce({status:t,isTextShown:o,isSheetViewShown:e,chipIndex:r=0,selectionProps:l={}}){let p$1=useTheme(),{t:a}=useTranslation(),n=yc(useId(),"destination-icon"),d=a(_(t));return e&&rt[t]?jsx(b,{copyText:d,chipIndex:r,selectionProps:l,children:d}):o&&rt[t]?jsx(se,{id:n,"data-testid":"ChargeStatusIcon_isTextShown","data-status":_(t),sx:{background:"#1F88D00D",color:t==="PROCESSED"?p$1.palette.info.dark:p$1.palette.common.black},children:d}):jsx(de,{id:n,"data-testid":"DestinationIcon",className:"destination-status",children:t&&rt[t]&&jsx(p,{title:a(_(t)),children:jsx(le,{src:rt[t],alt:"destination-icon"})})})}export{qa as a,Ka as b,Ja as c,Xa as d,Ya as e,Ce as f,Se as g,Te as h,$o as i,Me as j,Fe as k,qe as l,Xe as m,ot as n,tr as o,rr as p,sr as q,Ra as r,ka as s,Ba as t,ur as u,Cr as v,B as w,At as x,vr as y,ce as z};
|
|
1
|
+
import {f,b as b$1,g,a as a$2,e,d,c as c$1}from'./chunk-GB5N3AEY.js';import {a as a$4}from'./chunk-R25W3CPM.js';import {a as a$1}from'./chunk-MXXAZH6N.js';import {c}from'./chunk-BSXGYGFB.js';import {a}from'./chunk-ZONDSLTR.js';import {o,j as j$1,k,l,p as p$1}from'./chunk-IEVFY2WC.js';import {a as a$3}from'./chunk-SUBIH236.js';import {p,z}from'./chunk-MCX337WI.js';import {b}from'./chunk-UYDM5BBG.js';import {Va,yc,Ha,Ia,bc,f as f$1}from'./chunk-W6W4YZ7G.js';import {s}from'./chunk-N372QRVU.js';import {U,zi,Bi,Ai,yi,Fi,dh,Wg,ch,Sj,Tj,ub,hk,kk,Bk,ik,vb,wa,va,tk,h,Vg}from'./chunk-3YAJNHQC.js';import {useId,useMemo,useCallback}from'react';import {useTranslation}from'react-i18next';import {styled,Box,useTheme}from'@mui/material';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {motion}from'framer-motion';import {styled as styled$1,useTheme as useTheme$1}from'@mui/material/styles';import _ from'lodash/camelCase';import Qe from'@mui/material/Box';var lt={ORDER:{label:"order",icon:yi,color:"#5E30EB"},SAVED_CARD:{label:"cardAgreement",icon:Ai,color:"#76BB40"},SUBSCRIPTION:{label:"subscription",icon:Bi,color:"#00C7BE"},INSTALLMENT:{label:"installment",icon:zi,color:"#32ADE6"}},dt={SAVED_TOKEN:{label:"savedToken",icon:U,color:"#76BB40"},COUNT:{label:"countBadge",icon:"countBadge",color:"#76BB40"}};styled("span")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.5)}));styled("img")(()=>({width:"35px",height:"16px",display:"block"}));styled("span")(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"14.67px",height:"10px"}));styled("img")(()=>({maxWidth:"100%",width:"100%"}));var ct=styled("span")(({theme:t})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:t.palette.text.primary})),mt=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px"}));function Ie({type:t,hasSavedCard:o,totalPaymentsCount:e,isTextShown:r}){let l=yc(useId(),"agreement-icon"),p$1=useTheme(),{t:a$2}=useTranslation(),n=useMemo(()=>[...o?[dt.SAVED_TOKEN]:[],...(e||0)>0?[dt.COUNT]:[],...t&<[t]?[lt[t]]:[]],[o,e,t]),d=c=>r?jsx(a,{"data-testid":"AgreementCell_countBadge",children:jsx(p,{title:a$2("totalPaymentCount",{amount:f$1(e)}),children:jsx(mt,{children:jsxs(ct,{"data-testid":"AgreementCell_totalPaymentsCount",sx:{color:dt.COUNT.color},children:["x",e]})})})},c):jsx(a$4,{value:e,index:c},c),s=n.map((c,g)=>c.label==="countBadge"?d(g):jsx(p,{title:a$2(c.label),children:jsx(a,{children:r?jsx(mt,{children:jsx(ct,{"data-testid":"AgreementCell_agreementType",sx:{color:c.color},children:a$2(c.label)})}):jsx(a$1,{sx:{maxWidth:"16px",maxHeight:"16px",height:"auto",width:"auto"},src:c.icon,alt:"agreement"})},c.color)},c.color)),f=jsx(p,{title:"No agreement",children:jsx(a,{children:r?jsx(mt,{children:jsx(ct,{"data-testid":"AgreementCell_agreementType",sx:{color:p$1.palette.text.secondary},children:"No agreement"})}):jsx(a$1,{sx:{maxWidth:"24px",maxHeight:"24px",height:"auto",width:"auto"},src:Fi,alt:"agreement"})},"no-agreement")},"no-agreement");return jsx(Box,{id:l,"data-testid":"AgreementIcon",sx:{display:"flex",alignItems:"center",gap:"4px"},children:s?.length>0?s:f})}var To=Ie;var Ce=To;styled("span")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(1)}));styled("img")(()=>({maxWidth:"36px",maxHeight:"24px"}));styled(motion.span,{shouldForwardProp:t=>t!=="sourcesCount"})(({theme:t,sourcesCount:o})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${o*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:t.palette.background.paper,borderRadius:"16px"}));var Ao=styled("span")(({theme:t})=>({fontSize:"11px",padding:"2px 0",color:t.palette.text.primary})),Po=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"4px",textAlign:"center",width:"100%"}));styled("span")(({theme:t})=>({position:"absolute",left:0,zIndex:6,border:`1px solid ${t.palette.divider}`,borderRadius:"12px",backgroundColor:t.palette.background.paper,width:"36px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"}));styled(motion.div)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(1)}));var Wo=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px"}));var kt={"3DS":{tooltip:"3DS",icon:Tj,borderColor:"rgba(31, 136, 208, 0.10)"},"Device Biometric":{tooltip:"Biometric",icon:Sj,borderColor:"rgba(31, 136, 208, 0.10)"},"Non-3DS":{tooltip:"Non 3DS",icon:ch,borderColor:"rgba(31, 136, 208, 0.10)"}},vo={FAILED:{tooltip:"Failed",icon:Wg,borderColor:"rgba(255, 61, 0, 0.10)"},REJECTED:{tooltip:"Rejected",icon:dh,borderColor:"rgba(255, 61, 0, 0.10)"}};function be({transactionStatus:t,eci:o,authType:e,isTextShown:r}){let l=yc(useId(),"auth-icons"),p$1=useMemo(()=>{let n=t?vo[t]:null,d=n?.tooltip,s=t==="AUTHENTICATED"?null:n?.icon;return [{tooltip:d,content:r?d:s,type:r?"text":"icon"},...e?[{tooltip:e,content:r?kt[e]?.tooltip:kt[e]?.icon,type:r?"text":"icon"}]:[],{tooltip:"",content:o?`ECI ${o}`:"",type:"text"}]},[t,r,e,o]),a=useMemo(()=>p$1.filter(n=>!!n.content).map((n,d)=>{let s=n.type==="text"?jsx(Po,{"data-testid":"AuthenticationCell_BadgeTextWrapper",children:jsx(Ao,{sx:{border:"none"},"data-testid":"AuthenticationCell_TextLabel","data-source":n.content,children:n.content})}):jsx(a$1,{sx:{width:"16px",height:"16px"},src:n.content,alt:n.tooltip});return jsx(p,{title:n.tooltip,children:s},`${n.tooltip}-${d}`)}),[p$1]);return jsx(Wo,{id:l,"data-testid":"AuthIcons",children:a})}var ko=be;var Se=(t,o,e)=>({start:{x:t*6,transition:{duration:.3,type:"tween",ease:"easeIn"},...t>0&&{opacity:0}},animate:{x:e?t*e:t*39,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:o,...t>0&&{opacity:1}}});var Te=ko;var tt={VOID:{icon:ik},CAPTURED:{icon:hk}};var ut=styled$1(motion.div)(({theme:t,isCapture:o})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:t.spacing(.5),paddingInline:t.spacing(.3),paddingBlock:t.spacing(.3),height:"100%",minWidth:"100%",backgroundColor:o?"#eaf3fb":"#eeeeee",borderRadius:"56px",width:"fit-content",fontSize:"10px",color:t.palette.text.primary,position:"relative",zIndex:10})),ft=styled$1("div")(({theme:t,percentage:o,isCapture:e})=>({border:`0.6px ${[0,100].includes(o)?"solid":"dashed"} ${e?t.palette.info.dark:"#656565"}`,borderRadius:"80px",padding:t.spacing(.316),paddingLeft:t.spacing(.516),fontSize:"7px",fontWeight:t.typography.fontWeightBold,color:e?t.palette.info.dark:"#656565",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.5)})),xt=styled$1("div")(({percentage:t,isCapture:o,theme:e})=>({background:`conic-gradient(${o?e.palette.info.dark:"#656565"} ${t}%, transparent 0.00%)`,borderRadius:"50%",width:"8.333px",height:"8.333px",border:`0.6px solid ${o?e.palette.info.dark:"#656565"}`})),gt=styled$1("img")({width:"14px",height:"14px"}),j=styled$1(o)({width:"16px",height:"16px"}),N=styled$1("img")({width:"16px",height:"16px"}),Bo=styled$1(Box)({display:"flex",alignItems:"center",justifyContent:"center"});function It(t){return t<5?5:t===100?95:t}function Be({voidPercentage:t,capturePercentage:o,captureCount:e,autoType:r,captureAmount:l,voidAmount:p$1,currency:a,isTextShown:n,remainingAmount:d,isSheetViewShown:s,selectionProps:f={}}){let c=Number(o)+Number(t)===100||d<=0,g=yc(useId(),"capture-auto-icon"),T=useTheme$1(),{t:A}=useTranslation(),P=Ha(d||0),L=useCallback(C=>`Auto ${C} - ${a} ${P.integerAmount}.${P.decimalAmount}`,[a,P.decimalAmount,P.integerAmount]),J=useCallback(C=>{let X=C==="Capture"?l:p$1,{integerAmount:D,decimalAmount:v}=Ia(X,a);return `Partial ${C} - ${a} ${D}.${v}`},[l,p$1,a]),x=o>0?jsx(p,{title:J("Capture"),children:jsxs(ut,{isCapture:true,isFullyUsed:c,whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:T.shadows[4]}},children:[jsx(gt,{src:ub,alt:"captured"}),jsxs(motion.div,{style:{display:"none",alignItems:"center",justifyContent:"center",gap:"4px"},initial:{width:0,opacity:0},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto",display:"flex"},fadeIn:{transition:{delay:.5},opacity:1}},children:[jsxs(ft,{isCapture:true,percentage:o,children:[o,"% ",jsx(xt,{isCapture:true,percentage:It(o)})]}),e>1&&jsxs(z,{compact:true,color:"dark",children:[e,"x"]})]})]})}):r==="CAPTURED"&&!c?jsx(p,{title:L("Capture"),children:jsx(j,{children:jsx(N,{src:tt.CAPTURED?.icon,alt:"auto"})})}):jsx(p,{title:L("Capture"),children:jsx(j,{children:jsx(N,{src:tt.CAPTURED?.icon,alt:"auto"})})}),I=o===100?jsx(p,{title:A("captured"),children:jsx(Bo,{children:jsx(N,{src:kk,alt:"captured"})})}):x,W=useMemo(()=>s&&I?jsx(b,{chipIndex:4,copyText:A("captured"),selectionProps:f,children:A("captured")}):n&&I?jsx(k,{children:A("captured")}):I,[n,I,s,f]);return W&&jsx("div",{id:g,"data-testid":"CaptureAutoIcon",style:{zIndex:12},children:W})}var Do=Be;function Ve({voidPercentage:t,capturePercentage:o,voidCount:e,autoType:r,captureAmount:l$1,voidAmount:p$1,currency:a,isTextShown:n,isSheetViewShown:d,selectionProps:s={},remainingAmount:f}){let c=Number(o)+Number(t)===100||f<=0,g=yc(useId(),"void-auto-icon"),T=useTheme$1(),{t:A}=useTranslation(),P=Ha(f||0),L=useCallback(C=>`Auto ${C} - ${a} ${P.integerAmount}.${P.decimalAmount}`,[a,P.decimalAmount,P.integerAmount]),J=useCallback(C=>{let X=C==="Capture"?l$1:p$1,{integerAmount:D,decimalAmount:v}=Ia(X,a);return `Partial ${C} - ${a} ${D}.${v}`},[l$1,p$1,a]),x=t>0||p$1?jsx(p,{title:J("Void"),children:jsxs(ut,{isFullyUsed:c,whileHover:["animate","fadeIn"],animate:"start",sx:{zIndex:14,background:T.palette.common.white,border:`0.75px solid ${T.palette.grey[600]}1A`},variants:{animate:{boxShadow:T.shadows[4]}},children:[jsx(gt,{src:Bk,alt:"void"}),jsxs(motion.div,{style:{display:"none",alignItems:"center",justifyContent:"center",gap:"4px"},initial:{width:0,opacity:0},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto",display:"flex"},fadeIn:{transition:{delay:.5},opacity:1}},children:[jsxs(ft,{percentage:t,children:[t,"% ",jsx(xt,{percentage:It(t)})]}),e>0&&jsxs(z,{compact:true,color:"neutral",children:[e,"x"]})]})]})}):r==="VOID"&&!c?jsx(p,{title:L("Void"),children:jsx(j,{children:jsx(N,{src:tt.VOID?.icon,alt:"auto"})})}):null,I=t===100?jsx(p,{title:A("void"),children:jsx(j,{children:jsx(N,{src:Bk,alt:"void"})})}):x,W=useMemo(()=>d&&I?jsx(b,{chipIndex:5,copyText:A("void"),selectionProps:s,children:A("void")}):n&&I?jsx(l,{children:A("void")}):I,[n,I,d,s]);return W?jsx("div",{id:g,"data-testid":"VoidAutoIcon",style:{...!d&&{zIndex:11}},children:W}):null}var $o=Ve;var Me=Do;var Fe=({authorizedStatus:t,isTextShown:o,iconStyles:e,tableMode:r,chipIndex:l=0,selectionProps:p$1={}})=>{let{t:a}=useTranslation(),n=useTheme$1(),d=a(_(t));return Va(r)?jsx(b,{copyText:d,chipIndex:l,selectionProps:p$1,children:d}):jsx(p,{title:d,children:o?jsx(j$1,{"data-testid":"StatusCell_AuthorizedStatusLabel",sx:{color:n.palette.info.dark},children:d}):jsx(a$1,{src:f[t],alt:"authorized-icon","data-testid":"StatusCell_AuthorizedStatusIcon",sx:e})})};var _o=styled$1(motion.span)(({theme:t})=>({color:t.palette.common.white,display:"block",fontWeight:t.typography.fontWeightBold,fontSize:"9.78px",borderRadius:"4px",paddingInline:t.spacing(.45)})),Vo=styled$1(motion.span)(()=>({display:"block",width:"0",overflow:"hidden"})),Bt=styled$1("img")(()=>({width:"10px",height:"10px"})),Lt=styled$1(motion.span)(({theme:t})=>({width:"18px",height:"18px",borderRadius:"50%",backgroundColor:t.palette.background.paper,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,position:"relative"})),Dt=styled$1(motion.div,{shouldForwardProp:t=>t!=="isVisible"})(({isVisible:t})=>({display:"flex",justifyContent:"center",alignItems:"center",gap:"4px",width:"0",overflow:"hidden",opacity:0,...!t&&{padding:"0 !important"}})),Mo=styled$1(motion.div)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start"})),zo=styled$1(motion.span)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minHeight:"24px",cursor:"pointer",borderRadius:"16px"})),No={delay:.2,ease:"easeIn",fadeIn:{duration:.2}},Go={animate:{width:"auto",paddingRight:"4px",paddingLeft:"4px"},fadeIn:{opacity:1,transition:{delay:.7}}},Fo={animate:{width:"auto"},fadeIn:{opacity:1,transition:{delay:1}}},Uo={animate:{width:"auto",paddingRight:"8px",paddingLeft:"4px"}},Et={fadeIn:{duration:.3},animate:{duration:.1}},Oo={fadeIn:{opacity:1}},jo=styled$1(j$1)(()=>({width:"88px",height:"100%"})),$t=styled$1(Box)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.25),height:"100%"}));function qe({chargeStatus:t,gatewayTooltip:o$1,acquirerTooltip:e,chargeTooltip:r,errorCode:l,isTextShown:p$2,gatewayCode:a,acquirerCode:n,unCapturedStyles:d,iconStyles:s$1,iconWrapperStyles:f,gatewayIconWrapperStyles:c,gatewayContainerStyles:g$1,gateWayIconStyles:T,showBadge:A=true,isSheetViewShown:P=false,selectionProps:L={},chipIndex:J=0}){let x=t?b$1[t]:null,I=t?g[t]:null,W=useTheme$1(),{t:C}=useTranslation(),X=yc(useId(),"charge-status-icon"),D=r&&jsx(Fragment,{children:jsx("div",{children:r})}),v=e&&jsxs(Fragment,{children:[jsx("div",{children:"Acquirer"}),jsx("div",{children:e})]}),Y=o$1&&jsxs(Fragment,{children:[jsx("div",{children:"Gateway"}),jsx("div",{children:o$1})]}),Ft=t&&a$2[t]&&jsx("div",{"data-testid":"ChargeStatusIcon_ChargeIcon",style:{display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",borderRadius:x?"50%":"",...f},children:jsx(p$1,{src:a$2[t],alt:"charge-icon","data-testid":"ChargeStatusIcon_StatusIcon",style:{borderRadius:x?"50%":"",width:"16px",height:"16px",...s$1}})});return P?jsxs($t,{children:[jsxs(b,{copyText:C(_(t)),chipIndex:J,selectionProps:L,children:[C(_(t))," ",l]}),x&&jsxs(Fragment,{children:[a&&jsxs(b,{copyText:"Gateway",chipIndex:1,selectionProps:L,children:["Gateway ",a]}),n&&jsxs(b,{copyText:"Acquirer",chipIndex:2,selectionProps:L,children:["Acquirer ",n]})]})]}):p$2?jsxs($t,{children:[jsx(p,{title:D,children:jsxs(jo,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":_(t),sx:{background:x?.background||I?.background||"transparent",color:x?.color||I?.color||W.palette.info.dark,borderColor:`${x?.color||I?.color||W.palette.info.dark}1A`},children:[C(_(t))," ",l]})}),x&&jsxs(Fragment,{children:[a&&jsx(p,{title:Y,children:jsxs(j$1,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":_(t),sx:{background:x?.background||I?.background||"transparent",color:x?.color||I?.color||W.palette.info.dark},children:["Gateway ",a]})}),n&&jsx(p,{title:v,children:jsxs(j$1,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":_(t),sx:{background:x?.background||I?.background||"transparent",color:x?.color||I?.color||W.palette.info.dark},children:["Acquirer ",n]})})]})]}):jsx(o,{id:X,"data-testid":"ChargeStatusIcon_StatusIconWrapper",style:{...f},children:s?.includes(t||"")&&(D||v||Y)?jsxs(zo,{"data-testid":"ChargeStatusIcon_UnCapturedContainer",whileHover:["animate","fadeIn"],style:{left:"0",...A&&{paddingInline:"12px",border:"1px solid #F2F2F2",borderRadius:"12px",backgroundColor:"#fff"},...d},children:[jsx(Mo,{"data-testid":"ChargeStatusIcon_UnCapturedBadge",sx:{borderRadius:"56px"},initial:{background:"transparent"},variants:{animate:{background:x?.background}},children:jsx(p,{title:D??C(_(t)),children:jsxs(Fragment,{children:[Ft,jsx(Vo,{"data-testid":"ChargeStatusIcon_ErrorCodeWrapper",transition:{animate:{duration:.05}},variants:Uo,style:{...l&&{padding:"0 !important"}},children:jsx(_o,{"data-testid":"ChargeStatusIcon_ErrorCodeLabel",sx:{background:x?.color},transition:No,variants:Oo,initial:{opacity:0},children:l})})]})})}),jsx(Dt,{"data-testid":"ChargeStatusIcon_GatewaysContainer",transition:Et,variants:Go,style:g$1,isVisible:!!Y,children:Y&&jsx(p,{title:Y,children:jsx(Lt,{"data-testid":"ChargeStatusIcon_GatewayIconWrapper",style:{background:x?.background,...c},children:jsx(Bt,{src:x?.gatewayIcon,alt:"gateway-icon","data-testid":"ChargeStatusIcon_GatewayIcon",style:T})})})}),jsx(Dt,{"data-testid":"ChargeStatusIcon_GatewaysContainer",transition:Et,variants:Fo,style:g$1,isVisible:!!v,children:v&&jsx(p,{title:v,children:jsx(Lt,{"data-testid":"ChargeStatusIcon_AcquirerIconWrapper",style:{background:x?.background,...c},children:jsx(Bt,{src:x?.acquirerIcon,alt:"acquirer-icon","data-testid":"ChargeStatusIcon_AcquirerIcon",style:T})})})})]}):jsx(p,{title:D??C(_(t)),children:jsx(o,{children:Ft})})})}var Xe=()=>{let{t}=useTranslation(),o=yc(useId(),"customer-initiated-icon");return jsx(p,{title:t("merchantInitiated"),children:jsx("img",{id:o,"data-testid":"merchantInitiatedIcon",src:vb,alt:"merchant",style:{width:"16px",height:"16px"}})})};var Ye={G:"Global",R:"Regional",L:"Local"},ot=({geographyVariant:t,countryCode:o,isTextShown:e})=>{let r=t?Ye[t]:void 0,l=r||o?`${r||""} ${r&&o?"-":""} ${o?`Country - ${o}`:""}`:void 0;return e||!o?null:jsx(p,{title:l,children:jsx(a$3,{countryCode:o})})};var tr=({geographyVariant:t,isTextShown:o,deviceCountry:e,deviceType:r,tableMode:l})=>{let p=yc(useId(),"device-icon-chip");return jsxs(Qe,{id:p,"data-testid":"DeviceIconChip",sx:{display:"flex",gap:"8px",alignItems:"center",...Va(l)&&{height:"18px"}},children:[jsx(ot,{geographyVariant:t,isTextShown:o,countryCode:e}),jsx(c,{type:r,isTextShown:o,tableMode:l})]})};var rr=({isDisputeOpen:t,iconStyles:o})=>{let e=yc(useId(),"dispute-icon");return jsx(p$1,{id:e,"data-testid":"StatusCell_DisputeStatusIcon",sx:{width:"13.5px",height:"13.5px"},src:t?wa:va,alt:"dispute-icon",style:o})};var Xo=styled$1(Qe,{shouldForwardProp:t=>t!=="tableMode"})(({theme:t,tableMode:o})=>({display:"flex",gap:t.spacing(.5),...Va(o)&&{height:"18px"},alignItems:"center"})),Yo=styled$1("span")(({theme:t})=>({fontSize:"10px",fontWeight:500,color:t.palette.text.primary}));function Vt({countryCode:t,isTextShown:o,cardNumber:e,bankName:r,tableMode:l}){let p$1=yc(useId(),"issuer-icon"),a=e?.slice(0,4),n=e?.slice(-4);return jsxs(Xo,{id:p$1,"data-testid":"IssuerIcon",tableMode:l,children:[t&&jsx(ot,{countryCode:t,isTextShown:o}),jsx(p,{title:`${r?`Issuer - ${r}`:""}`,children:jsx(Yo,{children:`${a||""} ${n||""}`})})]})}var sr=Vt;styled(motion.div)(({theme:t,background:o})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.5),paddingInline:t.spacing(.75),paddingBlock:t.spacing(.5),backgroundColor:o,height:"24px",width:"fit-content",borderRadius:"24px",fontSize:"10px",color:t.palette.text.primary}));var Ra=styled("img")(()=>({height:"13.125px",width:"12px"})),bt=styled("div")(()=>({fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"center",width:"65px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"4.5px 8px",borderRadius:"24px"})),ka=styled("div")(({theme:t})=>({color:t.palette.common.white,background:t.palette.error.main,fontSize:"0.6rem",fontWeight:600,borderRadius:"16px",padding:"2px 8px",display:"flex",alignItems:"center",justifyContent:"center"})),Ba=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px"}));var ur=({payoutStatus:t="PENDING",isTextShown:o,payoutTooltip:e$1,iconStyles:r,isSheetViewShown:l,chipIndex:p$2=0,selectionProps:a={}})=>{let{t:n}=useTranslation(),d=yc(useId(),"payout-icon"),s=n(_(t)),f=e$1||s;return l?jsx(b,{chipIndex:p$2,copyText:s,selectionProps:a,children:s}):jsx(p,{title:f,children:o?jsx(bt,{id:d,"data-testid":"StatusCell_PayoutStatusLabel",children:s}):jsx(p$1,{id:d,src:e[t],alt:"settled-icon","data-testid":"StatusCell_PayoutStatusIcon",style:r})})};var Qo=styled$1(motion.img)(()=>({width:"14px",height:"14px"})),Zo=styled$1(motion.span)(({theme:t})=>({color:t.palette.common.white,borderRadius:t.spacing(.5),height:"12px",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"9.782px",fontWeight:600,backgroundColor:t.palette.secondary.main})),Mt=styled$1(motion.div)(({theme:t})=>({height:"16px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:`${t.palette.secondary.main}1A`,paddingInline:t.spacing(.5),borderRadius:"56px"})),qa=(t,o,e)=>({start:{x:t*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:e?t*e:t*49,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:o}}),Ka=styled$1(motion.span)(({isTextShown:t,theme:o})=>({border:`1px solid ${o.palette.divider}`,borderRadius:"12px",backgroundColor:o.palette.background.paper,height:"24px",display:"flex",alignItems:"center",justifyContent:"center",minWidth:t?"auto":"36px",...t&&{border:"none"}})),Ja=styled$1(motion.div,{shouldForwardProp:t=>t!=="order"})(({order:t=0})=>({display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:0,left:0,zIndex:t+6,width:"fit-content",height:"24px",cursor:"pointer",borderRadius:"16px","&:hover":{zIndex:200}})),Xa=styled$1(motion.div,{shouldForwardProp:t=>t!=="statusesCount"})(({statusesCount:t=1})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"relative",minWidth:`${t*6+36}px`,height:"24px",cursor:"pointer",borderRadius:"16px",overflow:"visible"})),Ya=styled$1("div")(()=>({display:"flex",gap:"4px",justifyContent:"flex-start",alignItems:"center",position:"relative",width:"100%",overflow:"visible"}));var hr=({isTextShown:t,refundStatus:o="PENDING",refundTooltip:e="",refundCount:r,iconStyles:l,isSheetViewShown:p$2,chipIndex:a=0,selectionProps:n={}})=>{let{t:d$1}=useTranslation(),s=useTheme$1(),f=yc(useId(),"refund-icon"),c=(r||0)>1,g=d$1(_(o));if(p$2)return jsxs(b,{chipIndex:a,selectionProps:n,copyText:g,children:[g," ",c?`${r}x`:null]});let T=jsxs(Zo,{"data-testid":"StatusCell_RefundsCountBadge",initial:{width:0,opacity:0,padding:"0px"},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto",display:"flex",padding:"1.285px 2.569px"},fadeIn:{transition:{delay:.5},opacity:1}},children:[r,"x"]});return t?jsx(p,{title:jsx("div",{children:jsx("div",{children:e})}),children:jsx(bt,{id:f,"data-testid":"StatusCell_RefundStatusLabel",sx:{color:d[o].color,backgroundColor:d[o].backgroundColor,width:"90px"},children:jsxs(Mt,{whileInView:c?["animate","fadeIn"]:void 0,variants:{animate:{boxShadow:s.shadows[4],gap:s.spacing(.5)}},children:[g," ",c?T:null]})})}):jsx(p,{title:jsx("div",{children:jsx("div",{children:e})}),children:c?jsxs(Mt,{id:f,whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:s.shadows[4],gap:s.spacing(.5)}},children:[jsx(Qo,{src:tk,alt:"multi-refunded-icon","data-testid":"StatusCell_MultiRefundIcon"}),T]}):jsx(p$1,{id:f,src:c$1[o],alt:"refunded-icon","data-testid":"StatusCell_RefundStatusIcon",style:l})})},te=hr;var Cr=te;var yr={american_express:"AMEX",debit:"card",credit:"card",unionpay:"UnionPay",jaywan:"JAYWAN"},B=t=>yr[t?.toLowerCase()||""]||t;styled("span")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(1)}));var oe=styled("img")(()=>({maxWidth:"24px",maxHeight:"16px"}));styled(motion.span,{shouldForwardProp:t=>t!=="sourcesCount"})(({theme:t,sourcesCount:o})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${o*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:t.palette.background.paper,borderRadius:"16px"}));var ee=styled("span")(({theme:t})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:t.palette.text.primary})),re=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px",textAlign:"center",width:"100%"}));styled("span")(({theme:t})=>({position:"absolute",left:0,zIndex:6,border:`1px solid ${t.palette.divider}`,borderRadius:"12px",backgroundColor:t.palette.background.paper,width:"36px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"}));var ne=styled("span")(({theme:t})=>({fontSize:"10px",fontWeight:500,color:t.palette.text.primary}));function At({source:t,isTextShown:o,title:e,width:r,height:l,imgSx:p$1}){let{t:a}=useTranslation(),n=h(t);return jsx(p,{title:e,children:o?jsx(re,{"data-testid":"SourceCell_BadgeTextWrapper",children:jsx(ee,{"data-testid":"SourceCell_TextLabel","data-source":t,children:a(_(t))})}):jsx(oe,{src:n,alt:t,width:r,height:l,onError:d=>{d.currentTarget.src=h("card");},sx:p$1})})}function vr({payment:t,card:o,isTextShown:e,firstIcon:r}){let l=yc(useId(),"source-icons"),{t:p}=useTranslation(),a=useCallback(()=>{let s=[],f=bc(t),c=t?.method,g=t?.scheme;return B(c)?.toLowerCase()===B(g)?.toLowerCase()?s.push(B(c),B(f)):s.push(B(c),B(f),B(g)),s},[t]),n=useMemo(()=>jsx(At,{source:r,isTextShown:e,title:p(_(r))},r),[r,e,p]),d=useMemo(()=>a()?.filter(s=>!!s&&s!==r)?.map((s,f,c)=>{let g=t?.wallet===p("sv_wallet")?p("storedValueWallet"):p("passThruWallet"),T=f===c.length-1&&o?.last_four?`${p(_(s))} - ${o?.last_four}`:p(_(s));return jsx(At,{source:s,isTextShown:e,title:f===0&&s==="Wallet"?g:T},`${s}-${f}`)}),[a,t,o,e,p,r]);return jsxs(Box,{id:l,"data-testid":"SourceIcons",display:"flex",alignItems:"center",gap:.5,children:[r&&n,d,o?.last_four&&jsxs(ne,{children:["\xB7\xB7\xB7 ",o?.last_four]})]})}var rt={PROCESSED:Vg,FAILED:""};var se=styled("span")(({theme:t})=>({fontSize:"11px",padding:"2px 0",color:t.palette.text.primary})),le=styled("img")(()=>({width:"16px",height:"16px"})),de=styled("span")(()=>({width:"24px",height:"24px",borderRadius:"50%",backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}));function ce({status:t,isTextShown:o,isSheetViewShown:e,chipIndex:r=0,selectionProps:l={}}){let p$1=useTheme(),{t:a}=useTranslation(),n=yc(useId(),"destination-icon"),d=a(_(t));return e&&rt[t]?jsx(b,{copyText:d,chipIndex:r,selectionProps:l,children:d}):o&&rt[t]?jsx(se,{id:n,"data-testid":"ChargeStatusIcon_isTextShown","data-status":_(t),sx:{background:"#1F88D00D",color:t==="PROCESSED"?p$1.palette.info.dark:p$1.palette.common.black},children:d}):jsx(de,{id:n,"data-testid":"DestinationIcon",className:"destination-status",children:t&&rt[t]&&jsx(p,{title:a(_(t)),children:jsx(le,{src:rt[t],alt:"destination-icon"})})})}export{qa as a,Ka as b,Ja as c,Xa as d,Ya as e,Ce as f,Se as g,Te as h,$o as i,Me as j,Fe as k,qe as l,Xe as m,ot as n,tr as o,rr as p,sr as q,Ra as r,ka as s,Ba as t,ur as u,Cr as v,B as w,At as x,vr as y,ce as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$3}from'./chunk-MXXAZH6N.js';import {a as a$1}from'./chunk-
|
|
1
|
+
import {a as a$3}from'./chunk-MXXAZH6N.js';import {a as a$1}from'./chunk-KWTIOGYK.js';import {a as a$2}from'./chunk-KUOKFWXS.js';import {f}from'./chunk-MCX337WI.js';import {a}from'./chunk-GNY2VGGW.js';import {wb,Fb,B,Db,Qc}from'./chunk-3YAJNHQC.js';import me,{useState,useRef,useMemo}from'react';import {Box,CircularProgress,Typography}from'@mui/material';import xe from'@mui/material/ClickAwayListener';import h from'@mui/material/Box';import le from'@mui/material/Input';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';styled(a)(({theme:e})=>({fontSize:"10px",color:e.palette.grey[700],fontWeight:600,lineHeight:"10px"}));styled(a)(({theme:e})=>({fontSize:"11px",color:e.palette.text.primary,fontWeight:600,lineHeight:"14.3px",width:200}));styled(h)(()=>({display:"flex",flexDirection:"column",maxHeight:400,overflow:"auto",gap:"8px"}));var H=styled(le)(({theme:e})=>({width:"inherit",height:32,padding:"11px 12px",fontSize:"10px",borderRadius:"5px",backgroundColor:"#F9F9F9",border:"1px solid transparent","&.Mui-focused":{borderColor:e.palette.info.dark}}));styled(f)({padding:0,width:12,height:12,".MuiSvgIcon-root, img":{width:12,height:12}});var D=styled(h)(()=>({display:"flex",flexDirection:"column",gap:"8px",padding:"4px"})),I=styled(h)(()=>({display:"flex",gap:"8px",padding:"4px",flexWrap:"wrap",paddingInlineEnd:"20px"})),M=styled(h)(({theme:e,maxWidth:o})=>({display:"flex",padding:"4px 8px 4px 6px",alignItems:"center",gap:"4px",borderRadius:"13px",backgroundColor:`${e.palette.info.dark}1a`,fontSize:"10px",fontWeight:500,cursor:"pointer",...o&&{maxWidth:`${o}%`}}));styled(a)(({theme:e})=>({display:"flex",gap:"8px",alignItems:"center",fontSize:"10px",fontWeight:500,color:e.palette.common.black,cursor:"pointer",padding:8}));var N=styled(h)(({theme:e})=>({width:"100%",flexDirection:"column",border:`1px solid ${e.palette.grey[100]}`,borderRadius:"4px",backgroundColor:e.palette.grey[400],minWidth:"89px",position:"relative"})),z=styled(h)(()=>({position:"absolute",right:8,bottom:13.5,width:15,height:15}));var R=e=>e.length===0?true:"value"in e[0],$=(e,o,p)=>o?e.filter(r=>p.some(a=>r?.[a]?.toLowerCase().includes(o.toLowerCase()))):e,G=(e,o,p)=>e.map(r=>{let a=r?.options.map(l=>{let S=l?.options?.filter(n=>p.some(d=>n?.[d]?.toLowerCase().includes(o.toLowerCase())));return {...l,options:S}}).filter(l=>l?.options?.length>0);return {...r,options:a}}).filter(r=>r?.options?.length>0);function X({childOption:e,selectedOptions:o,onChangeOptions:p}){let[r,a]=useState(null),l=n=>{p([...o||[],n]);},S=n=>{p(o?.filter(d=>d.value!==n.value)||[]);};return jsxs(a$1,{onMouseEnter:n=>{e.options?.length>0&&a(n.currentTarget);},onMouseLeave:()=>{r&&a(null);},children:[jsxs(Box,{sx:{display:"flex",gap:"12px",justifyContent:"space-between",flexGrow:1,alignItems:"center",maxWidth:"220px",minWidth:"89px"},children:[e.label,jsx("img",{src:wb,className:"arrow-icon",alt:"arrow"})]}),jsx(a$2,{sx:{maxHeight:"450px",overflow:"auto"},open:!!r,anchorEl:r,placement:"right-start",children:e.options?.map(n=>{let w=!!o?.find(s=>s.value===n.value);return jsx(a$1,{isSelected:w,onClick:s=>{s.stopPropagation(),s.preventDefault(),w?S(n):l(n);},children:jsx(Box,{sx:{flex:1,maxWidth:"220px",minWidth:"89px"},children:n.label})},n.value)})})]})}function J({parentOption:e,selectedOptions:o,onChangeOptions:p}){let[r,a]=useState(null);return jsxs(a$1,{onMouseEnter:l=>{e.options?.length>0&&a(l.currentTarget);},onMouseLeave:()=>{r&&a(null);},children:[jsxs(Box,{sx:{display:"flex",gap:"12px",justifyContent:"space-between",flexGrow:1,alignItems:"center",maxWidth:"340px",minWidth:"89px"},children:[e.label,jsx("img",{src:wb,className:"arrow-icon",alt:"arrow"})]}),jsx(a$2,{sx:{maxHeight:"450px",overflow:"auto"},open:!!r,anchorEl:r,placement:"right-start",children:e.options?.map(l=>jsx(X,{childOption:l,selectedOptions:o,onChangeOptions:p},l.label))})]})}function Q({option:e,selectedOptions:o,onChangeOptions:p}){let r=o?.some(a=>a.value===e.value)??false;return jsx(a$1,{isSelected:r,onClick:a=>{if(a.stopPropagation(),a.preventDefault(),r){p(o?.filter(l=>l.value!==e.value)||[]);return}p([...o||[],e]);},children:jsx(Box,{sx:{flex:1,maxWidth:"220px",minWidth:"89px"},children:e.label})})}function ge({options:e,onChangeOptions:o,selectedOptions:p,placeholder:r,isLoading:a,searchBy:l=["label"],disabled:S}){let n=R(e),[d,w]=useState(null),[s,E]=useState(""),ee=useRef(null),b=!!d,te=t=>{w(b?null:t.currentTarget);},oe=()=>{w(null);},re=()=>{s&&E("");},T=useMemo(()=>{if(n)return $(e,s,l)},[n,e,s,l]),F=useMemo(()=>{if(!n)return s?G(e,s,l):e},[n,e,s,l]),ne=!!(n?T:F)?.length,ie=a?jsx(CircularProgress,{size:16}):jsx(a$3,{src:s?Fb:B,alt:s?"close":"search",onClick:re,sx:{width:12,height:12}}),f=Number(p?.length??0);return jsx(xe,{onClickAway:()=>{b&&oe();},children:jsxs(N,{id:"TriggerWrapper","data-testid":"MultiSelectWithSearch",onClick:t=>!S&&te(t),ref:ee,children:[jsx(Typography,{color:"grey",sx:{cursor:"pointer",fontSize:"10px",padding:"4px"},component:"label",children:r}),f===0&&jsx(Typography,{sx:{fontWeight:500,fontSize:"11px",padding:"0px 4px 4px"},component:"p",children:"Please Select"}),jsx(z,{component:"img",src:Db,alt:"down arrow",sx:{...b&&{transform:"rotate(180deg)"}}}),!!f&&jsx(I,{id:"SelectedBadgesWrapper",children:f>0&&f<=2?p?.map(t=>jsxs(M,{maxWidth:90,children:[jsx(a$3,{src:Qc,alt:"blue-check",sx:{width:10,height:7.5}}),jsx("span",{children:t.label})]},t.value)):f>2&&p?.slice(0,2)?.map((t,y)=>jsxs(me.Fragment,{children:[jsxs(M,{maxWidth:90,children:[jsx(a$3,{src:Qc,alt:"blue-check",sx:{width:10,height:7.5}}),jsx("span",{children:t.label})]}),y===1&&jsx(M,{maxWidth:90,children:jsxs("span",{children:["+",f-2]})})]},t.value))}),jsx(a$2,{open:b,anchorEl:d,sx:{margin:"8px 0",maxHeight:330,overflow:"auto",maxWidth:"340px"},children:jsxs(D,{children:[jsx(H,{placeholder:r||"Select",endAdornment:ie,onClick:t=>{t.stopPropagation();},value:s,onChange:t=>{E(t.target.value);},disableUnderline:true,sx:{cursor:"default",width:"100%",backgroundColor:"white",border:"1px solid #F2F2F2",...ne&&{marginBottom:"4px"},...s&&{cursor:"pointer"}}}),jsx(I,{children:p?.map(t=>jsxs(M,{sx:{maxWidth:"150px"},onClick:y=>{y.stopPropagation(),y.preventDefault(),o(p?.filter(pe=>pe.value!==t.value)||[]);},children:[jsx(a$3,{src:Qc,alt:"blue-check",sx:{width:10,height:7.5}}),jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.label}),jsx(a$3,{src:Fb,alt:"close",sx:{width:9,height:9}})]},t.value))}),n?T?.map(t=>jsx(Q,{option:t,selectedOptions:p,onChangeOptions:o},t.value)):F?.map(t=>jsx(J,{parentOption:t,selectedOptions:p,onChangeOptions:o},t.label))]})})]})})}var j=ge;var st=j;export{X as a,J as b,Q as c,st as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {i}from'./chunk-XFDWIT4G.js';import {p}from'./chunk-RGHVZKKB.js';import {Aa}from'./chunk-W6W4YZ7G.js';import ee,{memo,useMemo,Children,useState,useRef,useEffect,useCallback,useLayoutEffect,isValidElement}from'react';import {motion}from'framer-motion';import P from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var h=24;var D=.22;var nt=styled(P)(()=>({display:"flex",gap:"8px",overflow:"visible"})),Ut=["trackWidth","minTrackWidth","slotSize","hoverZIndex"],it=styled("div",{shouldForwardProp:t=>!Ut.includes(t)})(({trackWidth:t,minTrackWidth:e,slotSize:r,hoverZIndex:o})=>({position:"relative",overflow:"visible",width:t,minWidth:e,height:r,transition:`width ${.22}s ease-out`,...o!==void 0?{zIndex:o}:{}})),$=styled(P)(()=>({display:"flex",alignItems:"center",paddingRight:"8px","& .chip-stack-overlap-slot":{marginRight:"-8px",position:"relative",zIndex:1},"& .chip-stack-overlap-slot:hover":{zIndex:2}}));function at(t){return {display:"flex",alignItems:"center",justifyContent:"center",width:`var(--chip-stack-slot-size, ${24}px)`,height:`var(--chip-stack-slot-size, ${24}px)`,borderRadius:"50%",border:`1px solid ${t.palette.divider}`,backgroundColor:t.palette.common.white,flexShrink:0}}var ct=styled(({title:t,className:e,...r})=>t!=null&&t!==""?jsx(p,{title:t,wrapperProps:{className:"chip-stack-overlap-slot"},children:jsx(P,{className:e,...r})}):jsx(P,{className:["chip-stack-overlap-slot",e].filter(Boolean).join(" "),...r}))(({theme:t})=>({...at(t),overflow:"hidden",lineHeight:0,boxSizing:"border-box",padding:0,"& > *":{width:"100%",height:"100%",minWidth:0,minHeight:0},"& img":{display:"block",width:"100%",height:"100%",objectFit:"contain"}})),K=styled(({title:t,...e})=>jsx(p,{title:t??"",wrapperProps:{className:"chip-stack-overlap-slot"},children:jsx(P,{...e})}))(({theme:t})=>({...at(t),fontSize:`max(${8}px, calc(var(--chip-stack-slot-size, ${24}px) * ${8.5} / ${24}))`,fontWeight:500,color:t.palette.text.disabled}));function st({overflowItems:t,size:e}){let r=`${Math.max(8,8.5*e/24)}px`;return jsxs(P,{sx:{width:e,height:e,borderRadius:"50%",border:o=>`1px solid ${o.palette.divider}`,display:"flex",alignItems:"center",justifyContent:"center",fontSize:r,fontWeight:600,bgcolor:"action.hover",flexShrink:0},children:["+",t.length]})}var Gt=["faceSize","avatarFill"],pt=styled(i,{shouldForwardProp:t=>!Gt.includes(t)})(({theme:t,faceSize:e,avatarFill:r})=>{let o=`${e}px`,i=`${Math.max(7,8.5*e/24)}px`;return {width:o,height:o,fontSize:i,fontWeight:500,lineHeight:"100%",letterSpacing:"0%",textAlign:"center",color:t.palette.common.white,background:r,backgroundSize:"cover","&.MuiAvatar-colorDefault":{background:r,color:t.palette.common.white},"& .MuiAvatar-img":{objectFit:"cover"}}});function lt(t){return t==="fanout-left"?"left":t==="fanout-center"?"center":"right"}function mt(t,e,r){return t==="static"?e?"static-children":r?"static-items":null:e?"animated-children":r?"animated-items":null}function dt({size:t,stackStep:e,gap:r,minTrackWidth:o}){let i=t??24,n=e??Math.round(i/2),s=r??Math.max(1,Math.round(i*3/24)),a=o??Math.max(60,Math.round(i*60/24));return {size:i,stackStep:n,gap:s,minTrackWidth:a}}function ut(t,e){if(t<=0)return 0;switch(e){case "right":return 0;case "left":return t-1;default:return Math.floor((t-1)/2)}}function ht(t,e){return e!==void 0&&t>e}function M(t,e){return e===void 0||e<1||t.length<e?{visibleItems:t,hiddenItems:[]}:{visibleItems:t.slice(0,e-1),hiddenItems:t.slice(e-1)}}function Yt(t,e){return isValidElement(t)&&t.key!=null&&t.key!==""?String(t.key):`chip-stack-child-${e}`}function B({items:t,maxItems:e,getItemKey:r,renderItem:o,renderOverflow:i,slotSize:n}){let s={slotSize:n};if(t.length===0)return [];let{visibleItems:a,hiddenItems:c}=M(t,e),p=a.map((m,l)=>({key:r(m,l),render:()=>o(m,l,s)}));return c.length>0&&p.push({key:`chip-stack-overflow-${c.length}-${a.length}`,render:()=>i({items:t,overflowItems:c,size:n})}),p}function ft({children:t,maxItems:e,slotSize:r,renderOverflow:o}){let i=Children.toArray(t);return B({items:i,maxItems:e,getItemKey:Yt,renderItem:n=>n,renderOverflow:o,slotSize:r})}function St(t,e){return t.length===e.length&&t.every((r,o)=>r===e[o])}function X(t,e,r){return t[e]??r}function kt(t,e,r,o,i,n){if(t===0)return [];let s=e*i,a=new Array(t);a[e]=s;for(let c=e-1;c>=0;c-=1)a[c]=a[c+1]-X(r,c,n)-o;for(let c=e+1;c<t;c+=1)a[c]=a[c-1]+X(r,c-1,n)+o;return a}function Ct(t,e,r){return t<=0?0:(t-1)*e+r}function xt(t,e,r,o){return Array.from({length:t},(i,n)=>t<=1||!e?0:r[n]-n*o)}function At(t,e,r,o,i){if(t<=0)return 0;let n=e.map((c,p)=>c+X(r,p,i)),s=Math.min(...e),a=Math.max(...n);return Math.max(o,a-s)}function gt(t,e,r){return Array.from({length:t},(o,i)=>{let n=e.current[i];return n?n.offsetWidth:r})}function Z(t,e){return t.id??`${t.first}-${t.last}-${e}`}function yt(t){return [t.first,t.last].map(e=>e?.[0]).filter(e=>e!=null&&e!=="").join("")}function Tt(t){if(t.tooltip!==void 0)return t.tooltip===null?null:t.tooltip;let e=`${t.first||""} ${t.last||""}`.trim();return e!==""?e:null}function Rt({slotCount:t,anchorIndex:e,size:r,stackStep:o,gap:i,fanOutEnabled:n,compact:s}){let[a,c]=useState(false),[p,m]=useState(()=>Array.from({length:t},()=>r)),l=useRef(null),f=useRef([]),C=useRef(null),x=useCallback(()=>{let v=gt(t,f,r);m(g=>St(g,v)?g:v);},[t,r]),d=useCallback(()=>{C.current&&cancelAnimationFrame(C.current),C.current=requestAnimationFrame(x);},[x]),A=useMemo(()=>kt(t,e,p,i,o,r),[t,e,p,i,o,r]),y=useMemo(()=>xt(t,n&&a,A,o),[t,n,a,A,o]),S=useMemo(()=>Ct(t,o,r),[t,o,r]),O=useMemo(()=>At(t,A,p,S,r),[t,A,p,S,r]),k=useCallback(()=>{n&&(l.current&&clearTimeout(l.current),c(true));},[n]),u=useCallback(()=>{n&&(l.current&&clearTimeout(l.current),l.current=setTimeout(()=>c(false),120));},[n]);useEffect(()=>()=>{l.current&&clearTimeout(l.current);},[]),useEffect(()=>{n||c(false);},[n]),useLayoutEffect(()=>{m(Array.from({length:t},()=>r));},[t,r]),useLayoutEffect(()=>{x();},[t,r,x]),useEffect(()=>(d(),window.addEventListener("resize",d),()=>{window.removeEventListener("resize",d),C.current&&cancelAnimationFrame(C.current);}),[d]);let T=n&&a?O:s?r:S,b=n&&a,F=useMemo(()=>s?Array.from({length:t},(v,g)=>g===e||a?1:0):Array.from({length:t},()=>1),[s,t,e,a]);return {isHovering:a,handleMouseEnter:k,handleMouseLeave:u,slotRefs:f,translateX:y,slotOpacity:F,collapsedStackWidthPx:S,fannedRowWidthPx:O,trackWidth:T,hoverZIndexActive:b}}function H({items:t,children:e,maxItems:r,getItemKey:o,renderItem:i,renderOverflow:n,fanOutDirection:s,compact:a=false,"data-testid":c,sx:p,className:m,slotProps:l}){let f=Children.count(e)>0,{zIndex:C=1e3,size:x,stackStep:d,gap:A,minTrackWidth:y}=l?.layout??{},S=useMemo(()=>f?Children.toArray(e??null).length:t?.length??0,[f,e,t]),k=!(!a&&ht(S,r)),{size:u,stackStep:w,gap:T,minTrackWidth:b}=useMemo(()=>dt({size:x,stackStep:d,gap:A,minTrackWidth:y}),[x,d,A,y]),F=n??st,v=useMemo(()=>f?ft({children:e??null,maxItems:r,slotSize:u,renderOverflow:F}):!t?.length||!o||!i?[]:B({items:t,maxItems:r,getItemKey:o,renderItem:i,slotSize:u,renderOverflow:F}),[f,e,t,r,o,i,F,u]),g=v.length,Nt=useMemo(()=>ut(g,s),[g,s]),{handleMouseEnter:Et,handleMouseLeave:Mt,slotRefs:Wt,translateX:Lt,slotOpacity:tt,collapsedStackWidthPx:Kt,trackWidth:Vt,hoverZIndexActive:zt}=Rt({slotCount:g,anchorIndex:Nt,size:u,stackStep:w,gap:T,fanOutEnabled:k,compact:a});if(g===0)return null;let{sx:L,...Ht}=l?.shell??{},{style:Dt,...$t}=l?.track??{};return jsx(nt,{className:m,...Ht,sx:[{justifyContent:"flex-start",...k||a?{width:"100%"}:{}},...Array.isArray(p)?p:p!=null?[p]:[],...Array.isArray(L)?L:L!=null?[L]:[]],children:jsx(it,{"data-testid":c,...$t,style:Dt,onMouseEnter:k?Et:void 0,onMouseLeave:k?Mt:void 0,trackWidth:Vt,minTrackWidth:a?u:Math.max(b,Kt),slotSize:u,hoverZIndex:zt?C:void 0,children:v.map((et,R)=>jsx(motion.div,{ref:Xt=>{Wt.current[R]=Xt;},initial:false,animate:{x:Lt[R]??0,opacity:tt[R]??1},transition:{duration:.22,ease:"easeOut"},style:{position:"absolute",top:0,left:R*w,zIndex:R,width:u,height:u,pointerEvents:tt[R]===0?"none":"auto"},children:et.render()},et.key))})})}function oe({children:t,maxItems:e,renderOverflow:r,slotSize:o=24,sx:i,...n}){let s=useMemo(()=>ee.Children.toArray(t),[t]),{visibleItems:a,hiddenItems:c}=useMemo(()=>M(s,e),[s,e]),p=c.length>0,m=useMemo(()=>[{"--chip-stack-slot-size":`${o}px`},...Array.isArray(i)?i:i!=null?[i]:[]],[o,i]);if(!p)return jsx($,{"data-testid":"ChipStack",...n,sx:m,children:t});let l=r?.({items:s,overflowItems:c,size:o});return jsxs($,{"data-testid":"ChipStack",...n,sx:m,children:[a,l??jsx(K,{title:`${c.length} more`,children:jsxs("span",{children:["+",c.length]})})]})}var J=memo(oe);function ie(t){return jsx(ct,{"data-testid":"OverlapChip",...t})}var Q=memo(ie);var ce=["static","fanout-right","fanout-left","fanout-center"],Y="static";function pe(t){let{variant:e=Y,maxItems:r,renderOverflow:o,children:i,items:n,getItemKey:s,renderItem:a,compact:c=false,"data-testid":p,slotProps:m,sx:l,className:f}=t,C=Children.count(i??null)>0,x=!C&&(n?.length??0)>0&&s!=null&&a!=null,d=mt(e,C,x);if(d===null)return null;if(d==="static-children"||d==="static-items"){let S=m?.layout?.size??24;if(d==="static-items"&&n&&s&&a){let{visibleItems:O,hiddenItems:k}=M(n,r),u=k.length>0?o?.({items:n,overflowItems:k,size:S})??jsx(K,{title:`${k.length} more`,children:jsxs("span",{children:["+",k.length]})}):null,w=jsxs(Fragment,{children:[O.map((T,b)=>jsx(Q,{children:a(T,b,{slotSize:S})},s(T,b))),u]});return jsx(J,{"data-testid":p,slotSize:S,sx:l,className:f,children:w})}return jsx(J,{"data-testid":p,maxItems:r,renderOverflow:o,slotSize:S,sx:l,className:f,children:i})}let A=lt(e),y={maxItems:r,renderOverflow:o,fanOutDirection:A,compact:c,"data-testid":p??"ChipStack",slotProps:m,sx:l,className:f};return d==="animated-children"?jsx(H,{...y,children:i}):jsx(H,{...y,items:n,getItemKey:s,renderItem:a})}var wt=pe;function he({item:t,sourceIndex:e,slotSize:r}){let[o,i]=useState(false),n=useRef(null);useEffect(()=>{i(false);},[t.logo]);let s=!t.logo||o,a=Z(t,e),c="transparent";s&&(n.current?.key!==a&&(n.current={key:a,fill:Aa()}),c=n.current.fill);let p$1=jsx(pt,{faceSize:r,avatarFill:c,src:s?void 0:t.logo,slotProps:s?void 0:{img:{onError:()=>i(true)}},children:yt(t)}),m=Tt(t);return m!=null&&m!==""?jsx(p,{title:m,children:p$1}):p$1}var fe=he;var dr=wt;export{h as a,D as b,Z as c,Q as d,ce as e,Y as f,wt as g,fe as h,dr as i};
|
|
1
|
+
import {i}from'./chunk-IEVFY2WC.js';import {p}from'./chunk-MCX337WI.js';import {Aa}from'./chunk-W6W4YZ7G.js';import ee,{memo,useMemo,Children,useState,useRef,useEffect,useCallback,useLayoutEffect,isValidElement}from'react';import {motion}from'framer-motion';import P from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var h=24;var D=.22;var nt=styled(P)(()=>({display:"flex",gap:"8px",overflow:"visible"})),Ut=["trackWidth","minTrackWidth","slotSize","hoverZIndex"],it=styled("div",{shouldForwardProp:t=>!Ut.includes(t)})(({trackWidth:t,minTrackWidth:e,slotSize:r,hoverZIndex:o})=>({position:"relative",overflow:"visible",width:t,minWidth:e,height:r,transition:`width ${.22}s ease-out`,...o!==void 0?{zIndex:o}:{}})),$=styled(P)(()=>({display:"flex",alignItems:"center",paddingRight:"8px","& .chip-stack-overlap-slot":{marginRight:"-8px",position:"relative",zIndex:1},"& .chip-stack-overlap-slot:hover":{zIndex:2}}));function at(t){return {display:"flex",alignItems:"center",justifyContent:"center",width:`var(--chip-stack-slot-size, ${24}px)`,height:`var(--chip-stack-slot-size, ${24}px)`,borderRadius:"50%",border:`1px solid ${t.palette.divider}`,backgroundColor:t.palette.common.white,flexShrink:0}}var ct=styled(({title:t,className:e,...r})=>t!=null&&t!==""?jsx(p,{title:t,wrapperProps:{className:"chip-stack-overlap-slot"},children:jsx(P,{className:e,...r})}):jsx(P,{className:["chip-stack-overlap-slot",e].filter(Boolean).join(" "),...r}))(({theme:t})=>({...at(t),overflow:"hidden",lineHeight:0,boxSizing:"border-box",padding:0,"& > *":{width:"100%",height:"100%",minWidth:0,minHeight:0},"& img":{display:"block",width:"100%",height:"100%",objectFit:"contain"}})),K=styled(({title:t,...e})=>jsx(p,{title:t??"",wrapperProps:{className:"chip-stack-overlap-slot"},children:jsx(P,{...e})}))(({theme:t})=>({...at(t),fontSize:`max(${8}px, calc(var(--chip-stack-slot-size, ${24}px) * ${8.5} / ${24}))`,fontWeight:500,color:t.palette.text.disabled}));function st({overflowItems:t,size:e}){let r=`${Math.max(8,8.5*e/24)}px`;return jsxs(P,{sx:{width:e,height:e,borderRadius:"50%",border:o=>`1px solid ${o.palette.divider}`,display:"flex",alignItems:"center",justifyContent:"center",fontSize:r,fontWeight:600,bgcolor:"action.hover",flexShrink:0},children:["+",t.length]})}var Gt=["faceSize","avatarFill"],pt=styled(i,{shouldForwardProp:t=>!Gt.includes(t)})(({theme:t,faceSize:e,avatarFill:r})=>{let o=`${e}px`,i=`${Math.max(7,8.5*e/24)}px`;return {width:o,height:o,fontSize:i,fontWeight:500,lineHeight:"100%",letterSpacing:"0%",textAlign:"center",color:t.palette.common.white,background:r,backgroundSize:"cover","&.MuiAvatar-colorDefault":{background:r,color:t.palette.common.white},"& .MuiAvatar-img":{objectFit:"cover"}}});function lt(t){return t==="fanout-left"?"left":t==="fanout-center"?"center":"right"}function mt(t,e,r){return t==="static"?e?"static-children":r?"static-items":null:e?"animated-children":r?"animated-items":null}function dt({size:t,stackStep:e,gap:r,minTrackWidth:o}){let i=t??24,n=e??Math.round(i/2),s=r??Math.max(1,Math.round(i*3/24)),a=o??Math.max(60,Math.round(i*60/24));return {size:i,stackStep:n,gap:s,minTrackWidth:a}}function ut(t,e){if(t<=0)return 0;switch(e){case "right":return 0;case "left":return t-1;default:return Math.floor((t-1)/2)}}function ht(t,e){return e!==void 0&&t>e}function M(t,e){return e===void 0||e<1||t.length<e?{visibleItems:t,hiddenItems:[]}:{visibleItems:t.slice(0,e-1),hiddenItems:t.slice(e-1)}}function Yt(t,e){return isValidElement(t)&&t.key!=null&&t.key!==""?String(t.key):`chip-stack-child-${e}`}function B({items:t,maxItems:e,getItemKey:r,renderItem:o,renderOverflow:i,slotSize:n}){let s={slotSize:n};if(t.length===0)return [];let{visibleItems:a,hiddenItems:c}=M(t,e),p=a.map((m,l)=>({key:r(m,l),render:()=>o(m,l,s)}));return c.length>0&&p.push({key:`chip-stack-overflow-${c.length}-${a.length}`,render:()=>i({items:t,overflowItems:c,size:n})}),p}function ft({children:t,maxItems:e,slotSize:r,renderOverflow:o}){let i=Children.toArray(t);return B({items:i,maxItems:e,getItemKey:Yt,renderItem:n=>n,renderOverflow:o,slotSize:r})}function St(t,e){return t.length===e.length&&t.every((r,o)=>r===e[o])}function X(t,e,r){return t[e]??r}function kt(t,e,r,o,i,n){if(t===0)return [];let s=e*i,a=new Array(t);a[e]=s;for(let c=e-1;c>=0;c-=1)a[c]=a[c+1]-X(r,c,n)-o;for(let c=e+1;c<t;c+=1)a[c]=a[c-1]+X(r,c-1,n)+o;return a}function Ct(t,e,r){return t<=0?0:(t-1)*e+r}function xt(t,e,r,o){return Array.from({length:t},(i,n)=>t<=1||!e?0:r[n]-n*o)}function At(t,e,r,o,i){if(t<=0)return 0;let n=e.map((c,p)=>c+X(r,p,i)),s=Math.min(...e),a=Math.max(...n);return Math.max(o,a-s)}function gt(t,e,r){return Array.from({length:t},(o,i)=>{let n=e.current[i];return n?n.offsetWidth:r})}function Z(t,e){return t.id??`${t.first}-${t.last}-${e}`}function yt(t){return [t.first,t.last].map(e=>e?.[0]).filter(e=>e!=null&&e!=="").join("")}function Tt(t){if(t.tooltip!==void 0)return t.tooltip===null?null:t.tooltip;let e=`${t.first||""} ${t.last||""}`.trim();return e!==""?e:null}function Rt({slotCount:t,anchorIndex:e,size:r,stackStep:o,gap:i,fanOutEnabled:n,compact:s}){let[a,c]=useState(false),[p,m]=useState(()=>Array.from({length:t},()=>r)),l=useRef(null),f=useRef([]),C=useRef(null),x=useCallback(()=>{let v=gt(t,f,r);m(g=>St(g,v)?g:v);},[t,r]),d=useCallback(()=>{C.current&&cancelAnimationFrame(C.current),C.current=requestAnimationFrame(x);},[x]),A=useMemo(()=>kt(t,e,p,i,o,r),[t,e,p,i,o,r]),y=useMemo(()=>xt(t,n&&a,A,o),[t,n,a,A,o]),S=useMemo(()=>Ct(t,o,r),[t,o,r]),O=useMemo(()=>At(t,A,p,S,r),[t,A,p,S,r]),k=useCallback(()=>{n&&(l.current&&clearTimeout(l.current),c(true));},[n]),u=useCallback(()=>{n&&(l.current&&clearTimeout(l.current),l.current=setTimeout(()=>c(false),120));},[n]);useEffect(()=>()=>{l.current&&clearTimeout(l.current);},[]),useEffect(()=>{n||c(false);},[n]),useLayoutEffect(()=>{m(Array.from({length:t},()=>r));},[t,r]),useLayoutEffect(()=>{x();},[t,r,x]),useEffect(()=>(d(),window.addEventListener("resize",d),()=>{window.removeEventListener("resize",d),C.current&&cancelAnimationFrame(C.current);}),[d]);let T=n&&a?O:s?r:S,b=n&&a,F=useMemo(()=>s?Array.from({length:t},(v,g)=>g===e||a?1:0):Array.from({length:t},()=>1),[s,t,e,a]);return {isHovering:a,handleMouseEnter:k,handleMouseLeave:u,slotRefs:f,translateX:y,slotOpacity:F,collapsedStackWidthPx:S,fannedRowWidthPx:O,trackWidth:T,hoverZIndexActive:b}}function H({items:t,children:e,maxItems:r,getItemKey:o,renderItem:i,renderOverflow:n,fanOutDirection:s,compact:a=false,"data-testid":c,sx:p,className:m,slotProps:l}){let f=Children.count(e)>0,{zIndex:C=1e3,size:x,stackStep:d,gap:A,minTrackWidth:y}=l?.layout??{},S=useMemo(()=>f?Children.toArray(e??null).length:t?.length??0,[f,e,t]),k=!(!a&&ht(S,r)),{size:u,stackStep:w,gap:T,minTrackWidth:b}=useMemo(()=>dt({size:x,stackStep:d,gap:A,minTrackWidth:y}),[x,d,A,y]),F=n??st,v=useMemo(()=>f?ft({children:e??null,maxItems:r,slotSize:u,renderOverflow:F}):!t?.length||!o||!i?[]:B({items:t,maxItems:r,getItemKey:o,renderItem:i,slotSize:u,renderOverflow:F}),[f,e,t,r,o,i,F,u]),g=v.length,Nt=useMemo(()=>ut(g,s),[g,s]),{handleMouseEnter:Et,handleMouseLeave:Mt,slotRefs:Wt,translateX:Lt,slotOpacity:tt,collapsedStackWidthPx:Kt,trackWidth:Vt,hoverZIndexActive:zt}=Rt({slotCount:g,anchorIndex:Nt,size:u,stackStep:w,gap:T,fanOutEnabled:k,compact:a});if(g===0)return null;let{sx:L,...Ht}=l?.shell??{},{style:Dt,...$t}=l?.track??{};return jsx(nt,{className:m,...Ht,sx:[{justifyContent:"flex-start",...k||a?{width:"100%"}:{}},...Array.isArray(p)?p:p!=null?[p]:[],...Array.isArray(L)?L:L!=null?[L]:[]],children:jsx(it,{"data-testid":c,...$t,style:Dt,onMouseEnter:k?Et:void 0,onMouseLeave:k?Mt:void 0,trackWidth:Vt,minTrackWidth:a?u:Math.max(b,Kt),slotSize:u,hoverZIndex:zt?C:void 0,children:v.map((et,R)=>jsx(motion.div,{ref:Xt=>{Wt.current[R]=Xt;},initial:false,animate:{x:Lt[R]??0,opacity:tt[R]??1},transition:{duration:.22,ease:"easeOut"},style:{position:"absolute",top:0,left:R*w,zIndex:R,width:u,height:u,pointerEvents:tt[R]===0?"none":"auto"},children:et.render()},et.key))})})}function oe({children:t,maxItems:e,renderOverflow:r,slotSize:o=24,sx:i,...n}){let s=useMemo(()=>ee.Children.toArray(t),[t]),{visibleItems:a,hiddenItems:c}=useMemo(()=>M(s,e),[s,e]),p=c.length>0,m=useMemo(()=>[{"--chip-stack-slot-size":`${o}px`},...Array.isArray(i)?i:i!=null?[i]:[]],[o,i]);if(!p)return jsx($,{"data-testid":"ChipStack",...n,sx:m,children:t});let l=r?.({items:s,overflowItems:c,size:o});return jsxs($,{"data-testid":"ChipStack",...n,sx:m,children:[a,l??jsx(K,{title:`${c.length} more`,children:jsxs("span",{children:["+",c.length]})})]})}var J=memo(oe);function ie(t){return jsx(ct,{"data-testid":"OverlapChip",...t})}var Q=memo(ie);var ce=["static","fanout-right","fanout-left","fanout-center"],Y="static";function pe(t){let{variant:e=Y,maxItems:r,renderOverflow:o,children:i,items:n,getItemKey:s,renderItem:a,compact:c=false,"data-testid":p,slotProps:m,sx:l,className:f}=t,C=Children.count(i??null)>0,x=!C&&(n?.length??0)>0&&s!=null&&a!=null,d=mt(e,C,x);if(d===null)return null;if(d==="static-children"||d==="static-items"){let S=m?.layout?.size??24;if(d==="static-items"&&n&&s&&a){let{visibleItems:O,hiddenItems:k}=M(n,r),u=k.length>0?o?.({items:n,overflowItems:k,size:S})??jsx(K,{title:`${k.length} more`,children:jsxs("span",{children:["+",k.length]})}):null,w=jsxs(Fragment,{children:[O.map((T,b)=>jsx(Q,{children:a(T,b,{slotSize:S})},s(T,b))),u]});return jsx(J,{"data-testid":p,slotSize:S,sx:l,className:f,children:w})}return jsx(J,{"data-testid":p,maxItems:r,renderOverflow:o,slotSize:S,sx:l,className:f,children:i})}let A=lt(e),y={maxItems:r,renderOverflow:o,fanOutDirection:A,compact:c,"data-testid":p??"ChipStack",slotProps:m,sx:l,className:f};return d==="animated-children"?jsx(H,{...y,children:i}):jsx(H,{...y,items:n,getItemKey:s,renderItem:a})}var wt=pe;function he({item:t,sourceIndex:e,slotSize:r}){let[o,i]=useState(false),n=useRef(null);useEffect(()=>{i(false);},[t.logo]);let s=!t.logo||o,a=Z(t,e),c="transparent";s&&(n.current?.key!==a&&(n.current={key:a,fill:Aa()}),c=n.current.fill);let p$1=jsx(pt,{faceSize:r,avatarFill:c,src:s?void 0:t.logo,slotProps:s?void 0:{img:{onError:()=>i(true)}},children:yt(t)}),m=Tt(t);return m!=null&&m!==""?jsx(p,{title:m,children:p$1}):p$1}var fe=he;var dr=wt;export{h as a,D as b,Z as c,Q as d,ce as e,Y as f,wt as g,fe as h,dr as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {T,S,b as b$1}from'./chunk-
|
|
1
|
+
import {T,S,b as b$1}from'./chunk-MCX337WI.js';import {forwardRef,memo,createContext,useState,useRef,useCallback,useMemo,useContext}from'react';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var u=styled(T)(({theme:o})=>({[`& .${S.title}`]:{fontSize:"13px",fontWeight:700,lineHeight:o.typography.h6.lineHeight,borderBottom:`1px solid ${o.palette.divider}`,margin:0,padding:"16px 16px 16px 12px",color:o.palette.text.primary}})),x=styled("div")(({theme:o})=>({display:"flex",flexDirection:"column",gap:o.spacing(2),minWidth:"256px",padding:o.spacing(2)})),d=styled(b$1)(({theme:o})=>({paddingInline:o.spacing(3),paddingBlock:o.spacing(1),borderRadius:o.spacing(.5),minWidth:64,fontSize:"11px",fontWeight:o.typography.fontWeightMedium,color:o.palette.text.primary,textTransform:"none",border:`1px solid ${o.palette.divider}`,boxShadow:"none","&:hover":{boxShadow:"none",backgroundColor:o.palette.action.hover}})),y=styled("p")(({theme:o})=>({margin:0,fontSize:o.typography.fontSize,fontWeight:o.typography.fontWeightMedium,lineHeight:o.typography.body1.lineHeight})),D=styled("div")(({theme:o})=>({display:"flex",gap:o.spacing(1),justifyContent:"flex-end"}));var v=forwardRef(({message:o,title:t,confirmText:a,cancelText:i,onConfirm:r,onCancel:s,className:m,sx:e,...n},T)=>jsx(u,{ref:T,"data-testid":"ConfirmDialog",heading:t,className:m,sx:e,...n,children:jsxs(x,{children:[jsx(y,{children:o}),jsxs(D,{children:[jsx(d,{variant:"ghost",onClick:s,children:i||"No"}),jsx(d,{variant:"ghost",onClick:r,children:a||"Yes"})]})]})}));v.displayName="ConfirmDialog";var b=memo(v);var p=createContext(null);function W(){let o=useContext(p);if(!o)throw new Error("useConfirm must be used within <ConfirmDialogProvider>");return o}var R={open:false,message:null,title:void 0,confirmText:void 0,cancelText:void 0,sx:void 0,dismissible:true};function z({children:o}){let[t,a]=useState(R),i=useRef(null),r=useCallback(e=>{let n=i.current;n&&(i.current=null,a(R),n(e));},[]),s=useCallback(e=>new Promise(n=>{i.current?.(false),i.current=n,a({open:true,dismissible:e.dismissible??true,message:e.message,title:e.title,confirmText:e.confirmText,cancelText:e.cancelText,sx:e.sx});}),[]),m=useMemo(()=>({confirm:s}),[s]);return jsxs(p.Provider,{value:m,children:[o,jsx(b,{open:t.open,message:t.message,title:t.title,confirmText:t.confirmText,cancelText:t.cancelText,onConfirm:()=>r(true),onCancel:()=>r(false),onClose:t.dismissible?()=>r(false):void 0,sx:t.sx})]})}var O=memo(z);export{W as a,O as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {f as f$1}from'./chunk-
|
|
1
|
+
import {f as f$1}from'./chunk-6I4SV7SI.js';import {a as a$1}from'./chunk-YHZCWI2Z.js';import {a as a$2}from'./chunk-WJML27P6.js';import {a,f,e}from'./chunk-LF53Q3HW.js';import {z as z$1}from'./chunk-MCX337WI.js';import {Ka,g,yc}from'./chunk-W6W4YZ7G.js';import {Db}from'./chunk-3YAJNHQC.js';import {memo,useRef,useMemo,useCallback,useId,useState}from'react';import {styled,Typography,Box,Popper}from'@mui/material';import {useTranslation}from'react-i18next';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var O=styled(Typography)(()=>({display:"block",textAlign:"center",fontSize:"10px",fontWeight:500,color:"#8D8D94",padding:"24px 0"})),A=styled(Box,{shouldForwardProp:t=>t!=="isDisabled"})(({isDisabled:t})=>({display:"flex",justifyContent:"space-between",alignItems:"center",gap:"4px",...t&&{"& img":{opacity:.3}}}));var tt=memo(t=>{let{variant:e$1="inActive",badgeCount:o,label:r,...n}=t,s=useRef(null),m=useMemo(()=>!o||Number.isNaN(Ka(o))?null:jsx(z$1,{color:"inactive",children:g(Number(o))}),[o]),a$1=useCallback(p=>{p.stopPropagation(),t?.onClick?.(p);},[t]),l=a[e$1];return jsx(l,{"data-testid":"MultiSelectStatusButton",...n,ref:s,onClick:a$1,statusVariant:e$1,children:jsx(f,{children:jsxs(e,{variant:e$1,children:[r,m]})})})}),W=tt;function V(t){let e=new Set;return t.filter(o=>e.has(o.value)?false:(e.add(o.value),true))}function h(t,e){let o=e.toLowerCase();return t.reduce((r,n)=>{if(n.options?.length){let s=h(n.options,e);s.length&&r.push({...n,options:s});}else (n.placeholder?.toLowerCase().includes(o)||n.value.toLowerCase().includes(o))&&r.push(n);return r},[])}function it({buttonLabel:t,onClear:e,onConfirm:o,dropdownItems:r,apiKey:n,data:s,styles:m,buttonDisabled:a,searchable:l,searchPlaceholder:p}){let{t:Q}=useTranslation(),Y=p??`${Q("search")}...`,$=yc(useId(),"multi-select-dropdown-button"),[C,b]=useState(null),[u,d]=useState(""),G=c=>{b(c.currentTarget);},g=()=>{b(null),d("");},x=!!C,L=s?.[n],J=Array.isArray(L)?L.length:0,S=useMemo(()=>{if(!r)return r;let c=V(r);return !l||!u?c:h(c,u)},[l,u,r]),v=l&&!!u&&S?.length===0,U=l?jsxs(Fragment,{children:[jsx(a$1,{name:"multi-select-search",value:u,placeholder:Y,onSearchChange:d,onSearchReset:()=>d(""),sx:{pt:0}}),v&&jsx(O,{children:"No results found"})]}):void 0;return jsxs("div",{id:$,"data-testid":"MultiSelectDropdownButton",children:[jsx(W,{onClick:G,label:jsxs(A,{isDisabled:a,children:[t,jsx("img",{src:Db,alt:"arrow-down"})]}),disabled:a,badgeCount:J}),x&&jsx(a$2,{onClick:g}),jsx(Popper,{open:x,anchorEl:C,placement:"bottom-start",sx:{zIndex:9999},children:jsx(f$1,{onCloseDropdown:g,filter:{apiKey:n,data:s,onClear:e,onConfirm:o,options:S,type:"list"},styles:{...m,height:v?"auto":"300px",overflowY:"scroll",maxWidth:"200px"},header:U,searchable:l})})]})}var z=memo(it);var Ot=z;export{Ot as a};
|