"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2582],{"Gn/9":function(e,t,r){r.d(t,{C:function(){return Close},D:function(){return DrawerComponent},u:function(){return useDrawerDrag}});var a=r("q1tI"),o=r("ubET"),n=r("iuhU"),i=r("rSBk"),l=r("rBCA"),s=r("rvDO");let Close=e=>a.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor"},e),a.createElement("path",{d:"M3.99403 3.32695C3.86141 3.32698 3.73181 3.36657 3.62181 3.44065C3.5118 3.51472 3.42638 3.61992 3.37648 3.7428C3.32658 3.86567 3.31445 4.00064 3.34165 4.13044C3.36885 4.26024 3.43415 4.37898 3.52919 4.47148L7.05784 8.00013L3.52919 11.5288C3.46521 11.5902 3.41413 11.6638 3.37894 11.7452C3.34375 11.8266 3.32516 11.9142 3.32425 12.0029C3.32335 12.0916 3.34015 12.1796 3.37368 12.2617C3.40721 12.3438 3.45678 12.4185 3.5195 12.4812C3.58222 12.5439 3.65682 12.5935 3.73894 12.627C3.82106 12.6605 3.90904 12.6773 3.99774 12.6764C4.08643 12.6755 4.17405 12.6569 4.25547 12.6217C4.33689 12.5865 4.41047 12.5355 4.4719 12.4715L8.00054 8.94283L11.5292 12.4715C11.5906 12.5355 11.6642 12.5865 11.7456 12.6217C11.827 12.6569 11.9147 12.6755 12.0034 12.6764C12.092 12.6773 12.18 12.6605 12.2621 12.627C12.3443 12.5935 12.4189 12.5439 12.4816 12.4812C12.5443 12.4185 12.5939 12.3439 12.6274 12.2617C12.6609 12.1796 12.6777 12.0916 12.6768 12.0029C12.6759 11.9142 12.6573 11.8266 12.6222 11.7452C12.587 11.6638 12.5359 11.5902 12.4719 11.5288L8.94325 8.00013L12.4719 4.47148C12.5682 4.37784 12.634 4.25728 12.6607 4.1256C12.6873 3.99392 12.6735 3.85726 12.6212 3.73354C12.5688 3.60982 12.4803 3.5048 12.3672 3.43224C12.2542 3.35969 12.1218 3.32299 11.9875 3.32695C11.8143 3.33211 11.6499 3.4045 11.5292 3.52877L8.00054 7.05742L4.4719 3.52877C4.40977 3.46491 4.33548 3.41415 4.2534 3.37948C4.17132 3.34482 4.08313 3.32696 3.99403 3.32695Z"})),c=300,useDrawerDrag=(e=c)=>{let[t,r]=(0,a.useState)(!1),o=(0,a.useCallback)(()=>{r(!0)},[]),n=(0,a.useCallback)(()=>{setTimeout(()=>{r(!1)},e)},[e]);return{isDragging:t,handleDragStart:o,handleDragEnd:n}},d=(0,l.Z)(i.dy.Content)` position: fixed; z-index: ${s.c-9e6+1}; inset: 0; background-color: #fff; outline: none !important; &::-webkit-scrollbar { width: 6px; height: 6px; } &::-webkit-scrollbar-track { background-color: transparent; } &::-webkit-scrollbar-thumb { background-color: rgba(0, 0, 0, 0.4); border-radius: 6px; } &[data-vaul-drawer-direction='bottom'] { border-top-left-radius: 8px; border-top-right-radius: 8px; } &[data-vaul-drawer-direction='top'] { border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; } &[data-vaul-drawer-direction='left'] { border-top-right-radius: 8px; border-bottom-right-radius: 8px; } &[data-vaul-drawer-direction='right'] { border-top-left-radius: 8px; border-bottom-left-radius: 8px; } ${e=>e.isDragging&&` input { caret-color: transparent; } `} `,p=(0,l.Z)(i.dy.Overlay)` position: fixed; inset: 0; z-index: ${s.c-9e6}; width: 100%; max-height: 100%; &[data-state='open'] { opacity: 0.6 !important; } `,DrawerComponent=e=>{let{open:t,onOpenChange:r,snapPoints:l,activeSnapPoint:c,setActiveSnapPoint:u,children:g,overlayClassName:m,className:h,fadeFromIndex:f=s.c-9e6,onClose:v}=e,b=(0,o.a)(e,["open","onOpenChange","snapPoints","activeSnapPoint","setActiveSnapPoint","children","overlayClassName","className","fadeFromIndex","onClose"]),[x,y]=(0,a.useState)(t),[E,w]=(0,a.useState)(l?null==l?void 0:l[0]:null),{isDragging:C,handleDragStart:k,handleDragEnd:$}=useDrawerDrag(),S=(0,a.useCallback)(e=>{y(e),null==r||r(e)},[r]),_=(0,a.useMemo)(()=>l&&l.length?E===l[l.length-1]:x,[E,l]),O=(0,a.useMemo)(()=>{let e={open:x,onOpenChange:S,fadeFromIndex:f};return l&&(null==l?void 0:l.length)&&(e.snapPoints=l,e.activeSnapPoint=E,e.setActiveSnapPoint=e=>{w(e),null==u||u(e)}),e},[x,S,E,w,u,l,f]);return(0,a.useEffect)(()=>{y(t)},[t]),(0,a.useEffect)(()=>{w(c)},[c]),a.createElement(i.dy.Root,Object.assign({onDrag:k,onRelease:$,onClose:v},b,O),a.createElement(i.dy.Portal,null,a.createElement(p,{className:(0,n.default)(m,"drawer__overlay",{drawer__overlay_full:_})}),a.createElement(d,{isDragging:C,className:(0,n.default)(h,"drawer__content",{drawer__content_full:_})},a.createElement(i.dy.Handle,{className:"drawer__handle"}),a.createElement(i.dy.Title,{style:{display:"none"}}),g)))}},"2tU2":function(e,t,r){r.d(t,{A:function(){return Alert},B:function(){return Badge},C:function(){return CardCollapse},D:function(){return DragFreeCarousel},F:function(){return FileDropdown},G:function(){return Grid},H:function(){return HtmlContent},I:function(){return IconHeading},R:function(){return Radio},S:function(){return StepRenderer},T:function(){return Tag},U:function(){return Upload},a:function(){return BorderHeading},b:function(){return RateStars},c:function(){return Toggle},d:function(){return U},e:function(){return J},f:function(){return n},g:function(){return i}});var a,o,n,i,l=r("q1tI"),s=r("lhAG"),c=r("rBCA"),d=r("iBNF"),p=r("nm4t"),u=r("4JiQ"),g=r("mYVa"),m=r("iuhU"),h=r("Iblh"),f=r("Qp7L"),v=r("wY0a"),b=r("ubET"),x=r("DSg0"),y=r("gEnE"),E=r("yVya"),w=r("VgLc"),C=r("Gn/9"),k=r("RF7b"),$=r("Zdfy");let Upload=e=>l.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 18 18",fill:"none"},e),l.createElement("path",{d:"M9.82324 8.7033L10.8228 9.70287C10.9267 9.80662 11.056 9.8573 11.2107 9.85493C11.3655 9.85255 11.4948 9.79943 11.5987 9.69555C11.7026 9.59168 11.7545 9.46074 11.7545 9.30274C11.7545 9.14474 11.7026 9.01462 11.5987 8.91237L9.7353 7.04899C9.59968 6.91337 9.44149 6.84555 9.26074 6.84555C9.07999 6.84555 8.9218 6.91337 8.78618 7.04899L6.91549 8.91968C6.81174 9.02355 6.75987 9.15287 6.75987 9.30762C6.75987 9.46237 6.81174 9.59168 6.91549 9.69555C7.01937 9.79943 7.1503 9.85137 7.3083 9.85137C7.4663 9.85137 7.59643 9.79943 7.69868 9.69555L8.69824 8.7033L8.69824 11.5576C8.69824 11.717 8.75218 11.8506 8.86005 11.9583C8.96793 12.0662 9.10156 12.1201 9.26093 12.1201C9.42043 12.1201 9.55399 12.0662 9.66162 11.9583C9.76937 11.8506 9.82324 11.717 9.82324 11.5576L9.82324 8.7033ZM16.3857 9.3063C16.3857 10.2918 16.1987 11.2181 15.8247 12.0852C15.4507 12.9524 14.9432 13.7066 14.3021 14.348C13.6609 14.9894 12.907 15.4972 12.0402 15.8714C11.1735 16.2456 10.2474 16.4326 9.26205 16.4326C8.27655 16.4326 7.35024 16.2456 6.48312 15.8716C5.61599 15.4976 4.86174 14.9901 4.22037 14.3489C3.57899 13.7078 3.07118 12.9539 2.69693 12.0871C2.3228 11.2204 2.13574 10.2943 2.13574 9.30893C2.13574 8.32343 2.32274 7.39712 2.69674 6.52999C3.07074 5.66287 3.5783 4.90862 4.21943 4.26724C4.86055 3.62587 5.61449 3.11805 6.48124 2.7438C7.34799 2.36968 8.27405 2.18262 9.25943 2.18262C10.2449 2.18262 11.1712 2.36962 12.0384 2.74362C12.9055 3.11762 13.6597 3.62518 14.3011 4.2663C14.9425 4.90743 15.4503 5.66137 15.8246 6.52812C16.1987 7.39487 16.3857 8.32093 16.3857 9.3063ZM15.2607 9.30762C15.2607 7.63262 14.6795 6.21387 13.517 5.05137C12.3545 3.88887 10.9357 3.30762 9.26074 3.30762C7.58574 3.30762 6.16699 3.88887 5.00449 5.05137C3.84199 6.21387 3.26074 7.63262 3.26074 9.30762C3.26074 10.9826 3.84199 12.4014 5.00449 13.5639C6.16699 14.7264 7.58574 15.3076 9.26074 15.3076C10.9357 15.3076 12.3545 14.7264 13.517 13.5639C14.6795 12.4014 15.2607 10.9826 15.2607 9.30762Z",fill:"#595959"})),Alert=({style:e,onClose:t,text:r,type:a,contentIcon:o,closeIcon:n,className:i,description:c})=>l.createElement("div",{className:`CHw-fZZ ${i||""}`,style:e,"data-alert-type":a},l.createElement("div",{className:"_03U6VRS"},l.createElement("div",{className:"icon-title"},o,l.createElement(s.T,{weight:"bold",size:"label1"},r)),l.createElement(s.T,{weight:"regular",size:"p3"},c)),l.createElement("div",{className:"EO828Vv",onClick:t},n)),renderNotificationStyles=(e,t,r,a)=>{let o,n="";if("numeric"===e)switch(t){case"medium":n=` height: 16px; font-size: 11px; padding: 1px 6px; `;case"large":n=` height: 24px; font-size: 13px; padding: 1px 10px; `}let i="";r&&(i=` position: absolute; top: 0; left: 75%; `),r&&(o=` left: 70%; ${"large"===t?` top: -7px; `:"medium"===t?` top: -2px; width: 16px; height: 16px; `:""} `);let l="";switch(a){case"primary":l=` background: ${d.r.colors.primary50}; color: ${d.r.colors.primary600}; `;break;case"error":l=` background: ${d.r.colors.error}; color: white; `}switch(e){case"dot":return` ${i} width: 8px; height: 8px; font-size: 0px; border-radius: 50%; ${l} `;case"numeric":return` ${i} width: max-content; border-radius: 32px; ${n} ${o} ${l} `}},S=c.Z.div` position: relative; > div { width: max-content; position: relative; } span { font-weight: ${d.r.sizes.fwBold}; display: flex; justify-content: center; align-items: center; ${e=>renderNotificationStyles(e.notificationType,e.notificationSize,e.hasIcon,e.notificationColor)} } ${e=>e.hasIcon&&` svg { width: 40px; height: 40px; } `} `,Badge=({amount:e,type:t,size:r="medium",color:a="primary",icon:o,className:n})=>l.createElement(S,{"data-notification-type":t,"data-notification-size":r,"data-notification-color":a,"data-has-icon":!!o||void 0,notificationType:t,notificationSize:r,notificationColor:a,hasIcon:!!o,className:n},l.createElement("div",null,e&&l.createElement("span",null,e)," ",o&&l.createElement("div",null,o))),_=c.Z.h4` position: relative; line-height: 18px; &:after { position: absolute; top: 1px; left: 0; width: 4px; height: 18px; background-color: ${d.r.colors.primaryBase}; content: ''; } &[data-size='lg'] { font-size: 18px; padding-left: 12px; } &[data-size='sm'] { font-size: 14px; padding-left: 8px; &::after { width: 2px; height: 15px; } } &[data-type='bold'] { font-weight: ${d.r.sizes.fwBold}; } &[data-type='semiBold'] { font-weight: ${d.r.sizes.fwSemiBold}; } &[data-uppercase] { text-transform: uppercase; } ${p.M.mbDown} { &[data-size='lg'] { font-size: 16px; } } `,BorderHeading=({style:e,children:t,className:r,size:a="lg",type:o="bold",upperCase:n,as:i="h4",color:s})=>l.createElement(_,{style:Object.assign({color:s},e),className:r,"data-size":a,"data-type":o,"data-uppercase":n,as:i},t),O=(0,c.Z)(f.S)` flex-shrink: 0; color: ${d.r.colors.neutral800}; width: 16px; height: 16px; transition: transform 0.2s ease-in-out; transform: rotate(-180deg); &[data-is-collapsed='true'] { transform: rotate(0deg); } `,N=c.Z.div` background-color: white; .icon { width: 20px; height: 20px; flex-shrink: 0; color: ${d.r.colors.neutral800}; } .title-collapse { color: #111111; font-weight: var(--fwSemiBold); font-size: 1.0625rem; line-height: 1.5rem; flex-grow: 1; } .box-collapse { display: flex; padding: 1.5rem 1rem 1rem 1rem; gap: 0.75rem; align-items: center; } `;function CardCollapse({children:e,title:t,icon:r,defaultOpened:a=!0,haveCollapse:o=!0,id:n,className:i,as:c="h2"}){let[d,{toggle:p}]=(0,h.q)(a);return l.createElement(N,{id:n,className:i},l.createElement("div",{className:"box-collapse",onClick:()=>{o&&p()}},o&&r,l.createElement(s.T,{as:c,className:"title-collapse"},t),o&&l.createElement(O,{"data-is-collapsed":d})),l.createElement(u.U,{in:!o||d,transitionDuration:200,transitionTimingFunction:"ease"},e))}let z=c.Z.div` position: relative; box-sizing: border-box; border: 1px solid ${d.r.colors.gray200}; background: url('../../../public/bgSvg/arrow-down.svg') no-repeat; background-position: right 16px center; border-radius: ${d.r.borderRadius}; &[data-has-icons='true'] { border: none; background: ${d.r.colors.gray100}; img, svg { display: inline-block; max-width: 16px; margin-right: 6px; } span { vertical-align: middle; display: inline-block; } &:hover { box-shadow: none; } > div { position: relative; width: 100%; display: flex; align-items: center; box-sizing: border-box; } > div::after { content: ''; right: 12px; top: 50%; background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23595959' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"); width: 10px; height: 8px; position: absolute; background-repeat: no-repeat; transform: translateY(-50%); } } &:hover { box-shadow: 0 0 2px 2px ${d.r.colors.primary200}; } `,T=c.Z.div` padding: 12px 18px 12px 16px; cursor: pointer; &[data-dropdown-open] { padding: 11px 15px 11px 15px; border: 1px solid ${d.r.colors.primaryBase}; border-radius: ${d.r.borderRadius}; box-shadow: 0 0 2px 2px ${d.r.colors.primary200}; } & > svg { height: 16px; width: 16px; } `,I=c.Z.ul` position: absolute; top: 100%; right: 0; left: 0; display: block; margin-top: 4px; background: ${d.r.colors.white}; border-radius: ${d.r.borderRadius}; box-shadow: -1px 1px 2px rgba(67, 70, 74, 0.0001), -2px 2px 5px rgba(67, 86, 100, 0.123689); cursor: pointer; &[data-has-icons='true'] { background: white; box-shadow: none; border: 1px solid ${d.r.colors.gray200}; filter: drop-shadow(0px 10px 16px rgba(0, 0, 0, 0.04)); } `,P=c.Z.li` margin: 8px; padding: 12px 18px 12px 16px; border-radius: ${d.r.borderRadius}; display: flex; &:hover, :active { background: ${d.r.colors.gray100}; } `,D=c.Z.div` display: flex; align-items: center; margin-right: 8px; & > svg { height: 16px; width: 16px; } `,ShareIconPathStyle=()=>l.createElement("style",null,".file-dropdown-path{fill:none;stroke:#595959;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5px}"),DefaultFileIcon=()=>l.createElement("svg",{id:"prefix__Layer_1","data-name":"Layer 1",viewBox:"0 0 12.17 14.83"},l.createElement("defs",null,l.createElement("clipPath",{id:"prefix__clip-path",transform:"translate(-1.92 -1.54)"},l.createElement("path",{fill:"none",d:"M0 .96h16v16H0z"}))),l.createElement("title",null,"File"),l.createElement("g",{clipPath:"url(#prefix__clip-path)"},l.createElement("path",{className:"file-dropdown-path",d:"M8.67 2.29H4a1.33 1.33 0 00-1.33 1.33v10.67A1.33 1.33 0 004 15.62h8a1.33 1.33 0 001.33-1.33V7z",transform:"translate(-1.92 -1.54)"}),l.createElement("path",{className:"file-dropdown-path",d:"M8.67 2.29V7h4.66",transform:"translate(-1.92 -1.54)"}))),DownloadIcon=()=>l.createElement("svg",{id:"prefix__Layer_1","data-name":"Layer 1",viewBox:"0 0 13.5 13.5"},l.createElement("title",null,"download"),l.createElement("path",{className:"file-dropdown-path",d:"M14 11v2.66A1.33 1.33 0 0112.67 15H3.33A1.33 1.33 0 012 13.62V11M4.67 7.62L8 11l3.33-3.34M8 11V3",transform:"translate(-1.25 -2.21)"})),UploadIcon=()=>l.createElement("svg",{id:"prefix__Layer_1","data-name":"Layer 1",viewBox:"0 0 13.5 13.5"},l.createElement("title",null,"upload"),l.createElement("path",{className:"file-dropdown-path",d:"M14 11v2.66A1.33 1.33 0 0112.67 15H3.33A1.33 1.33 0 012 13.62V11M11.33 6.29L8 3 4.67 6.29M8 3v8",transform:"translate(-1.25 -2.21)"})),FileDropdown=({className:e,value:t,options:r,onUploadSelected:a,id:o,placeholderIcon:n,placeholder:i,style:s})=>{let[c,d]=(0,l.useState)(!1),showDropdown=()=>d(!c),p=(0,l.useRef)(r.map(e=>"upload"===e.type&&l.createElement("input",{id:"uploader-dropdown-input-"+o+"-"+e.value,key:"uploader-dropdown-input-"+o+"-"+e.value,accept:e.fileAcceptedType,multiple:e.multiple,type:"file",style:{display:"none"},onChange:e=>{console.log("change"),a(e.target.files)}}))),onUpload=e=>{var t;null===(t=document.querySelector(e))||void 0===t||t.click()},onDownload=e=>{e&&window.open(e,"_blank")};return l.createElement(z,{className:e,"data-dropdown-open":!!c,id:o,"data-has-icons":!0,style:s,onBlur:()=>d(!1),tabIndex:0},l.createElement(ShareIconPathStyle,null),l.createElement(T,{onClick:showDropdown},n||l.createElement(DefaultFileIcon,null)," ",l.createElement("span",null,t&&t.value?t.label:i)),c&&l.createElement(I,{onClick:showDropdown,"data-has-icons":!0},r.map(e=>l.createElement(P,{key:`${o}-${e.value}`,"data-selected":t&&t.value===e.value||void 0,onClick:()=>"upload"===e.type?onUpload("#uploader-dropdown-input-"+o+"-"+e.value):onDownload(e.url)},l.createElement(D,null,e.icon||"download"===e.type?l.createElement(DownloadIcon,null):l.createElement(UploadIcon,null)),e.label))),l.createElement(l.Fragment,null,p.current))},A=c.Z.div` --columns: var(--grid-template-columns, repeat(var(--columns-count), 1fr)); --columns-desktop: var( --grid-template-columns-desktop, repeat(var(--columns-count-desktop), 1fr) ); display: grid; grid-template-columns: var(--columns); grid-gap: var(--grid-gap); align-items: var(--align-items); ${p.M.tdUp} { grid-template-columns: var(--columns-desktop); } > * { justify-self: var(--justify-children); } `,Grid=({className:e,columns:t,columnsDesktop:r,gridTemplateColumns:a,gridTemplateColumnsDesktop:o,gap:n,children:i,justifyChildren:s,style:c,alignItems:d})=>l.createElement(A,{className:e,style:Object.assign({"--columns-count":t,"--columns-count-desktop":r,"--grid-template-columns":a,"--grid-template-columns-desktop":o,"--justify-children":s,"--grid-gap":n,"--align-items":d},c)},i),Radio=({size:e="small",label:t,name:r,checked:a,value:o,className:n,isDisabled:i=!1,onChange:s,dataEventCategory:c,dataEventAction:d,dataEventLabel:p})=>{let u=!!d&&!!c&&!!p,g=u?{"data-event-category":c,"data-event-action":d,"data-event-label":p}:{};return l.createElement(v.R,Object.assign({size:"small"===e?"md":"lg",label:t,name:r,checked:a,value:o,className:n,disabled:i,onChange:e=>null==s?void 0:s(e.target.value)},g))},M=c.Z.div` display: inline-flex; gap: calc(var(--gap) * 1px); > svg { width: calc(var(--star-size) * 1px); height: calc(var(--star-size) * 1px); } &[data-selectable='true'] { > svg { cursor: pointer; } } `,StarHalfIcon=e=>l.createElement("svg",Object.assign({},e,{viewBox:"0 0 24 24",fill:"none"}),l.createElement("path",{d:"m139.287 144.772 5.17 3.12c.38.23.85-.11.75-.54l-1.37-5.88 4.56-3.95c.33-.29.16-.84-.29-.88l-6.01-.51-2.35-5.54a.498.498 0 0 0-.92 0l-2.35 5.54-6.01.51a.499.499 0 0 0-.28.88l4.56 3.95-1.37 5.88c-.1.43.37.77.75.54z",fill:"#E4E8EC"}),l.createElement("path",{d:"M139.289 144.771s.013-14.488 0-14.488a.49.49 0 0 0-.46.308l-2.35 5.54-6.01.51a.499.499 0 0 0-.28.88l4.56 3.95-1.37 5.88c-.1.43.37.77.75.54z",fill:"#FFC326"})),StarIcon=e=>{var{isFull:t}=e,r=(0,b.a)(e,["isFull"]);return l.createElement("svg",Object.assign({},r,{viewBox:"0 0 32 32",fill:"none"}),l.createElement("path",{d:"m16 23.027 6.893 4.16c.507.306 1.134-.147 1-.72l-1.826-7.84 6.08-5.267a.67.67 0 0 0-.387-1.173l-8.013-.68-3.134-7.387a.664.664 0 0 0-1.226 0l-3.133 7.387-8.014.68a.668.668 0 0 0-.373 1.173l6.08 5.267-1.827 7.84c-.133.573.493 1.026 1 .72z",fill:t?"#FFC326":"#D2D6DC"}))},RateStars=({gap:e=2,size:t=24,star:r,totalStars:a=5,onSelect:o,hideEmptyStars:n,style:i,className:s})=>{let c=Math.floor(r),d=r-c>=.5?1:0,[p,u]=(0,l.useState)(null),g=p||c,m=p?0:d;return l.createElement(M,{"data-selectable":!!o,style:Object.assign({"--gap":e,"--star-size":t},i),className:s},Array.from({length:n?c+d:a}).map((e,t)=>{let onMouseOver=()=>!!o&&u(t+1),onMouseLeave=()=>!!o&&u(null);return t+1<=g?l.createElement(StarIcon,{key:t,onClick:()=>null==o?void 0:o(t+1),onMouseOver:onMouseOver,onMouseLeave:onMouseLeave,isFull:!0}):t+1===g+m?l.createElement(StarHalfIcon,{key:t,onClick:()=>null==o?void 0:o(t+1),onMouseOver:onMouseOver,onMouseLeave:onMouseLeave}):l.createElement(StarIcon,{key:t,onClick:()=>null==o?void 0:o(t+1),onMouseOver:onMouseOver,onMouseLeave:onMouseLeave})}))},getTag=(e,t)=>{switch(e){case"yellow":{let e=t?d.r.colors.yellow50:d.r.colors.yellow600;return` background: ${e}; p { color: var( --text-props-color, ${d.r.colors.gray800} ); } `}case"standard":return` background: ${d.r.colors.white}; border: 1px solid ${d.r.colors.gray200}; p { color: var( --text-props-color, ${d.r.colors.gray800} ); } &:hover { background: ${d.r.colors.gray100}; } `;case"red":{let e=t?d.r.colors.red50:d.r.colors.red500;return` background: ${e}; `}case"green":{let e=t?d.r.colors.green50:d.r.colors.green500;return` background: ${e}; `}case"blue":{let e=t?d.r.colors.primary50:d.r.colors.primaryBase;return` background: ${e}; `}case"teal":{let e=t?d.r.colors.teal100:d.r.colors.teal600;return` background: ${e}; `}case"pink":{let e=t?d.r.colors.pink200:d.r.colors.pink800;return` background: ${e}; `}case"violet":{let e=t?d.r.colors.violet100:d.r.colors.violet500;return` background: ${e}; `}case"grey":{let e=t?d.r.colors.gray100:d.r.colors.gray600;return` background: ${e}; `}}},L=c.Z.div` --padding-horizontal: 8px; --pading-vertical: 2px; display: flex; align-items: center; justify-content: center; padding: var(--pading-vertical) var(--padding-horizontal); border-radius: 24px; ${e=>"sponsored"===e.tagType&&` --offset-size: 4px; display: flex; align-items: center; justify-content: center; box-sizing: content-box; position: relative; box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.08); border-radius: 0 4px 18px 0; height: 24px; width: 90px; border-left: var(--offset-size) solid ${d.r.colors.accentLight}; padding: 0; margin-left: calc(var(--offset-size) * -1); p { font-weight: ${d.r.sizes.fwBold}; color: var( --text-props-color, ${d.r.colors.secondaryDark} ); font-size: 11px; margin-left: calc(var(--offset-size) * -1); } &::after { width: calc(var(--offset-size) * 2); height: var(--offset-size); background: ${d.r.colors.accentMain}; position: absolute; left: calc(var(--offset-size) * -1); bottom: calc(var(--offset-size) * -1); clip-path: polygon(0 1%, 100% 0%, 100% 100%); content: ''; } `} ${e=>e.isInline&&` display: inline-block; `} ${e=>e.tagHasMorePadding&&` &[data-has-more-padding] { padding: calc(var(--pading-vertical) + 5px) var(--padding-horizontal); } `} p { ${e=>e.tagIsLight?` color: var(--text-props-color, #000); `:` color: var(--text-props-color, ${d.r.colors.white}); `} } ${e=>getTag(e.tagType,e.tagIsLight)} ${e=>e.tagIsSquared&&"sponsored"!==e.tagType&&` border-radius: 4px; `} ${e=>e.tagIsALink&&` cursor: pointer; `} &[data-is-selected], &:active { background: ${d.r.colors.primary50}; } `,Tag=({type:e,children:t,style:r,isInline:a,isSquared:o=!1,className:n,isLight:i,hasMorePadding:s,isLink:c,isSelected:d,textProps:p={size:"sm"}})=>{let u=p.color?{"--text-props-color":p.color}:{};return l.createElement(L,{"data-is-squared":o||void 0,"data-tag-type":e,"data-is-light":i||void 0,"data-has-more-padding":s||void 0,"data-is-inline":a||void 0,style:Object.assign(Object.assign({},r),u),className:n,"data-is-selected":d||void 0,"data-is-link":c||void 0,tagType:e,isInline:a,tagHasMorePadding:s,tagIsLight:i,tagIsSquared:o,tagIsALink:c},l.createElement(x.T,Object.assign({},p),t))},B="24px",R=(0,y.Z)(c.Z.span` position: relative; display: block; width: 40px; height: ${B}; background: #c3cbd4; border-radius: 100px; cursor: pointer; &:after { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; background: #fff; border-radius: 90px; content: ''; transition: 0.3s; } `,"hhgcomp-toggle-icon"),F=c.Z.span` padding-left: 15px; `,j=c.Z.div` height: ${B}; input[type='checkbox'] { width: 0; height: 0; visibility: hidden; } label { cursor: pointer; display: inline-flex; color: ${d.r.colors.gray600}; } input:checked + label ${R.classSelector} { background: ${d.r.colors.primaryBase}; &:after { left: calc(100% - 2px); transform: translateX(-100%); } } `,Toggle=({className:e,id:t,onChange:r,checked:a,style:o,label:n})=>l.createElement(j,{className:e,style:o},l.createElement("input",{type:"checkbox",id:t,onChange:r,checked:a}),l.createElement("label",{htmlFor:t},l.createElement(R,null),n&&l.createElement(F,null,n))),U=(0,l.createContext)({currentStep:0,setCurrentStep:()=>!1,setMaxStep:()=>!1,nextStep:()=>!1,prevStep:()=>!1}),StepRenderer=({children:e,onStepChange:t})=>{let[r,a]=(0,l.useState)(0),[o,n]=(0,l.useState)(0),i=l.Children.count(e);return(0,l.useEffect)(()=>{n(i-1)},[i]),(0,l.useEffect)(()=>{null==t||t(r)},[r]),l.createElement(U.Provider,{value:{currentStep:r,setCurrentStep:a,setMaxStep:n,nextStep:()=>r+1<=o&&a(r+1),prevStep:()=>r-1>=0&&a(r-1)}},(0,E.Z)(e).map((e,t)=>{let a=t===r;return l.createElement(l.Fragment,{key:t},l.isValidElement(e)?e.props.alwaysRender||a?l.cloneElement(e,{isActive:t===r,stepIndex:t}):null:a?e:null)}))},Z=c.Z.div` display: flex; align-items: center; gap: 8px; `,H=(0,c.Z)(w.H)` font-weight: var(--fwBold); `,IconHeading=({icon:e,title:t,className:r,style:a})=>l.createElement(Z,{className:r,style:a},e,l.createElement(H,{tag:"h6",color:"var(--secondaryDark)"},t)),sanitizeHtml=e=>{if(!e)return"";let t=e.replace(/\n$/,"").replace(/\n/g,"
");return t},HtmlContent=({htmlContent:e,className:t})=>{let r=sanitizeHtml(e);return l.createElement("div",{className:t,dangerouslySetInnerHTML:{__html:r}})};(a=n||(n={})).ONE_TO_ONE="1:1",a.THREE_TO_ONE="3:1",(o=i||(i={})).PNG=".png",o.JPG=".jpg",o.JPEG=".jpeg";let getBase64=e=>new Promise((t,r)=>{let a=new FileReader;a.onload=()=>t(a.result),a.onerror=r,a.readAsDataURL(e)}),handleMultipleImageFiles=e=>(0,b._)(void 0,void 0,void 0,function*(){if(0===e.length)return[];let t=yield Promise.all(e.map(e=>getBase64(e)));return t}),V=c.Z.div` display: flex; flex-direction: column; .image-upload-input-error { margin-top: ${(0,g.h)(12)}; display: flex; flex-direction: column; gap: ${(0,g.h)(4)}; } `,G=c.Z.div` display: flex; flex-direction: column; gap: ${(0,g.h)(4)}; margin-top: ${(0,g.h)(4)}; span { color: ${d.r.colors.neutral500}; } `,Y=c.Z.div` position: relative; width: fit-content; padding: ${(0,g.h)(8)} ${(0,g.h)(12)}; border-radius: ${(0,g.h)(12)}; border: ${(0,g.h)(1)} solid ${d.r.colors.neutral200}; cursor: pointer; display: flex; align-items: center; gap: ${(0,g.h)(8)}; margin-top: ${(0,g.h)(18)}; &.image-upload-dragover { border-color: ${d.r.colors.primaryBase}; } &.image-upload-error { border-color: ${d.r.colors.error}; } &.image-upload-disabled { cursor: not-allowed; background-color: ${d.r.colors.gray100}; color: ${d.r.colors.gray400}; border-color: ${d.r.colors.gray200}; } svg { width: ${(0,g.h)(18)}; height: ${(0,g.h)(18)}; } input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: -1; } `,q=c.Z.div` position: relative; width: ${(0,g.h)(90)}; height: ${(0,g.h)(90)}; border-radius: ${(0,g.h)(12)}; overflow: hidden; background-color: ${d.r.colors.gray100}; display: flex; align-items: center; justify-content: center; img { width: 100%; height: 100%; object-fit: contain; } svg { width: ${(0,g.h)(14)}; height: ${(0,g.h)(14)}; color: ${d.r.colors.white}; } .image-upload-remove-button { cursor: pointer; position: absolute; top: ${(0,g.h)(6)}; right: ${(0,g.h)(6)}; background: ${d.r.colors.black}; border-radius: ${(0,g.h)(12)}; padding: ${(0,g.h)(2)}; display: flex; &:hover { opacity: 0.8; } } `,W=c.Z.div` display: flex; gap: ${(0,g.h)(8)}; margin-top: ${(0,g.h)(18)}; `,J=(0,l.forwardRef)(({label:e,name:t,error:r,acceptedTypes:a=[i.PNG,i.JPG,i.JPEG],maxSize:o=1,acceptedRatios:n,multiple:c=!1,disabled:p=!1,id:u,className:h,onChange:f,value:v,showValidationRules:x=!1,description:y,useBase64:E=!1,placeholder:w},$)=>{let{t:S}=(0,k.u)(),[_,O]=(0,l.useState)(!1),[N,z]=(0,l.useState)([]),T=(0,l.useRef)(null),I=!!r||N.length>0,P=(0,l.useMemo)(()=>v?Array.isArray(v)?v:[v]:[],[v]),D=(0,l.useCallback)(e=>{var t;let r=[],n="."+(null===(t=e.name.split(".").pop())||void 0===t?void 0:t.toLowerCase());a.includes(n)||r.push(`Unsupported file format. Please upload a ${a.join(", ")} file.`);let i=e.size/1048576;return i>o&&r.push(`File too large. Please upload an image smaller than ${o}MB.`),{file:e,isValid:0===r.length,errors:r}},[a,o]),A=(0,l.useCallback)(e=>new Promise(t=>{if(!n||!n.length||!e.type.startsWith("image/")){t([]);return}let r=new Image;r.onload=()=>{let e=r.width/r.height,a=`${e.toFixed(1)}:1`,o=n.some(t=>{let[r,a]=t.split(":"),o=parseInt(r)/parseInt(a);return .1>Math.abs(e-o)});t(o?[]:[`Image ratio ${a} is not accepted.`])},r.onerror=()=>t(["Invalid image file"]),r.src=URL.createObjectURL(e)}),[n]),M=(0,l.useMemo)(()=>P.map(e=>"string"==typeof e?e:e instanceof File?URL.createObjectURL(e):"").filter(Boolean),[P]),L=(0,l.useCallback)(e=>(0,b._)(void 0,void 0,void 0,function*(){let r=Array.from(e),a=[],o=[];for(let e of r){let t=D(e),r=yield A(e),n=[...t.errors,...r];0===n.length?o.push(e):a.push(...n)}if(z(a),0===o.length)return;let n=E?yield handleMultipleImageFiles(o):o;f({target:{name:t,value:c?[...P,...n]:n.slice(0,1)}})}),[D,A,c,f,t,P]),removeFile=e=>{let r=P.filter((t,r)=>r!==e);z([]),f({target:{name:t,value:c?r:""}})},B=(0,l.useCallback)(e=>{T.current=e,"function"==typeof $?$(e):$&&($.current=e)},[$]),R=(0,l.useCallback)(()=>{!p&&T.current&&T.current.click()},[p]),F=(0,l.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),O(!0)},[]),j=(0,l.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),O(!1)},[]),U=(0,l.useCallback)(e=>{e.preventDefault(),e.stopPropagation()},[]),Z=(0,l.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),O(!1);let t=e.dataTransfer.files;t.length>0&&L(t)},[L]);return l.createElement(V,{className:h},l.createElement("label",{htmlFor:u||t},"string"==typeof e?l.createElement(s.T,{size:"title2"},e):e,y&&l.createElement(s.T,{size:"p3",mt:(0,g.h)(4),color:d.r.colors.gray700},y)),x&&l.createElement(G,null,l.createElement(s.T,{size:"p3"},"Formats: ",a.join("/")),n&&l.createElement(s.T,{size:"p3"},"Max size: ",o,"MB - Accepted ratios:"," ",n.join("/"))),(c||0===P.length)&&l.createElement(Y,{className:(0,m.default)(_&&"image-upload-dragover",I&&"image-upload-error",p&&"image-upload-disabled"),onDragEnter:F,onDragLeave:j,onDragOver:U,onDrop:Z,onClick:R},l.createElement("input",{ref:B,type:"file",id:u||t,name:t,accept:a.join(","),multiple:c,onChange:e=>{let t=e.target.files;t&&t.length>0&&L(t)},disabled:p}),l.createElement(Upload,null),l.createElement(s.T,{size:"p3",fw:500},w||S("common.btn.uploadPhoto"))),P.length>0&&l.createElement(W,null,M.map((e,t)=>l.createElement(q,{key:t},l.createElement("img",{src:e,alt:`Uploaded file ${t+1}`,className:"image-upload-preview-image"}),l.createElement("button",{onClick:e=>{e.stopPropagation(),removeFile(t)},className:"image-upload-remove-button"},l.createElement(C.C,null))))),I&&l.createElement("div",{className:"image-upload-input-error"},[...N,r].map(e=>l.createElement(s.T,{key:e,className:"error-text",size:"c1",color:d.r.colors.red600},e))))}),K=(0,c.Z)($.l)` & .mantine-Carousel-control { width: auto; } `,DragFreeCarousel=e=>{var{children:t,gapItem:r=8,slideSize:a="auto",withControls:o=!1,withIndicators:n=!1,dragFree:i=!0,align:s="start"}=e,c=(0,b.a)(e,["children","gapItem","slideSize","withControls","withIndicators","dragFree","align"]);return l.createElement(K,Object.assign({slideSize:a,slideGap:r,withControls:o,withIndicators:n,dragFree:i,align:s,containScroll:"trimSnaps"},c),l.Children.map(t,(e,t)=>l.createElement($.l.Slide,{key:t},e)))}},RF7b:function(e,t,r){r.d(t,{f:function(){return format},u:function(){return useTranslations}});var a=r("q1tI"),o=r("/CU6");function format(e,t){let r=[e];return(Object.keys(t).forEach(e=>{r=function(e,t,r){let o=[];return e.forEach(e=>{if("string"==typeof e){let n=RegExp(`\\{${r}\\}`,"gi");if("string"==typeof t||"number"==typeof t)o.push(e.replace(n,`${t}`));else{let r=e.split(n);r.forEach((e,n)=>{e&&(function(e){let t=[],r=!1,o=!1;return e.match(/^\s+/gi)&&(e=e.replace(/^\s+/gi,""),r=!0),e.match(/\s+$/gi)&&(e=e.replace(/\s+$/gi,""),o=!0),r&&t.push(a.createElement(a.Fragment,null,"\xa0")),t.push(e),o&&t.push(a.createElement(a.Fragment,null,"\xa0")),t})(e).forEach(e=>o.push(e)),n+1"string"==typeof e)?r.join(""):a.createElement(a.Fragment,null,r.map((e,t)=>a.createElement(a.Fragment,{key:t},e)))}function useTranslations(){let{values:e,locale:t}=(0,a.useContext)(o.T)||{locale:"en-PH"};return(0,a.useMemo)(()=>({t:(t,r)=>e?e[t]?r?format(e[t]||t,r):e[t]||t:r?format(t,r):t:t,locale:t}),[e,t])}},"1WGw":function(e,t,r){r.d(t,{I:function(){return Input},L:function(){return Label},S:function(){return u},a:function(){return p},b:function(){return d}});var a=r("ubET"),o=r("q1tI"),n=r("8vDj"),i=r("rBCA"),l=r("iBNF"),s=r("nm4t");let c=i.Z.div` position: relative; width: 100%; &[data-has-error] { input { border-color: ${l.r.colors.red700}; } } input { width: 100%; padding: 12px 16px; border: solid 1px ${l.r.colors.gray200}; border-radius: ${l.r.borderRadius}; &:active, &:focus, &.focused { border-color: ${e=>e.color}; box-shadow: 0px 0px 2px 2px ${e=>e.shadowColor}; } &:disabled { background-color: ${l.r.colors.gray100}; cursor: not-allowed; } } &[data-has-action-icon] { input { padding: 12px 48px 12px 16px; } } &[data-has-display-icon] { input { padding: 12px 16px 12px 48px; } } &[data-has-action-icon][data-has-display-icon] { input { padding: 12px 48px; } } &[data-size='lg'] { input { font-size: 16px; font-weight: ${l.r.sizes.fwRegular}; ${s.M.mbDown} { font-size: 22px; line-height: 1.2; } ${s.M.mbUp} { font-size: 26px; line-height: 1.2; } } } &[data-size='md'] { input { font-weight: ${l.r.sizes.fwRegular}; line-height: 22px; ${s.M.mbDown} { font-size: 14px; line-height: 1.2; } ${s.M.mbUp} { font-size: 16px; line-height: 1.2; } } } &[data-size='sm'] { input { font-weight: ${l.r.sizes.fwRegular}; line-height: 20px; ${s.M.mbDown} { font-size: 13px; line-height: 1.5; } ${s.M.mbUp} { font-size: 13px; line-height: 1.5; } } } `,d=i.Z.label` color: ${l.r.colors.red700}; font-weight: ${l.r.sizes.fwRegular}; `,p=i.Z.div` position: absolute; top: 50%; right: 16px; cursor: pointer; transform: translateY(-50%); `,u=i.Z.div` position: absolute; top: 50%; left: 16px; display: inline-flex; cursor: default; transform: translateY(-50%); `,Label=({children:e,className:t,style:r,htmlFor:a,size:n})=>o.createElement("label",{"data-size":n,className:`DjBFAbd ${t||""}`,style:r,htmlFor:a},e),Input=e=>{var{name:t,value:r,errorMessage:i,isNumerousKeyboard:l=!1,showErrorMessage:s=!0,actionIcon:g,displayIcon:m,onActionClick:h,label:f,className:v,onChange:b,isDisabled:x,CustomInput:y,size:E,style:w,autoComplete:C="off",type:k="text",inputClassName:$,trackingAttributes:S,enterKeyHint:_}=e,O=(0,a.a)(e,["name","value","errorMessage","isNumerousKeyboard","showErrorMessage","actionIcon","displayIcon","onActionClick","label","className","onChange","isDisabled","CustomInput","size","style","autoComplete","type","inputClassName","trackingAttributes","enterKeyHint"]);let N=(0,n.rZ)(),z=(0,o.useMemo)(()=>S?{"data-event-category":S.dataEventCategory,"data-event-action":S.dataEventAction,"data-event-label":S.dataEventLabel}:{},[S]);return o.createElement(c,{"data-size":E,className:v,"data-has-action-icon":!!g||void 0,"data-has-display-icon":!!m||void 0,"data-has-error":i&&i.length>0||void 0,color:N.fn.primaryColor(),shadowColor:N.colors[N.primaryColor][0],style:w},f&&o.createElement(Label,{size:"label2",htmlFor:t,className:"inputLabel"},f),o.createElement("div",{style:{position:"relative"}},y||o.createElement("input",Object.assign({id:t,name:t,onChange:e=>b&&b(e.target.value),type:k,"aria-label":k,value:r,disabled:x,autoComplete:C,inputMode:l||"number"===k?"numeric":k,pattern:l?"[0-9]*":".*",className:$,enterKeyHint:_},z,O)),m&&o.createElement(u,{className:"displayIcon"},m),g&&o.createElement(p,{className:"actionIcon",onClick:h},g)),i&&i.length>0&&s&&o.createElement(d,{className:"errorLabel"},i))}},rRTB:function(e,t,r){r.d(t,{U:function(){return UserAvatar}});var a=r("ubET"),o=r("q1tI"),n=r("Hcm0"),i=r("rBCA"),l=r("iBNF");let s=i.Z.div` width: ${e=>e.size||40}px; height: ${e=>e.size||40}px; flex-shrink: 0; cursor: pointer; img { border-radius: 50%; } .avatar { width: 100%; height: 100%; object-fit: cover; } .avatar-default { display: flex; align-items: center; justify-content: center; background-color: ${l.r.colors.secondaryBase}; border-radius: 50%; color: white; font-size: 1em; font-weight: bold; line-height: 1; } &[data-is-marrybaby='true'] { .avatar-default { background-color: ${l.r.mbColors.pink}; } } `,UserAvatar=e=>{var{className:t,isMarryBaby:r,style:i,avatar:l,username:c,size:d}=e,p=(0,a.a)(e,["className","isMarryBaby","style","avatar","username","size"]);let{data:{env:{isMarryBaby:u}}}=(0,o.useContext)(n.T),[g,m]=(0,o.useState)(!1);return o.createElement(s,Object.assign({"data-is-marrybaby":"boolean"==typeof r?r:u,className:t,style:i,size:d},p),l&&!g?o.createElement("img",{loading:"lazy",src:l,className:"avatar",alt:"avatar",onError:()=>{g||m(!0)}}):o.createElement("div",{className:"avatar avatar-default"},c&&(null==c?void 0:c.length)>0?c[0].toUpperCase():"A"))}},rGrC:function(e,t,r){r.d(t,{C:function(){return CartCareButton},S:function(){return ShoppingCartCare}});var a=r("q1tI"),o=r("xXM3"),n=r.n(o),i=r("rBCA"),l=r("Eso5"),s=r("iBNF"),c=r("nm4t"),d=r("RF7b"),p=r("lhAG");let ShoppingCartCare=e=>a.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"none"},e),a.createElement("path",{d:"M1.94434 1.94434L3.44545 2.31989C3.88211 2.42878 4.20989 2.791 4.27545 3.23656L5.55656 11.9454",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M16.9444 14.7218H4.99997C4.23331 14.7218 3.61108 14.0996 3.61108 13.3329C3.61108 12.5662 4.23331 11.944 4.99997 11.944H14.4766C14.9544 11.944 15.38 11.6385 15.5311 11.184L17.0122 6.73957C17.2522 6.01957 16.7166 5.27734 15.9578 5.27734H4.57553",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M4.16648 18.8891C4.93354 18.8891 5.55537 18.2673 5.55537 17.5002C5.55537 16.7332 4.93354 16.1113 4.16648 16.1113C3.39941 16.1113 2.77759 16.7332 2.77759 17.5002C2.77759 18.2673 3.39941 18.8891 4.16648 18.8891Z",fill:"currentColor"}),a.createElement("path",{d:"M15.8332 18.8891C16.6003 18.8891 17.2221 18.2673 17.2221 17.5002C17.2221 16.7332 16.6003 16.1113 15.8332 16.1113C15.0662 16.1113 14.4443 16.7332 14.4443 17.5002C14.4443 18.2673 15.0662 18.8891 15.8332 18.8891Z",fill:"currentColor"})),u=(0,i.Z)(l.x)` display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid #ffffff33; position: relative; flex-shrink: 0; cursor: pointer; /* Desktop: Square layout */ border-radius: 28px; max-height: 40px; padding: 9px 1rem; background-color: inherit; white-space: nowrap; .cart-care-icon { width: 20px; height: 20px; color: ${s.r.colors.white}; flex-shrink: 0; } .cart-care-button-text { display: block; font-size: 14px; font-weight: 500; line-height: 22px; } /* Mobile: Circle layout */ ${c.M.mbDown} { border-radius: 100%; aspect-ratio: 1/1; width: 32px; height: 32px; padding: auto; background-color: ${s.r.colors.white}; max-height: none; padding: 0; .cart-care-icon { width: 20px; height: 20px; color: ${s.r.colors.blue900}; flex-shrink: 0; } .cart-care-button-text { display: none; } } `,g=(0,i.Z)(l.x)` min-width: 20px; min-height: 20px; aspect-ratio: 1/1; border-radius: 100%; background-color: ${s.r.colors.red500}; color: ${s.r.colors.white}; display: flex; align-items: center; justify-content: center; flex-shrink: 0; position: absolute; top: -4px; right: -4px; ${c.M.mbDown} { top: -8px; right: -8px; } `,CartCareButton=e=>{let{count:t=0,href:r,classes:o,boxProps:i,anchorProps:l,tracking:c}=e,{t:m}=(0,d.u)();return a.createElement("a",Object.assign({className:n()("cart-care-button"),href:r,"data-testid":"cart-care-button","data-event-category":"Hamburger Navigation","data-event-action":"Cart Click","data-event-label":r},c,l),a.createElement(u,Object.assign({className:n()("cart-care-button-box",null==o?void 0:o.box)},i),a.createElement(ShoppingCartCare,{className:"cart-care-icon"}),a.createElement(p.T,{size:"label1",color:s.r.colors.white,fw:500,className:"cart-care-button-text"},m("navigation.button.cartCareService")),t>0&&a.createElement(g,{className:n()("cart-care-button-count-box",null==o?void 0:o.count)},a.createElement(p.T,{size:t>99?"label2":"c1",color:s.r.colors.white,fw:600,className:"cart-care-button-count-text"},t>99?"99+":t))))}},jD7J:function(e,t,r){r.d(t,{B:function(){return g},F:function(){return h},G:function(){return m},S:function(){return d},a:function(){return fetchSSOV2ApiJson},c:function(){return checkUserExist},f:function(){return fetchSSOV2Api},g:function(){return getUserInfo},h:function(){return handleAuthSuccess},l:function(){return p},r:function(){return resetPassword},u:function(){return updateUserInfo},w:function(){return u}});var a=r("ubET"),o=r("GOBr"),n=r("nwSF"),i=r("rvDO"),l=r("27Mu"),s=r("hKh/"),c=r("xrdX");let d={LOGIN_BY_SOCIAL:"member/social-login",EMAIL:{REGISTER_BY_SEND_OTP:"login/login-with-email",LOGIN_BY_PASSWORD:"member/login",VERIFY_BY_OTP:"login/email-verify-code",SEND_OTP:"login/email-resend-otp-code"},PHONE:{REGISTER_BY_SEND_OTP:"login/login-with-sms",SEND_OTP:"login/sms/sent-otp",VERIFY_BY_OTP:"login/phone-verify-code",LOGIN_BY_PASSWORD:"member/login-by-phone",UPDATE_PHONE_SEND_OTP:"login/sms-social/sent-otp",UPDATE_PHONE_VERIFY_OTP:"login/sms-social/phone-verify-code"},WHATSAPP:{LOGIN_OTP_WHATSAPP:"login/login-otp-whatsapp",REGISTER_BY_SEND_OTP:"login/login-with-whatsapp",SEND_OTP:"login/whatsapp/sent-otp",UPDATE_PHONE_SEND_OTP:"login/sms-social/whatsapp/sent-otp",UPDATE_PHONE_VERIFY_OTP:"login/sms-social/whatsapp-verify-code",VERIFY_BY_OTP:"login/whatsapp-verify-code"},ZALO:{REGISTER_BY_SEND_OTP:"login/login-with-zalo",SEND_OTP:"login/zalo/sent-otp",VERIFY_BY_OTP:"login/zalo-verify-code",UPDATE_PHONE_SEND_OTP:"login/sms-social/zalo/sent-otp",UPDATE_PHONE_VERIFY_OTP:"login/sms-social/zalo-verify-code"},RESET_PASSWORD:"login/reset-password",CHECK_USER_EXIST:"member/check-user-exist",UPDATE_USER_INFO:"login/update-first-info",SETUP_USER_INFO:"login/setup-first-info",ECOM_CARE:{SEND_OTP:"login/ecom-care/send-email-otp-code",VERIFY_OTP:"login/ecom-care/email-verify-code",RESEND_OTP:"login/ecom-care/resend-email-otp-code"}},p="vi-VN",u={[s.L.Vietnam]:"1",[s.L.Indonesia]:"2",[s.L.Malaysia]:"3"}[p];i.L[p].PHONE;let getSSOV2ApiUrl=e=>(0,n.e)(`${(0,n.a)(p)}/api/v2/${e}`),getSSOApiUrl=e=>(0,n.e)(`${(0,n.a)(p)}/api/${e}`),g="hhg_user_token",fetchSSOV2Api=(e,t={},r)=>(0,a._)(void 0,void 0,void 0,function*(){var a;let o;let n=r?"":null===(a=document.cookie.split("; ").find(e=>e.startsWith(g)))||void 0===a?void 0:a.split("=")[1];try{t.body instanceof FormData&&(t.body.append("ga_client_id",(0,l.ej)("_ga")||""),t.body.append("referrer",window.location.href)),o=yield fetch(getSSOV2ApiUrl(e),n?Object.assign(Object.assign({},t),{headers:Object.assign({Authorization:`Bearer ${n}`},null==t?void 0:t.headers)}):t)}catch(e){return console.error(e),null}return null==o?void 0:o.json()}),fetchSSOV2ApiJson=(e,t,r)=>(0,a._)(void 0,void 0,void 0,function*(){var a;let o;let n=r?"":null===(a=document.cookie.split("; ").find(e=>e.startsWith(g)))||void 0===a?void 0:a.split("=")[1];try{o=yield fetch(getSSOV2ApiUrl(e),{method:"POST",headers:Object.assign({Accept:"application/json","Content-Type":"application/json"},n?{Authorization:`Bearer ${n}`}:{}),body:JSON.stringify(t)})}catch(e){return console.error(e),null}return null==o?void 0:o.json()}),fetchSSOApi=(e,t={},r)=>(0,a._)(void 0,void 0,void 0,function*(){var a;let o;let n=r?"":null===(a=document.cookie.split("; ").find(e=>e.startsWith(g)))||void 0===a?void 0:a.split("=")[1];try{o=yield fetch(getSSOApiUrl(e),n?Object.assign(Object.assign({},t),{headers:Object.assign({Authorization:`Bearer ${n}`},null==t?void 0:t.headers)}):t)}catch(e){return console.error(e),null}return null==o?void 0:o.json()}),resetPassword=(e,t)=>(0,a._)(void 0,void 0,void 0,function*(){let r=new FormData;return r.append("password",e),r.append("confirm-password",t),fetchSSOV2Api(d.RESET_PASSWORD,{method:"POST",body:r})}),checkUserExist=({email:e,phone:t})=>(0,a._)(void 0,void 0,void 0,function*(){let r=new FormData;return e?r.append("email",e):r.append("phone_number",t),fetchSSOV2Api(d.CHECK_USER_EXIST,{method:"POST",body:r})}),updateUserInfo=e=>(0,a._)(void 0,void 0,void 0,function*(){let t=new FormData;return Object.keys(e).forEach(r=>{let a=e[r];null!=a&&("string"!=typeof a||a.trim())&&t.append(r,e[r])}),fetchSSOV2Api(d.SETUP_USER_INFO,{method:"POST",body:t})}),m=o.y?"289442006438-040a42cbidr6v5d178f3iqi9q95821r3.apps.googleusercontent.com":"289442006438-cihobuq1h3r4426pur7u0e43fqdnep59.apps.googleusercontent.com",h="2759888574045636",getUserInfo=()=>(0,a._)(void 0,void 0,void 0,function*(){return fetchSSOApi("user/profile",{method:"POST"})}),handleAuthSuccess=e=>{(null==e?void 0:e.token)&&(0,l.d8)(g,e.token,{domain:"localhost"===window.location.hostname?"localhost":`.${c.v[p]}`,expires:new Date(1e3*e.expire_in).toUTCString()}),(null==e?void 0:e.refresh_token)&&(0,l.d8)(i.k,e.refresh_token,{domain:"localhost"===window.location.hostname?"localhost":`.${c.v[p]}`})}}}]);