PageSourceSearch

https://www.sellpy.se/market/PaymentConfirmation.BlHe7dYP.bundle.js

js sellpy.se collected 2026-10-02 03:00:49 UTC 42,710 bytes, 346 lines download raw bytes

1var U=(e,n,a)=>new Promise((r,i)=>{var u=p=>{try{d(a.next(p))}catch(h){i(h)}},l=p=>{try{d(a.throw(p))}catch(h){i(h)}},d=p=>p.done?r(p.value):Promise.resolve(p.value).then(u,l);d((a=a.apply(e,n)).next())});import{j as t,H as Me,c as Z,P as c,B as S,b as $,I as v,D as be,m as M,n as je,L as B,a0 as ee,t as Ee,a1 as ve,a2 as b,u as q,y as ke,A as K,r as V,a as R,a3 as G,G as te,a4 as ne,X as ie,d as z,E as Re,a5 as _e,R as Fe}from"./npm.sellpy-design-system.DdsWMDHW.bundle.js";import{u as re,Z as ae,m as y,$ as Ce,a0 as Q,a1 as ge,a2 as He,a3 as Le,a4 as Ge,a5 as Pe,S as Se,a6 as qe,z as Ve,a7 as ze,a as Ue,a8 as We,c as Ye,a9 as Ke,J as Qe,x as Je}from"./index.DWkcZ-_z.bundle.js";import{r as k}from"./npm.react-hook-form.HNw-giVQ.bundle.js";import{b as Ie,a as we,u as Xe}from"./npm.react-router.BDfxye5A.bundle.js";import{P as Ne}from"./npm.parse.BcWrqAIh.bundle.js";import{h as E,i as Ze,e as De}from"./npm.apollo-client.CXJpJPbe.bundle.js";import{ay as et,ab as P,az as w,U as D,ad as oe,aA as H,K as pe,aB as tt,aC as nt,aD as it}from"./npm.sellpy-commons.B413ARrd.bundle.js";import{N as he}from"./NotFound.CkQBkqUE.bundle.js";import"./npm.lodash.DxN61Y-S.bundle.js";import{g as s}from"./npm.styled-components.CzYR6Qdp.bundle.js";import{c as rt}from"./useCacheContainerOrderFormData.Y0WkgM2n.bundle.js";import{H as at,a as ot,b as st,c as dt}from"./heroStyles.C1ZgAlow.bundle.js";import{u as x}from"./npm.react-i18next.BwOa93YU.bundle.js";import{S as _,D as $e}from"./paymentConfirmation.styles.D-sKgqWr.bundle.js";import{z as F}from"./utils.DGZXBK23.bundle.js";import{p as lt}from"./tools.CN-KkdDj.bundle.js";import{D as Ae}from"./npm.luxon.3NOFZn7k.bundle.js";import{s as ct}from"./pdf.C95_J1zR.bundle.js";import{r as mt,G as ut}from"./useGiftCardsCart.DwoyWaa4.bundle.js";import{i as gt}from"./npm.i18next.B74d65Th.bundle.js";import{c as pt}from"./useCacheItemOrderPaymentData.CbjnYbQB.bundle.js";import{c as ht}from"./CheckoutProvider.C0OXsiZM.bundle.js";import{u as ft}from"./funnelTracking.D9pYwcPE.bundle.js";import{M as xt,D as yt}from"./MyDetails.BuqMo8eE.bundle.js";import{L as bt,F as jt,T as N,S as fe,B as xe,a as vt,b as kt}from"./Summary.CKIrPe9D.bundle.js";import{u as Ct}from"./useCacheItemPricingFormData.D3TvrucJ.bundle.js";import{s as Pt}from"./salesControl.C-eWCKIC.bundle.js";import{c as St,e as It}from"./utils.DhvJDWMM.bundle.js";import"./npm.react-dom.DlIYrMBD.bundle.js";import"./npm.zod.DEnjmUYT.bundle.js";import"./npm.sentry-react.Z7tY98T1.bundle.js";import"./npm.swr.CiJqMJM6.bundle.js";import"./npm.algolia.BDObKZ-5.bundle.js";import"./translations.B5c9TvV-.bundle.js";import"./npm.graphql.ClDiDpi3.bundle.js";import"./npm.immutable.DTQZtUT4.bundle.js";import"./MetaTagPlacer.RJbhKlsg.bundle.js";import"./utils.DutWSyoJ.bundle.js";import"./LayoutCenteredColumn.DciXWKum.bundle.js";import"./errors.dMazk1gb.bundle.js";import"./freight.6w9i6vBj.bundle.js";import"./usePrevious.C4FWeHWm.bundle.js";import"./ResentOrdersInfo.CFkbQ0MQ.bundle.js";import"./TotalCost.BOQ6pzoc.bundle.js";import"./useIsEligibleForReverseCharge.DMiGXs1c.bundle.js";import"./useCreditsAndBalance.DNzBDTVX.bundle.js";import"./useUserTotalBalance.DWvVnMXx.bundle.js";import"./useDac7BlocksForUser.CRK7cdXQ.bundle.js";import"./useGetGroupedFreightAlternatives.C4sJioAR.bundle.js";import"./RejectedSection.fragment.B7JBX3Ah.bundle.js";import"./SectionItemCard.fragment.DiUnUq-r.bundle.js";import"./ProcessingSection.fragment.DqmCw1G1.bundle.js";import"./LostItemStatusLabel.fragment.DBdyeWvP.bundle.js";try{let e=typeof window!="undefined"?window:typeof global!="undefined"?global:typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:{},n=new e.Error().stack;
1n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e160bbae-5e1b-459f-8ef2-44f2de6a2550",e._sentryDebugIdIdentifier="sentry-dbid-e160bbae-5e1b-459f-8ef2-44f2de6a2550")}catch(e){}{let e=typeof window!="undefined"?window:typeof global!="undefined"?global:typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=Object.assign({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:sellpy-market":!0})}const wt=(e=!1)=>{const n=k.useRef(!0),[a,r]=k.useState(e);k.useEffect(()=>()=>{n.current=!1},[]);const i=k.useCallback(u=>{r(!0),u.then(l=>(n.current&&r(!1),l)).catch(l=>(n.current&&r(!1),Promise.reject(l)))},[]);return{loading:a,load:i}},J=e=>U(null,null,function*(){const{payment:n,entities:a}=yield Ne.Cloud.run("getPaymentAndPaidEntities",{paymentId:e}),r=et([n,a].flat().filter(Boolean)),i=r.getIn(["Payment",e]),u=i?r.getIn(["_User",i.get("user")]):void 0;return{payment:i,user:u}}),Nt=e=>new Promise(n=>setTimeout(n,e)),Dt=e=>U(null,null,function*(){var r;let n=0,a=yield J(e);for(;!((r=a.payment)!=null&&r.get("completedAt"))&&n++<20;)yield Nt(3e3),a=yield J(e);return a}),$t=`query getUserForPayment($userId: ID!) {
2  user(id: $userId) {
3    objectId
4    email
5    availableLoginMethods {
6      ... on Element {
7        value
8      }
9    }
10  }
11}
12
13query getPickUpAvailability($address: Object!, $count: Int) {
14  validateContainerPickupAddress(address: $address, count: $count)
15}
16`,Te={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getUserForPayment"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"userId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"user"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"userId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"objectId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"availableLoginMethods"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Element"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}}]}}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getPickUpAvailability"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"address"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Object"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"count"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"validateContainerPickupAddress"},arguments:[{kind:"Argument",name:{kind:"Name",value:"address"},value:{kind:"Variable",name:{kind:"Name",value:"address"}}},{kind:"Argument",name:{kind:"Name",value:"count"},value:{kind:"Variable",name:{kind:"Name",value:"count"}}}],directives:[]}]}}],loc:{start:0,end:340,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:$t}}},Oe=(e,n)=>{const a=(o,g)=>{if(o.kind==="FragmentSpread")g.add(o.name.value);else if(o.kind==="VariableDefinition"){const m=o.type;m.kind==="NamedType"&&g.add(m.name.value)}return o&&"selectionSet"in o&&o.selectionSet&&o.selectionSet.selections.forEach(m=>{a(m,g)}),o&&"variableDefinitions"in o&&o.variableDefinitions&&o.variableDefinitions.forEach(m=>{a(m,g)}),o&&"definitions"in o&&o.definitions&&o.definitions.forEach(m=>{a(m,g)}),g},r=o=>{const g={};return o.definitions.forEach(function(m){"name"in m&&m.name&&(g[m.name.value]=a(m,new Set))}),g},i=(o,g)=>{for(let m=0;m<o.definitions.length;m++){const f=o.definitions[m];
16if(f&&"name"in f&&f.name&&f.name.value==g)return f}},u=r(e),l=Object.assign({},e,{definitions:[i(e,n)]}),d=u[n]||new Set,p=new Set;let h=new Set;for(d.forEach(o=>{h.add(o)});h.size>0;){const o=h;h=new Set,o.forEach(g=>{p.has(g)||(p.add(g),(u[g]||new Set).forEach(f=>{h.add(f)}))})}return p.forEach(o=>{const g=i(e,o);g&&l.definitions.push(g)}),l},At=Oe(Te,"getUserForPayment"),Tt=Oe(Te,"getPickUpAvailability"),Ot=s(dt)`
17  ${y.phone} {
18    align-items: flex-start;
19  }
20`,Bt=({email:e})=>{const{t:n}=x("confirmBagPayment"),{isMobile:a}=re(),r=Ie(),i=a?Me:Z;return t.jsx(at,{children:t.jsxs(ot,{children:[t.jsxs(Ot,{children:[t.jsxs("div",{children:[t.jsx(i,{noMargin:!0,children:n("hero.headline")}),t.jsx(c,{design:"body1",noMargin:!0,children:n("hero.description",{email:e})})]}),t.jsx(S,{variant:"outlined",label:n("packTipsBanner.buttonLabel"),rightIcon:t.jsx($,{name:v.CHEVRON_RIGHT}),onClick:()=>{ae({clickSource:"payment",clickDestination:"pack-tips",buttonName:"BagPaymentConfirmation.PackTipsBanner.Button"}),r("/pack-tips")}})]}),t.jsx(st,{children:t.jsx(be,{color:"green",variant:"confirmed",vibrancy:"dark",style:{width:"100%",height:"auto"}})})]})})},W=s($)`
21  font-size: 24px;
22`,Mt=s.div`
23  display: flex;
24  flex-direction: column;
25  align-items: flex-start;
26  gap: 8px;
27`,Et=s.div`
28  display: flex;
29  flex-direction: column;
30`,Rt=s.div`
31  display: flex;
32  flex-direction: column;
33  align-items: flex-start;
34  width: 100%;
35  border-bottom: 1px solid ${({theme:e})=>e.color.grey.shade8};
36`,_t=({email:e,isPickupAvailable:n,paymentId:a})=>{const{t:r}=x("confirmBagPayment"),i=Ie();return t.jsxs(_,{"aria-label":"Sellpy profile created",children:[t.jsxs(Mt,{children:[t.jsxs(Et,{children:[t.jsx(M,{noMargin:!0,children:r("profileCreated.headline")}),t.jsx(c,{design:"body3",noMargin:!0,children:r("profileCreated.body")})]}),t.jsx(je,{iconName:v.PROFILE,variant:"subtle",type:"positive",title:e})]}),t.jsxs(Rt,{children:[t.jsx(B,{headline:r("profileCreated.loginHeadline"),supportText:r("profileCreated.loginSupport"),leadingComponent:t.jsx(W,{name:v.LOGIN}),trailingComponent:t.jsx(S,{label:r("profileCreated.addPasswordButton"),variant:"outlined",color:"grey",size:"small",onClick:()=>{ae({clickSource:"payment",clickDestination:"profile/password",buttonName:"bagPaymentConfirmation.addPasswordButton"}),i("/profile/password",{state:{paymentId:a}})}})}),t.jsx(B,{headline:r("profileCreated.updatesHeadline"),supportText:r("profileCreated.updatesSupport"),leadingComponent:t.jsx(W,{name:v.ENVELOPE}),divider:!0}),t.jsx(B,{headline:r(n?"profileCreated.sendBagsPickupHeadline":"profileCreated.sendBagsLabelHeadline"),supportText:r(n?"profileCreated.sendBagsPickupSupport":"profileCreated.sendBagsLabelSupport"),leadingComponent:t.jsx(W,{name:n?v.FAST_TRUCK:v.PAPER_PLANE}),divider:!0})]})]})},Ft=s.div`
37  display: flex;
38  align-self: flex-start;
39  flex-direction: column;
40`,Ht=s.div`
41  display: flex;
42  gap: 8px;
43  flex-wrap: wrap;
44  width: fit-content;
45  align-items: center;
46  max-width: 100%;
47`,Lt=e=>{var l,d;if(!e)return{fullName:null,streetAddress:null,zipCode:null,city:null};const n=(l=e.get("firstName"))!=null?l:"",a=(d=e.get("lastName"))!=null?d:"",r=`${n} ${a}`.trim()||null,i=e.get("country"),u=e.get("phone");return{fullName:r,streetAddress:e.get("street")||null,zipCode:e.get("zipCode")||null,city:e.get("
47city")||null,country:i||null,phoneNumber:u||null}},Gt=({address:e,isPickupAvailable:n,isExpressAssortment:a,numberOfHazmatBags:r,numberOfBags:i,freightCompanyRaw:u,freightCompanyIcon:l})=>{const{t:d}=x("confirmBagPayment"),{fullName:p,streetAddress:h,zipCode:o,city:g,country:m,phoneNumber:f}=Lt(e);return t.jsxs(_,{"aria-label":"Delivery details",children:[t.jsxs(Ft,{children:[t.jsx(ee,{noMargin:!0,children:d("delivery.headline")}),t.jsx(c,{design:"body3",style:{color:Ee.colour.text.static.nr200},children:d(n?"pickupAvailable":"pickupNotAvailable")})]}),t.jsx($e,{children:t.jsxs(ve,{children:[t.jsx(b,{headline:d("order.numberOfBags"),body:d("order.numberOfBagsBody",{numberOfBags:i}),variant:"subtle"}),t.jsx(b,{headline:d("delivery.hazmatBags"),body:r>0?d("delivery.hazmatBagsYes"):d("delivery.hazmatBagsNo"),variant:"subtle"}),t.jsx(b,{headline:d("order.expressAssortment"),body:d(a?"delivery.expressAssortmentYes":"delivery.expressAssortmentNo"),variant:"subtle"}),u&&t.jsx(b,{headline:d("delivery.freightCompany"),body:l?void 0:u,addOn:l?t.jsx(Ht,{children:t.jsx(q,{variant:l})}):void 0,variant:"subtle"}),p&&t.jsx(b,{headline:d("delivery.addressName"),body:p,variant:"subtle"}),h&&t.jsx(b,{headline:d("delivery.addressStreet"),body:h,variant:"subtle"}),o&&t.jsx(b,{headline:d("delivery.addressZipCode"),body:o,variant:"subtle"}),g&&t.jsx(b,{headline:d("delivery.addressCity"),body:g,variant:"subtle"}),m&&t.jsx(b,{headline:d("delivery.addressCountry"),body:m,variant:"subtle"}),f&&t.jsx(b,{headline:d("delivery.phoneNumber"),body:f,variant:"subtle",noStroke:!0})]})}),t.jsx("div",{children:t.jsx(S,{rightIcon:t.jsx($,{name:v.CHEVRON_RIGHT}),variant:"text",label:d("delivery.changeAddressButton"),onClick:()=>{var C;ae({clickSource:"payment",clickDestination:"intercom_window_showNewMessage",buttonName:"BagPaymentConfirmation.ChangeAddressButton"}),(C=window.Intercom)==null||C.call(window,"showNewMessage")}})})]})},qt=s.img`
48  height: 18px;
49`,Vt=e=>{var n,a,r,i;return(i=(r=(a=(n=e==null?void 0:e.toJSON)==null?void 0:n.call(e))==null?void 0:a.amount)!=null?r:e==null?void 0:e.amount)!=null?i:0},zt=({creditAmount:e,adyenAmount:n})=>!e&&!n?P(F()):e?n?P(D(oe(e),n)):w(e):P(n),Ut=({lineItemsData:e})=>{const n=e.reduce((a,r)=>{if(r.amountIncludingTax){const i=r.discountAmount?D(r.amountIncludingTax,r.discountAmount):r.amountIncludingTax;return D(a,i)}return a},F());return P(n)},Wt=({lineItemsData:e})=>{const n=e.reduce((a,r)=>(r.type==="CONTAINER"||r.type==="EXPRESS_ASSORTMENT")&&r.discountAmount?D(a,r.discountAmount):a,F());return n.amount===0?null:P(n)},Yt=({metadata:e,payment:n,isExpressAssortment:a})=>{var T;const{t:r}=x("confirmBagPayment"),i=e==null?void 0:e.get("expressAssortmentPrice"),u=((T=e==null?void 0:e.get("lineItemsData"))==null?void 0:T.toJS())||[],l=n==null?void 0:n.get("adyenPaymentMethod"),d=n==null?void 0:n.get("adyenAmount"),p=(n==null?void 0:n.get("creditAmount"))||0,h=!d&&!l&&!p,o=zt({creditAmount:p,adyenAmount:d}),g=l?lt({value:l.get("type"),config:l}):null,m=i!=null?P(i):null,f=Ut({lineItemsData:u}),C=Wt({lineItemsData:u}),A=Vt(p)>0&&!(h&&C)?w(p):null;return t.jsxs(_,{"aria-label":"Order details",children:[t.jsx(ee,{noMargin:!0,children:r("order.headline")}),t.jsx($e,{children:t.jsxs(ve,{children:[t.jsx(b,{headline:r("order.totalPrice"),body:f,variant:"subtle"}),!h&&g&&t.jsx(b,{headline:r("order.paymentMethod"),addOn:t.jsx("div",{style:{display:"flex",alignItems:"center"},children:t.jsx(qt,{src:g,alt:""})}),variant:"subtle"}),a&&t.jsx(b,{headline:r("order.expressAssortment"),body:m,variant:"subtle"}),A&&t.jsx(b,{headline:r("order.usedCredits"),body:"-"+A,variant:"subtle"}),C&&t.jsx(b,{headline:r("order.discountedAmount"),body:"-"+C,variant:"subtle"}),t.jsx(b,{headline:r("order.totalAmount"),body:o,variant:"prominent",noStroke:!0})]})})]})},Kt=s.div`
50  display: flex;
51  flex-direction: column;
52  align-items: flex-start;
53`,Qt=s.div`
54  display: flex;
55  gap: 16px;
56`,Jt=e=>[{href:`https://apps.apple.com/${e}/app/sellpy-shop-second-hand/id1594599102`,target:"app_store",icon:V.APP_STORE,altKey:"appDownload.appStoreAlt"},{href:"https://play.google.com/store/apps/details?id=com.sellpy.sellpy",target:"google_play",icon:V.GOOG
56LE_PLAY,altKey:"appDownload.googlePlayAlt"}],Xt=()=>{const{t:e}=x("confirmBagPayment"),n=Ce();return t.jsxs(_,{"aria-label":"Download the app",$gap:16,children:[t.jsxs(Kt,{children:[t.jsx(ke,{noMargin:!0,children:e("appDownload.headline")}),t.jsx(c,{design:"body3",noMargin:!0,children:e("appDownload.body")})]}),t.jsx(Qt,{children:Jt(n.toLowerCase()).map(({href:a,target:r,icon:i,altKey:u})=>t.jsx(K,{noMargin:!0,target:"_blank",rel:"noopener noreferrer",href:a,onClick:()=>Q({target:r,location:"bag_payment_confirmation"}),children:t.jsx(q,{variant:i,imgProps:{role:"img",alt:e(u)}})},r))})]})},L=s($)`
57  font-size: 24px;
58`,Zt=s.div`
59  display: flex;
60  width: 100%;
61  overflow: hidden;
62  flex-direction: column;
63  border-radius: 8px;
64  border: 1px solid ${({theme:e})=>e.color.grey.shade8};
65`,en=()=>{const{t:e}=x("confirmBagPayment");return t.jsx(_,{"aria-label":"Next steps",children:t.jsxs(Zt,{children:[t.jsx(B,{headline:e("nextSteps.howItWorksHeadline"),leadingComponent:t.jsx(L,{name:v.HELPING_HAND}),trailingComponent:t.jsx(L,{name:v.CHEVRON_RIGHT}),onClick:()=>ge({accordionName:"BagPaymentConfirmation.HowItWorks"}),to:"/how-it-works",divider:!0}),t.jsx(B,{headline:e("nextSteps.whatToPackHeadline"),leadingComponent:t.jsx(L,{name:v.TSHIRT}),trailingComponent:t.jsx(L,{name:v.CHEVRON_RIGHT}),onClick:()=>ge({accordionName:"BagPaymentConfirmation.PackTips"}),to:"/pack-tips",divider:!0})]})})},tn=s.div`
66  display: flex;
67  flex-direction: column;
68  gap: 40px;
69`,nn=s.div`
70  display: flex;
71  flex-direction: column;
72  gap: 40px;
73  width: 100%;
74  max-width: 600px;
75  margin: 0 auto;
76  padding: 0 16px 56px;
77`,rn=({payment:e})=>{var T,le,ce,me,ue;const{t:n}=x("confirmBagPayment");k.useEffect(()=>{rt()},[]);const a=e==null?void 0:e.get("user"),r=e==null?void 0:e.get("objectId"),i=e==null?void 0:e.get("metadata"),u=i==null?void 0:i.get("address"),{data:l,loading:d}=E(At,{variables:{userId:a},skip:!a}),p=i==null?void 0:i.get("nrOfBags"),{data:h}=E(Tt,{variables:{address:u,count:p},skip:!u}),o=l==null?void 0:l.user,g=(T=h==null?void 0:h.validateContainerPickupAddress)==null?void 0:T.pickupAvailable,m=(le=o==null?void 0:o.availableLoginMethods)==null?void 0:le.some(O=>["password","facebook"].includes(O==null?void 0:O.value)),f=i==null?void 0:i.get("freightCompany"),C=f==null?void 0:f.toLowerCase(),se=He[C],de=(ce=i==null?void 0:i.get("nrOfHazmatBags"))!=null?ce:0,A=(ue=(me=i==null?void 0:i.get("lineItemsData"))==null?void 0:me.toJS())==null?void 0:ue.some(O=>O.type==="EXPRESS_ASSORTMENT");return e?t.jsxs(tn,{children:[t.jsx(Bt,{email:o==null?void 0:o.email}),t.jsxs(nn,{children:[g===!1&&t.jsx(je,{fullWidth:!0,title:n("noFreightLabelInfo.title"),text:n("noFreightLabelInfo.body"),type:"informative",variant:"prominent"}),!m&&!d&&t.jsx(_t,{email:o==null?void 0:o.email,isPickupAvailable:g,paymentId:r}),t.jsx(Gt,{address:u,isPickupAvailable:g,isExpressAssortment:A,numberOfHazmatBags:de,numberOfBags:p,freightCompanyRaw:f,freightCompanyIcon:se}),t.jsx(Yt,{metadata:i,payment:e,isExpressAssortment:A}),t.jsx(Xt,{}),t.jsx(en,{})]})]}):null},an=s.div`
78  display: flex;
79  flex-direction: column;
80  align-items: center;
81  margin: 3rem 1rem;
82`,on=Le(Ge)(()=>{const{t:e}=x("order");return t.jsxs(an,{children:[t.jsx(c,{italic:!0,center:!0,children:e("orderBagPromo")}),t.jsx(R,{to:"/order-bag",onClick:()=>Pe({location:"Order summary"}),noMargin:!0,children:t.jsx(S,{label:e("orderBagButton")})})]})}),sn=({totalAmountWithoutPromoCode:e,validPromoCode:n,totalAmount:a,creditAmount:r})=>{const{t:i}=x("cart");return t.jsxs("div",{style:{textAlign:"center",marginBottom:"2em"},children:[n&&e.amount!==a.amount&&t.jsx(c,{noMargin:!0,size:"large",style:{textDecoration:"line-through"},children:w(e)}),t.jsx(c,{style:{fontSize:"3em"},noMargin:!0,children:t.jsx(G,{children:w(a)})}),r>0&&t.jsx(c,{style:{marginTop:0},children:i("ofWhichCredit",{creditAmount:r})}),n&&!n.getIn(["applier","freeFreight"])&&(e.amount!==a.amount?t.jsx(c,{children:i("activePromoCode",{code:n.get("code")})}):t.jsx(c,{children:i("activePromoCodeNoEffect",{code:n.get("code")})})),t.jsx(c,{noMargin:!0,size:"extraLarge",children:i("totalInclVat")}
82)]})},dn=e=>Ne.Cloud.run("getGiftCardPdf",{giftCardId:e}).then(n=>ct(n,`giftCard-${e}`)),ln=`mutation returnGiftCard($giftCardId: ID!) {
83  returnGiftCard(giftCardId: $giftCardId)
84}
85`,cn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"returnGiftCard"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"giftCardId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"returnGiftCard"},arguments:[{kind:"Argument",name:{kind:"Name",value:"giftCardId"},value:{kind:"Variable",name:{kind:"Name",value:"giftCardId"}}}],directives:[]}]}}],loc:{start:0,end:126,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:ln}}},mn=`query getGiftCardOrderByPaymentId($paymentId: ID!) {
86  giftCardOrders(
87    where: { payment: { have: { objectId: { equalTo: $paymentId } } } }
88    first: 1
89  ) {
90    edges {
91      node {
92        objectId
93        giftCards {
94          ... on GiftCard {
95            objectId
96            pricing
97            code
98            expiresAt
99            paidAt
100            redeemedAt
101            returnedAt
102          }
103        }
104      }
105    }
106  }
107}
108`,un={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getGiftCardOrderByPaymentId"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"paymentId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"giftCardOrders"},arguments:[{kind:"Argument",name:{kind:"Name",value:"where"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"payment"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"have"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"objectId"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"equalTo"},value:{kind:"Variable",name:{kind:"Name",value:"paymentId"}}}]}}]}}]}}]}},{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"1"}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"objectId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"giftCards"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"GiftCard"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"objectId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pricing"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"code"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"expiresAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"paidAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"redeemedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"returnedAt"},arguments:[],directives:[]}]}}]}}]}}]}}]}}]}}],loc:{start:0,end:477,source:{name:"GraphQL request",locationOffset:{line:1,column:1},body:mn}}},gn=s(Z)`
109  margin: 3rem 0;
110  ${y.tablet} {
111    margin: 2rem 0;
112  }
113`,Y=s.div`
114  height: 3rem;
115  ${y.tablet} {
116    height: 2rem;
117  }
118  ${y.phone} {
119    height: 2rem;
120  }
121`,pn=s.div`
122  max-width: 880px;
123  margin: 0 auto;
124  padding: 3rem 0;
125  border-bottom: ${({theme:e})=>`1px solid ${e.color.grey.shade7}`};
126  &:first-child {
127    padding: 0 0 3rem 0;
128  }
129  &:last-child {
130    padding: 3rem 0 0 0;
131    border-bottom: 0;
132  }
133`,hn=s(S)`
134  margin: 8px 0;
135  ${y.phone} {
136    margin-top: 8px;
137  }
138`,X=s.div`
139  grid-column: ${({columns:e})=>e?`span ${e}`:"span 4"};
140`,fn=s(X)`
141  ${y.phone} {
142    display: flex;
143    justify-content: center;
144  }
145`,xn=s(te)`
146  grid-gap: 1rem;
147  ${y.phone} {
148    padding: 0 2rem;
149  }
150`,yn=s(ut)`
151  display: flex;
152  ${y.tablet} {
153    justify-content: flex-end;
154  }
155`,bn=e=>{try{return tt(e),!0}catch(n){return!1}},jn=({giftCard:e})=>{const{t:n}=x("giftcard"),[a]=Ze(cn),{isMobile:r,isTablet:i}=re();return t.jsxs(xn,{noPadding:!0,children:[t.jsx(fn,{columns:r?12:i?7:4,children:t.jsx(yn,{pricing:e.pricing,code:e.code,size:.8,style:{alignSelf:"center",boxShadow:"0px 0px 146px 4px rgba(0, 0, 0, 0.08)"}})}),t.jsxs(X,{columns:r?12:i?3:4,style:{paddingTop:r&&"1rem"}
155,children:[t.jsx(c,{design:"body3",noMargin:!0,children:n("order.value")}),t.jsx(c,{design:"body3",children:t.jsx(G,{children:w(e.pricing)})}),e.code&&t.jsxs(t.Fragment,{children:[t.jsx(c,{design:"body3",noMargin:!0,children:n("order.activationCode")}),t.jsx(c,{design:"body3",children:t.jsx(G,{children:e.code})})]}),t.jsx(c,{design:"body3",noMargin:!0,children:n("order.expirationDate")}),t.jsx(c,{design:"body3",children:t.jsx(G,{children:Ae.fromISO(e.expiresAt).toFormat("yyyy-MM-dd")})})]}),t.jsx(X,{columns:i&&12,children:e.code?t.jsxs(t.Fragment,{children:[t.jsx(hn,{fullWidth:!0,disabled:H(e),onClick:()=>dn(e.objectId),label:n("order.downloadGiftCertificate")}),(H(e)||bn(e))&&t.jsx(qe,{disabled:H(e),fullWidth:!0,color:"red",onConfirmedAction:()=>a({variables:{giftCardId:e.objectId}}),confirmationTitle:n("order.return.confirmationTitle"),confirmationBody:n("order.return.confirmationBody"),label:H(e)?n("order.return.buttonReturned"):n("order.return.button")})]}):t.jsx(c,{design:"h7",children:n("order.delivery")})})]},e.objectId)},vn=({payment:e})=>!e.get("adyenAmount")&&e.get("creditAmount")?e.get("creditAmount").toJS():!e.get("adyenAmount")&&!e.get("creditAmount")?F():e.get("creditAmount")?D(pe(e.get("adyenAmount")),e.get("creditAmount")):pe(e.get("adyenAmount")).toJS(),kn=({payment:e})=>{var d,p,h,o,g;const{t:n}=x("order"),{paymentId:a}=we(),{data:r}=E(un,{variables:{paymentId:a},skip:!a}),i=(h=(p=(d=r==null?void 0:r.giftCardOrders)==null?void 0:d.edges)==null?void 0:p[0])==null?void 0:h.node,u=(o=i==null?void 0:i.giftCards)!=null?o:[];if(k.useEffect(()=>{mt()},[]),!e)return t.jsx(Se,{});const l=e.get("email");return t.jsxs("div",{children:[t.jsxs(gn,{center:!0,noMargin:!0,children:[!e.get("metadata")&&n("thankYouOrder"),e.get("metadata")&&n("thankYouOrderWithEmail",{count:e.get("metadata").get("lineItemsData").size,email:l})]}),t.jsx(c,{design:"body1",center:!0,noMargin:!0,children:l?n("giftcardConfirmation.body",{email:l}):n("giftcardConfirmation.bodyAnonymous")}),t.jsx("div",{children:i&&u.map(m=>t.jsx(pn,{children:t.jsx(jn,{giftCard:m})},m.objectId))}),t.jsx(Y,{style:{borderBottom:"1px solid lightgrey"}}),t.jsx(Y,{}),t.jsx(sn,{totalAmount:vn({payment:e}
155),creditAmount:(g=e==null?void 0:e.get("creditAmount"))==null?void 0:g.get("amount")}),t.jsx(on,{}),t.jsx(Y,{})]})},Cn=s.div`
156  min-height: 560px;
157  padding: 16px;
158  display: flex;
159  flex-direction: column;
160  align-items: center;
161  justify-content: center;
162  text-align: center;
163`,Pn=s(c).attrs({design:"body2"})`
164  margin-bottom: 48px;
165`,Sn=()=>{const{t:e}=x("loyalty");return t.jsxs(Cn,{children:[t.jsx(ne,{size:Ve.MEDIUM,type:ie.PHONE_GREEN}),t.jsx(z,{style:{marginTop:32},children:e("signUpPage.confirmation.heading")}),t.jsx(Pn,{children:e("signUpPage.confirmation.body")}),t.jsx(R,{to:"/search",children:t.jsx(S,{label:e("signUpPage.confirmation.shopButton"),color:"green",size:"medium",rightIcon:t.jsx($,{name:v.CHEVRON_RIGHT})})})]})},ye=({refusalReason:e,errorCode:n})=>e?`confirmPayment.adyenErrors.${n||e.replace(/ /g,"_").replace(/:/g,"")}`:null,In=s.div`
166  display: flex;
167  flex-direction: column;
168  align-items: center;
169  margin-top: 2rem;
170`,wn=({payment:e,timeout:n})=>{const{t:a}=x("cart");let r=null,i=null;i=a("confirmPayment.errorHeading");const u=e.getIn(["adyenResult","resultCode"]);if(e.getIn(["adyenPaymentMethod","type"])==="ideal"&&["Received","Pending"].includes(u))r=a("confirmPayment.idealPendingText"),i=a("confirmPayment.idealPendingHeader");else if(n)r=a("confirmPayment.timedOutText"),i=a("confirmPayment.timedOutHeading");else{const l=e.getIn(["adyenResult","refusalReason"])||u,d=e.getIn(["adyenError","code"]);r=gt.exists(`cart:${ye({refusalReason:l,errorCode:d})}`)?a(ye({refusalReason:l,errorCode:d})):a("confirmPayment.stripeErrors.charge.default")}return t.jsxs(In,{children:[t.jsx(z,{design:"h2",children:i}),t.jsx(c,{design:"body3",children:r}),e&&t.jsx(R,{to:e.get("type")==="Item"?ze.CART_ROUTE:"/order-bag",children:t.jsx(S,{label:a(e.get("type")==="Item"?"confirmPayment.backToCart":"confirmPayment.backToContainerOrder")})})]})},Nn=s.div`
171  display: flex;
172  flex-direction: column;
173  padding-top: 20px;
174`,Dn=s.div`
175  display: flex;
176  flex-direction: column;
177  align-items: flex-start;
178  gap: var(--gap-m, 16px);
179  align-self: stretch;
180`,$n=s.div`
181  display: flex;
182  gap: 16px;
183`,An=()=>{const{t:e}=x(["itemPaymentConfirmation"]);return t.jsx(Nn,{children:t.jsxs(Dn,{children:[t.jsx(c,{design:"body2",noMargin:!0,children:e("downloadApp.header")}),t.jsxs($n,{children:[t.jsx(K,{noMargin:!0,target:"_blank",rel:"noopener noreferrer",href:"https://apps.apple.com/app/sellpy-shop-second-hand/id1594599102",onClick:()=>Q({target:"app_store",location:"payment_confirmation"}),children:t.jsx(q,{variant:V.APP_STORE,imgProps:{role:"img",alt:"Download on the App Store"}})}),t.jsx(K,{noMargin:!0,target:"_blank",rel:"noopener noreferrer",href:"http://play.google.com/store/apps/details?id=com.sellpy.sellpy",onClick:()=>Q({target:"google_play",location:"payment_confirmation"}),children:t.jsx(q,{variant:V.GOOGLE_PLAY,imgProps:{role:"img",alt:"Get it on Google Play"}})})]})]})})},Tn=s.div`
184  display: flex;
185  padding: var(--padding-airy-m, 56px) var(--padding-xl, 32px);
186  ${y.phone} {
187    padding: var(--padding-xxl, 40px) var(--padding-l, 24px);
188  }
189  flex-direction: column;
190  align-items: center;
191  background-color: ${({theme:e})=>e.colour.bg.static.positive};
192`,On=s.div`
193  display: flex;
194  max-width: 600px;
195  width: 100%;
196  padding: 0 var(--none, 0);
197  align-items: center;
198  align-content: center;
199  gap: 32px var(--gap-xl, 32px);
200  flex-wrap: wrap;
201  justify-content: center;
202
203  @media (max-width: 540px) {
204    flex-direction: column-reverse;
205    flex-wrap: nowrap;
206    align-items: flex-start;
207  }
208`,Bn=s.div`
209  display: flex;
210  flex-direction: column;
211  justify-content: center;
212  align-items: flex-start;
213  gap: 4px;
214  flex: 1 0 0;
215  text-align: left;
216`,Mn=s.div`
217  align-self: center;
218
219  @media (max-width: 540px) {
220    align-self: stretch;
221    display: flex;
222    justify-content: center;
223  }
224`,En=({email:e})=>{const{t:n}=x("itemPaymentConfirmation");return t.jsxs(Tn,{children:[t.jsxs(On,{children:[t.jsxs(Bn,{children:[t.jsx(Z,{noMargin:!0,children:n("thankYou")}),e&&t.jsxs("div",{children:[t.jsx(c,{design:"body1",noMargin:!0,children:n("confirmationEmailWillBeSentTo")}),t.jsx(c,{design:"body2",noMargin:!0,children:e})]}),t.jsx(An,{})]}),t.jsx(Mn,{children:t.jsx(be,{variant:Re.CONFIRMED,color:"green",vibrancy:"dark",style:{width:197,height:160}})})]}),t.jsx("div",{id:"hotjarSurveyPurchaseId"})]})},Rn=s.div`
225  flex-direction: row;
226`,_n=De`
227  query getItemPayment($id: ID!) {
228    payment(id: $id) {
229      metadata
230      orderData
231      klarnaPaymentMethod
232      adyenPaymentMethod
233      objectId
234      deliveryData
235      creditAmount
236      email
237      promoCode {
238        code
239      }
240      region
241    }
242  }
243`,Fn=({payment:e})=>{var h,o;const{t:n}=x("itemPaymentConfirmation"),a=(h=e.toJS)==null?void 0:h.call(e),{data:r}=E(_n,{variables:{id:a.objectId},skip:(a==null?void 0:a.metadata)&&(a==null?void 0:a.orderData)}),i=(r==null?void 0:r.payment)||a,u=Ue(),l=(o=i.metadata)==null?void 0:o.containerOrder,{onClick:d}=We("/order-bag",{onClick:()=>Pe({location:"Order summary"})});k.useEffect(()=>{pt(),ht(u)},[u]);const p=i.creditAmount||null;return ft("view_confirmation",{payload:{credits_used:p&&oe(p)}}),t.jsx(Rn,{children:t.jsxs(bt,{children:[t.jsx(En,{email:i.email}),i.metadata&&t.jsxs(jt,{children:[i.orderData&&t.jsx(N,{children:t.jsx(xt,{address:i.orderData.toAddress})}),t.jsx(N,{children:t.jsx(fe,{})}),t.jsx(N,{children:t.jsx(yt,{payment:i})}),t.jsx(N,{children:t.jsx(fe,{})}),t.jsx(N,{children:t.jsxs(xe,{children:[t.jsx(vt,{children:t.jsx(ke,{noMargin:!0,children:n("summary")}
243)}),t.jsx(kt,{payment:i})]})}),!l&&t.jsx(N,{children:t.jsx(xe,{style:{paddingTop:16,paddingBottom:16},children:t.jsx(_e,{illustrationVariant:"bag-on-the-way",variant:"blue",ctaText:n("bagPromo.cta"),text:n("bagPromo.title"),onClick:d})})})]})]})})},Hn=De`
244  query getPromoCode($id: ID!) {
245    promoCode(id: $id) {
246      id
247      code
248    }
249  }
250`,I=s(c)`
251  color: ${({theme:e})=>e.color.grey.shade3};
252`,Ln=s.div`
253  margin: 24px 0;
254  border-bottom: ${({theme:e})=>`1px solid ${e.color.grey.shade2}`};
255`,Gn=({creditAmount:e,adyenAmount:n})=>!e&&!n?P(F()):e?n?P(D(oe(e),n)):w(e):P(n),Be=({payment:e})=>{var u;const{t:n}=x("confirmBagPayment"),{data:{promoCode:a}={}}=E(Hn,{variables:{id:(u=e.get("promoCode"))==null?void 0:u.id},skip:!e.get("promoCode")}),r=!e.get("adyenAmount")&&!e.get("adyenPaymentMethod")&&!e.get("creditAmount"),i=!(e.get("adyenAmount")&&e.get("adyenPaymentMethod"));return t.jsxs(t.Fragment,{children:[!r&&t.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[t.jsx(I,{design:"body2",noMargin:!0,children:n("PaymentDetails.paymentMethod")}),t.jsx(c,{design:"body1",style:{textTransform:"capitalize"},children:`${e.get("adyenPaymentMethod")?n(`PaymentDetails.paymentMethodType.${e.get("adyenPaymentMethod").get("type")}`):""} ${i?"Credits":""}`})]}),a&&t.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[t.jsx(I,{design:"body2",noMargin:!0,children:n("PaymentDetails.promoCode")}),t.jsx(c,{design:"body1",children:a.get("code")})]}),t.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[t.jsx(I,{design:"body2",noMargin:!0,children:n("PaymentDetails.orderDate")}),t.jsx(c,{design:"body1",children:Ae.fromISO(e.get("createdAt")).toLocaleString(nt.LONG.PAST)})]}),t.jsx(Ln,{}),t.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[t.jsx(c,{noMargin:!0,design:"body1",children:n("totalCost")}),t.jsx(c,{noMargin:!0,design:"h3",children:Gn({creditAmount:e.get("creditAmount"),adyenAmount:e.get("adyenAmount")})})]}),!r&&i&&t.jsx(I,{noMargin:!0,design:"body6",style:{display:"flex",flexDirection:"row-reverse"}
255,children:n("sellpyCredits",{credits:w(e.get("creditAmount"))})})]})},qn=s.div`
256  background-color: ${({theme:e})=>e.color.grey.shade10};
257  padding: 2rem 2rem;
258  margin: 0 1rem;
259`,Vn=({payment:e})=>{const{t:n}=x("itemPricing");return t.jsxs(qn,{children:[t.jsx(M,{design:"body2",children:n("confirmation.paymentDetailsHeadline")}),t.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[t.jsx(I,{design:"body3",noMargin:!0,children:n("confirmation.item")}),t.jsx(c,{design:"body3",children:e.getIn(["metadata","itemId"])})]}),t.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[t.jsx(I,{design:"body3",noMargin:!0,children:n("confirmation.duration")}),t.jsx(c,{design:"body3",children:n("confirmation.durationInfo",{duration:e.getIn(["metadata","duration"])})})]}),t.jsx(Be,{payment:e})]})},{staticImageAssets:zn}=Ye,Un=s(te)`
260  margin-bottom: 2rem;
261  grid-row-gap: 1rem;
262  grid-template-areas:
263    'he he he he he he he he he he he he'
264    'or or or or or or or or or or or or';
265  ${y.largerThanTablet} {
266    grid-row-gap: 2rem;
267    grid-template-areas:
268      'he he he he he he he he he he he he'
269      'or or or or or or im im im im im im';
270  }
271`,Wn=s.div`
272  grid-area: he;
273  position: relative;
274  background-color: ${({theme:e})=>e.color.blue.default};
275  ${y.tablet} {
276    padding: ${({theme:e})=>`6rem ${e.layout.standardPaddingTablet}`};
277    margin: ${({theme:e})=>`0 -${e.layout.standardPaddingTablet} 2rem`};
278  }
279  ${y.phone} {
280    padding: ${({theme:e})=>`6rem ${e.layout.standardPaddingMobile}`};
281    margin: ${({theme:e})=>`0 -${e.layout.standardPaddingMobile} 2rem`};
282  }
283  padding: ${({theme:e})=>`6rem ${e.layout.standardPaddingDesktop}`};
284  margin: ${({theme:e})=>`0 -${e.layout.standardPaddingDesktop} 2rem`};
285`,Yn=s.div`
286  grid-area: or;
287`,Kn=s(ne)`
288  margin: 0 1rem 26px 1rem;
289`,Qn=s.div`
290  grid-area: im;
291  display: none;
292  ${y.largerThanTablet} {
293    display: block;
294  }
295`,Jn=({payment:e,user:n})=>{const{t:a}=x("itemPricing"),{clearCachedFormData:r}=Ct();return k.useEffect(()=>{r()},[r]),t.jsxs(Un,{children:[t.jsxs(Wn,{children:[t.jsx(Kn,{type:ie.SCISSORS_GREEN,customSize:80}),t.jsx(c,{style:{margin:"0 1rem 1rem 1rem"},design:"subtitle",color:"white",children:a("confirmation.hi")}),t.jsx(z,{style:{margin:"0 1rem 1rem 1rem"},color:"white",children:a("confirmation.thankYou")}),n&&n.get("email")&&t.jsx(c,{style:{margin:"0 1rem 1rem 1rem"},design:"body3",color:"white",children:a("confirmation.subTitle",{email:n.get("email")})}),t.jsx(R,{to:`/my-item/${e.getIn(["metadata","itemId"])}`,children:t.jsx(S,{loading:!e.get("completedAt"),style:{position:"absolute",bottom:"-24px",left:"50%",transform:"translate(-50%)"},label:a("confirmation.ctaToItem"),color:"black",textAlign:"left",rightIcon:t.jsx($,{name:v.CHEVRON_RIGHT})})})]}),t.jsx(Yn,{children:t.jsx(Vn,{payment:e})}),t.jsx(Qn,{children:t.jsx(Fe,{src:zn+"confirmSellerPricePeriod/banner_SellerPricePeriod.jpg",mobileWidth:"100vw",desktopWidth:"40vw"})})]})},Xn=s.div`
296  grid-area: he;
297  background-color: ${({theme:e})=>e.color.blue.default};
298  ${y.tablet} {
299    padding: ${({theme:e})=>`6rem ${e.layout.standardPaddingTablet}`};
300    margin: ${({theme:e})=>`0 -${e.layout.standardPaddingTablet}`};
301  }
302  ${y.phone} {
303    padding: ${({theme:e})=>`6rem ${e.layout.standardPaddingMobile}`};
304    margin: ${({theme:e})=>`0 -${e.layout.standardPaddingMobile}`};
305  }
306  padding: ${({theme:e})=>`6rem ${e.layout.standardPaddingDesktop}`};
307  margin: ${({theme:e})=>`0 -${e.layout.standardPaddingDesktop}`};
308`,Zn=s.div`
309  grid-area: or;
310`,ei=s.div`
311  grid-area: wb;
312  margin-top: 4rem;
313`,ti=s.div`
314  display: flex;
315  margin: 1rem 0 2rem 0;
316  justify-content: center;
317  ${y.tablet} {
318    flex-direction: column;
319  }
320`,ni=s(te)`
321  grid-template-areas:
322    'he he he he he he he he he he he he'
323    'wb wb wb wb wb wb wb wb wb wb wb wb'
324    'or or or or or or or or or or or or'
325    'wh wh wh wh wh wh wh wh wh wh wh wh'
326    '. s1 s1 s1 s1 s1 s1 s1 s1 s1 s1 .'
327    '. s2 s2 s2 s2 s2 s2 s2 s2 s2 s2 .';
328  ${y.largerThanTablet} {
329    grid-template-areas:
330      'he he he he he he he he he he he he'
331      'wb wb wb wb wb wb or or or or or or'
332      'wh wh wh wh wh wh wh wh wh wh wh wh'
333      '. . s1 s1 s1 s1 s2 s2 s2 s2 . .';
334  }
335`,ii=s(ne)`
336  margin: 0 1rem 26px 1rem;
337`,ri=s.div`
338  margin: 0 1rem;
339`;let j;const ai=({payment:e,user:n})=>{var p,h,o,g,m,f;const{t:a}=x("item"),{isTablet:r}=re(),i=(p=e.get("metadata"))==null?void 0:p.get("bagId"),u=(h=e.get("metadata"))!=null&&h.get("itemIds")?(o=e.get("metadata"))==null?void 0:o.get("itemIds").toJS()[0]:null;k.useEffect(()=>
339{i&&(St(i),It(i),Ke().refetchQueries({queries:[{query:Pt,variables:{saleId:i,locale:Qe}}]}))},[i]);const l=((m=(g=e.get("metadata"))==null?void 0:g.get("reevaluation"))==null?void 0:m.size)>0;if(j=l?"requestSendBackForReevaluationPaymentConfirmation":"requestSendBackPaymentConfirmation",!e)return null;const d=e.getIn(["metadata","bagId"]);return t.jsxs(ni,{children:[t.jsxs(Xn,{children:[t.jsx(ii,{type:ie.EARTH_OPEN_MOUTH,customSize:80}),t.jsxs(ri,{children:[t.jsxs(c,{design:"subtitle",color:"white",children:[a(`${j}.hi`)," ",(f=n==null?void 0:n.get("address"))==null?void 0:f.get("firstName")]}),t.jsx(z,{color:"white",children:a(`${j}.heading`)})]})]}),t.jsxs(ei,{children:[t.jsx(ee,{center:!0,children:a(`${j}.whatsNext.heading`)}),t.jsx(c,{design:"body1",center:!0,children:a(`${j}.whatsNext.body`)}),t.jsx(ti,{children:d&&t.jsx(R,{to:l?`/my-item/${u}`:`/sale/${d}?status=sortedForRecycling`,children:t.jsx(S,{label:a(`${j}.order.seeAllRejectedItemsButton`),style:{margin:r?"0 0 12px 0":"0 12px 12px 12px"},loading:!e.get("completedAt"),fullWidth:r})})})]}),t.jsxs(Zn,{children:[t.jsx(li,{user:n,isReevaluation:l}),t.jsx(si,{payment:e,isReevaluation:l})]})]})},oi=s.div`
340  background-color: ${({theme:e})=>e.color.grey.shade10};
341  padding: 2rem 2rem;
342  margin: 0 1rem;
343`,si=({payment:e,isReevaluation:n})=>{const{t:a}=x("item"),r=Ce();return j=n?"requestSendBackForReevaluationPaymentConfirmation":"requestSendBackPaymentConfirmation",t.jsxs(oi,{children:[t.jsx(M,{design:"body2",children:a(`${j}.order.headline`)}),t.jsxs("div",{style:{margin:"26px 0"},children:[t.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[t.jsx(I,{design:"body3",noMargin:!0,children:a(`${j}.order.freightCompany`)}),t.jsx(c,{design:"body3",style:{textTransform:"capitalize"},children:a(`${j}.order.freightCompanyDetails.${it(r)}`)})]}),t.jsx(Be,{payment:e})]})]})},di=s.div`
344  padding: 4rem 1rem;
345`,li=({user:e,isReevaluation:n})=>{const{t:a}=x("item");return j=n?"requestSendBackForReevaluationPaymentConfirmation":"requestSendBackPaymentConfirmation",t.jsx(di,{children:e!=null&&e.get("address")?t.jsxs(t.Fragment,{children:[t.jsx(M,{design:"body2",noMargin:!0,children:a(`${j}.order.addressHeadline`)}),t.jsxs("div",{style:{margin:"26px 0"},children:[t.jsxs(c,{design:"navBig",noMargin:!0,children:[e.get("address").get("firstName")," ",e.get("address").get("lastName")]}),t.jsx(c,{design:"navBig",noMargin:!0,children:e.get("address").get("street")}),t.jsxs(c,{design:"navBig",noMargin:!0,children:[e.get("address").get("zipCode")," ",e.get("address").get("city")]}),t.jsx(c,{design:"navBig",noMargin:!0,children:e.get("address").get("country")})]})]}):t.jsx(M,{design:"h7",noMargin:!0,children:a(`${j}.order.nonAuthAddressHeadline`)})})},ci=["SellerItemPricing","SendBackRequest"],mr=()=>{const{search:e}=Xe(),{paymentId:n}=we(),{loading:a,load:r}=wt(!0),[i,u]=k.useState(null),[l,d]=k.useState(null),{timeout:p}=Je.parse(e,{ignoreQueryPrefix:!0}),h=p==="true";return k.useEffect(()=>{if(!n)return;let o=!1;const g=m=>{o||(u(m.payment),d(m.user))};return r(J(n).then(m=>{var f,C;return g(m),ci.includes((f=m.payment)==null?void 0:f.get("type"))&&!((C=m.payment)!=null&&C.get("completedAt"))&&Dt(n).then(g),m})),()=>{o=!0}},[n,r]),a?t.jsx(Se,{}):!i&&!h?t.jsx(he,{}):!i.get("adyenSessionId")&&!i.get("klarnaSessionId")&&h?t.jsx(wn,{payment:i,timeout:h}):i.get("type")==="Bag"?t.jsx(rn,{payment:i}):i.get("type")==="GiftCard"?t.jsx(kn,{payment:i}):i.get("type")==="Item"?t.jsx(Fn,{payment:i}):i.get("type")==="SellerItemPricing"?t.jsx(Jn,{payment:i,user:l}):i.get("type")==="SendBackRequest"?t.jsx(ai,{payment:i,user:l}):i.get("type")==="LoyaltyProgramPeriod"?t.jsx(Sn,{}):t.jsx(he,{})};export{mr as default};
346//# sourceMappingURL=PaymentConfirmation.BlHe7dYP.bundle.js.map

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.