@dropins/storefront-order 3.0.0-beta2 → 3.0.0-beta4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/LICENSE.md +25 -25
  2. package/api/cancelOrder/graphql/cancelOrderMutation.d.ts +1 -1
  3. package/api/confirmCancelOrder/graphql/ConfirmCancelOrder.d.ts +1 -1
  4. package/api/confirmGuestReturn/graphql/confirmGuestReturn.graphql.d.ts +1 -1
  5. package/api/fetch-graphql/fetch-graphql.d.ts +2 -2
  6. package/api/getAttributesList/getAttributesList.d.ts +1 -2
  7. package/api/getCustomerOrdersReturn/graphql/getCustomerOrdersReturn.graphql.d.ts +1 -1
  8. package/api/getGuestOrder/graphql/getGuestOrder.graphql.d.ts +1 -1
  9. package/api/getOrderDetailsById/getOrderDetailsById.d.ts +2 -2
  10. package/api/getOrderDetailsById/graphql/orderByNumber.graphql.d.ts +1 -1
  11. package/api/graphql/GuestOrderFragment.graphql.d.ts +1 -1
  12. package/api/graphql/OrderItemsFragment.graphql.d.ts +1 -1
  13. package/api/graphql/PlaceNegotiableQuoteOrderFragment.graphql.d.ts +1 -1
  14. package/api/graphql/PlaceOrderFragment.graphql.d.ts +1 -1
  15. package/api/guestOrderByToken/graphql/guestOrderByToken.graphql.d.ts +1 -1
  16. package/api/placeNegotiableQuoteOrder/graphql/placeNegotiableQuoteOrderMutation.graphql.d.ts +1 -1
  17. package/api/placeOrder/graphql/placeOrderMutation.d.ts +1 -1
  18. package/api/requestGuestOrderCancel/graphql/requestGuestOrderCancelMutation.d.ts +1 -1
  19. package/api/requestGuestReturn/graphql/requestGuestReturn.graphql.d.ts +1 -1
  20. package/api/requestReturn/graphql/requestReturn.graphql.d.ts +1 -1
  21. package/api/setPaymentMethodAndPlaceOrder/graphql/setPaymentMethodAndPlaceOrderMutation.d.ts +1 -1
  22. package/api.js +1 -1
  23. package/chunks/CartSummaryItem.js +1 -1
  24. package/chunks/OrderCancelForm.js +1 -1
  25. package/chunks/OrderLoaders.js +1 -1
  26. package/chunks/ReturnsListContent.js +1 -1
  27. package/chunks/ShippingStatusCard.js +1 -1
  28. package/chunks/capitalizeFirst.js +1 -1
  29. package/chunks/confirmCancelOrder.js +1 -1
  30. package/chunks/fetch-graphql.js +1 -1
  31. package/chunks/formatDateToLocale.js +1 -1
  32. package/chunks/getAttributesForm.js +1 -1
  33. package/chunks/getCustomerOrdersReturn.js +1 -1
  34. package/chunks/getFormValues.js +1 -1
  35. package/chunks/getGuestOrder.js +1 -1
  36. package/chunks/getQueryParam.js +1 -1
  37. package/chunks/getStoreConfig.js +1 -1
  38. package/chunks/initialize.js +1 -1
  39. package/chunks/network-error.js +1 -1
  40. package/chunks/requestGuestOrderCancel.js +1 -1
  41. package/chunks/requestGuestReturn.js +1 -1
  42. package/chunks/returnOrdersHelper.js +1 -1
  43. package/chunks/setTaxStatus.js +1 -1
  44. package/chunks/transform-attributes-form.js +1 -1
  45. package/chunks/useGetStoreConfig.js +1 -1
  46. package/chunks/useIsMobile.js +1 -1
  47. package/components/OrderCostSummaryContent/Blocks/GiftWrapping.d.ts +1 -1
  48. package/components/OrderCostSummaryContent/Blocks/PrintedCard.d.ts +2 -2
  49. package/components/OrderCostSummaryContent/Blocks/Subtotal.d.ts +1 -1
  50. package/components/OrderCostSummaryContent/Blocks/Total.d.ts +1 -1
  51. package/components/OrderLoaders/OrderLoaders.d.ts +2 -2
  52. package/containers/CreateReturn.js +1 -1
  53. package/containers/CustomerDetails.js +1 -1
  54. package/containers/OrderCancelForm.js +1 -1
  55. package/containers/OrderCostSummary.js +1 -1
  56. package/containers/OrderHeader.js +1 -1
  57. package/containers/OrderProductList.js +1 -1
  58. package/containers/OrderReturns.js +1 -1
  59. package/containers/OrderSearch.js +1 -1
  60. package/containers/OrderStatus.js +1 -1
  61. package/containers/ReturnsList.js +1 -1
  62. package/containers/ShippingStatus.js +1 -1
  63. package/data/transforms/transform-attributes-form.d.ts +1 -2
  64. package/data/transforms/transform-order-details.d.ts +1 -1
  65. package/fragments.js +1 -1
  66. package/hooks/containers/useCreateReturn.d.ts +8 -8
  67. package/hooks/containers/useOrderActions.d.ts +1 -1
  68. package/lib/categorizeProducts.d.ts +41 -41
  69. package/lib/convertCase.d.ts +1 -1
  70. package/lib/place-order-error.d.ts +1 -1
  71. package/lib/redirectTo.d.ts +1 -1
  72. package/lib/returnOrdersHelper.d.ts +1 -1
  73. package/package.json +1 -1
  74. package/render.js +1 -1
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{jsx as i,jsxs as b,Fragment as v}from"@dropins/tools/preact-jsx-runtime.js";import{Price as A,Image as B,CartItem as K,Incrementer as Q,Icon as R}from"@dropins/tools/components.js";import{useCallback as F}from"@dropins/tools/preact-hooks.js";import{Slot as H}from"@dropins/tools/lib.js";import{O as G}from"./OrderLoaders.js";import*as w from"@dropins/tools/preact-compat.js";const J=l=>w.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...l},w.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M0.75 12C0.75 5.78421 5.78421 0.75 12 0.75C18.2158 0.75 23.25 5.78421 23.25 12C23.25 18.2158 18.2158 23.25 12 23.25C5.78421 23.25 0.75 18.2158 0.75 12Z",stroke:"currentColor"}),w.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M11.75 5.88423V4.75H12.25V5.88423L12.0485 13.0713H11.9515L11.75 5.88423ZM11.7994 18.25V16.9868H12.2253V18.25H11.7994Z",stroke:"currentColor"})),ee=({slots:l,placeholderImage:S="",loading:M,product:e,itemType:Z,taxConfig:$,translations:x,disabledIncrementer:j,onQuantity:P,showConfigurableOptions:E,routeProductDetails:I})=>{var O,D,f,L,V;const{taxExcluded:d,taxIncluded:k}=$,t=F((n,c,s)=>i(A,{amount:n,currency:c,weight:"normal",...s}),[]),T=F(n=>{var o,_;const c=(n==null?void 0:n.productName)??"",s={title:c,src:((_=(o=n==null?void 0:n.product)==null?void 0:o.thumbnail)==null?void 0:_.url)??S,alt:c,width:90,height:120,loading:"lazy"};return i(H,{slotTag:"span",contentTag:"span","data-testid":`cartSummaryItemImage-${n.id}`,name:"CartSummaryItemImage",slot:l==null?void 0:l.CartSummaryItemImage,context:{data:n,defaultImageProps:s},children:i(B,{...s})})},[S,l==null?void 0:l.CartSummaryItemImage]);if(!e)return i(G,{});let u={};const q=Z==="cancelled",W=(D=(O=e==null?void 0:e.product)==null?void 0:O.stockStatus)==null?void 0:D.includes("IN_STOCK"),a=e==null?void 0:e.giftCard,z=e.totalQuantity>1?{quantity:e.totalQuantity}:{},y=e.discounted,{includeAndExcludeTax:r,includeTax:h,excludeTax:m}=e.taxCalculations,g=e==null?void 0:e.totalQuantity,N={...(e==null?void 0:e.configurableOptions)||{},...(e==null?void 0:e.bundleOptions)||{},...a!=null&&a.senderName?{[x.sender]:a==null?void 0:a.senderName}:{},...a!=null&&a.senderEmail?{[x.sender]:a==null?void 0:a.senderEmail}:{},...a!=null&&a.senderName?{[x.sender]:a==null?void 0:a.senderName}:{},...a!=null&&a.recipientEmail?{[x.recipient]:a==null?void 0:a.recipientEmail}:{},...a!=null&&a.message?{[x.message]:a==null?void 0:a.message}:{},...e!=null&&e.downloadableLinks?{[`${(f=e==null?void 0:e.downloadableLinks)==null?void 0:f.count} ${x.downloadableCount}`]:(L=e==null?void 0:e.downloadableLinks)==null?void 0:L.result}:{}};if(k&&d){const n=t(r.originalPrice.value,r.originalPrice.currency),c=t(r.baseOriginalPrice.value*g,r.baseOriginalPrice.currency,{variant:e.discounted?"strikethrough":"default",weight:"bold"}),s=t(r.baseDiscountedPrice.value*g,r.baseDiscountedPrice.currency,{sale:!0,weight:"bold"}),o=t(r.baseExcludingTax.value*g,r.baseExcludingTax.currency,{weight:"bold"});u={taxExcluded:!0,taxIncluded:void 0,price:n,total:b(v,{children:[c,e.discounted?s:null]}),totalExcludingTax:o}}else if(!k&&d){const n=t(m.originalPrice.value,m.originalPrice.currency),c=t(m.baseOriginalPrice.value*g,m.baseOriginalPrice.currency,{variant:y?"strikethrough":"default",weight:"bold"}),s=t(m.baseDiscountedPrice.value*g,m.baseDiscountedPrice.currency,{sale:!0,weight:"bold"}),o=t(m.baseExcludingTax.value*g,m.baseExcludingTax.currency,{weight:"bold"});u={taxExcluded:void 0,taxIncluded:void 0,price:n,total:b(v,{children:[c,y?s:null]}),totalExcludingTax:o}}else if(k&&!d){const n=t(h.singleItemPrice.value,h.singleItemPrice.currency),c=t(h.baseOriginalPrice.value*g,h.baseOriginalPrice.currency,{variant:y?"strikethrough":"default",weight:"bold"}),s=t(h.baseDiscountedPrice.value*g,h.baseDiscountedPrice.currency,{sale:!0,weight:"bold"});u={taxExcluded:void 0,taxIncluded:!0,price:n,total:b(v,{children:[c,y?s:null]})}}return i(K,{loading:M,alert:q&&!W?b("span",{children:[i(R,{source:J}),x.outOfStock]}):i(v,{}),configurations:(E==null?void 0:E(N))??N,title:I?i("a",{"data-testid":"product-name",className:"cart-summary-item__title",href:I(e),children:e==null?void 0:e.productName}):i("div",{"data-testid":"product-name",className:"cart-summary-item__title",children:e==null?void 0:e.productName}),sku:i("div",{children:(V=e==null?void 0:e.product)==null?void 0:V.sku}),...z,image:I?i("a",{href:I(e),children:T(e)}):T(e),...u,footer:b(v,{children:[P&&!j?i(Q,{value:1,min:1,max:e==null?void 0:e.totalQuantity,onValue:n=>P==null?void 0:P(Number(n)),name:"quantity","data-testid":"returnIncrementer",readonly:!0}):void 0,i(H,{"data-testid":"Footer",name:"Footer",slot:l==null?void 0:l.Footer,context:{item:e}})]})})};export{ee as C,J as S};
4
4
  //# sourceMappingURL=CartSummaryItem.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{jsxs as g,jsx as r}from"@dropins/tools/preact-jsx-runtime.js";import{InLineAlert as v,Picker as x,Button as F}from"@dropins/tools/components.js";import{F as S}from"./ShippingStatusCard.js";import"@dropins/tools/lib.js";import{useState as n}from"@dropins/tools/preact-hooks.js";import"@dropins/tools/preact-compat.js";import"@dropins/tools/preact.js";import{events as d}from"@dropins/tools/event-bus.js";import{r as E,c as _}from"./requestGuestOrderCancel.js";import{useText as D,Text as l}from"@dropins/tools/i18n.js";const k=({orderRef:a,pickerProps:m,submitButtonProps:u,cancelReasons:t})=>{const o=D({ErrorHeading:"Order.OrderCancelForm.errorHeading",ErrorDescription:"Order.OrderCancelForm.errorDescription",orderCancellationLabel:"Order.OrderCancelForm.label"}),[i,p]=n(0),[f,O]=n(!1),[b,h]=n(!1);d.on("authenticated",e=>{e&&h(!0)},{eager:!0});const C=e=>{e.preventDefault();const s=Number(e.target.value);p(s)};return g(S,{onSubmit:async e=>(e.preventDefault(),(a.length>20?E:_)(a,t[i].text,c=>{b||(c.status="guest order cancellation requested"),d.emit("order/data",c)},()=>{O(!0)})),"data-testid":"order-order-cancel-reasons-form__text",children:[f&&r(v,{heading:o.ErrorHeading,description:o.ErrorDescription}),r("div",{className:"order-order-cancel-reasons-form__text",children:r(l,{id:"Order.OrderCancelForm.description"})}),r(x,{name:"cancellationReasons",floatingLabel:o.orderCancellationLabel,defaultOption:t[0],variant:"primary",options:t,value:String(i),handleSelect:C,required:!0,"data-testid":"order-cancellation-reasons-selector",...m}),r("div",{className:"order-order-cancel-reasons-form__button-container",children:r(F,{variant:"primary","data-testid":"order-cancel-submit-button",...u,children:r(l,{id:"Order.OrderCancelForm.button"})})})]})};export{k as O};
4
4
  //# sourceMappingURL=OrderCancelForm.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{jsxs as a,jsx as e}from"@dropins/tools/preact-jsx-runtime.js";import"./ShippingStatusCard.js";import{Card as d,Skeleton as i,SkeletonRow as r,CartItemSkeleton as t}from"@dropins/tools/components.js";import{classes as m}from"@dropins/tools/lib.js";const z=({testId:s,withCard:n=!0})=>{const l=a(i,{"data-testid":s??"skeletonLoader",children:[e(r,{variant:"heading",size:"xlarge",fullWidth:!1,lines:1}),e(r,{variant:"heading",size:"xlarge",fullWidth:!0,lines:1}),e(r,{variant:"heading",size:"xlarge",fullWidth:!0,lines:1})]});return n?l:e(d,{variant:"secondary",className:m(["order-order-loaders","order-order-loaders--card-loader"]),children:l})},v=s=>e(d,{variant:"secondary",...s,children:a(i,{"data-testid":"order-details-skeleton",children:[e(r,{variant:"heading",size:"medium",fullWidth:!0}),e(r,{size:"medium"}),e(r,{variant:"empty",size:"medium"}),e(r,{size:"xlarge"}),e(r,{size:"xlarge"}),e(r,{size:"xlarge"}),e(r,{size:"xlarge"})]})}),g=()=>a(i,{"data-testid":"order-product-list-skeleton",style:{gridTemplateColumns:"1fr"},children:[e(r,{variant:"heading",fullWidth:!0,size:"medium"}),e(t,{}),e(t,{}),e(t,{}),e(t,{}),e(t,{})]}),p=()=>a(i,{"data-testid":"order-cost-summary-content-skeleton",className:"order-cost-summary-content",children:[e(r,{variant:"heading",size:"small"}),e(r,{variant:"empty",size:"small"}),e(r,{variant:"empty",size:"small"}),e(r,{variant:"empty",size:"small"}),e(r,{variant:"heading",size:"small",fullWidth:!0,lines:3})]}),f=()=>a(i,{"data-testid":"order-header-skeleton",className:"order-header",children:[e(r,{variant:"empty",size:"xlarge",fullWidth:!0}),e(r,{variant:"empty",size:"medium"}),e(r,{variant:"empty",size:"medium"}),e(r,{variant:"empty",size:"medium"}),e(r,{variant:"empty",size:"medium"}),e(r,{variant:"empty",size:"medium"}),e(r,{size:"small",fullWidth:!0}),e(r,{variant:"heading",size:"xsmall",fullWidth:!0})]});export{z as C,v as D,p as O,g as a,f as b};
