1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[28085],{1173:(e,t,l)=>{l.d(t,{A:()=>r});var a=l(95155);function r(){return(0,a.jsxs)("div",{className:"flex h-full w-full min-w-0 flex-1 flex-col gap-4 sm:gap-6",children:[(0,a.jsxs)("div",{className:"flex w-full min-w-0 flex-col gap-4 lg:flex-row lg:justify-between",children:[(0,a.jsxs)("div",{className:"flex w-full flex-col gap-3 md:flex-row md:gap-4",children:[(0,a.jsx)("div",{className:"h-10 w-full animate-pulse rounded-md bg-gray-200 md:max-w-[180px]"}),(0,a.jsx)("div",{className:"h-10 w-full animate-pulse rounded-md bg-gray-200 md:max-w-[328px]"})]}),(0,a.jsxs)("div",{className:"flex w-full items-center gap-2 overflow-hidden",children:[(0,a.jsx)("div",{className:"h-9 w-[110px] shrink-0 animate-pulse rounded-lg bg-gray-200 sm:h-10 sm:w-[130px]"}),(0,a.jsx)("div",{className:"h-9 w-[100px] shrink-0 animate-pulse rounded-lg bg-gray-200 sm:h-10 sm:w-[120px]"}),(0,a.jsx)("div",{className:"h-9 w-[80px] shrink-0 animate-pulse rounded-lg bg-gray-200 sm:h-10 sm:w-[100px]"}),(0,a.jsx)("div",{className:"h-9 w-[70px] shrink-0 animate-pulse rounded-lg bg-gray-200 sm:h-10 sm:w-[80px]"}),(0,a.jsx)("div",{className:"h-9 w-10 shrink-0 animate-pulse rounded-lg bg-gray-200 sm:h-10"})]})]}),(0,a.jsxs)("div",{className:"flex h-full w-full flex-col gap-2",children:[(0,a.jsx)("div",{className:"mx-auto flex h-full min-h-[450px] w-full flex-col",children:(0,a.jsx)("div",{className:"flex h-full w-full flex-1 rounded-2xl",children:(0,a.jsx)("div",{className:"flex h-full w-full flex-col px-0 pt-1",children:(0,a.jsx)("div",{className:"relative flex h-full w-full flex-1",children:(0,a.jsx)("div",{className:"flex h-full w-full overflow-hidden rounded-[20px] bg-white shadow-[0_0_8px_rgba(0,0,0,0.05)]",children:(0,a.jsx)("div",{className:"h-full w-full",children:(0,a.jsxs)("div",{className:"w-full",children:[(0,a.jsx)("div",{className:"border-border sticky top-0 z-10 flex h-14 w-full items-center border-b bg-[#F4F6FB] px-4",children:(0,a.jsxs)("div",{className:"flex h-full w-full items-center gap-4",children:[(0,a.jsx)("div",{className:"h-5 w-5 flex-shrink-0 animate-pulse rounded bg-gray-300"}),(0,a.jsx)("div",{className:"h-5 w-24 animate-pulse rounded bg-gray-300"}),(0,a.jsx)("div",{className:"h-5 w-32 animate-pulse rounded bg-gray-300"}),(0,a.jsx)("div",{className:"h-5 w-28 animate-pulse rounded bg-gray-300"}),(0,a.jsx)("div",{className:"h-5 w-24 animate-pulse rounded bg-gray-300"}),(0,a.jsx)("div",{className:"ml-auto h-5 w-20 animate-pulse rounded bg-gray-300"})]})}),(0,a.jsx)("div",{className:"flex w-full flex-col",children:[...Array(8)].map((e,t)=>(0,a.jsxs)("div",{className:"border-border flex h-[53px] w-full items-center gap-4 border-b px-4 last:border-b-0",children:[(0,a.jsx)("div",{className:"h-5 w-5 flex-shrink-0 animate-pulse rounded bg-gray-200"}),(0,a.jsx)("div",{className:"h-5 w-24 animate-pulse rounded bg-gray-200"}),(0,a.jsx)("div",{className:"h-5 w-32 animate-pulse rounded bg-gray-200"}),(0,a.jsx)("div",{className:"h-5 w-28 animate-pulse rounded bg-gray-200"}),(0,a.jsx)("div",{className:"h-5 w-24 animate-pulse rounded bg-gray-200"}),(0,a.jsx)("div",{className:"ml-auto h-8 w-20 animate-pulse rounded-lg bg-gray-200"})]},t))})]})})})})})})}),(0,a.jsx)("div",{className:"flex flex-col gap-2.5",children:(0,a.jsxs)("div",{className:"flex items-center justify-between rounded-lg bg-[#F4F6FB] px-4 py-3 md:px-6",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"h-5 w-24 animate-pulse rounded bg-gray-200"}),(0,a.jsx)("div",{className:"h-10 w-20 animate-pulse rounded-lg bg-gray-200"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"h-5 w-32 animate-pulse rounded bg-gray-200"}),(0,a.jsx)("div",{className:"h-10 w-10 animate-pulse rounded-lg bg-gray-200"}),(0,a.jsx)("div",{className:"h-10 w-10 animate-pulse rounded-lg bg-gray-200"}),(0,a.jsx)("div",{className:"h-10 w-10 animate-pulse rounded-lg bg-gray-200"}),(0,a.jsx)("div",{className:"h-10 w-10 animate-pulse rounded-lg bg-gray-200"})]})]})})]})]})}l(12115)},14734:(e,t,l)=>{l.d(t,{F:()=>n});var a=l(12115),r=l(32140);function n(e){let{notifications:t,isConnected:l,clearNotifications:n,initSocket:s,disconnectSocket:i,emit:o}=(0,r.U)();(0,a.useEffect)(()=>{e&&s(e)},[e,s]);let c=(0,a.useCallback)((e,t,l)=>{o(e,t,l)},[o]);return{socket:null,notifications:t,isConnected:l,emit:c,disconnect:(0,a.useCallback)(()=>{i()},[i]),clearNotifications:(0,a.useCallback)(()=>n(),[n])}}},20591:(e,t,l)=>{l.d(t,{ZI:()=>c,k$:()=>o,m_:()=>i});var a=l(95155);l(12115);var r=l(47520),n=l(64269);function s(e){let{delayDuration:t=0,...l}=e;return(0,a.jsx)(r.Kq,{"data-slot":"tooltip-provider",delayDuration:t,...l})}function i(e){let{...t}=e;return(0,a.jsx)(s,{children:(0,a.jsx)(r.bL,{"data-slot":"tooltip",...t})})}function o(e){let{...t}=e;return(0,a.jsx)(r.l9,{"data-slot":"tooltip-trigger",...t})}function c(e){let{className:t,sideOffset:l=0,children:s,...i}=e;return(0,a.jsx)(r.ZL,{children:(0,a.jsxs)(r.UC,{"data-slot":"tooltip-content",sideOffset:l,className:(0,n.cn)("bg-primary text-primary-hover animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-sm text-balance",t),...i,children:[s,(0,a.jsx)(r.i3,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}},28085:(e,t,l)=>{l.r(t),l.d(t,{default:()=>eo});var a=l(95155),r=l(75221),n=l(1173),s=l(87415),i=l(17527),o=l(40789),c=l(64621),d=l(38128),x=l(13090),u=l(12115),p=l(6259),m=l(9726),h=l(48636),f=l(84899),g=l(26957),v=l(41052),w=l(1046),b=l(64902),j=l(13744),y=l(96334);function N(e){let{selectedProxies:t,onClose:l,isOpen:r}=e,{form:n,watchDayOfRenewal:s,calculateTotalAmount:i,renewalUnit:o,onSubmit:c,isSubmitting:d}=(0,y.I)({selectedProxies:t,categoryTypeId:1,onClose:l}),x=t.map(e=>{var t,l,a;return(null==e||null==(t=e.proxy)?void 0:t.username)||(null==e||null==(a=e.proxy)||null==(l=a.ipaddress)?void 0:l.ip)||(null==e?void 0:e.code)||""}).filter(Boolean);return(0,a.jsx)(b.Jf,{title:"Gia hạn Proxy",submitLabel:"Cáºp nháºt",onSubmit:c,isSubmitting:d||!s||s<=0,isOpen:r,onClose:l,icon:(0,a.jsx)(h.F.CalendarIcon,{}),extra:(0,a.jsxs)("div",{className:"flex w-full items-center justify-between border-t border-[#E3E6EF] pt-3",children:[(0,a.jsx)("span",{className:"text-sm font-normal text-black",children:"Tá»ng tiá»n"}),(0,a.jsxs)("span",{className:"text-sm font-bold text-black",children:[j.A.formatNum(i(s)),"Ä"]})]}),children:(0,a.jsx)(v.lV,{...n,children:(0,a.jsx)("form",{onSubmit:c,className:"flex w-full flex-col items-center",children:(0,a.jsxs)("div",{className:"flex w-full flex-col items-start gap-4",children:[(0,a.jsx)(b.Dd,{label:"Proxy",children:(0,a.jsx)(b.fI,{items:x})}),(0,a.jsx)(v.zB,{control:n.control,name:"dayOfRenewal",render:e=>{let{field:t}=e;return(0,a.jsxs)(v.eI,{className:"relative w-full",children:[(0,a.jsx)(b.Dd,{label:"Ng\xe0y sá» dụng",className:"px-0 pt-0 pb-0",children:(0,a.jsx)(v.MJ,{children:(0,a.jsx)(w.p,{type:"number",step:1,min:0,className:"h-11 w-full rounded-lg border-0 bg-transparent p-3 text-sm font-medium text-black shadow-none focus-visible:border-0 focus-visible:ring-0 focus-visible:ring-offset-0",...t,onChange:e=>t.onChange(e.target.value?+e.target.value:"")})})}),(0,a.jsx)("span",{className:"sr-only",children:o}),(0,a.jsx)(v.C5,{})]})}})]})})})})}var k=l(60005),C=l(98368),S=l(98535);let I="absolute top-[-9px] left-3 z-[2] bg-white px-1 text-[14px] leading-[19px] font-normal text-[#50545F]",P="text-text-normal-template-5 box-border flex h-11 w-full items-center justify-between rounded-lg border border-[#D7D9DF] bg-white px-3 py-2 text-sm font-medium shadow-none placeholder:font-normal placeholder:text-[#9EA1A9] hover:shadow-none focus-visible:border-[#9971EA] focus-visible:ring-0 focus-visible:ring-offset-0";function D(e){let{selectedProxies:t,onClose:l,isOpen:r}=e,{form:n,onSubmit:s,isSubmitting:i}=(0,C.N)({selectedProxies:t,onClose:l});return(0,a.jsx)(b.Jf,{title:"Äá»i máºt khẩu",submitLabel:"Cáºp nháºt",onSubmit:s,isSubmitting:i,isOpen:r,onClose:l,icon:(0,a.jsx)(h.F.DoiMatKhauIcon,{}),children:(0,a.jsx)(v.lV,{...n,children:(0,a.jsxs)("form",{onSubmit:s,autoComplete:"off",className:"relative flex w-full flex-col items-center",children:[(0,a.jsx)(S.vU,{}),(0,a.jsxs)("div",{className:"flex w-full flex-col items-start gap-4",children:[(0,a.jsx)(v.zB,{control:n.control,name:"username",render:e=>{let{field:t}=e;return(0,a.jsxs)(v.eI,{className:"relative w-full",children:[(0,a.jsx)(v.lR,{className:I,children:"T\xe0i khoản"}),(0,a.jsx)(v.MJ,{children:(0,a.jsx)(w.p,{placeholder:"Random",className:P,...t,...S.OV})}),(0,a.jsx)(v.C5,{})]})}}),(0,a.jsx)(v.zB,{control:n.control,name:"password",render:e=>{let{field:t}=e;return(0,a.jsxs)(v.eI,{className:"relative w-full",children:[(0,a.jsx)(v.lR,{className:I,children:"Máºt khẩu"}),(0,a.jsx)(v.MJ,{children:(0,a.jsx)(k.c,{placeholder:"Random",hideKeyIcon:!0,className:"".concat(P," pr-10 text-black"),...t,...S.P1})}),(0,a.jsx)(v.C5,{})]})}})]})]})})})}var A=l(42994),F=l(62216),T=l(30030);function M(e){let{selectedProxies:t,onClose:l,isOpen:r}=e,{form:n,onSubmit:s,isSubmitting:i}=(0,F.d)({selectedProxies:t,onClose:l}),o=n.watch("protocol"),c=t.map(e=>{var t,l,a;return(null==e||null==(t=e.proxy)?void 0:t.username)||(null==e||null==(a=e.proxy)||null==(l=a.ipaddress)?void 0:l.ip)||(null==e?void 0:e.code)||""}
1).filter(Boolean);return(0,a.jsx)(b.Jf,{title:"Äá»i giao thức",submitLabel:"Cáºp nháºt",onSubmit:s,isSubmitting:i||!o,isOpen:r,onClose:l,icon:(0,a.jsx)(h.F.DoiGiaoThucIcon,{}),children:(0,a.jsx)(v.lV,{...n,children:(0,a.jsx)("form",{onSubmit:s,className:"flex w-full flex-col items-center",children:(0,a.jsxs)("div",{className:"flex w-full flex-col items-start gap-4",children:[(0,a.jsx)(b.Dd,{label:"Proxy",children:(0,a.jsx)(b.fI,{items:c})}),(0,a.jsx)(v.zB,{control:n.control,name:"protocol",render:e=>{let{field:t}=e;return(0,a.jsxs)(v.eI,{className:"relative w-full",children:[(0,a.jsx)(b.Dd,{label:"Giao thức",className:"px-0 pt-0 pb-0",children:(0,a.jsx)(v.MJ,{children:(0,a.jsxs)(A.l6,{value:t.value||void 0,onValueChange:t.onChange,children:[(0,a.jsx)(A.bq,{className:"h-11 w-full justify-between rounded-lg border-0 bg-transparent px-3 text-left text-sm font-medium text-black shadow-none focus:ring-0 data-[state=open]:border-0 data-[state=open]:ring-0 [&>span:first-child]:min-w-0 [&>span:first-child]:flex-1 [&>span:first-child]:text-left [&>span:first-child]:text-black",children:(0,a.jsx)(A.yv,{placeholder:"Chá»n giao thức"})}),(0,a.jsx)(A.gC,{align:"start",className:"text-left",children:T.q.map(e=>(0,a.jsx)(A.eb,{value:e.value,className:"justify-start text-left",children:e.name},e.value))})]})})}),(0,a.jsx)(v.C5,{})]})}})]})})})})}var z=l(29279),V=l(8873),E=l(37062),O=l(37787),_=l(64269);let U=["Code","filter-ord.code","ipaddress.ip;proxy.port;proxy.username;proxy.password","ipaddress.domain;proxy.port;proxy.username;proxy.password","ip"],L=e=>(0,_.cn)("!h-9 shrink-0 gap-1.5 !rounded-lg !border !border-[#D7D9DF] !bg-white !px-3 text-sm !font-normal whitespace-nowrap !text-black shadow-none hover:!border-[#D7D9DF] hover:!bg-white hover:!text-black [&_svg]:text-current",e&&"!cursor-not-allowed !opacity-50 hover:!border-[#D7D9DF] hover:!bg-white hover:!text-black");function K(e){let{table:t,part:l="all"}=e,[r,n]=(0,u.useState)(!1),[s,i]=(0,u.useState)(""),o=E.ed,{selectedProxies:c}=(0,O.C)(t),d=()=>{switch(s){case"change-info":return(0,a.jsx)(D,{isOpen:r,onClose:()=>n(!1),selectedProxies:c});case"change-protocol":return(0,a.jsx)(M,{isOpen:r,onClose:()=>n(!1),selectedProxies:c});case"change-renewal":return(0,a.jsx)(N,{isOpen:r,onClose:()=>n(!1),selectedProxies:c});default:return null}},x=(0,V.R)({selectedProxies:c}),v=(0,z.H)({selectedProxies:c}),w=0===c.length,b=(0,a.jsxs)("div",{className:"flex w-full min-w-0 flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)(f.A,{table:t,showFieldSelect:!0,searchFieldIds:U,defaultSearchId:"filter-ord.code",placeholder:"T\xecm kiếm theo ÄÆ¡n h\xe0ng, IP..."}),(0,a.jsx)(g.i,{table:t,title:"Hiá»n thá»",icon:(0,a.jsx)(h.F.ChevronsDownSolidIcon,{className:"h-3.5 w-3.5 text-[#9EA1A9]"}),className:"h-10 shrink-0 rounded-lg border border-[#D7D9DF] bg-white px-3 !text-[14px] !leading-[19px] !font-normal text-black shadow-none hover:border-[#9971EA] hover:bg-white hover:text-black sm:!text-[14px] [&_svg]:h-3.5 [&_svg]:w-3.5 [&_svg]:text-[#9EA1A9]"})]}),j=(0,a.jsxs)("div",{className:"flex w-full min-w-0 flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("p",{className:"text-sm text-black",children:["Ä\xe3 chá»n: ",(0,a.jsx)("span",{className:"font-semibold",children:c.length})," ","Proxy"]}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,a.jsxs)(m.$,{variant:"outline",onClick:()=>{n(!0),i("change-info")},disabled:w,className:L(w),children:[(0,a.jsx)(h.F.DoiMatKhauIcon,{className:"size-4"}),"Äá»i máºt khẩu"]}),(0,a.jsxs)(m.$,{variant:"outline",onClick:()=>{n(!0),i("change-protocol")},disabled:w,className:L(w),children:[(0,a.jsx)(h.F.DoiGiaoThucIcon,{className:"size-4"}),"Äá»i giao thức"]}),(0,a.jsxs)(m.$,{variant:"outline",onClick:v,disabled:w,className:L(w),children:[(0,a.jsx)(h.F.FixIcon,{className:"size-4"}),"Fix"]}),(0,a.jsxs)(p.rI,{modal:!1,children:[(0,a.jsx)(p.ty,{asChild:!0,children:(0,a.jsxs)(m.$,{variant:"outline",disabled:w,className:L(w),title:"Copy h\xe0ng loạt",children:[(0,a.jsx)(h.F.CopyIcon,{className:"size-4"}),"Copy"]})}),(0,a.jsx)(p.SQ,{align:"end",children:o.map(e=>(0,a.jsxs)(p._2,{onClick:()=>x(e.type),className:"hover:cursor-pointer",children:[(0,a.jsx)(h.F.CopyIcon,{className:"text-primary mr-1 !h-4 !w-4"}),e.label]},e.type))})]}),(0,a.jsxs)(m.$,{onClick:()=>{n(!0),i("change-renewal")},disabled:w,className:(0,_.cn)("!h-9 shrink-0 gap-1.5 !rounded-lg !bg-[#9971EA] !px-3 text-sm !font-normal whitespace-nowrap !text-white hover:!bg-[#8860d9] [&_svg]:text-white",w&&"cursor-not-allowed opacity-50 hover:!bg-[#9971EA]"),children:[(0,a.jsx)(h.F.CalendarIcon,{className:"size-4"}),"Gia hạn"]})]})]});return"search"===l?b:"actions"===l?(0,a.jsxs)(a.Fragment,{children:[j,d()]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex w-full min-w-0 flex-col gap-3",children:[b,j]}),d()]})}function R(e){let{table:t,totalItems:l,emptyMessage:r,heading:n}=e;return(0,a.jsx)(d.EU,{children:(0,a.jsx)(x.b,{table:t,heading:n,totalItems:l,enableHorizontalScroll:!0,enableVerticalScroll:!0,density:"proxy",emptyMessage:r,headerTone:"muted",actionBar:(0,a.jsx)(K,{table:t,part:"actions"}),children:(0,a.jsx)(K,{table:t,part:"search"})})})}let J=(0,u.createContext)(void 0),B=e=>{let{children:t}=e,[l,r]=(0,u.useState)(null),[n,s]=u.useState({}),i=(0,u.useMemo)(()=>{var e;return null!=(e=null==l?void 0:l.getSelectedRowModel().rows.map(e=>e.original))?e:[]},[n]);return(0,a.jsx)(J.Provider,{value:{table:l,setTable:r,rowSelection:n,setRowSelection:s,selectedRows:i},children:t})};var $=l(97453),Z=l(20591),q=l(87527),G=l(70682),H=l(42348),Q=l(15239),W=l(18720);let X=e=>{navigator.clipboard.writeText(e).then(()=>{W.toast.success("Ä\xe3 copy th\xe0nh c\xf4ng",{description:e,duration:5e3})}).catch(()=>{W.toast.error("Copy thất bại")})},Y=e=>null==e||""===e?"-":e,ee=e=>{let{value:t}=e;if(!t)return(0,a.jsx)("span",{className:"text-[14px]",children:"-"});let l=new Date(t);return Number.isNaN(l.getTime())?(0,a.jsx)("span",{className:"text-[14px]",children:"-"}):(0,a.jsxs)("div",{className:"flex w-full min-w-0 flex-col items-center justify-center gap-1 text-center",children:[(0,a.jsx)("span",{className:"text-[11px] leading-[130%] font-normal whitespace-nowrap text-[#393D46] min-[1280px]:text-[12px]",children:(0,G.GP)(l,"HH:mm:ss")}),(0,a.jsx)("span",{className:"text-[12px] leading-[130%] font-normal whitespace-nowrap text-black min-[1280px]:text-[14px]",children:(0,G.GP)(l,"dd/MM/yyyy")})]})},et=e=>{var t,l,r,n,i;let{proxy:o,initialStatus:c,rowId:d,code:x,prevIp:p,createdAt:m}=e,f="proxy_new_seen_tokens",{notifications:g}=(0,s.E)(),[v,w]=(0,u.useState)(c);(0,u.useEffect)(()=>{w(c)},[c,x]);let b=g.find(e=>e.code==x);(0,u.useEffect)(()=>{(null==b?void 0:b.status)&&w(b.status)},[null==b||null==(t=b.status)?void 0:t.id,x]);let j=()=>{try{let e=localStorage.getItem(f);return e?JSON.parse(e):{}}catch(e){return{}}},[y,N]=(0,u.useState)(()=>{var e;let t=j();return null!=(e=null==t?void 0:t[x||d])?e:null}),k="".concat(null!=(i=null==o?void 0:o.ipIn)?i:null==o||null==(l=o.ipaddress)?void 0:l.ip,":").concat(null==o?void 0:o.port,":").concat(null==o?void 0:o.username,":").concat(null==o?void 0:o.password),C=(null==o||null==(r=o.ipaddress)?void 0:r.changeIpAt)?new Date(o.ipaddress.changeIpAt):null,S=m?new Date(m):null,I=!!(C&&S&&C.getTime()>S.getTime()),P=!1;
1if(y){let e=new Date(y);P=!!(C&&C.getTime()>e.getTime()&&S&&C.getTime()>S.getTime())}else P=!!p||I;let D=()=>{if(P){let e=j(),t=new Date().toISOString();e[x||d]=t;try{localStorage.setItem(f,JSON.stringify(e))}catch(e){}N(t)}};if(!o)return(0,a.jsx)("div",{className:"flex gap-2",children:(0,a.jsx)("p",{className:"text-primary",children:"Vui l\xf2ng nhấn Tạo lại Proxy Äá» tạo lại!"})});switch(null==v||null==(n=v.id)?void 0:n.toString()){case"6":return(0,a.jsxs)(Z.m_,{children:[(0,a.jsx)(Z.k$,{asChild:!0,children:(0,a.jsxs)("div",{className:"flex min-w-0 items-center justify-center gap-1",onClick:D,children:[(0,a.jsx)("p",{className:"text-primary min-w-0 flex-1 overflow-hidden text-[12px] leading-[22px] font-normal tracking-[0] text-ellipsis whitespace-nowrap underline decoration-solid underline-offset-2",children:k}),(0,a.jsx)(h.F.CopyIcon,{onClick:e=>{e.stopPropagation(),X(k)},className:"text-primary h-4 w-4 shrink-0 cursor-pointer hover:opacity-80"}),P&&(0,a.jsx)("span",{className:"my-auto rounded bg-green-100 px-2 py-0.5 text-xs text-green-700",children:"new"})]})}),(0,a.jsx)(Z.ZI,{side:"top",align:"center",children:k})]});case"10":case"11":return(0,a.jsxs)("div",{className:"flex gap-2",onClick:D,children:[(0,a.jsx)("p",{className:"text-primary",children:"Vui l\xf2ng nhấn Tạo lại Proxy Äá» tạo lại!"}),P&&(0,a.jsx)("span",{className:"my-auto rounded bg-green-100 px-2 py-0.5 text-xs text-green-700",children:"new"})]});default:return(0,a.jsxs)("div",{className:"flex justify-center gap-2",onClick:D,children:[(0,a.jsx)(H.A,{className:"text-primary animate-spin"}),(0,a.jsx)("div",{className:"flex flex-row gap-1 whitespace-nowrap",children:(0,a.jsx)("span",{children:"Vui l\xf2ng chá»"})}),P&&(0,a.jsx)("span",{className:"my-auto rounded bg-green-100 px-2 py-0.5 text-xs text-green-700",children:"new"})]})}},el=e=>{var t,l;let{proxy:r}=e;if(!r)return(0,a.jsx)("span",{children:"-"});let n="".concat(null!=(l=null==r?void 0:r.ipIn)?l:null==r||null==(t=r.ipaddress)?void 0:t.domain,":").concat(null==r?void 0:r.port,":").concat(null==r?void 0:r.username,":").concat(null==r?void 0:r.password);return(0,a.jsxs)(Z.m_,{children:[(0,a.jsx)(Z.k$,{asChild:!0,children:(0,a.jsxs)("div",{className:"flex min-w-0 items-center justify-center gap-1",children:[(0,a.jsx)("p",{className:"text-primary min-w-0 flex-1 overflow-hidden text-[12px] leading-[22px] font-normal tracking-[0] text-ellipsis whitespace-nowrap underline decoration-solid underline-offset-2",children:n}),(0,a.jsx)(h.F.CopyIcon,{onClick:e=>{e.stopPropagation(),X(n)},className:"text-primary h-4 w-4 shrink-0 cursor-pointer hover:opacity-80"})]})}),(0,a.jsx)(Z.ZI,{side:"top",align:"center",children:n})]})},ea=[{id:"select",header:e=>{let{table:t}=e;return(0,a.jsx)(d.Eh,{table:t})},cell:e=>{let{row:t,table:l}=e;return(0,a.jsx)(d.N4,{row:t,table:l})},size:48,maxSize:56,minSize:48},{id:"stt",header:()=>(0,a.jsx)("span",{className:"w-full text-center text-[14px] leading-[100%] font-normal tracking-[0] whitespace-nowrap text-black",children:"STT"}),size:60,cell:e=>{let{cell:t,table:l}=e;return(0,a.jsx)("span",{className:"text-text-normal-template-5 flex items-center justify-center text-[14px] leading-[100%] font-normal",children:l.getState().pagination.pageIndex*l.getState().pagination.pageSize+t.row.index+1})}},{header:()=>(0,a.jsx)("span",{className:"w-full text-center text-[14px] leading-[100%] font-normal tracking-[0] whitespace-nowrap text-black",children:"ID"}),id:"Code",accessorKey:"code",cell:e=>{let{row:t}=e;return(0,a.jsx)("span",{className:"text-text-normal-template-5 flex w-full items-center justify-center text-[14px] leading-[100%] font-normal",children:Y(t.getValue("Code"))})},size:84,minSize:72,meta:{label:"ID",placeholder:"Nháºp ID",variant:"text"},enableColumnFilter:!0},{cell:e=>{var t,l;let{row:r}=e;return(0,a.jsx)("span",{className:"text-text-normal-template-5 flex w-full min-w-0 items-center justify-center overflow-hidden text-[14px] leading-[100%] font-normal text-ellipsis whitespace-nowrap",children:Y(null==(l=r.original)||null==(t=l.order)?void 0:t.code)})},id:"filter-ord.code",accessorKey:"order.code",header:()=>(0,a.jsx)("span",{className:"w-full text-center text-[14px] leading-[100%] font-normal tracking-[0] whitespace-nowrap text-black",children:"M\xe3 ÄÆ¡n h\xe0ng"}),size:112,meta:{label:"M\xe3 ÄÆ¡n h\xe0ng",placeholder:"Nháºp m\xe3 ÄÆ¡n h\xe0ng",variant:"text"},enableColumnFilter:!0},{header:()=>(0,a.jsx)("span",{className:"w-full text-center text-[14px] leading-[100%] font-normal tracking-[0] whitespace-nowrap text-black",children:"ID cÅ©"}),id:"ID cÅ©",accessorKey:"id",cell:e=>{let{row:t}=e;return(0,a.jsx)("span",{className:"text-text-normal-template-5 flex w-full items-center justify-center text-[14px] leading-[100%] font-normal",children:Y(t.getValue("ID cÅ©"))})},size:60},{header:()=>(0,a.jsx)("span",{className:"w-full text-center text-[14px] leading-[100%] font-normal tracking-[0] whitespace-nowrap text-black",children:"Th\xf4ng tin proxy"}),accessorKey:"proxy",id:"ipaddress.ip;proxy.port;proxy.username;proxy.password",cell:e=>{var t,l;let{cell:r,row:n}=e,s=r.getValue();return(0,a.jsx)(et,{proxy:s,initialStatus:n.original.status,rowId:n.original.id,code:n.original.code,prevIp:null==(t=n.original)?void 0:t.prevIp,createdAt:null==(l=n.original)?void 0:l.createdAt})},enableColumnFilter:!0,meta:{label:"Proxy IP",variant:"text",placeholder:"Nháºp Proxy"},size:168},{header:()=>(0,a.jsx)("span",{className:"w-full text-center text-[14px] leading-[100%] font-normal tracking-[0] whitespace-nowrap text-black",children:"Proxy trưá»c"}),accessorKey:"Proxy trưá»c",size:88,meta:{label:"Proxy trưá»c",variant:"text",placeholder:"Proxy trưá»c"},id:"prevProxy",cell:e=>{var t,l,r,n;let{row:s}=e,i=s.original.proxy,o=null==(t=s.original)?void 0:t.previousProxy,c=null!=o?o:null==(l=s.original)?void 0:l.prevIp;if(c)return c;if((null==i||null==(r=i.ipaddress)?void 0:r.prevIp)&&(null==i||null==(n=i.ipaddress)?void 0:n.changeIpAt)){let e=new Date(i.ipaddress.changeIpAt),t=s.original.createdAt?new Date(s.original.createdAt):null;if(t&&e.getTime()>t.getTime())return i.ipaddress.prevIp}return(0,a.jsx)("span",{className:"text-text-normal-template-5 flex w-full items-center justify-center text-[14px] leading-[100%] font-normal",children:"-"})},enableColumnFilter:!0},{header:()=>(0,a.jsx)("span",{className:"w-full text-center text-[14px] leading-[100%] font-normal tracking-[0] whitespace-nowrap text-black",children:"Proxy domain"}),accessorKey:"proxy",id:"ipaddress.domain;proxy.port;proxy.username;proxy.password",cell:e=>{let{row:t}=e;return(0,a.jsx)(el,{proxy:t.original.proxy})},size:148,enableColumnFilter:!0,meta:{label:"Proxy domain",variant:"text",placeholder:"Nháºp Proxy Domain"}},{header:()=>(0,a.jsx)("span",{className:"w-full text-center text-[14px] leading-[100%] font-normal tracking-[0] whitespace-nowrap text-black",children:"Nh\xe0 mạng"}),id:"Provider",accessorKey:"proxy",meta:{label:"Nh\xe0 mạng"},cell:e=>{var t,l,r;let{cell:n}
1=e,s=null==(r=n.getValue())||null==(l=r.ipaddress)||null==(t=l.provider)?void 0:t.toUpperCase();return s?(0,a.jsx)("div",{className:"flex items-center justify-center",children:(0,a.jsx)("span",{className:"US"===s||"CMC"===s?"relative h-5 w-12":"relative h-9 w-20",children:(0,a.jsx)(Q.default,{src:"VIETTEL"===s?"/images/images-template-5/viettel.webp":"FPT"===s?"/images/images-template-5/fpt.webp":"US"===s?"/images/datacenter-us-flag.webp":"CMC"===s?"/images/datacenter-vn-flag.webp":"/images/images-template-5/vnpt.webp",alt:"VIETTEL"===s?"Viettel":"FPT"===s?"FPT":"US"===s?"US":"CMC"===s?"VN":"VNPT",fill:!0,className:"object-contain"})})}):(0,a.jsx)("div",{className:"text-center",children:"-"})},size:92},{accessorKey:"protocol",size:100,id:"type",meta:{label:"Loại"},header:()=>(0,a.jsx)("span",{className:"w-full text-center text-[14px] leading-[100%] font-normal tracking-[0] whitespace-nowrap text-black",children:"Loại h\xecnh"}),cell:()=>(0,a.jsx)("span",{className:"flex w-full items-center justify-center text-[12px] leading-[130%] font-normal tracking-[0] text-[#636364]",children:"HTTP/SOCKS5"})},{accessorKey:"expiredAt",id:"expiredAt",header:()=>(0,a.jsx)("span",{className:"w-full text-center text-[14px] leading-[100%] font-normal tracking-[0] whitespace-nowrap text-black",children:"Thá»i hạn"}),size:112,meta:{label:"Hết hạn",variant:"text"},cell:e=>{let{cell:t}=e;return(0,a.jsx)(ee,{value:t.getValue()})}},{accessorKey:"description",header:()=>(0,a.jsx)("span",{className:"w-full text-center text-[14px] leading-[100%] font-normal tracking-[0] whitespace-nowrap text-black",children:"Note"}),id:"note",size:60,meta:{label:"Note",variant:"text"},cell:e=>{var t,l,r;let{cell:n,row:s}=e,i=n.getValue();if(null==(l=s.original)||null==(t=l.proxy)?void 0:t.blockAt){let e=30-(null!=(r=(0,q.o)(new Date,new Date(s.original.proxy.blockAt)))?r:0);return"Proxy má» kho\xe1 sau ".concat(e," ph\xfat")}return i?(0,a.jsxs)(Z.m_,{children:[(0,a.jsx)(Z.k$,{asChild:!0,children:(0,a.jsx)("span",{className:"flex w-full items-center justify-center",children:(0,a.jsx)("span",{className:"text-text-normal-template-5 block w-full min-w-0 overflow-hidden text-center text-[14px] leading-[100%] font-normal text-ellipsis whitespace-nowrap",children:i})})}),(0,a.jsx)(Z.ZI,{side:"top",align:"center",children:i})]}):(0,a.jsx)("span",{className:"text-text-normal-template-5 block w-full text-center text-[14px] leading-[100%] font-normal",children:"-"})}},{accessorKey:"createdAt",size:152,header:()=>(0,a.jsx)("span",{className:"w-full text-center text-[14px] leading-[100%] font-normal tracking-[0] whitespace-nowrap text-black",children:"NG\xc0Y TẠO"}),meta:{label:"Ng\xe0y tạo",variant:"text"},cell:e=>{let{cell:t}=e;return(0,a.jsx)(ee,{value:t.getValue()})}},{header:()=>(0,a.jsx)("span",{className:"w-full text-center text-[14px] leading-[100%] font-normal tracking-[0] whitespace-nowrap text-black",children:"IP"}),accessorKey:"ipaddress.ip",id:"ip",cell:e=>{let{getValue:t}=e;return(0,a.jsx)("span",{className:"text-text-normal-template-5 flex w-full justify-center text-center text-sm font-normal",children:Y(t())})},meta:{label:"IP",variant:"text",placeholder:"Nháºp IP"},enableColumnFilter:!0}];var er=l(68846),en=l(20063),es=l(72798);function ei(e){let{mutate:t,isValidating:l,isLoading:o,userProxies:c,total:d,title:x}=e,{setTable:p,rowSelection:m,setRowSelection:h}=(()=>{let e=(0,u.useContext)(J);if(!e)throw Error("useTableContext must be used within a TableProvider");return e})(),f=(0,er.a)(1024),[g,v]=(0,u.useState)(0),[w]=(0,$.ZA)("limit",$.GJ.withDefault(50));(0,u.useEffect)(()=>{v(Math.ceil(d/w))},[w,d]);let b=c.map(e=>{var t;return{...e,ipaddress:null==(t=e.proxy)?void 0:t.ipaddress}}),{table:j}=(0,i.u)({data:b,columns:ea,pageCount:g,onRowSelectionChange:h,shallow:!1,debounceMs:500,initialState:{rowSelection:m,columnVisibility:{stt:!1,orderId:!1,ip:!1,remainingDays:!1,isRenewal:!1,"ID cÅ©":!1,createdAt:!1}}});return(0,u.useEffect)(()=>{j&&p(j)},[j,p]),(0,a.jsx)(u.Suspense,{fallback:(0,a.jsx)(r.O,{columnCount:5,rowCount:8,filterCount:2}),children:(0,a.jsx)(s.Q,{children:o&&0===c.length||!j?(0,a.jsx)(n.A,{}):(0,a.jsx)(R,{table:j,mutate:t,isValidating:l,isLg:f,totalItems:d,emptyMessage:"Kh\xf4ng c\xf3 ÄÆ¡n h\xe0ng",heading:x})})})}function eo(e){let{}=e,t=(0,en.usePathname)(),[l]=(0,$.ZA)("provider"),r=(0,u.useMemo)(()=>l?["ipaddress.provider:$eq:string:".concat(l.toUpperCase())]:"/proxies-datacenter"===t?["ipad
1dress.provider:$in:string:US,CMC"]:"/proxies-datacenter-vn"===t?["ipaddress.provider:$eq:string:CMC"]:[],[t,l]),n=(0,es.$)({defaultPage:"1",defaultLimit:"50",persistentFilters:[...r,"categorytype.id:$eq:number:1"],defaultSort:'[{"orderBy":"createdAt","order":"desc"}]'}),s=(0,u.useMemo)(()=>{if(!l)return n;let e=new URLSearchParams(n.startsWith("?")?n.slice(1):n);return e.delete("page"),e.delete("limit"),e.toString()?"?".concat(e.toString()):""},[n,l]),{userProxies:i,total:d,isValidating:x,isLoading:p,mutate:m}=(0,o.P)(s),h=l?i.length:d;return(0,a.jsx)(c.A,{scrollable:!0,className:"over-table",openMarqueeTop:!0,openMarqueeBottom:!1,children:(0,a.jsx)("div",{className:"flex w-full max-w-full min-w-0 flex-col gap-4 sm:gap-6",children:(0,a.jsx)(B,{children:(0,a.jsx)(ei,{mutate:m,isValidating:x,isLoading:p,userProxies:i,total:h,title:l?"ÄÆ¡n h\xe0ng Proxy d\xe2n cư ".concat(l.toUpperCase()):"/proxies-datacenter"===t?"ÄÆ¡n h\xe0ng Proxy Datacenter":"/proxies-datacenter-vn"===t?"ÄÆ¡n h\xe0ng Proxy Datacenter VN":"ÄÆ¡n h\xe0ng Proxy TÄ©nh"})})})})}},32140:(e,t,l)=>{l.d(t,{U:()=>n});var a=l(25959),r=l(9829);let n=(0,a.v)()((e,t)=>({notifications:[],socket:null,isConnected:!1,currentToken:null,addNotification:t=>e(e=>({notifications:[...e.notifications,t]})),clearNotifications:()=>e({notifications:[]}),initSocket:l=>{let a=t();if(a.socket&&a.currentToken===l)return;a.socket&&a.socket.disconnect();let n=(0,r.io)("https://api.homeproxy.vn",{transports:["websocket"],auth:{token:l}});n.on("connect",()=>{e({isConnected:!0}),n.emit("register")}),n.on("connect_error",()=>{e({isConnected:!1})}),n.on("disconnect",()=>{e({isConnected:!1})}),n.on("transactionUpdate",e=>{t().addNotification(e)}),n.on("userproxyUpdate",e=>{t().addNotification(e)}),e({socket:n,currentToken:l})},disconnectSocket:()=>{let{socket:l}=t();l&&(l.disconnect(),e({socket:null,isConnected:!1,currentToken:null}))},emit:(e,l,a)=>{let{socket:r,isConnected:n}=t();r&&n&&r.emit(e,l,a)}}))},35505:(e,t,l)=>{l.d(t,{S:()=>o,_:()=>c});var a=l(95155),r=l(12115),n=l(38162),s=l(5917),i=l(64269);let o=r.forwardRef((e,t)=>{let{className:l,...r}=e;return(0,a.jsx)(n.bL,{ref:t,className:(0,i.cn)("peer data-[state=checked]:border-primary data-[state=checked]:text-primary hover:border-checkbox-blur hover:ring-primary/40 h-5 w-5 shrink-0 rounded-none border-2 border-[#BABDC4] shadow-none hover:ring-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-transparent",l),...r,children:(0,a.jsx)(n.C1,{className:(0,i.cn)("text-primary flex items-center justify-center"),children:(0,a.jsx)(s.A,{className:"h-4 w-4"})})})});o.displayName=n.bL.displayName;let c=r.forwardRef((e,t)=>{let{className:l,...r}=e;return(0,a.jsx)(n.bL,{ref:t,className:(0,i.cn)("peer border-border-template-3 focus-visible:ring-primary/10 data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=checked]:text-primary-foreground hover:border-checkbox-blur hover:ring-primary/50 h-[18px] w-[18px] shrink-0 border-2 shadow-none hover:cursor-pointer hover:ring-1 focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",l),...r,children:(0,a.jsx)(n.C1,{className:(0,i.cn)("flex items-center justify-center text-inherit"),children:(0,a.jsx)(s.A,{className:"h-4 w-4 stroke-[3] text-inherit"})})})});c.displayName=n.bL.displayName},38128:(e,t,l)=>{l.d(t,{EU:()=>o,Eh:()=>x,N4:()=>d});var a=l(95155),r=l(12115),n=l(35505),s=l(41968);let i=(0,r.createContext)(null),o=e=>{let{children:t}=e,l=(0,s.O)();return(0,a.jsx)(i.Provider,{value:l,children:t})},c=()=>{let e=(0,r.useContext)(i);if(!e)throw Error("useShiftSelectContext must be used within ShiftSelectProvider");return e},d=e=>{let{row:t,table:l}=e,{handleClick:r}=c();return(0,a.jsx)("div",{className:"checkbox-container flex w-full items-center justify-center","data-checkbox":!0,onClick:r(t,l),children:(0,a.jsx)(n._,{disabled:!t.getCanSelect(),checked:t.getIsSelected(),className:"data-[state=checked]:border-primary data-[state=checked]:bg-primary border-[#83878F] data-[state=checked]:text-white"})})},x=e=>{let{table:t}=e,{resetAnchor:l}=c();return(0,a.jsx)("div",{className:"flex w-full items-center justify-center",children:(0,a.jsx)(n._,{checked:t.getIsAllRowsSelected(),onCheckedChange:e=>{t.getToggleAllRowsSelectedHandler()({target:{checked:e}}),l()},className:"data-[state=checked]:!border-primary data-[state=checked]:!bg-primary !border-2 !border-solid !border-[#83878F] text-transparent data-[state=checked]:!text-white [&[data-state=checked]_svg]:!stroke-white [&[data-state=checked]_svg]:!text-white"})})}},40789:(e,t,l)=>{l.d(t,{P:()=>c});var a=l(13744);function r(e){var t,l,a,r,n,s;return null!=(s=null!=(n=null!=(r=null==e||null==(t=e.ipaddress)?void 0:t.provider)?r:null==e||null==(a=e.proxy)||null==(l=a.ipaddress)?void 0:l.provider)?n:null==e?void 0:e.provider)?s:""}var n=l(96199),s=l(20063),i=l(12115),o=l(85400);function c(e,t){var l,c;let{data:d,status:x}=(0,n.wV)(),u=(0,s.usePathname)(),{data:p,mutate:m,isLoading:h,isValidating:f}=(0,o.Ay)("authenticated"===x?["/api/v1/users/proxies",e,u]:null,e=>{let[t,l]=e;return a.A.fetchApi(t+l,null==d?void 0:d.accessToken).then(e=>null!=e?e:{}).catch(()=>({}))},{suspense:null!=(l=null==t?void 0:t.suspense)&&l,revalidateOnFocus:!1,keepPreviousData:!0});return{userProxies:(0,i.useMemo)(()=>{var e,t;return t=null!=(e=null==p?void 0:p.data)?e:[],"/proxies-datacenter"===u||"/proxies-datacenter-vn"===u?t.filter(e=>{var t;let l=null==(t=r(e))?void 0:t.trim().toUpperCase();
1return"US"===l||"USA"===l||"CMC"===l||"USOLD"===l}):t.filter(e=>{var t;let l=null==(t=r(e))?void 0:t.trim().toUpperCase();return!function(e){let t=null==e?void 0:e.trim().toUpperCase();return"US"===t||"USA"===t||"USOLD"===t}(l)&&"CMC"!==l})},[null==p?void 0:p.data,u]),total:null!=(c=null==p?void 0:p.total)?c:0,isLoading:null!=h&&h,isValidating:null!=f&&f,mutate:m,status:x}}},41052:(e,t,l)=>{l.d(t,{C5:()=>v,MJ:()=>f,Rr:()=>g,eI:()=>m,lR:()=>h,lV:()=>c,zB:()=>x});var a=l(95155),r=l(12115),n=l(32467),s=l(22544),i=l(64269),o=l(76444);let c=s.Op,d=r.createContext({}),x=e=>{let{...t}=e;return(0,a.jsx)(d.Provider,{value:{name:t.name},children:(0,a.jsx)(s.xI,{...t})})},u=()=>{let e=r.useContext(d),t=r.useContext(p),{getFieldState:l}=(0,s.xW)(),a=(0,s.lN)({name:e.name}),n=l(e.name,a);if(!e)throw Error("useFormField should be used within <FormField>");let{id:i}=t;return{id:i,name:e.name,formItemId:"".concat(i,"-form-item"),formDescriptionId:"".concat(i,"-form-item-description"),formMessageId:"".concat(i,"-form-item-message"),...n}},p=r.createContext({});function m(e){let{className:t,...l}=e,n=r.useId();return(0,a.jsx)(p.Provider,{value:{id:n},children:(0,a.jsx)("div",{"data-slot":"form-item",className:(0,i.cn)("grid gap-2",t),...l})})}function h(e){let{className:t,...l}=e,{error:r,formItemId:n}=u();return(0,a.jsx)(o.J,{"data-slot":"form-label","data-error":!!r,className:(0,i.cn)("data-[error=true]:text-destructive",t),htmlFor:n,...l})}function f(e){let{...t}=e,{error:l,formItemId:r,formDescriptionId:s,formMessageId:i}=u();return(0,a.jsx)(n.DX,{"data-slot":"form-control",id:r,"aria-describedby":l?"".concat(s," ").concat(i):"".concat(s),"aria-invalid":!!l,...t})}function g(e){let{className:t,...l}=e,{formDescriptionId:r}=u();return(0,a.jsx)("p",{"data-slot":"form-description",id:r,className:(0,i.cn)("text-muted-foreground text-sm",t),...l})}function v(e){var t;let{className:l,...r}=e,{error:n,formMessageId:s}=u(),o=n?String(null!=(t=null==n?void 0:n.message)?t:""):r.children;return o?(0,a.jsx)("p",{"data-slot":"form-message",id:s,className:(0,i.cn)("text-destructive text-sm",l),...r,children:o}):null}},41968:(e,t,l)=>{l.d(t,{O:()=>r});var a=l(12115);function r(){let e=(0,a.useRef)(null);return{anchorIdRef:e,handleClick:(t,l)=>a=>{if(a.stopPropagation(),a.shiftKey&&null!==e.current){let{rows:a,rowsById:r}=l.getRowModel(),n=r[e.current];if(n){let e=n.index,l=Math.min(e,t.index),r=Math.max(e,t.index);for(let e=0;e<a.length;e++){let t=e>=l&&e<=r;a[e].toggleSelected(t)}}else e.current=t.id,t.toggleSelected(!t.getIsSelected())}else t.toggleSelected(!t.getIsSelected()),e.current=t.id},resetAnchor:()=>{e.current=null}}}},42348:(e,t,l)=>{l.d(t,{A:()=>a});let a=(0,l(71847).A)("Loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]])},60005:(e,t,l)=>{l.d(t,{c:()=>i});var a=l(95155);l(12115);var r=l(55817),n=l(64269),s=l(48636);function i(e){let{className:t,hideKeyIcon:l=!1,hasValue:i=!1,...o}=e;return(0,a.jsx)(r.bL,{children:(0,a.jsxs)("div",{className:"relative",children:[!l&&(0,a.jsx)("div",{className:"absolute top-1/2 left-4 !h-5 !w-5 -translate-y-1/2 transition-colors ".concat(i?"text-primary":"text-[#393D46] hover:text-[#393D46]"),children:(0,a.jsx)(s.F.KeyIcon,{className:"pointer-events-none !h-5 !w-5"})}),(0,a.jsx)(r.pd,{className:(0,n.cn)("placeholder:text-icon selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 gap-2 rounded-lg border bg-transparent px-3 py-2.5 text-base shadow-none transition-colors outline-none hover:shadow-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-primary hover:border-primary/50 hover:ring-0 focus:ring-0 focus-visible:ring-0 focus-visible:ring-offset-0","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive","pr-[40px] [&::-ms-clear]:hidden [&::-ms-reveal]:hidden [&::-webkit-contacts-auto-fill-button]:hidden [&::-webkit-credentials-auto-fill-button]:hidden",!l&&"pl-[56px]","truncate overflow-hidden text-ellipsis whitespace-nowrap",t,"!shadow-none hover:!shadow-none focus-visible:!shadow-none"),...o}),(0,a.jsx)(r.lM,{id:o.id+"btn-toggle",className:"absolute top-1/2 right-4 -translate-y-1/2 text-gray-500 hover:cursor-pointer hover:text-gray-700",children:(0,a.jsx)(r.In,{visible:(0,a.jsx)(s.F.EyeOpenIcon,{className:"!h-5 !w-5 text-[#393D46]"}),hidden:(0,a.jsx)(s.F.EyeCloseIcon,{className:"!h-5 !w-5 text-[#393D46]"})})})]})})}},72798:(e,t,l)=>{l.d(t,{$:()=>n});var a=l(97453),r=l(12115);function n(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{defaultPage:t="1",defaultLimit:l="50",persistentFilters:n=[],defaultSort:s,additionalParams:i={}}=e,[o]=(0,a.ZA)("page",{defaultValue:t}),[c]=(0,a.ZA)("limit",{defaultValue:l}),[d]=(0,a.ZA)("filter",{defaultValue:""}),[x]=(0,a.ZA)("filters",{defaultValue:""}),[u]=(0,a.ZA)("sort",{defaultValue:""}),[p]=(0,a.ZA)("s",{defaultValue:""});return(0,r.useMemo)(()=>{let e=new URLSearchParams;e.set("page",o),e.set("limit",c);let t=[];
1if(d&&t.push(d),n.length>0&&t.push(...n),t.length>0&&e.set("filter",t.join(";")),x){let t="object"==typeof x?JSON.stringify(x):x;e.set("filters",t)}if(u){let t;t="string"==typeof u?u:"object"==typeof u?JSON.stringify((Array.isArray(u)?u:[u]).map(e=>({orderBy:e.id||e.orderBy,order:"boolean"==typeof e.desc?e.desc?"desc":"asc":e.order||"asc"}))):String(u),e.set("sort",t)}else s&&e.set("sort",s);return p&&e.set("s",p),Object.entries(i).forEach(t=>{let[l,a]=t;if(a)if(e.has(l))try{let t=JSON.parse(e.get(l)),r=JSON.parse(a),n={...t,...r};e.set(l,JSON.stringify(n))}catch(e){}else e.append(l,a)}),"?"+e.toString()},[o,c,d,x,u,n,s,i])}},76444:(e,t,l)=>{l.d(t,{J:()=>s});var a=l(95155);l(12115);var r=l(10489),n=l(64269);function s(e){let{className:t,...l}=e;return(0,a.jsx)(r.b,{"data-slot":"label",className:(0,n.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...l})}},87415:(e,t,l)=>{l.d(t,{E:()=>c,Q:()=>o});var a=l(95155),r=l(14734),n=l(96199),s=l(12115);let i=(0,s.createContext)({notifications:[],isConnected:!1});function o(e){var t;let{children:l}=e,{data:o}=(0,n.wV)(),{notifications:c,isConnected:d,emit:x}=(0,r.F)(null==o||null==(t=o.user)?void 0:t.accessToken);return(0,s.useEffect)(()=>{d&&x("user-proxies")},[d]),(0,a.jsx)(i.Provider,{value:{notifications:c,isConnected:d},children:l})}function c(){return(0,s.useContext)(i)}},87527:(e,t,l)=>{l.d(t,{o:()=>n});var a=l(9180),r=l(92118);function n(e,t,l){var n;let s=((0,r.a)(e)-(0,r.a)(t))/a.Cg;return(n=null==l?void 0:l.roundingMethod,e=>{let t=(n?Math[n]:Math.trunc)(e);return 0===t?0:t})(s)}}}]);
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.