@momo-webplatform/mobase 0.2.109 → 0.2.110
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +3 -3
package/dist/esm/index.js
CHANGED
|
@@ -67,7 +67,7 @@ import*as Qo from"react";import{ChevronDownIcon as nc}from"@heroicons/react/20/s
|
|
|
67
67
|
transform: translate3d(0, 30%, 0);
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
`})]}),oo=({className:e,children:o,title:t,shortTitle:a,qrImage:r,qrLink:n,logoQr:s,isQrForAll:l=!1,...m})=>D(Se,{...m,children:D(we,{className:i("h-auto max-h-screen overflow-hidden border-0 md:max-h-screen md:max-w-2xl lg:max-w-3xl [&>button>svg]:text-white",e),size:"xl",positionRightCloseBtn:!0,children:D(ze,{className:"p-0",children:ge("div",{className:"flex flex-row flex-wrap",children:[D("div",{className:"hidden flex-none w-full sm:block md:w-5/12",children:o||ge("div",{className:"grid grid-cols-1 gap-y-6 px-5 py-8 text-sm",children:[ge("div",{className:"flex flex-nowrap items-center",children:[D("div",{className:"flex-none",children:D("img",{className:"w-20",loading:"lazy",src:"https://homepage.momocdn.net/images/s/momo-upload-api-200917091602-637359309621891617.png",alt:"Step 1"})}),ge("div",{className:"flex-1 pl-4",children:[D("div",{className:"font-semibold text-gray-800 step",children:"B\u01B0\u1EDBc 1 :"}),D("div",{className:"mt-1 text-gray-500",children:l?"M\u1EDF app MoMo ho\u1EB7c \u1EE9ng d\u1EE5ng ng\xE2n h\xE0ng/v\xED \u0111i\u1EC7n t\u1EED ch\u1EA5p nh\u1EADn m\xE3 v\u1EA1ch t\u1EEB QR \u0110a N\u0103ng":"M\u1EDF \u1EE9ng d\u1EE5ng camera m\u1EB7c \u0111\u1ECBnh ho\u1EB7c \u1EE9ng d\u1EE5ng h\u1ED7 tr\u1EE3 QR code c\u1EE7a b\u1EA1n"})]})]}),ge("div",{className:"flex flex-nowrap items-center",children:[D("div",{className:"flex-none",children:D("img",{className:"w-20",loading:"lazy",src:"https://homepage.momocdn.net/images/s/momo-upload-api-200917091443-637359308837905996.png",alt:"Step 2"})}),ge("div",{className:"flex-1 pl-4",children:[D("div",{className:"font-semibold text-gray-800 step",children:"B\u01B0\u1EDBc 2 :"}),D("div",{className:"mt-1 text-gray-500",children:"Qu\xE9t m\xE3 QR Code theo h\xECnh b\xEAn ph\u1EA3i"})]})]}),ge("div",{className:"flex flex-nowrap items-center",children:[D("div",{className:"flex-none",children:D("img",{className:"w-20",loading:"lazy",src:"https://homepage.momocdn.net/images/s/momo-upload-api-200917090146-637359301062519803.png",alt:"Step 3"})}),ge("div",{className:"flex-1 pl-4",children:[D("div",{className:"font-semibold text-gray-800 step",children:"B\u01B0\u1EDBc 3 :"}),ge("div",{className:"mt-1 text-gray-500",children:["B\u1EA5m v\xE0o th\xF4ng b\xE1o hi\u1EC3n th\u1ECB \u0111\u1EC3 t\u1EA3i \u1EE9ng d\u1EE5ng ho\u1EB7c"," ",a||"Truy c\u1EADp ngay"]})]})]})]})}),D("div",{className:"flex justify-center items-center w-full h-auto md:w-7/12",style:{background:"url(https://homepage.momocdn.net/jk/momo2020/img/intro/qrcode-pattern.png) 10px 10px no-repeat,linear-gradient(to top,#c1177c,#e11b90)"},children:ge("div",{className:"px-5 py-10 text-center",children:[t&&D("h4",{className:"mb-5 text-base font-semibold text-white",children:t}),ge("div",{className:"relative",children:[l&&D("div",{className:"absolute -top-2 left-1/2 z-[5] -translate-x-1/2",children:D("img",{src:"https://homepage.momocdn.net/fileuploads/svg/momo-file-231211170324.svg",alt:"Title QR all"})}),D(vc,{img:r,isQrForAll:l,children:n&&D(uc,{value:n,size:215,imageSettings:{src:`${s||"https://homepage.momocdn.net/pwa/images/logoMomox50.png"}`,height:50,width:50,excavate:!0},level:"H"})})]})]})})]})})})});import{useEffect as hc,useLayoutEffect as xc,useState as bc}from"react";import yc from"ua-parser-js";var Nc=()=>yc().device.type==="mobile",wc=typeof window<"u"?xc:hc,Co=()=>{let[e,o]=bc(!1);return wc(()=>{o(Nc())},[]),e};import{Fragment as Cc,jsx as Da,jsxs as Rc}from"react/jsx-runtime";var Ue=({action:e,newTab:o,offset:t,dialogQrProps:a,className:r,children:n,onPushTrackingEvent:s,...l})=>{let[m,c]=Pc(!1),d=Co(),p=!!a?.qrLink,g=()=>{let A=p?a?.qrLink:e;return typeof A=="string"?A.trim():""},v=()=>{let A=g();!A&&typeof e!="function"||(typeof e=="function"?e():window.open(A,o?"_blank":"_self"))},y=(A,H=0)=>{let $e=document.querySelector(A);if(!$e)return;let _=$e.getBoundingClientRect().top+window.scrollY-H;window.scrollTo({top:_,behavior:"smooth"})},R=()=>{s?.(),typeof e=="string"&&e.startsWith("#")?y(e,t):v()},N=()=>Rc(Cc,{children:[Da(Ne,{...l,className:r,onClick:()=>c(!0),"data-name":"button-action-with-qr",children:n}),Da(oo,{...a,open:m,onOpenChange:()=>c(!1),qrLink:a?.qrLink||""})]});return p?d?a?.isQrForAll?N():Da(Ne,{...l,className:r,onClick:v,"data-name":"button-action-with-qr",children:n}):N():Da(Ne,{...l,onClick:R,className:i("cursor-pointer",r),"data-name":"button-action-without-qr",rel:"noreferrer",children:n})};import*as Ro from"react";import{ChevronRightIcon as kc,DotsHorizontalIcon as Tc}from"@radix-ui/react-icons";import{Slot as Sc}from"@radix-ui/react-slot";import{jsx as Pt,jsxs as Dc}from"react/jsx-runtime";var on=Ro.forwardRef(({className:e,...o},t)=>Pt("nav",{ref:t,"aria-label":"breadcrumb",className:i("",e),...o}));on.displayName="Breadcrumb";var an=Ro.forwardRef(({className:e,...o},t)=>Pt("ol",{ref:t,className:i("flex items-center gap-2 break-words text-sm overflow-x-auto snap-mandatory snap-x [&::-webkit-scrollbar]:hidden",e),...o}));an.displayName="BreadcrumbList";var rn=Ro.forwardRef(({className:e,...o},t)=>Pt("li",{ref:t,className:i("shrink-0 text-gray-900 hover:text-pink-500",e),...o}));rn.displayName="BreadcrumbItem";var nn=Ro.forwardRef(({asChild:e,className:o,...t},a)=>Pt(e?Sc:"a",{ref:a,className:i("transition-colors hover:text-foreground",o),...t}));nn.displayName="BreadcrumbLink";var sn=Ro.forwardRef(({className:e,...o},t)=>Pt("span",{ref:t,role:"link","aria-disabled":"true","aria-current":"page",className:i("text-sm text-gray-500",e),...o}));sn.displayName="BreadcrumbPage";var ln=({children:e,className:o,...t})=>Pt("li",{role:"presentation","aria-hidden":"true",className:i("text-gray-900",o),...t,children:e??Pt(kc,{className:"w-2 h-2"})});ln.displayName="BreadcrumbSeparator";var mn=({className:e,...o})=>Dc("span",{role:"presentation","aria-hidden":"true",className:i("flex h-5 w-5 items-center justify-center",e),...o,children:[Pt(Tc,{className:"w-4 h-4 text-gray-900"}),Pt("span",{className:"sr-only",children:"More"})]});mn.displayName="BreadcrumbElipssis";import Er from"html-react-parser";import{createContext as Mc,useContext as cn}from"react";import{jsx as Xo}from"react/jsx-runtime";var Mr=Mc({align:"center"}),Ir=({color:e="pink",size:o="small",isTruncated:t=!1,className:a,children:r})=>{let n={regular:"text-gray-900",pink:"text-pink-500",white:"text-white"},s={small:"text-sm",large:"text-lg"};return Xo("div",{className:i("mb-1 font-semibold",n[e],s[o],t&&"truncate",a),children:r})},Ar=({tagHeading:e="h2",size:o="small",color:t="pink",isTruncated:a=!1,className:r,children:n})=>{let s=e,l={regular:"text-gray-900",pink:"text-pink-500",white:"text-white"},m={small:"lg:text-3xl text-2xl",large:"lg:text-4xl md:text-3xl text-2xl"},{align:c}=cn(Mr);return Xo(s,{className:i("max-w-4xl font-bold",c==="center"?"mx-auto":c==="right"?"ml-auto":"",l[t],m[o],a&&"truncate",r),children:n})},Lr=({color:e="regular",size:o="small",marginTop:t="spacingX",isTruncated:a=!1,className:r,children:n})=>{let s={regular:"text-gray-500",white:"text-white/80"},l={small:"text-base",large:"md:text-lg text-base"},m={none:"",spacingX:"mt-2",spacingM:"mt-3",spacingL:"mt-4",spacingXl:"mt-5",spacing2Xl:"mt-6"},{align:c}=cn(Mr);return Xo("div",{className:i(c==="center"?"mx-auto max-w-2xl":c==="right"?"ml-auto max-w-4xl":"max-w-4xl",s[e],l[o],m[t],a&&"truncate",r),children:n})},Fr=({className:e,align:o="center",children:t})=>Xo("div",{className:i("mb-5 md:mb-8",{left:"text-left",center:"text-center",right:"text-right"}[o],e),children:Xo(Mr.Provider,{value:{align:o},children:t})});import{jsx as ao,jsxs as Ic}from"react/jsx-runtime";var B=({idSection:e,className:o,background:t,children:a})=>ao("section",{id:e,className:i("block-section py-8 md:py-10 lg:py-14",o),style:{background:t},children:ao("div",{className:"wrapper relative",children:a})}),h=({align:e="center",tagline:o,title:t,description:a,tagHeading:r="h2",colorScheme:n="pink",sizeHeading:s="small",className:l})=>{let m=n==="black"?"pink":n==="pink"?"regular":"white",c=n==="pink"?"pink":n==="white"?"white":"regular",d=n==="white"?"white":"regular";return!t&&!a&&!o?null:Ic(Fr,{align:e,className:l,children:[o&&ao(Ir,{color:m,children:o}),t&&ao(Ar,{tagHeading:r,color:c,size:s,children:Er(t)}),a&&ao(Lr,{color:d,size:"large",marginTop:s==="large"?"spacing2Xl":"spacingX",children:Er(a)})]})},x=({align:e,isFullInMobile:o=!1,buttons:t,className:a})=>t?.length===0?null:ao("div",{className:i("buttons-block mt-8 flex w-full gap-4 md:mt-10",e==="center"&&"justify-center",e==="right"&&"justify-end",o&&"flex-wrap md:flex-nowrap",a),children:t?.slice(0,2).map((r,n)=>{if(!r)return null;let{btnName:s,...l}=r;return ao(Ue,{...l,dataUmamiEventText:Bt(s),className:i(o&&"w-full md:w-auto",r?.className),children:Er(s)},n)})});import Qc,{memo as Uc}from"react";import{ArrowDownIcon as qc}from"@heroicons/react/20/solid";import Xc from"html-react-parser";import{createContext as Ec,useCallback as zc,useContext as zr,useEffect as Hc,useRef as _c,useState as Bc}from"react";import{ChevronLeft as Oc,ChevronRight as Vc}from"lucide-react";import*as dn from"react";import{Slot as Ac}from"@radix-ui/react-slot";import{cva as Lc}from"class-variance-authority";import{jsx as Fc}from"react/jsx-runtime";var ro=Lc("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-semibold transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed border border-transparent",{variants:{variant:{primary:"bg-pink-500 text-white hover:bg-pink-600 disabled:bg-pink-300",secondary:"bg-white text-gray-900 hover:bg-gray-100 disabled:text-gray-400 disabled:bg-white border-gray-300",outline:"border-pink-500 text-pink-500 bg-white hover:bg-pink-50 disabled:bg-white disabled:border-pink-300 disabled:text-pink-300",tonal:"bg-pink-100 text-pink-500 hover:bg-pink-200 disabled:bg-gray-200 disabled:text-gray-400",danger:"bg-red-500 text-white hover:bg-red-600 disabled:bg-red-300",transparent:"text-gray-900 bg-transparent hover:bg-gray-100 disabled:text-gray-400 disabled:bg-transparent"},size:{default:"text-sm h-10 w-10",sm:"h-8 w-8 text-sm",lg:"h-12 w-12 text-base"}},defaultVariants:{variant:"primary",size:"default"}}),se=dn.forwardRef(({className:e,variant:o="primary",size:t="default",asChild:a=!1,isDisabled:r=!1,...n},s)=>{let l=a?Ac:"button",m=i(ro({variant:o,size:t,className:e}));return Fc(l,{className:m,disabled:r,ref:s,...n,children:n.children})});se.displayName="IconButton";import{Fragment as Wc,jsx as Wt,jsxs as pn}from"react/jsx-runtime";var Ma=Ec(void 0),Ct=({showGradientOverlay:e=!0,gradientOverlayColor:o="255, 255, 255",className:t,children:a})=>{let r=_c(null),[n,s]=Bc({left:!1,right:!1}),l=zc(()=>{let c=r.current;if(c){let{scrollLeft:d,scrollWidth:p,clientWidth:g}=c;s({left:d>0,right:Math.ceil(d+g)<p})}},[]);Hc(()=>{let c=r.current;if(c)return l(),window.addEventListener("resize",l),c.addEventListener("scroll",l),()=>{window.removeEventListener("resize",l),c.removeEventListener("scroll",l)}},[l]);let m=c=>{let d=r.current;if(d){let{scrollLeft:p,clientWidth:g,scrollWidth:v}=d,y=g*.7*(c==="left"?-1:1),R=p+y;R<0?R=0:R>v-g&&(R=v-g),d.scrollTo({left:R,behavior:"smooth"})}};return Wt(Ma.Provider,{value:{scrollContainerRef:r,showArrows:n,scroll:m,gradientOverlayColor:o},children:pn("div",{className:i("relative w-full",t),children:[e&&pn(Wc,{children:[n.left&&Wt("div",{className:"pointer-events-none absolute left-0 top-1/2 z-10 flex h-full w-16 -translate-y-1/2 items-center",style:{background:`linear-gradient( to left, rgba(255, 255, 255, 0),rgb(${o}),rgb(${o}))`}}),n.right&&Wt("div",{className:"pointer-events-none absolute right-0 top-1/2 z-10 flex h-full w-16 -translate-y-1/2 items-center",style:{background:`linear-gradient(to right, rgba(255, 255, 255, 0), rgb(${o}),rgb(${o}))`}})]}),a]})})},Rt=({className:e,children:o})=>{let t=zr(Ma);if(!t)throw new Error("HorizontalContent must be used within a HorizontalScroll");return Wt("div",{ref:t.scrollContainerRef,className:i("scrollbar-hide overflow-x-auto scroll-smooth",e),role:"region","aria-label":"Scrollable content",children:o})},kt=({className:e,children:o,...t})=>{let a=zr(Ma);if(!a)throw new Error("HorizontalNavigation must be used within a HorizontalScroll");return a.showArrows.left?Wt(se,{className:i("pointer-events-auto absolute left-0.5 top-1/2 z-10 h-6 w-6 -translate-y-1/2 rounded-full",e),onClick:()=>a.scroll("left"),"aria-label":"Scroll left",size:t.size||"sm",variant:t.variant||"secondary",...t,children:o||Wt(Oc,{className:"h-4 w-4"})}):null},Tt=({className:e,children:o,...t})=>{let a=zr(Ma);if(!a)throw new Error("HorizontalNavigation must be used within a HorizontalScroll");return a.showArrows.right?Wt(se,{className:i("pointer-events-auto absolute right-0.5 top-1/2 z-10 h-6 w-6 -translate-y-1/2 rounded-full",e),onClick:()=>a.scroll("right"),"aria-label":"Scroll right",size:t.size||"sm",variant:t.variant||"secondary",...t,children:o||Wt(Vc,{className:"h-4 w-4"})}):null};import*as Ia from"react";import*as qe from"@radix-ui/react-tabs";import{jsx as Hr}from"react/jsx-runtime";var St=qe.Root,ot=Ia.forwardRef(({className:e,size:o="sm",isDivider:t=!1,...a},r)=>Hr(qe.List,{ref:r,className:i("inline-flex w-full flex-row items-center space-x-5 overflow-x-auto [&::-webkit-scrollbar]:hidden",`text-${o}`,t&&"border-b border-gray-200",e),...a}));ot.displayName=qe.List.displayName;var at=Ia.forwardRef(({className:e,...o},t)=>Hr(qe.Trigger,{ref:t,className:i("ring-offset-background focus-visible:ring-ring inline-flex items-center justify-center whitespace-nowrap border-b-2 border-transparent py-3 font-semibold text-gray-900 transition-all hover:text-pink-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:border-pink-500 data-[state=active]:text-pink-500",e),...o}));at.displayName=qe.Trigger.displayName;var rt=Ia.forwardRef(({className:e,...o},t)=>Hr(qe.Content,{ref:t,className:i("ring-offset-background focus-visible:ring-ring mt-3 text-gray-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",e),...o}));rt.displayName=qe.Content.displayName;import*as fn from"react";import{Slot as Gc}from"@radix-ui/react-slot";import{cva as $c}from"class-variance-authority";import{jsx as jc}from"react/jsx-runtime";var gn=$c("inline-flex items-center justify-center whitespace-nowrap font-semibold transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed border border-transparent flex-nowrap",{variants:{variant:{default:"text-blue-700 hover:underline hover:bg-blue-50 disabled:bg-transparent disabled:text-gray-400 disabled:no-underline",primary:"text-pink-500 hover:underline hover:bg-pink-50 disabled:bg-transparent disabled:text-gray-400 disabled:no-underline",secondary:"text-gray-700 hover:underline hover:text-blue-700 hover:bg-blue-50 disabled:bg-transparent disabled:text-gray-400 disabled:no-underline"},size:{default:"text-sm",lg:"text-base"}},defaultVariants:{variant:"default",size:"default"}}),ie=fn.forwardRef(({className:e,variant:o="default",size:t="default",asChild:a=!1,isDisabled:r=!1,...n},s)=>{let l=a?Gc:"button",m=i(gn({variant:o,size:t,className:e}));return jc(l,{className:m,disabled:r,ref:s,...n,children:n.children})});ie.displayName="TextButton";import{Fragment as un,jsx as j,jsxs as it}from"react/jsx-runtime";var Yc=({blog:e})=>{let o=(t,a)=>{t?.preventDefault(),t?.stopPropagation(),window.open(a,"_blank")};return it(un,{children:[j("div",{className:"flex-none pr-3 basis-1/2 md:basis-full md:pr-0",children:j("div",{className:"relative block aspect-[16/9] w-full overflow-hidden rounded-md bg-gray-100",children:it("picture",{children:[j("source",{media:"(min-width: 640px)",srcSet:e?.thumbnailDesktop}),j("img",{className:"object-cover w-full h-full",src:e?.thumbnailMobile,alt:e?.title})]})})}),it("div",{className:"overflow-hidden basis-1/2 md:mt-3 md:basis-full",children:[e?.category&&e?.categoryUrl&&j(ie,{variant:"default",className:"shink-0 mb-0.5 line-clamp-1 block justify-start whitespace-normal text-left text-xs md:hidden",onClick:t=>o(t,e?.categoryUrl||""),children:e?.category}),j("div",{className:"text-sm font-medium text-gray-900 line-clamp-3 group-hover:text-pink-500 md:line-clamp-none md:text-base",children:e?.title}),it("div",{className:"flex items-center mt-2 md:space-x-1",children:[e?.category&&e?.categoryUrl&&it(un,{children:[j(ie,{variant:"default",className:"justify-start hidden text-xs text-left whitespace-normal shink-0 md:line-clamp-1 md:block",onClick:t=>o(t,e?.categoryUrl||""),children:e?.category}),e?.category&&e?.totalViews&&j("span",{className:"flex-none hidden leading-none md:block",children:"\xB7"})]}),e?.totalViews&&j("div",{className:"flex-none text-xs text-gray-500",children:e.totalViews})]})]})]})},Aa=Uc(({dataHeading:e,dataHorizontalScroll:o,dataBlog:t,onClickModal:a,onClickLoadMore:r})=>{let{showGradientOverlay:n=!0,gradientOverlayColor:s,className:l}=o||{},m=(d,p,g)=>{d?.preventDefault(),d?.stopPropagation(),a?a(p):window.open(g,"_blank")},c=(d,p)=>it("div",{children:[j("div",{className:i("-mx-3 flex flex-row flex-wrap gap-y-5",d?.blogList?.length<3?"md:justify-center":""),children:d?.blogList?.map((g,v)=>j("div",{className:"min-w-0 px-3 basis-full md:basis-1/2 lg:basis-1/3",children:j("div",{onClick:y=>m(y,g?.id,g?.url),className:i("group flex cursor-pointer flex-row md:flex-col",d?.classNameItem),children:j(Yc,{blog:g})},g?.id)},v))}),d?.isShowBtn&&j("div",{className:"flex items-center justify-center w-full mt-8",children:it(Ue,{action:r?()=>r?.(p):d?.btnUrl,newTab:d?.isNewTab,variant:"outline",dataUmamiEvent:d?.dataUmamiEvent,dataUmamiEventText:Bt(d?.btnName)||"Xem th\xEAm",children:[Xc(d.btnName||"Xem th\xEAm"),d?.isLoading?j(Po,{className:"w-5 h-5 ml-2 animate-spin-loading"}):r&&!d?.btnUrl&&j(qc,{className:"w-5 h-5 ml-2 -mb-1 animate-bounce"})]})})]},d?.title||p);return it(Qc.Fragment,{children:[e&&j(h,{tagline:e?.tagline,title:e?.title,description:e?.description,tagHeading:e?.tagHeading,align:"center",colorScheme:e?.colorScheme||"pink",sizeHeading:e?.sizeHeading,className:i(e?.className)}),t?.length>1?it(St,{defaultValue:t[0]?.title,children:[it(Ct,{showGradientOverlay:n,gradientOverlayColor:s,className:l,children:[j(Rt,{className:"mb-6 text-center",children:j(ot,{className:"inline-flex items-center w-auto mx-auto mb-0 overflow-visible",children:t.map((d,p)=>j(at,{value:d.title,children:d.title},d.title+p))})}),j(kt,{}),j(Tt,{})]}),t.map((d,p)=>j(rt,{value:d.title,children:c(d,p)},d.title+p))]}):t?.length===1&&t[0]&&c(t[0],0)]})});import td,{memo as od,useEffect as ad,useState as xn}from"react";import{ChevronLeftIcon as rd,ChevronRightIcon as id}from"@heroicons/react/20/solid";import bn from"html-react-parser";import*as V from"react";import{ChevronLeftIcon as Zc,ChevronRightIcon as Kc}from"@heroicons/react/20/solid";import Jc from"embla-carousel-react";import{Fragment as ed,jsx as He,jsxs as hn}from"react/jsx-runtime";var vn=V.createContext(null);function Yo(){let e=V.useContext(vn);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var ue=V.forwardRef(({orientation:e="horizontal",opts:o,setApi:t,plugins:a,className:r,children:n,...s},l)=>{let[m,c]=Jc({align:"start",...o,axis:e==="horizontal"?"x":"y"},a),[d,p]=V.useState(!1),[g,v]=V.useState(!1),y=V.useCallback(A=>{A&&(p(A.canScrollPrev()),v(A.canScrollNext()))},[]),R=V.useCallback(()=>{c?.scrollPrev()},[c]),N=V.useCallback(()=>{c?.scrollNext()},[c]),W=V.useCallback(A=>{A.key==="ArrowLeft"?(A.preventDefault(),R()):A.key==="ArrowRight"&&(A.preventDefault(),N())},[R,N]);return V.useEffect(()=>{!c||!t||t(c)},[c,t]),V.useEffect(()=>{if(c)return y(c),c.on("reInit",y),c.on("select",y),()=>{c?.off("select",y)}},[c,y]),He(vn.Provider,{value:{carouselRef:m,api:c,opts:o,orientation:e||(o?.axis==="y"?"vertical":"horizontal"),scrollPrev:R,scrollNext:N,canScrollPrev:d,canScrollNext:g},children:He("div",{ref:l,onKeyDownCapture:W,className:i("relative",r),role:"region","aria-roledescription":"carousel",...s,children:n})})});ue.displayName="Carousel";var ve=V.forwardRef(({className:e,classNameContent:o,...t},a)=>{let{carouselRef:r,orientation:n}=Yo();return He("div",{ref:r,className:i("overflow-hidden",o),children:He("div",{ref:a,className:i("flex",n==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});ve.displayName="CarouselContent";var de=V.forwardRef(({className:e,...o},t)=>{let{orientation:a}=Yo();return He("div",{ref:t,role:"group","aria-roledescription":"slide",className:i("min-w-0 shrink-0 grow-0 basis-full",a==="horizontal"?"pl-4":"pt-4",e),...o})});de.displayName="CarouselItem";var ko=V.forwardRef(({className:e,variant:o="secondary",size:t="default",...a},r)=>{let{orientation:n,scrollPrev:s,canScrollPrev:l}=Yo();return hn(se,{ref:r,variant:o,size:t,className:i("absolute h-8 w-8 rounded-full",n==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!l,onClick:s,...a,children:[He(Zc,{className:"h-6 w-6"}),He("span",{className:"sr-only",children:"Previous slide"})]})});ko.displayName="CarouselPrevious";var To=V.forwardRef(({className:e,variant:o="secondary",size:t="default",...a},r)=>{let{orientation:n,scrollNext:s,canScrollNext:l}=Yo();return hn(se,{ref:r,variant:o,size:t,className:i("absolute h-8 w-8 rounded-full",n==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!l,onClick:s,...a,children:[He(Kc,{className:"h-6 w-6"}),He("span",{className:"sr-only",children:"Next slide"})]})});To.displayName="CarouselNext";var So=V.forwardRef((e,o)=>{let{api:t}=Yo(),[,a]=V.useState(!1),r=V.useCallback(()=>a(l=>!l),[]);V.useEffect(()=>{if(t)return t.on("select",r),t.on("reInit",r),()=>{t.off("select",r),t.off("reInit",r)}},[t,r]);let n=t?.scrollSnapList().length||0,s=t?.selectedScrollSnap()||0;return n>1?He("div",{ref:o,className:` flex justify-center ${e.className}`,children:Array.from({length:n},(l,m)=>He(se,{className:`navigation-item mx-1 h-1.5 w-1.5 rounded-full p-0 ${m===s?"navigation-item-active scale-125 transform bg-gray-500 hover:bg-gray-500/90":"bg-gray-200 hover:bg-gray-100"}`,"aria-label":`Go to slide ${m+1}`,onClick:()=>t?.scrollTo(m)},m))}):He(ed,{})});So.displayName="CarouselDots";import{Fragment as La,jsx as Q,jsxs as Xe}from"react/jsx-runtime";var nd=({blog:e})=>{let o=(t,a)=>{t?.preventDefault(),t?.stopPropagation(),window.open(a,"_blank")};return Xe(La,{children:[Q("div",{className:"relative block aspect-[16/9] w-full overflow-hidden rounded-md bg-gray-100",children:Q("img",{className:"inset-0 h-full w-full object-cover",src:e?.thumbnailDesktop,alt:e?.title})}),Xe("div",{className:"mt-4 md:pr-3",children:[Q("div",{className:"font-semibold text-gray-900 group-hover:text-pink-500 md:text-lg md:leading-tight ",children:e?.title}),e?.description&&Q("div",{className:"mt-2 line-clamp-2 text-sm text-gray-500 md:text-sm",children:bn(e?.description??"")}),Xe("div",{className:"mt-2 flex items-center space-x-1",children:[e?.category&&e?.categoryUrl&&Xe(La,{children:[Q(ie,{variant:"default",className:"shink-0 justify-start whitespace-normal text-left text-sm md:line-clamp-1 ",onClick:t=>o(t,e?.categoryUrl||""),children:e?.category}),e?.category&&e?.totalViews&&Q("span",{className:" flex-none leading-none text-gray-300 ",children:"\xB7"})]}),e?.totalViews&&Q("div",{className:"flex-none text-sm text-gray-500",children:e.totalViews})]})]})]})},sd=({dataBlog:e,setCarouselRef:o,carouselRef:t,setCurrent:a,handleOnClickItem:r})=>{let{blogList:n=[],isShowBtn:s,btnName:l,btnUrl:m="#",isNewTab:c,classNameItem:d}=e??{};return ad(()=>{!t||!a||(a(t.selectedScrollSnap()+1),t.on("select",()=>{a&&a(t.selectedScrollSnap()+1)}))},[t,a]),Xe(La,{children:[Q(ue,{opts:{dragFree:!1},setApi:o,className:"w-full",children:Q(ve,{classNameContent:"!overflow-visible",className:"-ml-5",children:n?.map(p=>Q(de,{className:"basis-11/12 pl-5 md:basis-1/2 lg:basis-4/12",children:Q("div",{onClick:g=>r(g,p?.id,p?.url),className:i("group cursor-pointer",d),children:Q(nd,{blog:p})},p?.id)},p?.id))})}),s&&Q("div",{className:"mt-8 flex w-full items-center justify-center md:mt-10 ",children:Xe(Ue,{action:m&&m,newTab:c,variant:"outline",dataUmamiEvent:e?.dataUmamiEvent,dataUmamiEventText:Bt(e?.btnName)||"Xem th\xEAm",children:[bn(l||"Xem th\xEAm")," "]})})]})},ld=({carouselRef:e})=>Xe(se,{onClick:()=>e?.scrollPrev(),disabled:!e?.canScrollPrev(),style:{borderRadius:"100%"},size:"sm",variant:"secondary",children:[Q(rd,{className:"h-6 w-6"}),Q("span",{className:"sr-only",children:"Previous slide"})]}),md=({carouselRef:e})=>Xe(se,{onClick:()=>e?.scrollNext(),disabled:!e?.canScrollNext(),style:{borderRadius:"100%"},size:"sm",variant:"secondary",children:[Q(id,{className:"h-6 w-6"}),Q("span",{className:"sr-only",children:"Next slide"})]}),_r=od(({dataHeading:e,dataBlog:o,onClickModal:t,onClickLoadMore:a})=>{let r=(c,d,p)=>{c?.preventDefault(),c?.stopPropagation(),t?t(d):window.open(p,"_blank")},[n,s]=xn(null),[,l]=xn(0),m=()=>n?Xe("div",{className:"ml-3 hidden items-center space-x-2 md:flex",children:[Q(ld,{carouselRef:n}),Q(md,{carouselRef:n})]}):Q(La,{});return Xe(td.Fragment,{children:[Xe("div",{className:" flex items-center justify-between",children:[e&&Q(h,{tagline:e?.tagline,title:e?.title,description:e?.description,tagHeading:e?.tagHeading,align:"left",colorScheme:e?.colorScheme||"pink",sizeHeading:e?.sizeHeading,className:i(e?.className)}),Q(m,{})]}),Q(sd,{dataBlog:o?.[0],onClickLoadMore:a,index:0,setCarouselRef:s,carouselRef:n,setCurrent:l,handleOnClickItem:r})]})});import{Fragment as fd,jsx as Do}from"react/jsx-runtime";var cd=({template:e,dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n})=>{switch(e){case 1:return Do(Aa,{dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n});case 2:return Do(_r,{dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n});default:return Do(Aa,{dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n})}},dd=({dataHeading:e,dataHorizontalScroll:o,dataBlog:t,template:a,onClickModal:r,onClickLoadMore:n})=>Do(fd,{children:cd({dataHeading:e,dataHorizontalScroll:o,dataBlog:t,template:a,onClickModal:r,onClickLoadMore:n})}),pd=({dataHeading:e,dataHorizontalScroll:o,dataBlog:t=[],idSection:a,className:r,background:n,template:s=1,onClickModal:l,onClickLoadMore:m})=>Do(B,{className:i("overflow-hidden",r),idSection:a,background:n,children:Do(dd,{dataHeading:e,dataHorizontalScroll:o,dataBlog:t,template:s,onClickModal:l,onClickLoadMore:m})});import*as Ea from"react";import{enUS as hd,vi as xd}from"date-fns/locale";import{ChevronLeft as bd,ChevronRight as yd}from"lucide-react";import Nd from"lunisolar";import{DayPicker as wd}from"react-day-picker";import*as yn from"react";import*as Zo from"@radix-ui/react-checkbox";import{CheckIcon as gd}from"@heroicons/react/16/solid";import{cva as Nn}from"class-variance-authority";import{jsx as Br}from"react/jsx-runtime";var ud=Nn("peer shrink-0 rounded border-2 disabled:bg-gray-300 border-gray-300 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-default disabled:bg-gray-100 data-[state=checked]:border-none disabled:data-[state=checked]:bg-gray-400 disabled:data-[state=checked]:text-gray-100 data-[state=checked]:bg-pink-500 data-[state=checked]:text-white",{variants:{size:{medium:"h-4 w-4",large:"w-5 h-5"}},defaultVariants:{size:"medium"}}),vd=Nn("",{variants:{size:{medium:"h-4 w-4",large:"w-5 h-5"}},defaultVariants:{size:"medium"}}),Fa=yn.forwardRef(({className:e,size:o,...t},a)=>Br(Zo.Root,{ref:a,className:i(ud({size:o}),e),...t,children:Br(Zo.Indicator,{className:i("flex items-center justify-center text-current"),children:Br(gd,{className:i(vd({size:o}))})})}));Fa.displayName=Zo.Root.displayName;import{Fragment as Td,jsx as nt,jsxs as Or}from"react/jsx-runtime";var Pd=({date:e,cusContent:o})=>{let t=null;return t=Nd(e).lunar,Or(Td,{children:[o?o(e):e.getDate(),t&&nt("span",{className:"luna-date absolute right-0.5 top-1 hidden text-[8px] leading-none group-[.show-luna]:block",children:t.day})]})},Cd={formatCaption:e=>`Th\xE1ng ${e.getMonth()+1}/${e.getFullYear()}`,formatWeekdayName:e=>{let o=e.getDay();return["CN","T2","T3","T4","T5","T6","T7"][o]}};function Rd({isShow:e,setIsShow:o,lang:t}){let a=Ea.useId();return nt("div",{className:"w-full p-3 pt-0",children:Or("div",{className:"flex cursor-pointer items-center space-x-2 border-t border-gray-100 pt-3",children:[nt(Fa,{checked:e,id:`check-show-luna-${a}`,onCheckedChange:r=>{typeof r=="boolean"&&o(r)}}),nt("label",{htmlFor:`check-show-luna-${a}`,className:"z-[1] cursor-pointer text-sm leading-none text-gray-900 peer-disabled:cursor-default peer-disabled:text-gray-400",children:t==="vi"?"Hi\u1EC7n ng\xE0y \xE2m l\u1ECBch":"Show lunar date"})]})})}var kd=e=>e.getDay()===0||e.getDay()===6;function za({className:e,classNames:o,showOutsideDays:t=!1,enableLunaDate:a=!1,lang:r="vi",cusContentDay:n,...s}){let[l,m]=Ea.useState(!0);return nt(wd,{locale:r==="vi"?xd:hd,showOutsideDays:t,className:i("b w-fit rounded-b-md border border-gray-200 bg-white shadow-md",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-y-0",month:"p-3 pt-0 w-full",caption:"flex justify-center p-3 bg-blue-50 relative items-center -mx-3 mb-3",caption_label:"text-sm font-medium text-gray-900",nav:"space-x-1 flex items-center",nav_button:i(tt({variant:"transparent"}),"h-7 w-7 p-0 text-gray-900 hover:bg-transparent hover:opacity-70"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse",head_row:"flex space-x-0.5",head_cell:i("w-11 rounded-md text-xs font-medium text-gray-500 [&:nth-child(7)]:!text-red-600",r==="vi"?"[&:nth-child(6)]:!text-red-600":"[&:nth-child(1)]:!text-red-600"),row:"flex w-full mt-0.5 space-x-0.5",cell:"h-11 w-11 text-center text-sm p-0 relative border-none",day:i(tt({variant:"transparent"}),"group relative h-11 w-11 p-0 text-center text-sm font-semibold focus-within:relative focus-within:z-20 aria-selected:opacity-100 [&.day-range-end.day-range-start]:rounded-md aria-selected:[&:not(.day-range-middle)]:bg-pink-500 aria-selected:[&:not(.day-range-middle)]:text-white",a&&l&&"show-luna"),day_range_end:"day-range-end [&.day-range-end]:rounded-l-none",day_range_start:"day-range-start [&.day-range-start]:rounded-r-none",day_today:"day-today [&:not([aria-selected])]:text-pink-500 [&:not([aria-selected])]:border-gray-200",day_outside:"day-outside opacity-50 aria-selected:bg-accent/50 aria-selected:opacity-30",day_disabled:"opacity-50",day_range_middle:i("group/mid day-range-middle !rounded-none !bg-pink-50 text-gray-900 [&:nth-child(7)]:!text-red-600",r==="vi"?"[&:nth-child(6)]:!text-red-600":"[&:nth-child(1)]:!text-red-600"),day_hidden:"invisible",...o},modifiers:{weekend:kd},modifiersClassNames:{weekend:"text-red-600"},components:{IconLeft:()=>nt(bd,{className:"h-6 w-6"}),IconRight:()=>nt(yd,{className:"h-6 w-6"}),DayContent:c=>nt(Pd,{date:c.date,cusContent:n}),Months:({children:c})=>Or("div",{className:"w-full",children:[nt("div",{className:i("months-wrapper flex flex-col sm:flex-row"),children:c}),a&&nt(Rd,{isShow:l,setIsShow:m,lang:r})]})},formatters:r==="vi"?Cd:{},...s})}za.displayName="Calendar";import{QuestionMarkCircleIcon as Sd,XCircleIcon as Dd}from"@heroicons/react/16/solid";import{format as Ha}from"date-fns";import{Calendar as Md}from"lucide-react";import*as Pn from"react";import*as Dt from"@radix-ui/react-popover";import{jsx as wn}from"react/jsx-runtime";var Ko=Dt.Root,Jo=Dt.Trigger,Mo=Pn.forwardRef(({className:e,align:o="center",sideOffset:t=4,...a},r)=>wn(Dt.Portal,{children:wn(Dt.Content,{ref:r,align:o,sideOffset:t,className:i("z-50 w-72 rounded-md border border-gray-200 bg-white p-4 sm:p-5 text-gray-900 shadow-small outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));Mo.displayName=Dt.Content.displayName;import{Fragment as Cn,jsx as De,jsxs as ea}from"react/jsx-runtime";var Id=({label:e,placeholder:o="Select a value",size:t=1,message:a,isError:r,disabled:n,dateFormat:s="dd/MM/yyyy",buttonProps:l,popoverProps:m,calendarProps:c,popoverContentProps:d})=>{let p=c?.selected||null;return ea("div",{children:[ea(Ko,{...m,children:[De(Jo,{asChild:!0,children:ea(Ne,{variant:"secondary",className:i("relative h-11 w-full justify-between overflow-visible text-left text-sm font-normal text-gray-900 ring-inset hover:ring-1 hover:ring-gray-400 focus:ring-1 focus:ring-gray-400 disabled:pointer-events-none disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 [&[data-state=open]]:border-pink-500 [&[data-state=open]]:ring-1 [&[data-state=open]]:ring-pink-500",t===2&&"h-12 text-base",(!p||!(p instanceof Date)&&typeof p=="object"&&(!("from"in p)||!p.from))&&"text-gray-500",r&&"border-red-500 ring-1 ring-red-500"),disabled:n,...l,children:[De("div",{className:"line-clamp-1 flex-1",children:p instanceof Date?Ha(p,s):p&&typeof p=="object"&&"from"in p&&"to"in p?De(Cn,{children:p.from?p.to?ea(Cn,{children:[De("span",{className:"date-from",children:Ha(p.from,s)})," ",De("span",{className:"date-separator",children:"-"}),De("span",{className:"date-to",children:Ha(p.to,s)})]}):Ha(p.from,s):o}):o}),e&&De("span",{className:i("absolute -top-2 left-2 z-[1] bg-white px-1.5 text-xs text-gray-500",t===2&&" -top-2.5 text-sm",r&&"text-red-500"),children:e}),De(Md,{className:"ml-2 h-4 w-4 flex-none text-gray-500"})]})}),De(Mo,{className:"w-auto border-none !p-0",...d,children:De(za,{...c,defaultMonth:p&&typeof p=="object"&&"from"in p?p.from:p instanceof Date?p:void 0})})]}),a&&ea("div",{className:"mobase-text-input-message mt-0.5 flex items-center space-x-1",children:[r?De(Dd,{width:16,height:16,className:"text-red-500"}):De(Sd,{width:16,height:16,className:"text-gray-500"}),De("span",{className:i(r?"text-red-500":"text-gray-500",t===2?"text-sm":"text-xs"),children:a})]})]})};import{useEffect as zd,useState as In}from"react";import{QuestionMarkCircleIcon as Hd,XCircleIcon as _d}from"@heroicons/react/16/solid";import{isValid as Bd}from"date-fns";import*as st from"react";import{CheckIcon as Ad,ChevronDownIcon as Rn,ChevronUpIcon as Ld,XCircleIcon as Fd}from"@heroicons/react/16/solid";import{QuestionMarkCircleIcon as Ed}from"@heroicons/react/24/outline";import*as S from"@radix-ui/react-select";import{jsx as U,jsxs as ta}from"react/jsx-runtime";var oa=st.forwardRef(({className:e,children:o,label:t,message:a,size:r,isError:n,disabled:s,...l},m)=>ta("div",{ref:m,className:i("select-mobase relative",e,s?"disabled":"",n?"[&>.select-mobase-button]:border-red-500 [&>.select-mobase-button]:ring-1 [&>.select-mobase-button]:ring-red-500":"",r===2?"[&>.select-mobase-button]:h-12 [&>.select-mobase-button]:text-base":""),children:[t&&U("span",{className:i("mobase-select-label absolute -top-2 left-2 z-[1] bg-white px-1.5 text-xs text-gray-500",r===2&&"-top-2.5 text-sm",n&&"text-red-500"),children:t}),U(S.Root,{disabled:s,...l,children:o}),a&&ta("div",{className:i("mobase-select-message mt-1 flex items-center space-x-1 text-gray-500",n&&"text-red-500"),children:[n?U(Fd,{width:16,height:16}):U(Ed,{width:16,height:16}),U("span",{className:i(r===2?"text-sm":"text-xs"),children:a})]})]})),aa=S.Value,Io=st.forwardRef(({className:e,children:o,...t},a)=>ta(S.Trigger,{ref:a,className:i("select-mobase-button flex h-11 w-full items-center justify-between rounded-md border border-gray-300 bg-white p-3 text-sm text-gray-900 ring-0 ring-inset transition-all hover:ring-1 hover:ring-gray-400 focus-visible:border-pink-500 focus-visible:ring-1 focus-visible:!ring-pink-500 focus-visible:ring-offset-0 focus-visible:ring-offset-transparent disabled:pointer-events-none disabled:border-gray-200 disabled:bg-gray-50 data-[state=open]:border-pink-500 data-[placeholder]:text-gray-500 data-[state=open]:ring-1 data-[state=open]:ring-pink-500",e),...t,children:[U("div",{className:"line-clamp-1 text-left",children:o}),U(S.Icon,{asChild:!0,children:U(Rn,{className:"h-4 w-4 flex-none text-gray-500"})})]}));Io.displayName=S.Trigger.displayName;var Vr=st.forwardRef(({className:e,...o},t)=>U(S.ScrollUpButton,{ref:t,className:i("flex cursor-default items-center justify-center py-1",e),...o,children:U(Ld,{className:"h-5 w-5"})}));Vr.displayName=S.ScrollUpButton.displayName;var Wr=st.forwardRef(({className:e,...o},t)=>U(S.ScrollDownButton,{ref:t,className:i("flex cursor-default items-center justify-center bg-gradient-to-t from-white to-transparent py-1",e),...o,children:U(Rn,{className:"h-5 w-5"})}));Wr.displayName=S.ScrollDownButton.displayName;var Ao=st.forwardRef(({className:e,children:o,position:t="popper",...a},r)=>U(S.Portal,{children:ta(S.Content,{ref:r,className:i("shadow-small 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-96 min-w-[8rem] overflow-hidden rounded-md border border-gray-300 bg-white text-gray-900",t==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:t,...a,children:[U(Vr,{}),U(S.Viewport,{className:i("p-0",t==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:o}),U(Wr,{})]})}));Ao.displayName=S.Content.displayName;var ra=st.forwardRef(({className:e,children:o,...t},a)=>U(S.Group,{ref:a,className:i("relative border-b border-gray-200 p-1 after:w-full last:border-0",e),...t,children:o})),kn=st.forwardRef(({className:e,...o},t)=>U(S.Label,{ref:t,className:i("z-[1] py-1.5 pl-7 pr-2 text-sm font-semibold",e),...o}));kn.displayName=S.Label.displayName;var Gt=st.forwardRef(({className:e,children:o,...t},a)=>ta(S.Item,{ref:a,className:i("relative flex w-full cursor-default select-none items-center rounded-md py-1.5 pl-7 pr-2 text-sm outline-none focus:bg-gray-100 focus:text-gray-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t,children:[U("span",{className:"absolute left-2 flex h-4 w-4 items-center justify-center",children:U(S.ItemIndicator,{children:U(Ad,{className:"h-4 w-4 text-pink-500"})})}),U(S.ItemText,{children:o})]})),Tn=st.forwardRef(({className:e,...o},t)=>U(S.Separator,{ref:t,className:i("-mx-1 my-1 h-px",e),...o}));Tn.displayName=S.Separator.displayName;var Sn=["Th\xE1ng 01","Th\xE1ng 02","Th\xE1ng 03","Th\xE1ng 04","Th\xE1ng 05","Th\xE1ng 06","Th\xE1ng 07","Th\xE1ng 08","Th\xE1ng 09","Th\xE1ng 10","Th\xE1ng 11","Th\xE1ng 12"],Dn=["January","February","March","April","May","June","July","August","September","October","November","December"],Gr=(e,o,t,a)=>{let r=new Date(e,o,0).getDate(),n=t&&e===t.getFullYear()&&o===t.getMonth()+1?t.getDate():1,s=a&&e===a.getFullYear()&&o===a.getMonth()+1?a.getDate():r;return{daysInMonth:r,startDay:n,endDay:s}},Mn=(e,o,t,a)=>{let r=t?t.getFullYear():e,n=a?a.getFullYear():o;return Array.from({length:n-r+1},(s,l)=>n-l)};import{jsx as oe,jsxs as lt}from"react/jsx-runtime";var Od=({label:e,selected:o,onSelect:t,size:a=1,message:r,isError:n,disabled:s,dateFormat:l="dd/MM/yyyy",lang:m="vi",fromYear:c=1900,toYear:d=new Date().getFullYear(),disableUnselect:p=!1})=>{let[g,v]=In(o??null),y=Math.min(c,d),R=Math.max(c,d),N=l==="MM/yyyy",W=(P,_)=>{if(_===0){v(void 0),t?.(void 0);return}let F=g?.getFullYear()||new Date().getFullYear(),je=g?.getMonth()??0,Qe=g?.getDate()??1;P==="month"&&_!==null&&(je=_-1),P==="year"&&_!==null&&(F=_),N?Qe=1:P==="day"&&_!==null&&(Qe=_);let Ta=Gr(F,je+1).daysInMonth;Qe>Ta&&(Qe=1);let $o=new Date(F,je,Qe);Bd($o)&&(v($o),t?.($o))},[A,H]=In(!1),$e=P=>{H(P)};return zd(()=>{v(o??null)},[o]),lt("div",{className:i("relative",s&&"cursor-no-drop"),children:[lt("div",{className:i("relative block h-11 w-full rounded-md border border-gray-300 bg-white px-1 py-3 text-sm text-gray-900 outline-none ring-inset transition-all placeholder:text-gray-500 hover:ring-1 hover:ring-gray-400 focus:border-pink-500 focus:ring-1 focus:ring-gray-400 disabled:pointer-events-none disabled:border-gray-200 disabled:bg-gray-50",A&&"border-pink-500 ring-1 ring-pink-500",a===2&&"h-12 text-base",g?"":"text-gray-500",n&&"border-red-500 ring-1 ring-red-500",s&&"pointer-events-none select-none border-gray-200 bg-gray-50"),children:[e&&oe("span",{className:i("absolute -top-2 left-2 z-[1] bg-white px-1.5 text-xs text-gray-500",a===2&&" -top-2.5 text-sm",n&&"text-red-500"),children:e}),lt("div",{className:"flex h-full flex-row divide-x",children:[!N&<(oa,{value:g?g.getDate().toString().padStart(2,"0"):"",onValueChange:P=>W("day",parseInt(P,10)),onOpenChange:$e,className:"w-[30%]",children:[oe(Io,{className:"h-full w-full rounded-none border-none bg-transparent py-0 !ring-0 hover:!text-pink-500",children:oe(aa,{placeholder:m==="vi"?"Ng\xE0y":"Day"})}),oe(Ao,{onCloseAutoFocus:P=>P.preventDefault(),children:lt(ra,{children:[!p&&oe(Gt,{value:"0",className:"text-gray-600",children:m==="vi"?"B\u1ECF ch\u1ECDn":"None"}),Array.from({length:Gr(g?.getFullYear()||new Date().getFullYear(),(g?.getMonth()??0)+1).daysInMonth},(P,_)=>(_+1).toString().padStart(2,"0")).map(P=>oe(Gt,{value:P,children:P},P))]})})]}),lt(oa,{value:g?(g.getMonth()+1).toString():"",onValueChange:P=>W("month",parseInt(P,10)),onOpenChange:$e,className:i(N?"w-1/2":"w-2/5"),children:[oe(Io,{className:"h-full w-full !rounded-none border-none bg-transparent py-0 !ring-0 hover:!text-pink-500",children:oe(aa,{placeholder:m==="vi"?"Th\xE1ng":"Month"})}),oe(Ao,{onCloseAutoFocus:P=>P.preventDefault(),children:lt(ra,{children:[!p&&oe(Gt,{value:"0",className:"text-gray-600",children:m==="vi"?"B\u1ECF ch\u1ECDn":"None"}),Array.from({length:12},(P,_)=>_+1).map(P=>oe(Gt,{value:P.toString(),children:m==="vi"?Sn[P-1]:Dn[P-1]},P))]})})]}),lt(oa,{value:g?g.getFullYear().toString():"",onValueChange:P=>W("year",parseInt(P,10)),onOpenChange:$e,className:i(N?"w-1/2":"w-[30%]"),children:[oe(Io,{className:"h-full w-full !rounded-none border-none bg-transparent py-0 !ring-0 hover:!text-pink-500",children:oe(aa,{placeholder:m==="vi"?"N\u0103m":"Year"})}),oe(Ao,{onCloseAutoFocus:P=>P.preventDefault(),children:lt(ra,{children:[!p&&oe(Gt,{value:"0",className:"text-gray-600",children:m==="vi"?"B\u1ECF ch\u1ECDn":"None"}),Mn(y,R).map(P=>oe(Gt,{value:P.toString(),children:P},P))]})})]})]})]}),r&<("div",{className:"mobase-text-input-message mt-0.5 flex items-center space-x-1",children:[n?oe(_d,{width:16,height:16,className:"text-red-500"}):oe(Hd,{width:16,height:16,className:"text-gray-500"}),oe("span",{className:i(n?"text-red-500":"text-gray-500",a===2?"text-sm":"text-xs"),children:r})]})]})};import*as io from"react";import*as G from"@radix-ui/react-alert-dialog";import{jsx as Mt,jsxs as Gd}from"react/jsx-runtime";var Vd=G.Root,Wd=G.Trigger,An=G.Portal,$r=io.forwardRef(({className:e,...o},t)=>Mt(G.Overlay,{className:i("fixed inset-0 z-50 bg-black/70 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...o,ref:t}));$r.displayName=G.Overlay.displayName;var Ln=io.forwardRef(({className:e,...o},t)=>Gd(An,{children:[Mt($r,{}),Mt(G.Content,{ref:t,className:i("fixed left-[50%] w-[90vw] bg-white text-gray-700 border border-gray-300 top-[50%] z-50 grid w- max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-xl",e),...o})]}));Ln.displayName=G.Content.displayName;var Fn=({className:e,...o})=>Mt("div",{className:i("flex flex-col space-y-2 text-left",e),...o});Fn.displayName="AlertDialogHeader";var En=({className:e,...o})=>Mt("div",{className:i("flex flex-row justify-end space-x-4",e),...o});En.displayName="AlertDialogFooter";var zn=io.forwardRef(({className:e,...o},t)=>Mt(G.Title,{ref:t,className:i("text-lg text-gray-900 font-semibold",e),...o}));zn.displayName=G.Title.displayName;var Hn=io.forwardRef(({className:e,...o},t)=>Mt(G.Description,{ref:t,className:i("text-sm text-muted-foreground",e),...o}));Hn.displayName=G.Description.displayName;var _n=io.forwardRef(({className:e,...o},t)=>Mt(G.Action,{ref:t,className:i(tt({variant:"primary"}),"",e),...o}));_n.displayName=G.Action.displayName;var Bn=io.forwardRef(({className:e,...o},t)=>Mt(G.Cancel,{ref:t,className:i(tt({variant:"secondary"}),e),...o}));Bn.displayName=G.Cancel.displayName;import{memo as Kd,useState as Jd}from"react";import{useEffect as $d,useState as Vn}from"react";import Wn from"html-react-parser";import{motion as jd}from"motion/react";import*as On from"@radix-ui/react-aspect-ratio";var E=On.Root;import{Fragment as Gn,jsx as ae,jsxs as ia}from"react/jsx-runtime";var Qd=({guideGroup:e,mockup:o})=>{let[t,a]=Vn(),[r,n]=Vn(0),s={open:{height:"auto",opacity:1,transition:{duration:.3,ease:"easeInOut"}},closed:{height:0,opacity:0,transition:{duration:.3,ease:"easeInOut"}}};return $d(()=>{t&&(n(t.selectedScrollSnap()+1),t.on("select",()=>{n(t.selectedScrollSnap()+1)}))},[t]),ae(Gn,{children:e?.stepList&&e?.stepList?.length>0&&ia("div",{className:"mx-auto flex max-w-3xl flex-nowrap justify-center",children:[ae("div",{className:"h-auto w-64 flex-none",children:ia("div",{className:i("relative mx-auto w-full",o==="none"?"":"rounded-[2.5rem] border-8 border-gray-800 bg-gray-800 shadow-md",o==="small"?"px-1 py-5":""),children:[o!=="none"&&ia(Gn,{children:[ae("div",{className:"absolute -start-2.5 top-16 h-8 w-1.5 rounded-s-lg bg-gray-800"}),ae("div",{className:"absolute -start-2.5 top-32 h-12 w-1.5 rounded-s-lg bg-gray-800"}),ae("div",{className:"absolute -start-2.5 top-48 h-12 w-1.5 rounded-s-lg bg-gray-800"}),ae("div",{className:"absolute -end-2.5 top-40 h-16 w-1 rounded-e-lg bg-gray-800"})]}),ae("div",{className:i("relative h-full w-full overflow-hidden",o==="none"?"":"rounded-[2rem] bg-gray-200",o==="small"?"rounded-xl":""),children:ia(ue,{setApi:a,children:[ae(ve,{className:"ml-0",children:e?.stepList.map((l,m)=>ae(de,{className:"pl-0",children:ae(E,{ratio:o==="small"?540/960:540/1168,children:l?.image&&ae("img",{src:l.image,className:"size-full object-contain",alt:l.title})})},m))}),ae(ko,{className:"left-1 border-none bg-gray-900/30 text-white hover:bg-gray-900/40 disabled:hidden"}),ae(To,{className:"right-1 border-none bg-gray-900/30 text-white hover:bg-gray-900/40 disabled:hidden"})]})})]})}),ae("div",{className:"flex flex-auto pl-12 pt-4",children:ae("ul",{className:"flex flex-col",children:e?.stepList.map((l,m)=>ia("li",{className:i("relative min-h-20 pb-8 pl-14 after:absolute after:left-4 after:top-0 after:h-full after:border-l after:border-dashed after:border-gray-200 last:min-h-0 last:pb-0 last:after:hidden",m+1===r?"":"cursor-pointer"),onClick:()=>t&&t.scrollTo(m),children:[ae("div",{className:i("absolute -top-1.5 left-0 z-10 flex h-8 w-8 items-center justify-center rounded-full text-sm font-bold",m+1===r?"bg-pink-500 text-white":"bg-pink-100 text-pink-500"),children:m+1}),ae("div",{className:i(" text-sm font-medium",m+1===r?"text-pink-500":"text-gray-900"),children:Wn(l.title)}),l.content&&ae(jd.div,{initial:"closed",animate:m+1===r?"open":"closed",variants:s,style:{overflow:"hidden"},children:ae("div",{className:"mt-3 text-sm text-gray-700",children:Wn(l.content)})})]},m))})})]})})},jr=Qd;import{useEffect as Ud,useRef as qd,useState as _a}from"react";import{ChevronRightIcon as $n}from"@heroicons/react/20/solid";import Xd from"embla-carousel-autoplay";import Ba from"html-react-parser";import{Fragment as Qr,jsx as w,jsxs as Pe}from"react/jsx-runtime";var Yd=({open:e,setOpenDialog:o,dataStep:t,mockup:a})=>{let[r,n]=_a(0),[s,l]=_a();return Ud(()=>{s&&(n(s.selectedScrollSnap()+1),s.on("select",()=>{n(s.selectedScrollSnap()+1)}))},[s]),!t||!t?.stepList?.length?null:w(Se,{open:e,onOpenChange:o,children:Pe(we,{position:"bottom",height:"full",children:[w(Ot,{children:w(Vt,{className:"line-clamp-1",children:t?.title})}),Pe(ze,{className:"grid overflow-hidden p-0 ",children:[w(ue,{setApi:l,className:" grid overflow-hidden",children:w(ve,{className:"ml-0 h-full",children:t.stepList.map((m,c)=>w(de,{className:"h-full w-full pl-0",children:Pe("div",{className:"flex h-full flex-col overflow-y-auto",children:[w("div",{className:" relative flex w-full flex-none justify-center bg-gray-100 p-5",children:w("div",{className:i("mx-auto",a==="small"?"w-56":"w-52"),children:Pe("div",{className:i("relative mx-auto w-full",a==="none"?"":"rounded-[2rem] border-8 border-gray-800 bg-gray-800 shadow-md",a==="small"?"px-0.5 py-3":""),children:[a!=="none"&&Pe(Qr,{children:[w("div",{className:"absolute -start-2.5 top-16 h-8 w-1.5 rounded-s-lg bg-gray-800"}),w("div",{className:"absolute -start-2.5 top-32 h-12 w-1.5 rounded-s-lg bg-gray-800"}),w("div",{className:"absolute -start-2.5 top-48 h-12 w-1.5 rounded-s-lg bg-gray-800"}),w("div",{className:"absolute -end-2.5 top-40 h-16 w-1 rounded-e-lg bg-gray-800"})]}),w("div",{className:i("relative h-full w-full overflow-hidden",a==="none"?"":"rounded-[1.5rem] bg-gray-200",a==="small"?"rounded-xl":""),children:w(E,{ratio:a==="small"?540/960:540/1168,children:m?.image&&w("img",{src:m.image,className:"size-full object-contain",alt:m.title})})})]})})}),Pe("div",{className:"p-5 pb-12",children:[w("div",{className:"font-semibold",children:Ba(m.title)}),m?.content&&w("div",{className:"mt-3 text-sm text-gray-800",children:Ba(m.content)})]})]})},c))})}),w("div",{className:"text-muted-foreground fixed bottom-3 left-1/2 flex -translate-x-1/2 items-center justify-center gap-1.5 rounded-full bg-gray-900/50 px-3 py-1 py-2 text-center text-sm text-gray-700",children:t.stepList.map((m,c)=>w("div",{className:`h-2 w-2 cursor-pointer rounded-full ${c+1===r?"bg-white":"bg-white/40"}`,onClick:()=>s&&s.scrollTo(c)},c))})]})]})})},Zd=({dataGuide:e,mockup:o,isStep:t})=>{let[a,r]=_a(!1),[n,s]=_a(null),l=qd(Xd({delay:3500,stopOnInteraction:!1,stopOnMouseEnter:!1})),m=c=>{s(e?.[c]||null),r(!0)};return e?.length===0?null:Pe(Qr,{children:[e?.length>1?w("div",{className:"-mx-5 grid grid-cols-1 md:mx-0",children:e.map((c,d)=>Pe("div",{className:"relative flex cursor-pointer flex-nowrap items-center space-x-4 pl-5 ",onClick:()=>m(d),children:[w("div",{className:"borde flex h-28 w-20 justify-center overflow-hidden rounded-t-lg bg-gray-100 p-2 pb-0",children:(c?.avatar||c?.stepList?.[0]?.image)&&w("img",{src:c.avatar||c?.stepList?.[0]?.image,className:"h-full w-full object-cover object-top",alt:c.title})}),Pe("div",{className:i("relative grid min-h-32 flex-1 grid-cols-1 items-center pr-8 ",d+1!=e.length&&"after:absolute after:bottom-0 after:left-0 after:right-0 after:h-px after:bg-gray-200"),children:[Pe("div",{className:"py-2",children:[t&&w("span",{className:"text-sm font-medium text-pink-500",children:`B\u01B0\u1EDBc ${d+1}`}),w("div",{className:"font-semibold",children:Ba(c.title)}),c?.description&&w("div",{className:"mt-1 text-sm text-gray-500",children:Ba(c.description)})]}),w("div",{className:" absolute right-4 top-1/2 -translate-y-1/2 text-gray-500",children:w($n,{className:"h-6 w-6"})})]})]},d))}):e?.[0]&&e[0].stepList?.length>0&&Pe("div",{className:"mx-auto flex max-w-3xl flex-col flex-wrap justify-center gap-y-6",children:[w("div",{className:"relative max-h-96 w-full flex-none overflow-hidden",style:{WebkitMask:"linear-gradient(to bottom, rgba(0, 0, 0, 1.0) 95%, rgba(0, 0, 0, 0.3) 98%, transparent 100%)"},children:w("div",{className:"mx-auto h-auto w-72",children:Pe("div",{className:i("relative mx-auto w-full",o==="none"?"":"rounded-[2.5rem] border-8 border-gray-800 bg-gray-800 shadow-md",o==="small"?"px-1 py-5":""),children:[o!=="none"&&Pe(Qr,{children:[w("div",{className:"absolute -start-2.5 top-16 h-8 w-1.5 rounded-s-lg bg-gray-800"}),w("div",{className:"absolute -start-2.5 top-32 h-12 w-1.5 rounded-s-lg bg-gray-800"}),w("div",{className:"absolute -start-2.5 top-48 h-12 w-1.5 rounded-s-lg bg-gray-800"}),w("div",{className:"absolute -end-2.5 top-40 h-16 w-1 rounded-e-lg bg-gray-800"})]}),w("div",{className:i("relative h-full w-full overflow-hidden",o==="none"?"":"rounded-[2rem] bg-gray-200",o==="small"?"rounded-xl":""),children:w(ue,{plugins:[l.current],children:w(ve,{className:"ml-0",children:e[0]?.stepList.map((c,d)=>w(de,{className:"pl-0",onClick:()=>m(0),children:w(E,{ratio:o==="small"?540/960:540/1168,children:c?.image&&w("img",{src:c.image,className:"size-full object-contain",alt:c.title})})},d))})})})]})})}),w("div",{className:"flex w-full flex-none justify-center",children:Pe(ie,{size:"lg",variant:"primary",onClick:()=>m(0),children:["Xem chi ti\u1EBFt h\u01B0\u1EDBng d\u1EABn ",w($n,{className:"ml-1 h-5 w-5"})]})})]}),a&&w(Yd,{open:a,setOpenDialog:r,dataStep:n,mockup:o})]})},jn=Zd;import{Fragment as ep,jsx as pe,jsxs as na}from"react/jsx-runtime";var Qn=({direction:e,className:o})=>{let t=e==="left"?{viewBox:"0 0 20 40",d:"M20 0H0L18 20L0 40H20V0Z",width:"20"}:{viewBox:"0 0 19 40",d:"M0.906128 0H0V40H0.906128L19 20L0.906128 0Z",width:"19"};return pe("svg",{fill:"none",viewBox:t.viewBox,xmlns:"http://www.w3.org/2000/svg",className:i("flex-0 absolute w-5 transition-all",o),children:pe("path",{d:t.d,fill:"currentColor"})})},Ur=Kd(({dataHeading:e,dataHorizontalScroll:o,dataGuide:t,dataButtons:a,mockup:r,isStep:n})=>{let{showGradientOverlay:s=!0,gradientOverlayColor:l,className:m}=o||{},[c,d]=Jd(t?.[0]?.title||"");return na(ep,{children:[e&&pe(h,{tagline:e?.tagline,title:e?.title,description:e?.description,tagHeading:e?.tagHeading,align:"center",colorScheme:e?.colorScheme||"pink",sizeHeading:e?.sizeHeading,className:i(e?.className)}),t&&t?.length>0&&na(No,{children:[pe(et,{lessThan:"md",children:pe(jn,{dataGuide:t,mockup:r,isStep:n})}),pe(et,{greaterThan:"sm",children:t?.length>1?na(St,{defaultValue:t[0]?.title,onValueChange:p=>d(p),children:[na(Ct,{showGradientOverlay:s,gradientOverlayColor:l,className:m,children:[pe(Rt,{className:"mb-6 text-center",children:pe(ot,{className:i("mx-auto mb-0 inline-flex w-auto items-center overflow-visible",n?"space-x-10":""),children:t.map((p,g)=>{let v=g===t.length-1,y=c===p?.title||"";return na(at,{value:p.title,className:i(n?"relative h-10 border-0 bg-pink-100 px-3 first:rounded-l-md first:pl-5 last:rounded-r-md last:pl-3 last:pr-5":"",y&&n?"data-[state=active]:bg-pink-500 data-[state=active]:text-white":""),children:[n&&g!==0&&pe(Qn,{direction:"left",className:i("right-full top-0",y?"text-pink-500":"text-pink-100")}),p.title,n&&!v&&pe(Qn,{direction:"right",className:i("left-full top-0",y?"text-pink-500":"text-pink-100")})]},p.title+g)})})}),pe(kt,{}),pe(Tt,{})]}),t.map((p,g)=>pe(rt,{value:p.title,children:pe(jr,{guideGroup:p,mockup:r})},p.title+g))]}):t?.length===1&&t[0]&&pe(jr,{guideGroup:t[0],mockup:r})})]}),a&&pe(x,{isFullInMobile:a?.isFullInMobile,buttons:a?.buttons,className:a?.className,align:"center"})]})});import{Fragment as rp,jsx as sa}from"react/jsx-runtime";var tp=({template:e,dataHeading:o,dataGuide:t,dataHorizontalScroll:a,dataButtons:r,mockup:n,isStep:s})=>{switch(e){case 1:return sa(Ur,{dataHeading:o,dataHorizontalScroll:a,dataGuide:t,dataButtons:r,mockup:n,isStep:s});default:return sa(Ur,{dataHeading:o,dataHorizontalScroll:a,dataGuide:t,dataButtons:r,mockup:n,isStep:s})}},op=({dataHeading:e,dataHorizontalScroll:o,dataGuide:t,dataButtons:a,template:r,mockup:n,isStep:s})=>sa(rp,{children:tp({dataHeading:e,dataHorizontalScroll:o,dataGuide:t,dataButtons:a,template:r,mockup:n,isStep:s})}),ap=({idSection:e,dataHeading:o,dataGuide:t,dataHorizontalScroll:a,dataButtons:r,className:n,background:s,template:l=1,mockup:m="default",isStep:c=!1})=>sa(B,{className:i(n),background:s,idSection:e,children:sa(op,{dataHeading:o,template:l,dataHorizontalScroll:a,dataGuide:t,dataButtons:r,mockup:m,isStep:c})});import{useState as Un}from"react";import It from"html-react-parser";import{Fragment as qr,jsx as z,jsxs as At}from"react/jsx-runtime";var qn="text-xs font-medium md:text-sm",ip=({gift:e,onOpenModal:o})=>{let t=!!e.useModal,a=!!e.btnLink?.trim(),r=e.btnName?It(e.btnName||"Xem chi ti\u1EBFt"):null,n=s=>{s.stopPropagation(),o(e)};return z("div",{className:"w-full px-2.5 md:w-1/2 lg:w-1/3",children:At("div",{className:i("relative h-full rounded-xl border border-gray-200 bg-white p-2 transition-all duration-300",e.isFeatured&&"border-pink-500",t&&"cursor-pointer ring-inset hover:border-pink-500 hover:shadow-lg hover:shadow-pink-500/20 hover:ring-1 hover:ring-pink-500"),role:t?"button":void 0,tabIndex:t?0:void 0,onClick:()=>t&&o(e),children:[e.tag&&At("span",{className:"absolute -top-2 right-2 z-10 inline-flex",children:[z("span",{className:"rounded-bl-md rounded-br-md bg-red-600 px-2 py-0.5 text-xs font-semibold uppercase text-white shadow-sm",children:It(e.tag)}),z("span",{"aria-hidden":!0,className:"absolute right-full top-0 h-0 w-0 border-r-8 border-t-8 border-r-red-800 border-t-transparent"})]}),At("div",{className:"relative z-10 flex h-full flex-row items-stretch gap-3",children:[e.thumbnail&&z("div",{className:"w-28 flex-none shrink-0 md:w-32",children:z(E,{ratio:1,className:"w-full",children:z("img",{src:e.thumbnail,alt:e.title||"Gift image",className:"h-full w-full rounded-md object-contain"})})}),At("div",{className:"flex min-w-0 flex-1 flex-col",children:[At("div",{className:"flex-1",children:[e.serviceName?z("span",{className:"mb-1.5 mt-1 block text-xs font-medium text-gray-700 md:mb-2",children:It(e.serviceName)}):z(qr,{}),z("h3",{className:"text-base font-semibold text-gray-900 md:text-lg",children:It(e.title)}),e.description&&z("p",{className:"line-clamp-2 text-sm text-gray-600",children:It(e.description)})]}),z("div",{className:"mt-auto flex flex-none justify-end pt-1 md:pt-2",children:r&&(a?z(ie,{variant:"primary",className:qn,asChild:!0,children:z("a",{href:e.btnLink,target:e.newTab?"_blank":"_self",rel:"noreferrer",onClick:s=>s.stopPropagation(),children:r})}):z(ie,{variant:"primary",size:"default",className:qn,type:"button",onClick:n,children:r}))})]})]})]})})},Oa=({dataHeading:e,dataButtons:o,dataGiftList:t})=>{let[a,r]=Un(null),[n,s]=Un(!1),l=m=>{r(m),s(!0)};return At(qr,{children:[e&&z(h,{align:e.align||"center",tagline:e.tagline,title:e.title,description:e.description,tagHeading:e.tagHeading,colorScheme:e.colorScheme||"pink",sizeHeading:e.sizeHeading,className:e.className}),t&&t.length>0&&z("div",{className:"-mx-2.5 mt-8 flex flex-wrap justify-center gap-y-5 md:mt-10",children:t.map((m,c)=>z(ip,{gift:m,onOpenModal:l},c))}),o&&z(x,{isFullInMobile:o.isFullInMobile,buttons:o.buttons,className:o.className,align:o.align||"center"}),n&&z(Se,{open:n,onOpenChange:s,children:At(we,{size:"lg",position:"bottom",children:[z(Ot,{children:z(Vt,{children:"Th\xF4ng tin chi ti\u1EBFt th\u1EBB qu\xE0"})}),At(ze,{children:[At("div",{className:"text-center",children:[a?.serviceName&&z("span",{className:"mb-1 block text-xs font-medium text-gray-500",children:It(a.serviceName)}),a?.title&&z("h3",{className:"text-xl font-bold md:text-2xl",children:It(a.title)}),a?.description&&z("p",{className:"mt-1 text-sm text-gray-700",children:It(a.description||"")})]}),a?.content?z("div",{className:"prose prose-sm mt-6 max-w-none",children:It(a.content)}):z(qr,{})]}),z(Sa,{children:z(Ne,{variant:"primary",size:"default",onClick:()=>s(!1),children:"\u0110\xF3ng"})})]})})]})};import{jsx as Xr}from"react/jsx-runtime";var np=({template:e,dataHeading:o,dataButtons:t,dataGiftList:a})=>{switch(e){case 1:return Xr(Oa,{dataHeading:o,dataButtons:t,dataGiftList:a});default:return Xr(Oa,{dataHeading:o,dataButtons:t,dataGiftList:a})}},sp=({template:e=1,className:o,idSection:t,background:a,dataHeading:r,dataButtons:n,dataGiftList:s})=>Xr(B,{idSection:t,className:o,background:a,children:np({template:e,dataHeading:r,dataButtons:n,dataGiftList:s})});import{ChevronLeft as lp,ChevronRight as mp}from"lucide-react";import{Fragment as cp,jsx as _e,jsxs as Xn}from"react/jsx-runtime";function Yn({current:e,total:o,onChange:t}){let a=r=>_e("li",{children:_e("button",{className:i(ro({variant:e===r?"outline":"secondary",size:"sm"})),onClick:()=>t(r),children:r})},r);return _e("nav",{role:"navigation","aria-label":"pagination",className:i("mx-auto flex w-full justify-center"),children:Xn("ul",{className:i("flex flex-row flex-wrap items-center gap-2"),children:[o>1&&_e("li",{children:_e("button",{className:i(ro({variant:"secondary",size:"sm"})),disabled:e===1,onClick:()=>e>1&&t(e-1),children:_e(lp,{className:"h-4 w-4"})})}),o<=6?Array(o).fill(0).map((r,n)=>a(n+1)):Xn(cp,{children:[a(1),e===1&&[a(2),a(3)],e>3&&_e("li",{children:_e("button",{className:i(ro({variant:"secondary",size:"sm"})),disabled:e===1,onClick:()=>t(e-3),children:"..."})}),e>2&&e!==1&&e!==o&&a(e-1),e>1&&e<o&&a(e),e<o-1&&e!==1&&a(e+1),e===o&&[a(o-2),a(o-1)],e<o-2&&e!==o&&_e("button",{className:i(ro({variant:"secondary",size:"sm"})),disabled:e===1,onClick:()=>t(e+3),children:"..."}),a(o)]}),o>1&&_e("li",{children:_e("button",{className:i(ro({variant:"secondary",size:"sm"})),disabled:e===o,onClick:()=>e<o&&t(e+1),children:_e(mp,{className:"h-4 w-4"})})})]})})}import{forwardRef as dp}from"react";import{QuestionMarkCircleIcon as pp}from"@heroicons/react/24/outline";import{XCircleIcon as fp}from"@heroicons/react/24/solid";import{jsx as Lo,jsxs as Zn}from"react/jsx-runtime";var Yr=dp(({disabled:e,isError:o,message:t,label:a,className:r,inputClassName:n,size:s,rows:l=3,...m},c)=>Zn("div",{className:i("relative",r,o&&"mobase-text-area-error"),children:[a&&Lo("span",{className:i("mobase-text-area-label absolute -top-2.5 left-2 z-[1] bg-white px-1.5 text-sm text-gray-500",s===2&&" -top-2.5 text-sm"),children:a}),Lo("textarea",{disabled:e,ref:c,className:i("mobase-text-area-box block w-full rounded-md border border-gray-300 bg-white p-3 text-sm text-gray-900 outline-none transition-all placeholder:text-gray-500 focus:border-pink-500 disabled:border-gray-200 disabled:bg-gray-50",s===2&&"text-base",n),rows:l,...m}),t&&Zn("div",{className:"mobase-text-area-message mt-0.5 flex items-center space-x-1",children:[o?Lo(fp,{width:16,height:16,className:"text-red-500"}):Lo(pp,{width:16,height:16,className:"text-gray-500"}),Lo("span",{className:i("text-gray-500 ",s===2?"text-sm":"text-xs"),children:t})]}),Lo("style",{children:`
|
|
70
|
+
`})]}),oo=({className:e,children:o,title:t,shortTitle:a,qrImage:r,qrLink:n,logoQr:s,isQrForAll:l=!1,...m})=>D(Se,{...m,children:D(we,{className:i("h-auto max-h-screen overflow-hidden border-0 md:max-h-screen md:max-w-2xl lg:max-w-3xl [&>button>svg]:text-white",e),size:"xl",positionRightCloseBtn:!0,children:D(ze,{className:"p-0",children:ge("div",{className:"flex flex-row flex-wrap",children:[D("div",{className:"hidden flex-none w-full sm:block md:w-5/12",children:o||ge("div",{className:"grid grid-cols-1 gap-y-6 px-5 py-8 text-sm",children:[ge("div",{className:"flex flex-nowrap items-center",children:[D("div",{className:"flex-none",children:D("img",{className:"w-20",loading:"lazy",src:"https://homepage.momocdn.net/images/s/momo-upload-api-200917091602-637359309621891617.png",alt:"Step 1"})}),ge("div",{className:"flex-1 pl-4",children:[D("div",{className:"font-semibold text-gray-800 step",children:"B\u01B0\u1EDBc 1 :"}),D("div",{className:"mt-1 text-gray-500",children:l?"M\u1EDF app MoMo ho\u1EB7c \u1EE9ng d\u1EE5ng ng\xE2n h\xE0ng/v\xED \u0111i\u1EC7n t\u1EED ch\u1EA5p nh\u1EADn m\xE3 v\u1EA1ch t\u1EEB QR \u0110a N\u0103ng":"M\u1EDF \u1EE9ng d\u1EE5ng camera m\u1EB7c \u0111\u1ECBnh ho\u1EB7c \u1EE9ng d\u1EE5ng h\u1ED7 tr\u1EE3 QR code c\u1EE7a b\u1EA1n"})]})]}),ge("div",{className:"flex flex-nowrap items-center",children:[D("div",{className:"flex-none",children:D("img",{className:"w-20",loading:"lazy",src:"https://homepage.momocdn.net/images/s/momo-upload-api-200917091443-637359308837905996.png",alt:"Step 2"})}),ge("div",{className:"flex-1 pl-4",children:[D("div",{className:"font-semibold text-gray-800 step",children:"B\u01B0\u1EDBc 2 :"}),D("div",{className:"mt-1 text-gray-500",children:"Qu\xE9t m\xE3 QR Code theo h\xECnh b\xEAn ph\u1EA3i"})]})]}),ge("div",{className:"flex flex-nowrap items-center",children:[D("div",{className:"flex-none",children:D("img",{className:"w-20",loading:"lazy",src:"https://homepage.momocdn.net/images/s/momo-upload-api-200917090146-637359301062519803.png",alt:"Step 3"})}),ge("div",{className:"flex-1 pl-4",children:[D("div",{className:"font-semibold text-gray-800 step",children:"B\u01B0\u1EDBc 3 :"}),ge("div",{className:"mt-1 text-gray-500",children:["B\u1EA5m v\xE0o th\xF4ng b\xE1o hi\u1EC3n th\u1ECB \u0111\u1EC3 t\u1EA3i \u1EE9ng d\u1EE5ng ho\u1EB7c"," ",a||"Truy c\u1EADp ngay"]})]})]})]})}),D("div",{className:"flex justify-center items-center w-full h-auto md:w-7/12",style:{background:"url(https://homepage.momocdn.net/jk/momo2020/img/intro/qrcode-pattern.png) 10px 10px no-repeat,linear-gradient(to top,#c1177c,#e11b90)"},children:ge("div",{className:"px-5 py-10 text-center",children:[t&&D("h4",{className:"mb-5 text-base font-semibold text-white",children:t}),ge("div",{className:"relative",children:[l&&D("div",{className:"absolute -top-2 left-1/2 z-[5] -translate-x-1/2",children:D("img",{src:"https://homepage.momocdn.net/fileuploads/svg/momo-file-231211170324.svg",alt:"Title QR all"})}),D(vc,{img:r,isQrForAll:l,children:n&&D(uc,{value:n,size:215,imageSettings:{src:`${s||"https://homepage.momocdn.net/pwa/images/logoMomox50.png"}`,height:50,width:50,excavate:!0},level:"H"})})]})]})})]})})})});import{useEffect as hc,useLayoutEffect as xc,useState as bc}from"react";import yc from"ua-parser-js";var Nc=()=>yc().device.type==="mobile",wc=typeof window<"u"?xc:hc,Co=()=>{let[e,o]=bc(!1);return wc(()=>{o(Nc())},[]),e};import{Fragment as Cc,jsx as Da,jsxs as Rc}from"react/jsx-runtime";var Ue=({action:e,newTab:o,offset:t,dialogQrProps:a,className:r,children:n,onPushTrackingEvent:s,...l})=>{let[m,c]=Pc(!1),d=Co(),p=!!a?.qrLink,g=()=>{let A=p?a?.qrLink:e;return typeof A=="string"?A.trim():""},v=()=>{s?.();let A=g();!A&&typeof e!="function"||(typeof e=="function"?e():window.open(A,o?"_blank":"_self"))},y=(A,H=0)=>{let $e=document.querySelector(A);if(!$e)return;let _=$e.getBoundingClientRect().top+window.scrollY-H;window.scrollTo({top:_,behavior:"smooth"})},R=()=>{s?.(),typeof e=="string"&&e.startsWith("#")?y(e,t):v()},N=()=>Rc(Cc,{children:[Da(Ne,{...l,className:r,onClick:()=>{c(!0),s?.()},"data-name":"button-action-with-qr",children:n}),Da(oo,{...a,open:m,onOpenChange:()=>c(!1),qrLink:a?.qrLink||""})]});return p?d?a?.isQrForAll?N():Da(Ne,{...l,className:r,onClick:v,"data-name":"button-action-with-qr",children:n}):N():Da(Ne,{...l,onClick:R,className:i("cursor-pointer",r),"data-name":"button-action-without-qr",rel:"noreferrer",children:n})};import*as Ro from"react";import{ChevronRightIcon as kc,DotsHorizontalIcon as Tc}from"@radix-ui/react-icons";import{Slot as Sc}from"@radix-ui/react-slot";import{jsx as Pt,jsxs as Dc}from"react/jsx-runtime";var on=Ro.forwardRef(({className:e,...o},t)=>Pt("nav",{ref:t,"aria-label":"breadcrumb",className:i("",e),...o}));on.displayName="Breadcrumb";var an=Ro.forwardRef(({className:e,...o},t)=>Pt("ol",{ref:t,className:i("flex items-center gap-2 break-words text-sm overflow-x-auto snap-mandatory snap-x [&::-webkit-scrollbar]:hidden",e),...o}));an.displayName="BreadcrumbList";var rn=Ro.forwardRef(({className:e,...o},t)=>Pt("li",{ref:t,className:i("shrink-0 text-gray-900 hover:text-pink-500",e),...o}));rn.displayName="BreadcrumbItem";var nn=Ro.forwardRef(({asChild:e,className:o,...t},a)=>Pt(e?Sc:"a",{ref:a,className:i("transition-colors hover:text-foreground",o),...t}));nn.displayName="BreadcrumbLink";var sn=Ro.forwardRef(({className:e,...o},t)=>Pt("span",{ref:t,role:"link","aria-disabled":"true","aria-current":"page",className:i("text-sm text-gray-500",e),...o}));sn.displayName="BreadcrumbPage";var ln=({children:e,className:o,...t})=>Pt("li",{role:"presentation","aria-hidden":"true",className:i("text-gray-900",o),...t,children:e??Pt(kc,{className:"w-2 h-2"})});ln.displayName="BreadcrumbSeparator";var mn=({className:e,...o})=>Dc("span",{role:"presentation","aria-hidden":"true",className:i("flex h-5 w-5 items-center justify-center",e),...o,children:[Pt(Tc,{className:"w-4 h-4 text-gray-900"}),Pt("span",{className:"sr-only",children:"More"})]});mn.displayName="BreadcrumbElipssis";import Er from"html-react-parser";import{createContext as Mc,useContext as cn}from"react";import{jsx as Xo}from"react/jsx-runtime";var Mr=Mc({align:"center"}),Ir=({color:e="pink",size:o="small",isTruncated:t=!1,className:a,children:r})=>{let n={regular:"text-gray-900",pink:"text-pink-500",white:"text-white"},s={small:"text-sm",large:"text-lg"};return Xo("div",{className:i("mb-1 font-semibold",n[e],s[o],t&&"truncate",a),children:r})},Ar=({tagHeading:e="h2",size:o="small",color:t="pink",isTruncated:a=!1,className:r,children:n})=>{let s=e,l={regular:"text-gray-900",pink:"text-pink-500",white:"text-white"},m={small:"lg:text-3xl text-2xl",large:"lg:text-4xl md:text-3xl text-2xl"},{align:c}=cn(Mr);return Xo(s,{className:i("max-w-4xl font-bold",c==="center"?"mx-auto":c==="right"?"ml-auto":"",l[t],m[o],a&&"truncate",r),children:n})},Lr=({color:e="regular",size:o="small",marginTop:t="spacingX",isTruncated:a=!1,className:r,children:n})=>{let s={regular:"text-gray-500",white:"text-white/80"},l={small:"text-base",large:"md:text-lg text-base"},m={none:"",spacingX:"mt-2",spacingM:"mt-3",spacingL:"mt-4",spacingXl:"mt-5",spacing2Xl:"mt-6"},{align:c}=cn(Mr);return Xo("div",{className:i(c==="center"?"mx-auto max-w-2xl":c==="right"?"ml-auto max-w-4xl":"max-w-4xl",s[e],l[o],m[t],a&&"truncate",r),children:n})},Fr=({className:e,align:o="center",children:t})=>Xo("div",{className:i("mb-5 md:mb-8",{left:"text-left",center:"text-center",right:"text-right"}[o],e),children:Xo(Mr.Provider,{value:{align:o},children:t})});import{jsx as ao,jsxs as Ic}from"react/jsx-runtime";var B=({idSection:e,className:o,background:t,children:a})=>ao("section",{id:e,className:i("block-section py-8 md:py-10 lg:py-14",o),style:{background:t},children:ao("div",{className:"wrapper relative",children:a})}),h=({align:e="center",tagline:o,title:t,description:a,tagHeading:r="h2",colorScheme:n="pink",sizeHeading:s="small",className:l})=>{let m=n==="black"?"pink":n==="pink"?"regular":"white",c=n==="pink"?"pink":n==="white"?"white":"regular",d=n==="white"?"white":"regular";return!t&&!a&&!o?null:Ic(Fr,{align:e,className:l,children:[o&&ao(Ir,{color:m,children:o}),t&&ao(Ar,{tagHeading:r,color:c,size:s,children:Er(t)}),a&&ao(Lr,{color:d,size:"large",marginTop:s==="large"?"spacing2Xl":"spacingX",children:Er(a)})]})},x=({align:e,isFullInMobile:o=!1,buttons:t,className:a})=>t?.length===0?null:ao("div",{className:i("buttons-block mt-8 flex w-full gap-4 md:mt-10",e==="center"&&"justify-center",e==="right"&&"justify-end",o&&"flex-wrap md:flex-nowrap",a),children:t?.slice(0,2).map((r,n)=>{if(!r)return null;let{btnName:s,...l}=r;return ao(Ue,{...l,dataUmamiEventText:Bt(s),className:i(o&&"w-full md:w-auto",r?.className),children:Er(s)},n)})});import Qc,{memo as Uc}from"react";import{ArrowDownIcon as qc}from"@heroicons/react/20/solid";import Xc from"html-react-parser";import{createContext as Ec,useCallback as zc,useContext as zr,useEffect as Hc,useRef as _c,useState as Bc}from"react";import{ChevronLeft as Oc,ChevronRight as Vc}from"lucide-react";import*as dn from"react";import{Slot as Ac}from"@radix-ui/react-slot";import{cva as Lc}from"class-variance-authority";import{jsx as Fc}from"react/jsx-runtime";var ro=Lc("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-semibold transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed border border-transparent",{variants:{variant:{primary:"bg-pink-500 text-white hover:bg-pink-600 disabled:bg-pink-300",secondary:"bg-white text-gray-900 hover:bg-gray-100 disabled:text-gray-400 disabled:bg-white border-gray-300",outline:"border-pink-500 text-pink-500 bg-white hover:bg-pink-50 disabled:bg-white disabled:border-pink-300 disabled:text-pink-300",tonal:"bg-pink-100 text-pink-500 hover:bg-pink-200 disabled:bg-gray-200 disabled:text-gray-400",danger:"bg-red-500 text-white hover:bg-red-600 disabled:bg-red-300",transparent:"text-gray-900 bg-transparent hover:bg-gray-100 disabled:text-gray-400 disabled:bg-transparent"},size:{default:"text-sm h-10 w-10",sm:"h-8 w-8 text-sm",lg:"h-12 w-12 text-base"}},defaultVariants:{variant:"primary",size:"default"}}),se=dn.forwardRef(({className:e,variant:o="primary",size:t="default",asChild:a=!1,isDisabled:r=!1,...n},s)=>{let l=a?Ac:"button",m=i(ro({variant:o,size:t,className:e}));return Fc(l,{className:m,disabled:r,ref:s,...n,children:n.children})});se.displayName="IconButton";import{Fragment as Wc,jsx as Wt,jsxs as pn}from"react/jsx-runtime";var Ma=Ec(void 0),Ct=({showGradientOverlay:e=!0,gradientOverlayColor:o="255, 255, 255",className:t,children:a})=>{let r=_c(null),[n,s]=Bc({left:!1,right:!1}),l=zc(()=>{let c=r.current;if(c){let{scrollLeft:d,scrollWidth:p,clientWidth:g}=c;s({left:d>0,right:Math.ceil(d+g)<p})}},[]);Hc(()=>{let c=r.current;if(c)return l(),window.addEventListener("resize",l),c.addEventListener("scroll",l),()=>{window.removeEventListener("resize",l),c.removeEventListener("scroll",l)}},[l]);let m=c=>{let d=r.current;if(d){let{scrollLeft:p,clientWidth:g,scrollWidth:v}=d,y=g*.7*(c==="left"?-1:1),R=p+y;R<0?R=0:R>v-g&&(R=v-g),d.scrollTo({left:R,behavior:"smooth"})}};return Wt(Ma.Provider,{value:{scrollContainerRef:r,showArrows:n,scroll:m,gradientOverlayColor:o},children:pn("div",{className:i("relative w-full",t),children:[e&&pn(Wc,{children:[n.left&&Wt("div",{className:"pointer-events-none absolute left-0 top-1/2 z-10 flex h-full w-16 -translate-y-1/2 items-center",style:{background:`linear-gradient( to left, rgba(255, 255, 255, 0),rgb(${o}),rgb(${o}))`}}),n.right&&Wt("div",{className:"pointer-events-none absolute right-0 top-1/2 z-10 flex h-full w-16 -translate-y-1/2 items-center",style:{background:`linear-gradient(to right, rgba(255, 255, 255, 0), rgb(${o}),rgb(${o}))`}})]}),a]})})},Rt=({className:e,children:o})=>{let t=zr(Ma);if(!t)throw new Error("HorizontalContent must be used within a HorizontalScroll");return Wt("div",{ref:t.scrollContainerRef,className:i("scrollbar-hide overflow-x-auto scroll-smooth",e),role:"region","aria-label":"Scrollable content",children:o})},kt=({className:e,children:o,...t})=>{let a=zr(Ma);if(!a)throw new Error("HorizontalNavigation must be used within a HorizontalScroll");return a.showArrows.left?Wt(se,{className:i("pointer-events-auto absolute left-0.5 top-1/2 z-10 h-6 w-6 -translate-y-1/2 rounded-full",e),onClick:()=>a.scroll("left"),"aria-label":"Scroll left",size:t.size||"sm",variant:t.variant||"secondary",...t,children:o||Wt(Oc,{className:"h-4 w-4"})}):null},Tt=({className:e,children:o,...t})=>{let a=zr(Ma);if(!a)throw new Error("HorizontalNavigation must be used within a HorizontalScroll");return a.showArrows.right?Wt(se,{className:i("pointer-events-auto absolute right-0.5 top-1/2 z-10 h-6 w-6 -translate-y-1/2 rounded-full",e),onClick:()=>a.scroll("right"),"aria-label":"Scroll right",size:t.size||"sm",variant:t.variant||"secondary",...t,children:o||Wt(Vc,{className:"h-4 w-4"})}):null};import*as Ia from"react";import*as qe from"@radix-ui/react-tabs";import{jsx as Hr}from"react/jsx-runtime";var St=qe.Root,ot=Ia.forwardRef(({className:e,size:o="sm",isDivider:t=!1,...a},r)=>Hr(qe.List,{ref:r,className:i("inline-flex w-full flex-row items-center space-x-5 overflow-x-auto [&::-webkit-scrollbar]:hidden",`text-${o}`,t&&"border-b border-gray-200",e),...a}));ot.displayName=qe.List.displayName;var at=Ia.forwardRef(({className:e,...o},t)=>Hr(qe.Trigger,{ref:t,className:i("ring-offset-background focus-visible:ring-ring inline-flex items-center justify-center whitespace-nowrap border-b-2 border-transparent py-3 font-semibold text-gray-900 transition-all hover:text-pink-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:border-pink-500 data-[state=active]:text-pink-500",e),...o}));at.displayName=qe.Trigger.displayName;var rt=Ia.forwardRef(({className:e,...o},t)=>Hr(qe.Content,{ref:t,className:i("ring-offset-background focus-visible:ring-ring mt-3 text-gray-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",e),...o}));rt.displayName=qe.Content.displayName;import*as fn from"react";import{Slot as Gc}from"@radix-ui/react-slot";import{cva as $c}from"class-variance-authority";import{jsx as jc}from"react/jsx-runtime";var gn=$c("inline-flex items-center justify-center whitespace-nowrap font-semibold transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed border border-transparent flex-nowrap",{variants:{variant:{default:"text-blue-700 hover:underline hover:bg-blue-50 disabled:bg-transparent disabled:text-gray-400 disabled:no-underline",primary:"text-pink-500 hover:underline hover:bg-pink-50 disabled:bg-transparent disabled:text-gray-400 disabled:no-underline",secondary:"text-gray-700 hover:underline hover:text-blue-700 hover:bg-blue-50 disabled:bg-transparent disabled:text-gray-400 disabled:no-underline"},size:{default:"text-sm",lg:"text-base"}},defaultVariants:{variant:"default",size:"default"}}),ie=fn.forwardRef(({className:e,variant:o="default",size:t="default",asChild:a=!1,isDisabled:r=!1,...n},s)=>{let l=a?Gc:"button",m=i(gn({variant:o,size:t,className:e}));return jc(l,{className:m,disabled:r,ref:s,...n,children:n.children})});ie.displayName="TextButton";import{Fragment as un,jsx as j,jsxs as it}from"react/jsx-runtime";var Yc=({blog:e})=>{let o=(t,a)=>{t?.preventDefault(),t?.stopPropagation(),window.open(a,"_blank")};return it(un,{children:[j("div",{className:"flex-none pr-3 basis-1/2 md:basis-full md:pr-0",children:j("div",{className:"relative block aspect-[16/9] w-full overflow-hidden rounded-md bg-gray-100",children:it("picture",{children:[j("source",{media:"(min-width: 640px)",srcSet:e?.thumbnailDesktop}),j("img",{className:"object-cover w-full h-full",src:e?.thumbnailMobile,alt:e?.title})]})})}),it("div",{className:"overflow-hidden basis-1/2 md:mt-3 md:basis-full",children:[e?.category&&e?.categoryUrl&&j(ie,{variant:"default",className:"shink-0 mb-0.5 line-clamp-1 block justify-start whitespace-normal text-left text-xs md:hidden",onClick:t=>o(t,e?.categoryUrl||""),children:e?.category}),j("div",{className:"text-sm font-medium text-gray-900 line-clamp-3 group-hover:text-pink-500 md:line-clamp-none md:text-base",children:e?.title}),it("div",{className:"flex items-center mt-2 md:space-x-1",children:[e?.category&&e?.categoryUrl&&it(un,{children:[j(ie,{variant:"default",className:"justify-start hidden text-xs text-left whitespace-normal shink-0 md:line-clamp-1 md:block",onClick:t=>o(t,e?.categoryUrl||""),children:e?.category}),e?.category&&e?.totalViews&&j("span",{className:"flex-none hidden leading-none md:block",children:"\xB7"})]}),e?.totalViews&&j("div",{className:"flex-none text-xs text-gray-500",children:e.totalViews})]})]})]})},Aa=Uc(({dataHeading:e,dataHorizontalScroll:o,dataBlog:t,onClickModal:a,onClickLoadMore:r})=>{let{showGradientOverlay:n=!0,gradientOverlayColor:s,className:l}=o||{},m=(d,p,g)=>{d?.preventDefault(),d?.stopPropagation(),a?a(p):window.open(g,"_blank")},c=(d,p)=>it("div",{children:[j("div",{className:i("-mx-3 flex flex-row flex-wrap gap-y-5",d?.blogList?.length<3?"md:justify-center":""),children:d?.blogList?.map((g,v)=>j("div",{className:"min-w-0 px-3 basis-full md:basis-1/2 lg:basis-1/3",children:j("div",{onClick:y=>m(y,g?.id,g?.url),className:i("group flex cursor-pointer flex-row md:flex-col",d?.classNameItem),children:j(Yc,{blog:g})},g?.id)},v))}),d?.isShowBtn&&j("div",{className:"flex items-center justify-center w-full mt-8",children:it(Ue,{action:r?()=>r?.(p):d?.btnUrl,newTab:d?.isNewTab,variant:"outline",dataUmamiEvent:d?.dataUmamiEvent,dataUmamiEventText:Bt(d?.btnName)||"Xem th\xEAm",children:[Xc(d.btnName||"Xem th\xEAm"),d?.isLoading?j(Po,{className:"w-5 h-5 ml-2 animate-spin-loading"}):r&&!d?.btnUrl&&j(qc,{className:"w-5 h-5 ml-2 -mb-1 animate-bounce"})]})})]},d?.title||p);return it(Qc.Fragment,{children:[e&&j(h,{tagline:e?.tagline,title:e?.title,description:e?.description,tagHeading:e?.tagHeading,align:"center",colorScheme:e?.colorScheme||"pink",sizeHeading:e?.sizeHeading,className:i(e?.className)}),t?.length>1?it(St,{defaultValue:t[0]?.title,children:[it(Ct,{showGradientOverlay:n,gradientOverlayColor:s,className:l,children:[j(Rt,{className:"mb-6 text-center",children:j(ot,{className:"inline-flex items-center w-auto mx-auto mb-0 overflow-visible",children:t.map((d,p)=>j(at,{value:d.title,children:d.title},d.title+p))})}),j(kt,{}),j(Tt,{})]}),t.map((d,p)=>j(rt,{value:d.title,children:c(d,p)},d.title+p))]}):t?.length===1&&t[0]&&c(t[0],0)]})});import td,{memo as od,useEffect as ad,useState as xn}from"react";import{ChevronLeftIcon as rd,ChevronRightIcon as id}from"@heroicons/react/20/solid";import bn from"html-react-parser";import*as V from"react";import{ChevronLeftIcon as Zc,ChevronRightIcon as Kc}from"@heroicons/react/20/solid";import Jc from"embla-carousel-react";import{Fragment as ed,jsx as He,jsxs as hn}from"react/jsx-runtime";var vn=V.createContext(null);function Yo(){let e=V.useContext(vn);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var ue=V.forwardRef(({orientation:e="horizontal",opts:o,setApi:t,plugins:a,className:r,children:n,...s},l)=>{let[m,c]=Jc({align:"start",...o,axis:e==="horizontal"?"x":"y"},a),[d,p]=V.useState(!1),[g,v]=V.useState(!1),y=V.useCallback(A=>{A&&(p(A.canScrollPrev()),v(A.canScrollNext()))},[]),R=V.useCallback(()=>{c?.scrollPrev()},[c]),N=V.useCallback(()=>{c?.scrollNext()},[c]),W=V.useCallback(A=>{A.key==="ArrowLeft"?(A.preventDefault(),R()):A.key==="ArrowRight"&&(A.preventDefault(),N())},[R,N]);return V.useEffect(()=>{!c||!t||t(c)},[c,t]),V.useEffect(()=>{if(c)return y(c),c.on("reInit",y),c.on("select",y),()=>{c?.off("select",y)}},[c,y]),He(vn.Provider,{value:{carouselRef:m,api:c,opts:o,orientation:e||(o?.axis==="y"?"vertical":"horizontal"),scrollPrev:R,scrollNext:N,canScrollPrev:d,canScrollNext:g},children:He("div",{ref:l,onKeyDownCapture:W,className:i("relative",r),role:"region","aria-roledescription":"carousel",...s,children:n})})});ue.displayName="Carousel";var ve=V.forwardRef(({className:e,classNameContent:o,...t},a)=>{let{carouselRef:r,orientation:n}=Yo();return He("div",{ref:r,className:i("overflow-hidden",o),children:He("div",{ref:a,className:i("flex",n==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});ve.displayName="CarouselContent";var de=V.forwardRef(({className:e,...o},t)=>{let{orientation:a}=Yo();return He("div",{ref:t,role:"group","aria-roledescription":"slide",className:i("min-w-0 shrink-0 grow-0 basis-full",a==="horizontal"?"pl-4":"pt-4",e),...o})});de.displayName="CarouselItem";var ko=V.forwardRef(({className:e,variant:o="secondary",size:t="default",...a},r)=>{let{orientation:n,scrollPrev:s,canScrollPrev:l}=Yo();return hn(se,{ref:r,variant:o,size:t,className:i("absolute h-8 w-8 rounded-full",n==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!l,onClick:s,...a,children:[He(Zc,{className:"h-6 w-6"}),He("span",{className:"sr-only",children:"Previous slide"})]})});ko.displayName="CarouselPrevious";var To=V.forwardRef(({className:e,variant:o="secondary",size:t="default",...a},r)=>{let{orientation:n,scrollNext:s,canScrollNext:l}=Yo();return hn(se,{ref:r,variant:o,size:t,className:i("absolute h-8 w-8 rounded-full",n==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!l,onClick:s,...a,children:[He(Kc,{className:"h-6 w-6"}),He("span",{className:"sr-only",children:"Next slide"})]})});To.displayName="CarouselNext";var So=V.forwardRef((e,o)=>{let{api:t}=Yo(),[,a]=V.useState(!1),r=V.useCallback(()=>a(l=>!l),[]);V.useEffect(()=>{if(t)return t.on("select",r),t.on("reInit",r),()=>{t.off("select",r),t.off("reInit",r)}},[t,r]);let n=t?.scrollSnapList().length||0,s=t?.selectedScrollSnap()||0;return n>1?He("div",{ref:o,className:` flex justify-center ${e.className}`,children:Array.from({length:n},(l,m)=>He(se,{className:`navigation-item mx-1 h-1.5 w-1.5 rounded-full p-0 ${m===s?"navigation-item-active scale-125 transform bg-gray-500 hover:bg-gray-500/90":"bg-gray-200 hover:bg-gray-100"}`,"aria-label":`Go to slide ${m+1}`,onClick:()=>t?.scrollTo(m)},m))}):He(ed,{})});So.displayName="CarouselDots";import{Fragment as La,jsx as Q,jsxs as Xe}from"react/jsx-runtime";var nd=({blog:e})=>{let o=(t,a)=>{t?.preventDefault(),t?.stopPropagation(),window.open(a,"_blank")};return Xe(La,{children:[Q("div",{className:"relative block aspect-[16/9] w-full overflow-hidden rounded-md bg-gray-100",children:Q("img",{className:"inset-0 h-full w-full object-cover",src:e?.thumbnailDesktop,alt:e?.title})}),Xe("div",{className:"mt-4 md:pr-3",children:[Q("div",{className:"font-semibold text-gray-900 group-hover:text-pink-500 md:text-lg md:leading-tight ",children:e?.title}),e?.description&&Q("div",{className:"mt-2 line-clamp-2 text-sm text-gray-500 md:text-sm",children:bn(e?.description??"")}),Xe("div",{className:"mt-2 flex items-center space-x-1",children:[e?.category&&e?.categoryUrl&&Xe(La,{children:[Q(ie,{variant:"default",className:"shink-0 justify-start whitespace-normal text-left text-sm md:line-clamp-1 ",onClick:t=>o(t,e?.categoryUrl||""),children:e?.category}),e?.category&&e?.totalViews&&Q("span",{className:" flex-none leading-none text-gray-300 ",children:"\xB7"})]}),e?.totalViews&&Q("div",{className:"flex-none text-sm text-gray-500",children:e.totalViews})]})]})]})},sd=({dataBlog:e,setCarouselRef:o,carouselRef:t,setCurrent:a,handleOnClickItem:r})=>{let{blogList:n=[],isShowBtn:s,btnName:l,btnUrl:m="#",isNewTab:c,classNameItem:d}=e??{};return ad(()=>{!t||!a||(a(t.selectedScrollSnap()+1),t.on("select",()=>{a&&a(t.selectedScrollSnap()+1)}))},[t,a]),Xe(La,{children:[Q(ue,{opts:{dragFree:!1},setApi:o,className:"w-full",children:Q(ve,{classNameContent:"!overflow-visible",className:"-ml-5",children:n?.map(p=>Q(de,{className:"basis-11/12 pl-5 md:basis-1/2 lg:basis-4/12",children:Q("div",{onClick:g=>r(g,p?.id,p?.url),className:i("group cursor-pointer",d),children:Q(nd,{blog:p})},p?.id)},p?.id))})}),s&&Q("div",{className:"mt-8 flex w-full items-center justify-center md:mt-10 ",children:Xe(Ue,{action:m&&m,newTab:c,variant:"outline",dataUmamiEvent:e?.dataUmamiEvent,dataUmamiEventText:Bt(e?.btnName)||"Xem th\xEAm",children:[bn(l||"Xem th\xEAm")," "]})})]})},ld=({carouselRef:e})=>Xe(se,{onClick:()=>e?.scrollPrev(),disabled:!e?.canScrollPrev(),style:{borderRadius:"100%"},size:"sm",variant:"secondary",children:[Q(rd,{className:"h-6 w-6"}),Q("span",{className:"sr-only",children:"Previous slide"})]}),md=({carouselRef:e})=>Xe(se,{onClick:()=>e?.scrollNext(),disabled:!e?.canScrollNext(),style:{borderRadius:"100%"},size:"sm",variant:"secondary",children:[Q(id,{className:"h-6 w-6"}),Q("span",{className:"sr-only",children:"Next slide"})]}),_r=od(({dataHeading:e,dataBlog:o,onClickModal:t,onClickLoadMore:a})=>{let r=(c,d,p)=>{c?.preventDefault(),c?.stopPropagation(),t?t(d):window.open(p,"_blank")},[n,s]=xn(null),[,l]=xn(0),m=()=>n?Xe("div",{className:"ml-3 hidden items-center space-x-2 md:flex",children:[Q(ld,{carouselRef:n}),Q(md,{carouselRef:n})]}):Q(La,{});return Xe(td.Fragment,{children:[Xe("div",{className:" flex items-center justify-between",children:[e&&Q(h,{tagline:e?.tagline,title:e?.title,description:e?.description,tagHeading:e?.tagHeading,align:"left",colorScheme:e?.colorScheme||"pink",sizeHeading:e?.sizeHeading,className:i(e?.className)}),Q(m,{})]}),Q(sd,{dataBlog:o?.[0],onClickLoadMore:a,index:0,setCarouselRef:s,carouselRef:n,setCurrent:l,handleOnClickItem:r})]})});import{Fragment as fd,jsx as Do}from"react/jsx-runtime";var cd=({template:e,dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n})=>{switch(e){case 1:return Do(Aa,{dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n});case 2:return Do(_r,{dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n});default:return Do(Aa,{dataBlog:o,dataHeading:t,dataHorizontalScroll:a,onClickModal:r,onClickLoadMore:n})}},dd=({dataHeading:e,dataHorizontalScroll:o,dataBlog:t,template:a,onClickModal:r,onClickLoadMore:n})=>Do(fd,{children:cd({dataHeading:e,dataHorizontalScroll:o,dataBlog:t,template:a,onClickModal:r,onClickLoadMore:n})}),pd=({dataHeading:e,dataHorizontalScroll:o,dataBlog:t=[],idSection:a,className:r,background:n,template:s=1,onClickModal:l,onClickLoadMore:m})=>Do(B,{className:i("overflow-hidden",r),idSection:a,background:n,children:Do(dd,{dataHeading:e,dataHorizontalScroll:o,dataBlog:t,template:s,onClickModal:l,onClickLoadMore:m})});import*as Ea from"react";import{enUS as hd,vi as xd}from"date-fns/locale";import{ChevronLeft as bd,ChevronRight as yd}from"lucide-react";import Nd from"lunisolar";import{DayPicker as wd}from"react-day-picker";import*as yn from"react";import*as Zo from"@radix-ui/react-checkbox";import{CheckIcon as gd}from"@heroicons/react/16/solid";import{cva as Nn}from"class-variance-authority";import{jsx as Br}from"react/jsx-runtime";var ud=Nn("peer shrink-0 rounded border-2 disabled:bg-gray-300 border-gray-300 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-default disabled:bg-gray-100 data-[state=checked]:border-none disabled:data-[state=checked]:bg-gray-400 disabled:data-[state=checked]:text-gray-100 data-[state=checked]:bg-pink-500 data-[state=checked]:text-white",{variants:{size:{medium:"h-4 w-4",large:"w-5 h-5"}},defaultVariants:{size:"medium"}}),vd=Nn("",{variants:{size:{medium:"h-4 w-4",large:"w-5 h-5"}},defaultVariants:{size:"medium"}}),Fa=yn.forwardRef(({className:e,size:o,...t},a)=>Br(Zo.Root,{ref:a,className:i(ud({size:o}),e),...t,children:Br(Zo.Indicator,{className:i("flex items-center justify-center text-current"),children:Br(gd,{className:i(vd({size:o}))})})}));Fa.displayName=Zo.Root.displayName;import{Fragment as Td,jsx as nt,jsxs as Or}from"react/jsx-runtime";var Pd=({date:e,cusContent:o})=>{let t=null;return t=Nd(e).lunar,Or(Td,{children:[o?o(e):e.getDate(),t&&nt("span",{className:"luna-date absolute right-0.5 top-1 hidden text-[8px] leading-none group-[.show-luna]:block",children:t.day})]})},Cd={formatCaption:e=>`Th\xE1ng ${e.getMonth()+1}/${e.getFullYear()}`,formatWeekdayName:e=>{let o=e.getDay();return["CN","T2","T3","T4","T5","T6","T7"][o]}};function Rd({isShow:e,setIsShow:o,lang:t}){let a=Ea.useId();return nt("div",{className:"w-full p-3 pt-0",children:Or("div",{className:"flex cursor-pointer items-center space-x-2 border-t border-gray-100 pt-3",children:[nt(Fa,{checked:e,id:`check-show-luna-${a}`,onCheckedChange:r=>{typeof r=="boolean"&&o(r)}}),nt("label",{htmlFor:`check-show-luna-${a}`,className:"z-[1] cursor-pointer text-sm leading-none text-gray-900 peer-disabled:cursor-default peer-disabled:text-gray-400",children:t==="vi"?"Hi\u1EC7n ng\xE0y \xE2m l\u1ECBch":"Show lunar date"})]})})}var kd=e=>e.getDay()===0||e.getDay()===6;function za({className:e,classNames:o,showOutsideDays:t=!1,enableLunaDate:a=!1,lang:r="vi",cusContentDay:n,...s}){let[l,m]=Ea.useState(!0);return nt(wd,{locale:r==="vi"?xd:hd,showOutsideDays:t,className:i("b w-fit rounded-b-md border border-gray-200 bg-white shadow-md",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-y-0",month:"p-3 pt-0 w-full",caption:"flex justify-center p-3 bg-blue-50 relative items-center -mx-3 mb-3",caption_label:"text-sm font-medium text-gray-900",nav:"space-x-1 flex items-center",nav_button:i(tt({variant:"transparent"}),"h-7 w-7 p-0 text-gray-900 hover:bg-transparent hover:opacity-70"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse",head_row:"flex space-x-0.5",head_cell:i("w-11 rounded-md text-xs font-medium text-gray-500 [&:nth-child(7)]:!text-red-600",r==="vi"?"[&:nth-child(6)]:!text-red-600":"[&:nth-child(1)]:!text-red-600"),row:"flex w-full mt-0.5 space-x-0.5",cell:"h-11 w-11 text-center text-sm p-0 relative border-none",day:i(tt({variant:"transparent"}),"group relative h-11 w-11 p-0 text-center text-sm font-semibold focus-within:relative focus-within:z-20 aria-selected:opacity-100 [&.day-range-end.day-range-start]:rounded-md aria-selected:[&:not(.day-range-middle)]:bg-pink-500 aria-selected:[&:not(.day-range-middle)]:text-white",a&&l&&"show-luna"),day_range_end:"day-range-end [&.day-range-end]:rounded-l-none",day_range_start:"day-range-start [&.day-range-start]:rounded-r-none",day_today:"day-today [&:not([aria-selected])]:text-pink-500 [&:not([aria-selected])]:border-gray-200",day_outside:"day-outside opacity-50 aria-selected:bg-accent/50 aria-selected:opacity-30",day_disabled:"opacity-50",day_range_middle:i("group/mid day-range-middle !rounded-none !bg-pink-50 text-gray-900 [&:nth-child(7)]:!text-red-600",r==="vi"?"[&:nth-child(6)]:!text-red-600":"[&:nth-child(1)]:!text-red-600"),day_hidden:"invisible",...o},modifiers:{weekend:kd},modifiersClassNames:{weekend:"text-red-600"},components:{IconLeft:()=>nt(bd,{className:"h-6 w-6"}),IconRight:()=>nt(yd,{className:"h-6 w-6"}),DayContent:c=>nt(Pd,{date:c.date,cusContent:n}),Months:({children:c})=>Or("div",{className:"w-full",children:[nt("div",{className:i("months-wrapper flex flex-col sm:flex-row"),children:c}),a&&nt(Rd,{isShow:l,setIsShow:m,lang:r})]})},formatters:r==="vi"?Cd:{},...s})}za.displayName="Calendar";import{QuestionMarkCircleIcon as Sd,XCircleIcon as Dd}from"@heroicons/react/16/solid";import{format as Ha}from"date-fns";import{Calendar as Md}from"lucide-react";import*as Pn from"react";import*as Dt from"@radix-ui/react-popover";import{jsx as wn}from"react/jsx-runtime";var Ko=Dt.Root,Jo=Dt.Trigger,Mo=Pn.forwardRef(({className:e,align:o="center",sideOffset:t=4,...a},r)=>wn(Dt.Portal,{children:wn(Dt.Content,{ref:r,align:o,sideOffset:t,className:i("z-50 w-72 rounded-md border border-gray-200 bg-white p-4 sm:p-5 text-gray-900 shadow-small outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));Mo.displayName=Dt.Content.displayName;import{Fragment as Cn,jsx as De,jsxs as ea}from"react/jsx-runtime";var Id=({label:e,placeholder:o="Select a value",size:t=1,message:a,isError:r,disabled:n,dateFormat:s="dd/MM/yyyy",buttonProps:l,popoverProps:m,calendarProps:c,popoverContentProps:d})=>{let p=c?.selected||null;return ea("div",{children:[ea(Ko,{...m,children:[De(Jo,{asChild:!0,children:ea(Ne,{variant:"secondary",className:i("relative h-11 w-full justify-between overflow-visible text-left text-sm font-normal text-gray-900 ring-inset hover:ring-1 hover:ring-gray-400 focus:ring-1 focus:ring-gray-400 disabled:pointer-events-none disabled:border-gray-200 disabled:bg-gray-50 disabled:text-gray-500 [&[data-state=open]]:border-pink-500 [&[data-state=open]]:ring-1 [&[data-state=open]]:ring-pink-500",t===2&&"h-12 text-base",(!p||!(p instanceof Date)&&typeof p=="object"&&(!("from"in p)||!p.from))&&"text-gray-500",r&&"border-red-500 ring-1 ring-red-500"),disabled:n,...l,children:[De("div",{className:"line-clamp-1 flex-1",children:p instanceof Date?Ha(p,s):p&&typeof p=="object"&&"from"in p&&"to"in p?De(Cn,{children:p.from?p.to?ea(Cn,{children:[De("span",{className:"date-from",children:Ha(p.from,s)})," ",De("span",{className:"date-separator",children:"-"}),De("span",{className:"date-to",children:Ha(p.to,s)})]}):Ha(p.from,s):o}):o}),e&&De("span",{className:i("absolute -top-2 left-2 z-[1] bg-white px-1.5 text-xs text-gray-500",t===2&&" -top-2.5 text-sm",r&&"text-red-500"),children:e}),De(Md,{className:"ml-2 h-4 w-4 flex-none text-gray-500"})]})}),De(Mo,{className:"w-auto border-none !p-0",...d,children:De(za,{...c,defaultMonth:p&&typeof p=="object"&&"from"in p?p.from:p instanceof Date?p:void 0})})]}),a&&ea("div",{className:"mobase-text-input-message mt-0.5 flex items-center space-x-1",children:[r?De(Dd,{width:16,height:16,className:"text-red-500"}):De(Sd,{width:16,height:16,className:"text-gray-500"}),De("span",{className:i(r?"text-red-500":"text-gray-500",t===2?"text-sm":"text-xs"),children:a})]})]})};import{useEffect as zd,useState as In}from"react";import{QuestionMarkCircleIcon as Hd,XCircleIcon as _d}from"@heroicons/react/16/solid";import{isValid as Bd}from"date-fns";import*as st from"react";import{CheckIcon as Ad,ChevronDownIcon as Rn,ChevronUpIcon as Ld,XCircleIcon as Fd}from"@heroicons/react/16/solid";import{QuestionMarkCircleIcon as Ed}from"@heroicons/react/24/outline";import*as S from"@radix-ui/react-select";import{jsx as U,jsxs as ta}from"react/jsx-runtime";var oa=st.forwardRef(({className:e,children:o,label:t,message:a,size:r,isError:n,disabled:s,...l},m)=>ta("div",{ref:m,className:i("select-mobase relative",e,s?"disabled":"",n?"[&>.select-mobase-button]:border-red-500 [&>.select-mobase-button]:ring-1 [&>.select-mobase-button]:ring-red-500":"",r===2?"[&>.select-mobase-button]:h-12 [&>.select-mobase-button]:text-base":""),children:[t&&U("span",{className:i("mobase-select-label absolute -top-2 left-2 z-[1] bg-white px-1.5 text-xs text-gray-500",r===2&&"-top-2.5 text-sm",n&&"text-red-500"),children:t}),U(S.Root,{disabled:s,...l,children:o}),a&&ta("div",{className:i("mobase-select-message mt-1 flex items-center space-x-1 text-gray-500",n&&"text-red-500"),children:[n?U(Fd,{width:16,height:16}):U(Ed,{width:16,height:16}),U("span",{className:i(r===2?"text-sm":"text-xs"),children:a})]})]})),aa=S.Value,Io=st.forwardRef(({className:e,children:o,...t},a)=>ta(S.Trigger,{ref:a,className:i("select-mobase-button flex h-11 w-full items-center justify-between rounded-md border border-gray-300 bg-white p-3 text-sm text-gray-900 ring-0 ring-inset transition-all hover:ring-1 hover:ring-gray-400 focus-visible:border-pink-500 focus-visible:ring-1 focus-visible:!ring-pink-500 focus-visible:ring-offset-0 focus-visible:ring-offset-transparent disabled:pointer-events-none disabled:border-gray-200 disabled:bg-gray-50 data-[state=open]:border-pink-500 data-[placeholder]:text-gray-500 data-[state=open]:ring-1 data-[state=open]:ring-pink-500",e),...t,children:[U("div",{className:"line-clamp-1 text-left",children:o}),U(S.Icon,{asChild:!0,children:U(Rn,{className:"h-4 w-4 flex-none text-gray-500"})})]}));Io.displayName=S.Trigger.displayName;var Vr=st.forwardRef(({className:e,...o},t)=>U(S.ScrollUpButton,{ref:t,className:i("flex cursor-default items-center justify-center py-1",e),...o,children:U(Ld,{className:"h-5 w-5"})}));Vr.displayName=S.ScrollUpButton.displayName;var Wr=st.forwardRef(({className:e,...o},t)=>U(S.ScrollDownButton,{ref:t,className:i("flex cursor-default items-center justify-center bg-gradient-to-t from-white to-transparent py-1",e),...o,children:U(Rn,{className:"h-5 w-5"})}));Wr.displayName=S.ScrollDownButton.displayName;var Ao=st.forwardRef(({className:e,children:o,position:t="popper",...a},r)=>U(S.Portal,{children:ta(S.Content,{ref:r,className:i("shadow-small 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-96 min-w-[8rem] overflow-hidden rounded-md border border-gray-300 bg-white text-gray-900",t==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:t,...a,children:[U(Vr,{}),U(S.Viewport,{className:i("p-0",t==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:o}),U(Wr,{})]})}));Ao.displayName=S.Content.displayName;var ra=st.forwardRef(({className:e,children:o,...t},a)=>U(S.Group,{ref:a,className:i("relative border-b border-gray-200 p-1 after:w-full last:border-0",e),...t,children:o})),kn=st.forwardRef(({className:e,...o},t)=>U(S.Label,{ref:t,className:i("z-[1] py-1.5 pl-7 pr-2 text-sm font-semibold",e),...o}));kn.displayName=S.Label.displayName;var Gt=st.forwardRef(({className:e,children:o,...t},a)=>ta(S.Item,{ref:a,className:i("relative flex w-full cursor-default select-none items-center rounded-md py-1.5 pl-7 pr-2 text-sm outline-none focus:bg-gray-100 focus:text-gray-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t,children:[U("span",{className:"absolute left-2 flex h-4 w-4 items-center justify-center",children:U(S.ItemIndicator,{children:U(Ad,{className:"h-4 w-4 text-pink-500"})})}),U(S.ItemText,{children:o})]})),Tn=st.forwardRef(({className:e,...o},t)=>U(S.Separator,{ref:t,className:i("-mx-1 my-1 h-px",e),...o}));Tn.displayName=S.Separator.displayName;var Sn=["Th\xE1ng 01","Th\xE1ng 02","Th\xE1ng 03","Th\xE1ng 04","Th\xE1ng 05","Th\xE1ng 06","Th\xE1ng 07","Th\xE1ng 08","Th\xE1ng 09","Th\xE1ng 10","Th\xE1ng 11","Th\xE1ng 12"],Dn=["January","February","March","April","May","June","July","August","September","October","November","December"],Gr=(e,o,t,a)=>{let r=new Date(e,o,0).getDate(),n=t&&e===t.getFullYear()&&o===t.getMonth()+1?t.getDate():1,s=a&&e===a.getFullYear()&&o===a.getMonth()+1?a.getDate():r;return{daysInMonth:r,startDay:n,endDay:s}},Mn=(e,o,t,a)=>{let r=t?t.getFullYear():e,n=a?a.getFullYear():o;return Array.from({length:n-r+1},(s,l)=>n-l)};import{jsx as oe,jsxs as lt}from"react/jsx-runtime";var Od=({label:e,selected:o,onSelect:t,size:a=1,message:r,isError:n,disabled:s,dateFormat:l="dd/MM/yyyy",lang:m="vi",fromYear:c=1900,toYear:d=new Date().getFullYear(),disableUnselect:p=!1})=>{let[g,v]=In(o??null),y=Math.min(c,d),R=Math.max(c,d),N=l==="MM/yyyy",W=(P,_)=>{if(_===0){v(void 0),t?.(void 0);return}let F=g?.getFullYear()||new Date().getFullYear(),je=g?.getMonth()??0,Qe=g?.getDate()??1;P==="month"&&_!==null&&(je=_-1),P==="year"&&_!==null&&(F=_),N?Qe=1:P==="day"&&_!==null&&(Qe=_);let Ta=Gr(F,je+1).daysInMonth;Qe>Ta&&(Qe=1);let $o=new Date(F,je,Qe);Bd($o)&&(v($o),t?.($o))},[A,H]=In(!1),$e=P=>{H(P)};return zd(()=>{v(o??null)},[o]),lt("div",{className:i("relative",s&&"cursor-no-drop"),children:[lt("div",{className:i("relative block h-11 w-full rounded-md border border-gray-300 bg-white px-1 py-3 text-sm text-gray-900 outline-none ring-inset transition-all placeholder:text-gray-500 hover:ring-1 hover:ring-gray-400 focus:border-pink-500 focus:ring-1 focus:ring-gray-400 disabled:pointer-events-none disabled:border-gray-200 disabled:bg-gray-50",A&&"border-pink-500 ring-1 ring-pink-500",a===2&&"h-12 text-base",g?"":"text-gray-500",n&&"border-red-500 ring-1 ring-red-500",s&&"pointer-events-none select-none border-gray-200 bg-gray-50"),children:[e&&oe("span",{className:i("absolute -top-2 left-2 z-[1] bg-white px-1.5 text-xs text-gray-500",a===2&&" -top-2.5 text-sm",n&&"text-red-500"),children:e}),lt("div",{className:"flex h-full flex-row divide-x",children:[!N&<(oa,{value:g?g.getDate().toString().padStart(2,"0"):"",onValueChange:P=>W("day",parseInt(P,10)),onOpenChange:$e,className:"w-[30%]",children:[oe(Io,{className:"h-full w-full rounded-none border-none bg-transparent py-0 !ring-0 hover:!text-pink-500",children:oe(aa,{placeholder:m==="vi"?"Ng\xE0y":"Day"})}),oe(Ao,{onCloseAutoFocus:P=>P.preventDefault(),children:lt(ra,{children:[!p&&oe(Gt,{value:"0",className:"text-gray-600",children:m==="vi"?"B\u1ECF ch\u1ECDn":"None"}),Array.from({length:Gr(g?.getFullYear()||new Date().getFullYear(),(g?.getMonth()??0)+1).daysInMonth},(P,_)=>(_+1).toString().padStart(2,"0")).map(P=>oe(Gt,{value:P,children:P},P))]})})]}),lt(oa,{value:g?(g.getMonth()+1).toString():"",onValueChange:P=>W("month",parseInt(P,10)),onOpenChange:$e,className:i(N?"w-1/2":"w-2/5"),children:[oe(Io,{className:"h-full w-full !rounded-none border-none bg-transparent py-0 !ring-0 hover:!text-pink-500",children:oe(aa,{placeholder:m==="vi"?"Th\xE1ng":"Month"})}),oe(Ao,{onCloseAutoFocus:P=>P.preventDefault(),children:lt(ra,{children:[!p&&oe(Gt,{value:"0",className:"text-gray-600",children:m==="vi"?"B\u1ECF ch\u1ECDn":"None"}),Array.from({length:12},(P,_)=>_+1).map(P=>oe(Gt,{value:P.toString(),children:m==="vi"?Sn[P-1]:Dn[P-1]},P))]})})]}),lt(oa,{value:g?g.getFullYear().toString():"",onValueChange:P=>W("year",parseInt(P,10)),onOpenChange:$e,className:i(N?"w-1/2":"w-[30%]"),children:[oe(Io,{className:"h-full w-full !rounded-none border-none bg-transparent py-0 !ring-0 hover:!text-pink-500",children:oe(aa,{placeholder:m==="vi"?"N\u0103m":"Year"})}),oe(Ao,{onCloseAutoFocus:P=>P.preventDefault(),children:lt(ra,{children:[!p&&oe(Gt,{value:"0",className:"text-gray-600",children:m==="vi"?"B\u1ECF ch\u1ECDn":"None"}),Mn(y,R).map(P=>oe(Gt,{value:P.toString(),children:P},P))]})})]})]})]}),r&<("div",{className:"mobase-text-input-message mt-0.5 flex items-center space-x-1",children:[n?oe(_d,{width:16,height:16,className:"text-red-500"}):oe(Hd,{width:16,height:16,className:"text-gray-500"}),oe("span",{className:i(n?"text-red-500":"text-gray-500",a===2?"text-sm":"text-xs"),children:r})]})]})};import*as io from"react";import*as G from"@radix-ui/react-alert-dialog";import{jsx as Mt,jsxs as Gd}from"react/jsx-runtime";var Vd=G.Root,Wd=G.Trigger,An=G.Portal,$r=io.forwardRef(({className:e,...o},t)=>Mt(G.Overlay,{className:i("fixed inset-0 z-50 bg-black/70 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...o,ref:t}));$r.displayName=G.Overlay.displayName;var Ln=io.forwardRef(({className:e,...o},t)=>Gd(An,{children:[Mt($r,{}),Mt(G.Content,{ref:t,className:i("fixed left-[50%] w-[90vw] bg-white text-gray-700 border border-gray-300 top-[50%] z-50 grid w- max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-xl",e),...o})]}));Ln.displayName=G.Content.displayName;var Fn=({className:e,...o})=>Mt("div",{className:i("flex flex-col space-y-2 text-left",e),...o});Fn.displayName="AlertDialogHeader";var En=({className:e,...o})=>Mt("div",{className:i("flex flex-row justify-end space-x-4",e),...o});En.displayName="AlertDialogFooter";var zn=io.forwardRef(({className:e,...o},t)=>Mt(G.Title,{ref:t,className:i("text-lg text-gray-900 font-semibold",e),...o}));zn.displayName=G.Title.displayName;var Hn=io.forwardRef(({className:e,...o},t)=>Mt(G.Description,{ref:t,className:i("text-sm text-muted-foreground",e),...o}));Hn.displayName=G.Description.displayName;var _n=io.forwardRef(({className:e,...o},t)=>Mt(G.Action,{ref:t,className:i(tt({variant:"primary"}),"",e),...o}));_n.displayName=G.Action.displayName;var Bn=io.forwardRef(({className:e,...o},t)=>Mt(G.Cancel,{ref:t,className:i(tt({variant:"secondary"}),e),...o}));Bn.displayName=G.Cancel.displayName;import{memo as Kd,useState as Jd}from"react";import{useEffect as $d,useState as Vn}from"react";import Wn from"html-react-parser";import{motion as jd}from"motion/react";import*as On from"@radix-ui/react-aspect-ratio";var E=On.Root;import{Fragment as Gn,jsx as ae,jsxs as ia}from"react/jsx-runtime";var Qd=({guideGroup:e,mockup:o})=>{let[t,a]=Vn(),[r,n]=Vn(0),s={open:{height:"auto",opacity:1,transition:{duration:.3,ease:"easeInOut"}},closed:{height:0,opacity:0,transition:{duration:.3,ease:"easeInOut"}}};return $d(()=>{t&&(n(t.selectedScrollSnap()+1),t.on("select",()=>{n(t.selectedScrollSnap()+1)}))},[t]),ae(Gn,{children:e?.stepList&&e?.stepList?.length>0&&ia("div",{className:"mx-auto flex max-w-3xl flex-nowrap justify-center",children:[ae("div",{className:"h-auto w-64 flex-none",children:ia("div",{className:i("relative mx-auto w-full",o==="none"?"":"rounded-[2.5rem] border-8 border-gray-800 bg-gray-800 shadow-md",o==="small"?"px-1 py-5":""),children:[o!=="none"&&ia(Gn,{children:[ae("div",{className:"absolute -start-2.5 top-16 h-8 w-1.5 rounded-s-lg bg-gray-800"}),ae("div",{className:"absolute -start-2.5 top-32 h-12 w-1.5 rounded-s-lg bg-gray-800"}),ae("div",{className:"absolute -start-2.5 top-48 h-12 w-1.5 rounded-s-lg bg-gray-800"}),ae("div",{className:"absolute -end-2.5 top-40 h-16 w-1 rounded-e-lg bg-gray-800"})]}),ae("div",{className:i("relative h-full w-full overflow-hidden",o==="none"?"":"rounded-[2rem] bg-gray-200",o==="small"?"rounded-xl":""),children:ia(ue,{setApi:a,children:[ae(ve,{className:"ml-0",children:e?.stepList.map((l,m)=>ae(de,{className:"pl-0",children:ae(E,{ratio:o==="small"?540/960:540/1168,children:l?.image&&ae("img",{src:l.image,className:"size-full object-contain",alt:l.title})})},m))}),ae(ko,{className:"left-1 border-none bg-gray-900/30 text-white hover:bg-gray-900/40 disabled:hidden"}),ae(To,{className:"right-1 border-none bg-gray-900/30 text-white hover:bg-gray-900/40 disabled:hidden"})]})})]})}),ae("div",{className:"flex flex-auto pl-12 pt-4",children:ae("ul",{className:"flex flex-col",children:e?.stepList.map((l,m)=>ia("li",{className:i("relative min-h-20 pb-8 pl-14 after:absolute after:left-4 after:top-0 after:h-full after:border-l after:border-dashed after:border-gray-200 last:min-h-0 last:pb-0 last:after:hidden",m+1===r?"":"cursor-pointer"),onClick:()=>t&&t.scrollTo(m),children:[ae("div",{className:i("absolute -top-1.5 left-0 z-10 flex h-8 w-8 items-center justify-center rounded-full text-sm font-bold",m+1===r?"bg-pink-500 text-white":"bg-pink-100 text-pink-500"),children:m+1}),ae("div",{className:i(" text-sm font-medium",m+1===r?"text-pink-500":"text-gray-900"),children:Wn(l.title)}),l.content&&ae(jd.div,{initial:"closed",animate:m+1===r?"open":"closed",variants:s,style:{overflow:"hidden"},children:ae("div",{className:"mt-3 text-sm text-gray-700",children:Wn(l.content)})})]},m))})})]})})},jr=Qd;import{useEffect as Ud,useRef as qd,useState as _a}from"react";import{ChevronRightIcon as $n}from"@heroicons/react/20/solid";import Xd from"embla-carousel-autoplay";import Ba from"html-react-parser";import{Fragment as Qr,jsx as w,jsxs as Pe}from"react/jsx-runtime";var Yd=({open:e,setOpenDialog:o,dataStep:t,mockup:a})=>{let[r,n]=_a(0),[s,l]=_a();return Ud(()=>{s&&(n(s.selectedScrollSnap()+1),s.on("select",()=>{n(s.selectedScrollSnap()+1)}))},[s]),!t||!t?.stepList?.length?null:w(Se,{open:e,onOpenChange:o,children:Pe(we,{position:"bottom",height:"full",children:[w(Ot,{children:w(Vt,{className:"line-clamp-1",children:t?.title})}),Pe(ze,{className:"grid overflow-hidden p-0 ",children:[w(ue,{setApi:l,className:" grid overflow-hidden",children:w(ve,{className:"ml-0 h-full",children:t.stepList.map((m,c)=>w(de,{className:"h-full w-full pl-0",children:Pe("div",{className:"flex h-full flex-col overflow-y-auto",children:[w("div",{className:" relative flex w-full flex-none justify-center bg-gray-100 p-5",children:w("div",{className:i("mx-auto",a==="small"?"w-56":"w-52"),children:Pe("div",{className:i("relative mx-auto w-full",a==="none"?"":"rounded-[2rem] border-8 border-gray-800 bg-gray-800 shadow-md",a==="small"?"px-0.5 py-3":""),children:[a!=="none"&&Pe(Qr,{children:[w("div",{className:"absolute -start-2.5 top-16 h-8 w-1.5 rounded-s-lg bg-gray-800"}),w("div",{className:"absolute -start-2.5 top-32 h-12 w-1.5 rounded-s-lg bg-gray-800"}),w("div",{className:"absolute -start-2.5 top-48 h-12 w-1.5 rounded-s-lg bg-gray-800"}),w("div",{className:"absolute -end-2.5 top-40 h-16 w-1 rounded-e-lg bg-gray-800"})]}),w("div",{className:i("relative h-full w-full overflow-hidden",a==="none"?"":"rounded-[1.5rem] bg-gray-200",a==="small"?"rounded-xl":""),children:w(E,{ratio:a==="small"?540/960:540/1168,children:m?.image&&w("img",{src:m.image,className:"size-full object-contain",alt:m.title})})})]})})}),Pe("div",{className:"p-5 pb-12",children:[w("div",{className:"font-semibold",children:Ba(m.title)}),m?.content&&w("div",{className:"mt-3 text-sm text-gray-800",children:Ba(m.content)})]})]})},c))})}),w("div",{className:"text-muted-foreground fixed bottom-3 left-1/2 flex -translate-x-1/2 items-center justify-center gap-1.5 rounded-full bg-gray-900/50 px-3 py-1 py-2 text-center text-sm text-gray-700",children:t.stepList.map((m,c)=>w("div",{className:`h-2 w-2 cursor-pointer rounded-full ${c+1===r?"bg-white":"bg-white/40"}`,onClick:()=>s&&s.scrollTo(c)},c))})]})]})})},Zd=({dataGuide:e,mockup:o,isStep:t})=>{let[a,r]=_a(!1),[n,s]=_a(null),l=qd(Xd({delay:3500,stopOnInteraction:!1,stopOnMouseEnter:!1})),m=c=>{s(e?.[c]||null),r(!0)};return e?.length===0?null:Pe(Qr,{children:[e?.length>1?w("div",{className:"-mx-5 grid grid-cols-1 md:mx-0",children:e.map((c,d)=>Pe("div",{className:"relative flex cursor-pointer flex-nowrap items-center space-x-4 pl-5 ",onClick:()=>m(d),children:[w("div",{className:"borde flex h-28 w-20 justify-center overflow-hidden rounded-t-lg bg-gray-100 p-2 pb-0",children:(c?.avatar||c?.stepList?.[0]?.image)&&w("img",{src:c.avatar||c?.stepList?.[0]?.image,className:"h-full w-full object-cover object-top",alt:c.title})}),Pe("div",{className:i("relative grid min-h-32 flex-1 grid-cols-1 items-center pr-8 ",d+1!=e.length&&"after:absolute after:bottom-0 after:left-0 after:right-0 after:h-px after:bg-gray-200"),children:[Pe("div",{className:"py-2",children:[t&&w("span",{className:"text-sm font-medium text-pink-500",children:`B\u01B0\u1EDBc ${d+1}`}),w("div",{className:"font-semibold",children:Ba(c.title)}),c?.description&&w("div",{className:"mt-1 text-sm text-gray-500",children:Ba(c.description)})]}),w("div",{className:" absolute right-4 top-1/2 -translate-y-1/2 text-gray-500",children:w($n,{className:"h-6 w-6"})})]})]},d))}):e?.[0]&&e[0].stepList?.length>0&&Pe("div",{className:"mx-auto flex max-w-3xl flex-col flex-wrap justify-center gap-y-6",children:[w("div",{className:"relative max-h-96 w-full flex-none overflow-hidden",style:{WebkitMask:"linear-gradient(to bottom, rgba(0, 0, 0, 1.0) 95%, rgba(0, 0, 0, 0.3) 98%, transparent 100%)"},children:w("div",{className:"mx-auto h-auto w-72",children:Pe("div",{className:i("relative mx-auto w-full",o==="none"?"":"rounded-[2.5rem] border-8 border-gray-800 bg-gray-800 shadow-md",o==="small"?"px-1 py-5":""),children:[o!=="none"&&Pe(Qr,{children:[w("div",{className:"absolute -start-2.5 top-16 h-8 w-1.5 rounded-s-lg bg-gray-800"}),w("div",{className:"absolute -start-2.5 top-32 h-12 w-1.5 rounded-s-lg bg-gray-800"}),w("div",{className:"absolute -start-2.5 top-48 h-12 w-1.5 rounded-s-lg bg-gray-800"}),w("div",{className:"absolute -end-2.5 top-40 h-16 w-1 rounded-e-lg bg-gray-800"})]}),w("div",{className:i("relative h-full w-full overflow-hidden",o==="none"?"":"rounded-[2rem] bg-gray-200",o==="small"?"rounded-xl":""),children:w(ue,{plugins:[l.current],children:w(ve,{className:"ml-0",children:e[0]?.stepList.map((c,d)=>w(de,{className:"pl-0",onClick:()=>m(0),children:w(E,{ratio:o==="small"?540/960:540/1168,children:c?.image&&w("img",{src:c.image,className:"size-full object-contain",alt:c.title})})},d))})})})]})})}),w("div",{className:"flex w-full flex-none justify-center",children:Pe(ie,{size:"lg",variant:"primary",onClick:()=>m(0),children:["Xem chi ti\u1EBFt h\u01B0\u1EDBng d\u1EABn ",w($n,{className:"ml-1 h-5 w-5"})]})})]}),a&&w(Yd,{open:a,setOpenDialog:r,dataStep:n,mockup:o})]})},jn=Zd;import{Fragment as ep,jsx as pe,jsxs as na}from"react/jsx-runtime";var Qn=({direction:e,className:o})=>{let t=e==="left"?{viewBox:"0 0 20 40",d:"M20 0H0L18 20L0 40H20V0Z",width:"20"}:{viewBox:"0 0 19 40",d:"M0.906128 0H0V40H0.906128L19 20L0.906128 0Z",width:"19"};return pe("svg",{fill:"none",viewBox:t.viewBox,xmlns:"http://www.w3.org/2000/svg",className:i("flex-0 absolute w-5 transition-all",o),children:pe("path",{d:t.d,fill:"currentColor"})})},Ur=Kd(({dataHeading:e,dataHorizontalScroll:o,dataGuide:t,dataButtons:a,mockup:r,isStep:n})=>{let{showGradientOverlay:s=!0,gradientOverlayColor:l,className:m}=o||{},[c,d]=Jd(t?.[0]?.title||"");return na(ep,{children:[e&&pe(h,{tagline:e?.tagline,title:e?.title,description:e?.description,tagHeading:e?.tagHeading,align:"center",colorScheme:e?.colorScheme||"pink",sizeHeading:e?.sizeHeading,className:i(e?.className)}),t&&t?.length>0&&na(No,{children:[pe(et,{lessThan:"md",children:pe(jn,{dataGuide:t,mockup:r,isStep:n})}),pe(et,{greaterThan:"sm",children:t?.length>1?na(St,{defaultValue:t[0]?.title,onValueChange:p=>d(p),children:[na(Ct,{showGradientOverlay:s,gradientOverlayColor:l,className:m,children:[pe(Rt,{className:"mb-6 text-center",children:pe(ot,{className:i("mx-auto mb-0 inline-flex w-auto items-center overflow-visible",n?"space-x-10":""),children:t.map((p,g)=>{let v=g===t.length-1,y=c===p?.title||"";return na(at,{value:p.title,className:i(n?"relative h-10 border-0 bg-pink-100 px-3 first:rounded-l-md first:pl-5 last:rounded-r-md last:pl-3 last:pr-5":"",y&&n?"data-[state=active]:bg-pink-500 data-[state=active]:text-white":""),children:[n&&g!==0&&pe(Qn,{direction:"left",className:i("right-full top-0",y?"text-pink-500":"text-pink-100")}),p.title,n&&!v&&pe(Qn,{direction:"right",className:i("left-full top-0",y?"text-pink-500":"text-pink-100")})]},p.title+g)})})}),pe(kt,{}),pe(Tt,{})]}),t.map((p,g)=>pe(rt,{value:p.title,children:pe(jr,{guideGroup:p,mockup:r})},p.title+g))]}):t?.length===1&&t[0]&&pe(jr,{guideGroup:t[0],mockup:r})})]}),a&&pe(x,{isFullInMobile:a?.isFullInMobile,buttons:a?.buttons,className:a?.className,align:"center"})]})});import{Fragment as rp,jsx as sa}from"react/jsx-runtime";var tp=({template:e,dataHeading:o,dataGuide:t,dataHorizontalScroll:a,dataButtons:r,mockup:n,isStep:s})=>{switch(e){case 1:return sa(Ur,{dataHeading:o,dataHorizontalScroll:a,dataGuide:t,dataButtons:r,mockup:n,isStep:s});default:return sa(Ur,{dataHeading:o,dataHorizontalScroll:a,dataGuide:t,dataButtons:r,mockup:n,isStep:s})}},op=({dataHeading:e,dataHorizontalScroll:o,dataGuide:t,dataButtons:a,template:r,mockup:n,isStep:s})=>sa(rp,{children:tp({dataHeading:e,dataHorizontalScroll:o,dataGuide:t,dataButtons:a,template:r,mockup:n,isStep:s})}),ap=({idSection:e,dataHeading:o,dataGuide:t,dataHorizontalScroll:a,dataButtons:r,className:n,background:s,template:l=1,mockup:m="default",isStep:c=!1})=>sa(B,{className:i(n),background:s,idSection:e,children:sa(op,{dataHeading:o,template:l,dataHorizontalScroll:a,dataGuide:t,dataButtons:r,mockup:m,isStep:c})});import{useState as Un}from"react";import It from"html-react-parser";import{Fragment as qr,jsx as z,jsxs as At}from"react/jsx-runtime";var qn="text-xs font-medium md:text-sm",ip=({gift:e,onOpenModal:o})=>{let t=!!e.useModal,a=!!e.btnLink?.trim(),r=e.btnName?It(e.btnName||"Xem chi ti\u1EBFt"):null,n=s=>{s.stopPropagation(),o(e)};return z("div",{className:"w-full px-2.5 md:w-1/2 lg:w-1/3",children:At("div",{className:i("relative h-full rounded-xl border border-gray-200 bg-white p-2 transition-all duration-300",e.isFeatured&&"border-pink-500",t&&"cursor-pointer ring-inset hover:border-pink-500 hover:shadow-lg hover:shadow-pink-500/20 hover:ring-1 hover:ring-pink-500"),role:t?"button":void 0,tabIndex:t?0:void 0,onClick:()=>t&&o(e),children:[e.tag&&At("span",{className:"absolute -top-2 right-2 z-10 inline-flex",children:[z("span",{className:"rounded-bl-md rounded-br-md bg-red-600 px-2 py-0.5 text-xs font-semibold uppercase text-white shadow-sm",children:It(e.tag)}),z("span",{"aria-hidden":!0,className:"absolute right-full top-0 h-0 w-0 border-r-8 border-t-8 border-r-red-800 border-t-transparent"})]}),At("div",{className:"relative z-10 flex h-full flex-row items-stretch gap-3",children:[e.thumbnail&&z("div",{className:"w-28 flex-none shrink-0 md:w-32",children:z(E,{ratio:1,className:"w-full",children:z("img",{src:e.thumbnail,alt:e.title||"Gift image",className:"h-full w-full rounded-md object-contain"})})}),At("div",{className:"flex min-w-0 flex-1 flex-col",children:[At("div",{className:"flex-1",children:[e.serviceName?z("span",{className:"mb-1.5 mt-1 block text-xs font-medium text-gray-700 md:mb-2",children:It(e.serviceName)}):z(qr,{}),z("h3",{className:"text-base font-semibold text-gray-900 md:text-lg",children:It(e.title)}),e.description&&z("p",{className:"line-clamp-2 text-sm text-gray-600",children:It(e.description)})]}),z("div",{className:"mt-auto flex flex-none justify-end pt-1 md:pt-2",children:r&&(a?z(ie,{variant:"primary",className:qn,asChild:!0,children:z("a",{href:e.btnLink,target:e.newTab?"_blank":"_self",rel:"noreferrer",onClick:s=>s.stopPropagation(),children:r})}):z(ie,{variant:"primary",size:"default",className:qn,type:"button",onClick:n,children:r}))})]})]})]})})},Oa=({dataHeading:e,dataButtons:o,dataGiftList:t})=>{let[a,r]=Un(null),[n,s]=Un(!1),l=m=>{r(m),s(!0)};return At(qr,{children:[e&&z(h,{align:e.align||"center",tagline:e.tagline,title:e.title,description:e.description,tagHeading:e.tagHeading,colorScheme:e.colorScheme||"pink",sizeHeading:e.sizeHeading,className:e.className}),t&&t.length>0&&z("div",{className:"-mx-2.5 mt-8 flex flex-wrap justify-center gap-y-5 md:mt-10",children:t.map((m,c)=>z(ip,{gift:m,onOpenModal:l},c))}),o&&z(x,{isFullInMobile:o.isFullInMobile,buttons:o.buttons,className:o.className,align:o.align||"center"}),n&&z(Se,{open:n,onOpenChange:s,children:At(we,{size:"lg",position:"bottom",children:[z(Ot,{children:z(Vt,{children:"Th\xF4ng tin chi ti\u1EBFt th\u1EBB qu\xE0"})}),At(ze,{children:[At("div",{className:"text-center",children:[a?.serviceName&&z("span",{className:"mb-1 block text-xs font-medium text-gray-500",children:It(a.serviceName)}),a?.title&&z("h3",{className:"text-xl font-bold md:text-2xl",children:It(a.title)}),a?.description&&z("p",{className:"mt-1 text-sm text-gray-700",children:It(a.description||"")})]}),a?.content?z("div",{className:"prose prose-sm mt-6 max-w-none",children:It(a.content)}):z(qr,{})]}),z(Sa,{children:z(Ne,{variant:"primary",size:"default",onClick:()=>s(!1),children:"\u0110\xF3ng"})})]})})]})};import{jsx as Xr}from"react/jsx-runtime";var np=({template:e,dataHeading:o,dataButtons:t,dataGiftList:a})=>{switch(e){case 1:return Xr(Oa,{dataHeading:o,dataButtons:t,dataGiftList:a});default:return Xr(Oa,{dataHeading:o,dataButtons:t,dataGiftList:a})}},sp=({template:e=1,className:o,idSection:t,background:a,dataHeading:r,dataButtons:n,dataGiftList:s})=>Xr(B,{idSection:t,className:o,background:a,children:np({template:e,dataHeading:r,dataButtons:n,dataGiftList:s})});import{ChevronLeft as lp,ChevronRight as mp}from"lucide-react";import{Fragment as cp,jsx as _e,jsxs as Xn}from"react/jsx-runtime";function Yn({current:e,total:o,onChange:t}){let a=r=>_e("li",{children:_e("button",{className:i(ro({variant:e===r?"outline":"secondary",size:"sm"})),onClick:()=>t(r),children:r})},r);return _e("nav",{role:"navigation","aria-label":"pagination",className:i("mx-auto flex w-full justify-center"),children:Xn("ul",{className:i("flex flex-row flex-wrap items-center gap-2"),children:[o>1&&_e("li",{children:_e("button",{className:i(ro({variant:"secondary",size:"sm"})),disabled:e===1,onClick:()=>e>1&&t(e-1),children:_e(lp,{className:"h-4 w-4"})})}),o<=6?Array(o).fill(0).map((r,n)=>a(n+1)):Xn(cp,{children:[a(1),e===1&&[a(2),a(3)],e>3&&_e("li",{children:_e("button",{className:i(ro({variant:"secondary",size:"sm"})),disabled:e===1,onClick:()=>t(e-3),children:"..."})}),e>2&&e!==1&&e!==o&&a(e-1),e>1&&e<o&&a(e),e<o-1&&e!==1&&a(e+1),e===o&&[a(o-2),a(o-1)],e<o-2&&e!==o&&_e("button",{className:i(ro({variant:"secondary",size:"sm"})),disabled:e===1,onClick:()=>t(e+3),children:"..."}),a(o)]}),o>1&&_e("li",{children:_e("button",{className:i(ro({variant:"secondary",size:"sm"})),disabled:e===o,onClick:()=>e<o&&t(e+1),children:_e(mp,{className:"h-4 w-4"})})})]})})}import{forwardRef as dp}from"react";import{QuestionMarkCircleIcon as pp}from"@heroicons/react/24/outline";import{XCircleIcon as fp}from"@heroicons/react/24/solid";import{jsx as Lo,jsxs as Zn}from"react/jsx-runtime";var Yr=dp(({disabled:e,isError:o,message:t,label:a,className:r,inputClassName:n,size:s,rows:l=3,...m},c)=>Zn("div",{className:i("relative",r,o&&"mobase-text-area-error"),children:[a&&Lo("span",{className:i("mobase-text-area-label absolute -top-2.5 left-2 z-[1] bg-white px-1.5 text-sm text-gray-500",s===2&&" -top-2.5 text-sm"),children:a}),Lo("textarea",{disabled:e,ref:c,className:i("mobase-text-area-box block w-full rounded-md border border-gray-300 bg-white p-3 text-sm text-gray-900 outline-none transition-all placeholder:text-gray-500 focus:border-pink-500 disabled:border-gray-200 disabled:bg-gray-50",s===2&&"text-base",n),rows:l,...m}),t&&Zn("div",{className:"mobase-text-area-message mt-0.5 flex items-center space-x-1",children:[o?Lo(fp,{width:16,height:16,className:"text-red-500"}):Lo(pp,{width:16,height:16,className:"text-gray-500"}),Lo("span",{className:i("text-gray-500 ",s===2?"text-sm":"text-xs"),children:t})]}),Lo("style",{children:`
|
|
71
71
|
.mobase-text-area-box:hover {
|
|
72
72
|
box-shadow: 0px 0px 0px 1px rgb(var(--mobase-gray-400) / 1) inset;
|
|
73
73
|
}
|