4
4
  //# sourceMappingURL=OrderLoaders.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{jsx as r,jsxs as c,Fragment as N}from"@dropins/tools/preact-jsx-runtime.js";import{useMemo as V}from"@dropins/tools/preact-hooks.js";import{classes as K,Slot as S}from"@dropins/tools/lib.js";import{IllustratedMessage as n1,Icon as A,Card as O,ContentGrid as t1,Image as a1,Header as Q,Pagination as c1}from"@dropins/tools/components.js";import*as l from"@dropins/tools/preact-compat.js";import{useMemo as L1}from"@dropins/tools/preact-compat.js";import"./ShippingStatusCard.js";import{f as U}from"./returnOrdersHelper.js";import"@dropins/tools/preact.js";import"@dropins/tools/event-bus.js";import{C as I}from"./OrderLoaders.js";import{c as s1}from"./capitalizeFirst.js";import{Text as J}from"@dropins/tools/i18n.js";const W=L=>l.createElement("svg",{id:"Icon_Chevron_right_Base","data-name":"Icon \\u2013 Chevron right \\u2013 Base",xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",...L},l.createElement("g",{id:"Large"},l.createElement("rect",{id:"Placement_area","data-name":"Placement area",width:24,height:24,fill:"#fff",opacity:0}),l.createElement("g",{id:"Chevron_right_icon","data-name":"Chevron right icon"},l.createElement("path",{vectorEffect:"non-scaling-stroke",id:"chevron",d:"M199.75,367.5l4.255,-4.255-4.255,-4.255",transform:"translate(-189.25 -351.0)",fill:"none",stroke:"currentColor"})))),i1=L=>l.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...L},l.createElement("path",{d:"M12.002 21L11.8275 21.4686C11.981 21.5257 12.1528 21.5041 12.2873 21.4106C12.4218 21.3172 12.502 21.1638 12.502 21H12.002ZM3.89502 17.9823H3.39502C3.39502 18.1912 3.52485 18.378 3.72059 18.4509L3.89502 17.9823ZM3.89502 8.06421L4.07193 7.59655C3.91831 7.53844 3.74595 7.55948 3.61082 7.65284C3.47568 7.74619 3.39502 7.89997 3.39502 8.06421H3.89502ZM12.0007 21H11.5007C11.5007 21.1638 11.5809 21.3172 11.7154 21.4106C11.8499 21.5041 12.0216 21.5257 12.1751 21.4686L12.0007 21ZM20.1076 17.9823L20.282 18.4509C20.4778 18.378 20.6076 18.1912 20.6076 17.9823H20.1076ZM20.1076 8.06421H20.6076C20.6076 7.89997 20.527 7.74619 20.3918 7.65284C20.2567 7.55948 20.0843 7.53844 19.9307 7.59655L20.1076 8.06421ZM12.0007 11.1311L11.8238 10.6634C11.6293 10.737 11.5007 10.9232 11.5007 11.1311H12.0007ZM20.2858 8.53191C20.5441 8.43421 20.6743 8.14562 20.5766 7.88734C20.4789 7.62906 20.1903 7.49889 19.932 7.5966L20.2858 8.53191ZM12.002 4.94826L12.1775 4.48008C12.0605 4.43623 11.9314 4.43775 11.8154 4.48436L12.002 4.94826ZM5.87955 6.87106C5.62334 6.97407 5.49915 7.26528 5.60217 7.52149C5.70518 7.77769 5.99639 7.90188 6.2526 7.79887L5.87955 6.87106ZM18.1932 7.80315C18.4518 7.90008 18.74 7.76904 18.8369 7.51047C18.9338 7.2519 18.8028 6.96371 18.5442 6.86678L18.1932 7.80315ZM12 4.94827L11.5879 5.23148C11.6812 5.36719 11.8353 5.44827 12 5.44827C12.1647 5.44827 12.3188 5.36719 12.4121 5.23148L12 4.94827ZM14.0263 2L14.2028 1.53218C13.9875 1.45097 13.7446 1.52717 13.6143 1.71679L14.0263 2ZM21.8421 4.94827L22.2673 5.2113C22.3459 5.08422 22.3636 4.92863 22.3154 4.78717C22.2673 4.64571 22.1584 4.53319 22.0186 4.48045L21.8421 4.94827ZM9.97368 2L10.3857 1.71679C10.2554 1.52717 10.0125 1.45097 9.79721 1.53218L9.97368 2ZM2.15789 4.94827L1.98142 4.48045C1.84161 4.53319 1.73271 4.64571 1.68456 4.78717C1.63641 4.92863 1.65406 5.08422 1.73267 5.2113L2.15789 4.94827ZM12 11.1256L11.6702 11.5014C11.8589 11.667 12.1411 11.667 12.3298 11.5014L12 11.1256ZM15.0395 8.45812L14.8732 7.98659C14.8131 8.00779 14.7576 8.04028 14.7097 8.08232L15.0395 8.45812ZM23 5.65024L23.3288 6.0269C23.5095 5.86916 23.5527 5.60532 23.4318 5.39817C23.3109 5.19102 23.0599 5.09893 22.8337 5.17871L23 5.65024ZM8.96053 8.45812L9.29034 8.08232C9.24244 8.04028 9.18695 8.00779 9.12685 7.98659L8.96053 8.45812ZM1 5.65024L1.16632 5.17871C0.940115 5.09893 0.689119 5.19102 0.568192 5.39817C0.447264 5.60532 0.49048 5.86916 0.671176 6.0269L1 5.65024ZM12.1764 20.5314L4.06945 17.5137L3.72059 18.4509L11.8275 21.4686L12.1764 20.5314ZM4.39502 17.9823V8.06421H3.39502V17.9823H4.39502ZM3.71811 8.53187L11.8251 11.5987L12.1789 10.6634L4.07193 7.59655L3.71811 8.53187ZM11.502 11.1311V21H12.502V11.1311H11.502ZM12.1751 21.4686L20.282 18.4509L19.9332 17.5137L11.8262 20.5314L12.1751 21.4686ZM20.6076 17.9823V8.06421H19.6076V17.9823H20.6076ZM19.9307 7.59655L11.8238 10.6634L12.1776 11.5987L20.2845 8.53187L19.9307 7.59655ZM11.5007 11.1311V21H12.5007V11.1311H11.5007ZM19.932 7.5966L11.8251 10.6634L12.1789 11.5987L20.2858 8.53191L19.932 7.5966ZM11.8154 4.48436L5.87955 6.87106L6.2526 7.79887L12.1885 5.41217L11.8154 4.48436ZM11.8265 5.41645L18.1932 7.80315L18.5442 6.86678L12.1775 4.48008L11.8265 5.41645ZM11.502 4.94826V11.1311H12.502V4.94826H11.502ZM12.4121 5.23148L14.4384 2.28321L13.6143 1.71679L11.5879 4.66507L12.4121 5.23148ZM13.8498 2.46782L21.6656 5.4161L22.0186 4.48045L14.2028 1.53218L13.8498 2.46782ZM21.4169 4.68525L20.5485 6.08919L21.3989 6.61524L22.2673 5.2113L21.4169 4.68525ZM12.4121 4.66507L10.3857 1.71679L9.56162 2.28321L11.5879 5.23148L12.4121 4.66507ZM9.79721 1.53218L1.98142 4.48045L2.33437 5.4161L10.1502 2.46782L9.79721 1.53218ZM1.73267 5.2113L2.60109 6.61524L3.45154 6.08919L2.58312 4.68525L1.73267 5.2113ZM12.3298 11.5014L15.3693 8.83392L14.7097 8.08232L11.6702 10.7498L12.3298 11.5014ZM15.2058 8.92965L23.1663 6.12177L22.8337 5.17871L14.8732 7.98659L15.2058 8.92965ZM22.6712 5.27358L19.7764 7.80067L20.4341 8.554L23.3288 6.0269L22.6712 5.27358ZM12.3298 10.7498L9.29034 8.08232L8.63072 8.83392L11.6702 11.5014L12.3298 10.7498ZM9.12685 7.98659L1.16632 5.17871L0.83368 6.12177L8.79421 8.92965L9.12685 7.98659ZM0.671176 6.0269L3.56591 8.554L4.22356 7.80067L1.32882 5.27358L0.671176 6.0269Z",fill:"currentColor"})),X=({typeList:L,isEmpty:C,minifiedView:f,message:M})=>{const n=L1(()=>{switch(L){case"orders":return{icon:i1,text:r("p",{children:M}),className:"order-empty-list--empty-box"};default:return{icon:"",text:"",className:""}}},[L,M]);return!C||!L||!n.text?null:r(n1,{className:K(["order-empty-list",n.className,f?"order-empty-list--minified":""]),message:n.text,icon:r(A,{source:n.icon}),"data-testid":"emptyList"})},Y={size:"32",stroke:"2"},f1=({placeholderImage:L,minifiedViewKey:C,withReturnNumber:f=!1,withOrderNumber:M=!1,slots:n,pageInfo:s,withReturnsListButton:B=!0,isMobile:$=!1,returnsInMinifiedView:R=1,translations:a={},orderReturns:i=[],minifiedView:o=!1,withHeader:v=!0,withThumbnails:k=!0,selectedPage:z=1,handleSetSelectPage:F,routeReturnDetails:d,routeOrderDetails:b,routeTracking:x,routeReturnsList:y,routeProductDetails:m,loading:H})=>{const j=o?R:i.length,G=m!=null&&m()?"a":"span",E=V(()=>i.slice(0,j).map((e,e1)=>{var P,T;const w=((e==null?void 0:e.items)??[]).reduce((t,u)=>(u.requestQuantity??0)+t,0);return r(O,{variant:"secondary",className:"order-returns-list-content__cards-list",children:c("div",{className:"order-returns-list-content__cards-grid",children:[c("div",{className:"order-returns-list-content__descriptions",children:[r("p",{className:"order-returns-list-content__return-status",children:U(e.returnStatus)?r(J,{id:`Order.Returns.${C}.returnsList.returnStatus.${U(e.returnStatus)}`}):r("span",{children:s1(e.returnStatus)})}),f?c("p",{children:[a.returnNumber," ",r("a",{href:(d==null?void 0:d({returnNumber:e.returnNumber,orderNumber:e.orderNumber,token:e.token}))??"#",rel:"noreferrer",children:e.returnNumber})]}):null,M?c("p",{children:[a.orderNumber," ",r("a",{href:(b==null?void 0:b({orderNumber:e.orderNumber,token:e.token}))??"#",rel:"noreferrer",children:e.orderNumber})]}):null,(P=e==null?void 0:e.tracking)==null?void 0:P.map((t,u)=>{var _,g;const h={title:"",number:(t==null?void 0:t.trackingNumber)??"",carrier:((_=t==null?void 0:t.carrier)==null?void 0:_.label)??""},Z=x==null?void 0:x(h),p=`${h.number}_${u}`;return c("p",{children:[`${a.carrier} `,`${(g=h.carrier)==null?void 0:g.toLocaleUpperCase()} | `,Z?r("a",{href:Z,target:"_blank",rel:"noreferrer","data-testid":`${p}_link`,children:t.trackingNumber}):r("span",{"data-testid":`${p}_span`,children:t.trackingNumber})]},p)}),n!=null&&n.ReturnItemsDetails?r(S,{"data-testid":"returnItemsDetails",name:"ReturnItemsDetails",slot:n==null?void 0:n.ReturnItemsDetails,context:{items:e.items}}):null,!(n!=null&&n.ReturnItemsDetails)&&e.items.length?c("p",{children:[w," ",r(J,{id:`Order.Returns.${C}.returnsList.itemText`,plural:w,fields:{count:w}})]}):null]}),k?r(t1,{maxColumns:$?3:9,emptyGridContent:r(N,{}),className:K(["order-returns-list-content__images",["order-returns-list-content__images-3",$]]),children:(T=e==null?void 0:e.items)==null?void 0:T.map((t,u)=>{var g,q;const h=`key_${u}_${t.uid}`,Z=((g=t==null?void 0:t.product)==null?void 0:g.name)??"",p=((q=t==null?void 0:t.thumbnail)==null?void 0:q.url)??L??"",_={title:Z,src:p,alt:Z,width:85,height:114,loading:"eager"};return r(G,{"data-testid":h,href:(m==null?void 0:m(t))??"#",children:r(S,{slotTag:"span",contentTag:"span",name:"ReturnListImage",slot:n==null?void 0:n.ReturnListImage,context:{data:t,defaultImageProps:_},children:r(a1,{..._})})},h)})}):null,n!=null&&n.DetailsActionParams?r(S,{className:"order-returns-list-content__actions","data-testid":"detailsActionParams",name:"DetailsActionParams",slot:n==null?void 0:n.DetailsActionParams,context:{returnOrderItem:e}}):r("a",{href:(d==null?void 0:d({returnNumber:e.returnNumber,token:e.token,orderNumber:e.orderNumber}))??"#",className:"order-returns-list-content__actions",children:r(A,{source:W,...Y})})]})},e1)}),[i,j,C,f,a,M,n,k,$,L,G,x,m,d,b]),D=V(()=>c(N,{children:[v?r(Q,{title:a.minifiedViewTitle,divider:!1,className:"order-returns__header--minified"}):null,H?r(I,{withCard:!1}):c(N,{children:[E,r(X,{minifiedView:o,typeList:"orders",isEmpty:!i.length,message:a.emptyOrdersListMessage}),B?r("a",{className:"order-returns-list-content__actions",href:(y==null?void 0:y())??"#",children:r(O,{variant:"secondary",className:"order-returns-list-content__card",children:c("div",{className:"order-returns-list-content__card-wrapper",children:[r("p",{children:a.viewAllOrdersButton}),r(A,{source:W,...Y})]})})}):null]})]}),[y,B,v,a,E,o,i.length,H]),r1=V(()=>c(N,{children:[v?r(Q,{title:a.minifiedViewTitle,divider:!0,className:"order-returns__header--full-size"}):null,H?r(I,{withCard:!1}):c(N,{children:[r(X,{minifiedView:o,typeList:"orders",isEmpty:!i.length,message:a.emptyOrdersListMessage}),E,(s==null?void 0:s.totalPages)>1?r(c1,{totalPages:s==null?void 0:s.totalPages,currentPage:z,onChange:F}):null]})]}),[E,o,i,a,s==null?void 0:s.totalPages,z,F,H,v]);return r("div",{className:"order-returns-list-content",children:o?D:r1})};export{f1 as R};
4
4
  //# sourceMappingURL=ReturnsListContent.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{jsx as h,Fragment as v,jsxs as M}from"@dropins/tools/preact-jsx-runtime.js";import{useRef as _,useState as D,useEffect as w,useCallback as T}from"@dropins/tools/preact-hooks.js";import{useText as y}from"@dropins/tools/i18n.js";import*as C from"@dropins/tools/preact-compat.js";import{memo as V,useCallback as L}from"@dropins/tools/preact-compat.js";import{classes as k}from"@dropins/tools/lib.js";import{Field as q,Picker as A,Input as I,InputDate as R,Checkbox as O,TextArea as N}from"@dropins/tools/components.js";const j=l=>C.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...l},C.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M11.8052 14.4968C10.8552 14.4968 9.9752 14.0268 9.4452 13.2368L9.4152 13.1868L9.3852 13.1268C8.1352 11.2268 7.5352 8.96681 7.6852 6.68681C7.7552 4.42681 9.6052 2.61681 11.8652 2.60681H12.0052C14.2752 2.47681 16.2152 4.21681 16.3452 6.47681C16.3452 6.55681 16.3452 6.62681 16.3452 6.70681C16.4852 8.94681 15.9052 11.1768 14.6852 13.0568L14.6052 13.1768C14.0552 13.9868 13.1352 14.4668 12.1652 14.4768H12.0052C11.9352 14.4768 11.8652 14.4868 11.7952 14.4868L11.8052 14.4968Z",stroke:"currentColor"}),C.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M4.3252 21.5469C4.3552 20.4169 4.4752 19.2869 4.6752 18.1769C4.8952 17.1669 6.4752 16.0269 8.9052 15.1569C9.2352 15.0369 9.4852 14.7869 9.5952 14.4569L9.8052 14.0269",stroke:"currentColor"}),C.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M14.425 14.4069L14.165 14.1569C14.375 14.5969 14.725 14.9569 15.155 15.1869C16.945 15.7969 19.125 16.9569 19.375 18.2069C19.585 19.3069 19.685 20.4269 19.675 21.5369",stroke:"currentColor"})),H=l=>l.reduce((u,{code:i,required:$,defaultValue:s})=>($&&(u[i]=s),u),{}),S=({fieldsConfig:l,onSubmit:u})=>{const{requiredFieldError:i}=y({requiredFieldError:"Order.Form.notifications.requiredFieldError"}),$=_(null),[s,n]=D({}),[o,t]=D({});w(()=>{if(n({}),!l||!l.length)return;const c=H(l);n(c)},[l==null?void 0:l.length]),w(()=>()=>{var c;n({}),(c=$.current)==null||c.reset()},[]);const p=T((c,e)=>{const r=l.find(d=>d.code===c);return r!=null&&r.required&&!e?i:""},[l,i]),b=T(c=>{const{name:e,value:r,type:a,checked:d}=c==null?void 0:c.target,f=a==="checkbox"?d:r;n(E=>({...E,[e]:f}))},[]),x=T(c=>{const{name:e,value:r,type:a,checked:d}=c==null?void 0:c.target,f=a==="checkbox"?d:r;t(E=>({...E,[e]:p(e,f)}))},[p]),F=T(c=>{c.preventDefault();let e=!0,r={},a=null;for(const[d,f]of Object.entries(s)){const E=p(d,f);E&&(r[d]=E,e=!1,a||(a=d))}if(t(r),a&&$.current){const d=$.current.elements.namedItem(a);d==null||d.focus()}u==null||u(c,e)},[s,p,u]);return{formData:s,errors:o,formRef:$,handleChange:b,handleBlur:x,handleSubmit:F}},U=V(({loading:l,values:u,fields:i=[],errors:$,className:s="",onChange:n,onBlur:o})=>{const t=`${s}__item`,p=L((e,r,a)=>{const d=e.options.map(f=>({text:f.label,value:f.value}));return h(q,{error:a,className:k([t,`${t}--${e.id}`,[`${t}--${e.id}-hidden`,e.is_hidden],e.className]),"data-testid":`${s}--${e.id}`,disabled:l,children:h(A,{name:e.id,floatingLabel:`${e.label} ${e.required?"*":""}`,placeholder:e.label,"aria-label":e.label,options:d,onBlur:o,handleSelect:n,value:r||e.defaultValue})},e.id)},[s,l,t,o,n]),b=L((e,r,a)=>{const d=e.id==="email",f=d?h(j,{}):void 0,E=d?"username":"";return h(q,{error:a,className:k([t,`${t}--${e.id}`,[`${t}--${e.id}-hidden`,e==null?void 0:e.is_hidden],e.className]),"data-testid":`${s}--${e.id}`,disabled:l,children:h(I,{"aria-label":e.label,"aria-required":e.required,autoComplete:E,icon:f,type:"text",name:e.id,value:r||e.defaultValue,placeholder:e.label,floatingLabel:`${e.label} ${e.required?"*":""}`,onBlur:o,onChange:n})},e.id)},[s,l,t,o,n]),x=L((e,r,a)=>h(q,{error:a,className:k([t,`${t}--${e.id}`,[`${t}--${e.id}-hidden`,e.is_hidden],e.className]),"data-testid":`${s}--${e.id}`,disabled:l,children:h(R,{type:"text",name:e.id,value:r||e.defaultValue,placeholder:e.label,floatingLabel:`${e.label} ${e.required?"*":""}`,onBlur:o,onChange:n})},e.id),[s,l,t,o,n]),F=L((e,r,a)=>h(q,{error:a,className:k([t,`${t}--${e.id}`,[`${t}--${e.id}-hidden`,e.is_hidden],e.className]),"data-testid":`${s}--${e.id}`,disabled:l,children:h(O,{name:e.id,checked:r||e.defaultValue,placeholder:e.label,label:`${e.label} ${e.required?"*":""}`,onBlur:o,onChange:n})},e.id),[s,l,t,o,n]),c=L((e,r,a)=>h(q,{error:a,className:k([t,`${t}--${e.id}`,[`${t}--${e.id}-hidden`,e.is_hidden],e.className]),"data-testid":`${s}--${e.id}`,disabled:l,children:h(N,{type:"text",name:e.id,value:r===void 0?e.defaultValue:r,label:`${e.label} ${e.required?"*":""}`,onBlur:o,onChange:n})},e.id),[s,l,t,o,n]);return i.length?h(v,{children:i.map(e=>{var d;const r=($==null?void 0:$[e.id])??"",a=(u==null?void 0:u[e.id])??"";switch(e.fieldType){case"TEXT":return(d=e==null?void 0:e.options)!=null&&d.length?p(e,a,r):b(e,a,r);case"MULTILINE":return b(e,a,r);case"SELECT":return p(e,a,r);case"DATE":return x(e,a,r);case"BOOLEAN":return F(e,a,r);case"TEXTAREA":return c(e,a,r);default:return null}})}):null}),K=V(({name:l,loading:u,children:i,className:$="defaultForm",fieldsConfig:s,onSubmit:n})=>{const{formData:o,errors:t,formRef:p,handleChange:b,handleBlur:x,handleSubmit:F}=S({fieldsConfig:s,onSubmit:n});return M("form",{className:k(["order-form",$]),onSubmit:F,name:l,ref:p,children:[h(U,{className:$,loading:u,fields:s,onChange:b,onBlur:x,errors:t,values:o}),i]})});export{K as F,U as a,S as u};
