1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7138,81257],{7181:(e,t,r)=>{"use strict";r.d(t,{m:()=>x});var a=r(95155),l=r(39180),n=r(58795),s=r(37062),o=r(52095),i=r(58067),c=r(96199),d=r(18720);function x(e){let{selectedProxies:t,successMessage:r="Ä\xe3 copy th\xe0nh c\xf4ng",errorMessage:x="Copy thất bại"}=e,{data:p}=(0,c.wV)(),{config:u}=(0,l.r)(),m=null==u?void 0:u.hostName,h=()=>m?"https://".concat(m):null;return async e=>{let l;switch(e){case"id":l=Promise.resolve(t.map(e=>e.code).join("\n"));break;case"old-id":l=Promise.resolve(t.map(e=>e.id).join("\n"));break;case"proxy":l=Promise.resolve(t.filter(e=>(0,s.nU)(e.status)).map(e=>(0,s.dB)(e.proxy)).filter(Boolean).join("\n"));break;case"link":{let e=h(),r=e?"".concat(e,"/api"):"https://api-proxy.homeproxy.vn";l=Promise.all(t.map(async e=>{let t=await (0,n.f)(e.id,null==p?void 0:p.accessToken);return t?(0,o.z)({baseUrl:r,token:t}):""})).then(e=>e.filter(e=>e).join("\n"));break}case"proxy-link":{let e=h(),r=e?"".concat(e,"/api"):"https://api-proxy.homeproxy.vn";l=Promise.all(t.map(async e=>{let t=await (0,n.f)(e.id,null==p?void 0:p.accessToken);if(!t)return"";let a=(0,s.dB)(e.proxy),l=(0,o.z)({baseUrl:r,token:t});return a?"".concat(a,"|").concat(l):""})).then(e=>e.filter(e=>e).join("\n"));break}default:l=Promise.resolve(t.map(e=>(0,s.a)(e)).filter(e=>":"!==e).join("\n"))}let c=await (0,i.b)(l),u=await l;c?d.toast.success(r,{description:(0,a.jsx)("div",{className:"toast-clamp",children:u}),duration:5e3}):d.toast.error(x)}}},11821:(e,t,r)=>{"use strict";r.d(t,{Lv:()=>l,f3:()=>n,mz:()=>a});let a=e=>(e=>Array.isArray(e)?e:e&&"object"==typeof e?[e]:[])(e).flatMap(e=>{var t;return Array.isArray(null==e||null==(t=e.data)?void 0:t.results)?e.data.results:Array.isArray(null==e?void 0:e.results)?e.results:Array.isArray(null==e?void 0:e.data)?e.data:[]}),l=e=>{let t=[],r=[],a=[];return e.forEach(e=>{var l,n;let s=null!=(l=null==e?void 0:e.username)?l:"unknown",o=null==e?void 0:e.status,i=null!=(n=null==e?void 0:e.time_remaining)?n:null==e?void 0:e.timeRemaining;switch(o){case"success":t.push("".concat(s,": Xoay proxy th\xe0nh c\xf4ng"));break;case"too_soon":r.push("".concat(s,": Chưa tá»i thá»i gian xoay").concat("number"==typeof i?" (".concat(i,"s)"):""));break;case"not_found":a.push("".concat(s,": Kh\xf4ng t\xecm thấy proxy"));break;case"failed":a.push("".concat(s,": ").concat((null==e?void 0:e.error)||"Xoay proxy thất bại"));break;default:(null==e?void 0:e.error)?a.push("".concat(s,": ").concat(e.error)):(null==e?void 0:e.message)&&o&&"success"!==o&&a.push("".concat(s,": ").concat(e.message))}}),{successMessages:t,tooSoonMessages:r,errorMessages:a}},n=e=>{var t;let r=null==e?void 0:e.status,a=null==e?void 0:e.message,l=null!=(t=null==e?void 0:e.timeRemaining)?t:null==e?void 0:e.time_remaining,n=null==e?void 0:e.proxy;return"success"===r&&n?{type:"success",title:a||"Xoay proxy th\xe0nh c\xf4ng",description:n}:"too_soon"===r||"number"==typeof l&&l>0?{type:"too_soon",title:"Chưa tá»i thá»i gian xoay proxy",description:a||"Vui l\xf2ng chá» th\xeam ".concat("number"==typeof l?l:0,"s Äá» xoay tiếp.")}:{type:"error",title:"Xoay proxy thất bại",description:a||"Lá»i kh\xf4ng x\xe1c Äá»nh"}}},13438:(e,t,r)=>{"use strict";r.d(t,{A:()=>f});var a=r(95155),l=r(41052),n=r(96017),s=r(31120),o=r(44774),i=r(50313),c=r(66219),d=r(50984),x=r(68114),p=r(98535);let u="border-[rgb(from_var(--primary)_calc(r+183)_calc(g+142)_calc(b+123))]",m="border-[rgb(from_var(--primary)_calc(r+22)_calc(g+22)_calc(b+24))]",h="font-nunito text-[14px] leading-[19px] font-bold text-black";function f(e){let{selectedProxies:t,onClose:r,isOpen:f}=e,{form:b,activeProxy:g,wIsAutoRotate:w,onSubmit:y,isSubmitting:v}=(0,x.I)({selectedProxies:t,onClose:r});return g?(0,a.jsx)(c.lG,{open:f,onOpenChange:r,children:(0,a.jsx)(c.Cf,{headerClassName:"bg-transparent",showCloseButton:!1,className:"top-1/2 right-4 left-auto w-[90vw] max-w-[350px] translate-x-0 -translate-y-1/2 bg-transparent p-0 shadow-none sm:w-[350px]",children:(0,a.jsxs)("div",{className:"relative box-border flex w-full flex-col items-start gap-6 rounded-2xl border-t-4 bg-white px-4 py-6 ".concat(m),children:[(0,a.jsxs)("div",{className:"box-border flex h-9 w-max shrink-0 flex-row items-center gap-2 rounded-[999px] border py-1 pr-3 pl-1 ".concat(u),children:[(0,a.jsx)("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-[999px] bg-[rgb(from_var(--primary)_calc(r+22)_calc(g+22)_calc(b+24))] p-1.5 text-white",children:(0,a.jsx)(i.F.ShieldSettingIcon,{className:"!h-4 !w-4"})}),(0,a.jsx)("span",{className:h,children:"Cáºp nháºt th\xf4ng tin Proxy xoay"})]}),(0,a.jsx)(l.lV,{...b,children:(0,a.jsxs)("form",{onSubmit:y,autoComplete:"off",className:"relative flex w-full min-w-0 flex-1 flex-col",children:[(0,a.jsx)(p.vU,{}),(0,a.jsxs)("div",{className:"flex w-full shrink-0 flex-col items-start justify-center gap-6 border-t py-6 ".concat(u),children:[(0,a.jsxs)("div",{className:"flex w-full flex-col items-start justify-center gap-0.5",children:[(0,a.jsx)("span",{className:h,children:"Danh s\xe1ch IP"}),(0,a.jsx)(s.T,{readOnly:!0,className:"font-nunito box-border h-[120px] w-full resize-none rounded-lg border bg-[rgb(from_var(--primary)_calc(r+205)_calc(g+165)_calc(b+148))] px-2 pt-2 pb-4 text-[14px] leading-[19px] font-normal text-black shadow-none focus-visible:ring-0 ".concat(u),value:t.map(e=>{var t,r,a;return(null==e||null==(r=e.proxy)||null==(t=r.ipaddress)?void 0:t.ip)+":"+(null==e||null==(a=e.proxy)?void 0:a.port)}).join("\n")})]}),(0,a.jsx)(l.zB,{control:b.control,name:"password",render:e=>{let{field:t}=e;return(0,a.jsxs)(l.eI,{className:"flex w-full flex-col items-start justify-center gap-0.5",children:[(0,a.jsx)("span",{className:h,children:"Máºt khẩu proxy"}),(0,a.jsx)("div",{className:"box-border flex h-10 w-full flex-row items-center gap-2.5 rounded-lg border bg-white px-2 shadow-[0px_2px_6px_0px_rgb(from_var(--primary)_r_g_b_/_0.25)] ".concat(m),children:(0,a.jsx)(l.MJ,{children:(0,a.jsx)(o.c,{placeholder:"Nháºp máºt khẩu proxy",hideKeyIcon:!0,className:"font-nunito h-auto w-full border-none bg-transparent p-0 text-[14px] leading-[19px] font-normal text-black shadow-none focus-visible:ring-0",...t,...p.P1})})}),(0,a.jsx)(l.C5,{})]})}}),(0,a.jsx)(l.zB,{control:b.control,name:"rotateInterval",render:e=>{let{field:t}=e;return(0,a.jsxs)(l.eI,{className:"flex w-full flex-col items-start justify-center gap-0.5",children:[(0,a.jsx)("span",{className:h,children:"Thá»i gian xoay (ph\xfat)"}),(0,a.jsx)("div",{className:"box-border flex h-10 w-full flex-row items-center justify-between gap-2.5 rounded-lg border bg-white px-2 shadow-[0px_2px_6px_0px_rgb(from_var(--primary)_r_g_b_/_0.25)] ".concat(m),children:(0,a.jsx)(l.MJ,{children:(0,a.jsx)(n.p,{type:"number",step:1,min:0,placeholder:"0",disabled:!w,useCustomStepper:!0,className:"font-nunito h-auto w-full border-none bg-transparent p-0 text-start text-[14px] leading-[19px] font-normal text-black shadow-none focus-visible:ring-0 disabled:cursor-not-allowed disabled:opacity-50",value:t.value,onChange:e=>{let r=e.target.value;if(""===r)return void t.onChange("");
1t.onChange(+r)},onBlur:()=>{(!t.value||t.value<0)&&t.onChange(0)}})})}),(0,a.jsx)(l.C5,{})]})}}),(0,a.jsx)(l.zB,{control:b.control,name:"isAutoRotate",render:e=>{let{field:t}=e;return(0,a.jsxs)(l.eI,{className:"flex items-center gap-2",children:[(0,a.jsx)(l.MJ,{children:(0,a.jsx)(d.Sc,{checked:t.value,onCheckedChange:t.onChange,className:"!h-5 !w-5"})}),(0,a.jsx)("span",{className:"font-nunito cursor-pointer text-[14px] leading-[19px] font-normal text-black",children:"Tá»± Äá»ng xoay"}),(0,a.jsx)(l.C5,{})]})}})]}),(0,a.jsx)("div",{className:"w-full flex-1"}),(0,a.jsx)("div",{className:"flex w-full shrink-0 flex-col items-center justify-end gap-4 border-t pt-6 ".concat(u),children:(0,a.jsx)("button",{type:"submit",onClick:y,disabled:v,className:"font-nunito bg-primary hover:bg-primary/90 flex h-9 w-full cursor-pointer items-center justify-center gap-2 rounded-lg p-2 text-center text-[16px] leading-[22px] font-bold text-white transition-colors disabled:cursor-not-allowed disabled:opacity-50",children:"Cáºp nháºt"})})]})}),(0,a.jsx)("button",{type:"button",onClick:r,"aria-label":"Ä\xf3ng",className:"absolute top-[7px] right-0.5 flex h-6 w-6 cursor-pointer items-center justify-center p-1 text-[rgb(from_var(--primary)_calc(r+66)_calc(g+28)_calc(b+16))] transition-opacity hover:opacity-70",children:(0,a.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,a.jsx)("path",{d:"M8.00104 6.93955L11.7011 3.23956L12.7614 4.2999L9.0614 7.9999L12.7614 11.6999L11.7011 12.7602L8.00104 9.06025L4.30104 12.7602L3.24072 11.6999L6.94072 7.9999L3.24072 4.2999L4.30104 3.23956L8.00104 6.93955Z",fill:"currentColor"})})})]})})}):null}},17511:(e,t,r)=>{"use strict";r.d(t,{bq:()=>p,eb:()=>f,gC:()=>h,l6:()=>d,yv:()=>x});var a=r(95155),l=r(47887),n=r(12108),s=r(24033),o=r(12115),i=r(50313),c=r(64269);let d=l.bL;l.YJ;let x=l.WT,p=o.forwardRef((e,t)=>{let{className:r,children:n,iconClassName:s,...o}=e;return(0,a.jsxs)(l.l9,{ref:t,className:(0,c.cn)("group border-border-template-5 ring-offset-background data-[placeholder]:text-muted-foreground flex h-10 w-full cursor-pointer items-center justify-between gap-2 rounded-lg border bg-white px-3 py-2.5 text-sm whitespace-nowrap shadow-[4px_4px_8px_0_var(--shadow-proxy-input))] focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1","data-[state=open]:border-primary data-[state=open]:ring-primary/20 data-[state=open]:ring-[3px]","[&>*:first-child]:min-w-0 [&>*:first-child]:flex-1 [&>*:first-child]:overflow-hidden [&>*:first-child]:text-ellipsis [&>*:first-child]:whitespace-nowrap",r),...o,children:[n,(0,a.jsx)(l.In,{asChild:!0,children:(0,a.jsx)("span",{className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-lg transition-colors group-hover:bg-[rgb(from_var(--primary)_calc(r+192)_calc(g+150)_calc(b+128))]",children:(0,a.jsx)(i.F.ChevronsDownIcon,{className:(0,c.cn)("text-primary/60 h-[24px] w-[24px] transition-transform group-data-[state=open]:rotate-180",s)})})})]})});p.displayName=l.l9.displayName,o.forwardRef((e,t)=>{let{className:r,children:n,...s}=e;return(0,a.jsxs)(l.l9,{ref:t,className:(0,c.cn)("group border-input ring-offset-background data-[placeholder]:text-muted-foreground flex h-10 w-full cursor-pointer items-center justify-between gap-2 rounded-lg border px-3 py-2.5 text-sm whitespace-nowrap shadow-[4px_4px_8px_0_var(--shadow-proxy-input))] focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1","data-[state=open]:border-primary data-[state=open]:ring-primary/20 data-[state=open]:ring-[3px]",r),...s,children:[n,(0,a.jsx)(l.In,{asChild:!0,children:(0,a.jsx)("span",{className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-lg transition-colors group-hover:bg-[rgb(from_var(--primary)_calc(r+192)_calc(g+150)_calc(b+128))]",children:(0,a.jsx)(i.F.ChevronsDownIcon,{className:"h-[20px] w-[20px] text-[#161616] transition-transform group-data-[state=open]:rotate-180"})})})]})}).displayName=l.l9.displayName;let u=o.forwardRef((e,t)=>
1{let{className:r,...s}=e;return(0,a.jsx)(l.PP,{ref:t,className:(0,c.cn)("flex cursor-default items-center justify-center py-1",r),...s,children:(0,a.jsx)(n.A,{className:"h-4 w-4"})})});u.displayName=l.PP.displayName;let m=o.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,a.jsx)(l.wn,{ref:t,className:(0,c.cn)("flex cursor-default items-center justify-center py-1",r),...n,children:(0,a.jsx)(s.A,{className:"h-4 w-4"})})});m.displayName=l.wn.displayName;let h=o.forwardRef((e,t)=>{let{className:r,children:n,position:s="popper",...o}=e;return(0,a.jsx)(l.ZL,{children:(0,a.jsxs)(l.UC,{ref:t,className:(0,c.cn)("bg-popover text-popover-foreground 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 relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] origin-[--radix-select-content-transform-origin] overflow-x-hidden overflow-y-auto rounded-md border shadow-md","popper"===s&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",r),position:s,...o,children:[(0,a.jsx)(u,{}),(0,a.jsx)(l.LM,{className:(0,c.cn)("p-1","popper"===s&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),(0,a.jsx)(m,{})]})})});h.displayName=l.UC.displayName,o.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,a.jsx)(l.JU,{ref:t,className:(0,c.cn)("px-2 py-1.5 text-sm font-semibold",r),...n})}).displayName=l.JU.displayName;let f=o.forwardRef((e,t)=>{let{className:r,children:n,...s}=e;return(0,a.jsx)(l.q7,{ref:t,className:(0,c.cn)("focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default items-center rounded-lg py-1.5 pr-8 pl-2 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",r),...s,children:(0,a.jsx)(l.p4,{children:n})})});f.displayName=l.q7.displayName,o.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,a.jsx)(l.wv,{ref:t,className:(0,c.cn)("bg-muted -mx-1 my-1 h-px",r),...n})}).displayName=l.wv.displayName},17835:(e,t,r)=>{"use strict";r.d(t,{$6:()=>d,D5:()=>c,I9:()=>s,Nd:()=>p,Q_:()=>x,_7:()=>m,cX:()=>o,jx:()=>u,zJ:()=>n});var a=r(64269);function l(e,t){return"dark"===t?e?"bg-sidebar-foreground hover:bg-sidebar-foreground border border-[#919191] text-[#919191] disabled:opacity-100":"bg-[image:var(--button-2-gradient-template-7)] text-white hover:brightness-110":e?"bg-[#BABDC4] text-[#D7D9DF] hover:bg-[#BABDC4] disabled:opacity-100":"bg-primary hover:bg-primary/90 text-white"}function n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"light";return(0,a.cn)("flex h-8 shrink-0 flex-row items-center gap-1.5 rounded-lg px-3 py-1.5 text-[14px] leading-[17px] font-semibold whitespace-nowrap sm:h-9 sm:gap-2 sm:px-4",l(e,t))}function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"light";return(0,a.cn)("flex h-8 w-8 shrink-0 items-center justify-center rounded-lg p-0 sm:h-9 sm:w-9",l(e,t))}let o="w-full min-w-0 max-w-full overflow-hidden 2xl:max-w-[min(100%,460px)]",i="flex h-9 shrink-0 flex-row items-center gap-1 rounded-[999px] px-3 py-2 text-sm leading-[19px] font-normal whitespace-nowrap transition-colors",c=(0,a.cn)(i,"border-none bg-[rgb(from_var(--primary)_calc(r+184)_calc(g+165)_calc(b+152))] text-primary hover:bg-border-template-6");function d(e){return(0,a.cn)(i,e?"border border-[rgb(from_var(--primary)_calc(r+183)_calc(g+142)_calc(b+123))] bg-white text-[rgb(from_var(--primary)_calc(r+103)_calc(g+62)_calc(b+45))] hover:bg-white disabled:opacity-100":"border border-[rgb(from_var(--primary)_calc(r+183)_calc(g+142)_calc(b+123))] bg-white text-black hover:border-[rgb(from_var(--primary)_calc(r+183)_calc(g+142)_calc(b+123))] hover:bg-[rgb(from_var(--primary)_calc(r+205)_calc(g+165)_calc(b+148))] hover:text-black")}let x={stackAlways:!0,wrapActions:!1,actionsClassName:"min-h-9 justify-start gap-3 px-0 py-0"},p={inlineFrom:"xl",wrapActions:!1,scrollbarVariant:"dark",searchClassName:"min-w-0 overflow-hidden xl:!min-w-[360px] xl:!max-w-[400px] xl:!shrink-0 2xl:!min-w-0 2xl:!max-w-[min(100%,480px)]",actionsClassName:"min-w-0 flex-1 gap-1.5 sm:gap-2 xl:!min-w-0 xl:!flex-1 xl:!justify-end xl:!overflow-x-auto xl:!overscroll-x-contain xl:!pb-1 xl:[scrollbar-width:thin]"},u="flex max-w-[736px] min-w-0 items-center gap-2 overflow-x-auto overscroll-x-contain pb-1 sm:gap-2.5 xl:justify-end xl:overflow-visible [scrollbar-width:thin] [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-[#C7C7CC] [&::-webkit-scrollbar-track]:rounded-full [&::-webkit-scrollbar-track]:bg-[#EBEBEB]",m="hover:text-primary hover:bg-background text-text-normal-template-3 h-9 shrink-0 gap-1.5 rounded-lg border border-[#e5e5ea] px-2 py-2 text-xs leading-[22px] font-medium tracking-[0] hover:cursor-pointer sm:h-10 sm:gap-[10px] sm:px-3 sm:py-[9px] sm:text-[14px]"},18332:(e,t,r)=>{"use strict";r.d(t,{Fc:()=>o,TN:()=>c,XL:()=>i});var a=r(95155);r(12115);var l=r(83101),n=r(64269);let s=(0,l.F)("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function o(e){let{className:t,variant:r,...l}=e;return(0,a.jsx)("div",{"data-slot":"alert",role:"alert",className:(0,n.cn)(s({variant:r}),t),...l})}function i(e){let{className:t,...r}=e;return(0,a.jsx)("div",{"data-slot":"alert-title",className:(0,n.cn)("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",t),...r})}function c(e){let{className:t,...r}=e;return(0,a.jsx)("div",{"data-slot":"alert-description",className:(0,n.cn)("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",t),...r})}},21669:(e,t,r)=>{"use strict";r.d(t,{A:()=>m});var a=r(95155),l=r(41052),n=r(96017),s=r(31120),o=r(50313),i=r(66219),c=r(13744),d=r(96334);let x="border-[rgb(from_var(--primary)_calc(r+183)_calc(g+142)_calc(b+123))]",p="border-[rgb(from_var(--primary)_calc(r+22)_calc(g+22)_calc(b+24))]",u="font-nunito text-[14px] leading-[19px] font-bold text-black";function m(e){let{selectedProxies:t,onClose:r,isOpen:m}=e,{form:h,watchDayOfRenewal:f,calculateTotalAmount:b,renewalUnit:g,onSubmit:w,isSubmitting:y}=(0,d.I)({selectedProxies:t,categoryTypeId:2,onClose:r}),v=g.charAt(0).toUpperCase()+g.slice(1);return(0,a.jsx)(i.lG,{open:m,onOpenChange:r,children:(0,a.jsx)(i.Cf,{headerClassName:"bg-transparent",showCloseButton:!1,className:"top-1/2 right-4 left-auto w-[90vw] max-w-[350px] translate-x-0 -translate-y-1/2 bg-transparent p-0 shadow-none sm:w-[350px]",children:(0,a.jsxs)("div",{className:"relative box-border flex h-[768px] max-h-[85vh] w-full flex-col items-start gap-6 rounded-2xl border-t-4 bg-white px-4 py-6 ".concat(p),children:[(0,a.jsxs)("div",{className:"box-border flex h-9 w-max shrink-0 flex-row items-center gap-2 rounded-[999px] border py-1 pr-3 pl-1 ".concat(x),children:[(0,a.jsx)("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-[999px] bg-[rgb(from_var(--primary)_calc(r+22)_calc(g+22)_calc(b+24))] p-1.5 text-white",children:(0,a.jsx)(o.F.RenewCalendarIcon,{className:"!h-4 !w-4"})}),(0,a.jsx)("span",{className:u,children:"Gia hạn Proxy"})]}),(0,a.jsx)(l.lV,{...h,children:(0,a.jsxs)("form",{onSubmit:w,className:"flex w-full min-w-0 flex-1 flex-col",children:[(0,a.jsxs)("div",{className:"flex w-full shrink-0 flex-col items-start justify-center gap-6 border-t py-6 ".concat(x),children:[(0,a.jsxs)("div",{className:"flex w-full flex-col items-start justify-center gap-0.5",children:[(0,a.jsx)("span",{className:u,children:"Nháºp proxy"}),(0,a.jsx)(s.T,{readOnly:!0,className:"font-nunito box-border h-[199px] w-full resize-none rounded-lg border bg-[rgb(from_var(--primary)_calc(r+205)_calc(g+165)_calc(b+148))] px-2 pt-2 pb-12 text-[14px] leading-[19px] font-normal text-black shadow-none focus-visible:ring-0 ".concat(x),placeholder:"Chá»n Äá»a chá»",value:t.map(e=>{var t,r;return null==e||null==(r=e.proxy)||null==(t=r.ipaddress)?void 0:t.ip}).join("\n")})]}),(0,a.jsx)(l.zB,{control:h.control,name:"dayOfRenewal",render:e=>{let{field:t}=e;return(0,a.jsxs)(l.eI,{className:"flex w-full flex-col items-start justify-center gap-0.5",children:[(0,a.jsxs)("span",{className:u,children:[v," sá» dụng"]}),(0,a.jsx)("div",{className:"box-border flex h-10 w-full flex-row items-center justify-between gap-2.5 rounded-lg border bg-white px-2 shadow-[0px_2px_6px_0px_rgb(from_var(--primary)_r_g_b_/_0.25)] ".concat(p),children:(0,a.jsx)(l.MJ,{children:(0,a.jsx)(n.p,{type:"number",step:1,min:0,useCustomStepper:!0,className:"font-nunito h-auto w-full border-none bg-transparent p-0 text-start text-[14px] leading-[19px] font-normal text-black shadow-none focus-visible:ring-0",...t,onChange:e=>t.onChange(e.target.value?+e.target.value:"")}
1)})}),(0,a.jsx)(l.C5,{})]})}})]}),(0,a.jsx)("div",{className:"w-full flex-1"}),(0,a.jsxs)("div",{className:"flex w-full shrink-0 flex-col items-center justify-end gap-4 border-t pt-6 ".concat(x),children:[(0,a.jsxs)("div",{className:"flex w-full flex-row items-center justify-between gap-8",children:[(0,a.jsx)("span",{className:"font-nunito text-[18px] leading-[25px] font-bold text-black",children:"Tá»ng tiá»n"}),(0,a.jsxs)("span",{className:"font-nunito text-primary text-[18px] leading-[25px] font-bold",children:[c.A.formatNum(b(f))," ","Ä"]})]}),(0,a.jsx)("button",{type:"submit",disabled:y||!f||f<=0,className:"font-nunito bg-primary hover:bg-primary/90 flex h-9 w-full cursor-pointer items-center justify-center gap-2 rounded-lg p-2 text-center text-[16px] leading-[22px] font-bold text-white transition-colors disabled:cursor-not-allowed disabled:opacity-50",children:"Gia hạn"})]})]})}),(0,a.jsx)("button",{type:"button",onClick:r,"aria-label":"Ä\xf3ng",className:"absolute top-[7px] right-0.5 flex h-6 w-6 cursor-pointer items-center justify-center p-1 text-[rgb(from_var(--primary)_calc(r+66)_calc(g+28)_calc(b+16))] transition-opacity hover:opacity-70",children:(0,a.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,a.jsx)("path",{d:"M8.00104 6.93955L11.7011 3.23956L12.7614 4.2999L9.0614 7.9999L12.7614 11.6999L11.7011 12.7602L8.00104 9.06025L4.30104 12.7602L3.24072 11.6999L6.94072 7.9999L3.24072 4.2999L4.30104 3.23956L8.00104 6.93955Z",fill:"currentColor"})})})]})})})}},22697:(e,t,r)=>{"use strict";r.d(t,{A:()=>E});var a=r(95155),l=r(12115),n=r(6259),s=r(25559),o=r(50313),i=r(41216),c=r(78246),d=r(31399),x=r(41052),p=r(96017),u=r(31120),m=r(66219),h=r(13744),f=r(96334);let b="border-[rgb(from_var(--primary)_calc(r+183)_calc(g+142)_calc(b+123))]",g="border-[rgb(from_var(--primary)_calc(r+22)_calc(g+22)_calc(b+24))]",w="font-nunito text-[14px] leading-[19px] font-bold text-black";function y(e){let{selectedProxies:t,onClose:r,isOpen:l}=e,{form:n,watchDayOfRenewal:s,calculateTotalAmount:i,renewalUnit:c,onSubmit:d,isSubmitting:y}=(0,f.I)({selectedProxies:t,categoryTypeId:1,onClose:r}),v=c.charAt(0).toUpperCase()+c.slice(1);return(0,a.jsx)(m.lG,{open:l,onOpenChange:r,children:(0,a.jsx)(m.Cf,{headerClassName:"bg-transparent",showCloseButton:!1,className:"top-1/2 right-4 left-auto w-[90vw] max-w-[350px] translate-x-0 -translate-y-1/2 bg-transparent p-0 shadow-none sm:w-[350px]",children:(0,a.jsxs)("div",{className:"relative box-border flex h-[768px] max-h-[85vh] w-full flex-col items-start gap-6 rounded-2xl border-t-4 bg-white px-4 py-6 ".concat(g),children:[(0,a.jsxs)("div",{className:"box-border flex h-9 w-max shrink-0 flex-row items-center gap-2 rounded-[999px] border py-1 pr-3 pl-1 ".concat(b),children:[(0,a.jsx)("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-[999px] bg-[rgb(from_var(--primary)_calc(r+22)_calc(g+22)_calc(b+24))] p-1.5 text-white",children:(0,a.jsx)(o.F.RenewCalendarIcon,{className:"!h-4 !w-4"})}),(0,a.jsx)("span",{className:w,children:"Gia hạn Proxy"})]}),(0,a.jsx)(x.lV,{...n,children:(0,a.jsxs)("form",{onSubmit:d,className:"flex w-full min-w-0 flex-1 flex-col",children:[(0,a.jsxs)("div",{className:"flex w-full shrink-0 flex-col items-start justify-center gap-6 border-t py-6 ".concat(b),children:[(0,a.jsxs)("div",{className:"flex w-full flex-col items-start justify-center gap-0.5",children:[(0,a.jsx)("span",{className:w,children:"Nháºp proxy"}),(0,a.jsx)(u.T,{readOnly:!0,className:"font-nunito box-border h-[199px] w-full resize-none rounded-lg border bg-[rgb(from_var(--primary)_calc(r+205)_calc(g+165)_calc(b+148))] px-2 pt-2 pb-12 text-[14px] leading-[19px] font-normal text-black shadow-none focus-visible:ring-0 ".concat(b),placeholder:"Chá»n Äá»a chá»",value:t.map(e=>{var t,r;return null==e||null==(r=e.proxy)||null==(t=r.ipaddress)?void 0:t.ip}).join("\n")})]}),(0,a.jsx)(x.zB,{control:n.control,name:"dayOfRenewal",render:e=>{let{field:t}=e;return(0,a.jsxs)(x.eI,{className:"flex w-full flex-col items-start justify-center gap-0.5",children:[(0,a.jsxs)("span",{className:w,children:[v," sá» dụng"]}),(0,a.jsx)("div",{className:"box-border flex h-10 w-full flex-row items-center justify-between gap-2.5 rounded-lg border bg-white px-2 shadow-[0px_2px_6px_0px_rgb(from_var(--primary)_r_g_b_/_0.25)] ".concat(g),children:(0,a.jsx)(x.MJ,{children:(0,a.jsx)(p.p,{type:"number",step:1,min:0,useCustomStepper:!0,className:"font-nunito h-auto w-full border-none bg-transparent p-0 text-start text-[14px] leading-[19px] font-normal text-black shadow-none focus-visible:ring-0",...t,onChange:e=>t.onChange(e.target.value?+e.target.value:"")}
1)})}),(0,a.jsx)(x.C5,{})]})}})]}),(0,a.jsx)("div",{className:"w-full flex-1"}),(0,a.jsxs)("div",{className:"flex w-full shrink-0 flex-col items-center justify-end gap-4 border-t pt-6 ".concat(b),children:[(0,a.jsxs)("div",{className:"flex w-full flex-row items-center justify-between gap-8",children:[(0,a.jsx)("span",{className:"font-nunito text-[18px] leading-[25px] font-bold text-black",children:"Tá»ng tiá»n"}),(0,a.jsxs)("span",{className:"font-nunito text-primary text-[18px] leading-[25px] font-bold",children:[h.A.formatNum(i(s))," ","Ä"]})]}),(0,a.jsx)("button",{type:"submit",disabled:y||!s||s<=0,className:"font-nunito bg-primary hover:bg-primary/90 flex h-9 w-full cursor-pointer items-center justify-center gap-2 rounded-lg p-2 text-center text-[16px] leading-[22px] font-bold text-white transition-colors disabled:cursor-not-allowed disabled:opacity-50",children:"Gia hạn"})]})]})}),(0,a.jsx)("button",{type:"button",onClick:r,"aria-label":"Ä\xf3ng",className:"absolute top-[7px] right-0.5 flex h-6 w-6 cursor-pointer items-center justify-center p-1 text-[rgb(from_var(--primary)_calc(r+66)_calc(g+28)_calc(b+16))] transition-opacity hover:opacity-70",children:(0,a.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,a.jsx)("path",{d:"M8.00104 6.93955L11.7011 3.23956L12.7614 4.2999L9.0614 7.9999L12.7614 11.6999L11.7011 12.7602L8.00104 9.06025L4.30104 12.7602L3.24072 11.6999L6.94072 7.9999L3.24072 4.2999L4.30104 3.23956L8.00104 6.93955Z",fill:"currentColor"})})})]})})})}var v=r(65142),j=r(44774),N=r(98368),_=r(98535);let k="border-[rgb(from_var(--primary)_calc(r+183)_calc(g+142)_calc(b+123))]",C="font-nunito text-[14px] leading-[19px] font-bold text-black",L="font-nunito box-border h-10 w-full rounded-lg border border-[rgb(from_var(--primary)_calc(r+183)_calc(g+142)_calc(b+123))] bg-white p-2 text-[14px] leading-[19px] font-normal text-black shadow-none transition-[border-color,box-shadow] placeholder:font-normal placeholder:text-[rgb(from_var(--primary)_calc(r+161)_calc(g+120)_calc(b+101))] focus-visible:border-[rgb(from_var(--primary)_calc(r+22)_calc(g+22)_calc(b+24))] focus-visible:shadow-[0px_2px_6px_0px_rgb(from_var(--primary)_r_g_b_/_0.25)] focus-visible:ring-0 focus-visible:outline-none";function I(e){let{selectedProxies:t,onClose:r,isOpen:l}=e,{form:n,onSubmit:s,isSubmitting:i}=(0,N.N)({selectedProxies:t,onClose:r});return(0,a.jsx)(m.lG,{open:l,onOpenChange:r,children:(0,a.jsx)(m.Cf,{headerClassName:"bg-transparent",showCloseButton:!1,className:"top-1/2 right-4 left-auto w-[90vw] max-w-[350px] translate-x-0 -translate-y-1/2 bg-transparent p-0 shadow-none sm:w-[350px]",children:(0,a.jsxs)("div",{className:"relative box-border flex h-[768px] max-h-[85vh] w-full flex-col items-start gap-6 rounded-2xl border-t-4 bg-white px-4 py-6 ".concat("border-[rgb(from_var(--primary)_calc(r+22)_calc(g+22)_calc(b+24))]"),children:[(0,a.jsxs)("div",{className:"box-border flex h-9 w-max shrink-0 flex-row items-center gap-2 rounded-[999px] border py-1 pr-3 pl-1 ".concat(k),children:[(0,a.jsx)("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-[999px] bg-[rgb(from_var(--primary)_calc(r+22)_calc(g+22)_calc(b+24))] p-1.5 text-white",children:(0,a.jsx)(o.F.PasswordLockIcon,{className:"!h-4 !w-4"})}),(0,a.jsx)("span",{className:C,children:"Äá»i máºt khẩu proxy"})]}),(0,a.jsx)(x.lV,{...n,children:(0,a.jsxs)("form",{onSubmit:s,autoComplete:"off",className:"relative flex w-full min-w-0 flex-1 flex-col",children:[(0,a.jsx)(_.vU,{}),(0,a.jsxs)("div",{className:"flex w-full shrink-0 flex-col items-start justify-center gap-6 border-t py-6 ".concat(k),children:[(0,a.jsx)(x.zB,{control:n.control,name:"username",render:e=>{let{field:t}=e;return(0,a.jsxs)(x.eI,{className:"flex w-full flex-col items-start justify-center gap-0.5",children:[(0,a.jsx)("span",{className:C,children:"T\xe0i khoản proxy"}),(0,a.jsx)(x.MJ,{children:(0,a.jsx)(v.p,{placeholder:"Nháºp t\xe0i khoản proxy",className:L,...t,..._.OV})}),(0,a.jsx)(x.C5,{})]})}}),(0,a.jsx)(x.zB,{control:n.control,name:"password",render:e=>{let{field:t}=e;return(0,a.jsxs)(x.eI,{className:"flex w-full flex-col items-start justify-center gap-0.5",children:[(0,a.jsx)("span",{className:C,children:"Máºt khẩu proxy"}),(0,a.jsx)(x.MJ,{children:(0,a.jsx)(j.c,{placeholder:"Nháºp máºt khẩu proxy",hideKeyIcon:!0,className:"".concat(L," pr-10"),...t,..._.P1})}),(0,a.jsx)(x.C5,{})]})}})]}),(0,a.jsx)("div",{className:"w-full flex-1"}),(0,a.jsx)("div",{className:"flex w-full shrink-0 flex-col items-center justify-end gap-4 border-t pt-6 ".concat(k),children:(0,a.jsx)("button",{type:"submit",disabled:i,className:"font-nunito bg-primary hover:bg-primary/90 flex h-9 w-full cursor-pointer items-center justify-center gap-2 rounded-lg p-2 text-center text-[16px] leading-[22px] font-bold text-white transition-colors disabled:cursor-not-allowed disabled:opacity-50",children:"Cáºp nháºt"})})]})}),(0,a.jsx)("button",{type:"button",onClick:r,"aria-label":"Ä\xf3ng",className:"absolute top-[7px] right-0.5 flex h-6 w-6 cursor-pointer items-center justify-center p-1 text-[rgb(from_var(--primary)_calc(r+66)_calc(g+28)_calc(b+16))] transition-opacity hover:opacity-70",children:(0,a.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,a.jsx)("path",{d:"M8.00104 6.93955L11.7011 3.23956L12.7614 4.2999L9.0614 7.9999L12.7614 11.6999L11.7011 12.7602L8.00104 9.06025L4.30104 12.7602L3.24072 11.6999L6.94072 7.9999L3.24072 4.2999L4.30104 3.23956L8.00104 6.93955Z",fill:"currentColor"})})})]})})})}var A=r(17511),F=r(62216),S=r(30030);let D="border-[rgb(from_var(--primary)_calc(r+183)_calc(g+142)_calc(b+123))]",R="font-nunito text-[14px] leading-[19px] font-bold text-black";function B(e){let{selectedProxies:t,onClose:r,isOpen:l}=e,{form:n,onSubmit:s,isSubmitting:i}=(0,F.d)({selectedProxies:t,onClose:r}),c=n.watch("protocol");return(0,a.jsx)(m.lG,{open:l,onOpenChange:r,children:(0,a.jsx)(m.Cf,{headerClassName:"bg-transparent",showCloseButton:!1,className:"top-1/2 right-4 left-auto w-[90vw] max-w-[350px] translate-x-0 -translate-y-1/2 bg-transparent p-0 shadow-none sm:w-[350px]",children:(0,a.jsxs)("div",{className:"relative box-border flex h-[768px] max-h-[85vh] w-full flex-col items-start gap-6 rounded-2xl border-t-4 bg-white px-4 py-6 ".concat("border-[rgb(from_var(--primary)_calc(r+22)_calc(g+22)_calc(b+24))]"),children:[(0,a.jsxs)("div",{className:"box-border flex h-9 w-max shrink-0 flex-row items-center gap-2 rounded-[999px] border py-1 pr-3 pl-1 ".concat(D),children:[(0,a.jsx)("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-[999px] bg-[rgb(from_var(--primary)_calc(r+22)_calc(g+22)_calc(b+24))] p-1.5 text-white",children:(0,a.jsx)(o.F.ProtocolSwapIcon,{className:"!h-4 !w-4"})}),(0,a.jsx)("span",{className:R,children:"Äá»i giao thức"})]}),(0,a.jsx)(x.lV,{...n,children:(0,a.jsxs)("form",{onSubmit:s,className:"flex w-full min-w-0 flex-1 flex-col",children:[(0,a.jsxs)("div",{className:"flex w-full shrink-0 flex-col items-start justify-center gap-6 border-t py-6 ".concat(D),children:[(0,a.jsxs)("div",{className:"flex w-full flex-col items-start justify-center gap-0.5",children:[(0,a.jsx)("span",{className:R,children:"Nháºp proxy"}),(0,a.jsx)(u.T,{readOnly:!0,className:"font-nunito box-border h-[199px] w-full resize-none rounded-lg border bg-[rgb(from_var(--primary)_calc(r+205)_calc(g+165)_calc(b+148))] px-2 pt-2 pb-12 text-[14px] leading-[19px] font-normal text-black shadow-none focus-visible:ring-0 ".concat(D),placeholder:"Chá»n Äá»a chá»",value:t.map(e=>{var t,r;return null==e||null==(r=e.proxy)||null==(t=r.ipaddress)?void 0:t.ip}).join("\n")})]}),(0,a.jsx)(x.zB,{control:n.control,name:"protocol",render:e=>{var t;let{field:r}=e;return(0,a.jsxs)(x.eI,{className:"flex w-full flex-col items-start justify-center gap-0.5",children:[(0,a.jsx)("span",{className:R,children:"Giao thức"}),(0,a.jsxs)(A.l6,{value:null!=(t=r.value)?t:"",onValueChange:r.onChange,children:[(0,a.jsx)(x.MJ,{children:(0,a.jsx)(A.bq,{iconClassName:"h-6 w-6 text-[rgb(from_var(--primary)_calc(r+75)_calc(g+35)_calc(b+18))]",className:"font-nunito box-border h-10 w-full justify-between gap-2.5 rounded-lg border bg-white p-2 text-[14px] leading-[19px] font-normal shadow-none focus:ring-0 data-[state=open]:ring-0 [&>span]:!text-black ".concat(D," data-[state=open]:border-[rgb(from_var(--primary)_calc(r+183)_calc(g+142)_calc(b+123))]"),children:(0,a.jsx)(A.yv,{placeholder:"Chá»n giao thức"})})}),(0,a.jsx)(A.gC,{children:S.q.map(e=>(0,a.jsx)(A.eb,{value:e.value,children:(0,a.jsx)("span",{className:"font-nunito text-[14px] leading-[19px] font-normal text-black",children:e.name})},e.value))})]}),(0,a.jsx)(x.C5,{})]})}})]}),(0,a.jsx)("div",{className:"w-full flex-1"}),(0,a.jsx)("div",{className:"flex w-full shrink-0 flex-col items-center justify-end gap-4 border-t pt-6 ".concat(D),children:(0,a.jsx)("button",{type:"submit",disabled:i||!c,className:"font-nunito bg-primary hover:bg-primary/90 flex h-9 w-full cursor-pointer items-center justify-center gap-2 rounded-lg p-2 text-center text-[16px] leading-[22px] font-bold text-white transition-colors disabled:cursor-not-allowed disabled:opacity-50",children:"Cáºp nháºt"})})]})}),(0,a.jsx)("button",{type:"button",onClick:r,"aria-label":"Ä\xf3ng",className:"absolute top-[7px] right-0.5 flex h-6 w-6 cursor-pointer items-center justify-center p-1 text-[rgb(from_var(--primary)_calc(r+66)_calc(g+28)_calc(b+16))] transition-opacity hover:opacity-70",children:(0,a.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,a.jsx)("path",{d:"M8.00104 6.93955L11.7011 3.23956L12.7614 4.2999L9.0614 7.9999L12.7614 11.6999L11.7011 12.7602L8.00104 9.06025L4.30104 12.7602L3.24072 11.6999L6.94072 7.9999L3.24072 4.2999L4.30104 3.23956L8.00104 6.93955Z",fill:"currentColor"})})})]})})})}var z=r(29279),M=r(8873),P=r(37062),V=r(37787);function E(e){let{table:t,part:r="all"}=e,[x,p]=(0,l.useState)(!1),[u,m]=(0,l.useState)(""),h=P.ed,{selectedProxies:f}=(0,V.C)(t),b=(0,M.R)({selectedProxies:f}),g=()=>{switch(u){case"change-info":return(0,a.jsx)(I,{isOpen:x,onClose:()=>p(!1),selectedProxies:f});case"change-protocol":return(0,a.jsx)(B,{isOpen:x,onClose:()=>p(!1),selectedProxies:f});case"change-renewal":return(0,a.jsx)(y,{isOpen:x,onClose:()=>p(!1),selectedProxies:f});default:return null}},w=(0,z.H)({selectedProxies:f}),v=0===f.length,[j,N]=(0,l.useState)(!1),_=(e,t)=>
1()=>{if(v)return void(0,d.cN)({message:"Bạn cần chá»n \xedt nhất 1 proxy Äá» ".concat(t,".")});e()},k=(0,a.jsx)(i.A,{table:t,className:"w-full min-w-0"}),C=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(s.$,{onClick:_(()=>{p(!0),m("change-info")},"Äá»i máºt khẩu"),className:(0,d.$6)(!1),children:[(0,a.jsx)(o.F.PasswordLockIcon,{className:"!h-5 !w-5"}),"Äá»i máºt khẩu"]}),(0,a.jsxs)(s.$,{onClick:_(()=>{p(!0),m("change-protocol")},"Äá»i giao thức"),className:(0,d.$6)(!1),children:[(0,a.jsx)(o.F.ProtocolSwapIcon,{className:"!h-5 !w-5"}),"Äá»i giao thức"]}),(0,a.jsxs)(s.$,{onClick:_(w,"fix"),className:(0,d.$6)(!1),children:[(0,a.jsx)(o.F.FixIcon,{className:"!h-5 !w-5"}),"Fix"]}),(0,a.jsxs)(n.rI,{modal:!1,open:j,onOpenChange:e=>{if(e&&v)return void(0,d.cN)({message:"Bạn cần chá»n \xedt nhất 1 proxy Äá» copy."});N(e)},children:[(0,a.jsx)(n.ty,{asChild:!0,children:(0,a.jsxs)(s.$,{className:(0,d.$6)(!1),title:"Copy h\xe0ng loạt",children:[(0,a.jsx)(o.F.CopyIcon,{className:"!h-5 !w-5"}),"Copy"]})}),(0,a.jsx)(n.SQ,{align:"end",children:h.map(e=>(0,a.jsxs)(n._2,{onClick:()=>b(e.type),className:"hover:cursor-pointer",children:[(0,a.jsx)(o.F.CopyIcon,{className:"text-primary mr-1 !h-4 !w-4"}),e.label]},e.type))})]}),(0,a.jsxs)(s.$,{onClick:_(()=>{p(!0),m("change-renewal")},"gia hạn"),className:d.D5,children:[(0,a.jsx)(o.F.RenewCalendarIcon,{className:"!h-5 !w-5"}),"Gia hạn"]})]});return"search"===r?k:"actions"===r?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex w-full max-w-full min-w-0 flex-col gap-3 sm:flex-row sm:items-center sm:justify-between sm:gap-4",children:[(0,a.jsx)("div",{className:"flex w-full max-w-full min-w-0 flex-nowrap items-center gap-2 overflow-x-auto overscroll-x-contain pb-1 [scrollbar-width:thin] sm:w-auto sm:gap-3 sm:pb-0 [&::-webkit-scrollbar]:h-1.5",children:C}),(0,a.jsx)("div",{className:"shrink-0 self-end sm:self-auto",children:(0,a.jsx)(c.i,{table:t})})]}),g()]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.k8,{search:k,searchClassName:d.cX,...d.Q_,actions:(0,a.jsxs)(a.Fragment,{children:[C,(0,a.jsx)("div",{className:"shrink-0",children:(0,a.jsx)(c.i,{table:t})})]})}),g()]})}},25559:(e,t,r)=>{"use strict";r.d(t,{$:()=>i,r:()=>o});var a=r(95155);r(12115);var l=r(32467),n=r(83101),s=r(64269);let o=(0,n.F)("inline-flex items-center hover:cursor-pointer justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium transition-all disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[1px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border border-primary bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 text-primary data-[active=true]:text-primary data-[active=true]:border-primary data-[active=true]:bg-primary/10",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-primary-hover hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-lg gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-lg px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function i(e){let{className:t,variant:r,size:n,asChild:i=!1,...c}=e,d=i?l.DX:"button";return(0,a.jsx)(d,{"data-slot":"button",className:(0,s.cn)(o({variant:r,size:n,className:t})),...c})}},30165:(e,t,r)=>{"use strict";r.d(t,{e:()=>d});var a=r(95155),l=r(39180),n=r(58795),s=r(52095),o=r(58067),i=r(96199),c=r(18720);function d(e){let{selectedProxies:t,successMessage:r="Ä\xe3 copy th\xe0nh c\xf4ng",errorMessage:d="Copy thất bại"}=e,{data:x}=(0,i.wV)(),{config:p}=(0,l.r)(),u=null==p?void 0:p.hostName,m=()=>u?"https://".concat(u):null;return async e=>{let l;switch(e){case"id":l=Promise.resolve(t.map(e=>e.code).join("\n"));break;case"key":l=Promise.all(t.map(async e=>{let t=await (0,n.f)(e.id,null==x?void 0:x.accessToken);return t?"".concat(t):""})).then(e=>e.filter(e=>e).join("\n"));break;case"link":{let e=m()?m()+"/api":"https://api-proxy.homeproxy.vn";l=Promise.all(t.map(async t=>{let r=await (0,n.f)(t.id,null==x?void 0:x.accessToken);return r?(0,s.z)({baseUrl:e,token:r}):""})).then(e=>e.filter(e=>e).join("\n"));break}default:l=Promise.resolve("")}let i=await (0,o.b)(l),p=await l;i?c.toast.success(r,{description:(0,a.jsx)("div",{className:"toast-clamp",children:p}),duration:5e3}):c.toast.error(d)}}},31399:(e,t,r)=>{"use strict";r.d(t,{k8:()=>s,zJ:()=>o.zJ,$6:()=>o.$6,D5:()=>o.D5,I9:()=>o.I9,cX:()=>
1o.cX,Q_:()=>o.Q_,Nd:()=>o.Nd,cN:()=>x});var a=r(95155),l=r(64269);let n={light:"[&::-webkit-scrollbar-thumb]:bg-[#C7C7CC] [&::-webkit-scrollbar-track]:bg-[#EBEBEB]",dark:"[&::-webkit-scrollbar-thumb]:bg-white/20 [&::-webkit-scrollbar-track]:bg-white/5"};function s(e){let{search:t,actions:r,className:s,searchClassName:o,actionsClassName:i,desktopActionsPosition:c="end",scrollbarVariant:d="light",wrapActions:x=!1,inlineFrom:p="xl",stackAlways:u=!1}=e,m="start"===c,h="2xl"===p,f=(0,l.cn)("flex w-full min-w-0 items-center gap-2",x?"flex-wrap":(0,l.cn)("flex-nowrap overflow-x-auto overscroll-x-contain pb-1",h?"2xl:overflow-visible 2xl:pb-0":"xl:overflow-visible xl:pb-0","[scrollbar-width:thin] [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:rounded-full",n[d]),!u&&(h?"2xl:min-w-0 2xl:flex-1":"xl:min-w-0 xl:flex-1"),m?h?"2xl:justify-start":"xl:justify-start":h?"2xl:justify-end":"xl:justify-end",i);return!t&&r?(0,a.jsx)("div",{className:(0,l.cn)(f,s),children:r}):(0,a.jsxs)("div",{className:(0,l.cn)("flex w-full max-w-full min-w-0 flex-col gap-3 overflow-hidden sm:gap-4",!u&&(h?"2xl:flex-row 2xl:items-center 2xl:justify-between 2xl:gap-4":"xl:flex-row xl:items-center xl:justify-between xl:gap-4 2xl:gap-6"),!u&&(m?h?"2xl:flex-row-reverse":"xl:flex-row-reverse":""),s),children:[t?(0,a.jsx)("div",{className:(0,l.cn)("w-full max-w-full min-w-0 shrink-0 overflow-visible",!u&&(h?"xl:w-full xl:max-w-full 2xl:max-w-[min(100%,480px)]":"xl:max-w-[min(100%,360px)] 2xl:max-w-[min(100%,440px)]"),!u&&(m?h?"2xl:ml-auto":"xl:ml-auto":""),o),children:t}):null,r?(0,a.jsx)("div",{className:f,children:r}):null]})}var o=r(17835),i=r(18720),c=r(65229);function d(e){let{className:t}=e;return(0,a.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:(0,a.jsx)("path",{d:"M6.99949 0.874512C7.3878 0.874512 7.74603 1.0796 7.94292 1.41596L13.8496 11.4792C14.0492 11.8183 14.0492 12.2367 13.8551 12.5757C13.6609 12.9148 13.2972 13.1254 12.9062 13.1254H1.09282C0.701775 13.1254 0.338077 12.9148 0.143923 12.5757C-0.0502316 12.2367 -0.047497 11.8155 0.149392 11.4792L6.05607 1.41596C6.25295 1.0796 6.61118 0.874512 6.99949 0.874512ZM6.99949 4.37476C6.63579 4.37476 6.34319 4.66736 6.34319 5.03106V8.09378C6.34319 8.45748 6.63579 8.75008 6.99949 8.75008C7.36319 8.75008 7.65579 8.45748 7.65579 8.09378V5.03106C7.65579 4.66736 7.36319 4.37476 6.99949 4.37476ZM7.87455 10.5002C7.87455 10.2681 7.78236 10.0455 7.61825 9.88144C7.45415 9.71733 7.23157 9.62514 6.99949 9.62514C6.76741 9.62514 6.54484 9.71733 6.38073 9.88144C6.21662 10.0455 6.12443 10.2681 6.12443 10.5002C6.12443 10.7323 6.21662 10.9549 6.38073 11.119C6.54484 11.2831 6.76741 11.3753 6.99949 11.3753C7.23157 11.3753 7.45415 11.2831 7.61825 11.119C7.78236 10.9549 7.87455 10.7323 7.87455 10.5002Z",fill:"currentColor"})})}function x(){let{title:e="Chá»n \xedt nhất 1 d\xf2ng Äá» thá»±c hiá»n lá»nh",message:t="Vui l\xf2ng chá»n \xedt nhất má»t proxy trưá»c khi thá»±c hiá»n thao t\xe1c n\xe0y."}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i.toast.custom(r=>(0,a.jsxs)("div",{className:"flex w-[350px] max-w-[calc(100vw-32px)] flex-col rounded-lg",style:{background:"#FBF0DA",boxShadow:"0px 2px 15px -3px rgba(0, 0, 0, 0.07), 0px 10px 20px -2px rgba(0, 0, 0, 0.04)"},children:[(0,a.jsxs)("div",{className:"flex flex-row items-center justify-between gap-4 px-4 py-2",style:{borderBottom:"2px solid #F9E4BE"},children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-row items-center gap-2",children:[(0,a.jsx)(d,{className:"h-3.5 w-3.5 shrink-0 text-[#E4A11B]"}),(0,a.jsx)("span",{className:"truncate",style:{fontFamily:"'Nunito', sans-serif",fontWeight:700,fontSize:"14px",lineHeight:"19px",color:"#73510D"},children:e})]}),(0,a.jsx)("button",{onClick:()=>i.toast.dismiss(r),className:"shrink-0 cursor-pointer","aria-label":"Ä\xf3ng",children:(0,a.jsx)(c.A,{className:"h-3.5 w-3.5",style:{color:"rgba(228, 161, 27, 0.7)"}})})]}),(0,a.jsx)("div",{className:"px-4 py-2",children:(0,a.jsx)("p",{style:{fontFamily:"'Inter', sans-serif",fontWeight:400,fontSize:"12px",lineHeight:"15px",color:"#73510D"},children:t})})]}),{duration:3e3})}},34857:(e,t,r)=>{"use strict";r.d(t,{M:()=>d});var a=r(95155),l=r(61362),n=r(52056),s=r(12115),o=r(18720),i=r(52095),c=r(39180);
1function d(){let[e,t]=(0,s.useState)(""),[r,d]=(0,s.useState)(!1),[x,p]=(0,s.useState)(!1),[u,m]=(0,s.useState)([]),{config:h}=(0,c.r)(),f=null==h?void 0:h.hostName,b=async function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=e.trim().split("\n").map(e=>e.trim()).filter(e=>e);if(0===r.length)return void o.toast.error("Vui l\xf2ng nháºp \xedt nhất má»t key");t?d(!0):p(!0),m([]);let s=await Promise.all(r.map(async e=>{try{let r=(0,i.z)({hostName:f,token:e,checkOnly:t}),a=await fetch(r),l=await a.json();if(("success"===l.status||t)&&l.proxy)return{key:e,proxy:l.proxy,timeRemaining:l.timeRemaining,location:l.location,provider:l.provider,lastRotate:l.lastRotate};return{key:e,proxy:null,error:l.message||"Kh\xf4ng lấy ÄÆ°á»£c proxy"}}catch(t){return{key:e,proxy:null,error:"Lá»i kết ná»i API"}}}));m(s),t?d(!1):p(!1);let c=s.filter(e=>e.proxy).length,x=s.filter(e=>!e.proxy).length;if(c>0){let e=t?"Xem th\xe0nh c\xf4ng ".concat(c,"/").concat(s.length," proxy"):"Xoay & lấy th\xe0nh c\xf4ng ".concat(c,"/").concat(s.length," proxy");o.toast.success(e,{icon:(0,a.jsx)(l.A,{className:"h-4 w-4 text-green-600"})})}x>0&&o.toast.error("".concat(x,"/").concat(s.length," proxy thất bại"),{icon:(0,a.jsx)(n.A,{className:"h-4 w-4 text-red-500"})})};return{input:e,setInput:t,loadingCheck:r,loadingRotate:x,results:u,handleFetch:b,handleCopyResults:()=>{let e=u.filter(e=>e.proxy).map(e=>e.proxy).join("\n");e&&(navigator.clipboard.writeText(e),o.toast.success("Ä\xe3 copy danh s\xe1ch proxy!"))}}}},41216:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var a=r(95155),l=r(96017),n=r(50313),s=r(17511),o=r(12115);function i(e){let{table:t,className:r}=e,i=(0,o.useMemo)(()=>t.getAllColumns().filter(e=>e.getCanFilter()),[t]),c=o.useCallback(e=>{var t;return"s"===e.columnDef.id||(null==(t=e.columnDef.meta)?void 0:t.variant)==="text"},[]),d=(0,o.useMemo)(()=>i.filter(e=>c(e)),[i,c]),[x,p]=(0,o.useState)(()=>{var e,t;return null!=(t=null==(e=d[0])?void 0:e.id)?t:""}),[u,m]=(0,o.useState)(()=>{let e=d[0];return(null==e?void 0:e.getFilterValue())||""});o.useEffect(()=>{let e=d.find(e=>e.id===x);e&&m(e.getFilterValue()||"")},[x,d]);let h=o.useCallback(()=>{let e=d.find(e=>e.id===x);if(e){let t=u.trim();e.setFilterValue(t||void 0),d.filter(e=>e.id!==x).forEach(e=>e.setFilterValue(void 0))}},[d,x,u]),f=o.useCallback(e=>{"Enter"===e.key&&(e.preventDefault(),h())},[h]),b=o.useCallback(()=>{t.resetColumnFilters(),m("")},[t]);return(0,a.jsx)("div",{className:"flex w-full max-w-full min-w-0 flex-col gap-2.5 border-b border-[rgb(from_var(--primary)_calc(r+183)_calc(g+142)_calc(b+123))] pb-3 ".concat(null!=r?r:""),children:(0,a.jsxs)("div",{className:"flex h-11 w-full max-w-full min-w-0 items-center overflow-hidden rounded-[99px] border border-[rgb(from_var(--primary)_calc(r+183)_calc(g+142)_calc(b+123))] bg-white transition-colors focus-within:border-[rgb(from_var(--primary)_calc(r+22)_calc(g+22)_calc(b+24))]",children:[d.length>0&&(0,a.jsxs)(s.l6,{value:x,onValueChange:e=>p(e),children:[(0,a.jsx)(s.bq,{className:"h-10 w-auto max-w-[45%] min-w-0 shrink-0 gap-2 rounded-none border-none bg-transparent px-2 py-2 text-start text-sm leading-[19px] font-normal text-[rgb(from_var(--primary)_calc(r+18)_calc(g-20)_calc(b-33))] shadow-none focus:ring-0 sm:max-w-none sm:min-w-[147px] sm:gap-4 sm:px-3",iconClassName:"h-6 w-6 text-[rgb(from_var(--primary)_calc(r+75)_calc(g+35)_calc(b+18))]",children:(0,a.jsx)(s.yv,{className:"truncate"})}),(0,a.jsx)(s.gC,{children:d.map(e=>{var t,r;return(0,a.jsx)(s.eb,{value:e.id,children:(0,a.jsx)("span",{className:"text-sm leading-[19px] font-normal text-black",children:null!=(r=null==(t=e.columnDef.meta)?void 0:t.label)?r:e.id})},e.id)})})]}),(0,a.jsx)("span",{className:"h-7 w-px shrink-0 bg-[rgb(from_var(--primary)_calc(r+178)_calc(g+136)_calc(b+114))]"}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-1 py-2 pr-3",children:[(0,a.jsx)("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center p-1",children:(0,a.jsx)(n.F.MagnifyingGlass,{className:"h-5 w-5 text-[rgb(from_var(--primary)_calc(r+92)_calc(g+54)_calc(b+40))]"})}),(0,a.jsx)(l.p,{placeholder:"T\xecm kiếm...",value:u,onChange:e=>m(e.target.value),onKeyDown:f,className:"".concat("h-6 rounded-none border-none bg-transparent text-sm leading-[19px] font-normal text-black shadow-none focus-visible:border-none focus-visible:ring-0 focus-visible:ring-offset-0"," min-w-0 flex-1 px-0 placeholder:text-sm placeholder:leading-[19px] placeholder:font-normal placeholder:text-[rgb(from_var(--primary)_calc(r+131)_calc(g+91)_calc(b+73))] focus-visible:outline-none")}),u?(0,a.jsx)("button",{type:"button","aria-label":"Xo\xe1 t\xecm kiếm",onMouseDown:e=>e.preventDefault(),onClick:b,className:"inline-flex h-6 w-6 shrink-0 rounded-lg !p-0 text-[rgb(from_var(--primary)_calc(r+92)_calc(g+54)_calc(b+40))] transition-opacity hover:cursor-pointer hover:opacity-70",children:(0,a.jsx)(n.F.CloseIcon,{className:"!h-6 !w-6"})}):null]})]})})}},44774:(e,t,r)=>{"use strict";r.d(t,{c:()=>o});var a=r(95155);r(12115);var l=r(55817),n=r(64269),s=r(50313);function o(e){let{className:t,hideKeyIcon:r=!1,hasValue:o=!1,keyIconClassName:i,toggleClassName:c,toggleIconClassName:d,...x}=e,p=(0,n.cn)("!h-6 !w-6 text-[#7595A8]",d);return(0,a.jsx)(l.bL,{children:(0,a.jsxs)("div",{className:"relative w-full",children:[!r&&(0,a.jsx)("div",{className:(0,n.cn)("absolute top-1/2 left-5 !h-7 !w-7 -translate-y-1/2 transition-colors",o?"text-primary":"text-[#7595A8]",i),children:(0,a.jsx)(s.F.KeyIcon,{className:"pointer-events-none !h-full !w-full"})}),(0,a.jsx)(l.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-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-primary focus-visible:ring-primary/20 hover:border-primary/50 focus-visible:ring-[3px]","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",!r&&"pl-[56px]","truncate overflow-hidden text-ellipsis whitespace-nowrap",t),...x}),(0,a.jsx)(l.lM,{id:x.id+"btn-toggle",className:(0,n.cn)("absolute top-1/2 right-5 -translate-y-1/2 text-gray-500 hover:cursor-pointer hover:text-gray-700",c),children:(0,a.jsx)(l.In,{visible:(0,a.jsx)(s.F.EyeOpenIcon,{className:p}),hidden:(0,a.jsx)(s.F.EyeCloseIcon,{className:p})})})]})})}},50984:(e,t,r)=>{"use strict";r.d(t,{QW:()=>c,Sc:()=>i});var a=r(95155),l=r(12115),n=r(38162),s=r(5917),o=r(64269);let i=l.forwardRef((e,t)=>
1{let{className:r,...l}=e;return(0,a.jsx)(n.bL,{ref:t,className:(0,o.cn)("peer border-border-template-6 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 shadow-none hover:ring-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-transparent",r),...l,children:(0,a.jsx)(n.C1,{className:(0,o.cn)("text-primary flex items-center justify-center"),children:(0,a.jsx)(s.A,{className:"h-4 w-4"})})})});i.displayName=n.bL.displayName,l.forwardRef((e,t)=>{let{className:r,...l}=e;return(0,a.jsx)(n.bL,{ref:t,className:(0,o.cn)("peer border-border-template-3 focus-visible:ring-primary/10 data-[state=checked]:border-primary data-[state=checked]:text-primary 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 data-[state=checked]:bg-transparent",r),...l,children:(0,a.jsx)(n.C1,{className:(0,o.cn)("flex items-center justify-center text-current"),children:(0,a.jsx)(s.A,{className:"h-4 w-4 stroke-[3]"})})})}).displayName=n.bL.displayName;let c=l.forwardRef((e,t)=>{let{className:r,...l}=e;return(0,a.jsxs)(n.bL,{ref:t,className:(0,o.cn)("relative flex h-7 w-7 shrink-0 cursor-pointer items-center justify-center rounded-lg border-0 bg-transparent shadow-none transition-colors focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50","text-[rgb(from_var(--primary)_calc(r+103)_calc(g+62)_calc(b+45))]","hover:bg-[rgb(from_var(--primary)_calc(r+192)_calc(g+150)_calc(b+128))]","data-[state=checked]:text-primary",r),...l,children:[(0,a.jsx)("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,a.jsx)("path",{d:"M7.33333 6.5H20.6667C21.1269 6.5 21.5 6.8731 21.5 7.33333V20.6667C21.5 21.1269 21.1269 21.5 20.6667 21.5H7.33333C6.8731 21.5 6.5 21.1269 6.5 20.6667V7.33333C6.5 6.8731 6.8731 6.5 7.33333 6.5ZM8.16667 8.16667V19.8333H19.8333V8.16667H8.16667Z",fill:"currentColor"})}),(0,a.jsx)(n.C1,{className:"absolute inset-0 flex items-center justify-center text-current",children:(0,a.jsx)(s.A,{className:"h-3 w-3 stroke-[3]"})})]})});c.displayName=n.bL.displayName},52095:(e,t,r)=>{"use strict";r.d(t,{z:()=>n});let a=e=>e.replace(/\/+$/,""),l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.baseUrl)return a(e.baseUrl);if(e.hostName)return"https://".concat(e.hostName.replace(/^https?:\/\//,""),"/api");let t="https://api-proxy.homeproxy.vn";return t?a(t):a(e.fallbackBaseUrl||"")},n=e=>{let{baseUrl:t,hostName:r,token:a,checkOnly:n=!1,encodeToken:s=!0}=e,o=l({baseUrl:t,hostName:r}),i=s?encodeURIComponent(a):a;return"".concat(o,"/v3/users/rotatev2?token=").concat(i).concat(n?"&checkOnly=true":"")}},58067:(e,t,r)=>{"use strict";r.d(t,{b:()=>s,k:()=>n});var a=r(87813),l=r.n(a);let n=e=>{let t=e.replace(/\D/g,"");return t.startsWith("0")?"+84".concat(t.substring(1)):11===t.length&&t.startsWith("84")?"+".concat(t):e},s=async e=>{if(navigator.clipboard&&window.isSecureContext&&"undefined"!=typeof ClipboardItem)try{let t=new ClipboardItem({"text/plain":e.then(e=>new Blob([e],{type:"text/plain"}))});return await navigator.clipboard.write([t]),!0}catch(t){try{let t=await e;return await navigator.clipboard.writeText(t),!0}catch(e){}}try{let t=await e;return l()(t)}catch(e){return!1}}},58795:(e,t,r)=>{"use strict";r.d(t,{f:()=>l});var a=r(13744);let l=async(e,t)=>a.A.fetchApi("/api/v2/proxies/".concat(e,"/generate-token"),t).then(e=>null==e?void 0:e.token)},61606:(e,t,r)=>{"use strict";r.d(t,{A:()=>C});var a=r(95155),l=r(6259),n=r(31399),s=r(30165),o=r(50313),i=r(25559),c=r(41216),d=r(78246),x=r(12115),p=r(21669),u=r(66219),m=r(18720),h=r(34857),f=r(61362),b=r(52056),g=r(18332),w=r(52619),y=r.n(w);let v="border-[rgb(from_var(--primary)_calc(r+183)_calc(g+142)_calc(b+123))]",j="font-nunito text-[14px] leading-[19px] font-bold text-black",N="font-nunito text-[12px] leading-4 font-normal text-black";function _(e){let{isOpen:t,onClose:r}
1=e,{input:l,setInput:n,loadingRotate:s,results:c,handleFetch:d,handleCopyResults:x}=(0,h.M)();return(0,a.jsx)(u.lG,{open:t,onOpenChange:r,children:(0,a.jsx)(u.Cf,{headerClassName:"bg-transparent",showCloseButton:!1,className:"top-1/2 right-4 left-auto w-[90vw] max-w-[387px] translate-x-0 -translate-y-1/2 bg-transparent p-0 shadow-none sm:w-[387px]",children:(0,a.jsxs)("div",{className:"relative box-border flex h-[768px] max-h-[85vh] w-full flex-col items-start gap-6 rounded-2xl border-t-4 bg-white px-4 py-6 ".concat("border-[rgb(from_var(--primary)_calc(r+22)_calc(g+22)_calc(b+24))]"),children:[(0,a.jsxs)("div",{className:"box-border flex h-9 w-max shrink-0 flex-row items-center gap-2 rounded-[999px] border py-1 pr-3 pl-1 ".concat(v),children:[(0,a.jsx)("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-[999px] bg-[rgb(from_var(--primary)_calc(r+22)_calc(g+22)_calc(b+24))] p-1.5 text-white",children:(0,a.jsx)(o.F.DownloadProxyIcon,{className:"!h-4 !w-4"})}),(0,a.jsx)("span",{className:j,children:"Lấy proxy"})]}),(0,a.jsxs)("div",{className:"flex w-full shrink-0 flex-col items-start justify-center gap-4 border-t py-6 ".concat(v),children:[(0,a.jsxs)("div",{className:"flex w-full flex-col items-start gap-2",children:[(0,a.jsx)("p",{className:N,children:"Nháºp key v\xe0o \xf4 b\xean dưá»i Äá» xem th\xf4ng tin proxy hiá»n tại"}),(0,a.jsx)("p",{className:N,children:'Lấy link xoay: Sá» dụng n\xfat "Copy Link xoay" trong bảng danh s\xe1ch'}),(0,a.jsxs)("p",{className:N,children:["Tham khảo"," ",(0,a.jsx)(y(),{href:"/tai-lieu-api",className:"text-primary hover:text-primary/80 underline",children:"t\xe0i liá»u API"})," ","Äá» biết th\xeam chi tiết"]})]}),(0,a.jsxs)("div",{className:"flex w-full flex-col items-start justify-center gap-0.5",children:[(0,a.jsx)("span",{className:j,children:"Nháºp Key"}),(0,a.jsx)("textarea",{placeholder:"Key 1\nKey 2\nKey 3",value:l,onChange:e=>n(e.target.value),rows:5,wrap:"off",spellCheck:!1,disabled:s,className:"font-nunito box-border h-[199px] w-full resize-none rounded-lg border bg-[rgb(from_var(--primary)_calc(r+205)_calc(g+165)_calc(b+148))] px-2 pt-2 pb-12 text-[14px] leading-[19px] font-normal text-black placeholder:text-[rgb(from_var(--primary)_calc(r+161)_calc(g+120)_calc(b+101))] focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 ".concat(v),style:{overflow:"auto",whiteSpace:"pre",wordWrap:"normal",overflowWrap:"normal",wordBreak:"normal"}})]})]}),(0,a.jsx)("div",{className:"min-h-0 w-full flex-1 overflow-y-auto",children:c.length>0&&(0,a.jsxs)("div",{className:"flex w-full flex-col items-start gap-2",children:[(0,a.jsxs)("div",{className:"flex w-full flex-row items-center justify-between",children:[(0,a.jsxs)("span",{className:j,children:["Kết quả (",c.length,")"]}),(0,a.jsxs)(i.$,{type:"button",size:"sm",variant:"outline",onClick:x,disabled:!c.some(e=>e.proxy),className:"font-nunito h-8 rounded-[999px] border bg-white text-[12px] leading-4 font-normal text-black shadow-none hover:bg-[rgb(from_var(--primary)_calc(r+205)_calc(g+165)_calc(b+148))] hover:text-black ".concat(v),children:["Copy tất cả",(0,a.jsx)(o.F.CopyIcon,{className:"!h-4 !w-4 text-black"})]})]}),(0,a.jsx)("div",{className:"w-full space-y-1.5 rounded-lg border bg-white p-2 ".concat(v),children:c.map((e,t)=>(0,a.jsxs)("div",{className:"space-y-0.5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[e.proxy?(0,a.jsx)(f.A,{className:"h-3 w-3 flex-shrink-0 text-green-600"}):(0,a.jsx)(b.A,{className:"h-3 w-3 flex-shrink-0 text-red-500"}),(0,a.jsx)("span",{className:"font-nunito text-[12px] leading-4 font-normal text-black",title:e.key,children:e.key.length>20?"".concat(e.key.substring(0,20),"..."):e.key})]}),e.proxy?(0,a.jsxs)("div",{className:"ml-4 flex items-start gap-1",children:[(0,a.jsxs)("div",{className:"font-nunito flex-1 rounded-[999px] bg-[rgb(from_var(--primary)_calc(r+179)_calc(g+160)_calc(b+152)_/_0.8)] px-2 py-1 text-[12px] leading-4 font-normal break-all text-[rgb(from_var(--primary)_calc(r+22)_calc(g+22)_calc(b+24))]",children:[e.proxy,null!=e.timeRemaining&&(0,a.jsxs)("span",{className:"ml-1.5 font-semibold ".concat(0===e.timeRemaining?"text-green-500":"text-red-500"),children:[e.timeRemaining,"s"]}
1)]}),(0,a.jsx)(i.$,{type:"button",size:"sm",variant:"ghost",className:"h-5 w-5 flex-shrink-0 p-0",onClick:()=>{navigator.clipboard.writeText(e.proxy),m.toast.success("Ä\xe3 copy proxy!")},children:(0,a.jsx)(o.F.CopyIcon,{className:"!h-4 !w-4 text-black"})})]}):(0,a.jsx)(g.Fc,{variant:"destructive",className:"ml-4 py-0.5",children:(0,a.jsx)(g.TN,{className:"text-[12px] leading-4",children:e.error})})]},t))})]})}),(0,a.jsx)("div",{className:"flex w-full shrink-0 flex-col items-center justify-end gap-4 border-t pt-6 ".concat(v),children:(0,a.jsx)("button",{type:"button",onClick:()=>d(),disabled:s||!l.trim(),className:"font-nunito bg-primary hover:bg-primary/90 flex h-9 w-full cursor-pointer items-center justify-center gap-2 rounded-lg p-2 text-center text-[16px] leading-[22px] font-bold text-white transition-colors disabled:cursor-not-allowed disabled:opacity-50",children:s?"Äang xoay...":"Xoay"})}),(0,a.jsx)("button",{type:"button",onClick:r,"aria-label":"Ä\xf3ng",className:"absolute top-[7px] right-0.5 flex h-6 w-6 cursor-pointer items-center justify-center p-1 text-[rgb(from_var(--primary)_calc(r+66)_calc(g+28)_calc(b+16))] transition-opacity hover:opacity-70",children:(0,a.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,a.jsx)("path",{d:"M8.00104 6.93955L11.7011 3.23956L12.7614 4.2999L9.0614 7.9999L12.7614 11.6999L11.7011 12.7602L8.00104 9.06025L4.30104 12.7602L3.24072 11.6999L6.94072 7.9999L3.24072 4.2999L4.30104 3.23956L8.00104 6.93955Z",fill:"currentColor"})})})]})})})}let k=[{type:"key",label:"Copy Key"},{type:"link",label:"Copy Link xoay"},{type:"id",label:"Copy ID"}];function C(e){let{table:t,part:r="all"}=e,[u,m]=(0,x.useState)(!1),[h,f]=(0,x.useState)(""),b=(0,x.useMemo)(()=>t.getSelectedRowModel().rows.map(e=>e.original),[t.getSelectedRowModel().rows]),g=()=>{switch(h){case"fetch-proxy":return(0,a.jsx)(_,{isOpen:u,onClose:()=>m(!1)});case"change-renewal":return(0,a.jsx)(p.A,{isOpen:u,onClose:()=>m(!1),selectedProxies:b});default:return null}},w=0===b.length,y=(0,s.e)({selectedProxies:b}),v=(0,a.jsx)(c.A,{table:t,className:"w-full min-w-0"}),j=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(i.$,{onClick:()=>{m(!0),f("fetch-proxy")},className:(0,n.$6)(!1),children:[(0,a.jsx)(o.F.DownloadProxyIcon,{className:"!h-5 !w-5"}),"Lấy Proxy"]}),(0,a.jsxs)(l.rI,{modal:!1,children:[(0,a.jsx)(l.ty,{asChild:!0,children:(0,a.jsxs)(i.$,{disabled:w,className:(0,n.$6)(w),title:"Copy h\xe0ng loạt",children:[(0,a.jsx)(o.F.CopyIcon,{className:"!h-5 !w-5"}),"Copy"]})}),(0,a.jsx)(l.SQ,{align:"end",children:k.map(e=>(0,a.jsxs)(l._2,{onClick:()=>y(e.type),className:"hover:cursor-pointer",children:[(0,a.jsx)(o.F.CopyIcon,{className:"text-primary mr-1 !h-4 !w-4"}),e.label]},e.type))})]}),(0,a.jsxs)(i.$,{onClick:()=>{m(!0),f("change-renewal")},disabled:w,className:w?(0,n.$6)(!0):n.D5,children:[(0,a.jsx)(o.F.RenewCalendarIcon,{className:"!h-5 !w-5"}),"Gia hạn"]})]});return"search"===r?v:"actions"===r?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex w-full max-w-full min-w-0 flex-col gap-3 sm:flex-row sm:items-center sm:justify-between sm:gap-4",children:[(0,a.jsx)("div",{className:"flex w-full max-w-full min-w-0 flex-nowrap items-center gap-2 overflow-x-auto overscroll-x-contain pb-1 [scrollbar-width:thin] sm:w-auto sm:gap-3 sm:pb-0 [&::-webkit-scrollbar]:h-1.5",children:j}),(0,a.jsx)("div",{className:"shrink-0 self-end sm:self-auto",children:(0,a.jsx)(d.i,{table:t})})]}),g()]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.k8,{search:v,searchClassName:n.cX,...n.Q_,actions:(0,a.jsxs)(a.Fragment,{children:[j,(0,a.jsx)("div",{className:"shrink-0",children:(0,a.jsx)(d.i,{table:t})})]})}),g()]})}},66219:(e,t,r)=>{"use strict";r.d(t,{Cf:()=>d,lG:()=>o});var a=r(95155),l=r(89511);r(12115);var n=r(64269),s=r(48636);function o(e){let{...t}=e;return(0,a.jsx)(l.bL,{"data-slot":"dialog",...t})}function i(e){let{...t}=e;return(0,a.jsx)(l.ZL,{"data-slot":"dialog-portal",...t})}function c(e){let{className:t,...r}=e;return(0,a.jsx)(l.hJ,{"data-slot":"dialog-overlay",className:(0,n.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...r})}function d(e){let{className:t,children:r,showCloseButton:o=!0,title:d,description:m,titleClassName:h="",headerClassName:f="",...b}=e;return(0,a.jsxs)(i,{"data-slot":"dialog-portal",children:[(0,a.jsx)(c,{}),(0,a.jsxs)(l.UC,{"data-slot":"dialog-content",className:(0,n.cn)("bg-background 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 fixed top-[50%] left-[50%] z-50 flex w-auto max-w-[583px] translate-x-[-50%] translate-y-[-50%] flex-col rounded-[24px] border-none shadow-[0_2px_4px_0_var(--shadow-modal)] duration-200 sm:max-w-[886px]",t),...b,children:[(0,a.jsxs)(x,{className:f,children:[(0,a.jsx)(p,{className:d?"text-text-normal-template-3 h-full align-middle text-[20px] leading-[22px] font-semibold ".concat(h," "):"hidden",children:d}),m&&(0,a.jsx)(u,{children:m}),o&&(0,a.jsxs)(l.bm,{"data-slot":"dialog-close",className:"sticky-0 focus:ring-primary data-[state=open]:bg-accent data-[state=open]:text-muted-foreground z-[60] rounded-xs transition-opacity hover:cursor-pointer hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,a.jsx)(s.F.CloseIcon,{className:"!text-primary !h-6 !w-6"}),(0,a.jsx)("span",{className:"sr-only",children:"Close"})]})]}),r]})]})}function x(e){let{className:t,...r}=e;return(0,a.jsx)("div",{"data-slot":"dialog-header",className:(0,n.cn)("sticky top-0 z-50 flex h-14 w-auto flex-row items-center justify-between gap-24 rounded-t-2xl bg-[#F3EAE2] px-8 py-4 text-center sm:text-left",t),...r})}function p(e){let{className:t,...r}=e;return(0,a.jsx)(l.hE,{"data-slot":"dialog-title",className:(0,n.cn)("text-normal text-base leading-none font-semibold",t),...r})}function u(e){let{className:t,...r}=e;return(0,a.jsx)(l.VY,{"data-slot":"dialog-description",className:(0,n.cn)("text-muted-foreground text-sm",t),...r})}},68114:(e,t,r)=>{"use strict";r.d(t,{I:()=>c});var a=r(15243),l=r(66942),n=r(12115),s=r(22544),o=r(15653);let i=o.z.object({password:o.z.string().nonempty("Máºt khẩu l\xe0 bắt buá»c"),rotateInterval:o.z.number().min(0,"Thá»i gian xoay lá»n hÆ¡n 0").int({message:"Phải l\xe0 sá» nguy\xean"}).optional(),isAutoRotate:o.z.boolean()});function c(e){var t,r,o,c,d;let{selectedProxy:x,selectedProxies:p=[],onClose:u}=e,{router:m,accessToken:h,merchantId:f}=(0,a.x)(),b=null!=x?x:p[0],g=x?[x.id]:p.map(e=>e.id),w=(0,s.mN)({resolver:(0,l.u)(i),values:{password:null!=(c=null==b||null==(t=b.proxy)?void 0:t.password)?c:"",rotateInterval:null!=(d=null==b||null==(r=b.proxy)?void 0:r.rotateInterval)?d:0,isAutoRotate:(null==b||null==(o=b.proxy)?void 0:o.rotateInterval)!=0}}),y=w.watch("isAutoRotate");(0,n.useEffect)(()=>{y||w.setValue("rotateInterval",0)},[w,y]);let v=async e=>{await (0,a.C)({form:w,userProxyIds:g,values:e,accessToken:h,merchantId:f,onSuccess:()=>{m.refresh(),u()}})};return{form:w,activeProxy:b,wIsAutoRotate:y,onSubmit:w.handleSubmit(v),isSubmitting:w.formState.isSubmitting}}},69605:(e,t,r)=>{"use strict";r.d(t,{Ru:()=>x,YB:()=>d,oA:()=>c});var a=r(95155),l=r(18720),n=r(52056),s=r(61362),o=r(11821);let i=e=>(0,a.jsx)("div",{className:"toast-clamp",children:e.join("\n")}),c=e=>{let t=(0,o.f3)(e);if("success"===t.type)return void l.toast.success(t.title,{description:t.description?(0,a.jsx)("div",{className:"toast-clamp",children:t.description}):void 0,duration:5e3});l.toast.error(t.title,{description:t.description,duration:5e3,icon:(0,a.jsx)(n.A,{className:"h-4 w-4 text-red-500"})})},d=e=>{let{successMessages:t,tooSoonMessages:r,errorMessages:n}=e;t.length>0&&l.toast.success("Xoay th\xe0nh c\xf4ng ".concat(t.length," proxy"),{description:i(t),duration:5e3,icon:(0,a.jsx)(s.A,{className:"h-4 w-4 text-green-600"})}),r.length>0&&l.toast.error("C\xf3 ".concat(r.length," proxy chưa thá» xoay"),{description:i(r),duration:8e3}),n.length>0&&l.toast.error("C\xf3 ".concat(n.length," proxy xoay thất bại"),{description:i(n),duration:8e3})},x=()=>{l.toast.error("Kh\xf4ng nháºn ÄÆ°á»£c kết quả xoay proxy từ há» thá»ng")}},78246:(e,t,r)=>{"use strict";r.d(t,{i:()=>d});var a=r(95155),l=r(3998),n=r(63817),s=r(26333),o=r(64269),i=r(50313),c=r(12115);function d(e){let{table:t,icon:r,title:d}=e,x=c.useMemo(()=>t.getAllColumns().filter(e=>void 0!==e.accessorFn&&e.getCanHide()),[t]);return(0,a.jsx)("div",{className:"flex flex-wrap items-end justify-end gap-4",children:(0,a.jsxs)(s.AM,{children:[(0,a.jsx)(s.Wv,{asChild:!0,children:(0,a.jsxs)(l.$,{variant:"outline",className:"group flex h-9 flex-row items-center gap-4 roun
1ded-[999px] border border-[rgb(from_var(--primary)_calc(r+183)_calc(g+142)_calc(b+123))] bg-white px-3 py-2 text-sm leading-[19px] font-normal text-black transition-colors hover:border-[rgb(from_var(--primary)_calc(r+183)_calc(g+142)_calc(b+123))] hover:bg-[rgb(from_var(--primary)_calc(r+205)_calc(g+165)_calc(b+148))] hover:text-black",children:[d||"Hiá»n thá»",r||(0,a.jsx)("span",{className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-lg transition-colors group-hover:bg-[rgb(from_var(--primary)_calc(r+192)_calc(g+150)_calc(b+128))]",children:(0,a.jsx)(i.F.ChevronsDownIcon,{className:"h-6 w-6 text-[rgb(from_var(--primary)_calc(r+75)_calc(g+35)_calc(b+18))]"})})]})}),(0,a.jsx)(s.hl,{align:"end",className:"w-[200px] rounded-lg px-0 py-3",children:(0,a.jsx)(n.uB,{className:"rounded-none",children:(0,a.jsxs)(n.oI,{children:[(0,a.jsx)(n.xL,{children:"No columns found."}),(0,a.jsx)(n.L$,{className:"rounded-none p-0",children:x.map(e=>{var t,r;return"select"===e.id||"icon"===e.id?null:(0,a.jsxs)(n.h_,{onSelect:()=>{e.toggleVisibility(!e.getIsVisible()),0===x.filter(e=>e.getIsVisible()).length&&x.forEach(e=>e.toggleVisibility(!0))},className:"h-8 w-full justify-between gap-2 rounded-none px-4 py-[7px]",children:[(0,a.jsx)("span",{className:"truncate text-sm font-normal text-black",children:null!=(r=null==(t=e.columnDef.meta)?void 0:t.label)?r:e.id}),(0,a.jsx)(i.F.CheckIcon,{className:(0,o.cn)("!h-4 !w-4 shrink-0 text-green-600",e.getIsVisible()?"opacity-100":"opacity-0")})]},e.id)})})]})})})]})})}},86943:(e,t,r)=>{"use strict";r.d(t,{A:()=>N});var a=r(95155),l=r(6259),n=r(31399),s=r(7181),o=r(13744),i=r(50313),c=r(25559),d=r(41216),x=r(78246),p=r(11821),u=r(69605),m=r(52056),h=r(96199),f=r(20063),b=r(12115),g=r(18720),w=r(31342),y=r(21669),v=r(13438);let j=[{type:"proxy",label:"Copy Proxy"},{type:"link",label:"Copy Link xoay"},{type:"proxy-link",label:"Copy Proxy v\xe0 Link xoay"},{type:"id",label:"Copy ID"},{type:"old-id",label:"Copy ID cÅ©"}];function N(e){let{table:t,part:r="all"}=e,[N,_]=(0,b.useState)(!1),[k,C]=(0,b.useState)(""),{data:L}=(0,h.wV)(),I=(0,f.useRouter)(),A=(0,b.useMemo)(()=>t.getSelectedRowModel().rows.map(e=>e.original),[t.getSelectedRowModel().rows]),F=(0,b.useMemo)(()=>A.some(e=>{var t;return!0===e.isCdk||(null==(t=e.proxy)?void 0:t.isCdk)===!0}),[A]),S=()=>{switch(k){case"change-info":return(0,a.jsx)(v.A,{isOpen:N,onClose:()=>_(!1),selectedProxies:A});case"change-renewal":return(0,a.jsx)(y.A,{isOpen:N,onClose:()=>_(!1),selectedProxies:A});default:return null}},D=async()=>{if(0===A.length)return void g.toast.error("Vui l\xf2ng chá»n \xedt nhất má»t proxy Äá» xoay",{duration:5e3,icon:(0,a.jsx)(m.A,{className:"h-4 w-4 text-red-500"})});if(F)return void g.toast.error("Kh\xf4ng thá» xoay proxy CDK. Vui l\xf2ng bá» chá»n c\xe1c proxy CDK.",{duration:5e3,icon:(0,a.jsx)(m.A,{className:"h-4 w-4 text-red-500"})});try{let e=A.map(e=>e.id),t=await o.A.postApi("/api/v1/proxies/rotate-by-ids",{userproxiesIds:e},null==L?void 0:L.accessToken),r=(0,p.mz)(t);if(r.length>0){let{successMessages:e,tooSoonMessages:t,errorMessages:a}=(0,p.Lv)(r);(0,u.YB)({successMessages:e,tooSoonMessages:t,errorMessages:a}),(0,w.j)(e=>null==e?void 0:e.toString().startsWith("/api/v1/users/proxies")),I.refresh()}else(0,u.Ru)()}catch(s){var e,t,r,l,n;if((null==s||null==(e=s.response)?void 0:e.status)===400&&(null==s||null==(n=s.response)||null==(l=n.data)||null==(r=l.errors)||null==(t=r.msg)?void 0:t.skipped)){let e=[];s.response.data.errors.msg.skipped.forEach(t=>{e.push("".concat(t.username,": ").concat(t.reason))}),g.toast.error("Tất cả proxy Äá»u chưa tá»i thá»i gian xoay",{description:(0,a.jsx)("div",{className:"toast-clamp",children:e.join("\n")}),duration:8e3,icon:(0,a.jsx)(m.A,{className:"h-4 w-4 text-red-500"})})}else g.toast.error("C\xf3 lá»i xảy ra khi xoay proxy",{duration:5e3,icon:(0,a.jsx)(m.A,{className:"h-4 w-4 text-red-500"})})}},R=0===A.length,B=(e,t)=>()=>{if(R)return void(0,n.cN)({message:"Bạn cần chá»n \xedt nhất 1 proxy Äá» ".concat(t,".")});e()},[z,M]=(0,b.useState)(!1),P=(0,s.m)({selectedProxies:A}),V=(0,a.jsx)(d.A,{table:t,className:"w-full min-w-0"}),E=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(c.$,{onClick:B(()=>{_(!0),C("change-info")}
1,"thiết láºp"),className:(0,n.$6)(!1),children:[(0,a.jsx)(i.F.ShieldSettingIcon,{className:"!h-5 !w-5"}),"Thiết láºp"]}),(0,a.jsxs)(c.$,{onClick:B(D,"xoay"),disabled:F,className:(0,n.$6)(F),children:[(0,a.jsx)(i.F.DatabaseRotateIcon,{className:"!h-5 !w-5"}),"Xoay"]}),(0,a.jsxs)(l.rI,{modal:!1,open:z,onOpenChange:e=>{if(e&&R)return void(0,n.cN)({message:"Bạn cần chá»n \xedt nhất 1 proxy Äá» copy."});M(e)},children:[(0,a.jsx)(l.ty,{asChild:!0,children:(0,a.jsxs)(c.$,{className:(0,n.$6)(!1),title:"Copy h\xe0ng loạt",children:[(0,a.jsx)(i.F.CopyIcon,{className:"!h-5 !w-5"}),"Copy"]})}),(0,a.jsx)(l.SQ,{align:"end",children:j.map(e=>(0,a.jsxs)(l._2,{onClick:()=>P(e.type),className:"hover:cursor-pointer",children:[(0,a.jsx)(i.F.CopyIcon,{className:"text-primary mr-1 !h-4 !w-4"}),e.label]},e.type))})]}),(0,a.jsxs)(c.$,{onClick:B(()=>{_(!0),C("change-renewal")},"gia hạn"),className:n.D5,children:[(0,a.jsx)(i.F.RenewCalendarIcon,{className:"!h-5 !w-5"}),"Gia hạn"]})]});return"search"===r?V:"actions"===r?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex w-full max-w-full min-w-0 flex-col gap-3 sm:flex-row sm:items-center sm:justify-between sm:gap-4",children:[(0,a.jsx)("div",{className:"flex w-full max-w-full min-w-0 flex-nowrap items-center gap-2 overflow-x-auto overscroll-x-contain pb-1 [scrollbar-width:thin] sm:w-auto sm:gap-3 sm:pb-0 [&::-webkit-scrollbar]:h-1.5",children:E}),(0,a.jsx)("div",{className:"shrink-0 self-end sm:self-auto",children:(0,a.jsx)(x.i,{table:t})})]}),S()]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.k8,{search:V,searchClassName:n.cX,...n.Q_,actions:(0,a.jsxs)(a.Fragment,{children:[E,(0,a.jsx)("div",{className:"shrink-0",children:(0,a.jsx)(x.i,{table:t})})]})}),S()]})}},87813:(e,t,r)=>{"use strict";var a=r(92108),l={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var r,n,s,o,i,c,d,x,p=!1;t||(t={}),s=t.debug||!1;try{if(i=a(),c=document.createRange(),d=document.getSelection(),(x=document.createElement("span")).textContent=e,x.ariaHidden="true",x.style.all="unset",x.style.position="fixed",x.style.top=0,x.style.clip="rect(0, 0, 0, 0)",x.style.whiteSpace="pre",x.style.webkitUserSelect="text",x.style.MozUserSelect="text",x.style.msUserSelect="text",x.style.userSelect="text",x.addEventListener("copy",function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),void 0===r.clipboardData){s&&console.warn("unable to use e.clipboardData"),s&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var a=l[t.format]||l.default;window.clipboardData.setData(a,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))}),document.body.appendChild(x),c.selectNodeContents(x),d.addRange(c),!document.execCommand("copy"))throw Error("copy command was unsuccessful");p=!0}catch(a){s&&console.error("unable to copy using execCommand: ",a),s&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),p=!0}catch(a){s&&console.error("unable to copy using clipboardData: ",a),s&&console.error("falling back to prompt"),r="message"in t?t.message:"Copy to clipboard: #{key}, Enter",n=(/mac os x/i.test(navigator.userAgent)?"â":"Ctrl")+"+C",o=r.replace(/#{\s*key\s*}/g,n),window.prompt(o,e)}}finally{d&&("function"==typeof d.removeRange?d.removeRange(c):d.removeAllRanges()),x&&document.body.removeChild(x),i()}return p}},92108:e=>{e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,r=[],a=0;a<e.rangeCount;a++)r.push(e.getRangeAt(a));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||r.forEach(function(t){e.addRange(t)}
1),t&&t.focus()}}},96017:(e,t,r)=>{"use strict";r.d(t,{p:()=>o});var a=r(95155);r(12115);var l=r(64269);function n(e){let{direction:t}=e;return(0,a.jsx)("svg",{width:"24",height:"12",viewBox:"0 0 24 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,a.jsx)("path",{d:"up"===t?"M7 9L12 4L17 9":"M7 3L12 8L17 3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function s(e,t){var r;let a=null==(r=e.closest('[data-slot="input-stepper"]'))?void 0:r.querySelector("input");a&&("up"===t?a.stepUp():a.stepDown(),a.dispatchEvent(new Event("input",{bubbles:!0})))}function o(e){let{className:t,type:r,useCustomStepper:o=!1,disabled:i=!1,...c}=e,d="number"===r;return d&&o?(0,a.jsxs)("div",{"data-slot":"input-stepper",className:"group relative w-full",children:[(0,a.jsx)("input",{type:r,"data-slot":"input",disabled:i,className:(0,l.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 text-normal flex h-10 w-full min-w-0 bg-transparent shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","placeholder:text-icon placeholder:text-sm placeholder:font-normal","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive","border-border-input gap-2 rounded-lg border px-3 py-2.5 shadow-none","focus-visible:border-primary focus-visible:ring-primary/20 hover:border-primary/50 focus-visible:ring-[3px]","[&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",d&&"w-full",t,"pr-8"),...c}),d&&!1===i&&(0,a.jsxs)("div",{className:(0,l.cn)("pointer-events-none absolute top-1/2 right-2 flex h-6 w-6 -translate-y-1/2 flex-col items-center justify-center opacity-0 transition-opacity duration-150","group-hover:pointer-events-auto group-hover:opacity-100","group-focus-within:pointer-events-auto group-focus-within:opacity-100"),children:[(0,a.jsx)("button",{type:"button",tabIndex:-1,onMouseDown:e=>e.preventDefault(),"aria-label":"TÄng",className:"flex h-3 w-6 cursor-pointer items-center justify-center text-black transition-opacity hover:opacity-70",onClick:e=>s(e.currentTarget,"up"),children:(0,a.jsx)(n,{direction:"up"})}),(0,a.jsx)("button",{type:"button",tabIndex:-1,onMouseDown:e=>e.preventDefault(),"aria-label":"Giảm",className:"flex h-3 w-6 cursor-pointer items-center justify-center text-[rgb(from_var(--primary)_calc(r+75)_calc(g+35)_calc(b+18))] transition-opacity hover:opacity-70",onClick:e=>s(e.currentTarget,"down"),children:(0,a.jsx)(n,{direction:"down"})})]})]}):(0,a.jsx)("input",{type:r,"data-slot":"input",disabled:i,className:(0,l.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 text-normal flex h-10 w-full min-w-0 bg-transparent shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed md:text-sm","placeholder:text-icon placeholder:text-sm placeholder:font-normal","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive","border-border-template-5 gap-2 rounded-lg border px-3 py-2.5 shadow-none","focus-visible:border-primary focus-visible:ring-primary/20 hover:border-primary/50 focus-visible:ring-[3px]","truncate overflow-hidden text-ellipsis whitespace-nowrap",t),...c})}}}]);
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.