1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="919c5637-becc-4379-9d24-ca452eabbb81",e._sentryDebugIdIdentifier="sentry-dbid-919c5637-becc-4379-9d24-ca452eabbb81")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2019],{3659:(e,t,a)=>{"use strict";a.r(t),a.d(t,{__N_SSP:()=>es,default:()=>en});var l=a(37876),s=a(45421),n=a(72350),i=a(37331),r=a(26724),o=a(83259),c=a(48230),d=a.n(c),u=a(14e3),m=a(14232),h=a(27459),g=a(32653),x=a(51802),p=a(94123);let f=x.Ik({page:x.au.number().default(1),per_page:x.au.number().optional(),sort:x.Yj().optional()});var v=a(9533),j=a(69695),b=a(24656);let y={name:"chevrons-left",nodes:[["path",{d:"m11 17-5-5 5-5"}],["path",{d:"m18 17-5-5 5-5"}]]},N={name:"chevrons-right",nodes:[["path",{d:"m6 17 5-5-5-5"}],["path",{d:"m13 17 5-5-5-5"}]]};var w=a(30324);function S(e){let{table:t,pageSizeOptions:a=[5,10,20,30,40,50]}=e;return(0,l.jsxs)("div",{className:"flex w-full flex-col-reverse items-center justify-between gap-4 overflow-auto p-1 sm:flex-row sm:gap-8",children:[(0,l.jsxs)("div",{className:"flex-1 text-sm whitespace-nowrap text-muted-foreground",children:[t.getFilteredSelectedRowModel().rows.length," of"," ",t.getFilteredRowModel().rows.length," row(s) selected."]}),(0,l.jsxs)("div",{className:"flex flex-col-reverse items-center gap-4 sm:flex-row sm:gap-6 lg:gap-8",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,l.jsx)("p",{className:"text-sm font-medium whitespace-nowrap",children:"Rows per page"}),(0,l.jsxs)(w.l6,{value:"".concat(t.getState().pagination.pageSize),onValueChange:e=>{null!==e&&t.setPageSize(Number(e))},children:[(0,l.jsx)(w.bq,{"aria-label":"Rows per page",className:"h-8 w-[4.5rem]",children:(0,l.jsx)(w.yv,{placeholder:t.getState().pagination.pageSize})}),(0,l.jsx)(w.gC,{side:"top",children:a.map(e=>(0,l.jsx)(w.eb,{value:"".concat(e),children:e},e))})]})]}),(0,l.jsxs)("div",{className:"flex items-center justify-center text-sm font-medium",children:["Page ",t.getState().pagination.pageIndex+1," of"," ",t.getPageCount()]}),(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,l.jsx)(s.$n,{"aria-label":"Go to first page",variant:"outline",size:"icon",className:"hidden! size-8 p-0 lg:flex!",onClick:()=>t.setPageIndex(0),disabled:!t.getCanPreviousPage(),children:(0,l.jsx)(r.I,{asset:y,className:"size-4","aria-hidden":"true"})}),(0,l.jsx)(s.$n,{"aria-label":"Go to previous page",variant:"outline",size:"icon",className:"size-8",onClick:()=>t.previousPage(),disabled:!t.getCanPreviousPage(),children:(0,l.jsx)(r.I,{asset:j.J,className:"size-4","aria-hidden":"true"})}),(0,l.jsx)(s.$n,{"aria-label":"Go to next page",variant:"outline",size:"icon",className:"size-8",onClick:()=>t.nextPage(),disabled:!t.getCanNextPage(),children:(0,l.jsx)(r.I,{asset:b.c,className:"size-4","aria-hidden":"true"})}),(0,l.jsx)(s.$n,{"aria-label":"Go to last page",variant:"outline",size:"icon",className:"hidden! size-8 lg:flex!",onClick:()=>t.setPageIndex(t.getPageCount()-1),disabled:!t.getCanNextPage(),children:(0,l.jsx)(r.I,{asset:N,className:"size-4","aria-hidden":"true"})})]})]})]})}function C(e){let{column:t,withBorder:a=!1}=e,l=t.getIsPinned(),s="left"===l&&t.getIsLastColumn("left"),n="right"===l&&t.getIsFirstColumn("right");return{boxShadow:(()=>{if(a){if(s)return"-4px 0 4px -4px var(--border) inset";if(n)return"4px 0 4px -4px var(--border) inset"}})(),left:"left"===l?"".concat(t.getStart("left"),"px"):void 0,right:"right"===l?"".concat(t.getAfter("right"),"px"):void 0,opacity:l?.97:1,position:l?"sticky":"relative",background:"var(--background)",width:t.getSize(),zIndex:+!!l}}a(74927).M;var I=a(4973);function z(e){var t;let{table:a,floatingBar:s=null,children:n,className:i,...r}=e;return(0,l.jsxs)("div",{className:(0,I.cn)("w-full space-y-2.5 overflow-auto",i),...r,children:[n,(0,l.jsx)("div",{className:"overflow-hidden rounded-md border",children:(0,l.jsxs)(v.XI,{children:[(0,l.jsx)(v.A0,{children:a.getHeaderGroups().map(e=>(0,l.jsx)(v.Hj,{children:e.headers.map(e=>(0,l.jsx)(v.nd,{colSpan:e.colSpan,style:{...C({column:e.column})},children:e.isPlaceholder?null:(0,h.Kv)(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),(0,l.jsx)(v.BF,{children:(null==(t=a.getRowModel().rows)?void 0:t.length)?a.getRowModel().rows.map(e=>(0,l.jsx)(v.Hj,{"data-state":e.getIsSelected()&&"selected",children:e.getVisibleCells().map(e=>(0,l.jsx)(v.nA,{style:{...C({column:e.column})},children:(0,h.Kv)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,l.jsx)(v.Hj,{children:(0,l.jsx)(v.nA,{colSpan:a.getAllColumns().length,className:"h-24 text-center",children:"No results."})})})]})}),(0,l.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,l.jsx)(S,{table:a}),a.getFilteredSelectedRowModel().rows.length>0&&s]})]})}var V=a(8252),E=a(43289),k=a(4097);let _={name:"eye-off",nodes:[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"}],["path",{d:"m2 2 20 20"}]]};
1function M(e){let{column:t,title:a,className:n}=e;return t.getCanSort()||t.getCanHide()?(0,l.jsx)("div",{className:(0,I.cn)("flex items-center space-x-2",n),children:(0,l.jsxs)(i.rI,{children:[(0,l.jsxs)(i.ty,{render:(0,l.jsx)(s.$n,{variant:"ghost",size:"sm",className:"-ml-3 h-8 data-popup-open:bg-accent"}),"aria-label":"desc"===t.getIsSorted()?"Sorted descending. Click to sort ascending.":"asc"===t.getIsSorted()?"Sorted ascending. Click to sort descending.":"Not sorted. Click to sort ascending.",children:[(0,l.jsx)("span",{children:a}),t.getCanSort()&&"desc"===t.getIsSorted()?(0,l.jsx)(r.I,{asset:V.y,className:"ml-2 size-4","aria-hidden":"true"}):"asc"===t.getIsSorted()?(0,l.jsx)(r.I,{asset:E.D,className:"ml-2 size-4","aria-hidden":"true"}):(0,l.jsx)(r.I,{asset:k.M,className:"ml-2 size-4","aria-hidden":"true"})]}),(0,l.jsxs)(i.SQ,{align:"start",children:[t.getCanSort()&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(i._2,{"aria-label":"Sort ascending",onClick:()=>t.toggleSorting(!1),children:[(0,l.jsx)(r.I,{asset:E.D,className:"mr-2 size-3.5 text-muted-foreground/70","aria-hidden":"true"}),"Asc"]}),(0,l.jsxs)(i._2,{"aria-label":"Sort descending",onClick:()=>t.toggleSorting(!0),children:[(0,l.jsx)(r.I,{asset:V.y,className:"mr-2 size-3.5 text-muted-foreground/70","aria-hidden":"true"}),"Desc"]})]}),t.getCanSort()&&t.getCanHide()&&(0,l.jsx)(i.mB,{}),t.getCanHide()&&(0,l.jsxs)(i._2,{"aria-label":"Hide column",onClick:()=>t.toggleVisibility(!1),children:[(0,l.jsx)(r.I,{asset:_,className:"mr-2 size-3.5 text-muted-foreground/70","aria-hidden":"true"}),"Hide"]})]})]})}):(0,l.jsx)("div",{className:(0,I.cn)(n),children:a})}var A=a(58460),F=a(68155),P=a(78918),R=a(20799),D=a(35296),O=a(61283),T=a(53232),H=a(27698);function q(e){var t;let{column:a,title:n,options:i}=e,o=new Set(null!=(t=null==a?void 0:a.getFilterValue())?t:[]);return(0,l.jsxs)(T.AM,{children:[(0,l.jsxs)(T.Wv,{render:(0,l.jsx)(s.$n,{variant:"outline",className:"h-8 border-dashed"}),children:[(0,l.jsx)(r.I,{asset:O.H,className:"mr-2 size-4","aria-hidden":"true"}),n,(null==o?void 0:o.size)>0&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(H.w,{orientation:"vertical",className:"mx-2 h-4"}),(0,l.jsx)(P.Ex,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:o.size}),(0,l.jsx)("div",{className:"hidden space-x-1 lg:flex",children:o.size>2?(0,l.jsxs)(P.Ex,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[o.size," selected"]}):i.filter(e=>o.has(e.value)).map(e=>(0,l.jsx)(P.Ex,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:e.label},e.value))})]})]}),(0,l.jsx)(T.hl,{className:"w-[12.5rem] p-0",align:"start",children:(0,l.jsxs)(R.uB,{children:[(0,l.jsx)(R.G7,{placeholder:n}),(0,l.jsxs)(R.oI,{children:[(0,l.jsx)(R.xL,{children:"No results found."}),(0,l.jsx)(R.L$,{children:i.map(e=>{var t;let s=o.has(e.value);return(0,l.jsxs)(R.h_,{value:e.value,onSelect:()=>{s?o.delete(e.value):o.add(e.value);let t=Array.from(o);null==a||a.setFilterValue(t.length?t:void 0)},children:[(0,l.jsx)("div",{className:(0,I.cn)("mr-2 flex size-4 items-center justify-center rounded-sm border border-primary",s?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:(0,l.jsx)(r.I,{asset:D.J,className:"size-4","aria-hidden":"true"})}),e.icon&&(0,l.jsx)(e.icon,{className:"mr-2 size-4 text-muted-foreground","aria-hidden":"true"}),(0,l.jsx)("span",{children:e.label}),e.withCount&&(null==a||null==(t=a.getFacetedUniqueValues())?void 0:t.get(e.value))&&(0,l.jsx)("span",{className:"ml-auto flex size-4 items-center justify-center font-mono text-xs",children:null==a?void 0:a.getFacetedUniqueValues().get(e.value)})]},e.value)})}),o.size>0&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(R.fx,{}),(0,l.jsx)(R.L$,{children:(0,l.jsx)(R.h_,{value:"__clear_filters__",onSelect:()=>null==a?void 0:a.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}var L=a(52529);function $(e){let{table:t}=e;return(0,l.jsxs)(i.rI,{children:[(0,l.jsxs)(i.ty,{"aria-label":"Toggle columns",render:(0,l.jsx)(s.$n,{variant:"outline",size:"sm",className:"ml-auto hidden h-8 lg:flex"}),children:[(0,l.jsx)(r.I,{asset:L.l,className:"mr-2 size-4","aria-hidden":"true"})," ","View"]}
1),(0,l.jsxs)(i.SQ,{align:"end",className:"w-40",children:[(0,l.jsx)(i.lp,{children:"Toggle columns"}),(0,l.jsx)(i.mB,{}),t.getAllColumns().filter(e=>void 0!==e.accessorFn&&e.getCanHide()).map(e=>(0,l.jsx)(i.hO,{className:"capitalize",checked:e.getIsVisible(),onCheckedChange:t=>e.toggleVisibility(!!t),children:(0,l.jsx)("span",{className:"truncate",children:e.id})},e.id))]})]})}function B(e){let{table:t,filterFields:a=[],children:n,className:i,...o}=e,c=t.getState().columnFilters.length>0,{searchableColumns:d,filterableColumns:u}=m.useMemo(()=>({searchableColumns:a.filter(e=>!e.options),filterableColumns:a.filter(e=>e.options)}),[a]);return(0,l.jsxs)("div",{className:(0,I.cn)("flex w-full items-center justify-between space-x-2 overflow-auto",i),...o,children:[(0,l.jsxs)("div",{className:"flex flex-1 items-center space-x-2",children:[d.length>0&&d.map(e=>{var a,s;return t.getColumn(e.value?String(e.value):"")&&(0,l.jsx)(F.p,{placeholder:e.placeholder,value:null!=(s=null==(a=t.getColumn(String(e.value)))?void 0:a.getFilterValue())?s:"",onChange:a=>{var l;return null==(l=t.getColumn(String(e.value)))?void 0:l.setFilterValue(a.target.value)},className:"h-10 w-40 lg:w-64"},String(e.value))}),u.length>0&&u.map(e=>{var a;return t.getColumn(e.value?String(e.value):"")&&(0,l.jsx)(q,{column:t.getColumn(e.value?String(e.value):""),title:e.label,options:null!=(a=e.options)?a:[]},String(e.value))}),c&&(0,l.jsxs)(s.$n,{"aria-label":"Reset filters",variant:"ghost",size:"icon",className:"h-8 px-2 lg:px-3",onClick:()=>t.resetColumnFilters(),children:["Reset",(0,l.jsx)(r.I,{asset:A.X,className:"ml-2 size-4","aria-hidden":"true"})]})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[n,(0,l.jsx)($,{table:t})]})]})}let G=[{id:"select",header:e=>{let{table:t}=e;return(0,l.jsx)(n.S,{checked:t.getIsAllPageRowsSelected(),onCheckedChange:e=>t.toggleAllPageRowsSelected(!!e),"aria-label":"Select all"})},cell:e=>{let{row:t}=e;return(0,l.jsx)(n.S,{checked:t.getIsSelected(),onCheckedChange:e=>t.toggleSelected(!!e),"aria-label":"Select row",id:t.original.id})},enableSorting:!1,enableHiding:!1,size:40},{id:"name",accessorKey:"name",header:e=>{let{column:t}=e;return(0,l.jsx)(M,{column:t,title:"Audit name"})},cell:e=>{let{row:t}=e;return(0,l.jsx)("div",{className:"flex space-x-2 text-primary",children:(0,l.jsx)("span",{children:t.getValue("name")})})},enableResizing:!0},{id:"description",accessorKey:"description",header:"Audit Description",cell:e=>{let{row:t}=e;return(0,l.jsx)("div",{className:"flex space-x-2 text-primary",children:(0,l.jsx)("span",{children:t.getValue("description")})})},minSize:250},{id:"type",accessorKey:"type",header:e=>{let{column:t}=e;return(0,l.jsx)(M,{column:t,title:"Audit Type"})},cell:e=>{let{row:t}=e;return(0,l.jsx)("div",{className:"flex space-x-2 text-primary",children:(0,l.jsx)("span",{children:t.getValue("type")})})}},{id:"actions",header:"Action",cell:function(e){let{row:t}=e,a=(0,u.usePathname)();return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(i.rI,{children:[(0,l.jsx)(i.ty,{render:(0,l.jsx)(s.$n,{"aria-label":"Open menu",variant:"ghost",className:"flex size-8 p-0 data-popup-open:bg-muted"}),children:(0,l.jsx)(r.I,{asset:o.g,className:"size-4","aria-hidden":"true"})}),(0,l.jsxs)(i.SQ,{align:"end",className:"w-40",children:[(0,l.jsx)(i._2,{className:"cursor-pointer",render:(0,l.jsx)(d(),{href:"".concat(a,"/").concat(String(t.original.id))}),children:"View"}),(0,l.jsx)(i.mB,{}),(0,l.jsx)(i._2,{className:"cursor-pointer",disabled:!0,children:"Delete"})]})]})})},size:40}],U=[{label:"Search",placeholder:"Name or Description...",value:"description"},{label:"Audit type",value:"type",options:[{label:"Docs",value:"docs",withCount:!0},{label:"Finance",value:"finance",withCount:!0},{label:"Other",value:"other",withCount:!0}]}],J=e=>{let{data:t}=e,{data:a,pageCount:s,page:n}=t,{table:i}=function(e){var t,a,l,s;let{pageCount:n=-1,filterFields:i=[],enableAdvancedFilter:r=!1,method:o="replace",scroll:c=!1,startTransition:d,limit:x,...v}=e,j=(0,u.useRouter)(),b=(0,u.usePathname)(),y=(0,u.useSearchParams)(),N=Object.fromEntries(y),w=f.parse(N),{page:S,perPage:C,column:I,order:z}=m.useMemo(()=>{var e,t,a,l,s,n,i,r,o,c,d,u;let m=w.page,h=null!=(c=null!=(o=null!=x?x:w.per_page)?o:null==(t=v.initialState)||null==(e=t.pagination)?void 0:e.pageSize)?c:10,g=null!=(d=w.sort)?d:"".concat(null==(s=v.initialState)||null==(l=s.sorting)||null==(a=l[0])?void 0:a.id,".").concat((null==(r=v.initialState)||null==(i=r.sorting)||null==(n=i[0])?void 0:n.desc)?"desc":"asc"),[p,f]=null!=(u=null==g?void 0:g.split("."))?u:[];return{page:m,perPage:h,column:p,order:f}},[x,null==(a=v.initialState)||null==(t=a.pagination)?void 0:t.pageSize,null==(l=v.initialState)?void 0:l.sorting,w.page,w.per_page,w.sort]),{searchableColumns:V,filterableColumns:E}=m.useMemo(()=>({searchableColumns:i.filter(e=>!e.options),filterableColumns:i.filter(e=>e.options)}),[i]),{createQueryString:k}=(s=new URLSearchParams(y.toString()),{createQueryString:m.useCallback(e=>{let t=new URLSearchParams(null==s?void 0:s.toString());for(let[a,l]of Object.entries(e))null===l?t.delete(a):t.set(a,String(l));return t.toString()},[s])}),_=m.useMemo(()=>Array.from(y.entries()).reduce((e,t)=>
1{let[a,l]=t,s=E.find(e=>e.value===a),n=V.find(e=>e.value===a);return s?e.push({id:a,value:l.split(".")}):n&&e.push({id:a,value:[l]}),e},[]),[E,V,y]),[M,A]=m.useState({}),[F,P]=m.useState({}),[R,D]=m.useState(_),[{pageIndex:O,pageSize:T},H]=m.useState({pageIndex:S-1,pageSize:C}),q=m.useMemo(()=>({pageIndex:O,pageSize:T}),[O,T]),[L,$]=m.useState(I?[{id:I,desc:"desc"===z}]:[]);m.useEffect(()=>{function e(){var e,t,a,l;if(!b)return;let s="".concat(b,"?").concat(k({page:O+1,per_page:T,sort:(null==(e=L[0])?void 0:e.id)&&(null==(t=L[0])?void 0:t.id)!==""?"".concat(null==(a=L[0])?void 0:a.id,".").concat((null==(l=L[0])?void 0:l.desc)?"desc":"asc"):null}));"push"===o?j.push(s):j.replace(s)}d?d(()=>{e()}):e()},[O,T,L,o]);let B=(0,p.d)(JSON.stringify(R.filter(e=>V.find(t=>t.value===e.id))),500),G=m.useMemo(()=>JSON.parse(B),[B]),U=m.useMemo(()=>R.filter(e=>E.find(t=>t.value===e.id)),[R,E]),[J,X]=m.useState(!1);m.useEffect(()=>{if(r)return;if(!J)return void X(!0);let e={page:1};for(let t of G)"string"==typeof t.value&&Object.assign(e,{[t.id]:"string"==typeof t.value?t.value:null});for(let t of U)"object"==typeof t.value&&Array.isArray(t.value)&&Object.assign(e,{[t.id]:t.value.join(".")});for(let t of Object.keys(Object.fromEntries(y)))(V.find(e=>e.value===t)&&!G.find(e=>e.id===t)||E.find(e=>e.value===t)&&!U.find(e=>e.id===t))&&Object.assign(e,{[t]:null});function t(){let t="".concat(b,"?").concat(k(e));"push"===o?j.push(t):j.replace(t)}d?d(()=>{t()}):t(),Y.setPageIndex(0)},[G,U,o,c]);let Y=(0,h.N4)({...v,pageCount:n,state:{pagination:q,sorting:L,columnVisibility:F,rowSelection:M,columnFilters:R},enableRowSelection:!0,onRowSelectionChange:A,onPaginationChange:H,onSortingChange:$,onColumnFiltersChange:D,onColumnVisibilityChange:P,getCoreRowModel:(0,g.HT)(),getFilteredRowModel:(0,g.hM)(),getPaginationRowModel:(0,g.kW)(),getSortedRowModel:(0,g.h5)(),getFacetedRowModel:(0,g.kQ)(),getFacetedUniqueValues:(0,g.oS)(),manualPagination:!0,manualSorting:!0,manualFiltering:!0});return{table:Y}}({columns:G,data:a,pageCount:s,method:"replace",filterFields:U,initialState:{sorting:[{id:"id",desc:!1}],pagination:{pageIndex:(n||1)-1,pageSize:5}},getRowId:(e,t)=>"".concat(null==e?void 0:e.id,"-").concat(t)});return(0,l.jsx)(z,{table:i,className:"px-auto mx-auto lg:mx-4 lg:px-4",children:(0,l.jsx)(B,{table:i,filterFields:U})})};var X=a(51364),Y=a(47330);function K(e){let{columnCount:t,rowCount:a=10,searchableColumnCount:s=0,filterableColumnCount:n=0,showViewOptions:i=!0,cellWidths:r=["auto"],withPagination:o=!0,shrinkZero:c=!1,className:d,...u}=e;return(0,l.jsxs)("div",{className:(0,I.cn)("w-full space-y-2.5 overflow-auto",d),...u,children:[(0,l.jsxs)("div",{className:"flex w-full items-center justify-between space-x-2 overflow-auto",children:[(0,l.jsxs)("div",{className:"flex flex-1 items-center space-x-2",children:[s>0?Array.from({length:s}).map((e,t)=>(0,l.jsx)(Y.E,{className:"h-7 w-40 lg:w-60"},t)):null,n>0?Array.from({length:n}).map((e,t)=>(0,l.jsx)(Y.E,{className:"h-7 w-[4.5rem] border-dashed"},t)):null]}),i?(0,l.jsx)(Y.E,{className:"ml-auto hidden h-7 w-[4.5rem] lg:flex"}):null]}),(0,l.jsx)("div",{className:"rounded-md border",children:(0,l.jsxs)(v.XI,{children:[(0,l.jsx)(v.A0,{children:Array.from({length:1}).map((e,a)=>(0,l.jsx)(v.Hj,{className:"hover:bg-transparent",children:Array.from({length:t}).map((e,t)=>(0,l.jsx)(v.nd,{style:{width:r[t],minWidth:c?r[t]:"auto"},children:(0,l.jsx)(Y.E,{className:"h-6 w-full"})},t))},a))}),(0,l.jsx)(v.BF,{children:Array.from({length:a}).map((e,a)=>(0,l.jsx)(v.Hj,{className:"hover:bg-transparent",children:Array.from({length:t}).map((e,t)=>(0,l.jsx)(v.nA,{style:{width:r[t],minWidth:c?r[t]:"auto"},children:(0,l.jsx)(Y.E,{className:"h-6 w-full"})},t))},a))})]})}),o?(0,l.jsxs)("div",{className:"flex w-full items-center justify-between gap-4 overflow-auto p-1 sm:gap-8",children:[(0,l.jsx)(Y.E,{className:"h-7 w-40 shrink-0"}),(0,l.jsxs)("div",{className:"flex items-center gap-4 sm:gap-6 lg:gap-8",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,l.jsx)(Y.E,{className:"h-7 w-24"}),(0,l.jsx)(Y.E,{className:"h-7 w-[4.5rem]"})]}),(0,l.jsx)("div",{className:"flex items-center justify-center text-sm font-medium",children:(0,l.jsx)(Y.E,{className:"h-7 w-20"})}),(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,l.jsx)(Y.E,{className:"hidden h-7 w-7 lg:block"}),(0,l.jsx)(Y.E,{className:"h-7 w-7"}),(0,l.jsx)(Y.E,{className:"h-7 w-7"}),(0,l.jsx)(Y.E,{className:"hidden h-7 w-7 lg:block"})]})]})]}):null]})}var Q=a(10579),W=a(89099),Z=a(52333),ee=a(95254),et=a(65941),ea=a(55791);let el=x.Ik({page:x.au.string().default("1"),per_page:x.au.string().default("5"),sort:x.Yj().optional(),name:x.Yj().optional(),description:x.Yj().optional(),type:x.Yj().optional()});var es=!0;let en=()=>{let{data:e,loading:t}=function(){var e;let t=(0,W.useRouter)(),{projects:a}=(0,ee.A)(),{team:l}=(0,et.A)(),s=(0,m.useMemo)(()=>Object.fromEntries(Object.entries(t.query).map(e=>
1{let[t,a]=e;return[t,Array.isArray(a)?a[0]:a]})),[t.query]),n=el.parse(s),i=(0,m.useMemo)(()=>!!l&&(0,ea.z6)(l),[l]);(0,m.useEffect)(()=>{l&&(i||t.back())},[i,l,t]);let r=(0,m.useMemo)(()=>{var e;return null==a||null==(e=a.find(e=>e.slug===t.query.project))?void 0:e.id},[a,null==(e=t.query)?void 0:e.project]),o=(0,m.useMemo)(()=>new URLSearchParams(n).toString(),[n]),{data:c,mutate:d,error:u}=(0,Z.u)(r&&i?"/api/project/".concat(r,"/audits").concat(o?"?".concat(o):""):null,I.GO);return{loading:!c&&!u,data:c,mutate:d}}();return(0,l.jsx)(Q.k,{title:"Audit",width:"xl",RightHeading:(0,l.jsx)(X.A,{}),children:t?(0,l.jsx)(K,{columnCount:5,rowCount:5,searchableColumnCount:1,filterableColumnCount:2,cellWidths:["5rem","5rem","30rem","30rem","5rem"],shrinkZero:!0}):(0,l.jsx)(J,{data:e||{data:[],pageCount:1,page:1},loading:t})})}},4232:(e,t,a)=>{"use strict";a.d(t,{ic:()=>s});var l=a(14232);function s({defaultValue:e,onChange:t,value:a}){let[s,n]=(0,l.useState)(e),i=void 0!==a,r=(0,l.useRef)(i),o=(0,l.useRef)(!1);o.current=function({controlled:e,initiallyControlled:t,reported:a,warn:l}){if(a||e===t)return a;
1if(function(){let e=globalThis;if("boolean"==typeof e.__DEV__)return e.__DEV__;let t=e.process?.env?.NODE_ENV;return void 0!==t&&"production"!==t}()){let a=`A component changed from ${t?"controlled":"uncontrolled"} to ${e?"controlled":"uncontrolled"}. Keep its control mode stable for its lifetime.`;l?l(a):console.warn(a)}return!0}({controlled:i,initiallyControlled:r.current,reported:o.current});let c=a??s;return[c,e=>(function({controlled:e,currentValue:t,nextValue:a,onChange:l,setUncontrolledValue:s}){Object.is(t,a)||(e||s(a),l?.(a))})({controlled:i,currentValue:c,nextValue:e,onChange:t,setUncontrolledValue:n})]}},5713:(e,t,a)=>{"use strict";a.d(t,{P:()=>s});var l=a(55791);let s=e=>!!e&&(0,l.iw)(e)&&!0===e.graphragExtractEnabled},8252:(e,t,a)=>{"use strict";a.d(t,{y:()=>l});let l={name:"arrow-down",nodes:[["path",{d:"M12 5v14"}],["path",{d:"m19 12-7 7-7-7"}]]}},10579:(e,t,a)=>{"use strict";a.d(t,{k:()=>c});var l=a(37876),s=a(89099),n=a(14232),i=a(5713),r=a(65941),o=a(55176);let c=e=>{let t=(0,s.useRouter)(),{team:a}=(0,r.A)(),c=(0,n.useMemo)(()=>(0,i.P)(a),[a]),d=(0,n.useMemo)(()=>{var e,a;if(!(null==(e=t.query)?void 0:e.team)||!(null==(a=t.query)?void 0:a.project))return;let l="/".concat(t.query.team,"/").concat(t.query.project);return[{label:"Data",href:"".concat(l)},{label:"Playground",href:"".concat(l,"/playground")},{label:"Insights",href:"".concat(l,"/insights"),tag:"Beta"},{label:"OpenAPI",href:"".concat(l,"/openapi"),tag:"New"},{label:"Doc Gen",href:"".concat(l,"/docs-generator"),tag:"New"},{label:"Destinations",href:"".concat(l,"/destinations")},{label:"Settings",href:"".concat(l,"/settings")},...c?[{label:"Visualize",href:"".concat(l,"/visualize")}]:[]]},[t.query.team,t.query.project,c]);return(0,l.jsx)(o.u,{...e,subTabItems:d})}},11374:(e,t,a)=>{"use strict";a.d(t,{n:()=>j});var l=a(37876),s=a(45421),n=a(20028),i=a(22709),r=a(68155),o=a(92744),c=a(8587),d=a(18180),u=a(14232),m=a(51802),h=a(18562),g=a(4973);let x=(0,m.Ik)({firstName:(0,m.Yj)({required_error:"Please enter your first name"}),lastName:(0,m.Yj)({required_error:"Please enter your last name"}),email:(0,m.Yj)().email("Please enter a valid email"),message:(0,m.Yj)({required_error:"Please enter a message"})}),p=e=>{let{id:t,name:a,label:s,type:n,multiline:o,placeholder:u,className:m,touched:h,errors:g,setFieldError:x,setFieldTouched:p,disabled:f}=e,v=g[a],j=!!(h[a]&&v);return(0,l.jsxs)(i.D0,{"data-invalid":j,"data-disabled":f,children:[(0,l.jsx)(i.dh,{htmlFor:t,children:s}),(0,l.jsx)(d.D0,{id:t,type:o?void 0:n,name:a,as:o?c.T:r.p,placeholder:u,disabled:f,className:m,"aria-describedby":j?"".concat(t,"-error"):void 0,"aria-invalid":j,"data-error":h[a]&&v,onFocus:()=>{x(a,void 0),p(a,!1)}}),(0,l.jsx)(i.bg,{id:"".concat(t,"-error"),children:j?v:void 0})]})},f=e=>{let{isSubmitting:t}=e;return(0,l.jsxs)(s.$n,{type:"submit",disabled:t,"aria-busy":t,children:[t&&(0,l.jsx)(o.y,{"aria-hidden":"true"}),"Submit"]})},v=async(e,t,a,l,s,n)=>{l(!0);let i=t.email;await fetch("/api/support/contact",{method:"POST",body:JSON.stringify({...t,email:i}),headers:{"Content-Type":"application/json",accept:"application/json"}}),setTimeout(()=>{s(!0),setTimeout(()=>{l(!1),setTimeout(()=>{n(!1),setTimeout(()=>{a(),s(!1)},1e3)},2e3)},1e3)},1e3)},j=e=>{let{open:t,setOpen:a}=e,[s,r]=(0,u.useState)(!1),[o,c]=(0,u.useState)(!1);return(0,u.useEffect)(()=>r(!0),[]),(0,u.useEffect)(()=>{t&&c(!1)},[t]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:(0,g.cn)("pointer-events-none fixed inset-0 z-20 transition",{"opacity-0":!t,"opacity-100":t}),children:[(0,l.jsx)("div",{className:"fixed inset-x-0 bottom-0 h-40 bg-gradient-to-t from-background to-background/0"}),(0,l.jsx)("div",{className:"fixed inset-y-0 left-0 w-40 bg-gradient-to-r from-background to-background/0"}),(0,l.jsx)("div",{className:"fixed inset-y-0 right-0 w-40 bg-gradient-to-l from-background to-background/0"})]}),(0,l.jsx)(n.lG,{open:t,onOpenChange:a,children:s&&(0,l.jsxs)(n.Cf,{className:"flex max-h-[90dvh] w-[90%] max-w-[560px] flex-col overflow-y-auto",children:[(0,l.jsx)("div",{className:(0,g.cn)("pointer-events-none absolute inset-0 flex transform items-center justify-center p-8 text-sm delay-700 duration-700",{"-translate-y-2 opacity-100":o,"translate-y-0 opacity-0":!o}),children:(0,l.jsx)("p",{className:"text-center text-foreground",children:"Thank y
1ou!"})}),(0,l.jsxs)("div",{className:(0,g.cn)("relative transform duration-500",{"translate-y-4 opacity-0":o}),children:[(0,l.jsxs)(n.c7,{className:"pr-8",children:[(0,l.jsx)(n.L3,{children:"Contact us"}),(0,l.jsx)(n.rr,{children:"Contact us to learn more about our product and secure early access."})]}),(0,l.jsx)(d.l1,{initialValues:{firstName:"",lastName:"",email:"",message:""},validateOnBlur:!1,validateOnChange:!1,validationSchema:(0,h.toFormikValidationSchema)(x),onSubmit:async(e,t)=>{let{setSubmitting:l,resetForm:s}=t;await v("xvojobaz",e,s,l,c,a)},children:e=>{let{isSubmitting:t,touched:a,setFieldTouched:s,errors:r,setFieldError:o}=e;return(0,l.jsxs)(d.lV,{className:"mt-6",children:[(0,l.jsxs)(i.M_,{children:[(0,l.jsxs)("div",{className:"grid grid-cols-1 items-start gap-4 sm:grid-cols-2",children:[(0,l.jsx)(p,{id:"contact-first-name",name:"firstName",label:"First name",type:"text",placeholder:"Harper",disabled:t,touched:a,errors:r,setFieldError:o,setFieldTouched:s}),(0,l.jsx)(p,{id:"contact-last-name",name:"lastName",label:"Last name",type:"text",placeholder:"Evans",disabled:t,touched:a,errors:r,setFieldError:o,setFieldTouched:s})]}),(0,l.jsx)(p,{id:"contact-email",name:"email",label:"Company email",type:"email",placeholder:"[email protected]",disabled:t,touched:a,errors:r,setFieldError:o,setFieldTouched:s}),(0,l.jsx)(p,{id:"contact-message",name:"message",label:"Message",multiline:!0,placeholder:"Tell us about your needs and timeline",className:"h-40",disabled:t,touched:a,errors:r,setFieldError:o,setFieldTouched:s})]}),(0,l.jsx)(n.Es,{className:"mt-6",children:(0,l.jsx)(f,{isSubmitting:t})})]})}})]})]})})]})}},20799:(e,t,a)=>{"use strict";a.d(t,{uB:()=>v,xL:()=>y,L$:()=>N,G7:()=>j,h_:()=>S,oI:()=>b,fx:()=>w});var l=a(37876),s=a(14232),n=a(82959),i=a(83543),r=a(96773),o=a(28045);function c({accessibilityElementsHidden:e,accessibilityLabel:t,accessibilityLiveRegion:a,accessibilityRole:l,accessibilityState:n,accessible:i,className:c,defaultValue:d,editable:u,maxLength:m,multiline:h,nativeID:g,onBlur:x,onChangeText:p,onFocus:f,onSubmitEditing:v,placeholder:j,ref:b,role:y,secureTextEntry:N,style:w,testID:S,value:C,...I}){let z={...(0,r.O)({accessibilityElementsHidden:e,accessibilityLabel:t,accessibilityLiveRegion:a,accessibilityRole:l,accessibilityState:n,nativeID:g,role:y,testID:S}),...I,[o.O4]:"text-input",className:c,defaultValue:d,maxLength:m??void 0,onChange:e=>{p?.(e.currentTarget.value)},placeholder:j??void 0,readOnly:!1===u||void 0,ref:b,style:w,value:C};return x&&(z.onBlur=x),f&&(z.onFocus=f),v&&!0!==h&&(z.onKeyDown=e=>{"Enter"===e.key&&v({nativeEvent:{text:e.currentTarget.value}})}),!0===h?(0,s.createElement)("textarea",z):(z.type=!0===N?"password":"text",(0,s.createElement)("input",z))}(0,o.Bb)();var d=a(17235),u=a(82395),m=a(4232);function h(e){return e.normalize("NFD").replaceAll(/[\u0300-\u036F]/g,"").trim().toLocaleLowerCase()}let g=(0,s.createContext)(null);function x(e){let t=(0,s.use)(g);if(!t)throw Error(`${e} must be rendered inside Command`);return t}let p=(e,t,a)=>h(a).includes(h(t));function f(e){return void 0===e?[]:"string"==typeof e?[e]:e}function v({activeValue:e,children:t,className:a,defaultActiveValue:r,defaultValue:o,filter:c=p,loading:d=!1,multiple:u=!1,onActiveValueChange:h,onValueChange:x,value:v,...j}){let[b,y]=s.useState([]),[N,w]=s.useState(""),[S,C]=(0,m.ic)({defaultValue:r,onChange:h,value:e}),I=void 0===v?void 0:f(v),[z,V]=(0,m.ic)({defaultValue:f(o),onChange:e=>x?.(u?e:e[0]??""),value:I}),E=`${(0,s.useId)()}-list`,k=s.useCallback(e=>(y(t=>{let a=t.findIndex(t=>t.value===e.value);if(-1!==a){let l=[...t];return l[a]=e,l}return[...t,e]}),()=>y(t=>t.filter(t=>t.value!==e.value))),[]),_=s.useCallback(e=>{let t=b.find(t=>t.value===e);t&&!t.disabled&&(V(u?z.includes(e)?z.filter(t=>t!==e):[...z,e]:[e]),C(e))},[b,u,z,C,V]),M=(0,s.useMemo)(()=>({activeValue:S,filter:c,items:b,listId:E,loading:d,multiple:u,query:N,register:k,select:_,selected:z,setActiveValue:C,setQuery:w}),[S,c,b,E,d,u,N,k,_,z,C]);return(0,l.jsx)(g,{value:M,children:(0,l.jsx)(n.X,{...j,accessibilityRole:"menu",className:(0,i.cx)("cn-command flex w-full flex-col overflow-hidden",a),children:t})})}
1function j({className:e,onChangeText:t,onValueChange:a,value:s,...n}){let r=x("CommandInput"),o=s??r.query;return(0,l.jsx)(c,{...n,"aria-controls":r.listId,"aria-expanded":!0,accessibilityRole:"combobox",className:(0,i.cx)("cn-command-input min-h-11 border-b border-border bg-transparent px-3 py-2 text-foreground outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),onChangeText:e=>{t?.(e),a?.(e),r.setQuery(e)},value:o})}function b({className:e,...t}){let a=x("CommandList"),s=(function(e,t){let a=h(t);return a?e.filter(e=>h(e.textValue).includes(a)):[...e]})(a.items,a.query).filter(e=>a.filter(e.value,a.query,e.textValue));return(0,l.jsx)(n.X,{...t,...{onKeyDown:e=>{if(e.defaultPrevented)return;let t={ArrowDown:"next",ArrowUp:"previous",End:"last",Home:"first"}[e.key];t?(e.preventDefault(),a.setActiveValue(function({activeValue:e,direction:t,items:a,loop:l=!0}){let s=a.filter(e=>!e.disabled);if(0===s.length)return;if("first"===t)return s[0]?.value;if("last"===t)return s.at(-1)?.value;let n=s.findIndex(t=>t.value===e);if(-1===n)return"previous"===t?s.at(-1)?.value:s[0]?.value;let i=n+("next"===t?1:-1);return i>=0&&i<s.length?s[i]?.value:l?"next"===t?s[0]?.value:s.at(-1)?.value:s[n]?.value}({activeValue:a.activeValue,direction:t,items:s}))):"Enter"===e.key&&a.activeValue&&(e.preventDefault(),a.select(a.activeValue))}},nativeID:a.listId,accessibilityRole:"list",className:(0,i.cx)("cn-command-list w-full overflow-x-hidden overflow-y-auto",e)})}function y({className:e,...t}){let a=x("CommandEmpty");return a.items.some(e=>a.filter(e.value,a.query,e.textValue))||a.loading?null:(0,l.jsx)(d.J,{...t,className:(0,i.cx)("cn-command-empty text-muted-foreground",e)})}function N({children:e,className:t,heading:a,...s}){return(0,l.jsxs)(n.X,{...s,className:(0,i.cx)("cn-command-group",t),children:[a?(0,l.jsx)(d.J,{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:a}):null,e]})}function w({className:e,...t}){return(0,l.jsx)(n.X,{...t,accessibilityElementsHidden:!0,className:(0,i.cx)("cn-command-separator",e)})}function S({children:e,className:t,disabled:a=!1,onPress:n,onSelect:r,textValue:o,value:c,...m}){let h=x("CommandItem"),{register:g}=h,p=o??function(e){if("string"==typeof e||"number"==typeof e)return String(e)}(e)??c;if((0,s.useEffect)(()=>g({disabled:a,textValue:p,value:c}),[a,p,g,c]),!h.filter(c,h.query,p))return null;let f=h.selected.includes(c),v=h.activeValue===c;return(0,l.jsx)(u.x,{...m,accessibilityRole:h.multiple?"checkbox":"menuitem",accessibilityState:{checked:h.multiple?f:void 0,disabled:a,selected:f},className:(0,i.cx)("cn-command-item group/command-item min-h-11 w-full flex-row data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",v&&"bg-muted",a&&"opacity-50",t),...{"data-disabled":a?"true":void 0,"data-selected":v?"":void 0},disabled:a,onFocus:()=>h.setActiveValue(c),onPress:e=>{a||(n?.(e),r?.(c),h.select(c))},children:"string"==typeof e||"number"==typeof e?(0,l.jsx)(d.J,{className:"text-sm text-foreground",children:e}):e})}},24656:(e,t,a)=>{"use strict";a.d(t,{c:()=>l});let l={name:"chevron-right",nodes:[["path",{d:"m9 18 6-6-6-6"}]]}},43289:(e,t,a)=>{"use strict";a.d(t,{D:()=>l});let l={name:"arrow-up",nodes:[["path",{d:"m5 12 7-7 7 7"}],["path",{d:"M12 19V5"}]]}},51364:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});var l=a(37876),s=a(45421),n=a(14232),i=a(11374);let r=()=>{let[e,t]=(0,n.useState)(!1);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.$n,{variant:"outline",size:"sm",className:"mb-4",onClick:()=>t(!0),children:"Need Help with an Audit?"}),(0,l.jsx)(i.n,{open:e,setOpen:t})]})}},52529:(e,t,a)=>{"use strict";a.d(t,{l:()=>l});let l={name:"sliders-horizontal",nodes:[["path",{d:"M10 5H3"}],["path",{d:"M12 19H3"}],["path",{d:"M14 3v4"}],["path",{d:"M16 17v4"}],["path",{d:"M21 12h-9"}],["path",{d:"M21 19h-5"}],["path",{d:"M21 5h-7"}],["path",{d:"M8 10v4"}],["path",{d:"M8 12H3"}]]}},53232:(e,t,a)=>{"use strict";a.d(t,{AM:()=>d,Wv:()=>u,hl:()=>m});var l=a(37876),s=a(21583),n=a(49952),i=a(57714),r=a(20334),o=a(37156),c=a(83543);function d(e){return(0,l.jsx)(s.y,{"data-slot":"popover",...e})}function u(e){return(0,l.jsx)(n.W,{"data-slot":"popover-trigger",...e})}function m({className:e,align:t="center",alignOffset:a=0,side:s="bottom",sideOffset:n=4,...d}){return(0,l.jsx)(i.i,{children:(0,l.jsx)(r.U,{align:t,alignOffset:a,side:s,sideOffset:n,className:"isolate z-50",children:(0,l.jsx)(o.i,{"data-slot":"popover-content",className:"function"==typeof e?t=>
1(0,c.cx)("cn-popover-content cn-popover-content-logical z-50 w-72 origin-(--transform-origin) outline-hidden",e(t)):(0,c.cx)("cn-popover-content cn-popover-content-logical z-50 w-72 origin-(--transform-origin) outline-hidden",e),...d})})})}},61283:(e,t,a)=>{"use strict";a.d(t,{H:()=>l});let l={name:"circle-plus",nodes:[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M8 12h8"}],["path",{d:"M12 8v8"}]]}},69695:(e,t,a)=>{"use strict";a.d(t,{J:()=>l});let l={name:"chevron-left",nodes:[["path",{d:"m15 18-6-6 6-6"}]]}},71837:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/[team]/[project]/audit",function(){return a(3659)}])},74927:(e,t,a)=>{"use strict";a.d(t,{M:()=>l});let l={name:"square",nodes:[["rect",{height:"18",rx:"2",width:"18",x:"3",y:"3"}]]}},83259:(e,t,a)=>{"use strict";a.d(t,{g:()=>l});let l={name:"ellipsis",nodes:[["circle",{cx:"12",cy:"12",r:"1"}],["circle",{cx:"19",cy:"12",r:"1"}],["circle",{cx:"5",cy:"12",r:"1"}]]}},94123:(e,t,a)=>{"use strict";a.d(t,{d:()=>s});var l=a(14232);function s(e,t){let[a,s]=l.useState(e);return l.useEffect(()=>{let a=setTimeout(()=>s(e),null!=t?t:500);return()=>{clearTimeout(a)}},[e,t]),a}}},e=>{e.O(0,[8230,6177,7133,28,145,7123,133,930,7876,8217,5186,324,2350,9407,1627,2222,5176,
1636,6593,8792],()=>e(e.s=71837)),_N_E=e.O()}]);
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.