1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[89653],{1732:(e,t,l)=>{l.d(t,{AM:()=>o,Wv:()=>i,hl:()=>d});var a=l(95155),n=l(12115),s=l(8924),r=l(86190);let o=s.bL,i=s.l9,d=n.forwardRef(({className:e,align:t="center",sideOffset:l=4,container:n,...o},i)=>(0,a.jsx)(s.ZL,{container:n,children:(0,a.jsx)(s.UC,{ref:i,align:t,sideOffset:l,className:(0,r.cn)("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));d.displayName=s.UC.displayName},10364:(e,t,l)=>{l.d(t,{b:()=>s,fx:()=>o,hL:()=>n,k$:()=>i});let a=null;function n(e){a=e&&"object"==typeof e?e:null}function s(){return a}let r=null;function o(e){r="function"==typeof e?e:null}async function i(e,t=4e3){if(!r||!e)return!1;let l=String(e).toLowerCase(),n=()=>{let e=a?.activeForm?.fields;return!!Array.isArray(e)&&e.some(e=>(Array.isArray(e?.options)?e.options:[]).some(e=>String(e?.value??"").toLowerCase()===l||String(e?.label??"").toLowerCase()===l))};try{r()}catch{return!1}let s=Date.now()+t;for(;Date.now()<s;){if(n())return!0;await new Promise(e=>setTimeout(e,120))}return!1}},17595:(e,t,l)=>{l.d(t,{A:()=>w,R:()=>v});var a=l(95155),n=l(68189),s=l(42067),r=l(1445),o=l(97716),i=l(70733),d=l(86190),c=l(76527),u=l(73321),m=l(12115),p=l(27449),f=l(54586),h=l(56563),x=l(94514),g=l(1732),b=l(60848);function j({filter:e,value:t,onChange:l,filterTranslationScope:s}){let[r,o]=(0,m.useState)(!1),i=e.options?.find(e=>e.value===t);return(0,a.jsxs)(g.AM,{open:r,onOpenChange:o,children:[(0,a.jsx)(g.Wv,{asChild:!0,children:(0,a.jsxs)(n.Button,{variant:"outline",role:"combobox","aria-expanded":r,className:"col-span-2 h-8 justify-between text-sm font-normal",children:[(0,a.jsx)("span",{className:"truncate",children:i?v(i.label,e,s):v(e.placeholder,e,s)||"Select..."}),(0,a.jsx)(h.A,{className:"ml-auto h-4 w-4 shrink-0 opacity-50"})]})}),(0,a.jsx)(g.hl,{className:"w-[--radix-popover-trigger-width] p-0",align:"start",children:(0,a.jsxs)(b.uB,{children:[(0,a.jsx)(b.G7,{placeholder:`${v(e.label,e,s)||""}...`}),(0,a.jsxs)(b.oI,{children:[(0,a.jsx)(b.xL,{children:"function"==typeof s&&s.has?.("not_found")?s("not_found"):"â"}),e.options?.map(e=>(0,a.jsxs)(b.h_,{value:e.label,onSelect:()=>{l(e.value===t?"":e.value),o(!1)},className:"w-full cursor-pointer",children:[(0,a.jsx)(x.A,{className:(0,d.cn)("mr-2 h-4 w-4",t===e.value?"opacity-100":"opacity-0")}),e.label]},e.value))]})]})})]})}let v=(e,t,l)=>t?.translation&&"function"==typeof l&&"string"==typeof e&&e&&l.has?.(e)?l(e):e,y=({filter:e,onChange:t,value:l,filterTranslationScope:n})=>{switch(e.type){case"text":return(0,a.jsx)("div",{className:"col-span-2",children:(0,a.jsx)(s.Input,{className:"h-8",type:"text",placeholder:v(e.placeholder,e,n),onChange:e=>t(e.target.value),value:l})});case"number":return(0,a.jsx)("div",{className:"col-span-2",children:(0,a.jsx)(s.Input,{className:"h-8",type:"number",placeholder:v(e.placeholder,e,n),onChange:e=>t(e.target.value),value:l,min:e.min,max:e.max,step:e.step})});case"select":return(0,a.jsxs)(i.l6,{onValueChange:e=>{t(e)},value:l,children:[(0,a.jsx)(i.bq,{className:"h-8 col-span-2 text-start",children:(0,a.jsx)(i.yv,{placeholder:v(e.placeholder,e,n)})}),(0,a.jsx)(i.gC,{className:"z-50",children:e.options.map((t,l)=>(0,a.jsx)(i.eb,{value:t.value,children:v(t.label,e,n)},l))})]});case"searchable-select":return(0,a.jsx)(j,{filter:e,value:l,onChange:t,filterTranslationScope:n});case"date-range":return(0,a.jsx)(p.Sk,{className:"col-span-2",onSelect:e=>{e&&e.from?t({...e,type:"date"}):t(null)},selected:l,handlesTime:!1,allowFutureDates:!1,allowPastDates:!0,shortFormat:!0});case"date":return(0,a.jsx)(p.Sk,{className:"col-span-2",onSelect:e=>{e&&e.from?t({...e,type:"date"}):t(null)},selected:l,handlesTime:!1,allowFutureDates:e.futureDates||!1,allowPastDates:e.pastDates||!0,shortFormat:!0,single:!0});case"slider":{let s="range"===e.valueType,r=e.min??0,o=e.max??100,i=e.step??1,d=s?Array.isArray(l)?l:[r,""!==l?l:o]:[Number(""!==l?l:r)];return(0,a.jsxs)("div",{className:"col-span-2 space-y-3",children:[(0,a.jsxs)("div",{className:"flex justify-between text-sm text-muted-foreground",children:[(0,a.jsx)("span",{children:r}),(0,a.jsx)("span",{children:s&&Array.isArray(l)?`${l[0]} - ${l[1]}`:""!==l?l:r}),(0,a.jsx)("span",{children:o})]}),(0,a.jsx)(f.A,{min:r,max:o,step:i,value:d,onValueChange:e=>{s?t(e):t(String(e[0]))},className:"w-full"}),(0,a.jsx)("div",{className:"text-xs text-muted-foreground text-center",children:v(e.placeholder,e,n)||"Drag to select range"})]})}default:return null}},w=({table:e,onSearchApiCall:t,filterOptionsOverride:l,filterTranslationScope:s,componentTranslations:i})=>{let p=(0,u.usePathname)().split("/"),f=p[3],h=p[4],x=(0,d.tl)(f,h),[g,b]=(0,m.useState)({}),[j,w]=(0,m.useState)(!1),N=e=>null==e||"string"==typeof e&&""===e.trim(),S=()=>Object.values(g).some(e=>!N(e));return((0,m.useEffect)(()=>
1{if(j){let t={};x?.filters.forEach(l=>{let a=e.getColumn(l.column);if(a){let e=a.getFilterValue();null!=e&&""!==e&&("date-range"===l.type&&"object"==typeof e&&e.from?t[l.column]={from:e.from instanceof Date?e.from:new Date(e.from),to:e.to instanceof Date?e.to:e.to?new Date(e.to):null}:t[l.column]=e)}}),b(t)}},[j,e,x]),x&&x?.filters?.length>0)?(0,a.jsxs)(o.AM,{open:j,onOpenChange:w,children:[(0,a.jsx)(o.Wv,{asChild:!0,children:(0,a.jsx)(n.Button,{variant:"secondary",size:"icon",text:"text-muted-foreground","aria-label":"Filter",type:"button",children:(0,a.jsx)(c.A,{size:20})})}),(0,a.jsx)(o.hl,{className:"w-96",align:"start",children:(0,a.jsxs)("div",{className:"grid gap-4",children:[(0,a.jsx)("div",{className:"space-y-2",children:(0,a.jsx)("h4",{className:"font-semibold leading-none",children:i("FILTERS")})}),(0,a.jsx)("div",{className:"grid gap-2",children:x.filters.map((e,t)=>{let n=l?.[e.column],o=n?{...e,options:n}:e;return(0,a.jsxs)("div",{className:"grid grid-cols-3 items-center gap-1",children:[(0,a.jsxs)(r.J,{className:"col-span-1",children:[v(o.label,o,s),":"]}),(0,a.jsx)(y,{filter:o,onChange:e=>b(t=>({...t,[o.column]:e})),value:void 0!==g[o.column]&&null!==g[o.column]?g[o.column]:"",filterTranslationScope:s})]},t)})}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(n.Button,{size:"sm",className:"w-full",onClick:()=>{let l="",a=[];Object.keys(g).forEach(e=>{let t=g[e];if(!N(t))if(a.push({id:e,value:t}),t&&"object"==typeof t&&x?.filters.find(t=>t.column===e).type==="date-range"){let a=x?.filters.find(t=>t.column===e).split?t.from.toISOString().split("T")[0]:t.from.toISOString(),n=t.to?x?.filters.find(t=>t.column===e).split?t.to.toISOString().split("T")[0]:t.to.toISOString():"",s=x?.filters.find(t=>t.column===e).startSuffix,r=x?.filters.find(t=>t.column===e).endSuffix;l+=(l?"&":"")+`${e}${s||"From"}=${encodeURIComponent(a)}`+(n?`&${e}${r||"To"}=${encodeURIComponent(n)}`:"")}else if(t&&"object"==typeof t&&x?.filters.find(t=>t.column===e).type==="date"){let a=t.from.toISOString();l+=(l?"&":"")+`${e}=${a}`}else l+=(l?"&":"")+`${e}=${encodeURIComponent("object"==typeof t&&"value"in t?t.value:t)}`}),e.setColumnFilters(a),t&&t(l),w(!1)},disabled:!S(),type:"button",children:i("FILTER_APPLY")}),(0,a.jsx)(n.Button,{size:"sm",variant:"outline",className:"w-full",onClick:()=>{b({}),e.resetColumnFilters(),t&&t(""),w(!1)},disabled:!S(),type:"button",children:i("FILTER_CLEAR")})]})]})})]}):null}},27449:(e,t,l)=>{l.d(t,{Sk:()=>S,WK:()=>C,lr:()=>A});var a=l(95155),n=l(12115),s=l(50910),r=l(11697),o=l(22471),i=l(56533),d=l(33851),c=l(96493),u=l(20248),m=l(14311),p=l(33874),f=l(47296),h=l(57420),x=l(86190),g=l(68189),b=l(46403),j=l(1732),v=l(42067),y=l(57657);let w={es:u.es,fr:m.fr,it:p.it,"pt-BR":f.F};function N(e){if(e instanceof Date&&(0,o.f)(e))return e;if("string"==typeof e){let t=(0,i.H)(e);if((0,o.f)(t))return t}return null}function S({className:e,selected:t,onSelect:l,handlesTime:o=!0,isModal:i=!1,shortFormat:u=!1,allowPastDates:m=!1,allowFutureDates:p=!0,single:f=!1,minDate:y=null,maxDate:C=null}){let A=(0,s.c)("components.datepicker"),R=w[(0,r.Ym)()],k=N(t?.from),D=N(t?.to),M=n.useCallback(()=>u?"dd/MM/yyyy":"LLL dd, y h:mm a",[u]),L=n.useMemo(()=>R?{locale:R}:void 0,[R]),E=n.useCallback(e=>{f?l({from:N(e),to:N(e)}):l({from:N(e?.from),to:N(e?.to)})},[l,f]),_=n.useCallback(e=>{let t=k?new Date(k):new Date,[a,n]=e.target.value.split(":").map(Number);t.setHours(a,n,0,0),l(f?{from:t,to:t}:{from:t,to:D})},[k,D,l,f]),P=n.useCallback(e=>{let t=D?new Date(D):new Date,[a,n]=e.target.value.split(":").map(Number);t.setHours(a,n,0,0),l({from:k,to:t})},[k,D,l]);return(0,a.jsx)("div",{className:(0,x.cn)("grid gap-2",e),children:(0,a.jsxs)(j.AM,{modal:i,children:[(0,a.jsx)(j.Wv,{asChild:!0,children:(0,a.jsxs)(g.Button,{id:"date",variant:"outline",className:(0,x.cn)("rounded-lg justify-start text-left font-normal max-w-full overflow-hidden",!k&&"text-muted-foreground"),children:[(0,a.jsx)(h.A,{className:"mr-2 h-4 w-4"}),k?f?(0,d.GP)(k,M(),L):D?(0,a.jsxs)(a.Fragment,{children:[(0,d.GP)(k,M(),L)," -"," ",(0,d.GP)(D,M(),L)]}):(0,d.GP)(k,M(),L):(0,a.jsx)("span",{children:A("pick_a_date")})]})}),(0,a.jsxs)(j.hl,{className:"w-full p-0",align:"start",children:[(0,a.jsx)(b.V,{captionLayout:"dropdown-buttons",initialFocus:!0,mode:f?"single":"range",fromYear:1960,toYear:2030,defaultMonth:k||new Date,startMonth:k||new Date,endM
1onth:D||(0,c.f)(new Date,1),selected:f?k:{from:k,to:D},onSelect:E,numberOfMonths:2,locale:R,disabled:e=>{let t=new Date;t.setHours(0,0,0,0);let l=new Date(e);if(l.setHours(0,0,0,0),!m&&l<t||!p&&l>t)return!0;let a=y?N(y):null;a&&a.setHours(0,0,0,0);let n=C?N(C):null;return n&&n.setHours(0,0,0,0),!!a&&!!(l<a)||!!n&&!!(l>n)}}),o&&k&&(0,a.jsxs)("div",{className:"w-full grid grid-cols-2 gap-4 p-5",children:[(0,a.jsxs)("div",{className:"grid gap-2",children:[(0,a.jsx)("p",{children:A("start_time")}),(0,a.jsx)(v.Input,{type:"time",className:"w-full",value:k?(0,d.GP)(k,"HH:mm"):"00:00",onChange:_})]}),!f&&(0,a.jsxs)("div",{className:"grid gap-2",children:[(0,a.jsx)("p",{children:A("end_time")}),(0,a.jsx)(v.Input,{type:"time",className:"w-full",value:D?(0,d.GP)(D,"HH:mm"):"00:00",onChange:P})]})]})]})]})})}function C({className:e,selected:t,onSelect:l,handlesTime:o=!0,isModal:i=!1,shortFormat:u=!1,allowPastDates:m=!1,allowFutureDates:p=!0,single:f=!1,minDate:j=null,maxDate:S=null}){let A=(0,s.c)("components.datepicker"),R=w[(0,r.Ym)()],k=N(t?.from),D=N(t?.to),M=n.useCallback(()=>u?"dd/MM/yyyy":"LLL dd, y h:mm a",[u]),L=n.useMemo(()=>R?{locale:R}:void 0,[R]),[E,_]=n.useState(!1),P=n.useCallback(e=>{if(f)l({from:N(e),to:N(e)}),_(!1);else{let t=N(e?.from),a=N(e?.to);l({from:t,to:a}),t&&a&&_(!1)}},[l,f]),I=n.useCallback(e=>{let t=k?new Date(k):new Date,[a,n]=e.target.value.split(":").map(Number);t.setHours(a,n,0,0),l(f?{from:t,to:t}:{from:t,to:D})},[k,D,l,f]),T=n.useCallback(e=>{let t=D?new Date(D):new Date,[a,n]=e.target.value.split(":").map(Number);t.setHours(a,n,0,0),l({from:k,to:t})},[k,D,l]);return(0,a.jsx)("div",{className:(0,x.cn)("grid gap-2",e),children:(0,a.jsxs)(y.Dialog,{open:E,onOpenChange:_,children:[(0,a.jsx)(y.DialogTrigger,{asChild:!0,children:(0,a.jsxs)(g.Button,{id:"date",variant:"outline",className:(0,x.cn)("rounded-lg justify-start text-left font-normal max-w-full overflow-hidden",!k&&"text-muted-foreground"),children:[(0,a.jsx)(h.A,{className:"mr-2 h-4 w-4"}),k?f?(0,d.GP)(k,M(),L):D?(0,a.jsxs)(a.Fragment,{children:[(0,d.GP)(k,M(),L)," -"," ",(0,d.GP)(D,M(),L)]}):(0,d.GP)(k,M(),L):(0,a.jsx)("span",{children:A("pick_a_date")})]})}),(0,a.jsxs)(y.DialogContent,{className:"w-auto sm:max-w-[36rem] pt-7 pl-0 pr-0 pb-0",align:"start",children:[(0,a.jsx)(b.V,{captionLayout:"dropdown-buttons",initialFocus:!0,mode:f?"single":"range",fromYear:1960,toYear:2030,defaultMonth:k||new Date,startMonth:k||new Date,endMonth:D||(0,c.f)(new Date,1),selected:f?k:{from:k,to:D},onSelect:P,numberOfMonths:2,locale:R,disabled:e=>{let t=new Date;t.setHours(0,0,0,0);let l=new Date(e);if(l.setHours(0,0,0,0),!m&&l<t||!p&&l>t)return!0;let a=j?N(j):null;a&&a.setHours(0,0,0,0);let n=S?N(S):null;return n&&n.setHours(0,0,0,0),!!a&&!!(l<a)||!!n&&!!(l>n)}}),o&&k&&(0,a.jsxs)("div",{className:"w-full grid grid-cols-2 gap-4 p-5",children:[(0,a.jsxs)("div",{className:"grid gap-2",children:[(0,a.jsx)("p",{children:A("start_time")}),(0,a.jsx)(v.Input,{type:"time",className:"w-full",value:k?(0,d.GP)(k,"HH:mm"):"00:00",onChange:I})]}),!f&&(0,a.jsxs)("div",{className:"grid gap-2",children:[(0,a.jsx)("p",{children:A("end_time")}),(0,a.jsx)(v.Input,{type:"time",className:"w-full",value:D?(0,d.GP)(D,"HH:mm"):"00:00",onChange:T})]})]})]})]})})}function A({date:e,setDate:t,placeholder:l,disabled:n=!1,disablePastDates:o=!0,className:i}){let c=(0,s.c)("components.datepicker"),u=w[(0,r.Ym)()],m=l||c("pick_a_date");return(0,a.jsxs)(j.AM,{children:[(0,a.jsx)(j.Wv,{asChild:!0,children:(0,a.jsxs)(g.Button,{variant:"outline",className:(0,x.cn)("w-full justify-start text-left font-normal",!e&&"text-muted-foreground",i),disabled:n,children:[(0,a.jsx)(h.A,{className:"mr-2 h-4 w-4"}),e?(0,d.GP)(e,"PPP",u?{locale:u}:void 0):(0,a.jsx)("span",{children:m})]})}),(0,a.jsx)(j.hl,{className:"w-auto p-0",align:"start",children:(0,a.jsx)(b.V,{mode:"single",selected:e,onSelect:t,disabled:e=>{if(!o)return!1;let t=new Date;return t.setHours(0,0,0,0),e<t},initialFocus:!0,locale:u})})]})}},46403:(e,t,l)=>{l.d(t,{V:()=>m});var a=l(95155),n=l(12115),s=l(68189),r=l(58276),o=l(70733),i=l(86190),d=l(41641),c=l(98981),u=l(41294);function m({className:e,classNames:t,showOutsideDays:l=!0,...p}){return(0,a.jsx)(u.hv,{showOutsideDays:l,className:(0,i.cn)("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:sp
1ace-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",caption_dropdowns:"flex justify-center gap-1",nav:"space-x-1 flex items-center",nav_button:(0,i.cn)((0,s.buttonVariants)({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:"text-center text-sm p-0 relative [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",day:(0,i.cn)((0,s.buttonVariants)({variant:"ghost"}),"h-9 w-9 p-0 font-normal aria-selected:opacity-100"),day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"text-muted-foreground opacity-50",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},components:{Dropdown:({value:e,onChange:t,children:l,...s})=>{let i=n.Children.toArray(l),d=i.find(t=>t.props.value===e);return(0,a.jsxs)(o.l6,{value:e?.toString(),onValueChange:e=>{t?.({target:{value:e}})},children:[(0,a.jsx)(o.bq,{className:"pr-1.5 border-0 text-base gap-1",children:(0,a.jsx)(o.yv,{children:d?.props?.children})}),(0,a.jsx)(o.gC,{position:"popper",children:(0,a.jsx)(r.ScrollArea,{className:"h-80",children:i.map((e,t)=>(0,a.jsx)(o.eb,{value:e.props.value?.toString()??"",children:e.props.children},`${e.props.value}-${t}`))})})]})},IconLeft:({...e})=>(0,a.jsx)(d.A,{className:"h-4 w-4"}),IconRight:({...e})=>(0,a.jsx)(c.A,{className:"h-4 w-4"})},...p})}m.displayName="Calendar"},51726:(e,t,l)=>{l.d(t,{Separator:()=>o});var a=l(95155),n=l(12115),s=l(89803),r=l(86190);let o=n.forwardRef(({className:e,orientation:t="horizontal",decorative:l=!0,...n},o)=>(0,a.jsx)(s.b,{ref:o,decorative:l,orientation:t,className:(0,r.cn)("shrink-0 bg-border","horizontal"===t?"h-[1px] w-full":"h-full w-[1px]",e),...n}));o.displayName=s.b.displayName},54586:(e,t,l)=>{l.d(t,{A:()=>o});var a=l(95155),n=l(12115),s=l(86704),r=l(86190);let o=n.forwardRef(({className:e,...t},l)=>(0,a.jsxs)(s.bL,{ref:l,className:(0,r.cn)("relative flex w-full touch-none select-none items-center",e),...t,children:[(0,a.jsx)(s.CC,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:(0,a.jsx)(s.Q6,{className:"absolute h-full bg-primary"})}),(0,a.jsx)(s.zi,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));o.displayName=s.bL.displayName},58276:(e,t,l)=>{l.d(t,{$:()=>i,ScrollArea:()=>o});var a=l(95155),n=l(12115),s=l(89349),r=l(86190);let o=n.forwardRef(({className:e,children:t,...l},n)=>(0,a.jsxs)(s.bL,{ref:n,className:(0,r.cn)("relative overflow-hidden",e),...l,children:[(0,a.jsx)(s.LM,{className:"h-full w-full rounded-[inherit]",children:t}),(0,a.jsx)(i,{}),(0,a.jsx)(s.OK,{})]}));o.displayName=s.bL.displayName;let i=n.forwardRef(({className:e,orientation:t="vertical",...l},n)=>(0,a.jsx)(s.VM,{ref:n,orientation:t,className:(0,r.cn)("flex touch-none select-none transition-colors","vertical"===t&&"h-full w-2.5 border-l border-l-transparent p-[1px]","horizontal"===t&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...l,children:(0,a.jsx)(s.lr,{className:"relative flex-1 rounded-full bg-border"})}));i.displayName=s.VM.displayName},60848:(e,t,l)=>{l.d(t,{G7:()=>d,L$:()=>m,fx:()=>p,h_:()=>f,oI:()=>c,uB:()=>i,xL:()=>u});var a=l(95155),n=l(12115),s=l(34202),r=l(61878),o=l(86190);l(57657);let i=n.forwardRef(({className:e,...t},l)=>(0,a.jsx)(s.uB,{ref:l,className:(0,o.cn)("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));i.displayName=s.uB.displayName;let d=n.forwardRef(({className:e,...t},l)=>(0,a.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,a.jsx)(r.A,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,a.jsx)(s.uB.Input,{ref:l,className:(0,o.cn)("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));d.displayName=s.uB.Input.displayName;let c=n.forwardRef(({className:e,...t},l)=>(0,a.jsx)(s.uB.List,{ref:l,className:(0,o.cn)("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));c.displayName=s.uB.List.displayName;let u=n.forwardRef((e,t)=>
1(0,a.jsx)(s.uB.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));u.displayName=s.uB.Empty.displayName;let m=n.forwardRef(({className:e,...t},l)=>(0,a.jsx)(s.uB.Group,{ref:l,className:(0,o.cn)("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));m.displayName=s.uB.Group.displayName;let p=n.forwardRef(({className:e,...t},l)=>(0,a.jsx)(s.uB.Separator,{ref:l,className:(0,o.cn)("-mx-1 h-px bg-border",e),...t}));p.displayName=s.uB.Separator.displayName;let f=n.forwardRef(({className:e,...t},l)=>(0,a.jsx)(s.uB.Item,{ref:l,className:(0,o.cn)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50",e),...t}));f.displayName=s.uB.Item.displayName},63040:(e,t,l)=>{l.d(t,{$D:()=>b,K4:()=>o,Sz:()=>g,Zw:()=>c,_Z:()=>f,a1:()=>d,default:()=>x,vD:()=>p});var a=l(95155),n=l(12115),s=l(73321),r=l(10364);let o={route:"/",query:{},breadcrumbs:[],visible:{headings:[],selection:null},entity:null,locale:"en",extras:[],conversations:null,messageComposer:null},i=(0,n.createContext)(o),d=new Set(["token","jwt","auth","session","access_token"]),c=200,u="page-ctx-extra";function m(e){return e.trim().replace(/\s+/g," ").replace(/[-_]/g," ").slice(0,160)}function p(e,t){let l=e.split("/").filter(Boolean),a=[],n="";for(let e of l)e.startsWith("(")||e!==t&&(n+=`/${e}`,a.push({label:m(decodeURIComponent(e)),href:n}));return a}function f(e){let t=e.split("/").filter(Boolean)[0];return t&&/^[a-z]{2}(?:-[A-Z]{2})?$/.test(t)?t:"en"}function h(e){if(null==e)return[];let t=Array.isArray(e)?[...e]:[e],l=[];for(;t.length;){let e=t.shift();if(null==e)continue;if(Array.isArray(e)){t.push(...e);continue}if("object"==typeof e&&"message_composer"===e.type){l.push({type:"message_composer",open:"string"==typeof e.draft,draft:"string"==typeof e.draft?e.draft.slice(0,500):null});continue}if("object"==typeof e&&"conversation_list"===e.type){if(null===e.items)l.push({type:"conversation_list",items:null});else{let t=function(e){if(!Array.isArray(e))return null;let t=[];for(let l of e.slice(0,60)){if(!l||"object"!=typeof l)continue;let e=m(String(l.name??""));e&&t.push({name:e,kind:"agent"===l.kind?"agent":"chat",unread:!!l.unread,href:"string"==typeof l.href&&l.href.startsWith("/chat")?l.href.slice(0,200):null})}return t.length?t:null}(e.items);t&&l.push({type:"conversation_list",items:t})}continue}if("object"==typeof e&&"active_form"===e.type){if(null===e.schema)l.push({type:"active_form",schema:null});else{let t=function(e){if(!e||"object"!=typeof e)return null;let t=e.schema&&"object"==typeof e.schema?e.schema:e,l=t.id??t.formId??t.title??t.name,a="string"==typeof l?l.slice(0,160):"form",n=m(String(t.title??t.name??a))||a;return{id:a,title:n,fields:(Array.isArray(t.fields)?t.fields:[]).map(e=>(function(e){if(!e||"object"!=typeof e)return null;let t=e.path??e.name;if(!t||"string"!=typeof t)return null;let l=t.trim().slice(0,160);if(!l)return null;let a=m(String(e.label??e.title??l))||l,n="string"==typeof e.type&&e.type?e.type.slice(0,40):"text",s=null;Array.isArray(e.options)&&e.options.length&&((s=e.options.slice(0,500).map(e=>(function(e){if(null==e)return null;if("string"==typeof e||"number"==typeof e||"boolean"==typeof e){let t=String(e).slice(0,160);return{label:m(String(e))||t,value:t}}if("object"==typeof e){let t=e.value??e.id??e.key??e.code??e.slug??e.label??e.name;if(!t)return null;let l=String(t).slice(0,160);return{label:m(String(e.label??e.name??e.title??l))||l,value:l}}return null})(e)).filter(Boolean)).length||(s=null));let r=!!e.allowCreate,o=null;if(e.aiValueMap&&"object"==typeof e.aiValueMap){let t=Object.entries(e.aiValueMap).filter(([e,t])=>"string"==typeof e&&null!=t).slice(0,120);t.length&&(o=Object.fromEntries(t))}return{path:l,label:a,type:n,required:!!e.required,options:s,...r?{allowCreate:!0}:{},...o?{aiValueMap:o}:{}}}
1)(e)).filter(Boolean).slice(0,120)}}(e);t&&l.push({type:"active_form",schema:t})}continue}let a=function e(t){if(null==t)return null;if("string"==typeof t||"number"==typeof t||"boolean"==typeof t)return m(String(t))||null;if(Array.isArray(t))return t.map(t=>e(t)).filter(Boolean);if("object"==typeof t){let e=[],l=t.type||t.category,a=t.title||t.label||t.name||t.heading||t.id;l&&"string"==typeof l&&e.push(l),a&&"string"==typeof a&&e.push(a);let n=[];["value","metric","count","total","amount","score","status","summary","description","note","details","text"].forEach(l=>{let a=t[l];if(null==a||""===a||"text"===l&&e.length)return;let s="value"===l||"text"===l?"":`${l}: `;n.push(`${s}${a}`)}),e.length||0!==n.length||"string"!=typeof t.text||e.push(t.text);let s=[...e];return(n.length&&s.push(n.join(" | ")),s.length)?m(s.join(" | "))||null:null}return null}(e);if(a){if(Array.isArray(a)){t.push(...a);continue}l.push(a)}}return l}function x({children:e}){let t=(0,s.usePathname)()||"/",l=(0,s.useSearchParams)(),o=(0,n.useMemo)(()=>f(t),[t]),[g,b]=(0,n.useState)(()=>
1p(t,o)),[j,v]=(0,n.useState)([]),[y,w]=(0,n.useState)(null),[N,S]=(0,n.useState)([]),[C,A]=(0,n.useState)(null),[R,k]=(0,n.useState)(null),[D,M]=(0,n.useState)(null),L=(0,n.useRef)(null),E=(0,n.useRef)({dom:[],events:[]}),_=(0,n.useRef)(null),P=(0,n.useCallback)(()=>{let e=E.current,t=new Set,l=[];["events","dom"].forEach(a=>{(e[a]||[]).forEach(e=>{!e||t.has(e)||(t.add(e),l.push(e))})}),S(l.slice(0,6))},[S]),I=(0,n.useCallback)((e,t,{append:l=!1}={})=>{let a=h(t);if(!l&&0===a.length){E.current[e]=[],P();return}if(!a.length)return;let n=l?[...E.current[e]||[]]:[];a.forEach(e=>{e&&(n.includes(e)||n.push(e))}),E.current[e]=n.slice(0,6),P()},[P]);(0,n.useEffect)(()=>{E.current={dom:[],events:[]},S([]),_.current=null,A(null)},[t]),(0,n.useEffect)(()=>{let e=Array.from(document.querySelectorAll('[aria-label="breadcrumbs"] a, nav.breadcrumbs a')).map(e=>m(e.textContent||"")).filter(Boolean).slice(0,10);e.length?b(e.map(e=>({label:e,href:null}))):b(p(t,o))},[t,o]),(0,n.useEffect)(()=>{let e=e=>{let t,l=h(e?.detail??[]);if(!l.length)return;let a=[],n=_.current,s=!1,r=!1;l.forEach(e=>{e&&"object"==typeof e&&"active_form"===e.type?(s=!0,n=e.schema?{...e.schema}:null):e&&"object"==typeof e&&"message_composer"===e.type?M(e.open?{draft:e.draft??""}:null):e&&"object"==typeof e&&"conversation_list"===e.type?(r=!0,t=e.items?[...e.items]:null):a.push(e)}),r&&k(t),s&&(_.current=n,A(n)),a.length&&I("events",a,{append:!0})};return window.addEventListener(u,e),()=>window.removeEventListener(u,e)},[I]),(0,n.useEffect)(()=>{let e=new Map,t=new IntersectionObserver(t=>{t.forEach(t=>{let l=e.get(t.target);l&&(l.visible=t.isIntersecting&&t.intersectionRatio>0)}),v(Array.from(e.values()).filter(e=>e.visible).slice(0,6).map(e=>({level:e.level,text:e.text})))},{rootMargin:"0px 0px -40% 0px"});return L.current=t,Array.from(document.querySelectorAll("h1, h2, h3")).forEach(l=>{let a=Number(l.tagName.slice(1)),n=m(l.innerText||"");e.set(l,{level:a,text:n,visible:!1}),t.observe(l)}),()=>{t.disconnect(),e.clear()}},[t]),(0,n.useEffect)(()=>{let e=()=>{let e=window.getSelection();w(function(e){if(!e)return null;let t=e.trim().replace(/[\r\n]+/g," ").replace(/\s+/g," ");if(!t)return null;let l=t.replace(/\b[\w.+-]+@[\w.-]+\.[A-Za-z]{2,}\b/g,"[email]");return(l.length>300?`${l.slice(0,300)}â¦`:l)||null}(e?e.toString():""))};return document.addEventListener("selectionchange",e),()=>{document.removeEventListener("selectionchange",e)}},[]),(0,n.useEffect)(()=>{if("u"<typeof document)return;let e=document.body;if(!e)return;let t=null,l=()=>{let e=Array.from(document.querySelectorAll("[data-page-ctx-note]")).map(e=>{let t=e.getAttribute("data-page-ctx-note"),l=e.textContent||"";return m((t??l)||"")}).filter(Boolean),t=[];e.length<2&&Array.from(document.querySelectorAll("main h1, main h2, main h3, [role='heading'], [aria-live]")).forEach(e=>{let l=m(e.textContent||"");l&&t.push(l)}),I("dom",Array.from(new Set([...e,...t])).slice(0,6),{append:!1})};l();let a=new MutationObserver(()=>{t&&cancelAnimationFrame(t),t=requestAnimationFrame(l)});return a.observe(e,{subtree:!0,childList:!0,characterData:!0,attributes:!0,attributeFilter:["data-page-ctx-note"]}),()=>{t&&cancelAnimationFrame(t),a.disconnect()}},[t,I]);let T=(0,n.useMemo)(()=>{let e={};if(!l)return e;for(let[t,a]of l.entries()){if(!a)continue;let l=t.toLowerCase();!d.has(l)&&(a.length>c||(e[t]=a))}return e},[l]),F=(0,n.useMemo)(()=>(function(e,t){let l=e.split("/").filter(Boolean).filter(e=>!e.startsWith("("));l[0]===t&&l.shift();let[a,n]=l;return["products","customers","users","orders","suppliers"].includes(a)&&n?{type:a.replace(/s$/,""),id:decodeURIComponent(n)}:null})(t,o),[t,o]),$=(0,n.useMemo)(()=>({route:t,query:T,breadcrumbs:g,visible:{headings:j,selection:y||null},entity:F,locale:o,extras:N,activeForm:C,conversations:R,messageComposer:D}),[t,T,g,j,y,F,o,N,C,R,D]);return(0,n.useEffect)(()=>{(0,r.hL)($)},[$]),(0,a.jsx)(i.Provider,{value:$,children:e})}function g(){return(0,n.useContext)(i)||o}function b(e){let t=h(e);t.length&&window.dispatchEvent(new CustomEvent(u,{detail:t}))}},71340:(e,t,l)=>{l.d(t,{A:()=>u});var a=l(95155),n=l(12115),s=l(55638),r=l(68189),o=l(70733),i=l(50910),d=l(73321),c=l(86190);function u({table:e,pageSizesOptions:t=[5,10,20,30,40,50],totalPages:l,manualPagination:m,totalItems:p,updateUrl:f=!0,pageScopedSelection:h=!1}){let x=(0,i.c)("APPS.PRODUCTS.TABLE_FOOTER"),g=(0,d.usePathname)(),b=(0,d.useSearchParams)(),j=b.get("view")||"list",v=(0,n.useMemo)(()=>Object.fromEntries(b.entries()),[b]),y=(0,d.useRouter)(),{pageIndex:w,pageSize:N}=e.getState().pagination,S=l??e.getPageCount();p??e.getFilteredRowModel().rows.length;let C=w+1,A=C>1,R=C<S,k=e.getFilteredSelectedRowModel().rows.length,D=!h&&m&&e.getIsAllRowsSelected?.()?p:k,M=h?e.getRowModel().rows.length:p,L=(e={page:1,rows:10})=>{if(m&&f)try{let t={...v,...e};
1Object.keys(t).forEach(e=>{(void 0===t[e]||null===t[e])&&delete t[e]});let l=(0,c.mR)(g,t);y.replace(l,{scroll:"false"})}catch(e){console.error(e)}},E=t=>{e.setPageIndex(t-1),L({view:j,page:t,rows:N})};return(0,a.jsxs)("div",{className:"hidden sm:flex items-center justify-between px-2",children:[(0,a.jsxs)("div",{className:"flex-1 text-sm text-muted-foreground",children:[D," ",x("OF")," ",M," ",x("ROWS_SELECTED"),"."]}),(0,a.jsxs)("div",{className:"flex items-center space-x-6 lg:space-x-8",children:[(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:x("ROWS_PER_PAGE")}),(0,a.jsxs)(o.l6,{value:`${N}`,onValueChange:t=>{e.setPageSize(Number(t)),L({view:j,page:C,rows:Number(t)})},children:[(0,a.jsx)(o.bq,{className:"h-8 w-[70px]",children:(0,a.jsx)(o.yv,{placeholder:N})}),(0,a.jsx)(o.gC,{side:"top",children:t.map(e=>(0,a.jsx)(o.eb,{value:`${e}`,children:e},e))})]})]}),(0,a.jsxs)("div",{className:"flex w-[100px] items-center justify-center text-sm font-medium",children:[x("PAGE")," ",C," ",x("OF")," ",l??e.getPageCount()]}),(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsxs)(r.Button,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>E(1),disabled:!A,children:[(0,a.jsx)("span",{className:"sr-only",children:"Go to first page"}),(0,a.jsx)(s.jvd,{className:"h-4 w-4"})]}),(0,a.jsxs)(r.Button,{variant:"outline",className:"h-8 w-8 p-0",onClick:()=>E(C-1),disabled:!A,children:[(0,a.jsx)("span",{className:"sr-only",children:"Go to previous page"}),(0,a.jsx)(s.YJP,{className:"h-4 w-4"})]}),(0,a.jsxs)(r.Button,{variant:"outline",className:"h-8 w-8 p-0",onClick:()=>E(C+1),disabled:!R,children:[(0,a.jsx)("span",{className:"sr-only",children:"Go to next page"}),(0,a.jsx)(s.vKP,{className:"h-4 w-4"})]}),(0,a.jsxs)(r.Button,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>E(l??e.getPageCount()),disabled:!R,children:[(0,a.jsx)("span",{className:"sr-only",children:"Go to last page"}),(0,a.jsx)(s.QZK,{className:"h-4 w-4"})]})]})]})]})}},73664:(e,t,l)=>{l.d(t,{A:()=>E});var a=l(95155),n=l(12115),s=l(50910),r=l(70130),o=l(37595),i=l(81262),d=l(48729),c=l(47339),u=l(61878),m=l(76527),p=l(33210),f=l(33810),h=l(73321);l(55177);var x=l(51726),g=l(86190),b=l(83475),j=l(37882),v=l(17906),y=l(17595),w=l(68189),N=l(95106),S=l(55638);function C({table:e}){let t=(0,s.c)("components.data-table");return(0,a.jsxs)(N.DropdownMenu,{children:[(0,a.jsx)(N.DropdownMenuTrigger,{asChild:!0,children:(0,a.jsx)(w.Button,{variant:"secondary",size:"icon",text:"text-muted-foreground",type:"button",children:(0,a.jsx)(S.LMN,{className:"h-5 w-5"})})}),(0,a.jsxs)(N.DropdownMenuContent,{align:"end",className:"w-[150px]",children:[(0,a.jsx)(N.DropdownMenuLabel,{children:t("toggle_columns")}),(0,a.jsx)(N.DropdownMenuSeparator,{}),e.getAllColumns().filter(e=>void 0!==e.accessorFn&&e.getCanHide()).map(t=>{let l={column:t,table:e},n=t.columnDef.header?.(l)?.props?.title,s=t.columnDef.header?.(l)?.props?.children;return(0,a.jsx)(N.hO,{className:"capitalize",checked:t.getIsVisible(),onCheckedChange:e=>t.toggleVisibility(!!e),children:n??s??t.id},t.id)})]})]})}var A=l(75823),R=l(2614),k=l(35799),D=l.n(k);let M=Object.freeze({PDF:"0",CSV:"1",XML:"2"});var L=l(42067);l(98500);let E=({searchKey:e,table:t,title:l,limit:S=null,showTitle:k=!0,allowNew:E=!0,showOptionsOnSelect:_=!0,newItemUrl:P="",length:I=0,showLengthAndText:T=!1,lengthLabel:F,heading:$,helpButton:O,showViewOptions:B=!0,className:z,additionalActions:H,extraActionButton:G,headerExtraRow:V,onSearchApiCall:U,subtable:q,isAllRowsSelected:W=!1,totalItems:J,manualPagination:K=!1,filterOptionsOverride:X,globalFilter:Y="",searchGlobal:Z=!1,showSearchbar:Q=!0,filterTranslationScope:ee,selectionActions:et=[]})=>{let el=(0,h.useRouter)(),[ea,en]=(0,n.useState)(""),[es,er]=(0,n.useState)({PDF:!1,CSV:!1,XML:!1}),eo=(0,h.usePathname)(),ei=eo.split("/"),ed=ei[3],ec=ei[4],eu=(0,g.tl)(ed,ec,q),em=(0,h.useSearchParams)(),ep=(0,j.use
1Session)(),ef=(0,s.c)("APPS.TABLE_TOOLBAR"),eh=(0,s.c)("components.toast"),ex="list"===em.get("view")||!em.get("view"),eg=[{id:"list",label:ef("LIST"),icon:r.A,isSelected:ex},{id:"grid",label:ef("GRID"),icon:o.A,isSelected:!ex}],eb=t.getSelectedRowModel().rows,ej=()=>{if(P)el.push(P);else{let e=new URLSearchParams(window.location.search);el.push(`${eo}/new?${e.toString()}`);return}},ev=async e=>{let l=Object.keys(M).find(t=>M[t]===e);try{er(e=>({...e,[l]:!0}));let{data:{accessToken:a,user:n}}=ep;if(!a)return;if(!eu)throw Error("Endpoint not found");let{url:s,method:r,dataFormat:o,filters:i,identifierKey:d,queryParams:c}=eu,u=`${v.H$}${s}`,m=new URLSearchParams;m.append("fileType",e),W&&m.append("selectAll","true"),c&&c.length>0&&c.forEach(e=>{let t;"session"===e.source?t=(0,g.LJ)(n,e.key):"table"===e.source&&(t=(0,g.LJ)(eb[0]?.original,e.key)),null!=t&&""!==t&&m.append(e.name,t)}),"customer"===ec||m.toString()&&(u+=`?${m.toString()}`);let p={method:r,headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json"}};if("POST"===r&&"body"===o&&"customer"!==ec)if(W&&K){let e=t.getState().columnFilters,l={};e.forEach(e=>{let t=e.value;null!=t&&""!==t&&("object"==typeof t&&t.from?(l[`${e.id}From`]=t.from.toISOString().split("T")[0],t.to&&(l[`${e.id}To`]=t.to.toISOString().split("T")[0])):l[e.id]=t)}),p.body=JSON.stringify({selectAll:!0,filters:l})}else{let e=eb.map(e=>D()(e.original,d));p.body=JSON.stringify(e)}else if("customer"===ec){let e=eb.map(e=>D()(e.original,d));p.body=JSON.stringify({customerCodeList:e})}let f=await fetch(u,p);if(!f.ok)throw Error("Error fetching report");let h=await f.blob(),x=window.URL.createObjectURL(h),b="customer"===ec?"pdf":l.toLowerCase(),j=document.createElement("a");j.href=x,j.download=`${ed}-report-${new Date().toLocaleDateString()}.${b}`,document.body.appendChild(j),j.click(),j.remove(),window.URL.revokeObjectURL(x)}catch(e){R.toast.error(eh("REPORT_ERROR",{error:e?.message}))}finally{er(e=>({...e,[l]:!1}))}},ey=[{id:"print",label:ef("PRINT"),icon:es.PDF?A.k:i.A,action:()=>ev(M.PDF)},{id:"exportXML",label:ef("EXPORT_XML"),icon:es.XML?A.k:d.A,action:()=>ev(M.XML)},{id:"exportCSV",label:ef("EXPORT_CSV"),icon:es.CSV?A.k:c.A,action:()=>ev(M.CSV)}];"customer"===ec&&(ey=[{id:"print",label:ef("PRINT"),icon:es.PDF?A.k:i.A,action:()=>ev(M.PDF)}]);let ew=t.getState().columnFilters,eN=S>=0&&I>=S;return(0,a.jsxs)("div",{className:"flex flex-col sticky top-16 z-40 bg-background",children:[(0,a.jsxs)("div",{className:(0,g.cn)("flex items-center justify-between py-4 bg-background",z),children:[(0,a.jsx)("ul",{className:"flex flex-row flex-wrap list-none gap-2 md:gap-4 items-center",children:k&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("li",{className:"md:text-lg font-semibold font-sans",children:$??(T?`${ef("MANAGE")} ${l}`:l)}),S>=0&&!eN&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(x.Separator,{orientation:"vertical",className:"h-10 w-px"}),(0,a.jsxs)("li",{className:"text-sm md:text-base font-semibold",children:[I," ",ef("OF")," ",S," ",ef("AVAILABLE")]})]}),T&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(x.Separator,{orientation:"vertical",className:"h-10 w-px"}),(0,a.jsx)("li",{className:"text-sm md:text-base",children:F??(0,a.jsxs)(a.Fragment,{children:["(",I,") ",l]})})]}),(eb.length>0||W)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(x.Separator,{orientation:"vertical",className:"h-10 w-px"}),(0,a.jsx)("li",{className:"text-sm md:text-base text-primary font-medium",children:W?`All ${J||I} selected`:`${eb.length} selected`})]})]})}),(0,a.jsxs)("div",{className:"flex sm:gap-3 items-center",children:[(0,a.jsx)("div",{className:"flex",children:B&&eg.map(e=>(0,a.jsx)(f.TooltipProvider,{children:(0,a.jsxs)(f.Tooltip,{children:[(0,a.jsx)(f.TooltipTrigger,{asChild:!0,children:(0,a.jsx)(w.Button,{type:"button",variant:"ghost",size:"icon",className:`${e.isSelected?"text-primary":"text-[#BEC3C9]"}`,"aria-label":e.label,onClick:()=>{var t;let l;return t=e.id,void((l=new URLSearchParams(window.location.search)).set("view",t),el.push(`${eo}?${l.toString()}`))},children:(0,a.jsx)(e.icon,{})})}),(0,a.jsx)(f.TooltipContent,{side:"bottom",children:(0,a.jsx)("p",{children:e.label})})]})},e.id))}),Q&&(0,a.jsx)("div",{children:(0,a.jsxs)("div",{className:"hidden sm:flex relative",children:[(0,a.jsx)(L.Input,{placeholder:`${ef("SEARCH")} ${l} ...`,className:"rounded-xl placeholder:text-[#BEC3C9] border-border h-10 w-64 truncate placeholder:max-w-48 placeholder:truncate placeholder:text-sm text-sm placeholder:overflow-hidden",value:Z?Y:ea,onChange:l=>{let a=l.target.value;Z?t.setGlobalFilter(a.trim()):(en(a),t.getColumn(e)?.setFilterValue(a.trim()))}}),(0,a.jsx)(u.A,{className:"absolute top-1/2 transform -translate-y-1/2 right-3 text-foreground
1/70"})]})}),(0,a.jsx)("div",{children:(0,a.jsxs)("div",{className:"hidden sm:flex gap-3",children:[et.length>0&&(eb.length>0||W)&&(0,a.jsxs)(N.DropdownMenu,{children:[(0,a.jsx)(N.DropdownMenuTrigger,{asChild:!0,children:(0,a.jsxs)(w.Button,{type:"button",variant:"secondary",size:"sm",className:"flex gap-2 items-center h-10",disabled:et.every(e=>e.disabled),children:[(0,a.jsx)(m.A,{size:18}),(0,a.jsx)("span",{children:ef("ACTIONS")})]})}),(0,a.jsxs)(N.DropdownMenuContent,{align:"end",className:"w-fit p-2",children:[(0,a.jsx)(N.DropdownMenuLabel,{children:ef("ACTIONS")}),(0,a.jsx)(N.DropdownMenuSeparator,{}),(0,a.jsx)(N.DropdownMenuGroup,{children:et.map(e=>(0,a.jsxs)(N.DropdownMenuItem,{disabled:e.disabled,onSelect:e.disabled?void 0:()=>e.action(eb.map(e=>e.original),{isAllRowsSelected:W}),children:[e.icon,(0,a.jsx)("span",{children:e.label})]},e.id))})]})]}),_&&(eb.length>0||W)&&ey.map(e=>(0,a.jsx)(f.TooltipProvider,{children:(0,a.jsxs)(f.Tooltip,{children:[(0,a.jsx)(f.TooltipTrigger,{asChild:!0,children:(0,a.jsx)(w.Button,{variant:"secondary",size:"icon",text:"text-muted-foreground","aria-label":e.label,onClick:e.action,children:(0,a.jsx)(e.icon,{size:20})})}),(0,a.jsx)(f.TooltipContent,{side:"bottom",children:(0,a.jsx)("p",{children:e.label})})]})},e.id)),O&&(0,a.jsx)(w.Button,{variant:"ghost",size:"icon",type:"button",children:O})]})}),eu&&eu?.filters?.length>0&&(0,a.jsx)(y.A,{table:t,onSearchApiCall:U,filterOptionsOverride:X,filterTranslationScope:ee,componentTranslations:ef}),ex&&(0,a.jsx)(C,{table:t}),G,E&&(H?(0,a.jsx)(b.A,{items:[H],buttonLabel:"Options",variant:"default",className:"flex gap-2 items-center h-10 rounded-l-none",mainButton:{label:ef("NEW"),onClick:ej,className:"px-5 w-[6.6rem] text-lg h-10 rounded-xl rounded-r-none"}}):(0,a.jsx)(w.Button,{type:"button",variant:"default",size:"lgApp",onClick:ej,children:ef("NEW")}))]})]}),V&&(0,a.jsx)("div",{className:"flex w-full items-center pb-4 bg-background",children:V}),ew.length>0&&(0,a.jsxs)("div",{className:"flex flex-wrap gap-2 items-center mt-4",children:[(0,a.jsx)("span",{className:"text-sm font-medium",children:"Active Filters:"}),ew.map(e=>(0,a.jsxs)(w.Button,{size:"sm",className:"text-xs h-7 flex gap-2",variant:"outline_primary",onClick:()=>{let l=t.getState().columnFilters.filter(t=>t.id!==e.id);t.setColumnFilters(l),U&&U(l.map(e=>{if(e.id&&void 0!==e.value&&null!==e.value&&""!==e.value){if("object"==typeof e.value&&e.value.from){let t=e.value.from.toISOString().split("T")[0],l=e.value.to?e.value.to.toISOString().split("T")[0]:"";return`&${e.id}From=${encodeURIComponent(t)}${l?`&${e.id}To=${encodeURIComponent(l)}`:""}`}return`&${e.id}=${encodeURIComponent(e.value)}`}return""}).filter(Boolean).join(""))},children:[(0,a.jsx)(p.A,{className:"h-4 w-4",size:10}),(0,a.jsxs)("span",{className:"capitalize",children:[e.id,": ",function(e,t,l){let a=(Array.isArray(t)?t:[]).find(t=>t?.column===e?.id);if(!a)return(0,g.ci)(e?.value);if("date-range"===a.type&&e.value&&e.value.from){let t=new Date(e.value.from),l=e.value.to?new Date(e.value.to):null;return l?`${t.toLocaleDateString()} - ${l.toLocaleDateString()}`:t.toLocaleDateString()}if("date"===a.type&&e.value&&e.value.from)return new Date(e.value.from).toLocaleDateString();if("select"===a.type||"searchable-select"===a.type){let t=l?.[e.id],n=Array.isArray(t)&&t.length>0?t:a.options,s=n?.find(t=>String(t.value)===String(e.value));if(s)return s.label}return"slider"===a.type?Array.isArray(e.value)?e.value.join(" - "):String(e.value):(0,g.ci)(e.value)}(e,eu?.filters,X)]})]},e.id)),(0,a.jsxs)(w.Button,{variant:"ghost",size:"sm",className:"h-7 text-xs",onClick:()=>{t.resetColumnFilters(),U&&U("")},children:["Reset",(0,a.jsx)(p.A,{className:"ml-2 h-4 w-4"})]})]})]})}},83475:(e,t,l)=>{l.d(t,{A:()=>x});var a=l(95155),n=l(12115),s=l(14051),r=l.n(s),o=l(95106),i=l(66088),d=l(68189),c=l(86190),u=l(98500),m=l.n(u),p=l(45706);let f=({items:e,buttonLabel:t="Options",mainButton:l,className:s,variant:r="default",loading:u=!1})=>(0,a.jsxs)("div",{className:"flex bg-card rounded-xl gap-[1px]",children:[l&&(l.onClickURL?(0,a.jsx)(m(),{href:l.onClickURL,children:(0,a.jsx)(d.Button,{className:(0,
1c.cn)("flex-1 w-20 rounded-r-none text-sm",l.className),variant:r,size:"sm",children:l.label})}):(0,a.jsx)(a.Fragment,{children:u?(0,a.jsx)(d.Button,{variant:"ghost",size:"sm",disabled:!0,children:(0,a.jsx)(p.A,{size:24})}):(0,a.jsx)(d.Button,{className:(0,c.cn)("flex-1 w-20 rounded-r-none",l.className),variant:r,size:"sm",onClick:l.onClick,children:l.label})})),(0,a.jsxs)(o.DropdownMenu,{children:[(0,a.jsx)(o.DropdownMenuTrigger,{asChild:!0,children:(0,a.jsx)(d.Button,{"aria-label":t,className:(0,c.cn)("flex gap-2 items-center rounded-l-none",s),variant:r,disabled:u,size:"sm",children:(0,a.jsx)(i.A,{className:"size-4"})})}),(0,a.jsxs)(o.DropdownMenuContent,{className:"w-56 p-2 mr-2",children:[(0,a.jsx)(o.DropdownMenuLabel,{children:(0,a.jsx)("span",{children:t})}),(0,a.jsx)(o.DropdownMenuSeparator,{}),e.map((t,l)=>(0,a.jsxs)(n.Fragment,{children:[(0,a.jsx)(o.DropdownMenuGroup,{children:t.map((e,t)=>e?.element?(0,a.jsx)(n.Fragment,{children:e.element},t):(0,a.jsx)(o.DropdownMenuItem,{onClick:e?.onClick,disabled:e?.disabled,children:e?.onClickURL?(0,a.jsxs)(m(),{href:e?.onClickURL,className:"flex items-center space-x-2",children:[e?.icon,(0,a.jsx)("span",{children:e?.label})]}):(0,a.jsxs)(a.Fragment,{children:[e?.icon,(0,a.jsx)("span",{children:e?.label})]})},t))}),l<e.length-1&&(0,a.jsx)(o.DropdownMenuSeparator,{})]},l))]})]})]}),h=e=>(t,...l)=>t?.element?e(t,...l):e.isRequired(t,...l);f.propTypes={items:r().arrayOf(r().arrayOf(r().shape({icon:h(r().element),label:h(r().string),onClick:h(r().func),element:r().element}))).isRequired,buttonLabel:r().string};let x=f},83559:(e,t,l)=>{l.d(t,{A0:()=>o,BF:()=>i,Gg:()=>d,Hj:()=>c,XI:()=>r,nA:()=>m,nd:()=>u});var a=l(95155),n=l(12115),s=l(86190);let r=n.forwardRef(({className:e,...t},l)=>(0,a.jsx)("div",{className:"relative w-full overflow-auto custom-scrollbar ",children:(0,a.jsx)("table",{ref:l,className:(0,s.cn)("w-full caption-bottom text-sm bg-background",e),...t})}));r.displayName="Table";let o=n.forwardRef(({className:e,...t},l)=>(0,a.jsx)("thead",{ref:l,className:(0,s.cn)("[&_tr]:border-b",e),...t}));o.displayName="TableHeader";let i=n.forwardRef(({className:e,...t},l)=>(0,a.jsx)("tbody",{ref:l,className:(0,s.cn)("[&_tr:last-child]:border-0",e),...t}));i.displayName="TableBody";let d=n.forwardRef(({className:e,...t},l)=>(0,a.jsx)("tfoot",{ref:l,className:(0,s.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));d.displayName="TableFooter";let c=n.forwardRef(({className:e,...t},l)=>(0,a.jsx)("tr",{ref:l,className:(0,s.cn)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));c.displayName="TableRow";let u=n.forwardRef(({className:e,...t},l)=>(0,a.jsx)("th",{ref:l,className:(0,s.cn)("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));u.displayName="TableHead";let m=n.forwardRef(({className:e,...t},l)=>(0,a.jsx)("td",{ref:l,className:(0,s.cn)("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));m.displayName="TableCell",n.forwardRef(({className:e,...t},l)=>(0,a.jsx)("caption",{ref:l,className:(0,s.cn)("mt-4 text-sm text-muted-foreground",e),...t})).displayName="TableCaption"},89653:(e,t,l)=>{l.r(t),l.d(t,{DataTable:()=>f});var a=l(95155),n=l(12115),s=l(50910),r=l(60002),o=l(3134),i=l(83559),d=l(73664),c=l(71340),u=l(86190),m=l(75823),p=l(63040);function f({searchKey:e="name",columns:t,data:l,title:h,limit:x=null,allowNew:g=!0,showTitle:b=!0,className:j,showOptionsOnSelect:v=!0,showViewOptions:y=!0,onSelect:w=()=>{},showPagination:N=!0,defaultPageSize:S=10,newItemUrl:C="",showLengthAndText:A,lengthLabel:R,heading:k,showToolbar:D=!0,toolbarClassName:M,helpButton:L,additionalActions:E,extraActionButton:_,headerExtraRow:P,total:I,pageSize:T,totalPages:F,manualPagination:$=!1,getRowCanExpand:O=()=>!1,renderSubComponent:B,isControlledSelection:z=!1,onRowSelectionChange:H,rowSelection:G,pageIndex:V,onChangePagination:U,updateUrl:q=!0,totalItems:W,pageScopedSelection:J=!1,onSearchApiCall:K,subtable:X,isLoading:Y=!1,disableClientFilterWhenOnSearch:Z=!0,filterOptionsOverride:Q,searchGlobal:ee=!1,showSearchbar:et=!0,filterTranslationScope:el,showSelectedCount:ea=!0,selectionActions:en=[],groupBy:es,groupOrder:er,renderGroupHeader:eo}
1){let ei,ed,ec,[eu,em]=(0,n.useState)({}),[ep,ef]=(0,n.useState)({}),[eh,ex]=(0,n.useState)([]),[eg,eb]=(0,n.useState)(""),[ej,ev]=(0,n.useState)([]),[ey,ew]=(0,n.useState)({}),[eN,eS]=(0,n.useState)(!1),[eC,eA]=(0,n.useState)(!1),[eR,ek]=(0,n.useState)({pageIndex:V??0,pageSize:T??S});(0,n.useEffect)(()=>{$&&ek({pageIndex:V??0,pageSize:T??S})},[V,T,$]);let eD=z?G:eu,eM=z?H:em,eL=(0,s.c)("components.data-table"),[eE,e_]=(ed=(ei=(0,n.useRef)(!0)).current,ec=(0,n.useCallback)(()=>{ei.current=!1},[]),(0,n.useEffect)(()=>{ei.current=!0}),[ed,ec]),eP=(0,r.N4)({data:l,columns:t,state:{sorting:ej,columnVisibility:ep,rowSelection:eD,columnFilters:eh,expanded:ey,pagination:eR,globalFilter:eg},onColumnFiltersChange:e=>{let t="function"==typeof e?e(eh):e;ex(t),K&&K(t.map(e=>{if(e.id&&void 0!==e.value&&null!==e.value&&""!==e.value){if("object"==typeof e.value&&e.value.from){let t=e.value.from.toISOString().split("T")[0],l=e.value.to?e.value.to.toISOString().split("T")[0]:"";return`${e.id}From=${encodeURIComponent(t)}${l?`&${e.id}To=${encodeURIComponent(l)}`:""}`}return`${e.id}=${encodeURIComponent(e.value)}`}return""}).filter(Boolean).join("&"))},onRowSelectionChange:eM,onSortingChange:ev,onColumnVisibilityChange:ef,getCoreRowModel:(0,o.HT)(),getFilteredRowModel:K&&Z?void 0:(0,o.hM)(),onGlobalFilterChange:eb,getPaginationRowModel:(0,o.kW)(),initialState:{pagination:{pageIndex:0,pageSize:T??S}},getSortedRowModel:(0,o.h5)(),getFacetedRowModel:(0,o.kQ)(),getFacetedUniqueValues:(0,o.oS)(),...$&&{manualPagination:!0,rowCount:W??I,pageCount:F??(null!=W?Math.ceil(W/(T??10)):0)},onExpandedChange:ew,getRowCanExpand:O,enableExpanding:!0,getExpandedRowModel:(0,o.D0)(),onPaginationChange:e=>{let t;ek(t="function"==typeof e?e(eR):e),U?.(t.pageIndex,t.pageSize)}});eP.manualPagination=$,eP.totalCount=I,eP.toggleAllRowsSelected=e=>{$&&I?(eA(e??!eC),(e??!eC)&&eM({})):eP.toggleAllPageRowsSelected(e)},eP.getIsAllRowsSelected=()=>$&&I?eC:eP.getIsAllPageRowsSelected(),eP.getIsSomeRowsSelected=()=>$&&I?!eC&&Object.keys(eD).length>0:eP.getIsSomePageRowsSelected(),(0,n.useEffect)(()=>{eA(!1)},[eh]),(0,n.useEffect)(()=>{eS(t.some(e=>e.footer))},[t]),(0,n.useEffect)(()=>{let e=eP.getRowModel().rows.slice(0,2);if(!e.length)return;let t=e.map((e,t)=>{let l=e.original;if(!l||"object"!=typeof l)return null;let a=Object.entries(l).filter(([e,t])=>!!e&&("string"==typeof t||"number"==typeof t||"boolean"==typeof t)).slice(0,3).map(([e,t])=>`${e}: ${t}`);return a.length?{type:"table-row",label:`Row ${t+1}`,text:a.join(" | ")}:null}).filter(Boolean);t.length&&(0,p.$D)(t)},[eP,l,eR.pageIndex,eR.pageSize,ej,eh,ep]),(0,n.useEffect)(()=>{w((eP.getSelectedRowModel().rows||[]).map(e=>e.original),eC)},[eP.getSelectedRowModel().rows,eC]);let eI=eP.getRowModel().rows,eT=es?function(e,t,l=[]){let a=new Map(l.map(e=>[e,[]]));for(let l of e){let e=t(l);a.has(e)||a.set(e,[]),a.get(e).push(l)}return[...a.values()].flat()}(eI,e=>es(e.original),er):eI;return(0,a.jsxs)("div",{className:(0,u.cn)("w-full px-2 space-y-4",j),children:[D&&(0,a.jsx)(d.A,{searchKey:e,showTitle:b,table:eP,title:h,limit:x,allowNew:g,showOptionsOnSelect:v,newItemUrl:C,length:I??l.length,showLengthAndText:A,lengthLabel:R,heading:k,helpButton:L,showViewOptions:y,className:M,additionalActions:E,extraActionButton:_,headerExtraRow:P,onSearchApiCall:K,subtable:X,isAllRowsSelected:eC,totalItems:I,manualPagination:$,filterOptionsOverride:Q,globalFilter:eg,searchGlobal:ee,showSearchbar:et,filterTranslationScope:el,selectionActions:en}),(0,a.jsxs)(i.XI,{className:"overflow-auto",children:[(0,a.jsx)(i.A0,{className:"[&_tr]:border-0 text-base hover:bg-background",children:eP.getHeaderGroups().map(e=>(0,a.jsx)(i.Hj,{className:"hover:bg-background",children:e.headers.map(e=>(0,a.jsx)(i.nd,{colSpan:e.colSpan,className:"font-bold text-foreground hover:bg-background",children:e.isPlaceholder?null:(0,r.Kv)(e.column?.columnDef?.header,e.getContext())},e.id))},e.id))}),(0,a.jsx)(i.BF,{children:eT.length?eT.map((e,t)=>{let l=es?es(e.original):void 0,s=es&&(0===t||es(eT[t-1].original)!==l)&&eo?eo(l):null,o=e.getIsExpanded(),d=e.getCanExpand();return(0,a.jsxs)(n.Fragment,{children:[s?(0,a.jsx)(i.Hj,{className:"border-0 hover:bg-transparent",children:(0,a.jsx)(i.nA,{colSpan:e.getVisibleCells().length,className:"p-0",children:s})}):null,(0,a.jsx)(i.Hj,{"data-state":e.getIsSelected()&&"selected",className:(0,u.cn)("border-0","odd:bg-white-base","hover:bg-muted odd:hover:bg-white-base",d&&"cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"),onClick:d?e.getToggleExpandedHandler():void 0,onKeyDown:d?t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),e.toggleExpanded())}:void 0,tabIndex:d?0:void 0,role:d?"button":void 0,"aria-expanded":d?o:void 0,children:e.getVisibleCells().map((e,t,l)=>(0,a.jsx)(i.nA,{className:(0,u.cn)("p-4 align-middle",0===t&&"rounded-l-2xl",t===l.length-1&&"rounded-r-2xl"),children:(0,a.jsx)("div",{className:(0,u.cn)("line-clamp-2 overflow-hidden text-ellipsis","number"==typeof e.getContext().getValue()&&"text-right"),children:(0,r.Kv)(e.column.columnDef.cell,e.getContext())})},e.id))}),o&&(0,a.jsx)(i.Hj,{className:"bg-inherit hover:bg-inherit",children:(0,a.jsx)(i.nA,{colSpan:e.getVisibleCells().length,children:B?B({row:e}):"No hay contenido para expandir."})})]},e.id)}):(0,a.jsx)(i.Hj,{children:(0,a.jsx)(i.nA,{colSpan:t.length,className:"h-24 text-center",children:Y?(0,a.jsx)(m.k,{className:"m-auto"}):eL("no_results")})})}),eN&&(0,a.jsx)(i.Gg,{className:"border-none",children:eP.getFooterGroups().map(e=>(0,a.jsx)(i.Hj,{className:"bg-background ",children:e.headers.map(e=>(0,a.jsx)(i.nA,{children:(0,r.Kv)(e.column.columnDef.footer,e.getContext())},e.id))},e.id))})]}),N&&(0,a.jsx)(c.A,{defaultPageSize:T??S,table:eP,totalPages:F,totalItems:W,manualPagination:$,updateUrl:q,pageScopedSelection:J})]})}},95106:(e,t,l)=>{l.d(t,{DropdownMenu:()=>c,DropdownMenuContent:()=>x,DropdownMenuGroup:()=>m,DropdownMenuItem:()=>g,DropdownMenuLabel:()=>j,DropdownMenuSeparator:()=>v,DropdownMenuTrigger:()=>u,M5:()=>h,V0:()=>y,hO:()=>b,lv:()=>p,nV:()=>f});var a=l(95155),n=l(12115),s=l(92833),r=l(98981),o=l(94514),i=l(16950),d=l(86190);let c=s.bL,u=s.l9,m=s.YJ;s.ZL;let p=s.Pb;s.z6;let f=n.forwardRef(({className:e,inset:t,children:l,...n},o)=>(0,a.jsxs)(s.ZP,{ref:o,className:(0,d.cn)("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...n,children:[l,(0,a.jsx)(r.A,{className:"ml-auto"})]}));f.displayName=s.ZP.displayName;let h=n.forwardRef(({className:e,...t},l)=>(0,a.jsx)(s.G5,{ref:l,className:(0,d.cn)("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
1de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));h.displayName=s.G5.displayName;let x=n.forwardRef(({className:e,sideOffset:t=4,...l},n)=>(0,a.jsx)(s.ZL,{children:(0,a.jsx)(s.UC,{ref:n,sideOffset:t,className:(0,d.cn)("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...l})}));x.displayName=s.UC.displayName;let g=n.forwardRef(({className:e,inset:t,...l},n)=>(0,a.jsx)(s.q7,{ref:n,className:(0,d.cn)("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...l}));g.displayName=s.q7.displayName;let b=n.forwardRef(({className:e,children:t,checked:l,...n},r)=>(0,a.jsxs)(s.H_,{ref:r,className:(0,d.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:l,...n,children:[(0,a.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,a.jsx)(s.VF,{children:(0,a.jsx)(o.A,{className:"h-4 w-4"})})}),t]}));b.displayName=s.H_.displayName,n.forwardRef(({className:e,children:t,...l},n)=>(0,a.jsxs)(s.hN,{ref:n,className:(0,d.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...l,children:[(0,a.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,a.jsx)(s.VF,{children:(0,a.jsx)(i.A,{className:"h-2 w-2 fill-current"})})}),t]})).displayName=s.hN.displayName;let j=n.forwardRef(({className:e,inset:t,...l},n)=>(0,a.jsx)(s.JU,{ref:n,className:(0,d.cn)("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...l}));j.displayName=s.JU.displayName;let v=n.forwardRef(({className:e,...t},l)=>(0,a.jsx)(s.wv,{ref:l,className:(0,d.cn)("-mx-1 my-1 h-px bg-muted",e),...t}));v.displayName=s.wv.displayName;let y=({className:e,...t})=>(0,a.jsx)("span",{className:(0,d.cn)("ml-auto text-xs tracking-widest opacity-60",e),...t});y.displayName="DropdownMenuShortcut"},97716:(e,t,l)=>{l.d(t,{AM:()=>o,Wv:()=>i,hl:()=>d});var a=l(95155),n=l(12115),s=l(8924),r=l(86190);let o=s.bL,i=s.l9,d=n.forwardRef(({className:e,align:t="center",sideOffset:l=4,...n},o)=>(0,a.jsx)(s.UC,{ref:o,align:t,sideOffset:l,className:(0,r.cn)("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));d.displayName=s.UC.displayName}}]);
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.