4
4
  //# sourceMappingURL=ShippingStatusCard.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  const a=e=>e&&e.charAt(0).toLocaleUpperCase()+e.slice(1).toLocaleLowerCase();export{a as c};
4
4
  //# sourceMappingURL=capitalizeFirst.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{h as f}from"./network-error.js";import{f as u,h as _}from"./fetch-graphql.js";import{REQUEST_RETURN_ORDER_FRAGMENT as I,GUEST_ORDER_FRAGMENT as O}from"../fragments.js";import{a}from"./initialize.js";import{events as T}from"@dropins/tools/event-bus.js";const N=`
4
4
  mutation REORDER_ITEMS_MUTATION($orderNumber: String!) {
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{FetchGraphQL as s}from"@dropins/tools/fetch-graphql.js";const h=e=>{const r=e.map(a=>a.message).join(" ");throw Error(r)},{setEndpoint:o,setFetchGraphQlHeader:c,removeFetchGraphQlHeader:n,setFetchGraphQlHeaders:p,fetchGraphQl:d,getConfig:g}=new s().getMethods();export{o as a,p as b,d as f,g,h,n as r,c as s};
4
4
  //# sourceMappingURL=fetch-graphql.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  const m=(e,a="en-US",o={})=>{const n={...{day:"2-digit",month:"2-digit",year:"numeric"},...o},t=new Date(e);return isNaN(t.getTime())?"Invalid Date":new Intl.DateTimeFormat(a,n).format(t)};export{m as f};
4
4
  //# sourceMappingURL=formatDateToLocale.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{h as i}from"./network-error.js";import{f as u,h as s}from"./fetch-graphql.js";import{t as m}from"./transform-attributes-form.js";const n=`
4
4
  query GET_ATTRIBUTES_FORM($formCode: String!) {
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{h as E}from"./network-error.js";import{RETURNS_FRAGMENT as a,PRODUCT_DETAILS_FRAGMENT as T,PRICE_DETAILS_FRAGMENT as _,GIFT_CARD_DETAILS_FRAGMENT as o,ORDER_ITEM_DETAILS_FRAGMENT as c,GIFT_MESSAGE_FRAGMENT as G,GIFT_WRAPPING_FRAGMENT as n}from"../fragments.js";import{t as u}from"./initialize.js";import{f as A}from"./fetch-graphql.js";const S=`
4
4
  query GET_CUSTOMER_ORDERS_RETURN($currentPage: Int, $pageSize: Int) {
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  var r=(E=>(E.BOOLEAN="BOOLEAN",E.DATE="DATE",E.DATETIME="DATETIME",E.DROPDOWN="DROPDOWN",E.FILE="FILE",E.GALLERY="GALLERY",E.HIDDEN="HIDDEN",E.IMAGE="IMAGE",E.MEDIA_IMAGE="MEDIA_IMAGE",E.MULTILINE="MULTILINE",E.MULTISELECT="MULTISELECT",E.PRICE="PRICE",E.SELECT="SELECT",E.TEXT="TEXT",E.TEXTAREA="TEXTAREA",E.UNDEFINED="UNDEFINED",E.VISUAL="VISUAL",E.WEIGHT="WEIGHT",E.EMPTY="",E))(r||{});const D=E=>{if(!E)return null;const T=new FormData(E);if(E.querySelectorAll('input[type="checkbox"]').forEach(I=>{T.has(I.name)||T.set(I.name,"false"),I.checked&&T.set(I.name,"true")}),T&&typeof T.entries=="function"){const I=T.entries();if(I&&typeof I[Symbol.iterator]=="function")return JSON.parse(JSON.stringify(Object.fromEntries(I)))||{}}return{}};export{r as F,D as g};
4
4
  //# sourceMappingURL=getFormValues.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{h as i}from"./network-error.js";import{f as h,h as o}from"./fetch-graphql.js";import{GUEST_ORDER_FRAGMENT as E}from"../fragments.js";import{b as n}from"./initialize.js";const G=t=>{var r,a,m,c,e,u;return{email:((a=(r=t==null?void 0:t.data)==null?void 0:r.customer)==null?void 0:a.email)||"",firstname:((c=(m=t==null?void 0:t.data)==null?void 0:m.customer)==null?void 0:c.firstname)||"",lastname:((u=(e=t==null?void 0:t.data)==null?void 0:e.customer)==null?void 0:u.lastname)||""}},f=`
4
4
  query GET_CUSTOMER {
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  const t=r=>{try{return new URL(window.location.href).searchParams.get(r)??""}catch{return""}};export{t as g};
4
4
  //# sourceMappingURL=getQueryParam.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{f as s,h as i}from"./fetch-graphql.js";function _(e){return e?{baseMediaUrl:e.base_media_url,orderCancellationEnabled:e.order_cancellation_enabled,orderCancellationReasons:e.order_cancellation_reasons,shoppingOrderDisplayPrice:e.orders_invoices_credit_memos_display_price,shoppingOrdersDisplaySubtotal:e.orders_invoices_credit_memos_display_subtotal,shoppingOrdersDisplayShipping:e.orders_invoices_credit_memos_display_shipping_amount,shoppingOrdersDisplayGrandTotal:e.orders_invoices_credit_memos_display_grandtotal,shoppingOrdersDisplayFullSummary:e.orders_invoices_credit_memos_display_full_summary,shoppingOrdersDisplayZeroTax:e.orders_invoices_credit_memos_display_zero_tax,salesPrintedCard:+e.sales_printed_card,salesGiftWrapping:+e.sales_gift_wrapping}:null}const o=`
4
4
  query STORE_CONFIG_QUERY {
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{merge as X,Initializer as yn}from"@dropins/tools/lib.js";import{events as $}from"@dropins/tools/event-bus.js";import{h as H}from"./network-error.js";import{PRODUCT_DETAILS_FRAGMENT as J,PRICE_DETAILS_FRAGMENT as Z,GIFT_CARD_DETAILS_FRAGMENT as m,ORDER_ITEM_DETAILS_FRAGMENT as D,BUNDLE_ORDER_ITEM_DETAILS_FRAGMENT as r,ORDER_SUMMARY_FRAGMENT as o,ADDRESS_FRAGMENT as I,RETURNS_FRAGMENT as d,ORDER_ITEM_FRAGMENT as nn,GIFT_WRAPPING_FRAGMENT as un,GIFT_MESSAGE_FRAGMENT as cn,APPLIED_GIFT_CARDS_FRAGMENT as _n}from"../fragments.js";import{f as ln,h as tn}from"./fetch-graphql.js";const en=n=>n||0,Rn=n=>{var i,u,c,_,l,p,g,y,e;return{__typename:(n==null?void 0:n.__typename)||"",uid:(n==null?void 0:n.uid)||"",onlyXLeftInStock:(n==null?void 0:n.only_x_left_in_stock)??0,stockStatus:(n==null?void 0:n.stock_status)??"",priceRange:{maximumPrice:{regularPrice:{currency:((c=(u=(i=n==null?void 0:n.price_range)==null?void 0:i.maximum_price)==null?void 0:u.regular_price)==null?void 0:c.currency)??"",value:((p=(l=(_=n==null?void 0:n.price_range)==null?void 0:_.maximum_price)==null?void 0:l.regular_price)==null?void 0:p.value)??0}}},canonicalUrl:(n==null?void 0:n.canonical_url)??"",urlKey:(n==null?void 0:n.url_key)||"",id:(n==null?void 0:n.uid)??"",name:(n==null?void 0:n.name)||"",sku:(n==null?void 0:n.sku)||"",image:((g=n==null?void 0:n.image)==null?void 0:g.url)||"",productType:(n==null?void 0:n.__typename)||"",thumbnail:{label:((y=n==null?void 0:n.thumbnail)==null?void 0:y.label)||"",url:((e=n==null?void 0:n.thumbnail)==null?void 0:e.url)||""}}},fn=n=>{if(!n||!("selected_options"in n))return;const i={};for(const u of n.selected_options)i[u.label]=u.value;return i},an=n=>{const i=n==null?void 0:n.map(c=>({uid:c.uid,label:c.label,values:c.values.map(_=>_.product_name).join(", ")})),u={};return i==null||i.forEach(c=>{u[c.label]=c.values}),Object.keys(u).length>0?u:null},En=n=>(n==null?void 0:n.length)>0?{count:n.length,result:n.map(i=>i.title).join(", ")}:null,Tn=n=>({quantityCanceled:(n==null?void 0:n.quantity_canceled)??0,quantityInvoiced:(n==null?void 0:n.quantity_invoiced)??0,quantityOrdered:(n==null?void 0:n.quantity_ordered)??0,quantityRefunded:(n==null?void 0:n.quantity_refunded)??0,quantityReturned:(n==null?void 0:n.quantity_returned)??0,quantityShipped:(n==null?void 0:n.quantity_shipped)??0,quantityReturnRequested:(n==null?void 0:n.quantity_return_requested)??0}),bn=n=>({firstName:(n==null?void 0:n.firstname)??"",lastName:(n==null?void 0:n.lastname)??"",middleName:(n==null?void 0:n.middlename)??""}),j=n=>{const{firstName:i,lastName:u,middleName:c}=bn(n);return{firstName:i,lastName:u,middleName:c,city:(n==null?void 0:n.city)??"",company:(n==null?void 0:n.company)??"",country:(n==null?void 0:n.country)??"",countryCode:(n==null?void 0:n.country_code)??"",fax:(n==null?void 0:n.fax)??"",postCode:(n==null?void 0:n.postcode)??"",prefix:(n==null?void 0:n.prefix)??"",region:(n==null?void 0:n.region)??"",regionId:(n==null?void 0:n.region_id)??"",street:(n==null?void 0:n.street)??[],suffix:(n==null?void 0:n.suffix)??"",telephone:(n==null?void 0:n.telephone)??"",vatId:(n==null?void 0:n.vat_id)??"",customAttributes:(n==null?void 0:n.custom_attributes)??[]}},hn=n=>{const i={value:0,currency:"USD"};return{grandTotal:(n==null?void 0:n.grand_total)??i,grandTotalExclTax:(n==null?void 0:n.grand_total_excl_tax)??i,totalGiftCard:(n==null?void 0:n.total_giftcard)??i,subtotalExclTax:(n==null?void 0:n.subtotal_excl_tax)??i,subtotalInclTax:(n==null?void 0:n.subtotal_incl_tax)??i,taxes:(n==null?void 0:n.taxes)??[],totalTax:(n==null?void 0:n.total_tax)??i,totalShipping:(n==null?void 0:n.total_shipping)??i,discounts:(n==null?void 0:n.discounts)??[]}},K=n=>{const i={value:0,currency:"USD"},u=(n==null?void 0:n.prices)??{};return{price:(u==null?void 0:u.price)??i,priceIncludingTax:(u==null?void 0:u.price_including_tax)??i,originalPrice:(u==null?void 0:u.original_price)??i,originalPriceIncludingTax:(u==null?void 0:u.original_price_including_tax)??i,discounts:(u==null?void 0:u.discounts)??[]}},An=(n,i,u)=>{const c=n==null?void 0:n.price,_=n==null?void 0:n.priceIncludingTax,l=n==null?void 0:n.originalPrice,p=u?l==null?void 0:l.value:_==null?void 0:_.value,g={originalPrice:l,baseOriginalPrice:{value:p,currency:l==null?void 0:l.currency},baseDiscountedPrice:{value:_==null?void 0:_.value,currency:_==null?void 0:_.currency},baseExcludingTax:{value:c==null?void 0:c.value,currency:c==null?void 0:c.currency}},y={originalPrice:l,baseOriginalPrice:{value:l==null?void 0:l.value,currency:_==null?void 0:_.currency},baseDiscountedPrice:{value:i==null?void 0:i.value,currency:c==null?void 0:c.currency},baseExcludingTax:{value:c==null?void 0:c.value,currency:c==null?void 0:c.currency}},e={singleItemPrice:{value:u?l.value:_.value,currency:_.currency},baseOriginalPrice:{value:p,currency:_.currency},baseDiscountedPrice:{value:_.value,currency:_.currency}};return{includeAndExcludeTax:g,excludeTax:y,includeTax:e}},vn=n=>{var i,u,c,_,l;return{senderName:((i=n.gift_card)==null?void 0:i.sender_name)||"",senderEmail:((u=n.gift_card)==null?void 0:u.sender_email)||"",recipientEmail:((c=n.gift_card)==null?void 0:c.recipient_email)||"",recipientName:((_=n.gift_card)==null?void 0:_.recipient_name)||"",message:((l=n.gift_card)==null?void 0:l.message)||""}},Sn=n=>{var i,u,c,_;return{label:((u=(i=n==null?void 0:n.product)==null?void 0:i.thumbnail)==null?void 0:u.label)||"",url:((_=(c=n==null?void 0:n.product)==null?void 0:c.thumbnail)==null?void 0:_.url)||""}};function Nn(n){return{currency:(n==null?void 0:n.currency)??"USD",value:(n==null?void 0:n.value)??0}}function sn(n){var i,u,c;return{senderName:((i=n==null?void 0:n.gift_message)==null?void 0:i.from)??"",recipientName:((u=n==null?void 0:n.gift_message)==null?void 0:u.to)??"",message:((c=n==null?void 0:n.gift_message)==null?void 0:c.message)??""}}function pn(n){var i,u,c,_,l,p,g,y,e,R,s;return{design:((i=n==null?void 0:n.gift_wrapping)==null?void 0:i.design)??"",uid:(u=n==null?void 0:n.gift_wrapping)==null?void 0:u.uid,selected:!!((c=n==null?void 0:n.gift_wrapping)!=null&&c.uid),image:{url:((l=(_=n==null?void 0:n.gift_wrapping)==null?void 0:_.image)==null?void 0:l.url)??"",label:((g=(p=n==null?void 0:n.gift_wrapping)==null?void 0:p.image)==null?void 0:g.label)??""},price:{currency:((e=(y=n==null?void 0:n.gift_wrapping)==null?void 0:y.price)==null?void 0:e.currency)??"USD",value:((s=(R=n==null?void 0:n.gift_wrapping)==null?void 0:R.price)==null?void 0:s.value)??0}}}const gn=n=>{var f,a,E,F,x,S,N,t,b,h,A,O,q,G,v,w,M,C,L;const{quantityCanceled:i,quantityInvoiced:u,quantityOrdered:c,quantityRefunded:_,quantityReturned:l,quantityShipped:p,quantityReturnRequested:g}=Tn(n),y=K(n),e=((f=n==null?void 0:n.prices)==null?void 0:f.original_price.value)*(n==null?void 0:n.quantity_ordered)>((a=n==null?void 0:n.prices)==null?void 0:a.price.value)*(n==null?void 0:n.quantity_ordered),R=en(n==null?void 0:n.quantity_ordered),s={value:((E=n==null?void 0:n.product_sale_price)==null?void 0:E.value)||0,currency:(F=n==null?void 0:n.product_sale_price)==null?void 0:F.currency};return{giftMessage:sn(n),giftWrappingPrice:Nn((x=n==null?void 0:n.product)==null?void 0:x.gift_wrapping_price),productGiftWrapping:[pn(n)],selectedOptions:(n==null?void 0:n.selected_options)??[],productSalePrice:n==null?void 0:n.product_sale_price,status:(n==null?void 0:n.status)??"",type:n==null?void 0:n.__typename,eligibleForReturn:(n==null?void 0:n.eligible_for_return)??!1,productSku:(n==null?void 0:n.product_sku)??"",productName:(n==null?void 0:n.product_name)??"",productUrlKey:(n==null?void 0:n.product_url_key)??"",quantityCanceled:i,quantityInvoiced:u,quantityOrdered:c,quantityRefunded:_,quantityReturned:l,quantityShipped:p,quantityReturnRequested:g,id:n==null?void 0:n.id,discounted:e,total:{value:((S=n==null?void 0:n.product_sale_price)==null?void 0:S.value)*(n==null?void 0:n.quantity_ordered)||0,currency:((N=n==null?void 0:n.product_sale_price)==null?void 0:N.currency)||""},totalInclTax:{value:((t=n==null?void 0:n.product_sale_price)==null?void 0:t.value)*(n==null?void 0:n.quantity_ordered)||0,currency:(b=n==null?void 0:n.product_sale_price)==null?void 0:b.currency},price:s,prices:K(n),itemPrices:y,taxCalculations:An(y,s,e),priceInclTax:{value:((h=n==null?void 0:n.product_sale_price)==null?void 0:h.value)??0,currency:(A=n==null?void 0:n.product_sale_price)==null?void 0:A.currency},totalQuantity:R,regularPrice:{value:(v=(G=(q=(O=n==null?void 0:n.product)==null?void 0:O.price_range)==null?void 0:q.maximum_price)==null?void 0:G.regular_price)==null?void 0:v.value,currency:(L=(C=(M=(w=n==null?void 0:n.product)==null?void 0:w.price_range)==null?void 0:M.maximum_price)==null?void 0:C.regular_price)==null?void 0:L.currency},product:Rn(n==null?void 0:n.product),thumbnail:Sn(n),giftCard:(n==null?void 0:n.__typename)==="GiftCardOrderItem"?vn(n):void 0,configurableOptions:fn(n),bundleOptions:n.__typename==="BundleOrderItem"?an(n.bundle_options):null,downloadableLinks:n.__typename==="DownloadableOrderItem"?En(n==null?void 0:n.downloadable_links):null}},P=n=>n==null?void 0:n.filter(i=>i.__typename).map(i=>gn(i)),Gn=n=>{var i,u,c,_,l;return{token:(n==null?void 0:n.token)??"",email:(n==null?void 0:n.email)??"",status:(n==null?void 0:n.status)??"",number:(n==null?void 0:n.number)??"",id:(n==null?void 0:n.id)??"",carrier:n.carrier??"",coupons:(n==null?void 0:n.applied_coupons)??[],orderDate:(n==null?void 0:n.order_date)??"",isVirtual:(n==null?void 0:n.is_virtual)??!1,availableActions:(n==null?void 0:n.available_actions)??[],orderStatusChangeDate:(n==null?void 0:n.order_status_change_date)??"",shippingMethod:(n==null?void 0:n.shipping_method)??"",giftWrappingOrder:{price:{value:((u=(i=n==null?void 0:n.gift_wrapping)==null?void 0:i.price)==null?void 0:u.value)??0,currency:((_=(c=n==null?void 0:n.gift_wrapping)==null?void 0:c.price)==null?void 0:_.currency)??"USD"},uid:((l=n==null?void 0:n.gift_wrapping)==null?void 0:l.uid)??""}}},Mn=n=>{var u,c,_,l,p,g,y,e,R,s,f,a,E;const i=(u=n==null?void 0:n.total)==null?void 0:u.gift_options;return{giftWrappingForItems:{value:((c=i==null?void 0:i.gift_wrapping_for_items)==null?void 0:c.value)??0,currency:((_=i==null?void 0:i.gift_wrapping_for_items)==null?void 0:_.currency)??"USD"},giftWrappingForItemsInclTax:{value:((l=i==null?void 0:i.gift_wrapping_for_items_incl_tax)==null?void 0:l.value)??0,currency:((p=i==null?void 0:i.gift_wrapping_for_items_incl_tax)==null?void 0:p.currency)??"USD"},giftWrappingForOrder:{value:((g=i==null?void 0:i.gift_wrapping_for_order)==null?void 0:g.value)??0,currency:((y=i==null?void 0:i.gift_wrapping_for_order)==null?void 0:y.currency)??"USD"},giftWrappingForOrderInclTax:{value:((e=i==null?void 0:i.gift_wrapping_for_order_incl_tax)==null?void 0:e.value)??0,currency:((R=i==null?void 0:i.gift_wrapping_for_order_incl_tax)==null?void 0:R.currency)??"USD"},printedCard:{value:((s=i==null?void 0:i.printed_card)==null?void 0:s.value)??0,currency:((f=i==null?void 0:i.printed_card)==null?void 0:f.currency)??"USD"},printedCardInclTax:{value:((a=i==null?void 0:i.printed_card_incl_tax)==null?void 0:a.value)??0,currency:((E=i==null?void 0:i.printed_card_incl_tax)==null?void 0:E.currency)??"USD"}}},Fn=(n=[])=>n?n==null?void 0:n.map(i=>{var u,c;return{code:(i==null?void 0:i.code)??"",appliedBalance:{value:((u=i.applied_balance)==null?void 0:u.value)??0,currency:((c=i.applied_balance)==null?void 0:c.currency)??"USD"}}}):[],z=(n,i)=>{var G,v,w,M,C,L,Y,B,Q;const u=Gn(n),c=j(n==null?void 0:n.billing_address),_=j(n==null?void 0:n.shipping_address),l=(G=n.shipments)==null?void 0:G.map(k=>({...k,items:k.items.map(T=>({id:T.id,productName:T.product_name,productSku:T.product_sku,quantityShipped:T.quantity_shipped,orderItem:gn(T.order_item)}))})),p=Fn(n==null?void 0:n.applied_gift_cards),g=P(n.items),y=((v=On(n==null?void 0:n.returns))==null?void 0:v.ordersReturn)??[],e=i?y.filter(k=>k.returnNumber===i):y,R=P(n.items_eligible_for_return),s=hn(n==null?void 0:n.total),f=(w=n==null?void 0:n.payment_methods)==null?void 0:w[0],a=n==null?void 0:n.shipping_method,E=g==null?void 0:g.reduce((k,T)=>k+(T==null?void 0:T.totalQuantity),0),F={amount:((M=s==null?void 0:s.totalShipping)==null?void 0:M.value)??0,currency:((C=s==null?void 0:s.totalShipping)==null?void 0:C.currency)||"",code:(u==null?void 0:u.shippingMethod)??""},x=[{code:(f==null?void 0:f.type)??"",name:(f==null?void 0:f.name)??""}],S=s==null?void 0:s.subtotalExclTax,N=s==null?void 0:s.subtotalInclTax,t=Mn(n),b=sn(n),h=[pn(n)],A=(n==null?void 0:n.printed_card_included)??!1,O=(n==null?void 0:n.gift_receipt_included)??!1,q={...u,...s,giftMessage:b,cartGiftWrapping:h,printedCardIncluded:A,giftReceiptIncluded:O,appliedGiftCards:p,totalGiftOptions:t,subtotalExclTax:S,subtotalInclTax:N,billingAddress:c,shippingAddress:_,shipments:l,items:g,returns:e,itemsEligibleForReturn:R,totalQuantity:E,shippingMethod:a,shipping:F,payments:x};return X(q,(Q=(B=(Y=(L=U==null?void 0:U.getConfig())==null?void 0:L.models)==null?void 0:Y.OrderDataModel)==null?void 0:B.transformer)==null?void 0:Q.call(B,n))},xn=(n,i,u)=>{var c,_,l,p,g,y,e;if((p=(l=(_=(c=i==null?void 0:i.data)==null?void 0:c.customer)==null?void 0:_.orders)==null?void 0:l.items)!=null&&p.length&&n==="orderData"){const R=(e=(y=(g=i==null?void 0:i.data)==null?void 0:g.customer)==null?void 0:y.orders)==null?void 0:e.items[0];return z(R,u)}return null},On=n=>{var l,p,g,y,e;if(!((l=n==null?void 0:n.items)!=null&&l.length))return null;const i=n==null?void 0:n.items,u=n==null?void 0:n.page_info,_={ordersReturn:[...i].sort((R,s)=>+s.number-+R.number).map(R=>{var S,N;const{order:s,status:f,number:a,created_at:E}=R,F=((N=(S=R==null?void 0:R.shipping)==null?void 0:S.tracking)==null?void 0:N.map(t=>{const{status:b,carrier:h,tracking_number:A}=t;return{status:b,carrier:h,trackingNumber:A}}))??[],x=R.items.map(t=>{var v;const b=t==null?void 0:t.quantity,h=t==null?void 0:t.status,A=t==null?void 0:t.request_quantity,O=t==null?void 0:t.uid,q=t==null?void 0:t.order_item,G=((v=P([q]))==null?void 0:v.reduce((w,M)=>M,{}))??{};return{uid:O,quantity:b,status:h,requestQuantity:A,...G}});return{createdReturnAt:E,returnStatus:f,token:s==null?void 0:s.token,orderNumber:s==null?void 0:s.number,returnNumber:a,items:x,tracking:F}}),...u?{pageInfo:{pageSize:u.page_size,totalPages:u.total_pages,currentPage:u.current_page}}:{}};return X(_,(e=(y=(g=(p=U==null?void 0:U.getConfig())==null?void 0:p.models)==null?void 0:g.CustomerOrdersReturnModel)==null?void 0:y.transformer)==null?void 0:e.call(y,{...i,...u}))},Qn=(n,i)=>{var c,_;if(!((c=n==null?void 0:n.data)!=null&&c.guestOrder))return null;const u=(_=n==null?void 0:n.data)==null?void 0:_.guestOrder;return z(u,i)},qn=(n,i)=>{var c,_;if(!((c=n==null?void 0:n.data)!=null&&c.guestOrderByToken))return null;const u=(_=n==null?void 0:n.data)==null?void 0:_.guestOrderByToken;return z(u,i)},wn=`
4
4
  query ORDER_BY_NUMBER($orderNumber: String!, $pageSize: Int) {
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{events as t}from"@dropins/tools/event-bus.js";const s=r=>{const e=r instanceof DOMException&&r.name==="AbortError",o=r.name==="PlaceOrderError";throw!e&&!o&&t.emit("order/error",{source:"auth",type:"network",error:r.message}),r};export{s as h};
4
4
  //# sourceMappingURL=network-error.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{PRODUCT_DETAILS_FRAGMENT as s,PRICE_DETAILS_FRAGMENT as i,GIFT_CARD_DETAILS_FRAGMENT as A,ORDER_ITEM_DETAILS_FRAGMENT as d,BUNDLE_ORDER_ITEM_DETAILS_FRAGMENT as c,ORDER_SUMMARY_FRAGMENT as D,ADDRESS_FRAGMENT as G,ORDER_ITEM_FRAGMENT as u,GIFT_WRAPPING_FRAGMENT as M,GIFT_MESSAGE_FRAGMENT as N,GUEST_ORDER_FRAGMENT as O}from"../fragments.js";import{f as R,h as a}from"./fetch-graphql.js";import{a as T}from"./initialize.js";const m=`
4
4
  mutation CANCEL_ORDER_MUTATION($orderId: ID!, $reason: String!) {
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{h as i}from"./network-error.js";import{f as o,h as s}from"./fetch-graphql.js";import{t as d,a as _}from"./transform-attributes-form.js";import{REQUEST_RETURN_ORDER_FRAGMENT as m}from"../fragments.js";import{merge as l}from"@dropins/tools/lib.js";import{c as f}from"./initialize.js";const h=r=>{var a,n,E,c,R,T;if(!((n=(a=r==null?void 0:r.data)==null?void 0:a.requestReturn)!=null&&n.return))return{};const{created_at:e,...t}=r.data.requestReturn.return,u={...t,createdAt:e};return l(u,(T=(R=(c=(E=f.getConfig())==null?void 0:E.models)==null?void 0:c.RequestReturnModel)==null?void 0:R.transformer)==null?void 0:T.call(R,r.data.requestReturn.return))},U=`
4
4
  query GET_ATTRIBUTES_LIST($entityType: AttributeEntityTypeEnum!) {
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{g as p,F as c}from"./getFormValues.js";const d={PENDING:"pending",AUTHORIZED:"authorized",PARTIALLY_AUTHORIZED:"partiallyAuthorized",RECEIVED:"received",PARTIALLY_RECEIVED:"partiallyReceived",APPROVED:"approved",PARTIALLY_APPROVED:"partiallyApproved",REJECTED:"rejected",PARTIALLY_REJECTED:"partiallyRejected",DENIED:"denied",PROCESSED_AND_CLOSED:"processedAndClosed",CLOSED:"closed"},u=(t,n)=>({id:`${t.id}_${t.fieldType}_${n+1}`,name:`${t.name}_${t.fieldType}_${n+1}`,code:`${t.code}_${t.fieldType}_${n+1}`,customUpperCode:`${t.customUpperCode}_${t.fieldType}_${n+1}`}),l=t=>{const n={};return!t||typeof t!="object"||Object.keys(t).length===0||Object.keys(t).forEach(e=>{if(/_(\d+)$/.exec(e)){const s=e==null?void 0:e.replace(/_\d+$/,"");n[s]=t[e]}else n[e]=t[e]}),n},f=(t,n)=>t.map(e=>({...e,...u(e,n)})),A=(t,n)=>t==null?void 0:t.flatMap(e=>Array.from({length:n},(i,s)=>({...e,...u(e,s)}))),E=t=>{const n=[],e=[];return Object.entries(t).forEach(([i,s])=>{const r=i.lastIndexOf("_"),o=i.slice(0,r),a=i.slice(r+1);a===c.MULTISELECT||a===c.SELECT?n.push({attributeCode:o,value:s}):e.push({attributeCode:o,value:s})}),{selectedCustomAttributes:n,enteredCustomAttributes:e}},C=t=>typeof t!="string"?"":d[t]??"",R=t=>{var e;const n=[];if(t!=null&&t.current.length)for(const{current:i}of t.current){if(!i)continue;const s=i.name.replace(/_\d+$/,""),r=((e=i==null?void 0:i.dataset)==null?void 0:e.quantity)??1,o=p(i),a=l(o);n.push({orderItemUid:s,quantityToReturn:+r,...E(a)})}return n},_=t=>{var n;return(n=t==null?void 0:t.items)!=null&&n.length?[...(t==null?void 0:t.items)??[]].sort((e,i)=>{const s=e.quantityShipped-e.quantityReturnRequested===0,r=i.quantityShipped-i.quantityReturnRequested===0;return e.eligibleForReturn&&!i.eligibleForReturn?-1:!e.eligibleForReturn&&i.eligibleForReturn||s&&!r?1:!s&&r?-1:0}):[]};export{C as f,f as m,R as p,A as r,_ as s};
4
4
  //# sourceMappingURL=returnOrdersHelper.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  const s=t=>{let e=!1,a=!1;switch(t){case 1:a=!0;break;case 2:e=!0;break;case 3:e=!0,a=!0;break;default:e=!1,a=!1}return{taxIncluded:e,taxExcluded:a}};export{s};
4
4
  //# sourceMappingURL=setTaxStatus.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  const l=r=>r.replace(/_([a-z])/g,(t,n)=>n.toUpperCase()),a=r=>r.replace(/([A-Z])/g,t=>`_${t.toLowerCase()}`),i=(r,t,n)=>{const s=["string","boolean","number"],c=t==="camelCase"?l:a;return Array.isArray(r)?r.map(e=>s.includes(typeof e)||e===null?e:typeof e=="object"?i(e,t,n):e):r!==null&&typeof r=="object"?Object.entries(r).reduce((e,[o,u])=>{const f=n&&n[o]?n[o]:c(o);return e[f]=s.includes(typeof u)||u===null?u:i(u,t,n),e},{}):r},d=r=>{let t=[];for(const n of r)if(!(n.frontend_input!=="MULTILINE"||n.multiline_count<2))for(let s=2;s<=n.multiline_count;s++){const c={...n,name:`${n.code}_${s}`,code:`${n.code}_${s}`,id:`${n.code}_${s}`};t.push(c)}return t},p=(r=[])=>{var c;if(!(r!=null&&r.length))return[];const t=(c=r.filter(e=>{var o;return!((o=e.frontend_input)!=null&&o.includes("HIDDEN"))}))==null?void 0:c.map(({code:e,...o})=>{const u=e!=="country_id"?e:"country_code";return{...o,name:u,id:u,code:u}}),n=d(t);return[...t,...n].map(e=>{const o=l(e.code);return i({...e,customUpperCode:o},"camelCase",{frontend_input:"fieldType",frontend_class:"className",is_required:"required",sort_order:"orderNumber"})}).sort((e,o)=>e.orderNumber-o.orderNumber)};export{i as a,l as c,p as t};
4
4
  //# sourceMappingURL=transform-attributes-form.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{useState as f,useEffect as g}from"@dropins/tools/preact-hooks.js";import{g as S}from"./getStoreConfig.js";const C=()=>{const[s,r]=f(null);return g(()=>{var n;const e="orderStoreConfigPromise",i=sessionStorage.getItem("orderStoreConfig");if(i){const t=JSON.parse(i);r(t)}else{const t=window;t[e]||(t[e]=S().then(o=>(o&&sessionStorage.setItem("orderStoreConfig",JSON.stringify(o)),o))),(n=t[e])==null||n.then(o=>{o&&r(o)})}},[]),s};export{C as u};
4
4
  //# sourceMappingURL=useGetStoreConfig.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{debounce as t}from"@dropins/tools/lib.js";import{useState as o,useCallback as s,useEffect as r}from"@dropins/tools/preact-hooks.js";const w=()=>{const[i,n]=o(window.innerWidth<768),e=s(t(()=>{n(window.innerWidth<768)},1e3),[]);return r(()=>(window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}),[e]),i};export{w as u};
4
4
  //# sourceMappingURL=useIsMobile.js.map
@@ -1,7 +1,7 @@
1
1
  import { MoneyProps, TaxTypes } from '../../../types';
2
2
 
3
3
  export declare const GiftWrapping: ({ salesGiftWrapping, giftWrappingPrice, giftWrappingPriceInclTax, giftWrappingTitle, giftWrappingExclTaxText, giftWrappingInclTaxText, }: {
4
- salesGiftWrapping?: TaxTypes | undefined;
4
+ salesGiftWrapping?: TaxTypes;
5
5
  giftWrappingPrice: MoneyProps;
6
6
  giftWrappingPriceInclTax: MoneyProps;
7
7
  giftWrappingTitle: string;
@@ -4,8 +4,8 @@ import { TaxTypes } from '../../../types';
4
4
  type translationsTypes = Record<string, string>;
5
5
  export declare const PrintedCard: ({ translations, order, salesPrintedCard, }: {
6
6
  translations: translationsTypes;
7
- order?: OrderDataModel | undefined;
8
- salesPrintedCard?: TaxTypes | undefined;
7
+ order?: OrderDataModel;
8
+ salesPrintedCard?: TaxTypes;
9
9
  }) => import("preact").JSX.Element | null;
10
10
  export {};
11
11
  //# sourceMappingURL=PrintedCard.d.ts.map
@@ -4,7 +4,7 @@ import { TaxTypes } from '../../../types';
4
4
  type translationsTypes = Record<string, string>;
5
5
  export declare const Subtotal: ({ translations, order, subtotalInclTax, subtotalExclTax, shoppingOrdersDisplaySubtotal, }: {
6
6
  translations: translationsTypes;
7
- order?: OrderDataModel | undefined;
7
+ order?: OrderDataModel;
8
8
  subtotalInclTax: number;
9
9
  subtotalExclTax: number;
10
10
  shoppingOrdersDisplaySubtotal: TaxTypes;
@@ -4,7 +4,7 @@ import { TaxTypes } from '../../../types';
4
4
  type translationsTypes = Record<string, string>;
5
5
  export declare const Total: ({ translations, shoppingOrdersDisplaySubtotal, order, }: {
6
6
  translations: translationsTypes;
7
- order?: OrderDataModel | undefined;
7
+ order?: OrderDataModel;
8
8
  shoppingOrdersDisplaySubtotal: TaxTypes;
9
9
  }) => import("preact").JSX.Element;
10
10
  export {};
@@ -1,7 +1,7 @@
1
1
 
2
2
  export declare const CardLoader: ({ testId, withCard, }: {
3
- testId?: string | undefined;
4
- withCard?: boolean | undefined;
3
+ testId?: string;
4
+ withCard?: boolean;
5
5
  }) => import("preact").JSX.Element;
6
6
  export declare const DetailsSkeleton: (props: any) => import("preact").JSX.Element;
7
7
  export declare const OrderProductListSkeleton: () => import("preact").JSX.Element;
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{jsx as a,jsxs as N}from"@dropins/tools/preact-jsx-runtime.js";import{classes as A,Slot as T}from"@dropins/tools/lib.js";import{Icon as B,Header as H,InLineAlert as $,Button as M,Checkbox as j,CartItem as G,Image as V}from"@dropins/tools/components.js";import{useState as w,useRef as Z,useEffect as q,useCallback as Q}from"@dropins/tools/preact-hooks.js";import{u as D,a as U}from"../chunks/ShippingStatusCard.js";import*as _ from"@dropins/tools/preact-compat.js";import{u as z}from"../chunks/useGetStoreConfig.js";import{createRef as J,Fragment as K}from"@dropins/tools/preact.js";import{s as X,p as Y,r as I,m as ee}from"../chunks/returnOrdersHelper.js";import{events as te}from"@dropins/tools/event-bus.js";import{g as W}from"../chunks/getQueryParam.js";import{g as re,r as ne,a as ae}from"../chunks/requestGuestReturn.js";import{s as se}from"../chunks/setTaxStatus.js";import{S as ie,C as ce}from"../chunks/CartSummaryItem.js";import{a as ue}from"../chunks/OrderLoaders.js";import{useText as oe}from"@dropins/tools/i18n.js";import"../chunks/getStoreConfig.js";import"../chunks/fetch-graphql.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/getFormValues.js";import"../chunks/network-error.js";import"../chunks/transform-attributes-form.js";import"../fragments.js";import"../chunks/initialize.js";const le=s=>_.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},_.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M0.75 12C0.75 5.78421 5.78421 0.75 12 0.75C18.2158 0.75 23.25 5.78421 23.25 12C23.25 18.2158 18.2158 23.25 12 23.25C5.78421 23.25 0.75 18.2158 0.75 12Z",stroke:"currentColor"}),_.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M6.75 12.762L10.2385 15.75L17.25 9",stroke:"currentColor"})),de=s=>_.createElement("svg",{id:"Icon_Warning_Base",width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},_.createElement("g",{clipPath:"url(#clip0_841_1324)"},_.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M11.9949 2.30237L0.802734 21.6977H23.1977L11.9949 2.30237Z",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"}),_.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M12.4336 10.5504L12.3373 14.4766H11.6632L11.5669 10.5504V9.51273H12.4336V10.5504ZM11.5883 18.2636V17.2687H12.4229V18.2636H11.5883Z",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"})),_.createElement("defs",null,_.createElement("clipPath",{id:"clip0_841_1324"},_.createElement("rect",{width:24,height:21,fill:"white",transform:"translate(0 1.5)",strokeWidth:1})))),pe=({onSuccess:s,onError:n,handleSetInLineAlert:i,orderData:l})=>{const[R,L]=w(!1),[u,b]=w({id:"",email:"",...l}),[v,x]=w("products"),[h,d]=w(!0),[g,f]=w([]),[C,e]=w([]),[m,t]=w([]),o=Z([]);o.current.length!==g.length&&(o.current=g.map((r,p)=>o.current[p]||J())),q(()=>{const r=te.on("order/data",p=>{var c;b(p);const O=X(p);t(O),L(((c=W("orderRef"))==null?void 0:c.length)>20),d(!1)},{eager:!0});return()=>{r==null||r.off()}},[]),q(()=>{re("RMA_ITEM").then(r=>{r!=null&&r.length&&(e(r),d(!1))})},[]);const y=Q(r=>{f(p=>p.findIndex(c=>(c==null?void 0:c.productSku)===(r==null?void 0:r.productSku))>-1?p.filter(c=>(c==null?void 0:c.productSku)!==(r==null?void 0:r.productSku)):[...p,r])},[]),S=Q(r=>{x(r),i(),r==="products"&&f([])},[i]),E=Q((r,p)=>{const O=g.map(c=>c.productSku===p?{...c,currentReturnOrderQuantity:r}:c);f(O)},[g]),F=Q(async(r,p)=>{if(!p)return;d(!0);const O={orderUid:u.id,contactEmail:u.email},c=Y(o);R?ae({token:W("orderRef"),contactEmail:O.contactEmail,items:c,commentText:"."}).then(k=>{s==null||s(k),S("success"),i()}).catch(k=>{n==null||n(k.message),i({type:"error",heading:k.message})}):ne({...O,items:c}).then(k=>{s==null||s(k),S("success"),i()}).catch(k=>{n==null||n(k.message),i({type:"error",heading:k.message})}),d(!1)},[S,n,s,i,u,R]);return{order:u,steps:v,loading:h,formsRef:o,attributesList:C,selectedProductList:g,itemsEligibleForReturn:m,handleSelectedProductList:y,handleSetQuantity:E,handleChangeStep:S,onSubmit:F}},me={success:le,warning:de,error:ie},he=()=>{const[s,n]=w({type:"success",heading:""}),i=Q(l=>{if(!(l!=null&&l.type)){n({type:"success",heading:""});return}const R=a(B,{source:me[l.type]});n({...l,icon:R})},[]);return{inLineAlertProps:s,handleSetInLineAlert:i}},$e=({className:s,orderData:n,slots:i,onSuccess:l,onError:R,routeReturnSuccess:L,showConfigurableOptions:u})=>{const b=oe({headerText:"Order.CreateReturn.headerText",successTitle:"Order.CreateReturn.success.title",successMessage:"Order.CreateReturn.success.message",sender:"Order.CreateReturn.giftCard.sender",recipient:"Order.CreateReturn.giftCard.recipient",message:"Order.CreateReturn.giftCard.message",outOfStock:"Order.CreateReturn.stockStatus.outOfStock",nextStep:"Order.CreateReturn.buttons.nextStep",backStep:"Order.CreateReturn.buttons.backStep",submit:"Order.CreateReturn.buttons.submit",backStore:"Order.CreateReturn.buttons.backStore",downloadableCount:"Order.CreateReturn.downloadableCount",returnedItems:"Order.CreateReturn.returnedItems",configurationsListQuantity:"Order.CreateReturn.configurationsList.quantity"}),{inLineAlertProps:v,handleSetInLineAlert:x}=he(),h=z(),{order:d,itemsEligibleForReturn:g,formsRef:f,attributesList:C,steps:e,loading:m,selectedProductList:t,handleSelectedProductList:o,handleSetQuantity:y,handleChangeStep:S,onSubmit:E}=pe({orderData:n,onSuccess:l,onError:R,handleSetInLineAlert:x});if(m)return a("div",{children:a(ue,{})});if(!m&&!C.length)return a("div",{});const F=(h==null?void 0:h.baseMediaUrl)??"",r={products:a(fe,{itemsEligibleForReturn:g,placeholderImage:F,taxConfig:se((h==null?void 0:h.shoppingOrderDisplayPrice)??0),slots:i,translations:b,loading:m,selectedProductList:t,handleSelectedProductList:o,showConfigurableOptions:u,handleSetQuantity:y,handleChangeStep:S}),attributes:a(ke,{placeholderImage:F,slots:i,formsRef:f,loading:m,fieldsConfig:C,selectedProductList:t,handleChangeStep:S,translations:b,onSubmit:E}),success:a(ge,{translations:b,routeReturnSuccess:L,orderData:d}),error:null};return N("div",{className:A(["order-create-return",s]),children:[a(H,{title:b.headerText}),v.heading?a($,{className:"order-create-return_notification",variant:"secondary","data-testid":"orderCreateReturnNotification",...v}):null,r[e]]})},ge=({routeReturnSuccess:s,translations:n,orderData:i})=>N("div",{className:"order-return-order-message",children:[a("p",{className:"order-return-order-message__title",children:n.successTitle}),a("p",{className:"order-return-order-message__subtitle",children:n.successMessage}),a(M,{href:(s==null?void 0:s(i))??"#",children:n.backStore})]}),fe=({placeholderImage:s,itemsEligibleForReturn:n,slots:i,loading:l,taxConfig:R,translations:L,selectedProductList:u,handleSelectedProductList:b,showConfigurableOptions:v,handleSetQuantity:x,handleChangeStep:h})=>N("ul",{className:"order-return-order-product-list",children:[n==null?void 0:n.map((d,g)=>{const{quantityReturnRequested:f,quantityShipped:C,eligibleForReturn:e}=d,m=u.some(y=>(y==null?void 0:y.productSku)===d.productSku&&d.eligibleForReturn),t=C===f&&e||!e,o=C-f===0?f:C-f;return N("li",{className:A(["order-return-order-product-list__item",["order-return-order-product-list__item--blur",t]]),children:[a(j,{"data-testid":`key_${g}`,name:`key_${g}`,checked:m,disabled:t,onChange:()=>{b({...d,currentReturnOrderQuantity:1})}}),a(ce,{slots:i,placeholderImage:s,loading:l,product:{...d,totalQuantity:o||1},itemType:"",taxConfig:R,translations:L,showConfigurableOptions:v,disabledIncrementer:!m,onQuantity:o>1?y=>{x(y,d.productSku)}:void 0}),a(T,{"data-testid":"returnOrderItem",name:"ReturnOrderItem",slot:i==null?void 0:i.ReturnOrderItem})]},d.id)}),a("li",{className:"order-return-order-product-list__item",children:a(M,{type:"button",onClick:()=>h("attributes"),disabled:!u.length,children:L.nextStep})})]}),ke=({placeholderImage:s,slots:n,formsRef:i,selectedProductList:l,loading:R,fieldsConfig:L,translations:u,handleChangeStep:b,onSubmit:v})=>{const{formData:x,errors:h,formRef:d,handleChange:g,handleBlur:f,handleSubmit:C}=D({fieldsConfig:I(L,l==null?void 0:l.length),onSubmit:v});return N("form",{className:"order-return-reason-form",ref:d,onSubmit:C,name:"returnReasonForm",children:[l.map((e,m)=>{var O,c,k,P;const t=e==null?void 0:e.giftCard,o=e==null?void 0:e.product,y=ee(L,m),S=`${e==null?void 0:e.id}_${m}`,E=(e==null?void 0:e.currentReturnOrderQuantity)??1,F={...e!=null&&e.currentReturnOrderQuantity?{[u.configurationsListQuantity]:E}:{},...e.configurableOptions||{},...e.bundleOptions||{},...t!=null&&t.senderName?{[u.sender]:t==null?void 0:t.senderName}:{},...t!=null&&t.senderEmail?{[u.sender]:t==null?void 0:t.senderEmail}:{},...t!=null&&t.recipientName?{[u.recipient]:t==null?void 0:t.recipientName}:{},...t!=null&&t.recipientEmail?{[u.recipient]:t==null?void 0:t.recipientEmail}:{},...t!=null&&t.message?{[u.message]:t==null?void 0:t.message}:{},...e!=null&&e.downloadableLinks?{[`${(O=e==null?void 0:e.downloadableLinks)==null?void 0:O.count} ${u.downloadableCount}`]:(c=e==null?void 0:e.downloadableLinks)==null?void 0:c.result}:{}},r=(k=e==null?void 0:e.product)==null?void 0:k.name,p={title:r,src:((P=o==null?void 0:o.thumbnail)==null?void 0:P.url)??s,alt:r,width:90,height:120,loading:"lazy"};return N(K,{children:[a(G,{loading:R,title:a("div",{"data-testid":"product-name",children:r}),sku:a("div",{children:o==null?void 0:o.sku}),image:a(T,{name:"ReturnReasonFormImage",slot:n==null?void 0:n.ReturnReasonFormImage,context:{data:e,defaultImageProps:p},children:a(V,{...p})}),configurations:F}),a("form",{name:S,ref:i==null?void 0:i.current[m],"data-quantity":E,children:a(U,{className:"className",loading:R,fields:y,onChange:g,onBlur:f,errors:h,values:x})})]},e.id)}),a(T,{"data-testid":"returnFormActions",name:"ReturnFormActions",slot:n==null?void 0:n.ReturnFormActions,context:{handleChangeStep:b},children:N("div",{className:"order-return-reason-form__actions",children:[a(M,{variant:"secondary",type:"button",onClick:()=>{b("products")},children:u.backStep}),a(M,{children:u.submit})]})})]})};export{$e as CreateReturn,$e as default};
4
4
  //# sourceMappingURL=CreateReturn.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{jsx as r,jsxs as a,Fragment as T}from"@dropins/tools/preact-jsx-runtime.js";import{Slot as E,classes as g}from"@dropins/tools/lib.js";import{useMemo as w,useState as k,useEffect as O,useCallback as z}from"@dropins/tools/preact-hooks.js";import"@dropins/tools/preact.js";import{events as F}from"@dropins/tools/event-bus.js";import{c as q}from"../chunks/transform-attributes-form.js";import{g as K}from"../chunks/getAttributesForm.js";import{Icon as G,Price as J,Card as Q,Header as U}from"@dropins/tools/components.js";import{f as X}from"../chunks/returnOrdersHelper.js";import{f as Y}from"../chunks/formatDateToLocale.js";import"../chunks/ShippingStatusCard.js";import*as h from"@dropins/tools/preact-compat.js";import{D as ee}from"../chunks/OrderLoaders.js";import{Text as te,useText as re}from"@dropins/tools/i18n.js";import"../chunks/network-error.js";import"../chunks/fetch-graphql.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/getFormValues.js";const ne=s=>h.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},h.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M2.00718 5H22.1507C22.7047 5 23.1579 5.45323 23.1579 6.00718V7.51794C23.1579 7.51794 1.01007 7.58844 1 7.55823V6.00718C1 5.45323 1.45323 5 2.00718 5Z",stroke:"currentColor",strokeWidth:1}),h.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M23.1579 9.78409V18.3451C23.1579 18.899 22.7047 19.3523 22.1507 19.3523H2.00718C1.45323 19.3523 1 18.899 1 18.3451V9.78409H23.1579Z",stroke:"currentColor",strokeWidth:1}),h.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M3.01465 15.9682H8.40305",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round"}),h.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M17.6192 17.5897C18.4535 17.5897 19.1299 16.9133 19.1299 16.0789C19.1299 15.2446 18.4535 14.5682 17.6192 14.5682C16.7848 14.5682 16.1084 15.2446 16.1084 16.0789C16.1084 16.9133 16.7848 17.5897 17.6192 17.5897Z",stroke:"currentColor",strokeWidth:1}),h.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M19.8848 17.5897C20.7192 17.5897 21.3956 16.9133 21.3956 16.0789C21.3956 15.2446 20.7192 14.5682 19.8848 14.5682C19.0504 14.5682 18.374 15.2446 18.374 16.0789C18.374 16.9133 19.0504 17.5897 19.8848 17.5897Z",stroke:"currentColor",strokeWidth:1})),ie=s=>h.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},h.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M17.93 14.8V18.75H5.97C4.75 18.75 3.75 17.97 3.75 17V6.5M3.75 6.5C3.75 5.53 4.74 4.75 5.97 4.75H15.94V8.25H5.97C4.75 8.25 3.75 7.47 3.75 6.5Z",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M19.35 11.64H14.04V14.81H19.35V11.64Z",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M17.9304 11.64V8.25H15.1504",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"})),S=(s,e)=>{var c;const u=n=>{const o=Array.isArray(n.value)?n.value.join(" "):n==null?void 0:n.value;return n.label?`${n.label}: ${o}`:o};return(c=s[e])==null?void 0:c.map((n,o)=>r("p",{children:u(n)},`${n.value}${o}`))},se=s=>{var o,t;const e=s&&s.length>0,u=e?(o=s[0])==null?void 0:o.name:"",c=e?(t=s[0])==null?void 0:t.code:"";return{selectedPaymentMethod:u,selectedPaymentMethodCode:c,hasToDisplayPaymentMethod:e&&u!==""}},oe=({loading:s,order:e,withHeader:u=!0,title:c,paymentIconsMap:n={},normalizeAddress:o,translations:t,slots:m})=>{var M,A,N,L;const p=!!(e!=null&&e.returnNumber),d=!!(e!=null&&e.isVirtual),i=(M=e==null?void 0:e.returns)==null?void 0:M[0],l=w(()=>({checkmo:ie,card:ne,...n}),[n]);if(!e||s)return r(ee,{});const _=(e==null?void 0:e.email)??"",f=(A=e==null?void 0:e.shipping)==null?void 0:A.code,y=(N=e==null?void 0:e.shipping)==null?void 0:N.amount,x=(L=e==null?void 0:e.shipping)==null?void 0:L.currency,P=e==null?void 0:e.payments,{selectedPaymentMethod:V,selectedPaymentMethodCode:D,hasToDisplayPaymentMethod:H}=se(P),v=l[D],C=S(o,"shippingAddress")??[],b=S(o,"billingAddress")??[],I=a("div",{className:"order-customer-details-content__container-email",children:[r("div",{className:"order-customer-details-content__container-title",children:t==null?void 0:t.emailTitle}),r("p",{children:_})]}),W=p?a("div",{className:"order-customer-details-content__container-return-information","data-testid":"returnDetailsBlock",children:[r("div",{className:"order-customer-details-content__container-title",children:t==null?void 0:t.returnInformationTitle}),r("div",{className:"order-customer-details-content__container-description",children:r(E,{"data-testid":"OrderReturnInformation",name:"OrderReturnInformation",slot:m==null?void 0:m.OrderReturnInformation,context:i,children:a(T,{children:[a("p",{children:[t.createdReturnAt,r("span",{children:Y(i==null?void 0:i.createdReturnAt)})]}),a("p",{children:[t.returnStatusLabel,r(te,{id:`Order.CustomerDetails.returnStatus.${X(i==null?void 0:i.returnStatus)}`})]}),a("p",{children:[t.orderNumberLabel,r("span",{children:i==null?void 0:i.orderNumber})]})]})})})]}):null,j=!d&&C.length?a("div",{className:"order-customer-details-content__container-shipping_address",children:[r("div",{className:"order-customer-details-content__container-title",children:t.shippingAddressTitle}),r("div",{className:"order-customer-details-content__container-description",children:C})]}):null,R=b.length?a("div",{className:g(["order-customer-details-content__container-billing_address",["order-customer-details-content__container-billing_address--fullwidth",!C.length||d]]),children:[r("div",{className:"order-customer-details-content__container-title",children:t.billingAddressTitle}),r("div",{className:"order-customer-details-content__container-description",children:b})]}):null,Z=H?a("div",{className:g(["order-customer-details-content__container-payment_methods",["order-customer-details-content__container-payment_methods--fullwidth",!f]]),children:[r("div",{className:"order-customer-details-content__container-title",children:t==null?void 0:t.paymentMethodsTitle}),a("p",{"data-testid":"payment_methods_description",className:g([["order-customer-details-content__container-payment_methods--icon",!!v]]),children:[r(E,{"data-testid":"PaymentMethodIcon",name:"PaymentMethodIcon",slot:m==null?void 0:m.PaymentMethodIcon,context:{selectedPaymentMethodCode:D},children:v?r(G,{source:v}):null}),V]})]}):null,$=f?a("div",{className:"order-customer-details-content__container-shipping_methods",children:[r("div",{className:"order-customer-details-content__container-title",children:t==null?void 0:t.shippingMethodsTitle}),y?a("p",{"data-testid":"shipping_methods_price",children:[r(J,{amount:y,currency:x})," ",f]}):r("p",{"data-testid":"shipping_methods_placeholder",children:t==null?void 0:t.freeShipping})]}):null,B=p?W:a(T,{children:[R,$,Z]});return a(Q,{"data-testid":"order-details",variant:"secondary",className:g(["order-customer-details-content"]),children:[u?r(U,{title:c??(t==null?void 0:t.headerText)}):null,a("div",{className:g(["order-customer-details-content__container",["order-customer-details-content__container--no-margin",C.length||b.length]]),children:[I,j,B]})]})},ce=["firstname","lastname","city","company","country_code","region","region_code","region_id","telephone","id","vat_id","postcode","street","street_2","default_shipping","default_billing"],ae=({orderData:s})=>{const[e,u]=k(!0),[c,n]=k(s),[o,t]=k([]);O(()=>{const d=F.on("order/data",i=>{n(i)},{eager:!0});return()=>{d==null||d.off()}},[]),O(()=>{K("shortRequest").then(d=>{if(d){const i=d.map(({name:l,orderNumber:_,label:f})=>({name:q(l),orderNumber:_,label:ce.includes(l)?null:f}));t(i)}}).finally(()=>{u(!1)})},[]);const m=z(d=>{if(!o.length||!c||!c[d])return[];const i=c[d]?Object.fromEntries(Object.entries(c[d]).map(([l,_])=>[l.toLowerCase(),_])):{};return o.filter(({name:l})=>i[l.toLowerCase()]).map(l=>({name:l.name,orderNumber:l.orderNumber,value:i[l.name.toLowerCase()],label:l.label}))},[o,c]),p=w(()=>({billingAddress:m("billingAddress"),shippingAddress:m("shippingAddress")}),[m]);return{order:c,normalizeAddress:p,loading:e}},Ne=({paymentIconsMap:s,orderData:e,title:u,className:c,slots:n})=>{const o=re({emailTitle:"Order.CustomerDetails.email.title",shippingAddressTitle:"Order.CustomerDetails.shippingAddress.title",shippingMethodsTitle:"Order.CustomerDetails.shippingMethods.title",billingAddressTitle:"Order.CustomerDetails.billingAddress.title",paymentMethodsTitle:"Order.CustomerDetails.paymentMethods.title",returnInformationTitle:"Order.CustomerDetails.returnInformation.title",headerText:"Order.CustomerDetails.headerText",freeShipping:"Order.CustomerDetails.freeShipping",createdReturnAt:"Order.CustomerDetails.orderReturnLabels.createdReturnAt",orderNumberLabel:"Order.CustomerDetails.orderReturnLabels.orderNumberLabel",returnStatusLabel:"Order.CustomerDetails.orderReturnLabels.returnStatusLabel"}),{order:t,normalizeAddress:m,loading:p}=ae({orderData:e});return r("div",{className:g(["order-customer-details",c]),children:r(oe,{slots:n,loading:p,order:t,title:u,paymentIconsMap:s,normalizeAddress:m,translations:o})})};export{Ne as CustomerDetails,Ne as default};
4
4
  //# sourceMappingURL=CustomerDetails.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{O as C,O as F}from"../chunks/OrderCancelForm.js";import"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/components.js";import"../chunks/ShippingStatusCard.js";import"@dropins/tools/preact-hooks.js";import"@dropins/tools/i18n.js";import"@dropins/tools/preact-compat.js";import"@dropins/tools/lib.js";import"@dropins/tools/preact.js";import"@dropins/tools/event-bus.js";import"../chunks/requestGuestOrderCancel.js";import"../fragments.js";import"../chunks/fetch-graphql.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/initialize.js";import"../chunks/network-error.js";export{C as OrderCancelForm,F as default};
4
4
  //# sourceMappingURL=OrderCancelForm.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{jsx as t,jsxs as r,Fragment as _}from"@dropins/tools/preact-jsx-runtime.js";import{classes as b}from"@dropins/tools/lib.js";import{useState as v,useEffect as V}from"@dropins/tools/preact-hooks.js";import"@dropins/tools/preact.js";import{events as Z}from"@dropins/tools/event-bus.js";import{s as T}from"../chunks/setTaxStatus.js";import{Price as m,Icon as H,Accordion as I,AccordionSection as G,Card as W,Header as k}from"@dropins/tools/components.js";import{u as z}from"../chunks/useGetStoreConfig.js";import"../chunks/ShippingStatusCard.js";import*as g from"@dropins/tools/preact-compat.js";import{O as D}from"../chunks/OrderLoaders.js";import{useText as F,Text as A}from"@dropins/tools/i18n.js";import"../chunks/getStoreConfig.js";import"../chunks/fetch-graphql.js";import"@dropins/tools/fetch-graphql.js";const j=c=>g.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...c},g.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M7.74512 9.87701L12.0001 14.132L16.2551 9.87701",stroke:"currentColor",strokeWidth:1,strokeLinecap:"square",strokeLinejoin:"round"})),B=c=>g.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...c},g.createElement("path",{d:"M7.74512 14.132L12.0001 9.87701L16.2551 14.132",stroke:"currentColor",strokeWidth:1,strokeLinecap:"square",strokeLinejoin:"round"})),q=c=>g.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...c},g.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M22 6.25H22.75C22.75 5.83579 22.4142 5.5 22 5.5V6.25ZM22 9.27L22.2514 9.97663C22.5503 9.87029 22.75 9.58731 22.75 9.27H22ZM20.26 12.92L19.5534 13.1714L19.5539 13.1728L20.26 12.92ZM22 14.66H22.75C22.75 14.3433 22.551 14.0607 22.2528 13.9539L22 14.66ZM22 17.68V18.43C22.4142 18.43 22.75 18.0942 22.75 17.68H22ZM2 17.68H1.25C1.25 18.0942 1.58579 18.43 2 18.43V17.68ZM2 14.66L1.74865 13.9534C1.44969 14.0597 1.25 14.3427 1.25 14.66H2ZM3.74 11.01L4.44663 10.7586L4.44611 10.7572L3.74 11.01ZM2 9.27H1.25C1.25 9.58675 1.44899 9.86934 1.7472 9.97611L2 9.27ZM2 6.25V5.5C1.58579 5.5 1.25 5.83579 1.25 6.25H2ZM21.25 6.25V9.27H22.75V6.25H21.25ZM21.7486 8.56337C19.8706 9.23141 18.8838 11.2889 19.5534 13.1714L20.9666 12.6686C20.5762 11.5711 21.1494 10.3686 22.2514 9.97663L21.7486 8.56337ZM19.5539 13.1728C19.9195 14.1941 20.7259 15.0005 21.7472 15.3661L22.2528 13.9539C21.6541 13.7395 21.1805 13.2659 20.9661 12.6672L19.5539 13.1728ZM21.25 14.66V17.68H22.75V14.66H21.25ZM22 16.93H2V18.43H22V16.93ZM2.75 17.68V14.66H1.25V17.68H2.75ZM2.25135 15.3666C4.12941 14.6986 5.11623 12.6411 4.44663 10.7586L3.03337 11.2614C3.42377 12.3589 2.85059 13.5614 1.74865 13.9534L2.25135 15.3666ZM4.44611 10.7572C4.08045 9.73588 3.27412 8.92955 2.2528 8.56389L1.7472 9.97611C2.34588 10.1905 2.81955 10.6641 3.03389 11.2628L4.44611 10.7572ZM2.75 9.27V6.25H1.25V9.27H2.75ZM2 7H22V5.5H2V7ZM7.31 6.74V18.17H8.81V6.74H7.31ZM17.0997 8.39967L11.0397 14.4597L12.1003 15.5203L18.1603 9.46033L17.0997 8.39967ZM12.57 9.67C12.57 9.87231 12.4159 10 12.27 10V11.5C13.2839 11.5 14.07 10.6606 14.07 9.67H12.57ZM12.27 10C12.1241 10 11.97 9.87231 11.97 9.67H10.47C10.47 10.6606 11.2561 11.5 12.27 11.5V10ZM11.97 9.67C11.97 9.46769 12.1241 9.34 12.27 9.34V7.84C11.2561 7.84 10.47 8.67938 10.47 9.67H11.97ZM12.27 9.34C12.4159 9.34 12.57 9.46769 12.57 9.67H14.07C14.07 8.67938 13.2839 7.84 12.27 7.84V9.34ZM17.22 14.32C17.22 14.5223 17.0659 14.65 16.92 14.65V16.15C17.9339 16.15 18.72 15.3106 18.72 14.32H17.22ZM16.92 14.65C16.7741 14.65 16.62 14.5223 16.62 14.32H15.12C15.12 15.3106 15.9061 16.15 16.92 16.15V14.65ZM16.62 14.32C16.62 14.1177 16.7741 13.99 16.92 13.99V12.49C15.9061 12.49 15.12 13.3294 15.12 14.32H16.62ZM16.92 13.99C17.0659 13.99 17.22 14.1177 17.22 14.32H18.72C18.72 13.3294 17.9339 12.49 16.92 12.49V13.99Z",fill:"currentColor"})),$=c=>g.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...c},g.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M22 12.8571V6.75774C22 6.33761 21.5848 6 21.0884 6H2.91155C2.40614 6 2 6.34511 2 6.75774V12.8571M22 12.8571H2M22 12.8571V17.0049C22 17.5468 21.5939 18 21.0884 18H2.91155C2.41516 18 2 17.5567 2 17.0049V12.8571M5.18182 16.0886L8.64545 12.8229M8.64545 12.8229L12.1087 16.0886M8.64545 12.8229C8.64545 12.8229 8.09964 10.4743 7.56328 9.96857C7.02692 9.46286 6.15419 9.46286 5.61783 9.96857C5.08146 10.4743 5.08146 11.2971 5.61783 11.8029C6.15419 12.3086 8.64545 12.8229 8.64545 12.8229ZM8.64545 12.8229C8.64545 12.8229 11.1542 12.2914 11.6905 11.7857C12.2269 11.28 12.2269 10.4571 11.6905 9.95141C11.1542 9.4457 10.2814 9.4457 9.74507 9.95141C9.2087 10.4571 8.64545 12.8229 8.64545 12.8229ZM8.64506 17.2886V6.70286",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round"})),R=({orderData:c,config:a})=>{const[e,n]=v(!0),[i,s]=v(c),[l,o]=v(null);return V(()=>{if(a){const{shoppingOrderDisplayPrice:u,shoppingOrdersDisplayShipping:d,shoppingOrdersDisplaySubtotal:p,...x}=a;o(h=>({...h,...x,shoppingOrderDisplayPrice:T(u),shoppingOrdersDisplayShipping:T(d),shoppingOrdersDisplaySubtotal:T(p),salesPrintedCard:T(a.salesPrintedCard),salesGiftWrapping:T(a.salesGiftWrapping)})),n(!1)}},[a]),V(()=>{const u=Z.on("order/data",d=>{s(d)},{eager:!0});return()=>{u==null||u.off()}},[]),{loading:e,storeConfig:l,order:i}},xt=({withHeader:c,orderData:a,children:e,className:n,...i})=>{const s=z(),{loading:l,storeConfig:o,order:u}=R({orderData:a,config:s}),d=F({subtotal:"Order.OrderCostSummary.subtotal.title",shipping:"Order.OrderCostSummary.shipping.title",freeShipping:"Order.OrderCostSummary.shipping.freeShipping",tax:"Order.OrderCostSummary.tax.title",incl:"Order.OrderCostSummary.tax.incl",excl:"Order.OrderCostSummary.tax.excl",discount:"Order.OrderCostSummary.discount.title",discountSubtitle:"Order.OrderCostSummary.discount.subtitle",total:"Order.OrderCostSummary.total.title",totalFree:"Order.OrderCostSummary.totalFree",accordionTitle:"Order.OrderCostSummary.tax.accordionTitle",accordionTotalTax:"Order.OrderCostSummary.tax.accordionTotalTax",totalExcludingTaxes:"Order.OrderCostSummary.tax.totalExcludingTaxes",headerText:"Order.OrderCostSummary.headerText",printedCardTitle:"Order.OrderCostSummary.giftOptionsTax.printedCard.title",printedCardTitleInclTax:"Order.OrderCostSummary.giftOptionsTax.printedCard.inclTax",printedCardTitleExclTax:"Order.OrderCostSummary.giftOptionsTax.printedCard.exclTax",itemGiftWrappingTitle:"Order.OrderCostSummary.giftOptionsTax.itemGiftWrapping.title",itemGiftWrappingInclTax:"Order.OrderCostSummary.giftOptionsTax.itemGiftWrapping.inclTax",itemGiftWrappingExclTax:"Order.OrderCostSummary.giftOptionsTax.itemGiftWrapping.exclTax",orderGiftWrappingTitle:"Order.OrderCostSummary.giftOptionsTax.orderGiftWrapping.title",orderGiftWrappingInclTax:"Order.OrderCostSummary.giftOptionsTax.orderGiftWrapping.inclTax",orderGiftWrappingExclTax:"Order.OrderCostSummary.giftOptionsTax.orderGiftWrapping.exclTax"});return t("div",{...i,className:b(["order-cost-summary",n]),children:t(tt,{order:u,withHeader:c,loading:l,storeConfig:o,translations:d})})},M=({salesGiftWrapping:c,giftWrappingPrice:a,giftWrappingPriceInclTax:e,giftWrappingTitle:n,giftWrappingExclTaxText:i,giftWrappingInclTaxText:s})=>{const l=c==null?void 0:c.taxIncluded,o=c==null?void 0:c.taxExcluded,u=l&&!o,d=o&&!l,p=o&&l;if(a.value===0||e.value===0)return null;const x=u?r(_,{children:[r("div",{className:"order-cost-summary-content__description--header",children:[t("span",{children:s}),t(m,{className:"order-cost-summary-content__description--normal-price",weight:"normal",currency:e.currency,amount:e.value})]}),t("div",{className:"order-cost-summary-content__description--subheader",children:t("span",{children:s})})]}):null,h=d?r("div",{className:"order-cost-summary-content__description--header",children:[t("span",{children:n}),t("span",{children:t(m,{weight:"normal",currency:a.currency,amount:a.value})})]}):null,y=p?r(_,{children:[r("div",{className:"order-cost-summary-content__description--header",children:[t("span",{children:n}),t("span",{children:t(m,{className:"order-cost-summary-content__description--normal-price",weight:"normal",currency:e.currency,amount:e.value})})]}),r("div",{className:"order-cost-summary-content__description--subheader",children:[t(m,{currency:a.currency,amount:a.value,size:"small",weight:"bold"})," ",t("span",{children:i})]})]}):null;return r("div",{className:"order-cost-summary-content__description order-cost-summary-content__description--gift-wrapping",children:[x,h,y]})},U=({translations:c,order:a,salesPrintedCard:e})=>{const n=a==null?void 0:a.totalGiftOptions,{printedCard:i,printedCardInclTax:s}=n,l=e==null?void 0:e.taxIncluded,o=e==null?void 0:e.taxExcluded;if(i.value===0||s.value===0)return null;const u=l&&!o?r(_,{children:[r("div",{className:"order-cost-summary-content__description--header",children:[t("span",{children:c.printedCardTitle}),t("span",{children:t(m,{className:"order-cost-summary-content__description--normal-price",weight:"normal",currency:s.currency,amount:s.value})})]}),t("div",{className:"order-cost-summary-content__description--subheader",children:t("span",{children:t("span",{children:c.printedCardTitleInclTax})})})]}):null,d=o&&!l?r("div",{className:"order-cost-summary-content__description--header",children:[t("span",{children:c.printedCardTitle}),t("span",{children:t(m,{weight:"normal",currency:i.currency,amount:i.value})})]}):null,p=o&&l?r(_,{children:[r("div",{className:"order-cost-summary-content__description--header",children:[t("span",{children:c.printedCardTitle}),t("span",{children:t(m,{className:"order-cost-summary-content__description--normal-price",weight:"normal",currency:s.currency,amount:s.value})})]}),r("div",{className:"order-cost-summary-content__description--subheader",children:[t(m,{currency:i.currency,amount:i.value,size:"small",weight:"bold"})," ",t("span",{children:c.printedCardTitleExclTax})]})]}):null;return r("div",{className:"order-cost-summary-content__description order-cost-summary-content__description--printed-card",children:[u,d,p]})},J=({translations:c,order:a,subtotalInclTax:e,subtotalExclTax:n,shoppingOrdersDisplaySubtotal:i})=>{var p,x,h,y;const s=i.taxIncluded,l=i.taxExcluded,o=s&&!l?r(_,{children:[r("div",{className:"order-cost-summary-content__description--header",children:[t("span",{children:c.subtotal}),t(m,{className:"order-cost-summary-content__description--normal-price",weight:"normal",currency:(p=a==null?void 0:a.subtotalInclTax)==null?void 0:p.currency,amount:e})]}),t("div",{className:"order-cost-summary-content__description--subheader",children:t("span",{children:c.incl})})]}):null,u=l&&!s?r("div",{className:"order-cost-summary-content__description--header",children:[t("span",{children:c.subtotal}),t(m,{className:"order-cost-summary-content__description--normal-price",weight:"normal",currency:(x=a==null?void 0:a.subtotalExclTax)==null?void 0:x.currency,amount:n})]}):null,d=l&&s?r(_,{children:[r("div",{className:"order-cost-summary-content__description--header",children:[t("span",{children:c.subtotal}),t(m,{className:"order-cost-summary-content__description--normal-price",weight:"normal",currency:(h=a==null?void 0:a.subtotalInclTax)==null?void 0:h.currency,amount:e})]}),r("div",{className:"order-cost-summary-content__description--subheader",children:[t(m,{currency:(y=a==null?void 0:a.subtotalExclTax)==null?void 0:y.currency,amount:n,size:"small",weight:"bold"})," ",t("span",{children:c.excl})]})]}):null;return r("div",{className:"order-cost-summary-content__description order-cost-summary-content__description--subtotal",children:[o,u,d]})},K=({translations:c,shoppingOrdersDisplayShipping:a,order:e,totalShipping:n})=>{var i,s,l,o;return e!=null&&e.isVirtual?null:r("div",{className:"order-cost-summary-content__description order-cost-summary-content__description--shipping",children:[r("div",{className:"order-cost-summary-content__description--header",children:[t("span",{children:c.shipping}),(i=e==null?void 0:e.totalShipping)!=null&&i.value?t(m,{weight:"normal",currency:(s=e==null?void 0:e.totalShipping)==null?void 0:s.currency,amount:n}):t("span",{children:c.freeShipping})]}),r("div",{className:"order-cost-summary-content__description--subheader",children:[a.taxIncluded&&a.taxExcluded?r(_,{children:[t(m,{weight:"normal",currency:(l=e==null?void 0:e.totalShipping)==null?void 0:l.currency,amount:(o=e==null?void 0:e.totalShipping)==null?void 0:o.value,size:"small"}),r("span",{children:[" ",c.excl]})]}):null,a.taxIncluded&&!a.taxExcluded?t("span",{children:c.incl}):null]})]})},Q=({translations:c,order:a})=>{var s,l;const e=a==null?void 0:a.coupons,n=a==null?void 0:a.discounts,i=(n==null?void 0:n.reduce((o,u)=>o+(u.amount.value??0),0))||0;return!((s=a==null?void 0:a.discounts)!=null&&s.length)&&i===0?null:r("div",{className:"order-cost-summary-content__description order-cost-summary-content__description--discount",children:[r("div",{className:"order-cost-summary-content__description--header",children:[t("span",{children:c.discount}),t("span",{children:t(m,{weight:"normal",sale:!0,currency:(l=n[0])==null?void 0:l.amount.currency,amount:-i})})]}),e.map(o=>t("div",{className:"order-cost-summary-content__description--subheader",children:r("span",{children:[t(H,{source:q,size:"16",className:"order-cost-summary-content__description--coupon-icon"}),t("span",{children:o.code})]})},o.code))]})},X=({translations:c,shoppingOrdersDisplaySubtotal:a,order:e})=>{var i,s,l,o,u;const n=((i=e==null?void 0:e.grandTotal)==null?void 0:i.value)===0;return r("div",{className:"order-cost-summary-content__description order-cost-summary-content__description--total",children:[r("div",{className:"order-cost-summary-content__description--header",children:[t("span",{children:c.total}),n?t("span",{className:"order-cost-summary-content__description--total-free",children:c.totalFree}):t(m,{currency:(s=e==null?void 0:e.grandTotal)==null?void 0:s.currency,amount:(l=e==null?void 0:e.grandTotal)==null?void 0:l.value,weight:"bold",size:"medium"})]}),a.taxExcluded&&a.taxIncluded&&!n?r("div",{className:"order-cost-summary-content__description--subheader",children:[t("span",{children:c.totalExcludingTaxes}),t(m,{currency:(o=e==null?void 0:e.grandTotalExclTax)==null?void 0:o.currency,amount:(u=e==null?void 0:e.grandTotalExclTax)==null?void 0:u.value,weight:"normal",size:"small"})]}):null]})},Y=({translations:c,renderTaxAccordion:a,totalAccordionTaxValue:e,order:n})=>{var l,o,u;const[i,s]=v(!1);return a?t(I,{"data-testid":"tax-accordionTaxes",className:"order-cost-summary-content__accordion",iconOpen:j,iconClose:B,children:r(G,{onStateChange:s,title:c.accordionTitle,secondaryText:t(_,{children:i?null:t(m,{weight:"normal",amount:e,currency:(o=n==null?void 0:n.totalTax)==null?void 0:o.currency})}),renderContentWhenClosed:!1,children:[(u=n==null?void 0:n.taxes)==null?void 0:u.map((d,p)=>{var x,h,y;return r("div",{className:"order-cost-summary-content__accordion-row",children:[t("p",{children:d==null?void 0:d.title}),t("p",{children:t(m,{weight:"normal",amount:(x=d==null?void 0:d.amount)==null?void 0:x.value,currency:(h=d==null?void 0:d.amount)==null?void 0:h.currency})})]},`${(y=d==null?void 0:d.amount)==null?void 0:y.value}${p}`)}),r("div",{className:"order-cost-summary-content__accordion-row order-cost-summary-content__accordion-total",children:[t("p",{children:c.accordionTotalTax}),t("p",{children:t(m,{weight:"normal",amount:e,currency:n.totalTax.currency,size:"medium"})})]})]})}):t("div",{className:"order-cost-summary-content__description order-cost-summary-content__description--tax",children:r("div",{className:"order-cost-summary-content__description--header",children:[t("span",{children:c.tax}),t(m,{currency:(l=n==null?void 0:n.totalTax)==null?void 0:l.currency,amount:n==null?void 0:n.totalTax.value,weight:"normal",size:"small"})]})})},P=({totalGiftCardValue:c,totalGiftCardCurrency:a,order:e})=>{const n=e==null?void 0:e.appliedGiftCards;return c?r("div",{className:"order-cost-summary-content__description order-cost-summary-content__description--discount",children:[r("div",{className:"order-cost-summary-content__description--header",children:[t("span",{children:t(A,{id:"Order.OrderCostSummary.appliedGiftCards.label",plural:n==null?void 0:n.length,fields:{count:n==null?void 0:n.length}})}),t("span",{children:t(m,{weight:"normal",sale:!0,currency:a,amount:-c})})]}),n.map(i=>t("div",{className:"order-cost-summary-content__description--subheader",children:r("span",{children:[t(H,{source:$,size:"16",className:"order-cost-summary-content__description--giftcard-icon"}),t("span",{children:i.code})]})},i.code))]}):null},tt=({translations:c,loading:a,storeConfig:e,order:n,withHeader:i=!0})=>{var h,y,C,w,S,f,N;if(a||!n)return t(D,{});const s=((h=n==null?void 0:n.totalGiftCard)==null?void 0:h.value)??0,l=((y=n.totalGiftCard)==null?void 0:y.currency)??"",o=((C=n.subtotalInclTax)==null?void 0:C.value)??0,u=((w=n.subtotalExclTax)==null?void 0:w.value)??0,d=((S=n.totalShipping)==null?void 0:S.value)??0,p=!!((f=n==null?void 0:n.taxes)!=null&&f.length)&&(e==null?void 0:e.shoppingOrdersDisplayFullSummary),x=p?(N=n==null?void 0:n.taxes)==null?void 0:N.reduce((L,O)=>{var E;return+((E=O==null?void 0:O.amount)==null?void 0:E.value)+L},0):0;return r(W,{variant:"secondary",className:b(["order-cost-summary-content"]),children:[i?t(k,{title:c.headerText}):null,r("div",{className:"order-cost-summary-content__wrapper",children:[t(J,{translations:c,order:n,subtotalInclTax:o,subtotalExclTax:u,shoppingOrdersDisplaySubtotal:e==null?void 0:e.shoppingOrdersDisplaySubtotal}),t(K,{translations:c,order:n,totalShipping:d,shoppingOrdersDisplayShipping:e==null?void 0:e.shoppingOrdersDisplayShipping}),t(U,{order:n,translations:c,salesPrintedCard:e==null?void 0:e.salesPrintedCard}),t(M,{salesGiftWrapping:e==null?void 0:e.salesGiftWrapping,giftWrappingPrice:n.totalGiftOptions.giftWrappingForItems,giftWrappingPriceInclTax:n.totalGiftOptions.giftWrappingForItemsInclTax,giftWrappingTitle:c.itemGiftWrappingTitle,giftWrappingExclTaxText:c.itemGiftWrappingExclTax,giftWrappingInclTaxText:c.itemGiftWrappingInclTax}),t(M,{salesGiftWrapping:e==null?void 0:e.salesGiftWrapping,giftWrappingPrice:n.totalGiftOptions.giftWrappingForOrder,giftWrappingPriceInclTax:n.totalGiftOptions.giftWrappingForOrderInclTax,giftWrappingTitle:c.orderGiftWrappingTitle,giftWrappingExclTaxText:c.orderGiftWrappingExclTax,giftWrappingInclTaxText:c.orderGiftWrappingInclTax}),t(Q,{translations:c,order:n}),t(P,{order:n,totalGiftCardValue:s,totalGiftCardCurrency:l}),t(Y,{order:n,translations:c,renderTaxAccordion:p,totalAccordionTaxValue:x}),t(X,{translations:c,shoppingOrdersDisplaySubtotal:e==null?void 0:e.shoppingOrdersDisplaySubtotal,order:n})]})]})};export{xt as OrderCostSummary,xt as default};
4
4
  //# sourceMappingURL=OrderCostSummary.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{jsx as l,jsxs as k}from"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/lib.js";import{Icon as A,Header as O,Button as H}from"@dropins/tools/components.js";import{useState as f,useEffect as p}from"@dropins/tools/preact-hooks.js";import"../chunks/ShippingStatusCard.js";import*as c from"@dropins/tools/preact-compat.js";import"@dropins/tools/preact.js";import{events as _}from"@dropins/tools/event-bus.js";import{b}from"../chunks/OrderLoaders.js";import{useText as w,Text as d}from"@dropins/tools/i18n.js";function s(e){var r;return{region:{region_id:e!=null&&e.regionId?Number(e==null?void 0:e.regionId):null,region:e==null?void 0:e.region},city:e==null?void 0:e.city,company:e==null?void 0:e.company,country_code:e==null?void 0:e.countryCode,firstname:e==null?void 0:e.firstName,lastname:e==null?void 0:e.lastName,middlename:e==null?void 0:e.middleName,postcode:e==null?void 0:e.postCode,street:e==null?void 0:e.street,telephone:e==null?void 0:e.telephone,custom_attributesV2:((r=e==null?void 0:e.customAttributes)==null?void 0:r.map(i=>({attribute_code:i.code,value:i.value})))||[]}}const V=e=>c.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},c.createElement("g",{clipPath:"url(#clip0_4797_15077)"},c.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M10.15 20.85L1.5 17.53V6.63L10.15 10V20.85Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1}),c.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M1.5 6.63001L10.15 3.20001L18.8 6.63001L10.15 10L1.5 6.63001Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1}),c.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M6.17969 4.77002L14.8297 8.15002V11.47",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1}),c.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M18.7896 12.64V6.63L10.1396 10V20.85L14.8296 19.05",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:1}),c.createElement("path",{className:"success-icon",vectorEffect:"non-scaling-stroke",d:"M15.71 17.26C15.71 15.38 17.23 13.86 19.11 13.86C20.99 13.86 22.51 15.38 22.51 17.26C22.51 19.14 20.99 20.66 19.11 20.66C17.23 20.66 15.71 19.14 15.71 17.26Z",stroke:"currentColor",strokeWidth:1}),c.createElement("path",{className:"success-icon",vectorEffect:"non-scaling-stroke",d:"M17.4805 17.49L18.5605 18.41L20.7205 16.33",stroke:"currentColor",strokeLinecap:"square",strokeLinejoin:"round",strokeWidth:1})),c.createElement("defs",null,c.createElement("clipPath",{id:"clip0_4797_15077"},c.createElement("rect",{width:22,height:18.65,fill:"white",transform:"translate(1 2.70001)"})))),M=({orderData:e,handleEmailAvailability:r,handleSignUpClick:i})=>{const[t,L]=f(e),[u,v]=f(),[C,h]=f(r?void 0:!0),a=t==null?void 0:t.email,N=i&&t!==void 0&&u===!1&&C===!0?()=>{const o=t.shippingAddress,n=t.billingAddress,E=[{code:"email",defaultValue:t.email},{code:"firstname",defaultValue:(n==null?void 0:n.firstName)??""},{code:"lastname",defaultValue:(n==null?void 0:n.lastName)??""}];let m=[];if(o){const g={...s(o),default_shipping:!0};m=[{...s(n),default_billing:!0},g]}else m=[{...s(n),default_billing:!0,default_shipping:!0}];i({inputsDefaultValueSet:E,addressesData:m})}:void 0;return p(()=>{const o=_.on("authenticated",n=>{v(n)},{eager:!0});return()=>{o==null||o.off()}},[]),p(()=>{const o=_.on("order/data",n=>{L(n)},{eager:!0});return()=>{o==null||o.off()}},[]),p(()=>{r&&u!==void 0&&(u||!a||r(a).then(o=>h(o)).catch(()=>h(!0)))},[u,r,a]),{order:t,onSignUpClickHandler:N}},q=e=>{var t;const{order:r,onSignUpClickHandler:i}=M(e);return l("div",{children:r?l(j,{customerName:(t=r.billingAddress)==null?void 0:t.firstName,onSignUpClick:i,orderNumber:r.number}):l(b,{})})},j=({customerName:e,orderNumber:r,onSignUpClick:i})=>{const t=w({title:l(d,{id:"Order.OrderHeader.title",fields:{name:e}}),defaultTitle:"Order.OrderHeader.defaultTitle",order:l(d,{id:"Order.OrderHeader.order",fields:{order:r}}),createAccountMessage:"Order.OrderHeader.CreateAccount.message",createAccountButton:"Order.OrderHeader.CreateAccount.button"});return k("div",{"data-testid":"order-header",className:"order-header order-header__card",children:[l(A,{source:V,size:"64",className:"order-header__icon"}),l(O,{className:"order-header__title",title:t.title,size:"large",divider:!1,children:e?t.title:t.defaultTitle}),l("p",{className:"order-header__order",children:t.order}),i&&k("div",{className:"order-header-create-account",children:[l("p",{className:"order-header-create-account__message",children:t.createAccountMessage}),l(H,{"data-testid":"create-account-button",className:"order-header-create-account__button",size:"medium",variant:"secondary",type:"submit",onClick:i,children:t.createAccountButton})]})]})};export{q as OrderHeader,q as default};
4
4
  //# sourceMappingURL=OrderHeader.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{jsx as l,jsxs as h}from"@dropins/tools/preact-jsx-runtime.js";import{classes as q}from"@dropins/tools/lib.js";import{Card as R,Header as S}from"@dropins/tools/components.js";import{useState as g,useEffect as T,useMemo as b}from"@dropins/tools/preact-hooks.js";import"../chunks/ShippingStatusCard.js";import"@dropins/tools/preact-compat.js";import{u as x}from"../chunks/useGetStoreConfig.js";import{Fragment as N}from"@dropins/tools/preact.js";import{events as Q}from"@dropins/tools/event-bus.js";import{s as k}from"../chunks/setTaxStatus.js";import{a as G}from"../chunks/OrderLoaders.js";import{C as M}from"../chunks/CartSummaryItem.js";import{useText as v}from"@dropins/tools/i18n.js";import"../chunks/getStoreConfig.js";import"../chunks/fetch-graphql.js";import"@dropins/tools/fetch-graphql.js";const w=({orderData:s})=>{const[i,o]=g(!0),[d,e]=g(s);return T(()=>{const t=Q.on("order/data",r=>{e(r),o(!1)},{eager:!0});return()=>{t==null||t.off()}},[]),{loading:i,order:d}},Z=({slots:s,className:i,orderData:o,withHeader:d,showConfigurableOptions:e,routeProductDetails:t})=>{const r=x(),{loading:c,order:p}=w({orderData:o});return l("div",{className:q(["order-order-product-list",i]),children:l(j,{slots:s,loading:c,placeholderImage:(r==null?void 0:r.baseMediaUrl)??"",taxConfig:k((r==null?void 0:r.shoppingOrderDisplayPrice)??0),order:p,withHeader:d,showConfigurableOptions:e,routeProductDetails:t})})},I=s=>{const i=(s==null?void 0:s.items)??[],o=i.filter(t=>(t==null?void 0:t.eligibleForReturn)&&(t==null?void 0:t.quantityReturnRequested)).map(t=>({...t,totalQuantity:t.quantityReturnRequested})),d=new Map(o.map(t=>[t.id,t])),e=i.map(t=>{const r=d.get(t==null?void 0:t.id);if(r){const c=t.totalQuantity-r.quantityReturnRequested;return c===0?null:{...t,totalQuantity:c}}return t}).filter(t=>t!==null);return{returnedList:o,canceledItems:e==null?void 0:e.filter(t=>t.quantityCanceled),nonCanceledItems:e==null?void 0:e.filter(t=>!t.quantityCanceled)}},j=({slots:s,placeholderImage:i,loading:o,taxConfig:d,order:e=null,withHeader:t=!0,showConfigurableOptions:r,routeProductDetails:c})=>{const p=!!(e!=null&&e.returnNumber),m=v({cancelled:"Order.OrderProductListContent.cancelledTitle",allOrders:"Order.OrderProductListContent.allOrdersTitle",returned:"Order.OrderProductListContent.returnedTitle",refunded:"Order.OrderProductListContent.refundedTitle",sender:"Order.OrderProductListContent.GiftCard.sender",recipient:"Order.OrderProductListContent.GiftCard.recipient",message:"Order.OrderProductListContent.GiftCard.message",outOfStock:"Order.OrderProductListContent.stockStatus.outOfStock",downloadableCount:"Order.OrderProductListContent.downloadableCount"}),y=b(()=>{var f,O;if(!e)return[];if(!p){const{returnedList:u,canceledItems:n,nonCanceledItems:C}=I(e);return[{type:"returned",list:u,title:m.returned},{type:"cancelled",list:n,title:m.cancelled},{type:"allItems",list:C,title:m.allOrders}].filter(L=>{var P;return((P=L==null?void 0:L.list)==null?void 0:P.length)>0})}return[{type:"returned",list:((O=(f=e.returns.find(u=>u.returnNumber===(e==null?void 0:e.returnNumber)))==null?void 0:f.items)==null?void 0:O.map(u=>({...u,totalQuantity:u.requestQuantity})))??[],title:m.returned}]},[e,p,m]);return e?y.every(a=>a.list.length===0)?null:l(R,{variant:"secondary",className:"order-order-product-list-content",children:y.map((a,f)=>{var u;const O=a.list.filter(n=>n!==null).reduce((n,{totalQuantity:C})=>C+n,0);return h(N,{children:[t?l(S,{title:`${a.title} (${O})`}):null,l("ul",{className:"order-order-product-list-content__items",children:(u=a.list)==null?void 0:u.filter(n=>n!==null).map(n=>l("li",{"data-testid":"order-product-list-content-item",children:l(M,{slots:s,placeholderImage:i,loading:o,product:n,itemType:a.type,taxConfig:d,translations:m,showConfigurableOptions:r,routeProductDetails:c})},n.id))})]},f)})}):l(G,{})};export{Z as OrderProductList,Z as default};
4
4
  //# sourceMappingURL=OrderProductList.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{jsx as d}from"@dropins/tools/preact-jsx-runtime.js";import{classes as L}from"@dropins/tools/lib.js";import"@dropins/tools/components.js";import{useState as p,useEffect as O}from"@dropins/tools/preact-hooks.js";import"../chunks/ShippingStatusCard.js";import"@dropins/tools/preact-compat.js";import{u as b}from"../chunks/useGetStoreConfig.js";import"@dropins/tools/preact.js";import{events as g}from"@dropins/tools/event-bus.js";import{u as w}from"../chunks/useIsMobile.js";import{R as N}from"../chunks/ReturnsListContent.js";import{useText as $}from"@dropins/tools/i18n.js";import"../chunks/getStoreConfig.js";import"../chunks/fetch-graphql.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/returnOrdersHelper.js";import"../chunks/getFormValues.js";import"../chunks/OrderLoaders.js";import"../chunks/capitalizeFirst.js";const h=({orderData:s})=>{const[i,n]=p(s),[o,u]=p([]);return O(()=>{const t=g.on("order/data",e=>{n(e),u(e==null?void 0:e.returns)},{eager:!0});return()=>{t==null||t.off()}},[]),{order:i,orderReturns:o}},B=({slots:s,className:i,orderData:n,withHeader:o,withThumbnails:u,routeReturnDetails:t,routeProductDetails:e,routeTracking:l})=>{const m=b(),{orderReturns:a}=h({orderData:n}),f=w(),r="fullSizeView",c=(m==null?void 0:m.baseMediaUrl)??"",R=$({minifiedViewTitle:`Order.Returns.${r}.returnsList.minifiedViewTitle`,ariaLabelLink:`Order.Returns.${r}.returnsList.ariaLabelLink`,emptyOrdersListMessage:`Order.Returns.${r}.returnsList.emptyOrdersListMessage`,orderNumber:`Order.Returns.${r}.returnsList.orderNumber`,returnNumber:`Order.Returns.${r}.returnsList.returnNumber`,carrier:`Order.Returns.${r}.returnsList.carrier`});return d("div",{className:L(["order-order-returns",i]),children:a.length?d(N,{placeholderImage:c,pageInfo:{pageSize:1,totalPages:1,currentPage:1},minifiedViewKey:r,slots:s,isMobile:f,withOrderNumber:!1,withReturnNumber:!0,orderReturns:a,translations:R,withHeader:o,withThumbnails:u,minifiedView:!1,routeReturnDetails:t,routeProductDetails:e,routeTracking:l,loading:!1}):null})};export{B as OrderReturns,B as default};
4
4
  //# sourceMappingURL=OrderReturns.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{jsx as t,jsxs as q}from"@dropins/tools/preact-jsx-runtime.js";import{classes as L}from"@dropins/tools/lib.js";import{Card as M,InLineAlert as V,Icon as k,Button as C}from"@dropins/tools/components.js";import{useState as v,useCallback as F,useEffect as _,useMemo as D}from"@dropins/tools/preact-hooks.js";import{F as U}from"../chunks/ShippingStatusCard.js";import*as w from"@dropins/tools/preact-compat.js";import"@dropins/tools/preact.js";import{events as N}from"@dropins/tools/event-bus.js";import{F as g,g as H}from"../chunks/getFormValues.js";import{r as f}from"../chunks/initialize.js";import{g as E}from"../chunks/getQueryParam.js";import{g as x,a as B}from"../chunks/getGuestOrder.js";import{useText as z,Text as T}from"@dropins/tools/i18n.js";import"../chunks/network-error.js";import"../fragments.js";import"../chunks/fetch-graphql.js";import"@dropins/tools/fetch-graphql.js";const X=s=>w.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...s},w.createElement("path",{vectorEffect:"non-scaling-stroke",fillRule:"evenodd",clipRule:"evenodd",d:"M1 20.8953L12.1922 1.5L23.395 20.8953H1ZM13.0278 13.9638L13.25 10.0377V9H11.25V10.0377L11.4722 13.9638H13.0278ZM11.2994 16V17.7509H13.2253V16H11.2994Z",fill:"currentColor"})),Z=({onError:s,isAuth:r,renderSignIn:a,routeCustomerOrder:i,routeGuestOrder:c})=>{const[b,u]=v({text:"",type:"success"}),[y,p]=v(!1),m=z({invalidSearch:"Order.Errors.invalidSearch",email:"Order.OrderSearchForm.email",lastname:"Order.OrderSearchForm.lastname",number:"Order.OrderSearchForm.orderNumber"}),R=F(async e=>{const l=E("orderRef"),o=l&&l.length>20;if(!e&&!l||!(e!=null&&e.number)&&!(e!=null&&e.token)&&!l)return null;if(r){const d=await x();(d==null?void 0:d.email)===e.email?f(i,{orderRef:e==null?void 0:e.number}):o||f(c,{orderRef:e.token})}else o||f(c,{orderRef:e==null?void 0:e.token})},[r,i,c]);_(()=>{const e=N.on("order/data",l=>{R(l)},{eager:!0});return()=>{e==null||e.off()}},[R]),_(()=>{const e=E("orderRef"),l=e&&e.length>20?e:null;e&&(l?f(c,{orderRef:e}):r?f(i,{orderRef:e}):a==null||a({render:!0,formValues:{number:e}}))},[r,i,c,a]);const O=D(()=>[{entityType:"CUSTOMER_ADDRESS",is_unique:!1,label:m.email,options:[],defaultValue:"",fieldType:g.TEXT,className:"",required:!0,orderNumber:1,name:"email",id:"email",code:"email",isUnique:!1},{entityType:"CUSTOMER_ADDRESS",is_unique:!1,label:m.lastname,options:[],defaultValue:"",fieldType:g.TEXT,className:"",required:!0,orderNumber:2,name:"lastname",id:"lastname",code:"lastname",isUnique:!1},{entityType:"CUSTOMER_ADDRESS",is_unique:!1,label:m.number,options:[],defaultValue:"",fieldType:g.TEXT,className:"",required:!0,orderNumber:3,name:"number",id:"number",code:"number",isUnique:!1}],[m]);return{onSubmit:F(async(e,l)=>{if(!l)return null;p(!0);const o=H(e.target);await B(o).then(n=>{n||u({text:m.invalidSearch,type:"warning"}),N.emit("order/data",n)}).catch(async n=>{var S;let d=!0;s==null||s({error:n.message});const h=r?await x():{email:""};if((h==null?void 0:h.email)===(o==null?void 0:o.email)){f(i,{orderRef:o.number});return}d=a==null?void 0:a({render:h===null||((S=n==null?void 0:n.message)==null?void 0:S.includes("Please login to view the order.")),formValues:o}),d&&u({text:n.message,type:"warning"})}).finally(()=>{p(!1)})},[r,s,a,i,m.invalidSearch]),inLineAlert:b,loading:y,normalizeFieldsConfig:O}},ne=({className:s,isAuth:r,renderSignIn:a,routeCustomerOrder:i,routeGuestOrder:c,onError:b})=>{const{onSubmit:u,loading:y,inLineAlert:p,normalizeFieldsConfig:m}=Z({onError:b,isAuth:r,renderSignIn:a,routeCustomerOrder:i,routeGuestOrder:c});return t("div",{className:L(["order-order-search",s]),children:t(j,{onSubmit:u,loading:y,inLineAlert:p,fieldsConfig:m})})},j=({onSubmit:s,loading:r,inLineAlert:a,fieldsConfig:i})=>q(M,{variant:"secondary",className:"order-order-search-form",children:[t("h2",{className:"order-order-search-form__title",children:t(T,{id:"Order.OrderSearchForm.title"})}),t("p",{children:t(T,{id:"Order.OrderSearchForm.description"})}),a.text?t(V,{"data-testid":"orderAlert",className:"order-order-search-form__alert",type:a.type,variant:"secondary",heading:a.text,icon:t(k,{source:X})}):null,t(U,{className:"order-order-search-form__wrapper",name:"orderSearchForm",loading:r,fieldsConfig:i,onSubmit:s,children:t("div",{className:"order-order-search-form__button-container",children:t(C,{className:"order-order-search-form__button",size:"medium",variant:"primary",type:"submit",disabled:r,children:t(T,{id:"Order.OrderSearchForm.button"})},"logIn")})})]});export{ne as OrderSearch,ne as default};
4
4
  //# sourceMappingURL=OrderSearch.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{jsx as s,Fragment as S,jsxs as A}from"@dropins/tools/preact-jsx-runtime.js";import{Slot as $,classes as _}from"@dropins/tools/lib.js";import{Button as P,InLineAlert as B,Modal as V,Card as K,Header as Q}from"@dropins/tools/components.js";import{useState as C,useEffect as k,useCallback as T}from"@dropins/tools/preact-hooks.js";import"../chunks/ShippingStatusCard.js";import{useMemo as J}from"@dropins/tools/preact-compat.js";import{u as G}from"../chunks/useGetStoreConfig.js";import"@dropins/tools/preact.js";import{events as I}from"@dropins/tools/event-bus.js";import{c as X,a as Y,r as Z}from"../chunks/confirmCancelOrder.js";import{useText as O,Text as M}from"@dropins/tools/i18n.js";import{C as D}from"../chunks/OrderLoaders.js";import{f as ee}from"../chunks/returnOrdersHelper.js";import{f as w}from"../chunks/formatDateToLocale.js";import{c as b}from"../chunks/capitalizeFirst.js";import{r as U}from"../chunks/initialize.js";import{O as te}from"../chunks/OrderCancelForm.js";import"../chunks/getStoreConfig.js";import"../chunks/fetch-graphql.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/network-error.js";import"../fragments.js";import"../chunks/getFormValues.js";import"../chunks/requestGuestOrderCancel.js";var y=(t=>(t.CANCEL="CANCEL",t.RETURN="RETURN",t.REORDER="REORDER",t))(y||{});const re=({className:t,orderData:e,slots:n,routeCreateReturn:r,routeOnSuccess:u,onError:i})=>{const d=O({cancel:"Order.OrderStatusContent.actions.cancel",createReturn:"Order.OrderStatusContent.actions.createReturn",createAnotherReturn:"Order.OrderStatusContent.actions.createAnotherReturn",reorder:"Order.OrderStatusContent.actions.reorder"}),l=J(()=>{const c=e==null?void 0:e.availableActions,o=!!(c!=null&&c.length),a=!!(e!=null&&e.returnNumber),m=()=>{U(r,{},e)};return s(S,{children:n!=null&&n.OrderActions?s($,{"data-testid":"OrderActionsSlot",name:"OrderCanceledActions",slot:n==null?void 0:n.OrderActions,context:e}):s("div",{"data-testid":"availableActionsList",className:_(["order-order-actions__wrapper",["order-order-actions__wrapper--empty",!o]]),children:c==null?void 0:c.map(p=>{switch(p){case y.CANCEL:return s(S,{children:a?null:s(ce,{orderRef:(e==null?void 0:e.token)||(e==null?void 0:e.id)})});case y.RETURN:return s(P,{variant:"secondary",onClick:m,children:a?d.createAnotherReturn:d.createReturn});case y.REORDER:return s(S,{children:a?null:s(ie,{orderData:e,onError:i,routeOnSuccess:u,children:d.reorder})})}})})})},[i,e,u,r,n,d]);return s("div",{className:_(["order-order-actions",t]),children:l})},ne=({orderData:t})=>{const[e,n]=C(t),[r,u]=C(t==null?void 0:t.status);return k(()=>{const i=I.on("order/data",d=>{n(d),u(d.status)},{eager:!0});return()=>{i==null||i.off()}},[]),{orderStatus:r,order:e}},H=t=>{const e=new URL(window.location.href);t.forEach(n=>{e.searchParams.has(n)&&e.searchParams.delete(n)}),window.history.replaceState({},document.title,e.toString())},se=({enableOrderCancellation:t})=>{const e=O({cancelOrderHeading:"Order.OrderStatusContent.actions.cancel",confirmGuestReturnHeading:"Order.OrderStatusContent.actions.confirmGuestReturn",orderCancelled:"Order.OrderStatusContent.orderCanceled.message",guestRequestReturnMessage:"Order.OrderStatusContent.actions.confirmGuestReturnMessage"}),[n,r]=C(!1),[u,i]=C(!1),[d,l]=C({heading:"",text:"",status:void 0}),c=T(()=>{r(!0),H(["order_id","confirmation_key","action"])},[]),o=T((a,m,p)=>{l({heading:a,text:m,status:p}),H(["action"])},[]);return k(()=>{const a=new URLSearchParams(window.location.search),m=a.get("order_id")??"",p=a.get("confirmation_key")??"",g=a.get("action")??"";u||!m||!p||!g||(t&&g==="cancel"&&(i(!0),X(m,p).then(()=>{l({heading:e.cancelOrderHeading,text:e.orderCancelled,status:"success"})}).catch(h=>{l({heading:e.cancelOrderHeading,text:h.message,status:"warning"})})),g==="return"&&(i(!0),Y(m,p).then(()=>{l({heading:e.confirmGuestReturnHeading,text:e.guestRequestReturnMessage,status:"success"})}).catch(h=>{l({heading:e.confirmGuestReturnHeading,text:h.message,status:"warning"})})))},[t,e,o,u]),{orderActionStatus:d,isDismissed:n,onDismiss:c}},Me=({slots:t,orderData:e,className:n,statusTitle:r,status:u,routeCreateReturn:i,onError:d,routeOnSuccess:l})=>{const{orderStatus:c,order:o}=ne({orderData:e}),a=G(),{orderActionStatus:m,isDismissed:p,onDismiss:g}=se({enableOrderCancellation:a==null?void 0:a.orderCancellationEnabled});return A("div",{className:_(["order-order-status",n]),children:[!p&&(m==null?void 0:m.status)!==void 0?s(B,{style:{marginBottom:"1rem"},heading:m.heading,onDismiss:g,description:m.text,type:m.status}):null,o?s(oe,{title:r,status:u||c,slots:t,orderData:o,routeCreateReturn:i,onError:d,routeOnSuccess:l}):s(D,{withCard:!1})]})},ce=({orderRef:t})=>{const[e,n]=C(!1),r=()=>{n(!0)},u=()=>{n(!1)},i=G(),d=(i==null?void 0:i.orderCancellationReasons)??[],l=c=>c.map((o,a)=>({text:o==null?void 0:o.description,value:a.toString()}));return I.on("order/data",c=>{const o=String(c.status).toLocaleLowerCase();(o==="guest order cancellation requested"||o==="canceled")&&u()}),A(S,{children:[s(P,{variant:"secondary",onClick:r,"data-testid":"cancel-button",children:s(M,{id:"Order.OrderStatusContent.actions.cancel"})}),e&&s(V,{centered:!0,size:"medium",onClose:u,className:"order-order-cancel__modal",title:s("h2",{className:"order-order-cancel__title",children:s(M,{id:"Order.OrderCancelForm.title"})}),"data-testid":"order-cancellation-reasons-modal",children:s(te,{orderRef:t,cancelReasons:l(d)})})]})},N={pending:"orderPending",shiping:"orderShipped",complete:"orderComplete",processing:"orderProcessing","on hold":"orderOnHold",canceled:"orderCanceled","suspected fraud":"orderSuspectedFraud","payment Review":"orderPaymentReview","order received":"orderReceived","guest order cancellation requested":"guestOrderCancellationRequested","pending payment":"orderPendingPayment",rejected:"orderRejected",authorized:"orderAuthorized","paypal canceled reversal":"orderPaypalCanceledReversal","pending paypal":"orderPendingPaypal","paypal reversed":"orderPaypalReversed",closed:"orderClosed"},oe=({slots:t,title:e,status:n,orderData:r,routeCreateReturn:u,onError:i,routeOnSuccess:d})=>{var x,E,L;const l=!!(r!=null&&r.returnNumber),c=String(n).toLocaleLowerCase(),o=(x=r==null?void 0:r.returns)==null?void 0:x[0],a=(o==null?void 0:o.returnStatus)??"",m=(o==null?void 0:o.createdReturnAt)??"",p=O({message:"Order.OrderStatusContent.orderPlaceholder.message",messageWithoutDate:"Order.OrderStatusContent.orderPlaceholder.messageWithoutDate"}),g=O(`Order.OrderStatusContent.${N[c]}.title`),h=O(`Order.OrderStatusContent.${N[c]}.message`),R=O(`Order.OrderStatusContent.${N[c]}.messageWithoutDate`),f=O({title:`Order.OrderStatusContent.returnStatus.${ee(a)}`,returnMessage:"Order.OrderStatusContent.returnMessage"});if(!n)return s("div",{});const q=g!=null&&g.title?g:{title:b(c)},v=h!=null&&h.message?h:p,F=R!=null&&R.messageWithoutDate?R:p,W=r!=null&&r.orderStatusChangeDate?v==null?void 0:v.message.replace("{DATE}",w(r==null?void 0:r.orderStatusChangeDate)):F.messageWithoutDate,j=((L=(E=f==null?void 0:f.returnMessage)==null?void 0:E.replace("{ORDER_CREATE_DATE}",w(r==null?void 0:r.orderDate)))==null?void 0:L.replace("{RETURN_CREATE_DATE}",w(m)))??"",z=l?e??(f.title||b(a)):e??q.title;return A(K,{className:"order-order-status-content",variant:"secondary",children:[s(Q,{title:z}),A("div",{className:"order-order-status-content__wrapper",children:[s("div",{className:_(["order-order-status-content__wrapper-description",["order-order-status-content__wrapper-description--actions-slot",!!(t!=null&&t.OrderActions)]]),children:s("p",{children:l?j:W})}),s(re,{orderData:r,slots:t,routeCreateReturn:u,routeOnSuccess:d,onError:i})]})]})},ie=({onError:t,routeOnSuccess:e,orderData:n,children:r})=>{const[u,i]=C(!1),d=T(()=>{i(!0);const l=n==null?void 0:n.number;Z(l).then(({success:c,userInputErrors:o})=>{c&&U(e,{}),o.length&&(t==null||t(o))}).catch(c=>{t==null||t(c.message)}).finally(()=>{i(!1)})},[n,e,t]);return s(P,{type:"button",disabled:u,variant:"secondary",className:"order-reorder",onClick:d,children:r})};export{Me as OrderStatus,Me as default};
4
4
  //# sourceMappingURL=OrderStatus.js.map
@@ -1,4 +1,4 @@
1
- /*! Copyright 2025 Adobe
1
+ /*! Copyright 2026 Adobe
2
2
  All Rights Reserved. */
3
3
  import{jsx as f}from"@dropins/tools/preact-jsx-runtime.js";import{classes as $}from"@dropins/tools/lib.js";import"@dropins/tools/components.js";import{useState as o,useEffect as g,useCallback as M}from"@dropins/tools/preact-hooks.js";import"../chunks/ShippingStatusCard.js";import"@dropins/tools/preact-compat.js";import{u as T}from"../chunks/useGetStoreConfig.js";import"@dropins/tools/preact.js";import"@dropins/tools/event-bus.js";import{g as v}from"../chunks/getCustomerOrdersReturn.js";import{u as y}from"../chunks/useIsMobile.js";import{R as A}from"../chunks/ReturnsListContent.js";import{useText as V}from"@dropins/tools/i18n.js";import"../chunks/getStoreConfig.js";import"../chunks/fetch-graphql.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/network-error.js";import"../fragments.js";import"../chunks/initialize.js";import"../chunks/returnOrdersHelper.js";import"../chunks/getFormValues.js";import"../chunks/OrderLoaders.js";import"../chunks/capitalizeFirst.js";const L={totalPages:1,currentPage:1,pageSize:1},k=({returnPageSize:i})=>{const[n,u]=o(!0),[s,a]=o([]),[m,l]=o(L),[t,d]=o(1);g(()=>{v(i,t).then(r=>{a((r==null?void 0:r.ordersReturn)??[]),l((r==null?void 0:r.pageInfo)??L)}).finally(()=>{u(!1)})},[i,t]),g(()=>{((window==null?void 0:window.scrollY)??0)>0&&(window==null||window.scrollTo({top:100,behavior:"smooth"}))},[t]);const c=M(r=>{d(r)},[]);return{pageInfo:m,selectedPage:t,loading:n,orderReturns:s,handleSetSelectPage:c}},ir=({slots:i,withReturnsListButton:n,className:u,minifiedView:s,withHeader:a,withThumbnails:m,returnPageSize:l,returnsInMinifiedView:t,routeReturnDetails:d,routeOrderDetails:c,routeTracking:r,routeReturnsList:R,routeProductDetails:O})=>{const p=T(),{pageInfo:b,selectedPage:w,handleSetSelectPage:S,loading:h,orderReturns:N}=k({returnPageSize:l}),P=y(),e=s?"minifiedView":"fullSizeView",I=V({viewAllOrdersButton:`Order.Returns.${e}.returnsList.viewAllOrdersButton`,ariaLabelLink:`Order.Returns.${e}.returnsList.ariaLabelLink`,emptyOrdersListMessage:`Order.Returns.${e}.returnsList.emptyOrdersListMessage`,minifiedViewTitle:`Order.Returns.${e}.returnsList.minifiedViewTitle`,orderNumber:`Order.Returns.${e}.returnsList.orderNumber`,returnNumber:`Order.Returns.${e}.returnsList.returnNumber`,carrier:`Order.Returns.${e}.returnsList.carrier`});return f("div",{className:$(["order-returns-list",u]),children:f(A,{placeholderImage:(p==null?void 0:p.baseMediaUrl)??"",minifiedViewKey:e,withOrderNumber:!0,withReturnNumber:!0,slots:i,selectedPage:w,handleSetSelectPage:S,pageInfo:b,withReturnsListButton:n,isMobile:P,orderReturns:N,translations:I,withHeader:a,returnsInMinifiedView:t,withThumbnails:m,minifiedView:s,routeReturnDetails:d,routeOrderDetails:c,routeTracking:r,routeReturnsList:R,routeProductDetails:O,loading:h})})};export{ir as default};
4
4
  //# sourceMappingURL=ReturnsList.js.map