1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[906],{20906:function(e,a,s){"use strict";s.r(a),s.d(a,{default:function(){return ei}});var t=s(85893),l=s(67294),r=s(94207),i=s(86896),n=s(50259),o=s(24165),m=s(20276),d=s(46763),c=s(76895),u=s(14397),x=s(19080),y=s(73178),p=s(83186),f=s(39004),h=s(92034),v=s(77875),j=s(84242),g=s(18777),Z=s(64395),b=s(41986),N=s(88521),M=s(43075),T=s(39472),_=s(75763),C=s(65134),w=s(8318),I=s(98649),D=s.n(I),F=s(54490);let P="subscription-payment";var $=(0,F.vU)({validFrom:{id:`${P}.validFrom`,defaultMessage:"Valid from"},whenYouActivate:{id:`${P}.whenYouActivate`,defaultMessage:"Whenever you activate code"},validUntil:{id:`${P}.validUntil`,defaultMessage:"Valid util"},untilYouDeactivate:{id:`${P}.untilYouDeactivate`,defaultMessage:"Until you deactivate"},nextPayDay:{id:`${P}.nextPayDay`,defaultMessage:"Next pay day"},month:{id:`${P}.month`,defaultMessage:"{value} month from date when you activate"}});let E=e=>{let{subscription:a,paymentType:s,upgradeFromSubscription:r}=e,n=(0,i.Z)(),o=s===w.V_.SUBSCRIPTION,d=w.vr[null==a?void 0:a.value],c=(0,l.useMemo)(()=>o&&r?new Date(r.endDate):new Date,[o,r]),u=(0,l.useMemo)(()=>o?n.formatDate(c):n.formatMessage($.whenYouActivate),[o,n,c]),x=(0,l.useMemo)(()=>o?n.formatMessage($.untilYouDeactivate):n.formatMessage($.month,{value:d}),[o,n,d]),y=(0,l.useMemo)(()=>o&&n.formatDate((0,C.As)(c,d,"months")),[o,n,c,d]);return(0,t.jsxs)(l.Fragment,{children:[(0,t.jsxs)("div",{className:D().row,children:[(0,t.jsx)(m.Z,{type:"large",mobileType:"medium",className:D().label,children:n.formatMessage($.validFrom)}),(0,t.jsx)(m.Z,{type:"large",mobileType:"medium",className:D().value,children:u})]}),(0,t.jsxs)("div",{className:D().row,children:[(0,t.jsx)(m.Z,{type:"large",mobileType:"medium",className:D().label,children:n.formatMessage($.validUntil)}),(0,t.jsx)(m.Z,{type:"large",mobileType:"medium",className:D().value,children:x})]}),o&&(0,t.jsxs)("div",{className:D().row,children:[(0,t.jsx)(m.Z,{type:"large",mobileType:"medium",className:D().label,children:n.formatMessage($.nextPayDay)}),(0,t.jsx)(m.Z,{type:"large",mobileType:"medium",className:D().value,children:y})]})]})};var S=(0,l.memo)(E);let z=()=>{let{data:e}=(0,T.ZP)(),{subscription:a,paymentType:s}=(0,p.m)(),l=()=>(0,t.jsx)(S,{subscription:a,paymentType:s,upgradeFromSubscription:e});return{renderContent:l,renderContactInfo:_.Z,name:null==a?void 0:a.label}};var A=s(11621),U=s(43552),X=s(52130),k=s(43981);let O=()=>{let e=(0,i.Z)();return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"d-flex align-items-center justify-content-between mb-2",children:[(0,t.jsx)(m.Z,{gray:!0,children:e.formatMessage(k.Z.validFrom)}),(0,t.jsx)(m.Z,{className:"ml-1",children:e.formatMessage(k.Z.validFromValue)})]}),(0,t.jsxs)("div",{className:"d-flex align-items-center justify-content-between mb-2",children:[(0,t.jsx)(m.Z,{gray:!0,children:e.formatMessage(k.Z.validUntil)}),(0,t.jsx)(m.Z,{className:"ml-1",children:e.formatMessage(k.Z.validUntilValue)})]})]})},L=()=>{let{name:e}=(0,v.Y)(),{targetPaymentUser:a}=(0,l.useContext)(x.ZP),s=(0,l.useCallback)(()=>(0,t.jsx)(O,{}),[]),r=(0,l.useCallback)(()=>(0,t.jsx)(X.Z,{data:a,noWrap:!0}),[a]);return{renderContent:s,renderContactInfo:r,name:e}};var Y=s(52557);let B="orderSummary";var R=(0,F.vU)({orderSummary:{id:`${B}.orderSummary`,defaultMessage:"Order Summary"},orderCollectionSummary:{id:`${B}.orderCollectionSummary`,defaultMessage:"Order Collection Summary"},confirmInformation:{id:`${B}.confirmInformation`,defaultMessage:"Confirm Information"},total:{id:`${B}.total`,defaultMessage:"Total"},editInfo:{id:`${B}.editInfo`,defaultMessage:"Edit Info"}});let V={[y.zX.SUBSCRIPTION]:z,[y.zX.COLLECTION]:f.Z,[y.zX.BUNDLE_CREDIT]:L,[y.zX.CONTENT]:g.Z,[y.zX.AFFILIATE]:Z.Z},W=e=>{let{totalPrice:a,subTotal:s,feeData:r,price:n,promotionData:o,product:m,disableDiscountInput:d,paymentType:c,onPrevious:u}=e,y=(0,i.Z)(),{layout:p}=(0,l.useContext)(x.ZP),{name:f,renderContent:h,renderContactInfo:v}=V[p]();return(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(M.Z,{shadow:!1,className:D().card,children:(0,t.jsxs)("div",{className:D()["order-detail"],children:[v&&v(),(0,t.jsx)("hr",{}),(0,t.jsx)(Y.Z,{shownPrefix:!0,bold:!0,name:f,showPrice:!1,price:n,amount:null==o?void 0:o.extraProductAmount}),h&&(0,t.jsx)(l.Fragment,{children:h()}),o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("hr",{}),(0,t.jsx)(U.Z,{data:o,subTotal:s,bold:!0})]}):!d&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("hr",{}),(0,t.jsx)(A.Z,{subTotal:s,product:m,onPrevious:u,paymentType:c})]}),r&&(0,t.jsxs)(l.Fragment,{children:[(0,t.jsx)("hr",{}),(0,t.jsx)(Y.Z,{bold:!0,name:y.formatMessage(r.name),price:r.value})]}),(0,t.jsx)("hr",{}),(0,t.jsx)(Y.Z,{name:y.formatMessage(R.total),price:a,bold:!0})]})})})};var q=s(36254),G=s.n(q),H=s(19073),J=s(11797),K=s(15559),Q=s(49527),ee=s.n(Q
1);let ea=e=>{let{className:a,onClick:s}=e;return(0,t.jsxs)("div",{className:`${a} d-flex align-items-center clickable ${ee()["back-button"]}`,onClick:s,children:[(0,t.jsx)(J.Z,{name:"chevron-left-bold",size:18,color:K.Z.grayColor}),(0,t.jsx)(m.Z,{type:"x-large",mobileType:"large",className:"ml-2",gray:!0,children:"TrỠlại"})]})};var es=(0,l.memo)(ea);let et={[y.zX.SUBSCRIPTION]:p.m,[y.zX.COLLECTION]:f.Z,[y.zX.BUNDLE_CREDIT]:v.Y,[y.zX.CONTENT]:g.Z,[y.zX.AFFILIATE]:Z.Z},el=e=>{let{onPrevious:a}=e,s=(0,i.Z)(),{paymentMethod:n,discountData:o,layout:p}=(0,l.useContext)(x.ZP),{paymentType:f,price:v,product:g,withoutMethods:Z,disableDiscountInput:M}=et[p](),T=y.Xf[n],{data:_,withoutMethods:C}=(0,h.Z)(g,f),w=(0,l.useMemo)(()=>(0,u.t$)(v,_||o)+((null==T?void 0:T.value)||0),[v,_,o,null==T?void 0:T.value]),I=(0,l.useMemo)(()=>(0,r.Z)([...Z||[],...C||[],].filter(e=>!!e)),[Z,C]);return(0,t.jsxs)(l.Fragment,{children:[(0,t.jsx)(es,{onClick:a}),(0,t.jsxs)("div",{className:`row mt-1 ${G()["payment-row"]}`,children:[(0,t.jsxs)("div",{className:`col-lg pb-4 ${G()["payment-col"]}`,children:[(0,t.jsx)(N.Z,{onPrevious:a,paymentType:f,withoutMethods:I,totalPrice:w}),(0,t.jsx)(b.Z,{})]}),(0,t.jsxs)("div",{className:`col-lg pb-4 ${G()["payment-col"]} ${G()["summary-col"]}`,children:[(0,t.jsx)("div",{className:"d-flex justify-content-between align-items-center mb-4 pb-0-desktop ",children:(0,t.jsx)(c.Z,{value:4,className:[G()["subscription-step"],"flex-1"].join(" "),children:(0,t.jsx)(m.Z,{type:"larger",mobileType:"xx-large",bold:!0,children:s.formatMessage(j.Z.yourDetails)})})}),(0,t.jsx)(W,{onPrevious:a,totalPrice:w,subTotal:v,feeData:T,price:v,promotionData:_,product:g,disableDiscountInput:M,paymentType:f}),(0,t.jsx)(H.Z,{totalPrice:w},n)]})]}),(0,t.jsx)(d.Z,{className:"my-4"}),(0,t.jsx)(m.Z,{type:"medium",mobileType:"small",center:!0,gray:!0,className:"mt-4",children:s.formatMessage(j.Z.contactSupportWithHotline)})]})},er=e=>(0,t.jsx)(n.pm,{reCaptchaKey:"6LfBXqchAAAAAEzUztoodc66-LaqYl6nr7yDxZ8E",language:"vi",children:(0,t.jsx)(el,{...e})});var ei=(0,o.tg)(er)},49527:function(e){e.exports={"back-button":"styles_back-button__0TCxs","fade-in":"styles_fade-in__idBfd"}},36254:function(e){e.exports={"payment-row":"styles_payment-row__ozXOw","payment-col":"styles_payment-col__yZ_8I","summary-col":"styles_summary-col__7aJFX","subscription-step":"styles_subscription-step__Mxpfd","fade-in":"styles_fade-in___GaO6"}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.