PageSourceSearch

https://bro-depot.com/_next/static/chunks/pages/admin/handle-companies-249c26adee2d4cce.js

js bro-depot.com collected 2026-10-04 02:38:16 UTC 26,751 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1045],{27396:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/handle-companies",function(){return t(84956)}])},47018:function(e,n,t){"use strict";var i=t(85893),r=t(79072);n.Z=function(e){var n=e.title,t=e.subtitle;return(0,i.jsxs)(r.ZP,{item:!0,xs:12,children:[n,t||null]})}},89479:function(e,n,t){"use strict";t.d(n,{Tg:function(){return r},UW:function(){return i},jW:function(){return o}});var i=function(e){return e.stopPropagation()},r=function(e){return e.stopPropagation()},o=function(e){var n;e.ctrlKey&&"KeyA"===e.code&&(null===(n=e.target)||void 0===n||n.select()),e.stopPropagation()}},6328:function(e,n,t){"use strict";t.d(n,{V:function(){return o},f:function(){return r}});var i=t(96486),r={fullWidth:!0,size:"small"},o=function(e,n){return void 0!==n?n:e?e.includes(".")?(0,i.startCase)(e.split(".").pop()):(0,i.startCase)(e):""}},54474:function(e,n,t){"use strict";var i=t(47568),r=t(26042),o=t(69396),a=t(29815),s=t(70655),l=t(85893),c=t(6328),u=t(20986),d=t(87811),f=t(4451),v=t(23837),m=t(3695),h=t(53442),g=t(9041),p=t(80562),x=t(31538),j=t(96486),b=t(67294),Z=t(44993),w=function(e){return(0,l.jsx)("div",{className:"relative -mr-2",children:(0,l.jsx)("div",(0,o.Z)((0,r.Z)({},e),{children:(0,l.jsx)(d.G6,{})}))})};n.Z=function(e){var n=e.name,t=e.label,d=(e.placeholder,e.value),P=e.onChange,C=e.selectProps,N=e.promiseFn,y=e.className,I=void 0===y?"w-full sm:w-auto":y,k=e.refetchDependencies,z=void 0===k?[]:k,S=(0,b.useRef)(!1),R=(0,b.useState)(!1),F=R[0],D=R[1],W=(0,b.useState)(!1),M=W[0],O=W[1],T=(0,b.useState)([]),A=T[0],H=T[1],E=(0,b.useState)(!1),_=E[0],B=E[1],L=(0,c.V)(n,t),q=(0,f.a)().user,U=(0,v.b)(q),G=null===U||void 0===U?void 0:U.company.id,K=(0,b.useCallback)((0,i.Z)((function(){var e;return(0,s.__generator)(this,(function(t){switch(t.label){case 0:if(M||_||A.length>0)return[2];t.label=1;case 1:return t.trys.push([1,,3,4]),O(!0),B(!0),[4,N()];case 2:return(e=t.sent()).length&&!e.find((function(e){return e.value===d}))&&P(n,null),H(e),[3,4];case 3:return B(!1),[7];case 4:return[2]}}
1))})),[N,_,M,A.length]);return(0,b.useEffect)((function(){O(!1),H([])}),[G].concat((0,a.Z)(z))),(0,b.useEffect)((function(){(F||d)&&K()}),[K,F,d]),(0,b.useEffect)((function(){S.current=!0}),[]),(0,l.jsxs)(Z.u,{size:"small",className:null!==I&&void 0!==I?I:"",children:[(0,l.jsx)(m.Z,{id:"".concat(n,"-select-label"),children:L}),(0,l.jsx)(h.Z,(0,o.Z)((0,r.Z)({id:"".concat(n,"-select"),open:F&&!_,onOpen:function(){return D(!0)},onClose:function(){return D(!1)},value:A.find((function(e){return e.value===d}))?d:"",label:L,onChange:function(e){P(n,e.target.value)},labelId:"".concat(n,"-select-label"),IconComponent:w,endAdornment:(0,l.jsxs)(g.Z,{position:"end",children:[_&&(0,l.jsx)(u.Ho,{className:"animate-spin"}),(0,l.jsx)(p.Z,{size:"small",edge:"end",onMouseDown:function(e){return e.preventDefault()},onClick:function(){return P(n,void 0)},children:(0,l.jsx)(u.Tw,{})})]})},C),{children:(0,j.map)(A,(function(e,n){return(0,l.jsx)(x.Z,{value:e.value,children:e.label},n)}))}))]})}},79724:function(e,n,t){"use strict";var i=t(26042),r=t(69396),o=t(85893),a=t(30120),s=t(62135),l=t(54225),c=t(67294);n.Z=function(e){var n=e.name,t=e.label,u=e.value,d=e.onChange,f=e.filterOptions,v=e.buttonGroupProps,m=e.disableClearAll,h=void 0!==m&&m,g=function(){var e=f.find((function(e){return e.value===u}));return null===e||void 0===e?void 0:e.label},p=(0,c.useState)({value:null!==u&&void 0!==u?u:void 0,label:u?g():""}),x=p[0],j=p[1];return(0,c.useEffect)((function(){var e;j({value:null!==u&&void 0!==u?u:void 0,label:null!==(e=g())&&void 0!==e?e:""})}),[u]),(0,c.useEffect)((function(){x&&d(n,null===x||void 0===x?void 0:x.value)}),[x]),(0,o.jsxs)(a.Z,{className:"flex items-center gap-2",sx:{mr:"1.5rem",my:1,mb:"0.5rem"},children:[(0,o.jsx)("div",{hidden:!t,className:"text-xs font-bold",children:t}),(0,o.jsx)("div",{className:"grow",children:(0,o.jsx)(s.Z,(0,r.Z)((0,i.Z)({variant:"outlined",size:"small"},v),{children:f.map((function(e,n,t){var i="outlined";return e.value===(null===x||void 0===x?void 0:x.value)&&(i="contained"),(0,o.jsx)(l.Z,{onClick:function(){!function(e){var n;if(h)j(e);else if("boolean"===typeof u&&e.value===x.value)j({value:void 0,label:null!==(n=g())&&void 0!==n?n:""});else if(e.value===x.value){var t;j({value:void 0,label:null!==(t=g())&&void 0!==t?t:""})}else j(e)}(e)},variant:i,children:e.label},n)}))}))})]})}},44993:function(e,n,t){"use strict";t.d(n,{U:function(){return s},u:function(){return l}});var i=t(14924),r=t(67836),o=t(55343),a=t(13264),s=(0,a.Z)(r.Z)((function(e){var n=e.theme;return(0,i.Z)({marginRight:"1rem",marginBottom:"0.5rem"},n.breakpoints.down("md"),{marginRight:"0rem"})})),l=(0,a.Z)(o.Z)((function(e){var n=e.theme;return(0,i.Z)({marginRight:"1rem",marginBottom:"0.5rem"},n.breakpoints.down("md"),{marginRight:"0rem"})}))},53273:function(e,n,t){"use strict";t.d(n,{Z:function(){return f}});var i=t(26042),r=t(85893),o=t(20986),a=t(9041),s=t(80562),l=t(96486),c=t(67294),u=t(47516),d=t(44993);var f=function(e){var n=e.name,t=(e.label,e.placeholder),f=e.value,v=e.trimValue,m=void 0!==v&&v,h=e.onChange,g=e.otherInputProps,p=e.prefix,x=(void 0===p&&u.Goc,(0,c.useState)(f||void 0)),j=x[0],b=x[1],Z=(0,c.useCallback)((0,l.debounce)((function(e){var t,i=(t=e)?t.replace(/^\s*|\s*$/g,""):t;h(n,i)}),300),[]),w=(0,c.useCallback)((0,l.debounce)(b,1e3),[]);return(0,c.useEffect)((function(){w.cancel(),Z(j)}),[j]),(0,c.useEffect)((function(){w(f||void 0)}),[f]),(0,r.jsx)("div",{children:(0,r.jsx)(d.U,(0,i.Z)({size:"small",value:j||"",placeholder:t,onChange:function(e){var n=m?e.target.value.trim():e.target.value;b(n)},InputProps:{endAdornment:(0,r.jsx)(a.Z,{position:"end",children:(0,r.jsx)(s.Z,{size:"small",onClick:function(){b(void 0),Z(void 0)},children:(0,r.jsx)(o.Tw,{})})})}},g))})}},5837:function(e,n,t){"use strict";t.d(n,{UP:function(){return s}});var i=t(26042),r=t(69396),o=t(81719),a=t(23378),s=(0,o.ZP)(a.Z)((function(e){e.theme;return{height:20,fontSize:"0.75rem",fontWeight:600,mr:1}})),l=function(e){return"colors"!==e&&"direction"!==e},c=(0,o.ZP)(a.Z,{shouldForwardProp:l})((function(e){var n=e.colors;return(0,i.Z)({color:"white"},(null===n||void 0===n?void 0:n.length)&&{backgroundColor:n[n.length-1]})}));(0,o.ZP)(c,{shouldForwardProp:l})((function(e){var n=e.colors;return(0,r.Z)((0,i.Z)({color:"white"},(null===n||void 0===n?void 0:n.length)&&{backgroundColor:n[n.length-1]}),{height:20,fontSize:"0.75rem",fontWeight:600,mr:1})}))},61283:function(e,n,t){"use strict";var i=t(85893),r=t(85518);
1n.Z=function(e){var n=e.children;return(0,i.jsx)("div",{className:"datagrid-pro-host flex h-full w-full",children:(0,i.jsx)("div",{className:"grow",style:r.tq?{width:"calc(100vw - 40px)"}:void 0,children:n})})}},51548:function(e,n,t){"use strict";var i=t(85893),r=t(67062);n.Z=function(e){var n=e.date,t=e.containerClassName,o=void 0===t?"flex flex-col items-center gap-y-0.5":t,a=e.dateClassName,s=void 0===a?"font-bold text-sm":a,l=e.timeClassName,c=void 0===l?"text-3xs":l,u=e.dateFormat;return(0,i.jsxs)("div",{className:o,children:[(0,i.jsx)("span",{className:s,children:n?(0,r.p6)(n,u):"\u274c Date"}),(0,i.jsx)("span",{className:c,hidden:!n,children:!!n&&(0,r.mr)(n)})]})}},94805:function(e,n,t){"use strict";var i=t(26042),r=t(69396),o=t(85893),a=t(9942),s=t(54225),l=t(29620),c=t(80562),u=t(95398),d=t(30120),f=t(29630),v=t(67294),m=t(20986),h=(0,v.forwardRef)((function(e,n){return(0,o.jsx)(a.Z,(0,i.Z)({ref:n},e))}));n.Z=function(e){var n,t=e.children,a=e.isOpen,g=e.setIsOpen,p=e.dialogProps,x=e.button,j=e.buttonContent,b=void 0===j?"Open":j,Z=e.title,w=e.description,P=e.maxWidth,C=void 0===P?"md":P,N=(0,v.useCallback)((function(e,n){g(!1)}),[]),y=(0,v.useCallback)((function(e){g(!0)}),[]);return(0,o.jsxs)(o.Fragment,{children:[x||(0,o.jsx)(s.Z,{variant:"contained",sx:{mb:2.5,whiteSpace:"nowrap"},onClick:y,children:b}),(0,o.jsxs)(l.Z,(0,r.Z)((0,i.Z)({fullWidth:!0,maxWidth:C,scroll:"paper",onClose:N,TransitionComponent:h,open:a},p),{PaperProps:(0,r.Z)((0,i.Z)({},null===p||void 0===p?void 0:p.PaperProps),{sx:(0,i.Z)({position:"relative"},null===p||void 0===p||null===(n=p.PaperProps)||void 0===n?void 0:n.sx)}),children:[(0,o.jsx)(c.Z,{size:"small",onClick:function(){return g(!1)},sx:{position:"absolute",right:"1rem",top:"1rem",zIndex:1},children:(0,o.jsx)(m.Tw,{})}),(0,o.jsxs)(u.Z,{sx:{pb:6,px:[4,11],pt:[5,8.5]},children:[(Z||w)&&(0,o.jsxs)(d.Z,{sx:{mb:8,textAlign:"center"},children:[Z&&(0,o.jsx)(f.Z,{variant:"h6",sx:{mb:2,lineHeight:"2rem"},children:Z}),w&&(0,o.jsx)(f.Z,{variant:"body2",children:w})]}),t]})]}))]})}},45209:function(e,n,t){"use strict";t.d(n,{u:function(){return g}});var i=t(26042),r=t(69396),o=t(99534),a=t(85893),s=t(9942),l=t(29620),c=t(77745),u=t(80562),d=t(54225),f=t(95398),v=t(13264),m=t(67294),h=t(20986),g=(0,m.forwardRef)((function(e,n){return(0,a.jsx)(s.Z,(0,i.Z)({ref:n},e))})),p=(0,v.Z)(l.Z)((function(e){var n=e.theme;return{"& .MuiDialogContent-root":{padding:n.spacing(2)},"& .MuiDialogActions-root":{padding:n.spacing(1)}}})),x=function(e){var n=e.children,t=e.onClose,s=e.rightPlaceholder,l=(0,o.Z)(e,["children","onClose","rightPlaceholder"]);return(0,a.jsxs)(c.Z,(0,r.Z)((0,i.Z)({sx:{mx:2,p:2}},l),{children:[(0,a.jsxs)("div",{className:"mr-10 flex justify-between",children:[(0,a.jsx)("div",{children:n}),(0,a.jsx)("div",{children:s})]}),t?(0,a.jsx)(u.Z,{"aria-label":"close",onClick:t,sx:{position:"absolute",right:8,top:4,color:function(e){return e.palette.grey[500]}},children:(0,a.jsx)(h.Tw,{})}):null]}))};n.Z=function(e){var n=e.children,t=e.isOpen,o=e.setIsOpen,s=e.dialogProps,l=e.button,c=e.buttonContent,u=void 0===c?"Open":c,v=e.title,h=e.description,j=e.hasTitle,b=void 0===j||j,Z=e.disableClose,w=void 0!==Z&&Z,P=e.rightPlaceholder,C=(0,m.useCallback)((function(){w||o(!1)}),[]),N=(0,m.useCallback)((function(e){o(!0)}),[]);return(0,a.jsxs)(a.Fragment,{children:[l||(0,a.jsx)(d.Z,{variant:"contained",sx:{mb:2.5,whiteSpace:"nowrap"},onClick:N,children:u}),(0,a.jsxs)(p,(0,r.Z)((0,i.Z)({fullWidth:!0,maxWidth:"md",scroll:"paper",onClose:C,TransitionComponent:g,open:t},s),{children:[b&&(0,a.jsxs)(x,{rightPlaceholder:P,onClose:C,children:[v&&(0,a.jsx)("div",{className:"text-[1.125rem] font-[600]",children:v}),h&&(0,a.jsx)("div",{className:"text-sm tracking-[0.1px] text-gray-500",children:h})]}),(0,a.jsx)(f.Z,{dividers:!0,children:n})]}))]})}},19248:function(e,n,t){"use strict";t.d(n,{IF:function(){return f},KD:function(){return d},OJ:function(){return u},Te:function(){return l},ZK:function(){return s},Z_:function(){return c},_8:function(){return v}});var i=t(45155),r=t(51649),o=t(5434),a=t(79352),s=i.B7O,l=i.cdp,c=a.VhL,u=a.pb1,d=r.do9,f=a.UMo,v=o.uKn},87811:function(e,n,t){"use strict";t.d(n,{AD:function(){return l},G6:function(){return a},HD:function(){return u},Ms:function(){return o},Ye:function(){return c},qg:function(){return s}});var i=t(80471),r=t(86893),o=r.rH8,a=r.bTu,s=r.YFh,l=r.Tfp,c=i.kEI,u=i.BM_},31753:function(e,n,t){"use strict";t.d(n,{ai:function(){return T},ZP:function(){return H}});var i=t(85893),r=t(20986),o=t(87811),a=t(57891),s=t(54225),l=t(92096),c=t(80562),u=t(13264),d=t(18377),f=t(85518),v=t(89479),m=t(44414),h=t(17575),g=t(9942),p=t(25675),x=t.n(p),j=t(67294),b=t(19248),Z=t(30120),w=function(e){var n=(0,j.use
1State)(!1),t=n[0],r=n[1],o=e.src,a=(e.width,e.alt,e.style,e.className),s=e.closeTooltip,l=e.openPreview,u=o;return(0,m.y)(o)||(u="/assets/images/imageNotFound.png"),(0,i.jsxs)(Z.Z,{className:"".concat(a," relative min-w-fit max-w-fit"),onMouseOver:function(){return r(!0)},onMouseLeave:function(){return r(!1)},children:[t&&(0,i.jsx)(Z.Z,{className:"absolute z-10 flex h-full w-full items-center justify-center rounded-md",sx:{backgroundColor:"rgb(71, 85, 105, 0.6)"},children:(0,i.jsxs)(c.Z,{className:"h-full w-full",disableRipple:!0,size:"small",onClick:function(e){l&&l(),s&&s(),e.stopPropagation()},children:[(0,i.jsx)(b.Z_,{className:"text-gray-300"}),(0,i.jsx)("span",{className:"text-gray-300",children:"Preview"})]})}),(0,i.jsx)(Z.Z,{component:"img",alt:"",style:{maxHeight:"25vh",minHeight:"15vh",maxWidth:"25vw",minWidth:"8vw"},id:"hover-image-rounded",className:"rounded-lg",src:u})]})},P=t(96486),C=(0,j.createContext)(void 0),N=function(e){var n=e.children,t=e.imgArray,r=e.imageSize,o=e.disablePreview,a=(e.futureProp,(0,j.useState)(!1)),s=a[0],l=a[1],c=(0,j.useState)(void 0),u=c[0],d=c[1],f=(0,j.useState)(t),v=f[0],m=f[1],h=(0,j.use
1State)(null!==r&&void 0!==r?r:54),g=h[0],p=h[1],x=(0,j.useMemo)((function(){return 0!==v.length&&1!==v.length&&0!==v.findIndex((function(e){return e.content===(null===u||void 0===u?void 0:u.content)}))}),[v,u]),b=(0,j.useMemo)((function(){return 0!==v.length&&1!==v.length&&v.findIndex((function(e){return e.content===(null===u||void 0===u?void 0:u.content)}))!==v.length-1}),[v,u]),Z=(0,j.useCallback)((function(e){null===e||void 0===e||e.stopPropagation();var n=v.findIndex((function(e){return e.content===(null===u||void 0===u?void 0:u.content)})),t=v[n-1];d(t)}),[v,u]),w=(0,j.useCallback)((function(e){null===e||void 0===e||e.stopPropagation();var n=v.findIndex((function(e){return e.content===(null===u||void 0===u?void 0:u.content)})),t=v[n+1];d(t)}),[v,u]),N=(0,j.useCallback)((function(e){o||l(e)}),[o]);(0,j.useEffect)((function(){(0,P.isEqual)(v,t)||m(t)}),[t]);var y=(0,j.useMemo)((function(){return{images:v,imageInPreview:u,setImageInPreview:d,previewOpen:s,handlePreview:N,setImages:m,hasPrevImage:x,hasNextImage:b,onPrevImage:Z,onNextImage:w,imageSize:g,setImageSize:p,disablePreview:o}}),[v,u,s,x,b,Z,w,g,N,o]);return(0,i.jsx)(C.Provider,{value:y,children:n})},y=function(){var e=(0,j.useContext)(C);if(!e)throw new Error("No Context.Provider found when calling useContext.");return e},I=(0,u.Z)(d.Z)((function(e){return{borderRadius:e.theme.shape.borderRadius,objectFit:"contain",border:"1px solid rgb(102 108 255)"}})),k=(0,u.Z)(x())((function(e){var n=e.theme;return{borderRadius:n.shape.borderRadius,objectFit:"contain",backgroundColor:n.palette.background.paper,border:"1px solid rgb(102 108 255) !important"}})),z=function(e){var n,t=y(),r=t.handlePreview,o=t.setImageInPreview,a=t.imageSize,s=t.disablePreview,l=e.index,c=e.img,u=e.alt,f=void 0===u?"":u,p=(0,j.useState)(!1),x=p[0],b=p[1],Z=function(){return b(!1)},P=null!==(n=null===c||void 0===c?void 0:c.thumbnail)&&void 0!==n?n:null===c||void 0===c?void 0:c.content,C=null===c||void 0===c?void 0:c.content,N=(0,m.R)(P);return(0,m.y)(P)||(P="/assets/images/imageNotFound.png"),(0,i.jsx)(h.Z,{open:x,onOpen:function(){s||b(!0)},onClose:function(){return Z()},componentsProps:{tooltip:{sx:{padding:"0px"}}},onClick:v.UW,TransitionComponent:g.Z,enterDelay:0,leaveDelay:.05,placement:"top",color:"transparent",title:(0,i.jsx)(w,{alt:"",style:{maxHeight:"25vh",minHeight:"15vh",maxWidth:"25vw",minWidth:"8vw"},className:"rounded-lg",src:C,closeTooltip:Z,openPreview:function(){o(c),r(!0)}}),children:N?(0,i.jsx)(d.Z,{className:"flex items-center",children:(0,i.jsx)(k,{src:P,alt:f,height:a,width:a})}):(0,i.jsx)(I,{component:"img",src:P,alt:f,sx:{height:a,width:a}})},l)},S=t(23926),R=(0,u.Z)(d.Z)((function(e){return{marginRight:"0.25rem",borderRadius:e.theme.shape.borderRadius,objectFit:"contain",border:"1px solid rgb(102 108 255)"}})),F=(0,u.Z)(x())((function(e){var n=e.theme;return{borderRadius:n.shape.borderRadius,objectFit:"contain",backgroundColor:n.palette.background.paper,border:"1px solid rgb(102 108 255) !important"}})),D=function(e){var n,t=y(),r=t.handlePreview,o=t.setImageInPreview,a=t.imageSize,s=e.index,l=e.img,c=e.alt,u=void 0===c?"":c,f=(0,j.useState)(!1),v=f[0],p=f[1],x=function(){return p(!1)},b=null!==(n=null===l||void 0===l?void 0:l.thumbnail)&&void 0!==n?n:null===l||void 0===l?void 0:l.content,Z=null===l||void 0===l?void 0:l.content,P=(0,m.R)(b);return(0,m.y)(b)||(b="/assets/images/imageNotFound.png"),(0,i.jsx)(S.Z,{onClickAway:x,children:(0,i.jsx)("div",{children:(0,i.jsx)(h.Z,{PopperProps:{disablePortal:!0},disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,open:v,onClick:function(){return p(!0)},onClose:function(){return x()},componentsProps:{tooltip:{sx:{padding:"0px"}}},TransitionComponent:g.Z,placement:"top",color:"transparent",title:(0,i.jsx)(w,{alt:"",style:{maxHeight:"25vh",minHeight:"15vh",maxWidth:"25vw",minWidth:"8vw"},className:"rounded-lg",src:Z,closeTooltip:x,openPreview:function(){o(l),r(!0)}}),children:P?(0,i.jsx)(d.Z,{className:"mr-3 flex items-center",children:(0,i.jsx)(F,{src:b,alt:u,height:a,width:a})}):(0,i.jsx)(R,{component:"img",src:b,alt:u,sx:{height:a,width:a,mr:"0.75rem"}})},s)})})},W=(0,u.Z)(d.Z)((function(e){e.theme;return{position:"fixed",zIndex:2,width:"100%",backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",justifyContent:"end",alignItems:"end",flexDirection:"column",padding:"0.25rem"}})),M=(0,u.Z)(d.Z)((function(e){e.theme;return{position:"fixed",zIndex:1,width:"3rem",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column",padding:"0.25rem"}})),O=(0,u.Z)(s.Z)((function(e){var n=e.theme,t=e.color;return{backgroundColor:n.palette["".concat(t)].main,color:n.palette["".concat(t)].contrastText,"&:hover":{backgroundColor:"".concat(n.palette["".concat(t)].dark," !important"),color:"".concat(n.palette["".concat(t)].light," !important")}}})),T=function(e){var n=e.previewOpen,t=e.handleClose,a=e.imageInPreview,s=e.onPrevImage,u=e.onNextImage,f=e.hasPrevImage,v=e.hasNextImage;return(0,i.jsx)(l.Z,{open:n,onClose:t,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",sx:{zIndex:1501},children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(W,{children:(0,i.jsx)(c.Z,{onClick:t,children:(0,i.jsx)(r.Tw,{className:"text-gray-300"})})}),(0,i.jsx)(M,{sx:{left:0},children:(0,i.jsx)(O,{color:"secondary",onClick:s,disabled:!f,children:(0,i.jsx)(o.qg,{size:25})})}),(0,i.jsx)(M,{sx:{right:0},children:(0,i.jsx)(O,{color:"secondary",onClick:u,disabled:!v,children:(0,i.jsx)(o.AD,{size:25})})}),(0,i.jsx)(d.Z,{className:"flex h-full flex-col items-center justify-center",onClick:t,children:(0,i.jsx)("img",{src:null===a||void 0===a?void 0:a.content,alt:"expanded-preview",style:{maxHeight:"85%",maxWidth:"90%"},onClick:function(e){return e.stopPropagation()}})})]})})},A=function(e){var n=e.className,t=y(),r=t.images,o=t.previewOpen,s=t.handlePreview,l=t.imageInPreview,c=t.hasPrevImage,u=t.hasNextImage,d=t.onNextImage,v=t.onPrevImage,m=f.nI?z:D;return(0,i.jsxs)("div",{id:"hover-preview",className:"flex flex-wrap gap-1 ".concat(n),children:[(0,i.jsx)(T,{previewOpen:o,handleClose:function(e){s(!1),e&&!(0,a.Q)(e)&&(null===e||void 0===e||e.stopPropagation())},imageInPreview:l,onNextImage:d,onPrevImage:v,hasPrevImage:c,hasNextImage:u}),null===r||void 0===r?void 0:r.map((function(e,n){return(0,i.jsx)(m,{index:n,img:e,alt:"Array ".concat(n)},n)}))]})},H=function(e){var n=e.className,t=void 0===n?"":n,r=e.imgArray,o=e.numOfImages,a=void 0===o?3:o,s=e.imageSize,l=e.disablePreview,c=void 0!==l&&l;if(!r||0===r.length)return null;var u=r.slice(0,a);return(0,i.jsx)(N,{imgArray:u,imageSize:s,disablePreview:c,children:(0,i.jsx)(A,{className:t})})}},94062:function(e,n,t){"use strict";t.d(n,{Z:function(){return p}});var i=t(85893),r=t(87811),o=t(30120),a=t(89125),s=t(54225),l=t(81719),c=t(20986),u=t(67836),d=t(96486),f=t(67294),v=(0,l.ZP)(s.Z,{name:"StyledButton",slot:"Wrapper"})((function(){return{margin:0,padding:0,paddingLeft:5,paddingRight:5,minWidth:"10px"}})),m=function(e){var n=e.onPageChange,t=(0,f.useState)(""),r=t[0],o=t[1],a=(0,f.useId)();return(0,i.jsx)("div",{children:(0,i.jsx)(u.Z,{id:"go-to-page-".concat(a),value:r,label:"Go To",
1size:"small",onChange:function(e){return function(e){var n=e.target.value.replace(/[^0-9]/g,"");o(n)}(e)},sx:{minWidth:"5.5rem"},InputProps:{autoComplete:"off",endAdornment:(0,i.jsx)(v,{onClick:function(e){return function(e){var t=(0,d.parseInt)(r);n(e,t>0?t-1:t),o("")}(e)},children:(0,i.jsx)(c.Ye,{size:28})})}})})},h=(0,l.ZP)(s.Z,{name:"StyledButton",slot:"Wrapper"})((function(){return{marginRight:"0.5rem",minWidth:"40px"}})),g=function(e){var n=e.count,t=e.page,a=e.onPageChange,l=e.rowsPerPage,c=e.showFirstButton,u=e.showLastButton,d=0===n?0:Math.ceil(n/l)-1;return(0,i.jsxs)(o.Z,{className:"mx-8 flex items-center",children:[c&&(0,i.jsx)(h,{size:"small",variant:"text",disabled:0===t,onClick:function(e){return a(e,0)},children:(0,i.jsx)(r.HD,{size:20})}),(0,i.jsx)(h,{size:"small",variant:"text",disabled:0===t,onClick:function(e){return a(e,t-1)},children:(0,i.jsx)(r.qg,{size:20})}),function(){var e=t>=3?t-3:0,i=Math.ceil(n/l),r=i<6?i:6,o=e+r,a=o>i?Math.abs(o-i):0;return Array.from({length:r},(function(n,t){return e-a+t}))}().map((function(e){return(0,i.jsx)(s.Z,{size:"small",sx:{mr:1,minWidth:"32px"},variant:t===e?"contained":"outlined",onClick:function(n){return a(n,e)},children:e+1},e)})),(0,i.jsx)(h,{size:"small",variant:"text",disabled:n<=l*(t+1),onClick:function(e){return a(e,t+1)},children:(0,i.jsx)(r.AD,{size:20})}),u&&(0,i.jsx)(h,{size:"small",variant:"text",disabled:t===d,onClick:function(e){a(e,d)},children:(0,i.jsx)(r.Ye,{size:20})}),(0,i.jsx)(m,{onPageChange:a})]})},p=function(e){var n=e.page,t=e.setPage,r=e.pageSize,o=e.setPageSize,s=e.rowsPerPageOption,l=void 0===s?[10,25,50]:s,c=e.showFirstButton,u=void 0===c||c,d=e.showLastButton,f=void 0===d||d,v=e.totalRows;return(0,i.jsx)(a.Z,{rowsPerPageOptions:l,component:"div",count:v,rowsPerPage:r,page:Math.min(v/r,n),onPageChange:function(e,n){t(n)},onRowsPerPageChange:function(e){o(+e.target.value),t(0)},labelRowsPerPage:"",ActionsComponent:g,showFirstButton:u,showLastButton:f})}},35925:function(e,n,t){"use strict";t.d(n,{$:function(){return r},H:function(){return o}});var i=t(96486),r=function(e,n,t,r){var a=e.minQuantity,s=e.maxQuantity;if(r&&t){var l=o(r,t||[]);a=Math.ceil(a/l),(0,i.isNil)(s)||(s=Math.ceil(s/l))}if(a=Math.ceil(a),e.fixedDiscount)return"Buy ".concat(a," ").concat((null===r||void 0===r?void 0:r.toLocaleLowerCase())||""," get ").concat(e.fixedDiscount.toFixed(2)).concat(n," off");if(e.percentageDiscount)return"Buy ".concat(a," ").concat((null===r||void 0===r?void 0:r.toLocaleLowerCase())||""," get ").concat((100*e.percentageDiscount).toFixed(2),"% off");throw new Error("Invalid discount tier!")},o=function(e,n){for(var t=e,i=1;;){var r=n.find((function(e){return e.unit===t}));if(!r)break;if(i*=r.quantity,t=r.unit,!r.fromUnit)break;t=r.fromUnit}return i}},67062:function(e,n,t){"use strict";t.d(n,{mr:function(){return c},o0:function(){return l},p6:function(){return s},qb:function(){return a},rN:function(){return u}});var i=t(32912),r=t(83863),o=t(96486),a=function(e){return!(0,o.isNil)(e)&&!Number.isNaN(new Date(e).getTime())},s=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"dd-MM-yyyy";return a(e)?(0,i.default)(new Date(e),n):null},l=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"dd-MM-yyyy HH:mm:ss";return a(e)?(0,i.default)(new Date(e),n):null},c=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"HH:mm:ss";return a(e)?(0,i.default)(new Date(e),n):null},u=function(e){return a(e)?(0,r.Z)(new Date(e),{format:"extended",representation:"complete"}):null}},57891:function(e,n,t){"use strict";t.d(n,{Q:function(){return i}});var i=function(e){var n=!0;return!e||(Object.keys(e).forEach((function(t){var i=e[t];void 0!==i&&("number"===typeof i?Number.isNaN(i)||(n=!1):null!==i&&(n=!1))})),n)}},84956:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return y}});var i=t(85893),r=t(14924),o=t(26042),a=t(69396),s=t(61283),l=t(94062),c=t(47018),u=t(79072),d=t(29630),f=t(49837),v=t(25836),m=t(67294),h=t(71815),g=t(96277),p=(0,m.createContext)(void 0),x=function(e){var n=e.children,t=e.defaultFilters,r=(0,m.useState)(0),o=r[0],a=r[1],s=(0,m.useState)(10),l=s[0],c=s[1],u=(0,m.useState)((function(){return t||{}})),d=u[0],f=u[1],v=(0,m.useState)([]),h=v[0],x=v[1],j=(0,g.CiI)({variables:{filter:d,page:o,perPage:l,sortField:"createdAt",sortOrder:g.Asd.Desc}}),b=j.refetch,Z=j.loading,w=j.data,P=(0,m.useMemo)((function(){return{rows:(null===w||void 0===w?void 0:w.allCompanies.companies)||[],totalRows:(null===w||void 0===w?void 0:w.allCompanies.total)||0}}),[w]),C=P.rows,N=P.totalRows;(0,m.useEffect)((function(){x([])}),[d]);var y=(0,m.useMemo)((function(){return{rows:C,totalRows:N,filters:d,setFilters:f,page:o,setPage:a,pageSize:l,setPageSize:c,selectedIds:h,setSelectedIds:x,loading:Z,refetch:b}}),[C,d,N,o,l,h,Z,b]);return(0,i.jsx)(p.Provider,{value:y,children:n})},j=(p.Consumer,t(79724)),b=t(53273),Z=t(30120),w=t(85518),P=function(e){var n=e.filters,t=e.handleFilter;return(0,i.jsxs)(Z.Z,{sx:{p:5,pb:3,display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between"},children:[(0,i.jsx)(Z.Z,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center"},children:(0,i.jsx)(b.Z,{name:"name",placeholder:"Search Company Name",value:null===n||void 0===n?void 0:n.name,onChange:t})}),(0,i.jsx)(Z.Z,{sx:[{display:"flex",flexDirection:"row",alignItems:"center"},w.tq&&{flexWrap:"wrap"}],children:(0,i.jsx)(j.Z,{name:"isActive",value:null===n||void 0===n?void 0:n.isActive,label:"Active:",onChange:t,filterOptions:[{value:!0,label:"Yes"},{value:!1,label:"No"}]})})]})},C=function(e){var n=function(){var e=(0,m.useContext)(p);if(!e)throw new Error("No Context.Provider found when calling useContext.");return e}(),t=n.loading,g=n.rows,x=n.totalRows,j=n.page,b=n.setPage,Z=n.pageSize,w=n.setPageSize,C=n.filters,N=n.setFilters,y=(0,m.useCallback)((function(){return"auto"}),[]);return(0,i.jsxs)(u.ZP,{container:!0,spacing:6,children:[(0,i.jsx)(c.Z,{title:(0,i.jsx)("div",{className:"flex items-center justify-between"}),subtitle:(0,i.jsx)(d.Z,{variant:"body2"})}),(0,i.jsx)(u.ZP,{item:!0,xs:12,children:(0,i.jsx)(u.ZP,{container:!0,spacing:6,children:(0,i.jsxs)(u.ZP,{item:!0,xs:12,children:[(0,i.jsx)(f.Z,{className:"mb-4",children:(0,i.jsx)(P,{filters:C,handleFilter:function(e,n){N((0,a.Z)((0,o.Z)({},C),(0,r.Z)({},e,n)))}})}),(0,i.jsx)(f.Z,{children:(0,i.jsx)(s.Z,{children:(0,i.jsx)(v.s,{pagination:!0,page:j,pageSize:Z,rowCount:x,rows:g,columns:h.iH,loading:t,paginationMode:"server",onPageSizeChange:w,onPageChange:b,rowsPerPageOptions:[10,25,50,100],throttleRowsMs:2e3,getRowHeight:y,autoHeight:!0,disableSelectionOnClick:!0,initialState:{pinnedColumns:{right:[]}},components:{Pagination:l.Z},componentsProps:{pagination:{page:j,setPage:b,pageSize:Z,setPageSize:w,totalRows:x}}})})})]})})})]})},N=function(){return(0,i.jsx)(x,{children:(0,i.jsx)(C,{})})};N.acl={action:"manage",subject:"super_admin"};var y=N}},function(e){e.O(0,[7536,5428,1718,5836,308,7297,1815,9774,2888,179],(function(){return n=27396,e(e.s=n);var n}));var n=e.O();_N_E=n}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.