PageSourceSearch

https://www.charlottetilbury.com/_next/static/chunks/pages/[store]/account/payments-5cc7f5bdd45a835d.js

js charlottetilbury.com collected 2026-10-01 09:07:03 UTC 14,677 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4939],{3954:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/[store]/account/payments",function(){return r(11880)}])},10942:(e,t,r)=>{"use strict";r.d(t,{Sv:()=>h,Sc:()=>p,DX:()=>f,Un:()=>m});var n=r(23513),a=r(77192),s=r(86716),c=r(21152),i=r(27264),o=r(76721),l=r(46172),d=r(56417),u=r(90650),m=function(e,t){return(0,n._)(function(){return(0,s._)(this,function(r){switch(r.label){case 0:return[4,(0,n._)(function(){return(0,s._)(this,function(t){switch(t.label){case 0:return[4,c.Ay.send({type:l.YW,method:d.f.Post,authenticationMode:o.tl.Required,captcha:{enabled:!0,action:"SAVECARD"},url:function(e){return"/resources/".concat(e,"/card/")},body:{token:e}})];case 1:return t.sent(),[2]}})})()];case 1:if(r.sent(),!t)return[3,3];return[4,y()];case 2:r.sent(),r.label=3;case 3:return[2]}})})()},p=function(){return(0,n._)(function(){return(0,s._)(this,function(e){return[2,c.Ay.send({type:l.zZ,method:d.f.Get,authenticationMode:o.tl.Required,url:function(e){return"/resources/".concat(e,"/setupintent/")},captcha:{enabled:!0,action:"SETUP_INTENT"}})]})})()},h=function(e){return(0,n._)(function(){return(0,s._)(this,function(t){switch(t.label){case 0:return[4,c.Ay.send({type:l.gv,method:d.f.Delete,authenticationMode:o.tl.Required,url:function(t){return"/resources/".concat(t,"/card/").concat(e)}})];case 1:return t.sent(),[4,y()];case 2:return t.sent(),[2]}})})()},y=function(){return c.Ay.send((0,i.$)())},f=function(e){return(0,n._)(function(){var t,r,n,i;return(0,s._)(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,Promise.all([y(),e?c.Ay.send({type:l.Ck,method:d.f.Get,authenticationMode:o.tl.Required,url:function(e){return"/resources/".concat(e,"/storecredit/transactions")}}):c.Ay.send({type:l.$U,method:d.f.Get,authenticationMode:o.tl.Required,url:function(e){return"/resources/".concat(e,"/storecredit")}})])];case 1:return r=(t=a._.apply(void 0,[s.sent(),2]))[0],n=t[1],[2,{savedCards:r.cards,storeCredit:n}];case 2:throw i=s.sent(),u.Ay.error("Unable to get available payment methods for user",{error:i}),i;case 3:return[2]}})})()}},11880:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>en});var n=r(41289),a=r(32757),s=r(46392),c=r(89157),i=r(11085),o=r(16686),l=r(92345),d=r(4822),u=r(24097),m=r(3411),p=r(29794),h=r(73808),y=r.n(h),f=r(94238),v=r(37605),_=r(10942),x=r(34168),b=r(55964),C=r(23954),j=r(23513),N=r(77192),g=r(86716),S=r(85593),w=r(54611),A=r(72512),E=r(12087),F=r(70533),P=r(44314);r(99896);let T=(0,E.A)(function(e){var t=e.className,r=e.hide,s=e.stripe,c=e.elements,i=(0,N._)((0,a.useState)(void 0),2),o=i[0],d=i[1],u=(0,N._)((0,a.useState)(!1),2),m=u[0],p=u[1],h=(0,l.Bd)().t;if(!s||!c)return null;var v=function(e){return d(e)};return(0,n.jsxs)("form",{onSubmit:function(e){return(0,j._)(function(){var t;return(0,g._)(this,function(n){switch(n.label){case 0:return e.preventDefault(),[4,(0,F.E)({stripe:s,cardNumberElement:null!=(t=null==c?void 0:c.getElement("cardNumber"))?t:null,t:h,onSave:r,handleError:v,setLoading:p,shouldRefreshCards:!0})];case 1:return n.sent(),[2]}})})()},className:y()("SaveCardForm",t),method:"post",children:[(0,n.jsx)(f.Ay,{level:2,children:h("account:payment-methods.new-card.title")}),(0,n.jsx)("p",{children:h("account:payment-methods.new-card.subtitle")}),(0,n.jsxs)("div",{className:"SaveCardForm__card-form-fields",children:[(0,n.jsx)(P.A,{alertType:"error",shouldShowContent:!!o,copy:o,className:"SaveCardForm__alert",accessibleAlertType:h("components:alert.type.error")}),(0,n.jsx)(A.m,{}),(0,n.jsx)("div",{className:"SaveCardForm__card-legal",children:(0,n.jsx)(S.A,{})})]}),(0,n.jsxs)("div",{className:"SaveCardForm__cta-container",children:[(0,n.jsx)(b.A,{className:"SaveCardForm__cancel",buttonType:b.G.Secondary,type:"button",onClick:r,children:h("account:payment-methods.new-card.cta.cancel")}),(0,n.jsx)(w.A,{disabled:m,loading:m,className:"SaveCardForm__submit",type:"submit",children:h("account:payment-methods.new-card.cta.save")})]})]})});var R=r(17578),M=r(19683);let k=function(e){var t=e.row;return(0,n.jsxs)("span",{"data-test":"saved-card-number",children:["**** **** **** ",t.lastFourDigits]})};var O=r(75108),I=r(45334);let G=function(e){var t=e.row,r=(0,O.pn)()[t.type];if(!r)return null;var a=r.imageSrc,s=r.title;return a?(0,n.jsx)("div",{className:"PaymentCards__card-type",children:(0,n.jsx)("img",{src:(0,I.ED)(a),alt:s,title:s})}):null};var D=r(38591),z=(0,l.CI)()(function(e){var t=e.t,r=e.row,a=e.toggleOpen,s=e.rowProps;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"TableRow__Actions actions hide-sm",children:(0,n.jsx)("button",{className:"PaymentCards__button","data-test":"delete-card",onClick:function(){return s.deletePaymentCard(r.id)},children:t("account:payment-methods.saved-cards.field.remove-card.cta")})}),(0,n.jsx)("div",{className:"TableRow__Actions--expand actions-expand",children:(0,n.jsx)("button",{"data-test":"delete-card-toggle",className:"PaymentCards__button",onClick:a,children:(0,n.jsx)(D.HK,{})})})]})}),B=(0,l.CI)()(function(e){var t=e.t,r=e.row,a=e.rowProps;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"TableRow__Detail__wrapper",children:(0,n.jsxs)("div",{children:[(0,n.jsx)("b",{children:t&&t("account:payment-methods.saved-cards.field.expiry.label")}),"".concat(r.expiryMonth,"/").concat(r.expiryYear)]})}),(0,n.jsx)("button",{className:"Button Button--secondary",onClick:function(){return a.deletePaymentCard(r.id)},children:(0,n.jsx)("div",{className:"Button__content",children:t&&t("account:payment-methods.saved-cards.field.remove-card.cta")})})]})});r(63127);var H={deletePaymentCard:_.Sv},V="PaymentCards",Y=function(e){function t(){var e;return(0,u._)(this,t),e=(0,d._)(this,t,arguments),e.state={isFormVisible:!1},e.showSaveCardForm=function(){e.setState({isFormVisible:!0})},e.hideSaveCardForm=function(){e.setState({isFormVisible:!1})},e}return(0,m._)(t,e),t.prototype.render=function(){var e=this.props,t=e.savedCards,r=e.t,a=(0,e.getFeatureStatus)(R.tY),s=this.state.isFormVisible,c=r(a?"account:payment-methods.saved-cards.subtitle-with-save":"account:payment-methods.saved-cards.subtitle");return(0,n.jsxs)("div",{className:V,children:[t&&t.length?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(f.Ay,{className:"".concat(V,"__subtitle ").concat(V,"--saved-cards"),level:2,children:r("account:payment-methods.saved-cards.title")}),(0,n.jsx)("p",{className:"".concat(V,"__intro-copy"),children:c}),(0,n.jsx)(C.Ay,{settings:{summary:r("account:payment-methods.saved-cards.summary"),caption:"",columns:[{field:"type",label:r("account:payment-methods.saved-cards.field.type.label"),size:1,cellRenderer:G},{field:"lastFourDigits",label:r("account:payment-methods.saved-cards.field.last-four-digits.label"),size:10,
1cellRenderer:k},{field:"expiry",label:r("account:payment-methods.saved-cards.field.expiry.label"),size:6,foldColumnBreakpoint:"sm",align:M.nO.RIGHT,cellRenderer:function(e){var t=e.row;return(0,n.jsx)(n.Fragment,{children:"".concat(t.expiryMonth," / ").concat(t.expiryYear)})}},{field:"action",label:r("account:payment-methods.saved-cards.field.remove-card.label"),size:1,cellType:M.vZ.ACTION,cellRenderer:z}],expanded:B},rows:t,rowProps:H,className:"".concat(V,"__table")})]}):!s&&(0,n.jsxs)("div",{className:"".concat(V,"__empty-block"),children:[(0,n.jsx)(f.Ay,{className:"".concat(V,"__subtitle"),level:2,children:r("account:payment-methods.empty.title")}),a&&(0,n.jsx)("p",{className:"".concat(V,"__empty-copy"),children:r("account:payment-methods.empty.subtitle")})]}),a&&!s&&(0,n.jsx)(b.A,{"aria-label":r("account:payment-methods.saved-cards.cta"),buttonType:b.G.Primary,onClick:this.showSaveCardForm,className:"".concat(V,"__new-cta"),children:r("account:payment-methods.saved-cards.cta")}),s&&(0,n.jsx)(T,{hide:this.hideSaveCardForm,className:"".concat(V,"__form")})]})},t}(a.PureComponent);let U=(0,i.A)((0,l.CI)()(Y));var q=r(60751),Z={summary:"Store Credit",caption:"",columns:[{field:"date",label:"Date",size:5,cellRenderer:function(e){var t=e.row;return(0,n.jsx)(n.Fragment,{children:t.date})}},{field:"type",label:"Action",size:10,align:M.nO.RIGHT,cellRenderer:function(e){var t=e.row;return(0,n.jsx)(n.Fragment,{children:t.type})}},{field:"amount",label:"Value",align:M.nO.RIGHT,cellRenderer:function(e){var t=e.row;return(0,n.jsx)(n.Fragment,{children:(0,q.$g)(t.amount)})}},{field:"balance",label:"Balance",size:1,align:M.nO.RIGHT,cellRenderer:function(e){var t=e.row;return(0,n.jsx)(n.Fragment,{children:(0,q.$g)(t.balance)})}}]};r(48419);let $=function(e){var t=e.balance,r=e.transactions;return(0,n.jsxs)("div",{className:"StoreCredit",children:[(0,n.jsx)("h3",{className:"StoreCredit__title",children:"Store Credit"}),t&&(0,n.jsxs)("p",{className:"StoreCredit__balance-block",children:["Your current balance is ",(0,n.jsx)("span",{className:"StoreCredit__balance",children:(0,q.$g)(t)})]}),r&&(0,n.jsx)("div",{className:"StoreCredit__transactions",children:(0,n.jsx)(C.Ay,{settings:Z,rows:r})})]})};r(82648);var K="AccountPayment",W=function(e){function t(){return(0,u._)(this,t),(0,d._)(this,t,arguments)}(0,m._)(t,e);var r=t.prototype;return r.componentDidMount=function(){(0,_.DX)(!0)},r.render=function(){var e=this.props,t=e.paymentMethods,r=e.t;if(!t)return null;var a=t.savedCards,s=t.storeCredit;return(0,n.jsx)(v.A,{children:(0,n.jsxs)("div",{className:y()(K,x.uF),children:[(0,n.jsx)(f.Ay,{className:y()("".concat(K,"__title")),level:1,children:r("account:payment-methods.title")}),(0,n.jsx)("p",{className:"".concat(K,"__description"),children:r("account:payment-methods.subtitle")}),(0,n.jsx)(U,{savedCards:a}),s&&s.transactions&&s.transactions.length>0&&(0,n.jsx)($,(0,p._)({},s))]})})},t}(a.PureComponent);let X=(0,c.Ng)(function(e){return{paymentMethods:(0,o.Gx)(e)}})((0,i.A)((0,l.CI)()(W)));var L=r(92053),J=r(54245),Q=r(77215),ee=r(75713),et=r(50569),er=r(59795);let en=(0,s.Zz)((0,Q.Z)(),(0,et.A)(function(){return{pageType:er.g.Account,features:{hasRecaptcha:!0}}}),(0,ee.n)({slices:L.WB}))(function(){return(0,n.jsx)(J.G,{children:(0,n.jsx)(X,{})})})},12087:(e,t,r)=>{"use strict";r.d(t,{A:()=>m,_:()=>u});var n=r(29794),a=r(99123),s=r(41289),c=r(65035),i=r(32757),o=r(54245),l=r(13282),d=r(49925),u={EMPTY:"EMPTY",COMPONENT:"COMPONENT"};let m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.EMPTY,r=function(r){var i=(0,c.useStripe)(),o=(0,c.useElements)(),l=t===u.COMPONENT?(0,s.jsx)(e,(0,n._)({},r)):null;return i&&o?(0,s.jsx)(e,(0,a._)((0,n._)({},r),{stripe:i,elements:o})):l};r.displayName=(0,d.A)(e);var m=function(t){var l=(0,i.useContext)(o.l),d=l.stripeApiKey,u=l.stripePromise;return d?(0,s.jsx)(c.Elements,{stripe:u,children:(0,s.jsx)(r,(0,n._)({},t))}):(0,s.jsx)(e,(0,a._)((0,n._)({},t),{isStripelessStore:!0}))};return m.displayName="withStripe(".concat((0,d.A)(e),")"),(0,l.A)(m)}},16686:(e,t,r)=>{"use strict";r.d(t,{Gx:()=>n});var n=function(e){return e&&e.paymentMethods}},48419:()=>{},54245:(e,t,r)=>{"use strict";r.d(t,{G:()=>u,l:()=>d});var n=r(41289),a=r(72779),s=r(32757),c=r(39868),i=r(69544),o=r(92345),l=r(45903),d=(0,s.createContext)({stripeApiKey:void 0,stripePromise:Promise.resolve(null)}),u=function(e){var t=e.children,r=(0,c.A)(),u=(0,s.useMemo)(function(){return(0,l.yn)(r)},[r]),m=(0,s.useMemo)(function(){return i.A.getValue(u)},[u]),p=(0,s.useMemo)(function(){return m?(0,a.c)(m,{locale:o.Ru.language}):Promise.resolve(null)},[m]),h=(0,s.useMemo)(function(){return{stripeApiKey:m,stripePromise:p}},[m,p]);return(0,n.jsx)(d.Provider,{value:h,children:t})}},57909:e=>{e.exports={paymentCardFields:"PaymentCardFields_paymentCardFields__bTJNw",paymentElement:"PaymentCardFields_paymentElement__RI7Zp",cardExpiry:"PaymentCardFields_cardExpiry__j3RUs",cardCvc:"PaymentCardFields_cardCvc__EsQOk"}},63127:()=>{}
1,70533:(e,t,r)=>{"use strict";r.d(t,{E:()=>o});var n=r(23513),a=r(86716),s=r(10942),c=r(19641),i=r(90650),o=function(e){var t=e.stripe,r=e.cardNumberElement,o=e.onSave,l=e.handleError,d=e.t,u=e.setLoading,m=e.shouldRefreshCards;return(0,n._)(function(){var e,p,h,y;return(0,a._)(this,function(f){var v,_;switch(f.label){case 0:e=d("validation:common.error.generic"),f.label=1;case 1:return f.trys.push([1,5,6,7]),u&&u(!0),l(void 0),[4,(0,s.Sc)()];case 2:if(!(p=f.sent())||!t||!r)return[2,l(e)];return[4,(v=p.clientSecretId,(0,n._)(function(){var e;return(0,a._)(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,t.confirmCardSetup(v,{payment_method:{card:r}})];case 1:return[2,n.sent()];case 2:return e=n.sent(),i.Ay.error("Could not confirm card setup",e),[2,null];case 3:return[2]}})})())];case 3:if(!(h=f.sent()))return[2,l(e)];if(h.error)return[2,l(h.error.message)];if(!h.setupIntent.id)return[2,l(e)];return[4,(_=h.setupIntent.id,(0,n._)(function(){var e;return(0,a._)(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,(0,s.Un)(_,m)];case 1:return t.sent(),(0,c.JW)(),o&&o(),[3,3];case 2:return e=t.sent(),i.Ay.error("Could not save payment card",e),[3,3];case 3:return[2]}})})())];case 4:return f.sent(),[3,7];case 5:return(y=f.sent()).message?l(y.message):l(e),[3,7];case 6:return u&&u(!1),[7];case 7:return[2]}})})()}},72512:(e,t,r)=>{"use strict";r.d(t,{m:()=>y});var n=r(79e3),a=r(29794),s=r(99123),c=r(77192),i=r(41289),o=r(65035),l=r(73808),d=r.n(l),u=r(32757),m=r(57909),p=r.n(m),h={style:{base:{fontSize:"14px",color:"#340c0c",fontFamily:"Helvetica Neue LT Std, Helvetica Neue, Helvetica, Arial, sans-serif",fontWeight:"normal",fontStyle:"normal",backgroundColor:"#ffffff"},invalid:{color:"#d0021b"},empty:{"::placeholder":{color:"#896B6C"}}}},y=function(e){var t=e.className,r=e.onStripeElementsValidityChange,l=(0,c._)((0,u.useState)({}),2),m=l[0],y=l[1],f=(0,u.useCallback)(function(e){r&&y(function(t){return(0,s._)((0,a._)({},t),(0,n._)({},e.elementType,e.complete&&!e.error))})},[r]);return(0,u.useEffect)(function(){var e=Object.values(m);r&&e.length&&r(3===e.length&&e.every(function(e){return!0===e}))},[m,r]),(0,i.jsxs)("div",{className:d()("PaymentCardFields",p().paymentCardFields,t),"data-testid":"payment-card-fields-wrapper",children:[(0,i.jsx)(o.CardNumberElement,{options:h,className:d()(p().paymentElement,p().cardNumber),onChange:f,id:"payment-card-fields-card-number"}),(0,i.jsx)(o.CardExpiryElement,{options:h,className:d()(p().paymentElement,p().cardExpiry),onChange:f,id:"payment-card-fields-card-expiry"}),(0,i.jsx)(o.CardCvcElement,{options:h,className:d()(p().paymentElement,p().cardCvc),onChange:f,id:"payment-card-fields-card-cvc"})]})}},82648:()=>{},99896:()=>{}},e=>{e.O(0,[5726,8141,8649,3149,8471,1887,1134,6885,3884,1423,5312,4072,7125,1514,636,6593,8792],()=>e(e.s=3954)),_N_E=e.O()}]);

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.