1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[16627],{3998:(e,t,l)=>{l.d(t,{$:()=>o,r:()=>i});var a=l(95155);l(12115);var s=l(32467),r=l(83101),n=l(64269);let i=(0,r.F)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-primary focus-visible:ring-primary/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",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 bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 hover:border-primary/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent 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-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function o(e){let{className:t,variant:l,size:r,asChild:o=!1,...d}=e,c=o?s.DX:"button";return(0,a.jsx)(c,{"data-slot":"button",className:(0,n.cn)(i({variant:l,size:r,className:t})),...d})}},6191:(e,t,l)=>{l.d(t,{A:()=>a});let a=(0,l(71847).A)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},9901:(e,t,l)=>{l.d(t,{R:()=>d});var a=l(13744),s=l(96199),r=l(12115),n=l(85400);let i={revalidateOnFocus:!1,revalidateOnReconnect:!1,dedupingInterval:3e5,revalidateIfStale:!1};function o(e){return"/api/v1/users/proxies?limit=1&filter=".concat(encodeURIComponent(e))}function d(){var e,t,l;let{data:d,status:c}=(0,s.wV)(),x=(0,r.useMemo)(()=>Date.now(),[]),p="status.id:$eq:number:".concat(6,";expiredAt:$gt:number:").concat(x),m="".concat(p,";expiredAt:$lte:number:").concat(x+216e5),u=e=>{let[t]=e;return a.A.fetchApi(t,null==d?void 0:d.accessToken).then(e=>null!=e?e:{}).catch(()=>({}))},{data:g,isLoading:h}=(0,n.Ay)("authenticated"===c?[o(p)]:null,u,i),{data:f,isLoading:v}=(0,n.Ay)("authenticated"===c?[o(m)]:null,u,i);return{active:null!=(e=null==g?void 0:g.total)?e:0,expiringSoon:null!=(t=null==f?void 0:f.total)?t:0,isLoading:null!=(l=h||v)&&l}}},10512:(e,t,l)=>{l.d(t,{A:()=>a});let a=(0,l(71847).A)("ShoppingCart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]])},20305:(e,t,l)=>{l.d(t,{A:()=>a});var a=(0,l(30313).A)("outline","command","IconCommand",[["path",{d:"M7 9a2 2 0 1 1 2 -2v10a2 2 0 1 1 -2 -2h10a2 2 0 1 1 -2 2v-10a2 2 0 1 1 2 2h-10",key:"svg-0"}]])},30313:(e,t,l)=>{l.d(t,{A:()=>r});var a=l(12115),s={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};let r=(e,t,l,r)=>{let n=(0,a.forwardRef)((l,n)=>{let{color:i="currentColor",size:o=24,stroke:d=2,title:c,className:x,children:p,...m}=l;return(0,a.createElement)("svg",{ref:n,...s[e],width:o,height:o,className:["tabler-icon","tabler-icon-".concat(t),x].join(" "),..."filled"===e?{fill:i}:{strokeWidth:d,stroke:i},...m},[c&&(0,a.createElement)("title",{key:"svg-title"},c),...r.map(e=>{let[t,l]=e;return(0,a.createElement)(t,l)}),...Array.isArray(p)?p:[p]])});return n.displayName="".concat(l),n}},67558:(e,t,l)=>{l.d(t,{DM:()=>o,L3:()=>n,L5:()=>i,RP:()=>s,Tq:()=>c,aN:()=>a,x8:()=>d});let a="Sá» tiá»n trong v\xed cá»§a bạn",s="VND",r="\xa0".concat(s);function n(e){let t="string"==typeof e?parseFloat(e):e;
1return isNaN(t)?"0":Math.trunc(t).toLocaleString("vi-VN")}function i(e){return"".concat(n(e)).concat(r)}let o="block min-w-0 max-w-full truncate whitespace-nowrap tabular-nums";function d(e){let t=Math.abs(Number(null!=e?e:0));return Number.isFinite(t)&&0!==t?Math.floor(Math.log10(t))+1:1}function c(e){return e>=10?{amount:"text-[clamp(13px,4cqi,22px)] font-bold tabular-nums tracking-tight leading-none",currency:"text-[clamp(11px,3cqi,15px)] font-normal leading-none",layout:"flex flex-col items-start gap-0.5 min-[1440px]:flex-row min-[1440px]:flex-wrap min-[1440px]:items-baseline min-[1440px]:gap-x-1.5"}:e>=9?{amount:"text-[clamp(14px,4.5cqi,26px)] font-bold tabular-nums tracking-tight leading-none 2xl:text-[clamp(16px,4cqi,32px)]",currency:"text-[clamp(12px,3.2cqi,17px)] font-normal leading-none 2xl:text-[clamp(13px,2.8cqi,20px)]",layout:"flex flex-col items-start gap-0.5 xl:flex-row xl:flex-wrap xl:items-baseline xl:gap-x-1.5"}:e>=7?{amount:"text-[clamp(16px,5cqi,30px)] font-bold tabular-nums tracking-tight leading-none sm:text-[26px] md:text-[30px] min-[1440px]:text-[34px] 2xl:text-[38px]",currency:"text-sm font-normal leading-none xs:text-[15px] sm:text-[17px] md:text-[19px] lg:text-[21px]",layout:"flex flex-wrap items-baseline gap-x-1 xs:gap-x-1.5 sm:gap-x-2"}:{amount:"text-[20px] font-bold tabular-nums tracking-tight leading-none xs:text-[22px] sm:text-[28px] md:text-[32px] min-[1440px]:text-[36px] 2xl:text-[40px]",currency:"text-sm font-normal leading-none xs:text-[15px] sm:text-[18px] md:text-[20px] lg:text-[22px]",layout:"flex flex-wrap items-baseline gap-x-1 xs:gap-x-1.5 sm:gap-x-2"}}},77128:(e,t,l)=>{l.d(t,{h:()=>a});function a(e){return(e||"").split(":")[0].toLowerCase().trim(),!0}},79912:(e,t,l)=>{l.r(t),l.d(t,{default:()=>T});var a=l(95155),s=l(96199),r=l(72768),n=l(75746),i=l(39180),o=l(13744),d=l(77128),c=l(64269),x=l(10512),p=l(12115),m=l(66025),u=l(59087),g=l(15239);let h={viettel:{background:"linear-gradient(108.92deg, #4A2244 2.22%, #DD4236 94.2%)",borderColor:"#FF3131",priceColor:"#FF0000",buttonBg:"#D41E1E",buttonShadow:"0px 5px 6px rgba(152, 13, 15, 0.35)",polygonGradient:"linear-gradient(137.85deg, #982728 13.74%, #842E34 89.17%)",polygonBorder:"#FF0303"},vnpt:{background:"linear-gradient(108.92deg, #031436 2.22%, #1688CF 94.2%)",borderColor:"#555BFF",priceColor:"#2B00FF",buttonBg:"#2A00FF",buttonShadow:"0px 5px 6px rgba(12, 9, 214, 0.25)",polygonGradient:"linear-gradient(141.91deg, #0D62B9 11.27%, #194278 91.84%)",polygonBorder:"#009DFF"},fpt:{background:"linear-gradient(108.92deg, #452E36 2.22%, #DE6B1B 94.2%)",borderColor:"#FF6200",priceColor:"#FF6200",buttonBg:"#FF6200",buttonShadow:"0px 5px 6px rgba(214, 105, 9, 0.25)",polygonGradient:"linear-gradient(137.85deg, #E46C16 13.74%, #B55326 89.17%)",polygonBorder:"#FF6200"},rotate:{background:"linear-gradient(108.92deg, #173C30 2.22%, #4EC52D 94.2%)",borderColor:"#31C44A",priceColor:"#48FF00",buttonBg:"#35BA00",buttonShadow:"0px 5px 6px rgba(91, 214, 9, 0.1)",polygonGradient:"linear-gradient(141.91deg, #0DB927 11.27%, #427819 91.84%)",polygonBorder:"#00FF5E"},key:{background:"linear-gradient(108.92deg, #28103B 2.22%, #42238A 94.2%)",borderColor:"#8908FA",priceColor:"#A200FF",buttonBg:"#A200FF",buttonShadow:"0px 5px 6px rgba(41, 7, 73, 0.1)",polygonGradient:"linear-gradient(141.91deg, #600DB9 11.27%, #521978 91.84%)",polygonBorder:"#A200FF"},proxyus:{background:"linear-gradient(108.92deg, #009DAC 2.22%, #01C1CB 94.2%)",borderColor:"rgba(0, 255, 242, 1)",priceColor:"#00FFF2",buttonBg:"#00FFF2",buttonShadow:"0px 5px 6px rgba(0, 255, 242, 0.35)",polygonGradient:"linear-gradient(137.85deg, #009DAC 13.74%, #01C1CB 89.17%)",polygonBorder:"#00FFF2"}};function f(){return(0,a.jsx)("svg",{width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M32 8C20.954 8 12 11.582 12 16C12 20.418 20.954 24 32 24C43.046 24 52 20.418 52 16C52 11.582 43.046 8 32 8ZM12 22V32C12 36.418 20.954 40 32 40C43.046 40 52 36.418 52 32V22C47.582 25.418 40.046 28 32 28C23.954 28 16.418 25.418 12 22ZM12 38V48C12 52.418 20.954 56 32 56C43.046 56 52 52.418 52 48V38C47.582 41.418 40.046 44 32 44C23.954 44 16.418 41.418 12 38Z",fill:"white"})})}function v(){return(0,a.jsx)("svg",{width:"54",height:"48",viewBox:"0 0 54 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M24 10.6667V2.66667C24 1.19392 25.1939 0 26.6667 0H50.6667C52.1395 0 53.3333 1.19392 53.3333 2.66667V45.3333C53.3333 46.8061 52.1395 48 50.6667 48H2.66667C1.19392 48 0 46.8061 0 45.3333V13.3333C0 11.8606 1.19392 10.6667 2.66667 10.6667H24ZM8 34.6667V40H21.3333V34.6667H8ZM32 34.6667V40H45.3333V34.6667H32ZM32 26.6667V32H45.3333V26.6667H32ZM32 18.6667V24H45.3333V18.6667H32ZM8 26.6667V32H21.3333V26.6667H8Z",fill:"white"})})}function b(){return(0,a.jsx)("svg",{width:"64",height:"64",viewBox:"0 0 64 64",f
1ill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M44 4C33.507 4 25 12.507 25 23C25 24.93 25.302 26.788 25.862 28.532L5 49.394V60H15.606L17.606 58V52H23.606L25.606 50V44H31.606L34.138 41.468C36.518 42.464 39.174 43 42 43C52.493 43 61 34.493 61 24C61 13.507 52.493 4 44 4ZM48 20C45.791 20 44 18.209 44 16C44 13.791 45.791 12 48 12C50.209 12 52 13.791 52 16C52 18.209 50.209 20 48 20Z",fill:"white"})})}function w(e){let{label:t,price:l,theme:s,onBuyClick:r,iconType:n,imageSrc:i,badgeText:o="1 proxy/1 ng\xe0y"}=e;return(0,a.jsxs)("div",{className:"relative flex flex-row items-center overflow-hidden rounded-lg px-3 py-3 sm:px-6 sm:py-4",style:{background:s.background,border:"1px solid ".concat(s.borderColor),isolation:"isolate"},children:[(0,a.jsx)("svg",{width:"82",height:"72",viewBox:"0 0 82 72",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"absolute top-0 left-0",children:(0,a.jsx)("rect",{x:"-51",y:"30.2559",width:"127",height:"52.8795",transform:"rotate(-38.6131 -51 30.2559)",fill:"white",fillOpacity:"0.02"})}),(0,a.jsxs)("svg",{width:"212",height:"162",viewBox:"0 0 212 162",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"absolute left-0",children:[(0,a.jsx)("rect",{x:"-68",y:"137.172",width:"309.54",height:"60.3921",transform:"rotate(-38.6131 -68 137.172)",fill:"url(#paint0_linear_6361_2002)",fillOpacity:"0.05"}),(0,a.jsx)("defs",{children:(0,a.jsxs)("linearGradient",{id:"paint0_linear_6361_2002",x1:"80.4926",y1:"130.852",x2:"78.9897",y2:"193.191",gradientUnits:"userSpaceOnUse",children:[(0,a.jsx)("stop",{stopColor:"white",stopOpacity:"0"}),(0,a.jsx)("stop",{offset:"1",stopColor:"white"})]})})]}),(0,a.jsx)("svg",{width:"128",height:"162",viewBox:"0 0 128 162",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"absolute right-0",children:(0,a.jsx)("rect",{y:"196.143",width:"272.51",height:"79.8904",transform:"rotate(-49.339 0 196.143)",fill:"white",fillOpacity:"0.04"})}),(0,a.jsx)("div",{className:"pointer-events-none absolute",style:{width:"100px",height:"100px",right:"6px",top:"31px",background:s.polygonGradient,clipPath:"polygon(50% 0%, 93.3% 25%, 93.3% 75%, 50% 100%, 6.7% 75%, 6.7% 25%)",zIndex:4}}),(0,a.jsx)("svg",{className:"pointer-events-none absolute",style:{width:"100px",height:"100px",right:"0px",top:"31px",zIndex:5,filter:"blur(2px)",overflow:"visible"},viewBox:"0 0 100 100",fill:"none",children:(0,a.jsx)("polygon",{points:"50,0 93.3,25 93.3,75 50,100 6.7,75 6.7,25",stroke:s.polygonBorder,strokeWidth:"1",fill:"none"})}),(0,a.jsxs)("div",{className:"relative z-[6] flex flex-col gap-2 sm:gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-1.5 sm:gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"font-mulish text-sm leading-[18px] font-bold text-white sm:text-base sm:leading-5",children:t}),i&&(0,a.jsx)(g.default,{src:i,alt:"Flag",width:24,height:16,className:"h-auto w-6 object-contain"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsxs)("div",{className:"flex flex-row items-start gap-0.5",children:[(0,a.jsx)("span",{className:"font-mulish text-base leading-5 font-bold sm:text-xl sm:leading-[25px]",style:{color:s.priceColor},children:void 0!==l?function(e){let t="string"==typeof e?parseFloat(e):e;return isNaN(t)?"0":t.toLocaleString("vi-VN")}(l):"---"}),(0,a.jsx)("span",{className:"font-mulish text-base leading-5 font-bold underline sm:text-xl sm:leading-[25px]",style:{color:s.priceColor},children:"Ä"})]}),(0,a.jsx)("div",{className:"flex w-fit items-center justify-center rounded-full px-1.5 py-0.5 sm:px-2",style:{background:"rgba(255,255,255,0.04)",border:"1px solid rgba(255,255,255,0.15)"},children:(0,a.jsx)("span",{className:"font-mulish text-xs leading-4 font-normal whitespace-nowrap text-white sm:text-base sm:leading-5",children:o})})]})]}),(0,a.jsx)("button",{type:"button",onClick:r,className:"flex w-fit cursor-pointer items-center gap-2 rounded-full px-2 py-1.5 transition-opacity hover:opacity-90 sm:px-11 sm:py-2",style:{background:s.buttonBg,boxShadow:s.buttonShadow},children:(0,a.jsx)(x.A,{className:"h-4 w-4 text-white sm:h-[17px] sm:w-[17px]"})})]}
1),(0,a.jsx)("div",{className:"relative z-[7] ml-auto hidden sm:block",children:"key"===n?(0,a.jsx)(b,{}):"static"===n?(0,a.jsx)(v,{}):(0,a.jsx)(f,{})})]})}function C(e){let{className:t}=e,l=(0,i.r)(e=>{var t;return null==(t=e.config)?void 0:t.merchantId}),[r,n]=p.useState([]),[x,g]=p.useState(!0),[f,v]=p.useState([]),[b,C]=p.useState(!0),{status:y}=(0,s.wV)(),j="authenticated"===y,N=(0,p.useRef)(null),[k,B]=(0,p.useState)(!1),[F,A]=(0,p.useState)(!1),[L,S]=(0,p.useState)(null),V=(0,i.r)(e=>e.config),M=(0,d.h)(null==V?void 0:V.hostName);(0,p.useEffect)(()=>{"authenticated"===y&&A(!1)},[y]);let _=(0,p.useCallback)(e=>{var t,l;if(!N.current)return;let a=N.current,s=(null!=(l=null==(t=a.querySelector(":scope > div"))?void 0:t.offsetWidth)?l:200)+16;a.scrollBy({left:"right"===e?s:-s,behavior:"smooth"})},[]),T=e=>{if(!j){S(e),A(!0);return}S(e),B(!0)};p.useEffect(()=>{let e=!0;return(async()=>{if(!l){e&&(n([]),g(!1));return}e&&g(!0);try{let t=await o.A.fetchApi('/api/v1/products?filters={"category":{"categorytype":{"id":1}}}',"",{headers:{"x-merchant-id":l}}).then(e=>{var t;return null!=(t=null==e?void 0:e.data)?t:[]}).catch(()=>[]);e&&n(t)}finally{e&&g(!1)}})(),()=>{e=!1}},[l]),p.useEffect(()=>{let e=!0;return(async()=>{if(!l){e&&(v([]),C(!1));return}e&&C(!0);try{let t=await o.A.fetchApi('/api/v1/products?filters={"category":{"categorytype":{"id":2}}}',"",{headers:{"x-merchant-id":l}}).then(e=>{var t;return null!=(t=null==e?void 0:e.data)?t:[]}).catch(()=>[]);e&&v(t)}finally{e&&C(!1)}})(),()=>{e=!1}},[l]);let D=e=>(r||[]).find(t=>{var l;if("us"===e.toLowerCase()){var a=t.provider;let e=null==a?void 0:a.trim().toUpperCase();return"US"===e||"USA"===e}return(null==(l=t.provider)?void 0:l.trim().toLowerCase())===e.toLowerCase()}),E=D("viettel"),I=D("vnpt"),P=D("fpt"),R=D("us"),Z=(r||[]).find(e=>{var t;return(null==(t=e.provider)?void 0:t.trim().toUpperCase())==="CMC"}),H=p.useMemo(()=>f&&0!==f.length?f.find(e=>{var t,l;return(null==(l=e.category)||null==(t=l.unit)?void 0:t.toLowerCase().trim())==="ng\xe0y"})||f[0]:null,[f]);return x||b?(0,a.jsxs)("div",{className:(0,c.cn)("flex w-full flex-col gap-4 sm:gap-6",t),children:[(0,a.jsx)("div",{className:"h-[25px] w-32 animate-pulse rounded bg-white/10"}),(0,a.jsx)("div",{className:"no-scrollbar flex gap-3 overflow-x-auto sm:gap-4",children:[1,2,3,4,5].map(e=>(0,a.jsx)("div",{className:"h-[140px] w-[50%] shrink-0 animate-pulse rounded-lg bg-white/5 sm:h-[161px] sm:w-[30%] xl:w-[calc((100%-64px)/5)]"},e))})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:(0,c.cn)("flex w-full flex-col gap-4 sm:gap-6",t),children:[(0,a.jsx)("div",{className:"flex items-center justify-between",children:(0,a.jsx)("h2",{className:"font-mulish text-base leading-5 font-bold text-white sm:text-xl sm:leading-[25px]",children:"Trang chủ"})}),(0,a.jsxs)("div",{className:"relative h-fit",children:[(0,a.jsx)("button",{type:"button",onClick:()=>_("left"),className:"absolute top-16 -left-3 z-10 flex h-8 w-8 cursor-pointer items-center justify-center rounded-full border border-white/20 transition-colors hover:border-white/40 hover:bg-white/10",children:(0,a.jsx)("svg",{width:"10",height:"16",viewBox:"0 0 10 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-white",children:(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.8473 0.350944C8.6223 0.126223 8.3173 0 7.9993 0C7.6813 0 7.3763 0.126223 7.1513 0.350944L0.351298 7.15094C0.126578 7.37595 0.000353867 7.68094 0.000353867 7.99894C0.000353867 8.31695 0.126578 8.62194 0.351298 8.84694L7.1513 15.6469C7.37878 15.8589 7.67965 15.9743 7.99053 15.9688C8.30142 15.9633 8.59803 15.8374 8.81789 15.6175C9.03775 15.3977 9.16369 15.1011 9.16918 14.7902C9.17466 14.4793 9.05927 14.1784 8.8473 13.9509L2.8953 7.99894L8.8473 2.04694C9.07202 1.82194 9.19824 1.51695 9.19824 1.19894C9.19824 0.880943 9.07202 0.575944 8.8473 0.350944Z",fill:"white"})})}),(0,a.jsxs)("div",{ref:N,className:"no-scrollbar relative flex gap-3 overflow-x-auto scroll-smooth sm:gap-4",style:{scrollSnapType:"x mandatory"},children:[(0,a.jsx)("div",{className:"w-[50%] max-w-[285px] shrink-0 sm:w-[60%] 2xl:w-[38%]",style:{scrollSnapAlign:"start"},children:(0,a.jsx)(w,{label:"Proxy tĩnh Viettel",price:null==E?void 0:E.price,theme:h.viettel,iconType:"static",onBuyClick:()=>T({title:"Proxy tĩnh Viettel",price:null==E?void 0:E.price,href:"/proxies",productId:null==E?void 0:E.id,provider:"VIETTEL",type:"static"})})}),(0,a.jsx)("div",{className:"w-[50%] max-w-[285px] shrink-0 sm:w-[60%] 2xl:w-[38%]",style:{scrollSnapAlign:"start"},children:(0,a.jsx)(w,{label:"Proxy tĩnh VNPT",price:null==I?void 0:I.price,theme:h.vnpt,iconType:"static",onBuyClick:()=>T({title:"Proxy tĩnh VNPT",price:null==I?void 0:I.price,href:"/proxies",productId:null==I?void 0:I.id,provider:"VNPT",type:"static"})})}),(0,a.jsx)("div",{className:"w-[50%] max-w-[285px] shrink-0 sm:w-[60%] 2xl:w-[38%]",style:{scrollSnapAlign:"start"},children:(0,a.jsx)(w,{label:"Proxy tĩnh FPT",price:null==P?void 0:P.price,theme:h.fpt,iconType:"static",onBuyClick:()=>T({title:"Proxy tĩnh FPT",price:null==P?void 0:P.price,href:"/proxies",productId:null==P?void 0:P.id,provider:"FPT",type:"static"})})}),M&&(0,a.jsx)("div",{className:"w-[50%] max-w-[285px] shrink-0 sm:w-[60%] 2xl:w-[38%]",style:{scrollSnapAlign:"start"},children:(0,a.jsx)(w,{label:"Proxy US ",price:null==R?void 0:R.price,theme:h.proxyus,iconType:"static",imageSrc:"/images/images-template-7/usa.png",badgeText:"1 proxy/1 th\xe1ng",onBuyClick:()=>T({title:"Proxy US",price:null==R?void 0:R.price,href:"/proxies-datacenter",productId:null==R?void 0:R.id,provider:null==R?void 0:R.provider,type:"static"})})}),M&&(0,a.jsx)("div",{className:"w-[50%] max-w-[285px] shrink-0 sm:w-[60%] 2xl:w-[38%]",style:{scrollSnapAlign:"start"},children:(0,a.jsx)(w,{label:"Datacenter VN",price:null==Z?void 0:Z.price,theme:h.proxyus,iconType:"static",imageSrc:"/images/images-template-7/vn.png",badgeText:"1 proxy/1 th\xe1ng",onBuyClick:()=>T({title:"Datacenter VN",price:null==Z?void 0:Z.price,href:"/proxies-datacenter",productId:null==Z?void 0:Z.id,provider:null==Z?void 0:Z.provider,type:"static"})})}),(0,a.jsx)("div",{className:"w-[50%] max-w-[285px] shrink-0 sm:w-[60%] 2xl:w-[38%]",style:{scrollSnapAlign:"start"},children:(0,a.jsx)(w,{label:"Proxy xoay",price:null==H?void 0:H.price,theme:h.rotate,iconType:"database",onBuyClick:()=>T({title:"Proxy xoay",price:null==H?void 0:H.price,href:"/proxies-xoay",productId:null==H?void 0:H.id,provider:null==H?void 0:H.provider,type:"rotate"})})}),(0,a.jsx)("div",{className:"w-[50%] max-w-[285px] shrink-0 sm:w-[60%] 2xl:w-[38%]",style:{scrollSnapAlign:"start"},children:(0,a.jsx)(w,{label:"Key xoay",price:null==H?void 0:H.price,theme:h.key,iconType:"key",onBuyClick:()=>T({title:"Key xoay",price:null==H?void 0:H.price,href:"/keys-xoay",productId:null==H?void 0:H.id,provider:null==H?void 0:H.provider,type:"key"})})})]}),(0,a.jsx)("button",{type:"button",onClick:()=>_("right"),className:"absolute top-16 -right-3 flex h-8 w-8 cursor-pointer items-center justify-center rounded-full border border-white/20 transition-colors hover:border-white/40 hover:bg-white/10",children:(0,a.jsx)("svg",{width:"10",height:"16",viewBox:"0 0 10 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",children:(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.350945 0.350944C0.575945 0.126223 0.880943 0 1.19894 0C1.51695 0 1.82194 0.126223 2.04694 0.350944L8.84694 7.
115094C9.07166 7.37595 9.19789 7.68094 9.19789 7.99894C9.19789 8.31695 9.07166 8.62194 8.84694 8.84694L2.04694 15.6469C1.81946 15.8589 1.51859 15.9743 1.20771 15.9688C0.896827 15.9633 0.600211 15.8374 0.38035 15.6175C0.160489 15.3977 0.0345486 15.1011 0.0290634 14.7902C0.0235783 14.4793 0.138977 14.1784 0.350945 13.9509L6.30294 7.99894L0.350945 2.04694C0.126224 1.82194 0 1.51695 0 1.19894C0 0.880943 0.126224 0.575944 0.350945 0.350944Z",fill:"white"})})})]})]}),(0,a.jsx)(m.A,{open:k,onClose:()=>B(!1),payload:(()=>{if(!(null==L?void 0:L.productId))return{products:[],total:0};let e={product:{id:L.productId},quantity:1,dayOfUse:1,protocolType:"HTTP",user:btoa(Math.random().toString()).substring(10,18).toLowerCase(),password:btoa(Math.random().toString()).substring(12).toLowerCase(),provider:L.provider};return"static"===L.type?{products:[{...e,prefix_ip:""}],total:L.price}:"rotate"===L.type?{products:[{...e,rotateInterval:0,isAutoRotate:!1,isCdk:!1}],total:L.price}:{products:[{...e,rotateInterval:0,isAutoRotate:!1,isCdk:!0}],total:L.price}})(),redirect:(null==L?void 0:L.href)||"/proxies"}),F&&(0,a.jsx)(u.A,{onCallBack:()=>{A(!1),L&&"authenticated"===y&&B(!0)}})]})}var y=l(85400),j=l(9901),N=l(20063),k=l(97834);function B(e){let{icon:t,iconBg:l,label:s,labelColor:r,value:n,background:i}=e;return(0,a.jsxs)("div",{className:"flex flex-row items-center gap-3 rounded-2xl p-3 sm:flex-col sm:items-start sm:gap-2 sm:p-4",style:{background:i,boxShadow:"0px 4px 6px rgba(0,0,0,0.25)"},children:[(0,a.jsx)("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full sm:h-9 sm:w-9",style:{background:l},children:t}),(0,a.jsxs)("div",{className:"flex flex-col gap-0.5 sm:gap-1",children:[(0,a.jsx)("span",{className:"font-mulish text-xs leading-[14px] font-normal sm:text-base sm:leading-5",style:{color:r},children:s}),(0,a.jsx)("span",{className:"font-mulish overflow-x-auto text-sm leading-4 font-bold text-white sm:text-lg sm:leading-[23px] md:max-w-[100px] xl:max-w-none",children:n})]})]})}function F(e){var t,l;let{isAuthenticated:s,className:r}=e,i=(0,n.k)(e=>e.user);(0,N.useRouter)();let[o,d]=p.useState("info"),[x,m]=p.useState(!1),[h,f]=p.useState(!1),[v,b]=p.useState("login"),{active:w,expiringSoon:C}=(0,j.R)(),{data:F}=(0,y.Ay)("user-ip",()=>fetch("https://api.ipify.org?format=json").then(e=>e.json()).then(e=>e.ip).catch(()=>null),{revalidateOnFocus:!1,revalidateOnReconnect:!1,dedupingInterval:6e5}),A=[null==i?void 0:i.firstName,null==i?void 0:i.lastName].filter(Boolean).join(" ")||(null==i?void 0:i.userName)||"-";return[null==i||null==(t=i.firstName)?void 0:t[0],null==i||null==(l=i.lastName)?void 0:l[0]].filter(Boolean).join("").toUpperCase(),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:(0,c.cn)("flex w-full flex-col gap-6",r),children:[(0,a.jsx)("h2",{className:"font-mulish text-base leading-5 font-bold text-white sm:text-xl sm:leading-[25px]",children:"Th\xf4ng tin t\xe0i khoản"}),(0,a.jsxs)("div",{className:"relative flex flex-col gap-4 roun
1ded-2xl bg-[#1D1D3B] p-3 sm:gap-6 sm:p-6 lg:flex-row",children:[(0,a.jsx)("div",{className:"pointer-events-none absolute inset-0 rounded-2xl border border-transparent [background:linear-gradient(#111137,#111137)_padding-box,linear-gradient(135deg,rgb(from_var(--primary)_calc(r-83)_calc(g+176)_b/0.2),rgb(from_var(--primary)_calc(r+3)_calc(g+92)_b/0.2))_border-box]"}),(0,a.jsxs)("div",{className:"relative z-10 flex h-fit flex-1 flex-col gap-4 rounded-2xl bg-[#111137] p-3 sm:gap-6 sm:p-4",children:[(0,a.jsx)("div",{className:"pointer-events-none absolute inset-0 rounded-2xl border border-transparent [background:linear-gradient(#111137,#111137)_padding-box,linear-gradient(135deg,rgb(from_var(--primary)_calc(r-83)_calc(g+176)_b/0.2),rgb(from_var(--primary)_calc(r+3)_calc(g+92)_b/0.2))_border-box]"}),(0,a.jsxs)("div",{className:(0,c.cn)("z-10 flex gap-3 p-2 sm:gap-4 sm:p-4",s?"flex-row items-center":"flex-col items-start justify-start"),style:{borderBottom:"1px solid",borderImage:"linear-gradient(to right, rgb(from var(--primary) calc(r - 83) calc(g + 176) b/0.2), rgb(from var(--primary) calc(r + 3) calc(g + 92) b/0.2)) 1"},children:[(0,a.jsx)("div",{className:"flex shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-[#6938EB] to-[#9D17EC]",children:(0,a.jsx)(g.default,{src:s?"/images/images-template-11/avatar.webp":"/images/images-template-11/avatar2.webp",alt:"avatar",width:80,height:80,className:"border-primary h-16 w-16 rounded-full border md:h-20 md:w-20"})}),s?(0,a.jsx)("span",{className:"font-mulish flex-1 truncate text-base leading-5 font-bold text-white sm:text-lg sm:leading-[23px]",children:A}):(0,a.jsxs)("div",{className:"flex w-full min-w-0 flex-row flex-nowrap items-center justify-start gap-2 sm:gap-3",children:[(0,a.jsx)("button",{type:"button",onClick:()=>{b("register"),f(!0)},className:"font-mulish flex h-9 shrink-0 cursor-pointer items-center justify-center rounded-lg px-3 text-xs leading-[18px] font-bold whitespace-nowrap text-white sm:px-5 sm:text-sm sm:leading-5 md:text-base",style:{background:"var(--button-template-11)",boxShadow:"0px 4px 4px rgb(from var(--primary) calc(r - 12) g b / 0.1)"},children:"ÄÄng k\xfd"}),(0,a.jsx)("div",{className:"shrink-0 rounded-lg p-px",style:{background:"var(--border-template-11)"},children:(0,a.jsx)("button",{type:"button",onClick:()=>{b("login"),f(!0)},className:"font-mulish text-primary flex h-[34px] shrink-0 cursor-pointer items-center justify-center rounded-[7px] bg-[#111137] px-3 text-xs leading-[18px] font-bold whitespace-nowrap sm:h-9 sm:px-5 sm:text-sm sm:leading-5 md:text-base",children:"ÄÄng nháºp"})})]})]}),(0,a.jsxs)("div",{className:"z-10 flex flex-col gap-3 px-2 sm:gap-4 sm:px-4",children:[(0,a.jsxs)("div",{className:"flex flex-row items-center justify-between",children:[(0,a.jsx)("span",{className:"font-mulish text-base leading-5 font-bold text-white sm:text-lg sm:leading-[23px]",children:"Th\xf4ng tin c\xe1 nh\xe2n"}),s?(0,a.jsxs)("button",{type:"button",onClick:()=>{d("info"),m(!0)},className:"flex cursor-pointer items-center gap-1.5 rounded-lg px-2 py-1 sm:gap-2.5 sm:px-2.5",style:{background:"linear-gradient(83.75deg, rgb(from var(--primary) calc(r - 56) calc(g + 56) calc(b - 20)) 48.61%, rgb(from var(--primary) calc(r - 4) calc(g + 23) calc(b - 19)) 92.68%)",boxShadow:"0px 4px 4px rgb(from var(--primary) calc(r - 12) g b / 0.1)"},children:[(0,a.jsx)("span",{className:"font-mulish text-sm leading-4 font-normal text-white sm:text-base sm:leading-5",children:"Edit"}),(0,a.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 sm:h-5 sm:w-5",children:[(0,a.jsx)("path",{d:"M5.43327 13.9172L6.69527 10.7622C6.89641 10.2596 7.19749 9.80302 7.58027 9.42018L14.5003 2.50218C14.8981 2.10436 15.4377 1.88086 16.0003 1.88086C16.5629 1.88086 17.1024 2.10436 17.5003 2.50218C17.8981 2.9 18.1216 3.43957 18.1216 4.00218C18.1216 4.56479 17.8981 5.10435 17.5003 5.50218L10.5803 12.4202C10.1973 12.8032 9.74027 13.1052 9.23727 13.3062L6.08327 14.5682C5.9924 14.6046 5.89286 14.6135 5.79699 14.5938C5.70111 14.5741 5.61311 14.5267 5.54391 14.4575C5.4747 14.3883 5.42733 14.3003 5.40766 14.2045C5.38799 14.1086 5.39
169 14.009 5.43327 13.9182V13.9172Z",fill:"white"}),(0,a.jsx)("path",{d:"M3.5 5.75C3.5 5.06 4.06 4.5 4.75 4.5H10C10.1989 4.5 10.3897 4.42098 10.5303 4.28033C10.671 4.13968 10.75 3.94891 10.75 3.75C10.75 3.55109 10.671 3.36032 10.5303 3.21967C10.3897 3.07902 10.1989 3 10 3H4.75C4.02065 3 3.32118 3.28973 2.80546 3.80546C2.28973 4.32118 2 5.02065 2 5.75V15.25C2 15.9793 2.28973 16.6788 2.80546 17.1945C3.32118 17.7103 4.02065 18 4.75 18H14.25C14.9793 18 15.6788 17.7103 16.1945 17.1945C16.7103 16.6788 17 15.9793 17 15.25V10C17 9.80109 16.921 9.61032 16.7803 9.46967C16.6397 9.32902 16.4489 9.25 16.25 9.25C16.0511 9.25 15.8603 9.32902 15.7197 9.46967C15.579 9.61032 15.5 9.80109 15.5 10V15.25C15.5 15.94 14.94 16.5 14.25 16.5H4.75C4.06 16.5 3.5 15.94 3.5 15.25V5.75Z",fill:"white"})]})]}):null]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4 rounded-lg p-3 sm:flex-wrap sm:justify-between sm:gap-6 sm:p-4 xl:flex-row",style:{background:"rgba(255, 255, 255, 0.1)"},children:[(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("span",{className:"font-mulish text-sm leading-4 font-normal text-[#B6B6B7] sm:text-base sm:leading-5",children:"T\xean Äầy Äá»§"}),(0,a.jsx)("span",{className:"font-mulish text-sm leading-4 font-bold text-white sm:text-base sm:leading-5",children:A})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("span",{className:"font-mulish text-sm leading-4 font-normal text-[#B6B6B7] sm:text-base sm:leading-5",children:"Email"}),(0,a.jsx)("span",{className:"font-mulish truncate text-sm leading-4 font-bold text-white sm:text-base sm:leading-5",children:(null==i?void 0:i.email)||"-"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("span",{className:"font-mulish text-sm leading-4 font-normal text-[#B6B6B7] sm:text-base sm:leading-5",children:"Äiá»n thoại"}),(0,a.jsx)("span",{className:"font-mulish text-sm leading-4 font-bold text-white sm:text-base sm:leading-5",children:(null==i?void 0:i.phone)||"-"})]})]})]})]}),(0,a.jsxs)("div",{className:"z-10 grid grid-cols-1 gap-2 sm:grid-cols-3 sm:gap-4 lg:flex lg:w-[265px] lg:flex-col",children:[(0,a.jsx)(B,{icon:(0,a.jsx)("svg",{width:"14",height:"17",viewBox:"0 0 14 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.69 16.933L6.693 16.934C6.89 17.02 7 17 7 17C7 17 7.11 17.02 7.308 16.934L7.31 16.933L7.316 16.93L7.334 16.922C7.42893 16.8779 7.52263 16.8312 7.615 16.782C7.801 16.686 8.061 16.542 8.372 16.349C8.992 15.965 9.817 15.383 10.646 14.584C12.302 12.988 14 10.493 14 7C14 6.08075 13.8189 5.1705 13.4672 4.32122C13.1154 3.47194 12.5998 2.70026 11.9497 2.05025C11.2997 1.40024 10.5281 0.884626 9.67878 0.532843C8.8295 0.18106 7.91925 0 7 0C6.08075 0 5.1705 0.18106 4.32122 0.532843C3.47194 0.884626 2.70026 1.40024 2.05025 2.05025C1.40024 2.70026 0.884626 3.47194 0.532843 4.32122C0.18106 5.1705 -1.36979e-08 6.08075 0 7C0 10.492 1.698 12.988 3.355 14.584C4.04875 15.2503 4.8106 15.8419 5.628 16.349C5.94459 16.5456 6.27029 16.7271 6.604 16.893L6.666 16.922L6.684 16.93L6.69 16.933ZM7 9.25C7.59674 9.25 8.16903 9.01295 8.59099 8.59099C9.01295 8.16903 9.25 7.59674 9.25 7C9.25 6.40326 9.01295 5.83097 8.59099 5.40901C8.16903 4.98705 7.59674 4.75 7 4.75C6.40326 4.75 5.83097 4.98705 5.40901 5.40901C4.98705 5.83097 4.75 6.40326 4.75 7C4.75 7.59674 4.98705 8.16903 5.40901 8.59099C5.83097 9.01295 6.40326 9.25 7 9.25Z",fill:"white"})}),iconBg:"#F5BD5B",label:"Äá»a chá» IP",labelColor:"#F5BD5B",value:F||"---",background:"linear-gradient(77.73deg, rgba(255,218,51,0) 57.27%, rgba(255,171,25,0.28) 98.51%), #000000"}),(0,a.jsx)(B,{icon:(0,a.jsx)("svg",{width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.339 0.122295C8.24371 0.0432577 8.1238 0 8 0C7.8762 0 7.75629 0.0432577 7.661 0.122295C5.66352 1.78431 3.17862 2.74976 0.583001 2.87229C0.466048 2.87589 0.354061 2.9204 0.266537 2.99805C0.179013 3.07571 0.121497 3.1816 0.104001 3.29729C0.0345536 3.82378 -0.000188118 4.35425 7.66031e-07 4.88529C7.66031e-07 10.0483 3.26 14.4493 7.834 16.1423C7.94114 16.1818 8.05886 16.1818 8.166 16.1423C12.74 14.4493 16 10.0483 16 4.88529C16 4.34729 15.965 3.81629 15.896 3.29629C15.8785 3.18044 15.8208 3.07442 15.7331 2.99674C15.6454 2.91906 15.5331 2.87466 15.416 2.87129C12.8207 2.74855 10.3362 1.78411 8.339 0.122295ZM8 3.88529C8.19891 3.88529 8.38968 3.96431 8.53033 4.10496C8.67098 4.24562 8.75 4.43638 8.75 4.63529V8.13529C8.75 8.33421 8.67098 8.52497 8.53033 8.66562C8.38968 8.80628 8.19891 8.88529 8 8.88529C7.80109 8.88529 7.61032 8.80628 7.46967 8.66562C7.32902 8.52497 7.25 8.33421 7.25 8.13529V4.63529C7.25 4.43638 7.32902 4.24562 7.46967 4.10496C7.61032 3.96431 7.80109 3.88529 8 3.88529ZM8 12.8853C8.26522 12.8853 8.51957 12.7799 8.70711 12.5924C8.89464 12.4049 9 12.1505 9 11.8853C9 11.6201 8.89464 11.3657 8.70711 11.1782C8.51957 10.9907 8.26522 10.8853 8 10.8853C7.73478 10.8853 7.48043 10.9907 7.29289 11.1782C7.10536 11.3657 7 11.6201 7 11.8853C7 12.1505 7.10536 12.4049 7.29289 12.5924C7.48043 12.7799 7.73478 12.8853 8 12.8853Z",fill:"white"})}),iconBg:"#2CEDD4",label:"Proxy Äang hoạt Äá»ng",labelColor:"#2CEDD4",value:s?"".concat(w," Proxy"):"---",background:"linear-gradient(77.73deg, rgba(44,237,212,0) 57.27%, rgba(44,237,212,0.28) 98.51%), #000000"}),(0,a.jsx)(B,{icon:(0,a.jsx)("svg",{width:"17",height:"15",viewBox:"0 0 17 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.5173 0.87525C7.1903 -0.29175 8.8743 -0.29175 9.5473 0.87525L15.8273 11.7502C16.5003 12.9172 15.6573 14.3752 14.3113 14.3752H1.7523C0.405304 14.3752 -0.436697 12.9172 0.237303 11.7502L6.5173 0.87525ZM8.0323 3.38025C8.23122 3.38025 8.42198 3.45927 8.56263 3.59992C8.70329 3.74057 8.7823 3.93134 8.7823 4.13025V7.63025C8.7823 7.82916 8.70329 8.01993 8.56263 8.16058C8.42198 8.30123 8.23122 8.38025 8.0323 8.38025C7.83339 8.38025 7.64263 8.30123 7.50197 8.16058C7.36132 8.01993 7.2823 7.82916 7.2823 7.63025V4.13025C7.2823 3.93134 7.36132 3.74057 7.50197 3.59992C7.64263 3.45927 7.83339 3.38025 8.0323 3.38025ZM8.0323 12.3802C8.29752 12.3802 8.55187 12.2749 8.73941 12.0874C8.92695 11.8998 9.0323 11.6455 9.0323 11.3802C9.0323 11.115 8.92695 10.8607 8.73941 10.6731C8.55187 10.4856 8.29752 10.3802 8.0323 10.3802C7.76709 10.3802 7.51273 10.4856 7.3252 10.6731C7.13766 10.8607 7.0323 11.115 7.0323 11.3802C7.0323 11.6455 7.13766 11.8998 7.3252 12.0874C7.51273 12.2749 7.76709 12.3802 8.0323 12.3802Z",fill:"white"})}),iconBg:"#FF3E31",label:"Proxy sắp hết hạn",labelColor:"#FF3E31",value:s?"".concat(C," Proxy"):"---",background:"linear-gradient(77.73deg, rgba(255,62,49,0) 57.27%, rgba(255,62,49,0.28) 98.51%), #000000"})]})]})]}),(0,a.jsx)(k.A,{isOpen:x,onClose:()=>m(!1),initialTab:o}),h&&(0,a.jsx)(u.A,{initFormType:v,onCallBack:()=>f(!1)},v)]})}var A=l(6191),L=l(27937),S=l(63432),V=l(98281),M=l(67558);function _(e){var t;let{isAuthenticated:l,balance:r,className:n,appConfig:i}=e,{data:d,status:x}=(0,s.wV)(),m=(0,N.useRouter)(),[g,h]=(0,p.useState)(!1),[f,v]=(0,p.useState)(!1),{data:b,isLoading:w}=(0,y.Ay)("authenticated"===x?["/api/v1/transactions",'?page=1&limit=6&sort=[{"orderBy":"createdAt","order":"desc"}]']:null,e=>{let[t,l]=e;return o.A.fetchApi(t+l,null==d?void 0:d.accessToken).then(e=>null!=e?e:{}).catch(()=>({}))},{revalidateOnFocus:!1,revalidateOnReconnect:!1,dedupingInterval:6e4}),C=(null!=(t=null==b?void 0:b.data)?t:[]).slice(0,6);
1return(0,a.jsx)("div",{className:(0,c.cn)("rounded-2xl p-[1px] xl:col-span-1 xl:shrink-0",n),style:{background:"linear-gradient(180deg, rgb(from var(--primary) calc(r - 83) calc(g + 176) b) 20%, rgb(from var(--primary) calc(r + 3) calc(g + 92) b) 80%)"},children:(0,a.jsxs)("div",{className:"flex h-full w-full flex-col gap-4 rounded-[15px] bg-[#1D1D3B] p-4 sm:gap-6 sm:p-9",children:[(0,a.jsx)(V.A,{isOpen:g,onClose:()=>h(!1)}),(0,a.jsx)("h2",{className:"font-mulish text-base leading-5 font-bold text-white sm:text-xl sm:leading-[25px]",children:"V\xed cá»§a bạn"}),(0,a.jsxs)("div",{className:"relative h-[148px] sm:h-[168px]",children:[(0,a.jsx)("div",{className:"absolute rounded-2xl",style:{width:"78%",height:"90px",top:"-5%",left:"50%",transform:"translateX(-50%)",background:"#33195B",border:"1px solid rgba(162, 0, 255, 0.2)"}}),(0,a.jsx)("div",{className:"absolute rounded-2xl",style:{width:"92%",height:"90px",top:"10px",left:"50%",transform:"translateX(-50%)",background:"#442571",border:"1px solid rgb(from var(--primary) r g b / 0.4)"}}),(0,a.jsxs)("div",{className:"border-primary absolute -bottom-1 left-0 flex w-full flex-col gap-3 overflow-hidden rounded-2xl border p-3 sm:gap-4 sm:p-4",style:{height:"143px",background:"linear-gradient(268.61deg, rgba(0,0,0,0) 0.52%, rgba(41,0,75,0.396154) 39.74%, #44007B 100%), #1D1D3B"},children:[(0,a.jsxs)("div",{className:"relative z-[1] flex flex-col gap-3 sm:gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-1 sm:gap-2",children:[(0,a.jsx)("div",{className:"flex w-fit items-center justify-center rounded-full px-2 py-0.5 sm:py-1",style:{background:"rgba(255,255,255,0.1)"},children:(0,a.jsx)("span",{className:"font-mulish text-xs leading-4 font-normal text-white sm:text-sm sm:leading-[18px]",children:"Tá»ng sá» tiá»n"})}),(0,a.jsxs)("div",{className:"flex flex-row items-baseline gap-1",children:[(0,a.jsx)("span",{className:"font-mulish text-lg leading-[22px] font-bold text-white tabular-nums sm:text-xl sm:leading-[25px]",children:l?(0,M.L3)(r):"---"}),(0,a.jsx)("span",{className:"font-mulish text-sm leading-[18px] font-normal text-white sm:text-base sm:leading-[20px]",children:M.RP})]})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>{if(!l)return void v(!0);h(!0)},className:"flex w-fit cursor-pointer items-center gap-1.5 rounded-lg px-2 py-1.5 sm:gap-2 sm:px-2.5 sm:py-2",style:{background:"linear-gradient(83.75deg, rgb(from var(--primary) calc(r - 56) calc(g + 56) calc(b - 20)) 48.61%, rgb(from var(--primary) calc(r - 4) calc(g + 23) calc(b - 19)) 92.68%)",boxShadow:"0px 4px 4px rgb(from var(--primary) calc(r - 12) g b / 0.1)"},children:[(0,a.jsx)("span",{className:"font-mulish text-sm leading-4 font-bold text-white sm:text-base sm:leading-5",children:"Nạp tiá»n"}),(0,a.jsx)(A.A,{className:"h-4 w-4 text-white sm:h-5 sm:w-5"})]})]}),(0,a.jsxs)("svg",{width:"82",height:"78",viewBox:"0 0 82 78",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"pointer-events-none absolute right-2 bottom-4",children:[(0,a.jsx)("path",{d:"M0.668969 31.7426C2.21903 29.0802 4.59453 26.9955 7.43564 25.8043L54.6646 5.91741C57.6173 4.67412 60.7536 4.50264 63.6409 5.22677C63.2056 4.19307 62.571 3.25522 61.7733 2.46678C60.9756 1.67833 60.0304 1.05473 58.9917 0.63157C57.953 0.208412 56.8411 -0.00601302 55.7195 0.000538338C54.598 0.0070897 53.4886 0.234489 52.4549 0.669753L5.22599 20.5566C3.13834 21.4357 1.48539 23.108 0.630787 25.2058C-0.22382 27.3036 -0.210085 29.6549 0.668969 31.7426ZM5.08827 42.2379C6.63834 39.5755 9.01383 37.4908 11.8549 36.2996L59.0839 16.4127C62.0366 15.1694 65.1729 14.998 68.0602 15.7221C67.625 14.6884 66.9904 13.7505 66.1926 12.9621C65.3949 12.1737 64.4497 11.5501 63.411 11.1269C62.3723 10.7037 61.2604 10.4893 60.1388 10.4959C59.0173 10.5024 57.9079 10.7298 56.8742 11.1651L9.64529 31.0519C7.55764 31.931 5.9047 33.6034 5.05009 35.7011C4.19548 37.7989 4.20922 40.1503 5.08827 42.2379ZM27.1837 36.0231C28.1116 35.6324 29.1566 35.6263 30.089 36.0062C31.0213 36.386 31.7646 37.1206 32.1553 38.0485C32.9367 39.9042 34.4232 41.3734 36.2879 42.1331C38.1526 42.8927 40.2427 42.8805 42.0984 42.0992C43.9541 41.3178 45.4233 39.8312 46.183 37.9665C46.9426 36.1018 46.9304 34.0118 46.1491 32.1561C45.7584 31.2282 45.7523 30.1832 46.1321 29.2508C46.5119 28.3185 47.2465 27.5752 48.1744 27.1845L61.2935 21.6604C62.3272 21.2251 63.4366 20.9977 64.5581 20.9912C65.6797 20.9846 66.7916 21.1991 67.8303 21.6222C68.869 22.0454 69.8142 22.669 70.6119 23.4574C71.4097 24.2459 72.0443 25.1837 72.4795 26.2174L80.5816 45.4588C81.0168 46.4925 81.2442 47.6018 81.2508 48.7234C81.2573 49.845 81.0429 50.9569 80.6198 51.9956C80.1966 53.0343 79.573 53.9795 78.7845 54.7772C77.9961 55.5749 77.0583 56.2095 76.0246 56.6448L28.7956 76.5317C26.708 77.4107 24.3566 77.4245 22.2588 76.5699C20.161 75.7152 18.4887 74.0623 17.6096 71.9747L9.50757 52.7332C8.62852 50.
16456 8.61479 48.2942 9.46939 46.1965C10.324 44.0987 11.9769 42.4263 14.0646 41.5473L27.1837 36.0231Z",fill:"url(#paint0_linear_6361_9982)",fillOpacity:"0.57"}),(0,a.jsx)("defs",{children:(0,a.jsxs)("linearGradient",{id:"paint0_linear_6361_9982",x1:"28.8405",y1:"10.6132",x2:"52.4101",y2:"66.5882",gradientUnits:"userSpaceOnUse",children:[(0,a.jsx)("stop",{stopColor:"#CE73FF",stopOpacity:"0.1"}),(0,a.jsx)("stop",{offset:"1",stopColor:"#A805FF",stopOpacity:"0.9"})]})})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-row items-center justify-between border-t border-white/10 pt-3 sm:pt-4",children:[(0,a.jsx)("span",{className:"font-mulish text-base leading-5 font-bold text-white sm:text-xl sm:leading-[25px]",children:"Lá»ch sá» giao dá»ch"}),(0,a.jsxs)("button",{type:"button",onClick:()=>m.push("/lich-su"),className:"flex cursor-pointer items-center gap-0",children:[(0,a.jsx)("span",{className:"font-mulish text-primary text-sm leading-[18px] font-normal",children:"View All"}),(0,a.jsx)(L.A,{className:"text-primary h-5 w-5"})]})]}),(0,a.jsx)("div",{className:"flex flex-col gap-3 sm:gap-4",children:l?w?Array.from({length:3}).map((e,t)=>(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:gap-3",children:[(0,a.jsxs)("div",{className:"flex flex-row items-center justify-between gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"h-8 w-8 shrink-0 animate-pulse rounded-full bg-white/10 sm:h-9 sm:w-9"}),(0,a.jsx)("div",{className:"h-4 flex-1 animate-pulse rounded bg-white/10"}),(0,a.jsx)("div",{className:"h-4 w-16 animate-pulse rounded bg-white/10"})]}),(0,a.jsxs)("div",{className:"flex flex-row items-center justify-between",children:[(0,a.jsx)("div",{className:"h-3 w-20 animate-pulse rounded bg-white/10"}),(0,a.jsx)("div",{className:"h-5 w-16 animate-pulse rounded-full bg-white/10"})]}),t<2&&(0,a.jsx)("div",{className:"w-full",style:{height:"1px",background:"rgba(255, 255, 255, 0.1)"}})]},t)):0===C.length?(0,a.jsx)("div",{className:"flex items-center justify-center py-6 sm:py-8",children:(0,a.jsx)("span",{className:"font-mulish text-sm text-white/50",children:"Chưa c\xf3 giao dá»ch n\xe0o"})}):C.map((e,t)=>{var l,s=e.status;let r=(null==s||null==(l=s.name)?void 0:l.toLowerCase())||"";r.includes("success")||r.includes("th\xe0nh c\xf4ng")||(null==s?void 0:s.id)===6||r.includes("pending")||r.includes("chá»")||(null==s?void 0:s.id)===1||r.includes("fail")||r.includes("thất bại")||null==s||s.name;let n=function(e){let t=null==e?void 0:e.gateway,l=null==e?void 0:e.type;return"PAY2S"===t?S.F.CardIcon:4===l?S.F.GiftIcon:5===l?S.F.RefundIcon:S.F.CartIcon}(e);return(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:gap-3",children:[(0,a.jsxs)("div",{className:"flex flex-row items-center justify-between gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full sm:h-9 sm:w-9",style:{background:"rgb(from var(--primary) calc(r + 1) g b / 0.2)"},children:(0,a.jsx)(n,{className:"h-4 w-4 text-white sm:h-5 sm:w-5"})}),(0,a.jsx)("span",{className:"font-mulish flex w-full flex-1 justify-center text-sm leading-[18px] font-bold text-white",children:function(e){switch(e){case 1:return"Nạp tiá»n";case 2:return"Mua h\xe0ng";case 4:return"Bonus";case 5:return"Ho\xe0n tiá»n";default:return"Giao dá»ch"}}(e.type)}),(0,a.jsxs)("span",{className:"font-mulish text-sm leading-[18px] font-normal text-white",children:[(0,M.L3)(e.amount)," Ä"]})]}),t<C.length-1&&(0,a.jsx)("div",{className:"w-full",style:{height:"1px",background:"rgba(255, 255, 255, 0.1)"}})]},e.id||t)}):(0,a.jsx)("div",{className:"flex items-center justify-center py-6 sm:py-8",children:(0,a.jsx)("span",{className:"font-mulish text-sm text-white/50",children:"ÄÄng nháºp Äá» xem giao dá»ch"})})}),f&&(0,a.jsx)(u.A,{onCallBack:()=>{v(!1),l&&h(!0)}})]})})}function T(){var e,t,l,o;let{status:d}=(0,s.wV)(),c="authenticated"===d,x=(0,n.k)(e=>e.user),p=(0,i.r)(e=>e.config);return(0,a.jsx)(r.A,{openMarqueeTop:!0,children:(0,a.jsxs)("div",{className:"grid h-full w-full grid-cols-1 gap-4 pb-4 sm:gap-6 sm:pb-6 md:pb-8 xl:grid-cols-3",children:[(0,a.jsxs)("div",{className:"flex flex-1 flex-col gap-4 sm:gap-6 xl:col-span-2 xl:min-w-0",children:[(0,a.jsx)(C,{}),(0,a.jsx)(F,{isAuthenticated:c})]}),(0,a.jsx)(_,{isAuthenticated:c,balance:Number((null==x?void 0:x.coin)||0)+(null!=(o=null!=(l=null==x||null==(e=x.merchant)?void 0:e.promotionAmountRemaining)?l:null==x||null==(t=x.merchant)?void 0:t.amountRemaining)?o:0),appConfig:p})]})})}}}]);
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.