PageSourceSearch

https://www.averys.com/_next/static/chunks/pages/checkout/confirmation-c73b29d62caae3a6.js

js averys.com collected 2026-10-02 12:47:53 UTC 28,995 bytes, 270 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6256],{25837:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__N_SSG:()=>ea,default:()=>en});var i=r(75213),o=r(60004),n=r(10983),a=r(49173),l=r(47856),s=r(46183),d=r(77985),c=r(67652),m=r(98022),u=r(44098),p=r(71858),h=r(72076),f=r(22820),g=r(57962),C=r(69322),y=r(31709),v=r(69168),b=r(21150),w=r(14005),N=r(58229);let x=e=>(0,N.css)`
2  .order-confirmation-wrapper {
3    display: flex;
4    flex-direction: column;
5    justify-content: center;
6    gap: 1rem;
7
8    ${e.breakpoints?.md} {
9      flex-direction: row;
10      gap: 24px;
11      align-items: flex-start;
12
13      .order-confirmation-container {
14        flex: 791 1 0;
15        min-width: 0;
16      }
17
18      .order-confirmation-actions {
19        flex: 346 1 0;
20        min-width: 0;
21      }
22    }
23  }
24  font-family: ${e.fonts?.fontFamily};
25
26  header {
27    font-family: ${e.fonts?.familyPrimary};
28  }
29
30  .confirmation-card,
31  .order-card,
32  .delivery-card {
33    background: #fff;
34    border: 1px solid ${e.colors?.secondary9??"#e0e0e0"};
35    border-radius: 8px;
36    padding: 1.25rem;
37    margin-bottom: 1.25rem;
38  }
39
40  /* ── Confirmation card ── */
41  .confirmation-header {
42    text-align: center;
43  }
44
45  .order-number-label {
46    color: ${e.colors?.secondary1??"#888"};
47    letter-spacing: 0.08em;
48    text-transform: uppercase;
49    margin-bottom: 0.15rem;
50  }
51
52  .order-number-value {
53    font-size: 1.1rem;
54    font-weight: 700;
55    color: ${e.colors?.primary1??"#c0392b"};
56    letter-spacing: 0.04em;
57  }
58
59  .checkmark-circle {
60    display: flex;
61    align-items: center;
62    justify-content: center;
63    margin: 0.75rem auto;
64    color: ${e.colors?.success??"#2ecc71"};
65
66    svg {
67      width: 26px;
68      height: 26px;
69    }
70  }
71
72  .order-confirmation-header {
73    margin: 1.25rem;
74    margin-bottom: 1.75rem;
75    header {
76      font-size: 1.5rem;
77      font-weight: 300;
78      margin-bottom: 1rem;
79      color: ${e.colors?.body??"#333"};
80    }
81  }
82
83  .confirmation-message {
84    line-height: 1.5;
85    margin-bottom: 0.5rem;
86  }
87
88  .confirmation-email {
89    margin-bottom: 0.5rem;
90
91    span {
92      font-style: italic;
93    }
94  }
95
96  /* ── Section titles ── */
97  .your-order-section {
98    margin: 1.25rem;
99    header {
100      font-size: 1.5rem;
101      margin-bottom: 0.75rem;
102      color: ${e.colors?.body??"#333"};
103    }
104
105    .section-title {
106      font-size: 1rem;
107      font-weight: 700;
108      color: ${e.colors?.body??"#333"};
109      margin: 0 0 1rem;
110    }
111
112    /* ── Order line items ── */
113
114    .order-items {
115      margin-bottom: 1rem;
116    }
117
118    .order-item {
119      display: flex;
120      align-items: flex-start;
121      gap: 0.75rem;
122      padding: 1rem 0;
123      border-bottom: 0.5px solid #222222cc;
124
125      &:last-child {
126        border-bottom: none;
127      }
128    }
129
130    .order-item-image {
131      position: relative;
132      width: 44px;
133      height: 64px;
134      flex-shrink: 0;
135    }
136
137    .order-item-details {
138      flex: 1;
139      min-width: 0;
140    }
141
142    .order-item-name {
143      font-size: 1.25rem;
144      font-weight: 600;
145      color: ${e.colors?.body??"#333"};
146      margin-bottom: 1rem;
147      line-height: 1.3;
148    }
149
150    .order-item-pricing {
151      display: flex;
152      align-items: center;
153      gap: 0.5rem;
154    }
155
156    .order-item-price {
157      font-weight: 600;
158      color: ${e.colors?.savingsTextColor??"#333"};
159      flex-shrink: 0;
160    }
161
162    .order-item-full-price {
163      flex-shrink: 0;
164      text-decoration: line-through;
165    }
166
167    .order-item-savings {
168      margin-bottom: 1rem;
169    }
170
171    .order-item-delivery {
172      font-size: 1.15rem;
173    }
174  }
175
176  /* ── Totals ── */
177  .order-totals {
178    border-top: 1px solid #222222cc;
179    padding-top: 0.75rem;
180    font-size: 1.15rem;
181  }
182
183  .totals-row {
184    display: flex;
185    justify-content: space-between;
186    margin-bottom: 0.4rem;
187  }
188
189  .totals-row--savings {
190    color: ${e.colors?.savingsTextColor??"#dc2626"};
191  }
192
193  .totals-row-total {
194    display: flex;
195    justify-content: space-between;
196    font-weight: 700;
197    margin-top: 0.5rem;
198    padding-top: 0.5rem;
199    border-top: 1px solid #222222cc;
200    color: ${e.colors?.body??"#333"};
201
202    .total-amount {
203      color: ${e.colors?.primary1??"#c0392b"};
204    }
205  }
206
207  /* ── Delivery details ── */
208  .delivery-section {
209    font-size: 1.15rem;
210    margin: 1.25rem;
211    margin-bottom: 0;
212    header {
213      font-size: 1.5rem;
214      margin-bottom: 0.75rem;
215      color: ${e.colors?.body??"#333"};
216    }
217
218    .section-title {
219      font-size: 1.25rem;
220      margin-bottom: 1rem;
221    }
222    .delivery-card {
223      margin-bottom: 0;
224      .section-title {
225        font-size: 1.25rem;
226        margin-bottom: 1rem;
227      }
228      .delivery-row {
229        display: flex;
230        align-items: center;
231        gap: 0.6rem;
232        padding: 0.45rem 0;
233        color: ${e.colors?.body??"#333"};
234      }
235
236      .delivery-instructions {
237        border: 1px solid #bcbcbc;
238        padding: 0.6rem;
239        border-radius: 4px;
240      }
241
242      .delivery-icon {
243        display: flex;
244        align-items: center;
245        justify-content: center;
246        width: 16px;
247        height: 16px;
248        flex-shrink: 0;
249        margin-top: 1px;
250
251        svg {
252          width: 16px;
253          height: 16px;
254        }
255      }
256    }
257  }
258
259  .order-confirmation-actions {
260    display: flex;
261    flex-direction: column;
262    justify-content: center;
263    gap: 1rem;
264    margin: 1.25rem;
265
266    ${e.breakpoints?.md} {
267      margin-top: 4.5rem;
268    }
269  }
270`;var D=r(85935),k=r(58729),Y=r(51596),L=r(88945);let S=()=>(0,i.Y)("svg",{viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,i.Y)("path",{d:"M56.105 26.05C55.13 25.0325 54.1225 23.9825 53.7175 23.005C53.3425 22.0975 53.3225 20.755 53.3 19.335C53.265 16.99 53.225 14.335 51.445 12.555C49.665 10.775 47 10.735 44.665 10.7C43.245 10.6775 41.915 10.6575 40.995 10.2825C40.0175 9.8775 38.9675 8.87 37.95 7.895C36.29 6.305 34.41 4.5 32 4.5C29.59 4.5 27.71 6.305 26.05 7.895C25.0325 8.87 23.9825 9.8775 23.005 10.2825C22.0975 10.6575 20.755 10.6775 19.335 10.7C16.99 10.735 14.335 10.775 12.555 12.555C10.775 14.335 10.735 17 10.7 19.335C10.6775 20.755 10.6575 22.085 10.2825 23.005C9.8775 23.9825 8.87 25.0325 7.895 26.05C6.305 27.71 4.5 29.59 4.5 32C4.5 34.41 6.305 36.29 7.895 37.95C8.87 38.9675 9.8775 40.0175 10.2825 40.995C10.6575 41.9025 10.6775 43.245 10.7 44.665C10.735 47.01 10.775 49.665 12.555 51.445C14.335 53.225 17 53.265 19.335 53.3C20.755 53.3225 22.085 53.3425 23.005 53.7175C23.9825 54.1225 25.0325 55.13 26.05 56.105C27.71 57.695 29.59 59.5 32 59.5C34.41 59.5 36.29 57.695 37.95 56.105C38.9675 55.13 40.0175 54.1225 40.995 53.7175C41.9025 53.3425 43.245 53.3225 44.665 53.3C47.01 53.265 49.665 53.225 51.445 51.445C53.225 49.665 53.265 47.01 53.3 44.665C53.3225 43.245 53.3425 41.915 53.7175 40.995C54.1225 40.0175 55.13 38.9675 56.105 37.95C57.695 36.29 59.5 34.41 59.5 32C59.5 29.59 57.695 27.71 56.105 26.05ZM53.94 35.875C52.7725 37.09 51.565 38.35 50.94 39.85C50.345 41.285 50.32 42.98 50.295 44.62C50.2675 46.48 50.2375 48.405 49.32 49.325C48.4025 50.245 46.475 50.2725 44.615 50.3C42.975 50.325 41.28 50.35 39.845 50.945C38.345 51.565 37.095 52.7725 35.8675 53.945C34.555 55.195 33.1975 56.505 31.995 56.505C30.7925 56.505 29.435 55.2025 28.12 53.945C26.905 52.7775 25.645 51.57 24.145 50.945C22.71 50.35 21.015 50.325 19.375 50.3C17.515 50.2725 15.59 50.2425 14.67 49.325C13.75 48.4075 13.7225 46.48 13.695 44.62C13.67 42.98 13.645 41.285 13.05 39.85C12.43 38.35 11.2225 37.1 10.05 35.8725C8.8025 34.56 7.5 33.2025 7.5 32C7.5 30.7975 8.8025 29.44 10.06 28.125C11.2275 26.91 12.435 25.65 13.06 24.15C13.655 22.715 13.68 21.02 13.705 19.38C13.7325 17.52 13.7625 15.595 14.68 14.675C15.5975 13.755 17.525 13.7275 19.385 13.7C21.025 13.675 22.72 13.65 24.155 13.055C25.655 12.435 26.905 11.2275 28.1325 10.055C29.44 8.8025 30.7975 7.5 32 7.5C33.2025 7.5 34.56 8.8025 35.875 10.06C37.09 11.2275 38.35 12.435 39.85 13.06C41.285 13.655 42.98 13.68 44.62 13.705C46.48 13.7325 48.405 13.7625 49.325 14.68C50.245 15.5975 50.2725 17.525 50.3 19.385C50.325 21.025 50.35 22.72 50.945 24.155C51.565 25.655 52.7725 26.905 53.945 28.1325C55.195 29.445 56.505 30.8025 56.505 32.005C56.505 33.2075 55.1975 34.56 53.94 35.875ZM43.06 24.94C43.3409 25.2213 43.4987 25.6025 43.4987 26C43.4987 26.3975 43.3409 26.7787 43.06 27.06L29.06 41.06C28.7787 41.3409 28.3975 41.4987 28 41.4987C27.6025 41.4987 27.2213 41.3409 26.94 41.06L20.94 35.06C20.675 34.7757 20.5308 34.3996 20.5376 34.011C20.5445 33.6224 20.7019 33.2516 20.9768 32.9768C21.2516 32.7019 21.6224 32.5445 22.011 32.5377C22.3996 32.5308 22.7757 32.675 23.06 32.94L28 37.8775L40.94 24.94C41.2212 24.6591 41.6025 24.5013 42 24.5013C42.3975 24.5013 42.7788 24.6591 43.06 24.94Z",fill:"currentColor"})}),F=()=>(0,i.Y)("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,i.Y)("path",{d:"M1.33398 5.33299L7.82198 2.08899C7.87747 2.06129 7.93864 2.04687 8.00065 2.04688C8.06267 2.04688 8.12383 2.06129 8.17932 2.08899L14.6673 5.33299M13.334 7.33299
270V12.6663C13.334 13.02 13.1935 13.3591 12.9435 13.6091C12.6934 13.8592 12.3543 13.9997 12.0007 13.9997H4.00065C3.64703 13.9997 3.30789 13.8592 3.05784 13.6091C2.80779 13.3591 2.66732 13.02 2.66732 12.6663V7.33299",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})}),P=()=>(0,i.FD)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,i.Y)("circle",{cx:"12",cy:"7",r:"4"}),(0,i.Y)("path",{d:"M5.5 20c0-3.59 2.91-6.5 6.5-6.5s6.5 2.91 6.5 6.5"})]}),I=()=>(0,i.Y)("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,i.Y)("path",{d:"M6.138 10.9697C6.138 11.9063 5.39667 12.6663 4.48267 12.6663C3.56867 12.6663 2.82733 11.9063 2.82733 10.969M6.138 10.9697C6.138 10.033 5.39667 9.27234 4.48267 9.27234C3.56867 9.27234 2.82733 10.0323 2.82733 10.969M6.138 10.9697L9.862 10.969M2.82733 10.969H2V3.99967C2 3.82286 2.07024 3.65329 2.19526 3.52827C2.32029 3.40325 2.48986 3.33301 2.66667 3.33301H9.19533C9.37214 3.33301 9.54171 3.40325 9.66674 3.52827C9.79176 3.65329 9.862 3.82286 9.862 3.99967V5.45434M9.862 10.969H10.276M9.862 10.969V5.45434M9.862 5.45434H11.3693C11.5471 5.45436 11.7231 5.48994 11.8869 5.55897C12.0508 5.62801 12.1992 5.72912 12.3233 5.85634L14 7.57567V10.969H13.586M13.586 10.969C13.586 11.9063 12.8453 12.6663 11.9313 12.6663C11.0173 12.6663 10.276 11.9063 10.276 10.969M13.586 10.969C13.586 10.0323 12.8453 9.27234 11.9313 9.27234C11.0173 9.27234 10.276 10.0323 10.276 10.969",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})}),O=()=>(0,i.Y)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:(0,i.Y)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.69506 0.482642C3.27701 0.542338 2.85835 0.83837 2.65565 1.21763C2.62933 1.26688 2.28662 2.09128 1.8941 3.04963C1.50158 4.00797 1.14502 4.87187 1.10176 4.96941C1.00458 5.18851 0.962431 5.34823 0.941663 5.57607C0.931247 5.69029 0.927471 7.25418 0.930943 10.0321C0.935855 13.986 0.938335 14.3206 0.963327 14.4241C1.09706 14.9774 1.44502 15.3309 2.00706 15.4844L2.16706 15.5281H8.01506H13.8631L14.0071 15.4915C14.5404 15.3559 14.8904 14.9781 15.0331 14.3841C15.0604 14.2703 15.0622 14.0427 15.0672 10.0081C15.0707 7.16991 15.0669 5.68277 15.0559 5.54407C15.0348 5.27979 15.0101 5.18727 14.9003 4.96037C14.8513 4.85933 14.4913 3.99539 14.1001 3.0405C13.7089 2.0856 13.3674 1.26426 13.3413 1.21528C13.1668 0.887794 12.8201 0.61613 12.4391 0.50829L12.3111 0.472066L8.05506 0.469922C5.50995 0.468642 3.75725 0.473746 3.69506 0.482642ZM3.79219 1.49071C3.72106 1.51114 3.60976 1.5881 3.56942 1.64475C3.53942 1.68688 2.51106 4.17922 2.51106 4.20979C2.51106 4.21824 3.53741 4.2225 5.00306 4.22011L7.49506 4.21607L7.49915 2.84407L7.50323 1.47207L5.67515 1.47351C4.52768 1.47442 3.82662 1.48082 3.79219 1.49071ZM8.49896 2.84381L8.50306 4.21607L10.9969 4.22011C13.3671 4.22397 13.4904 4.22277 13.4833 4.19611C13.4792 4.18069 13.2462 3.6065 12.9655 2.92015C12.5035 1.79074 12.449 1.66611 12.3911 1.60781C12.3559 1.57239 12.2983 1.52915 12.2631 1.51173C12.2005 1.4808 12.1558 1.47997 10.347 1.47581L8.49488 1.47154L8.49896 2.84381ZM2.24048 5.23344C2.09467 5.26202 1.99216 5.38429 1.95083 5.57888C1.93982 5.63075 1.93586 7.06256 1.93875 9.94407L1.94306 14.2321L1.97766 14.307C2.02136 14.4015 2.11165 14.4682 2.24298 14.5029C2.33538 14.5274 2.78242 14.5291 8.06306 14.5248L13.7831 14.5201L13.8501 14.4842C13.9339 14.4395 13.9877 14.3695 14.0256 14.2561C14.0539 14.1715 14.0551 14 14.0551 9.84807V5.52807L14 5.42933C13.9379 5.31767 13.8855 5.28083 13.7329 5.24146C13.6442 5.21858 13.0892 5.21631 7.97288 5.21787C4.85888 5.21882 2.2793 5.22583 2.24048 5.23344ZM9.30662 11.7287C9.15024 11.755 8.98483 11.8982 8.93398 12.0513C8.89818 12.1591 8.90856 12.3504 8.9551 12.4409C9.00019 12.5285 9.1047 12.6301 9.19594 12.6751L9.27106 12.7121L10.7856 12.7164L12.3002 12.7207L12.3931 12.6859C12.5767 12.6172 12.7191 12.4166 12.7191 12.2264C12.7191 11.9842 12.5456 11.7728 12.3116 11.7295C12.2002 11.7089 9.42864 11.7082 9.30662 11.7287Z",fill:"currentColor"})}),$=e=>{let t=e.sku.productName?.find(e=>"en_GB"===e.key);return t?.value||e.sku.productName?.[0]?.value||e.sku.itemCode},E=(e,t)=>e?.find(e=>e.lineItemReferences?.some(e=>e.lineItemId===t))??e?.[0],T=e=>"GiftVoucherRedeemed"===e.status?"Gift Voucher":"Authorized"===e.status?"Card Payment":"presellPending"===e.status?"Future Payment":"tokenised"===e.type?"Card Payment":"Payment",M=e=>{let{physical:t}=e.destination;if(!t)return"";let{address:r}=t;
270return[r.address1,r.address2,r.locality,r.postalCode].filter(Boolean).join(", ")},j=e=>{let{physical:t}=e.destination;if(!t)return"";let r=[];return(t.firstName||t.lastName)&&r.push([t.firstName,t.lastName].filter(Boolean).join(" ")),t.dateOfBirth&&r.push(t.dateOfBirth),t.phone&&r.push(t.phone),r.join(", ")},z=e=>{let{order:t,cmsSiteConfig:r}=e,n=x((0,u.u)()),a=t.deliveryGroups?.[0],l=t.totalListPrice?.amount,s=a?.price?.amount,d=t.lineItemSavings?.totalCartDiscountSavings??0,c=t.totalPrice?.amount,{totalSavings:m}=(0,o.useMemo)(()=>(0,p.aD)(t.lineItems??[]),[t.lineItems]),N=h.z.currency||"\xa3";return(0,i.FD)("div",{css:n,children:[(0,i.Y)(Y.K,{}),(0,i.FD)("div",{className:"order-confirmation-wrapper",children:[(0,i.FD)("div",{className:"order-confirmation-container",children:[(0,i.FD)("div",{className:"order-confirmation-header",children:[(0,i.Y)("header",{children:"Order Confirmation"}),(0,i.Y)("div",{className:"confirmation-card","data-testid":"order-confirmation-card",children:(0,i.FD)("div",{className:"confirmation-header",children:[(0,i.Y)("div",{className:"checkmark-circle",role:"img","aria-label":"Order confirmed",children:(0,i.Y)(S,{})}),(0,i.Y)("p",{className:"confirmation-message",children:"Thank you for your order"}),(0,i.FD)("p",{className:"confirmation-email","data-testid":"confirmation-email",children:["We’ve sent an order confirmation email to:"," ",(0,i.Y)("span",{children:t.deliveryGroups?.[0]?.destination?.physical?.email})]}),(0,i.Y)("p",{className:"confirmation-note",children:"Your email will confirm your order details (including your order number) and will be used for subsequent order updates"})]})})]}),(0,i.FD)("div",{className:"your-order-section",children:[(0,i.Y)("header",{children:"Your Order"}),(0,i.FD)("div",{className:"order-card","data-testid":"order-card",children:[(0,i.Y)("div",{className:"order-items",children:t.lineItems?.map(e=>{let r=$(e),o=(0,f.nv)(e.sku.itemCode),n=e.totalPrice?.amount??0,a=(e.savings?.totalCartDiscountSavings??0)+(e.savings?.totalProductDiscountSavings??0),l=k.C.isRestrictedLineItem(e),s=E(t.deliveryGroups,e.lineItemId);return(0,i.FD)("div",{className:"order-item","data-testid":`order-item-${e.lineItemId}`,children:[(0,i.Y)("div",{className:"order-item-image",children:(0,i.Y)(g.X,{src:o,alt:r,fill:!0,objectFit:"contain"})}),(0,i.FD)("div",{className:"order-item-details",children:[(0,i.Y)("p",{className:"order-item-name",children:r}),(0,i.Y)("div",{className:"order-item-pricing",children:(0,i.FD)("div",{children:[(0,i.Y)("span",{className:"order-item-price",children:(0,w.$g)(n,N)})," ",a>0&&(0,i.Y)("span",{className:"order-item-full-price",children:(0,C.n_)(e)})]})}),a>0&&(0,i.FD)("div",{className:"order-item-savings",children:[(0,y.FY)(a)," "]}),(0,i.FD)("p",{className:"order-item-quantity",children:["Quantity: ",e.quantity]}),!l&&(0,i.FD)("div",{className:"order-item-delivery",children:[(0,i.Y)("div",{children:"Delivery:"}),(0,i.Y)("div",{children:(0,v.aq)(s?.deliveryOptions?.deliveryMethod?.deliveryDate)})]})]})]},e.lineItemId)})}),(0,i.FD)("div",{className:"order-totals",children:[void 0!==l&&(0,i.FD)("div",{className:"totals-row","data-testid":"totals-subtotal",children:[(0,i.Y)("span",{children:"Subtotal"}),(0,i.Y)("span",{children:(0,w.$g)(l,N)})]}),(0,i.FD)("div",{className:"totals-row totals-row--savings",children:[(0,i.Y)("span",{children:"Your Savings"}),(0,i.Y)("span",{children:(0,w.$g)(m,N)})]}),void 0!==s&&(0,i.FD)("div",{className:"totals-row","data-testid":"totals-delivery",children:[(0,i.Y)("span",{children:"Delivery"}),(0,i.Y)("span",{children:(0,w.$g)(s,N)})]}),d>0&&(0,i.FD)("div",{className:"totals-row totals-row--savings","data-testid":"totals-voucher-discounts",children:[(0,i.Y)("span",{children:"Voucher Discounts"}),(0,i.FD)("span",{children:["-",(0,w.$g)(d,N)]})]}),t.paymentDetails&&t.paymentDetails.length>0&&t.paymentDetails.map((e,t)=>(0,i.FD)("div",{className:"totals-row","data-testid":`payment-detail-${t}`,children:[(0,i.Y)("span",{children:T(e)}),(0,i.Y)("span",{children:(0,w.$g)(e.amount.amount,N)})]},e.tokenisedPaymentResult?.transactionId??t)),void 0!==c&&(0,i.FD)("div",{className:"totals-row-total","data-testid":"totals-total",children:[(0,i.Y)("span",{children:"TOTAL"}),(0,i.Y)("span",{className:"total-amount",children:(0,w.$g)(c,N)})]})]})]})]}),a&&(0,i.FD)("div",{className:"delivery-section",children:[(0,i.Y)("header",{children:"Delivery Details"}),(0,i.FD)("div",{className:"delivery-card","data-testid":"delivery-card",children:[j(a)&&(0,i.FD)("div",{className:"delivery-row","data-testid":"delivery-contact",children:[(0,i.Y)("span",{className:"delivery-icon",children:(0,i.Y)(P,{})}),(0,i.Y)("span",{children:j(a)})]}),M(a)&&(0,i.FD)("div",{className:"delivery-row","data-testid":"delivery-address",children:[(0,i.Y)("span",{className:"delivery-icon",children:(0,i.Y)(F,{})}),(0,i.Y)("span",{children:M(a)})]}),a?.method&&(0,i.FD)("div",{className:"delivery-row","data-testid":"delivery-method",children:[(0,i.Y)("span",{className:"delivery-icon",children:(0,i.Y)(I,{})}),(0,i.FD)("span",{children:[(0,D.Gv)(a.method)," ",a.price&&(0,w.$g)(a.price.amount,N)]})]}),a?.deliveryOptions?.instructions&&(0,i.FD)(i.FK,{children:[(0,i.FD)("div",{className:"delivery-row","data-testid":"delivery-instru
270ctions",children:[(0,i.Y)("span",{className:"delivery-icon",children:(0,i.Y)(O,{})}),(0,i.Y)("span",{children:"Delivery Instructions:"})]}),(0,i.Y)("div",{className:"delivery-instructions","data-testid":"delivery-instructions-content",children:a?.deliveryOptions?.instructions||"No delivery instructions provided."})]})]})]})]}),(0,i.FD)("div",{className:"order-confirmation-actions",children:[(0,i.Y)(b.$,{type:"button",kind:"secondary",onClick:()=>window.print(),children:"Print Order Summary"}),(0,i.Y)(b.$,{kind:"secondary",children:"Refer a friend"}),(0,i.Y)(b.$,{kind:"primary",fluid:!0,"data-testid":"continue-shopping-button",onClick:()=>{window.location.href="/"},children:"Continue Shopping"})]})]}),(0,i.Y)(L.A,{cmsSiteConfig:r})]})};var R=r(86052),B=r(37324),A=r(21192);class _{constructor(e=!1){this.enableLogger=e}pushEvent(e){!h.z.isEmbedded&&(0,A.B)()&&(this.enableLogger&&console.log("[GtmDataLayer] pushEvent",e),window.dataLayer=window.dataLayer??[],window.dataLayer.push(e))}transaction(e){this.pushEvent({...e})}}let H=new _;var V=r(77493),G=r(52642),q=r(9008);let Z=e=>e?.[0]?.value??"",W={STD:"Standard Delivery",EXP:"Flexible Delivery",COLL:"Store Delivery"},U=(e,t)=>(e.lineItems??[]).map(e=>{let r=t?.find(t=>t.itemCode===e.sku?.itemCode)??e.product,i=Number(e.quantity??0),o=r?.productType??"";return{id:e.sku?.productItemCode??"",sku:e.sku?.itemCode??"",name:Z(e.sku?.productName),price:e.unitPrice?.value?.amount??0,subTotal:e.totalPrice?.amount??0,quantity:i,productType:o,category:o,caseType:r?.packaging??r?.bottleType??"",salesActivity:r?.salesActivity??""}}),X=e=>(e?.subscriptions??[]).filter(e=>"WINEPLAN"===e.type&&("ACTIVE"===e.status||"REQUESTED"===e.status)).length,K=e=>e?.loginType==="hard_logged"?{visitorType:"Existing Customer",visitorTypeDetailed:"Hard Logged-In"}:{visitorType:"New Customer",visitorTypeDetailed:e?.loginType==="unidentified"?"Unidentified":"Soft Logged-In"},Q=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{user:r,paymentMethod:i="",productData:o,freeShipProfile:n="",freeItemProfile:a=""}=t,l=e.deliveryGroups?.[0],s=l?.destination?.physical,d=r?.billingAddress,{visitorType:c,visitorTypeDetailed:m}=K(r),u=(0,q.oY)(l?.methodKey);return{brandId:h.z.brandId??"",profileId:r?.profileId??"",businessPartner:r?.businessPartner??"",vStatus:m,visitorType:c,visitorTypeDetailed:m,activeWinePlansSubscriptions:X(r),event:"transaction",pageEvent:"transaction",transactionLocale:h.z.locale??h.z.country??"",transactionId:e.id??"",erpOrderType:u,customerOrderType:"RECR"===u?"Recruit":"Existing",transactionResponseCode:e.responseCode??"",transactionAffiliation:"",transcationSalesActivity:"",transactionTotal:e.totalListPrice?.amount??0,transactionShipping:e.shippingInformation?.price?.amount??l?.price?.amount??0,orderDiscount:e.lineItemSavings?.totalSavings??0,qualifiedCoupons:"",transactionShippingMethod:W[u]??"",transactionCheckoutType:"",transactionPaymentMethod:e.paymentDetails?.[0]?.storedPaymentResult?.paymentMethod??e.paymentDetails?.[0]?.tokenisedPaymentResult?.paymentMethod??i,transactionTax:0,transactionDiscount:e.lineItemSavings?.totalCartDiscountSavings??0,customerCity:s?.address?.locality??d?.city??"",customerState:d?.state??d?.county??"",firstName:r?.firstName??s?.firstName??"",lastName:r?.lastName??s?.lastName??"",oStatus:c,freeShipProfile:n,freeItemProfile:a,customerEmail:r?.emailAddress??s?.email??"",transactionProducts:U(e,o)}};var J=r(87750);let ee=(e,t,r,i)=>{let{selectedPaymentMethod:n}=(0,J.t)(),a=(0,V.kH)((0,B.k)(G.Qn)),l=(0,V.m9)(),s=(0,o.useRef)(!1);(0,o.useEffect)(()=>{e&&t&&r&&!s.current&&(s.current=!0,H.transaction(Q(e,{user:a,paymentMethod:q.$i[n]??"",productData:i,freeShipProfile:l})))},[e,t,r,a,i,n,l])};var et=r(97873),er=r(54604);let ei=e=>{let[t,r]=(0,o.useState)(null),[i,n]=(0,o.useState)(!1),[a,l]=(0,o.useState)(null);return(0,o.useEffect)(()=>{if(!e)return;let t=!0;return n(!0),l(null),(async()=>{try{let i=V.nc.getState().auth;i?.publicCsrf||(i=await (0,er.r)()||i);let o=(0,s.wD)((0,V.oW)(i.publicCsrf)),n=await o.Checkout.getOrderDetails(e);if(!t)return;r(n)}catch(e){if(!t)return;c.vF.error("useOrderConfirmation - Failed to fetch order details",e),l((0,D.VR)(e,"Unable to load your order details. Please check your email for confirmation."))}finally{t&&n(!1)}})(),()=>{t=!1}},[e]),{order:t,isLoading:i,error:a}},eo=(e,t)=>e.map(e=>{let r=t.find(t=>t.itemCode===e.sku.productItemCode);
270return r?(0,d.V)(r,e.quantity??0,e.sku.itemCode,!1):null}).filter(Boolean),en=e=>{let{cmsSiteConfig:t}=e,r=(0,n.useRouter)().query.orderid,d=Array.isArray(r)?r[0]:r,u=(0,o.useRef)(!1),{order:p,isLoading:h,error:f}=ei(d),{selectedPaymentMethod:g}=(0,J.t)(),C=p?(0,q.Tw)(p,{paymentMethod:q.$i[g]??""}):void 0,[y,v]=(0,o.useState)([]),[b,w]=(0,o.useState)([]),[N,x]=(0,o.useState)(!1);(0,o.useEffect)(()=>{if(!p?.lineItems?.length)return;let e=!1,t=p.lineItems.map(e=>e.sku.itemCode).join(",");return(0,s.wD)().Product.getAllProductData(t).then(t=>{e||(w(t),v(eo(p.lineItems,t)),x(!0))}).catch(t=>{e||(c.vF.error("ConfirmationPage: failed to fetch product data for Adobe Data Layer",t),x(!0))}),()=>{e=!0}},[p]);let D=p&&(N||!p.lineItems?.length)?et.b8.Confirmation:null,k=p?.deliveryGroups?.[0]?.destination?.physical?.email;return((0,R.w)(D,C,y,k),ee(p,d,null!==D,b),ee(p,d,null!==D,b),(0,o.useEffect)(()=>{p&&d&&null!==D&&!u.current&&(u.current=!0,(0,m.R8)().catch(e=>{c.vF.error("ConfirmationPage: orderCleanUp failed",e)}))},[p,D]),!h&&(p||f))?f||!p?(0,i.Y)(l.F,{color:"red",title:"Order Not Found",style:{maxWidth:480,margin:"2rem auto"},children:f??"No order information found. Please check your email for confirmation."}):(0,i.Y)(z,{order:p,cmsSiteConfig:t}):(0,i.Y)("div",{style:{display:"flex",justifyContent:"center",padding:"4rem"},children:(0,i.Y)(a.a,{size:"lg"})})};var ea=!0},47856:(e,t,r)=>{"use strict";r.d(t,{F:()=>S});var i=r(60004),o=r(48713),n=r(32055),a=r(60446),l=r(95997),s=Object.defineProperty,d=Object.defineProperties,c=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,h=(e,t,r)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,f=(e,t)=>{for(var r in t||(t={}))u.call(t,r)&&h(e,r,t[r]);if(m)for(var r of m(t))p.call(t,r)&&h(e,r,t[r]);return e},g=(e,t)=>d(e,c(t)),C=(0,a.r)((e,{radius:t,color:r},{variant:i})=>({root:f(g(f({},e.fn.fontStyles()),{position:"relative",overflow:"hidden",paddingTop:e.spacing.sm,paddingBottom:e.spacing.sm,paddingLeft:e.spacing.md,paddingRight:e.spacing.sm,borderRadius:e.fn.radius(t),border:`${(0,l.D)(1)} solid transparent`}),function({variant:e,color:t,theme:r}){if("filled"===e)return{backgroundColor:r.fn.variant({variant:"filled",color:t}).background,color:r.white};if("outline"===e){let e=r.fn.variant({variant:"outline",color:t});return{color:e.color,borderColor:e.border,backgroundColor:"dark"===r.colorScheme?r.colors.dark[6]:r.white}}if("light"===e){let e=r.fn.variant({variant:"light",color:t});return{backgroundColor:e.background,color:e.color}}return null}({variant:i,color:r,theme:e})),wrapper:{display:"flex"},body:{flex:1},title:{boxSizing:"border-box",margin:0,marginBottom:e.spacing.xs,display:"flex",alignItems:"center",justifyContent:"space-between",lineHeight:e.lineHeight,fontSize:e.fontSizes.sm,fontWeight:700,"&[data-with-close-button]":{paddingRight:e.spacing.md}},label:{display:"block",overflow:"hidden",textOverflow:"ellipsis"},icon:{lineHeight:1,width:(0,l.D)(20),height:(0,l.D)(20),display:"flex",alignItems:"center",justifyContent:"flex-start",marginRight:e.spacing.md,marginTop:1},message:g(f({},e.fn.fontStyles()),{lineHeight:e.lineHeight,textOverflow:"ellipsis",overflow:"hidden",fontSize:e.fontSizes.sm,color:"filled"===i?e.white:"dark"===e.colorScheme?"light"===i?e.white:e.colors.dark[0]:e.black}),closeButton:{width:(0,l.D)(10),height:(0,l.D)(10),color:"filled"===i?e.white:"dark"===e.colorScheme?"light"===i?e.white:e.colors.dark[0]:e.black}})),y=r(30149),v=r(15028),b=Object.defineProperty,w=Object.getOwnPropertySymbols,N=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,D=(e,t,r)=>t in e?b(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,k=(e,t)=>{for(var r in t||(t={}))N.call(t,r)&&D(e,r,t[r]);if(w)for(var r of w(t))x.call(t,r)&&D(e,r,t[r]);return e},Y=(e,t)=>{var r={};for(var i in e)N.call(e,i)&&0>t.indexOf(i)&&(r[i]=e[i]);if(null!=e&&w)for(var i of w(e))0>t.indexOf(i)&&x.call(e,i)&&(r[i]=e[i]);return r};let L={variant:"light"},S=(0,i.forwardRef)((e,t)=>{let r=(0,o.a1)("Alert",L,e),{id:a,className:l,title:s,variant:d,children:c,color:m,classNames:u,icon:p,styles:h,onClose:f,radius:g,withCloseButton:b,closeButtonLabel:w,unstyled:N}=r,x=Y(r,["id","className","title","variant","children","color","classNames","icon","styles","onClose","radius","withCloseButton","closeButtonLabel","unstyled"]),{classes:D,cx:S}=C({color:m,radius:g},{classNames:u,styles:h,unstyled:N,variant:d,name:"Alert"}),F=(0,n.B)(a),P=s&&`${F}-title`,I=`${F}-body`;return i.createElement(y.a,k({id:F,role:"alert","aria-labelledby":P,"aria-describedby":I,className:S(D.root,D[d],l),ref:t},x),i.createElement("div",{className:D.wrapper},p&&i.createElement("div",{className:D.icon},p),i.createElement("div",{className:D.body},s&&i.createElement("div",{className:D.title,"data-with-close-button":b||void 0},i.createElement("span",{id:P,className:D.label},s)),i.createElement("div",{id:I,className:D.message},c)),b&&i.createElement(v.J,{className:D.closeButton,onClick:f,variant:"transparent",size:16,iconSize:16,"aria-label":w})))});S.displayName="@mantine/core/Alert"},58397:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/checkout/confirmation",function(){return r(25837)}])}},e=>{var t=t=>e(e.s=t);e.O(0,[3045,2117,7417,6665,800,9915,1285,6576,3679,6403,8818,9853,6303,6023,4148,5141,1934,9226,4562,38,4303,4759,5188,9994,3295,8311,9108,7724,9500,3616,30,3816,6698,2582,4746,9723,9415,6554,4528,7415,8202,3974,1860,8391,5773,2220,6735,8792],()=>t(58397)),_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.